-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
The "helloworld" code in the ffmpeg.java's doc doesn't work on android platform. #1410
Comments
The paths are found in these properties files: |
thanks。I'll take it a try. You open a good gate for me these days. |
I've tried it.The .so libraries are all in the lib dir,and the .property file is also in the apk.It can be read by the Java Property class,the proguard also works.However when I'm trying to load the cache executable file,I make a breakpoint in the src code of the Loader.java of the Javacpp.There doesn't exist a folder named I think the problem is not related to the proguard,since the .property is loaded to the env,however it doesn't work. |
I see, yes, the |
I just use ffmpeg.So if I get the path ffmpeg file to execute,it will work,yes?The libs are all packed to the apk.And since I get the ffmpeg path,the left work is not related to the loader? |
…es on `Loader.load()` (issue bytedeco/javacv#1410)
As far as I know, all the files need to be extracted since the libraries are not going to get loaded as part of the main process, but I may be wrong. I made some changes that should fix this in the last commit of JavaCPP. I have not tested them, but please give it a try with 1.5.4-SNAPSHOT: http://bytedeco.org/builds/ (It should work by overriding only the version of JavaCPP itself.) |
Good job,It works!But I wonder why here you add a A more detailed feedback about this will be posted here if further problems occurs.Thank u. |
The |
The new problem occurs.You'll find that in the cache dir,there's only a file,ffmpeg.The others(the *.so files)are not here.After I manually calling the method cacheResource,for example I call it this way: |
Right, I think we'll need to do something about that as well. It doesn't work the way it is now?
|
Right, so we'll probably have to extract by ourselves everything we need to the cache directory... |
…s of executables on `Loader.load()` (issue bytedeco/javacv#1410)
Ok, I fixed that as well in the last commit and it works fine on Android 7.0 for me! Enjoy |
Thanks @saudet .I'll do some test later when I finish my current work.Further feedback I'wll post here. |
The fix has been released with JavaCV 1.5.4. Thanks for reporting and testing this out! |
I'm here again.I'm trying to Integrate ffmpeg into android App.The code in ffmpeg.java's doc file doesn't work.
String ffmpeg = Loader.load(org.bytedeco.ffmpeg.ffmpeg.class);
`ProcessBuilder pb = new ProcessBuilder(ffmpeg, "-i", "/path/to/input.mp4", "-vcodec", "h264",
"/path/to/output.mp4");`
pb.inheritIO().start().waitFor();
When I'm trying to load the executable file path,I find the filename to find is like "
platform
/ffmpeg",and via classLoader,it can't be found.Theplatform
meansandroid-x86,android-x86_64,android-arm or android-arm64.
Instead,I find it that when I change the filename param to "lib/
platform
/ffmpeg",the executable file will be found by classLoader.Here,theplatform
meansarm64-v8a,armeabi-v7a,x86, or x86_64
.This occurs only on Android platform so far in my environments.Below is the cache file tree of the app.
Hope that you can get what I'm talking.Emmm,my English skill is poor,thanks. Just the "helloworld" code doesn't work on android.
The text was updated successfully, but these errors were encountered: