On 09/13/2015 05:14 AM, Dan Damian wrote:
> Then looked in the ffmpeg-android-arm.jar and no trace of libvpx.so, this meaning ffmpeg is not compiled with support for VP8.
>>It's linked with statically; it won't show up as a separate library.
> Also, in my code, when I chose avcodec.AV_CODEC_ID_VP8 as the video codec, my Android app throws the following error:
>
> org.bytedeco.javacv.FrameRecorder$Exception: avcodec_open2() error -22: Could not open video codec.
> 09-12 20:34:00.799 6276-6598/xyz.mydognewvr W/System.err﹕ at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:527)
> 09-12 20:34:00.799 6276-6598/xyz.mydognewvr W/System.err﹕ at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:288)
>>Does this happen only on Android? Or does it happen on other platforms too?
> On the other hand, I've run javacpp-presets/cppbuild.sh
> # bash cppbuild.sh -platform android-arm install ffmpeg
> without any success. The scripts were designed to work with android-ndk/toolchains/arm-linux-androideabi-4.6 bu tmy minimum is
> android-ndk-r10e/toolchains/arm-linux-androideabi-4.8....
>>Yes, that's since been updated in the source repository. Use git to get
>>the latest version of the source code from GitHub.
On 09/15/2015 05:45 AM, Dan Damian wrote:
> I've git clone the last version of javacpp-presets which is 1.0.
> /git clone https://github.com/bytedeco/javacpp-presets.git/
> I've noticed a problem in javacpp-presets/ffmpeg/cppbuild.sh:
> at line 27, where it states that /$FFMPEG_VERSION=2.8/
> bu then at line 88, /patch -Np1 <
> ../../../ffmpeg-$FFMPEG_VERSION-android.patch/, resolving to
> /patch -Np1 < ../../../ffmpeg-2.8-android.patch/ sayis /file not found/
> as in the javacpp-presets/ffmpeg only ffmpeg-2.7.1-android.patch
> and ffmpeg-2.7.1-macosx.patch can be found. So the scripts stops
> at patch -Np1 < ../../../ffmpeg-$FFMPEG_VERSION-android.patch and doesnt
> execute, ./configure, make -j4 and make install for ffmpeg.
Oops, I forgot to rename the patch files. Just rename them before
running the script. Sorry about that.
> Anyway I've solved this problem, either by changing the FFMPEG_VERSION
> to 2.7.1 or by commenting the line 88 (that applies tha patch), so that
> the script could go on. But in both cases, cppbuild.sh didn't produce
> any ffmpeg.jar. Isn't this what is expected from this build? To create
> arm specific jars?
We need to run `mvn install` after to get that file. Please try to
follow the build instructions here:
https://github.com/bytedeco/javacpp-presets/#build-instructions
Thanks!
Samuel
--
--- You received this message because you are subscribed to a topic in the Google Groups "javacv" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/javacv/-7mkmuiDMt4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to javacv+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
mFFmpegRecorder = new FFmpegFrameRecorder(Constants.VIDEOS_FOLDER_PATH + File.separator + mVideoFile, Constants.VIDEO_WIDTH, Constants.VIDEO_HEIGHT, 1);
mFFmpegRecorder.setVideoCodec(Constants.VIDEO_CODEC);// where Constants.VIDEO_CODEC = avcodec.AV_CODEC_ID_VP8;
[...]
try {
mFFmpegRecorder.start();
} catch (FFmpegFrameRecorder.Exception e) {
e.printStackTrace();
}
yuvIplImage = IplImage.create(Constants.VIDEO_WIDTH, Constants.VIDEO_HEIGHT, opencv_core.IPL_DEPTH_8U, 2);
I get:
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN2cv22SparseMatConstIteratormmEv" referenced by "libjniopencv_core.so"... at java.lang.Runtime.loadLibrary(Runtime.java:371) at java.lang.System.loadLibrary(System.java:988) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:550) at org.bytedeco.javacpp.Loader.load(Loader.java:415) at org.bytedeco.javacpp.Loader.load(Loader.java:358) at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:309) at org.bytedeco.javacpp.Loader.load(Loader.java:390) at org.bytedeco.javacpp.Loader.load(Loader.java:358) at org.bytedeco.javacpp.helper.opencv_core$AbstractArray.<clinit>(opencv_core.java:109) at xyz.myapp.gui.community.vr.ThreadVideoRecording.<init>(ThreadVideoRecording.java:43) at xyz.myapp.gui.community.vr.MyAppVideoRecordActivity$2.doInBackground(MyAppVideoRecordActivity.java:630) at xyz.myapp.gui.community.vr.MyAppVideoRecordActivity$2.doInBackground(MyAppVideoRecordActivity.java:526) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/myapp.xyz.myappvr-2/base.apk"],nativeLibraryDirectories=[/data/app/myapp.xyz.myappvr-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libgnustl_static.so"
I get:org.bytedeco.javacv.FrameRecorder$Exception: avcodec_open2() error -22: Could not open video codec.Even though I've built ffmepg with the default configuration which includes libvpx support.
I get:Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN2cv22SparseMatConstIteratormmEv" referenced by "libjniopencv_core.so"...
That probably just means you have mismatched versions of libraries. Make sure your app is using the right files. You might have to uninstall everything completely and manually, and then reinstall.I get:Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN2cv22SparseMatConstIteratormmEv" referenced by "libjniopencv_core.so"...
On 09/22/2015 04:36 AM, Dan Damian wrote:
Yes, I've heard reports that x265 and libvpx don't appear to work very well on Android... I'm not sure why. I'm always hoping for somebody to investigate this. Please post an issue on GitHub. BTW, does it happen on some other platforms like Linux or Windows?I get:org.bytedeco.javacv.FrameRecorder$Exception: avcodec_open2() error -22: Could not open video codec.Even though I've built ffmepg with the default configuration which includes libvpx support.
Ok, so I've made some tests.My results are:1) on Linux (Ubuntu 14.04 64 bits), I couldn't reproduce the error (instead obtained another error)
if((ret = avcodec.avcodec_open2(this.video_c, this.video_codec, var12)) < 0) {
this.release();
throw new Exception("avcodec_open2() error " + ret + ": Could not open video codec.");
}
--
1. AndroidConfigured 2 channels for FFMpegFrameRecorder, but on Android the error remains the same.25367-25453/mydog.xyz.mydogvr W/linker﹕ libavformat.so: unused DT entry: type 0x6ffffffe arg 0x64b810-04 21:48:15.112 25367-25453/mydog.xyz.mydogvr W/linker﹕ libavformat.so: unused DT entry: type 0x6fffffff arg 0x210-04 21:48:15.122 25367-25453/mydog.xyz.mydogvr W/linker﹕ libjniavformat.so: unused DT entry: type 0x1d arg 0x165b210-04 21:48:15.122 25367-25453/mydog.xyz.mydogvr W/linker﹕ libjniavformat.so: unused DT entry: type 0x6ffffffe arg 0x1e52c10-04 21:48:15.122 25367-25453/mydog.xyz.mydogvr W/linker﹕ libjniavformat.so: unused DT entry: type 0x6fffffff arg 0x110-04 21:48:15.193 25367-25453/mydog.xyz.mydogvr W/linker﹕ libswscale.so: unused DT entry: type 0x6ffffffe arg 0xdd010-04 21:48:15.193 25367-25453/mydog.xyz.mydogvr W/linker﹕ libswscale.so: unused DT entry: type 0x6fffffff arg 0x110-04 21:48:15.213 25367-25453/mydog.xyz.mydogvr W/linker﹕ libjniswscale.so: unused DT entry: type 0x1d arg 0x38f910-04 21:48:15.213 25367-25453/mydog.xyz.mydogvr W/linker﹕ libjniswscale.so: unused DT entry: type 0x6ffffffe arg 0x5a8c10-04 21:48:15.213 25367-25453/mydog.xyz.mydogvr W/linker﹕ libjniswscale.so: unused DT entry: type 0x6fffffff arg 0x110-04 21:48:15.459 25367-25453/mydog.xyz.mydogvr W/System.err﹕ org.bytedeco.javacv.FrameRecorder$Exception: avcodec_open2() error -22: Could not open video codec.10-04 21:48:15.459 25367-25453/mydog.xyz.mydogvr W/System.err﹕ at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:527)10-04 21:48:15.459 25367-25453/mydog.xyz.mydogvr W/System.err﹕ at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:288)