javacv icon indicating copy to clipboard operation
javacv copied to clipboard

how to load native ffmpeg

Open shaomengyang opened this issue 2 years ago • 2 comments

We noticed that javacv's grab (method of ffmegframegrabberr) base on ffmpeg and running on x86 . But our hardware is runnig on ARM, when we try to use grab to decode image ,it'll spend about 30s,which is too slow. The Hardware manufacturer has their own packaged ffmpeg (support c/python),which only cost 1s to docode per image. So,is there the way that we can use manufacturer's packaged ffmpeg by java,to improve the decode efficiency。

shaomengyang avatar Aug 22 '22 06:08 shaomengyang

If we set the "org.bytedeco.javacpp.pathsFirst" system property to "true", it will try to load FFmpeg libraries from the system paths in priority, so that should do what you want: http://bytedeco.org/javacpp/apidocs/org/bytedeco/javacpp/Loader.html#pathsFirst

saudet avatar Aug 23 '22 05:08 saudet

If you're not getting the expected result, we can also set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console.

saudet avatar Aug 23 '22 13:08 saudet