numq / Klarity

FFmpeg and Portaudio based media player library for Jetpack Compose Desktop
Apache License 2.0
8 stars 0 forks source link

How FFmpegKit ? #2

Open CMingTseng opened 1 day ago

CMingTseng commented 1 day ago

Hello

can refer to these two projects.

https://github.com/LandryNorris/FFmpegKitKotlinTestApp

https://github.com/LandryNorris/FFmpegKitKotlin

Wrap ffmpeg directly into the jvm part during the compilation phase?

let the desktop video player run ?

At present, you have to configure ffmpeg related files according to the platform.

I'm looking for a solution that can be used directly after compilation

THX

numq commented 1 day ago

Hello. Since JNI loads binaries at runtime, there are two options - load them by path from file system (in case the installer is used, which will unpack dll files to the necessary directory), or place dll files, for example, in the resources folder and create a temporary file at runtime, using its path for subsequent loading of the library (the same applies to jar files, which provide precompiled binaries for different versions - this is how platform bundle libraries work). Keep in mind that portaudio is also required for the library to work.