-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to include ffmpeg in an Android app? #3137
Comments
Yes you can get ffmpeg binary in android, you need to modify its recipe to include binary as .so file in android lib dir then load that .so as bin file. |
👋 @Rotgal, |
Can you elaborate a bit? Am I supposed to use this recipe or use something like ffmpeg-kit? Any documentations/tutorials would be appreciated |
@ElliotGarbus I think this was not a support request? It was a feature request: "Expose ffmpeg binary" |
@T-Dynamos |
This question troubles me as well. Is my knowledge lacking somewhere? |
This is what @T-Dynamos said basically:
It could also be updating some configure/build flags so that the binary is built.
Go play with this a bit. |
Am I supposed to modify the recipe here |
Here is my hacky tmp fix: https://github.com/T-Dynamos/python-for-android/tree/ffmpeg_bin To use it:
To run ffmpeg bin in android: import subprocess
from android import mActivity
from jnius import autoclass
from os.path import join
app_info = mActivity.getApplicationInfo()
native_lib_dir = app_info.nativeLibraryDir
ffmpeg_bin = join(native_lib_dir, "libffmpegbin.so")
print(
subprocess.run(
[ffmpeg_bin, "-version"], capture_output=True, text=True, check=True
).stdout
) It works by copying So it kinda impersonates executable file as library. |
Hi, I'm working on an Android app using kivy and buildozer. The app focuses on video and audio editing, similar to CapCut and relies on FFmpeg as its backbone for processing. On Windows, I use a system-installed FFmpeg (the one you download and add to the system PATH) and call it using subprocess commands. This setup works perfectly.
However, since the FFmpeg package you install with pip on Windows doesn't meet my app needs, I'm assuming adding FFmpeg to the requirements in the
buildozer.spec
file wouldn't work.Is there a way to include the full build FFmpeg in my Android app?
Are there alternative ways to integrate FFmpeg with Kivy/Buildozer that work well on Android?
The text was updated successfully, but these errors were encountered: