Skip to content

Android's mobileffmpeg.so and mobileffmpeg-abidetect.so are not needed. #6756

@shiumano

Description

@shiumano

#2865
7bfd8e5

It was added in a commit 6 years ago.
The reason given was that ffmpeg was missing libraries necessary for it to function, but it seems only libc++_shared.so and libcpufeatures.so were needed, and mobileffmpeg was not required.

I investigated a bit because I was worried that deleting it might cause it to stop working.

  • Searching for mobileffmpeg in the osu! source code yielded no results.
  • MobileFFmpeg is for executing command-line commands like -i input.mp4 output.mkv from Android Java code. It's not needed in the osu! framework, which uses FFmpeg.AutoGen in C#. (documentation)
  • It's basically designed to be called via JNI (the function is defined with JNIEXPORT jstring JNICALL). It cannot be used in C#. (source code)
  • It requires Java code for MobileFFmpeg to function, but it doesn't exist. An error is output to logcat. (loader's source)
  • There are no dependencies from other native libraries (libav* or other libraries). I checked with ldd, libtree, and strings. The only thing that's automatically loaded is libxamarin-app.so simply because "it's there."
    Incidentally, I confirmed that libc++_shared.so and libcpufeatures.so are requested.
  • I actually tried deleting it, and everything worked fine, including GPU decoding via MediaCodec.

Furthermore, under certain conditions, it fails to start and crashes due to the JNI loading of mobileffmpeg-abidetect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions