简体   繁体   中英

Part of android devices have problems on “new FFmpegFrameRecorder(new File(filePath), 480, 480, 1);”

When I use javacv - 0.8, found that can't fit all the android models.Errors often occur in

FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(new File(filePath), 480, 480, 1);

LogCat shows:

08-06 14:53:13.796: E/AndroidRuntime(8309): FATAL EXCEPTION: main<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309): java.lang.ExceptionInInitializerError<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at com.example.javacvtest.RecordActivity.onCreate(RecordActivity.java:57)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.Activity.performCreate(Activity.java:4470)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1929)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1990)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.ActivityThread.access$600(ActivityThread.java:124)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1148)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.os.Handler.dispatchMessage(Handler.java:99)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.os.Looper.loop(Looper.java:137)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at android.app.ActivityThread.main(ActivityThread.java:4441)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at java.lang.reflect.Method.invokeNative(Native Method)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at java.lang.reflect.Method.invoke(Method.java:511)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at dalvik.system.NativeStart.main(Native Method)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309): Caused by: java.lang.ExceptionInInitializerError<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at com.example.javacvtest.FFmpegFrameRecorder.<clinit>(FFmpegFrameRecorder.java:214)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     ... 15 more<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1286]:<br/>
                            108 cannot locate 'avio_find_protocol_name'...<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at java.lang.Runtime.loadLibrary(Runtime.java:370)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at java.lang.System.loadLibrary(System.java:535)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at org.bytedeco.javacpp.Loader.load(Loader.java:399)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at org.bytedeco.javacpp.Loader.load(Loader.java:353)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at org.bytedeco.javacpp.avformat.<clinit>(avformat.java:13)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     ... 16 more<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static: findLibrary returned null<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at java.lang.Runtime.loadLibrary(Runtime.java:365)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at java.lang.System.loadLibrary(System.java:535)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     at org.bytedeco.javacpp.Loader.load(Loader.java:390)<br/>
08-06 14:53:13.796: E/AndroidRuntime(8309):     ... 18 more<br/>

Tested on Android 4.0.3. And I'm sure I have all *so files in libs/armeabi
How can I solve these errors??

I only get this:

*Comment #3 on issue 367 by samuel.a...@gmail.com: No binaries for Android on ARMv5 devices (Samsung Galaxy Ace/Pop/Y, LG Optimus One, etc.)

https://code.google.com/p/javacv/issues/detail?id=367

Issue 330 has been merged into this issue.*

Not really solve the problem,but may be useful to others.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM