Kmp External Codec Libvlcjni.so | 2021
// shared logic fun playExternalCodecFile(player: PlatformMediaPlayer) player.setDataSource("content://com.example/external_codec_sample.mkv") player.play()
The engine, via libvlcjni.so – its Android JNI bridge – provides a solution by bundling ffmpeg with hundreds of built-in external codecs, decoupled from the OS. kmp external codec libvlcjni.so
Enable verbose logging:
actual fun play() mediaPlayer.play() actual fun stop() mediaPlayer.stop() actual fun isPlaying(): Boolean = mediaPlayer.isPlaying args) Look for logcat output:
val args = arrayOf("-vvv", "--codec=avcodec") // force ffmpeg decoders libVLC = LibVLC(context, args) Look for logcat output: kmp external codec libvlcjni.so