bravobit / FFmpeg-Android

FFMpeg/FFprobe compiled for Android
https://bravobit.nl/
MIT License
734 stars 172 forks source link

[Android] Using existing ffmpeg shared library. #125

Closed arosendorff closed 4 years ago

arosendorff commented 4 years ago

Description I have an app that has the DJI Mobile SDK added to it. Part of the SDK is a video streaming component, which uses ffmpeg to decode the frames from the drone.

When I unzip my .apk file, in the libs folder there is libffmpeg.so, which I assume is from the DJI SDK. Is there a way that I can use that existing ffmpeg instance with this library, without requiring any additional ffmpeg files to be installed as I want to keep my app size down?

I have tried copying and renaming libffmpeg.so to just ffmpeg and placing it in the app's files directory, but when I run FFmpeg.getInstance, I get: /data/user/0/APPIDENTIFIER/files/ffmpeg[1]: syntax error: '(' unexpected so I'm not sure if the .so file is compatible at all. But please let me know if there's perhaps something else I can try to get it working!

stonyz commented 4 years ago

You can't do it now. As the lib run ffmpeg in a new process; just like you run ffmpeg on linux.

arosendorff commented 4 years ago

@stonyz Okay, thank you very much for the info!