Closed GoogleCodeExporter closed 8 years ago
this is my code for iplimage conversion to video on android.
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder("/sdcard/folder/test.mpeg",200,150);
try {
recorder.setVideoCodec(13);
recorder.setFrameRate(30);
recorder.setPixelFormat(avutil.PIX_FMT_RGB);
recorder.start();
for (int i=0;i<rgbImage.length;i++)
{
recorder.record(rgbImage[i]);
}
recorder.stop();
}
catch (Exception e){
e.printStackTrace();
}
Original comment by abid.eng...@gmail.com
on 18 Aug 2014 at 10:02
Hi, I'm running into a similar problem, did you find a solution for this?
thank you
Original comment by dani.bol...@gmail.com
on 21 Aug 2014 at 3:14
yes i have redownloaded all the jar files and created a new workspace and then
a new project. only then i was able to solve
Original comment by abid.eng...@gmail.com
on 21 Aug 2014 at 3:19
I cannot get it to work, it complains about " 1898 could not load needed
library 'libswresample.so", but that library is there, all the .so libraries
are in the right place /libs/armeabi , however it seems like it cannot find the
libswresample.so library
Any idea?
the complete error message is below, I have tried to redownload all libraries,
etc but that made no difference. thanks
12-31 21:47:26.260 12373-12373/com.example.root.myapp V/Recorder﹕
FFmpegFrameRecorder: rtmp://live:live@128.122.151.108:1935/live/test.flv
imageWidth: 320 imageHeight 240
12-31 21:47:26.305 12373-12375/com.example.root.myapp D/dalvikvm﹕
GC_CONCURRENT freed 220K, 6% free 12352K/13063K, paused 13ms+1ms, total 25ms
12-31 21:47:26.305 12373-12373/com.example.root.myapp D/dalvikvm﹕
WAIT_FOR_CONCURRENT_GC blocked 4ms
12-31 21:47:26.330 12373-12373/com.example.root.myapp D/dalvikvm﹕ No
JNI_OnLoad found in /system/lib/libc.so 0x419cd358, skipping init
12-31 21:47:26.330 12373-12373/com.example.root.myapp D/dalvikvm﹕ No
JNI_OnLoad found in /system/lib/libm.so 0x419cd358, skipping init
12-31 21:47:26.335 12373-12373/com.example.root.myapp D/dalvikvm﹕ No
JNI_OnLoad found in /system/lib/libz.so 0x419cd358, skipping init
12-31 21:47:26.335 12373-12373/com.example.root.myapp D/dalvikvm﹕ No
JNI_OnLoad found in /system/lib/libdl.so 0x419cd358, skipping init
12-31 21:47:26.340 12373-12373/com.example.root.myapp D/dalvikvm﹕ No
JNI_OnLoad found in /system/lib/liblog.so 0x419cd358, skipping init
12-31 21:47:26.340 12373-12373/com.example.root.myapp D/dalvikvm﹕ Trying to
load lib /data/data/com.example.root.myapp/lib/libavutil.so 0x419cd358
12-31 21:47:26.340 12373-12373/com.example.root.myapp D/dalvikvm﹕ Added
shared lib /data/data/com.example.root.myapp/lib/libavutil.so 0x419cd358
12-31 21:47:26.340 12373-12373/com.example.root.myapp D/dalvikvm﹕ No
JNI_OnLoad found in /data/data/com.example.root.myapp/lib/libavutil.so
0x419cd358, skipping init
12-31 21:47:26.340 12373-12373/com.example.root.myapp D/dalvikvm﹕ Trying to
load lib /data/data/com.example.root.myapp/lib/libjniavutil.so 0x419cd358
12-31 21:47:26.340 12373-12373/com.example.root.myapp D/dalvikvm﹕ Added
shared lib /data/data/com.example.root.myapp/lib/libjniavutil.so 0x419cd358
12-31 21:47:26.350 12373-12375/com.example.root.myapp D/dalvikvm﹕
GC_CONCURRENT freed 469K, 8% free 12417K/13383K, paused 1ms+2ms, total 19ms
12-31 21:47:26.370 12373-12373/com.example.root.myapp D/dalvikvm﹕ Trying to
load lib /data/data/com.example.root.myapp/lib/libavcodec.so 0x419cd358
12-31 21:47:26.370 12373-12373/com.example.root.myapp D/dalvikvm﹕ Trying to
load lib /data/data/com.example.root.myapp/lib/libjniavcodec.so 0x419cd358
12-31 21:47:26.370 12373-12373/com.example.root.myapp W/dalvikvm﹕ Exception
Ljava/lang/UnsatisfiedLinkError; thrown while initializing
Lorg/bytedeco/javacpp/avcodec;
12-31 21:47:26.370 12373-12373/com.example.root.myapp W/dalvikvm﹕ Exception
Ljava/lang/ExceptionInInitializerError; thrown while initializing
Lorg/bytedeco/javacpp/avformat;
12-31 21:47:26.370 12373-12373/com.example.root.myapp W/dalvikvm﹕ Exception
Ljava/lang/ExceptionInInitializerError; thrown while initializing
Lorg/bytedeco/javacv/FFmpegFrameRecorder;
12-31 21:47:26.370 12373-12373/com.example.root.myapp D/AndroidRuntime﹕
Shutting down VM
12-31 21:47:26.370 12373-12373/com.example.root.myapp W/dalvikvm﹕
threadid=1: thread exiting with uncaught exception (group=0x40d862a0)
12-31 21:47:26.370 12373-12373/com.example.root.myapp E/AndroidRuntime﹕
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.example.root.myapp.MyActivity.onCreate(MyActivity.java:31)
at android.app.Activity.performCreate(Activity.java:5184)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at org.bytedeco.javacv.FFmpegFrameRecorder.<clinit>(FFmpegFrameRecorder.java:106)
at
com.example.root.myapp.MyActivity.onCreate(MyActivity.java:31)
at
android.app.Activity.performCreate(Activity.java:5184)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at
android.app.ActivityThread.access$600(ActivityThread.java:140)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at
android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:385)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.avformat.<clinit>(avformat.java:13)
at
org.bytedeco.javacv.FFmpegFrameRecorder.<clinit>(FFmpegFrameRecorder.java:106)
at
com.example.root.myapp.MyActivity.onCreate(MyActivity.java:31)
at
android.app.Activity.performCreate(Activity.java:5184)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at
android.app.ActivityThread.access$600(ActivityThread.java:140)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at
android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1892]: 1898 could not load needed library 'libavcodec.so' for 'libjniavcodec.so' (find_library[1202]: 1898 'libavcodec.so' failed to load previously)
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:410)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.avcodec.<clinit>(avcodec.java:12)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:385)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at
org.bytedeco.javacpp.avformat.<clinit>(avformat.java:13)
at
org.bytedeco.javacv.FFmpegFrameRecorder.<clinit>(FFmpegFrameRecorder.java:106)
at
com.example.root.myapp.MyActivity.onCreate(MyActivity.java:31)
at
android.app.Activity.performCreate(Activity.java:5184)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at
android.app.ActivityThread.access$600(ActivityThread.java:140)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at
android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1892]: 1898 could not load needed library 'libswresample.so' for 'libavcodec.so' (load_library[1094]: Library 'libswresample.so' not found)
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
at org.bytedeco.javacpp.Loader.load(Loader.java:401)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at
org.bytedeco.javacpp.avcodec.<clinit>(avcodec.java:12)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:385)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at
org.bytedeco.javacpp.avformat.<clinit>(avformat.java:13)
at
org.bytedeco.javacv.FFmpegFrameRecorder.<clinit>(FFmpegFrameRecorder.java:106)
at
com.example.root.myapp.MyActivity.onCreate(MyActivity.java:31)
at
android.app.Activity.performCreate(Activity.java:5184)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at
android.app.ActivityThread.access$600(ActivityThread.java:140)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at
android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Original comment by dani.bol...@gmail.com
on 21 Aug 2014 at 7:47
https://github.com/bytedeco/javacv/issues/24
Original comment by samuel.a...@gmail.com
on 22 Aug 2014 at 12:45
Thanks a lot for your help Samuel :)
Do I need to rebuild javacv myself in order to apply the fix that you added?
thanks
Original comment by dani.bol...@gmail.com
on 26 Aug 2014 at 3:17
i dont know much however i have just redownloaded all the files and created
new project in new workspace. then copied all the jar files and extracted
.so files
Original comment by abid.eng...@gmail.com
on 27 Aug 2014 at 3:50
Please find corresponding binaries here:
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacv/0.9.
1-SNAPSHOT/
Original comment by samuel.a...@gmail.com
on 29 Aug 2014 at 12:53
Original issue reported on code.google.com by
abid.eng...@gmail.com
on 18 Aug 2014 at 10:00