Kmp External Codec Libvlcjni.so ((free)) May 2026

Enable verbose logging:

// androidMain/kotlin/PlatformMediaPlayer.kt import org.videolan.libvlc.LibVLC import org.videolan.libvlc.MediaPlayer import org.videolan.libvlc.Media actual class PlatformMediaPlayer private lateinit var libVLC: LibVLC private lateinit var mediaPlayer: MediaPlayer kmp external codec libvlcjni.so

val args = arrayOf("-vvv", "--codec=avcodec") // force ffmpeg decoders libVLC = LibVLC(context, args) Look for logcat output: A Kotlin/Native interop can be created, or use

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. A Kotlin/Native interop can be created

libvlcjni.so loads decoders like libavcodec.so internally – external codecs work immediately. 3.3 iOS / Darwin Target iOS uses MobileVLCKit (Objective-C framework) which also bundles FFmpeg. A Kotlin/Native interop can be created, or use cinterop to call VLCKit, achieving identical external codec support. 4. Verifying External Codec Activation To confirm that libvlcjni.so is using its own decoders and not Android’s MediaCodec:

actual fun play() mediaPlayer.play() actual fun stop() mediaPlayer.stop() actual fun isPlaying(): Boolean = mediaPlayer.isPlaying