@Ro1li
I had a little chat with Google. Maybe it could be a solution for you, since you hate libvlc 😉
And manually selecting a player for different Szenarios is maybe also not the best and most comfortable (from a user perspective) and maybe your app gets even smaller then 🤷♂️
Here is googles solution (translated from German):
„Yes, the developer can extend the ExoPlayer with software decoding and thus completely save libVLC.
This is technically absolutely possible and exactly the way that apps like Just Player go. By default, the naked ExoPlayer only relies on what the smartphone chip can decode in hardware. However, Google has built ExoPlayer (now Jetpack Media3) so that you can insert (expand) software decoders afterwards.
The developer would have to implement the following steps:
1. Install the FFmpeg extension (For the sound)
The biggest problem with 2–4 GB movies (often in MKV format) are audio tracks like AC3, DTS or TrueHD.
The developer downloads the official expansion module from Google (media3-decoder-ffmpeg).
Since Google is not allowed to deliver the FFmpeg library completely compiled for licensing reasons, the developer must compile it himself once for Android.
After that, the ExoPlayer uses software decoding to understand any audio track that could also play VLC.
2. Add video extensions (For the image)
If the movies are available in formats that older phones cannot decode in hardware (such as the modern AV1 codec or 10-bit HEVC), the developer can activate additional software modules:
Media3-decoder-av1 (for AV1 videos).
Media3-decoder-vp9 (for Google/YouTube formats).
3. Change the decoder priority in the code
In order for the player to know when to use the software, the developer must adjust a line in the code:
By default, ExoPlayer is "Use only hardware".
The developer must change the mode to EXTENSION_RENDER_MODE_PREFER.
This means: ExoPlayer first tries hardware (saves battery), but switches automatically and unnoticed to th