havlenapetr / ffmpeg Goto Github PK
View Code? Open in Web Editor NEWthis is port of ffmpeg for android (this is app, but in future i will do android lib from it and then system will be able to convert videos automatically)
this is port of ffmpeg for android (this is app, but in future i will do android lib from it and then system will be able to convert videos automatically)
just select your video which you want to convert, set parametres if you want and press convert (long videos will take a long time)
I set the CONFIG_NETWORK=yes,CONFIG_HTTP_PROTOCOL=yes,CONFIG_TCP_PROTOCOL=yes,+#define CONFIG_NETWORK 1,define CONFIG_HTTP_PROTOCOL 1,define CONFIG_TCP_PROTOCOL 1,//typedef int socklen_t;
config ffmpeg:
jni/libffmpeg/config.h
-CONFIG_HTTP_PROTOCOL 0
-CONFIG_TCP_PROTOCOL 0
+CONFIG_HTTP_PROTOCOL 1
+CONFIG_TCP_PROTOCOL 1
jni/libffmpeg/config-arm.mak:
-!CONFIG_TCP_PROTOCOL=yes
-!CONFIG_HTTP_PROTOCOL=yes
+CONFIG_TCP_PROTOCOL=yes
+CONFIG_HTTP_PROTOCOL=yes
but,the return value is IllegalStateException;I look at the jni,the return value of getintfield is null.
Hi havlenapter
I copied libjniaudio.so, libjnivideo.so from your downloaded project to projectfolder/libs/armeabi folder.
When i compiled and run your project im getting these errors
Please let me know how to solve these errors
dalvikvm(836): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so
dalvikvm(836): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so
dalvikvm(836): No JNI_OnLoad found in /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so
skipping init
dalvikvm(836): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so
dalvikvm(836): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so
dalvikvm(836): No JNI_OnLoad found in /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so
dalvikvm(836): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
dalvikvm(836): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
WARN/dalvikvm(836): No implementation found for native Lcom/media/ffmpeg/FFMpegPlayer;.native_init ()V
01-31 04:46:43.069: WARN/dalvikvm(836): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/media/ffmpeg/FFMpegPlayer;
Thanks
I want to know the required SDK version for ffmpeg, I saw a runtime error in SDK2.1 ENV. that is:
I/dalvikvm( 223): Unable to dlopen(/data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so): Cannot load library: link_image[1721]: 30 could not load needed library 'libsurfaceflinger_client.so' for 'libjnivideo.so' (load_library[1051]: Library 'libsurfaceflinger_client.so' not found)
D/FFMpeg ( 223): Couldn't load lib: jnivideo - Library jnivideo not found
I check the /system/lib/ directory, and do not find the required libsurfaceflinger_client.so, So I must update my SDK to 2.2 or higher,right? If I want ffmpeg compatible with 2.1 platform, how to do it?
Getting this error with CentOS and android ndk r5b, any idea?
/usr/local/android-ndk-r5b/ndk-build NDK_PROJECT_PATH=/usr/src/ffmpeg/FFMpeg NDK_TOOLCHAIN=arm-eabi-4.4.0 NDK_PLATFORM=android-8
Compile++ thumb : ffmpeg_jni <= com_media_ffmpeg_FFMpegPlayer.cpp
In file included from /usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:26,
from /usr/src/ffmpeg/FFMpeg/jni/jni/../libmediaplayer/mediaplayer.h:8,
from /usr/src/ffmpeg/FFMpeg/jni/jni/com_media_ffmpeg_FFMpegPlayer.cpp:24:
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:32:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:33:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:34:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:35:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:38:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:39:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:40:83: warning: backslash and newline separated by space
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/TypeHelpers.h:41:83: warning: backslash and newline separated by space
In file included from /usr/src/ffmpeg/FFMpeg/jni/jni/../libmediaplayer/mediaplayer.h:8,
from /usr/src/ffmpeg/FFMpeg/jni/jni/com_media_ffmpeg_FFMpegPlayer.cpp:24:
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h: In constructor 'android::Vector::Vector()':
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:177: error: 'traits' was not declared in this scope
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:177: error: expected primary-expression before '>' token
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:177: error: '::has_trivial_ctor' has not been declared
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:178: error: expected primary-expression before '>' token
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:178: error: '::has_trivial_dtor' has not been declared
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:179: error: expected primary-expression before '>' token
/usr/src/ffmpeg/FFMpeg/jni/jni/../include/android/utils/Vector.h:179: error: '::has_trivial_copy' has not been declared
make: *** [/usr/src/ffmpeg/FFMpeg/obj/local/armeabi/objs/ffmpeg_jni/com_media_ffmpeg_FFMpegPlayer.o] Error 1
int your Project of mediaplayer.cpp ,in he prepareVideo() Function
Output::VideoDriver_getPixels(stream->codec->width,stream->codec->height ,&pixels)
how to understand this function?
,
Hi havlenapetr,
First of all, thanks a lot for your great job, it’s really helpful.
I compiled your source code successfully and run it on 2.1 emulator.
But when I choose a file, the screen crashed and return the file explorer screen.
Following is log information from DDMS logcat:
09-29 02:49:12.747: DEBUG/dalvikvm(654): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x43d0b8d8
09-29 02:49:12.778: DEBUG/dalvikvm(654): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x43d0b8d8
09-29 02:49:12.878: DEBUG/dalvikvm(654): No JNI_OnLoad found in /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x43d0b8d8
09-29 02:49:12.997: DEBUG/dalvikvm(654): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x43d0b8d8
09-29 02:49:13.028: INFO/dalvikvm(654): Unable to dlopen(/data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so): Cannot load library: link_image[1721]: 30 could not load needed library 'libsurfaceflinger_client.so' for 'libjnivideo.so' (load_library[1051]: Library 'libsurfaceflinger_client.so' not found)
09-29 02:49:13.068: DEBUG/FFMpeg(654): Couldn't load lib: jnivideo - Library jnivideo not found
09-29 02:49:13.087: DEBUG/dalvikvm(654): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so 0x43d0b8d8
09-29 02:49:13.238: INFO/dalvikvm(654): Unable to dlopen(/data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so): Cannot load library: link_image[1721]: 30 could not load needed library 'libjnivideo.so' for 'libffmpeg_jni.so' (find_library[1156]: 30 'libjnivideo.so' failed to load previously)
09-29 02:49:13.247: DEBUG/FFMpeg(654): Couldn't load lib: ffmpeg_jni - Library ffmpeg_jni not found
09-29 02:49:13.278: DEBUG/FFMpegPlayerActivity(654): Error when inicializing ffmpeg: Couldn't load native libs
I’v put libjniaudio.so libjnivideo.so libffmpeg_jni.so under folder libs/armeabi/.
I found it crashed when load native library.
FFMpeg.java.
private static boolean loadLibs() {
if(sLoaded) {
return true;
}
boolean err = false;
for(int i=0;i<LIBS.length;i++) {
try {
System.loadLibrary(LIBS[i]);//crashed here –Jevon.
} catch(UnsatisfiedLinkError e) {
// fatal error, we can't load some our libs
Log.d("FFMpeg", "Couldn't load lib: " + LIBS[i] + " - " + e.getMessage());
err = true;
}
}
if(!err) {
sLoaded = true;
}
return sLoaded;
}
Could you please kindly give me any suggestion about this issue?
Thanks again.
First: I got the source and build. Succesfully
Second: support Network and error '#31 (comment)'
Thrid: follow 'http://odroid.foros-phpbb.com/t338-ffmpeg-compiled-with-android-ndk' and build source ffmpeg-0.8.5 is successfully.
Forth: replace libffmped to new ffmpeg-0.8.5. to build and get error
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c: In function 'AVFormatContext_create':
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:31: error: 'AVFormatContext' has no member named 'year'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:33: error: 'AVFormatContext' has no member named 'track'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:64: error: 'AVFormatContext' has no member named 'title'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:67: error: 'AVFormatContext' has no member named 'author'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:70: error: 'AVFormatContext' has no member named 'copyright'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:73: error: 'AVFormatContext' has no member named 'comment'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:76: error: 'AVFormatContext' has no member named 'album'
jni/jni/com_media_ffmpeg_FFMpegAVFormatContext.c:79: error: 'AVFormatContext' has no member named 'genre'
Please let me know to fix it?
There is such a code "Output::VideoDriver_updateSurface();" in "void MediaPlayer::decode(AVFrame* frame, double pts)". I guess it would show the decoded frame( sPlayer->mFrame). But i cannot realize that how it works and how it sends the data of frame to video driver. Could you give me some help?
Hi,havlenapetr:
I use cygwin and NDKr4b to build cc53d91, it will occur
/havlenapetr-FFMpeg-cc53d91/jni/jni/../include/android/utils/Vector.h:24:23: error: utils/Log.h: No such file or directory
/chavlenapetr-FFMpeg-cc53d91/jni/jni/../include/android/utils/Vector.h:25:30: error: utils/VectorImpl.h: No such file or directory
How should I fix the error, thx
Hi,havlenapetr:
When I download your source code and build it in Cygwin + android NDK r4b. I meet a error like "make: *** No rule to make target /cygdrive/c/android-ndk-r4b/samples/ffmpeg/obj/local/armeabi/libjniaudio.so', needed by
/cygdrive/c/android-ndk-r4b
/samples/ffmpeg/obj/local/armeabi/libffmpeg_jni.so'. Stop."
And I check the /jni/jni/Android.mk file, there the libffmpeg_jni will use LOCAL_SHARED_LIBRARIES := libjniaudio libjnivideo, but I do not find which *.mk will create the two shared libraries. Could you tell what's wrong with it, how to resolve this problem. Thanks!
When I compile the project I have the errors: How can i sove them?
SharedLibrary : libffmpeg_jni.so
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::VideoDriver_updateSurface()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:75: undefined reference to
AndroidSurface_updateSurface'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::VideoDriver_getPixels(int, int, void**)': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:70: undefined reference to
AndroidSurface_getPixels'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::VideoDriver_unregister()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:65: undefined reference to
AndroidSurface_unregister'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::VideoDriver_register(_JNIEnv*, _jobject*)': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:60: undefined reference to
AndroidSurface_register'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_write(void*, int)': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:53: undefined reference to
AndroidAudioTrack_write'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_reload()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:48: undefined reference to
AndroidAudioTrack_reload'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_stop()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:43: undefined reference to
AndroidAudioTrack_stop'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_flush()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:38: undefined reference to
AndroidAudioTrack_flush'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_set(int, unsigned int, int, int)': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:33: undefined reference to
AndroidAudioTrack_set'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_start()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:22: undefined reference to
AndroidAudioTrack_start'
/home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/obj/local/armeabi/libmediaplayer.a(output.o): In function Output::AudioDriver_unregister()': /home/marco/sviluppo/havlenapetr-FFMpeg-cc53d91/jni/libmediaplayer/output.cpp:17: undefined reference to
AndroidAudioTrack_unregister'
collect2: ld returned 1 exit status
I already have FFMPEG running on my phone, I would want to convet all possible audio files to mp3.
I get an error :Encoder (codec id 86017) not found for output stream #0.0.
How can i install lame mp3 codec for ffmpeg?
what should i do if i wanna a pure player of only necessary code? how should i modify this project?thank you!
12-09 04:43:40.167: INFO/ActivityManager(53): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.stagex.player/.FileListActivity }
12-09 04:43:40.468: INFO/ActivityManager(53): Displayed activity org.stagex.player/.FileListActivity: 217 ms (total 3051228 ms)
12-09 04:43:40.867: DEBUG/dalvikvm(53): GC freed 17516 objects / 780416 bytes in 117ms
12-09 04:43:45.588: DEBUG/dalvikvm(96): GC freed 200 objects / 9056 bytes in 90ms
12-09 04:43:46.347: DEBUG/xiamo(350): xiaomo:/sdcard/chuntianli.mp3
12-09 04:43:46.347: INFO/ActivityManager(53): Starting activity: Intent { cmp=org.stagex.player/.PlayerActivity (has extras) }
12-09 04:43:46.426: DEBUG/dalvikvm(350): Trying to load lib /data/data/org.stagex.player/lib/libffmpeg.so 0x4376ac78
12-09 04:43:46.467: DEBUG/dalvikvm(350): Added shared lib /data/data/org.stagex.player/lib/libffmpeg.so 0x4376ac78
12-09 04:43:46.477: DEBUG/dalvikvm(350): No JNI_OnLoad found in /data/data/org.stagex.player/lib/libffmpeg.so 0x4376ac78
12-09 04:43:46.477: DEBUG/dalvikvm(350): Trying to load lib /data/data/org.stagex.player/lib/libplayer-4.so 0x4376ac78
12-09 04:43:46.518: DEBUG/dalvikvm(350): Added shared lib /data/data/org.stagex.player/lib/libplayer-4.so 0x4376ac78
12-09 04:43:46.528: DEBUG/faplayer(350): /sdcard/chuntianli.mp3
12-09 04:43:46.528: DEBUG/dalvikvm(350): +++ not scanning '/system/lib/libwebcore.so' for 'open' (wrong CL)
12-09 04:43:46.528: DEBUG/dalvikvm(350): +++ not scanning '/system/lib/libexif.so' for 'open' (wrong CL)
12-09 04:43:46.528: DEBUG/dalvikvm(350): +++ not scanning '/system/lib/libFFTEm.so' for 'open' (wrong CL)
12-09 04:43:46.528: DEBUG/dalvikvm(350): +++ not scanning '/system/lib/libmedia_jni.so' for 'open' (wrong CL)
12-09 04:43:46.637: INFO/DEBUG(28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-09 04:43:46.647: INFO/DEBUG(28): Build fingerprint: 'generic/google_sdk/generic/:1.6/Donut/20842:eng/test-keys'
12-09 04:43:46.647: INFO/DEBUG(28): pid: 350, tid: 350 >>> org.stagex.player <<<
12-09 04:43:46.647: INFO/DEBUG(28): signal 4 (SIGILL), fault addr 812d055c
12-09 04:43:46.647: INFO/DEBUG(28): r0 be917594 r1 81452488 r2 0000fbff r3 001adf98
12-09 04:43:46.647: INFO/DEBUG(28): r4 001ae791 r5 0000fff6 r6 00000000 r7 00000000
12-09 04:43:46.647: INFO/DEBUG(28): r8 001adf98 r9 be91761c 10 001adf98 fp be91762c
12-09 04:43:46.647: INFO/DEBUG(28): ip 00000000 sp be917578 lr 812c6b68 pc 812d055c cpsr 20000010
12-09 04:43:46.727: INFO/DEBUG(28): #00 pc 002d055c /data/data/org.stagex.player/lib/libffmpeg.so
12-09 04:43:46.737: INFO/DEBUG(28): #1 pc 002c6b64 /data/data/org.stagex.player/lib/libffmpeg.so
12-09 04:43:46.737: INFO/DEBUG(28): #2 pc 002c6d90 /data/data/org.stagex.player/lib/libffmpeg.so
12-09 04:43:46.737: INFO/DEBUG(28): #3 pc 002c7028 /data/data/org.stagex.player/lib/libffmpeg.so
12-09 04:43:46.737: INFO/DEBUG(28): #4 pc 00004a28 /data/data/org.stagex.player/lib/libplayer-4.so
12-09 04:43:46.737: INFO/DEBUG(28): #5 pc 00007d08 /data/data/org.stagex.player/lib/libplayer-4.so
12-09 04:43:46.737: INFO/DEBUG(28): #6 pc 0000e434 /system/lib/libdvm.so
12-09 04:43:46.747: INFO/DEBUG(28): #7 pc 00040b0e /system/lib/libdvm.so
12-09 04:43:46.747: INFO/DEBUG(28): #8 pc 000432b6 /system/lib/libdvm.so
12-09 04:43:46.747: INFO/DEBUG(28): #9 pc 00013198 /system/lib/libdvm.so
12-09 04:43:46.747: INFO/DEBUG(28): #10 pc 00017be4 /system/lib/libdvm.so
12-09 04:43:46.747: INFO/DEBUG(28): #11 pc 0001762c /system/lib/libdvm.so
12-09 04:43:46.756: INFO/DEBUG(28): #12 pc 000529a8 /system/lib/libdvm.so
12-09 04:43:46.756: INFO/DEBUG(28): #13 pc 00059eda /system/lib/libdvm.so
12-09 04:43:46.756: INFO/DEBUG(28): #14 pc 00013198 /system/lib/libdvm.so
12-09 04:43:46.756: INFO/DEBUG(28): #15 pc 00017be4 /system/lib/libdvm.so
12-09 04:43:46.756: INFO/DEBUG(28): #16 pc 0001762c /system/lib/libdvm.so
12-09 04:43:46.756: INFO/DEBUG(28): #17 pc 0005282c /system/lib/libdvm.so
12-09 04:43:46.768: INFO/DEBUG(28): #18 pc 0003f790 /system/lib/libdvm.so
12-09 04:43:46.768: INFO/DEBUG(28): #19 pc 00031caa /system/lib/libdvm.so
12-09 04:43:46.768: INFO/DEBUG(28): #20 pc 0002a804 /system/lib/libandroid_runtime.so
12-09 04:43:46.768: INFO/DEBUG(28): #21 pc 0002b306 /system/lib/libandroid_runtime.so
12-09 04:43:46.768: INFO/DEBUG(28): #22 pc 00008bf2 /system/bin/app_process
12-09 04:43:46.768: INFO/DEBUG(28): #23 pc 0000bd60 /system/lib/libc.so
12-09 04:43:46.768: INFO/DEBUG(28): #24 pc b000163c /system/bin/linker
12-09 04:43:46.778: INFO/DEBUG(28): stack:
12-09 04:43:46.778: INFO/DEBUG(28): be917538 001ce808 [heap]
12-09 04:43:46.778: INFO/DEBUG(28): be91753c afe0ea00 /system/lib/libc.so
12-09 04:43:46.778: INFO/DEBUG(28): be917540 00002bcc
12-09 04:43:46.778: INFO/DEBUG(28): be917544 afe0ed94 /system/lib/libc.so
12-09 04:43:46.778: INFO/DEBUG(28): be917548 00002bcc
12-09 04:43:46.778: INFO/DEBUG(28): be91754c 00000003
12-09 04:43:46.778: INFO/DEBUG(28): be917550 000000da
12-09 04:43:46.778: INFO/DEBUG(28): be917554 000001b8
12-09 04:43:46.778: INFO/DEBUG(28): be917558 00000000
12-09 04:43:46.788: INFO/DEBUG(28): be91755c afe0b03f /system/lib/libc.so
12-09 04:43:46.788: INFO/DEBUG(28): be917560 001cec10 [heap]
12-09 04:43:46.788: INFO/DEBUG(28): be917564 00000000
12-09 04:43:46.788: INFO/DEBUG(28): be917568 00000800
12-09 04:43:46.788: INFO/DEBUG(28): be91756c 00008000 /system/bin/app_process
12-09 04:43:46.788: INFO/DEBUG(28): be917570 df002777
12-09 04:43:46.788: INFO/DEBUG(28): be917574 e3a070ad
12-09 04:43:46.788: INFO/DEBUG(28): #00 be917578 be9175e4 [stack]
12-09 04:43:46.788: INFO/DEBUG(28): be91757c be917594 [stack]
12-09 04:43:46.788: INFO/DEBUG(28): be917580 8147b9a4 /data/data/org.stagex.player/lib/libffmpeg.so
12-09 04:43:46.788: INFO/DEBUG(28): be917584 00000001
12-09 04:43:46.788: INFO/DEBUG(28): be917588 00000000
12-09 04:43:46.797: INFO/DEBUG(28): be91758c 00000000
12-09 04:43:46.797: INFO/DEBUG(28): #1 be917590 afe39dd4 /system/lib/libc.so
12-09 04:43:46.797: INFO/DEBUG(28): be917594 001ce588 [heap]
12-09 04:43:46.797: INFO/DEBUG(28): be917598 001adf98 [heap]
12-09 04:43:46.797: INFO/DEBUG(28): be91759c 00000800
12-09 04:43:46.797: INFO/DEBUG(28): be9175a0 00000800
12-09 04:43:46.797: INFO/DEBUG(28): be9175a4 00100000 [heap]
12-09 04:43:46.797: INFO/DEBUG(28): be9175a8 00000800
12-09 04:43:46.797: INFO/DEBUG(28): be9175ac 00000000
12-09 04:43:46.797: INFO/DEBUG(28): be9175b0 001adf98 [heap]
12-09 04:43:46.797: INFO/DEBUG(28): be9175b4 812c6d94 /data/data/org.stagex.player/lib/libffmpeg.so
12-09 04:43:47.506: DEBUG/Zygote(30): Process 350 terminated by signal (4)
12-09 04:43:47.506: INFO/ActivityManager(53): Process org.stagex.player (pid 350) has died.
12-09 04:43:47.518: INFO/WindowManager(53): WIN DEATH: Window{439753a0 org.stagex.player/org.stagex.player.FileListActivity paused=false}
12-09 04:43:47.587: INFO/ActivityManager(53): Start proc org.stagex.player for activity org.stagex.player/.FileListActivity: pid=362 uid=10024 gids={3003}
12-09 04:43:47.657: INFO/jdwp(362): received file descriptor 20 from ADB
12-09 04:43:47.708: DEBUG/ddm-heap(362): Got feature list request
12-09 04:43:47.778: WARN/UsageStats(53): Something wrong here, didn't expect org.stagex.player to be resumed
12-09 04:43:47.998: WARN/InputManagerService(53): Got RemoteException sending setActive(false) notification to pid 350 uid 10024
Hi,havlenapetr
When I download your source code and build it on Ubuntu with NDKr5, i meet an error, below is the logs, the code was downloaded from debug branch today.
root@ubuntu:~/workspace/havlenapetr_FFMpeg_debug/jni/libffmpeg# /root/root/android-ndk-r5/ndk-build NDK_PROJECT_PATH=/root/workspace/havlenapetr_FFMpeg_debug/ TARGET_TOOLCHAIN=arm-eabi-4.4.0 TARGET_PLATFORM=android-8
Compile thumb : ffmpeg_jni <= com_media_ffmpeg_FFMpeg.c
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c: In function 'getutime':
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c:3812: error: storage size of 'rusage' isn't known
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c:3814: error: 'RUSAGE_SELF' undeclared (first use in this function)
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c:3814: error: (Each undeclared identifier is reported only once
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c:3814: error: for each function it appears in.)
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c: In function 'FFMpeg_parseOptions':
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/com_media_ffmpeg_FFMpeg.c:4399: warning: passing argument 4 of 'parse_options' from incompatible pointer type
/root/workspace/havlenapetr_FFMpeg_debug//jni/jni/../libffmpeg/cmdutils.h:132: note: expected 'void ()(const char *)' but argument is of type 'struct AVFormatContext * ()(const char )'
make: ** [/root/workspace/havlenapetr_FFMpeg_debug//obj/local/armeabi/objs/ffmpeg_jni/com_media_ffmpeg_FFMpeg.o] Error 1
Can you tell me how to build your project?
I received various build errors using NDKv5 on OS X . I was able to fix most of them by manually copying missing header files to some locations and fixing the import statements. Still, one I can't resolve:
make: *** [/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libffmpeg_jni.so] Error 1
charon:android-ndk-r5b werner$ ./ndk-build
Compile++ thumb : mediaplayer <= output.cpp
Compile++ thumb : mediaplayer <= mediaplayer.cpp
StaticLibrary : libmediaplayer.a
SharedLibrary : libffmpeg_jni.so
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::VideoDriver_updateSurface()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:74: undefined reference to `AndroidSurface_updateSurface'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::VideoDriver_getPixels(int, int, void**)':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:69: undefined reference to `AndroidSurface_getPixels'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::VideoDriver_unregister()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:64: undefined reference to `AndroidSurface_unregister'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::VideoDriver_register(_JNIEnv*, _jobject*)':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:59: undefined reference to `AndroidSurface_register'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_write(void*, int)':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:52: undefined reference to `AndroidAudioTrack_write'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_reload()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:47: undefined reference to `AndroidAudioTrack_reload'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_stop()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:42: undefined reference to `AndroidAudioTrack_stop'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_flush()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:37: undefined reference to `AndroidAudioTrack_flush'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_set(int, unsigned int, int, int)':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:32: undefined reference to `AndroidAudioTrack_set'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_start()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:21: undefined reference to `AndroidAudioTrack_start'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_unregister()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:16: undefined reference to `AndroidAudioTrack_unregister'
/Users/werner/Documents/Eclipse_Java/ffPlayer/obj/local/armeabi/libmediaplayer.a(output.o): In function `Output::AudioDriver_register()':
/Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp:11: undefined reference to `AndroidAudioTrack_register'
collect2: ld returned 1 exit status
There doesn't seem to be an <android/surface.h>
, which is included in output.cpp
.
I just copied it from /jni/include/android/surface.h
to libmediaplayer/android/surface.h
and changed output.cpp
to reflect that, but still the implementation of above methods is just missing. There's no surface.cpp
and no source file in your repository mentions any of those method signatures.
I know that the NDKv4 is supposed to work, but it doesn't:
charon:android-ndk-r4 werner$ ./ndk-build -C /Users/werner/Documents/Eclipse_Java/ffPlayer
Compile++ thumb: mediaplayer <= /Users/werner/Documents/Eclipse_Java/ffPlayer/jni/libmediaplayer/output.cpp
make: *** No rule to make target `/Users/werner/Documents/Eclipse_Java/ffPlayer/bin/ndk/local/armeabi/libjniaudio.so', needed by `/Users/werner/Documents/Eclipse_Java/ffPlayer/bin/ndk/local/armeabi/libmediaplayer.a'. Stop.
Is there any way to overcome these errors? I'm stuck here. As mentioned above, I could get away several of those by just adding missing headers, but these are slightly more complicated.
Thanks for any help.
I am trying to play a .ts video file/stream but I am facing audio video sync issue. Could anyone please suggest me anything for this.
Thanks
Sarvadaman
I managed to compile the debug Branch and I could play videos, but I get no video - only audio is working. The libraries are loaded and also no other errors in LogCat, except "AV_LOG_WARNING: No accelerated colorspace conversion found from %s to %s", but I think that's ok.
Device: HTC Desire
OS: Android 2.2
Already tried it with Windows/cygwin and Linux - both with ndk-r4 and ndk-r5 - makes no difference.
Any ideas? Thanks!!!
(sorry for my buggy english)
Hi,
I have ported the source onto Froyo - Nexus one baseline build. When I launch the application I see the following message and the player crashes:
I/ActivityManager( 90): Starting activity: Intent { cmp=cz.havlena.ffmpeg.ui/.FFMpegPlayerActivity (has extras) }
I/WindowManager( 90): Setting rotation to 1, animFlags=1
I/ActivityManager( 90): Config changed: { scale=1.0 imsi=404/41 loc=en_US touch=3 keys=1/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=4}
D/dalvikvm( 372): No JNI_OnLoad found in /system/lib/libjniaudio.so 0x45074420, skipping init
D/dalvikvm( 372): No JNI_OnLoad found in /system/lib/libjnivideo.so 0x45074420, skipping init
I/ffmpeg_onLoad( 372): loading . . .
I/DEBUG ( 56): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 56): Build fingerprint: 'unknown'
I/DEBUG ( 56): pid: 372, tid: 372 >>> cz.havlena.ffmpeg.ui <<<
I/DEBUG ( 56): signal 11 (SIGSEGV), fault addr 0000002c
I/DEBUG ( 56): r0 00000007 r1 00000001 r2 80ced4ab r3 aca48564
I/DEBUG ( 56): r4 00000000 r5 aca9b3f4 r6 80ced4ab r7 80ced4b2
I/DEBUG ( 56): r8 aca10fc0 r9 0000ccd0 10 4186bbf8 fp bedc8868
I/DEBUG ( 56): ip aca42fe0 sp bedc84d8 lr aca485cb pc aca42ff6 cpsr 80000030
I/DEBUG ( 56): d0 6472656767756265 d1 0046002f00700000
I/DEBUG ( 56): d2 00650070004d005d d3 00700061002e0000
I/DEBUG ( 56): d4 007300730061006c d5 00640061006f004c
I/DEBUG ( 56): d6 002f005b00720065 d7 0074007300790073
I/DEBUG ( 56): d8 41a8000042900000 d9 0000000000000000
I/DEBUG ( 56): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 56): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 56): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 56): d16 4186bbc445097a00 d17 c053000000000000
I/DEBUG ( 56): d18 0000000000000000 d19 0000000000000000
I/DEBUG ( 56): d20 3ff0000000000000 d21 8000000000000000
I/DEBUG ( 56): d22 0000000000000000 d23 0000000000000000
I/DEBUG ( 56): d24 8000000000000000 d25 bff0000000000000
I/DEBUG ( 56): d26 0000000000000000 d27 0000000000000000
I/DEBUG ( 56): d28 0000000000000000 d29 3ff0000000000000
I/DEBUG ( 56): d30 0000000000000000 d31 3ff0000000000000
I/DEBUG ( 56): scr 80000012
I/DEBUG ( 56):
I/DEBUG ( 56): #00 pc 00042ff6 /system/lib/libdvm.so
I/DEBUG ( 56): #1 pc 00015602 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): #2 pc 000139d6 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): #3 pc 00044502 /system/lib/libdvm.so
I/DEBUG ( 56): #4 pc 0005df04 /system/lib/libdvm.so
I/DEBUG ( 56): #5 pc 00015d58 /system/lib/libdvm.so
I/DEBUG ( 56): #6 pc 0001c754 /system/lib/libdvm.so
I/DEBUG ( 56): #7 pc 0001b5f4 /system/lib/libdvm.so
I/DEBUG ( 56): #8 pc 0005674e /system/lib/libdvm.so
I/DEBUG ( 56): #9 pc 0005ed2c /system/lib/libdvm.so
I/DEBUG ( 56): #10 pc 00015d58 /system/lib/libdvm.so
I/DEBUG ( 56): #11 pc 0001c754 /system/lib/libdvm.so
I/DEBUG ( 56): #12 pc 0001b5f4 /system/lib/libdvm.so
I/DEBUG ( 56): #13 pc 0005658c /system/lib/libdvm.so
I/DEBUG ( 56): #14 pc 00041c56 /system/lib/libdvm.so
I/DEBUG ( 56): #15 pc 0002d894 /system/lib/libandroid_runtime.so
I/DEBUG ( 56): #16 pc 0002e990 /system/lib/libandroid_runtime.so
I/DEBUG ( 56): #17 pc 00008ca8 /system/bin/app_process
I/DEBUG ( 56): #18 pc 0000d3c0 /system/lib/libc.so
I/DEBUG ( 56):
I/DEBUG ( 56): code around pc:
I/DEBUG ( 56): aca42fd4 fffe7aa5 bf006900 0c00f20f 460cb5f0
I/DEBUG ( 56): aca42fe4 4d2ab085 461f2101 46164465 f0059003
I/DEBUG ( 56): aca42ff4 6ae3fadd d0052b07 f01f4620 b908f963
I/DEBUG ( 56): aca43004 e03c4604 46314620 f020463a 4603fca9
I/DEBUG ( 56): aca43014 4620b930 463a4631 fc9af020 b1e04603
I/DEBUG ( 56):
I/DEBUG ( 56): code around lr:
I/DEBUG ( 56): aca485a8 00052e90 0000039c 4604b570 b910460d
I/DEBUG ( 56): aca485b8 ff72f7ff 2d014604 d1026866 f7ff4620
I/DEBUG ( 56): aca485c8 6065ffc7 bd704630 b087b5f0 f7ff4607
I/DEBUG ( 56): aca485d8 4d27ff63 4a27a400 58ae192d 46046941
I/DEBUG ( 56): aca485e8 03c0f8d6 f0129104 9b04f905 d03d4283
I/DEBUG ( 56):
I/DEBUG ( 56): stack:
I/DEBUG ( 56): bedc8498 00000001
I/DEBUG ( 56): bedc849c 0000a000 [heap]
I/DEBUG ( 56): bedc84a0 aca10fc0 /system/lib/libdvm.so
I/DEBUG ( 56): bedc84a4 0000ccd0 [heap]
I/DEBUG ( 56): bedc84a8 4186bbf8
I/DEBUG ( 56): bedc84ac afd0be0d /system/lib/libc.so
I/DEBUG ( 56): bedc84b0 0000ccd0 [heap]
I/DEBUG ( 56): bedc84b4 00000001
I/DEBUG ( 56): bedc84b8 00000007
I/DEBUG ( 56): bedc84bc 80ced4b2 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): bedc84c0 aca10fc0 /system/lib/libdvm.so
I/DEBUG ( 56): bedc84c4 aca485cb /system/lib/libdvm.so
I/DEBUG ( 56): bedc84c8 00000000
I/DEBUG ( 56): bedc84cc aca9b3f4 /system/lib/libdvm.so
I/DEBUG ( 56): bedc84d0 df002777
I/DEBUG ( 56): bedc84d4 e3a070ad
I/DEBUG ( 56): #00 bedc84d8 0000ccd0 [heap]
I/DEBUG ( 56): bedc84dc aca43321 /system/lib/libdvm.so
I/DEBUG ( 56): bedc84e0 0000aa50 [heap]
I/DEBUG ( 56): bedc84e4 0000ccd0 [heap]
I/DEBUG ( 56): bedc84e8 a712ec97
I/DEBUG ( 56): bedc84ec aca42fd9 /system/lib/libdvm.so
I/DEBUG ( 56): bedc84f0 80d219d8 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): bedc84f4 0000aa50 [heap]
I/DEBUG ( 56): bedc84f8 80c1399d /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): bedc84fc 80c15605 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): #1 bedc8500 80d219d8 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): bedc8504 80ced250 /system/lib/libffmpeg_jni.so
I/DEBUG ( 56): bedc8508 45074420 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 56): bedc850c 80c139db /system/lib/libffmpeg_jni.so
I/ActivityManager( 90): Process cz.havlena.ffmpeg.ui (pid 372) has died.
I/WindowManager( 90): Setting rotation to 0, animFlags=1
Can you please help - I see that all the libas are part of /system/lib and the build compiles / links fine. Not sure why the application cannot find the JNI...
I placed the .so both in root of the build folder and in the default libs/armeabi... but still i see this issue.
The build is based on Nexus one and not NDK, so I have made all NDK related flags to false and also using only player, not the converter.
Can you please help.
Thanks
I exec "make APP="FFmpeg",then suffered this issues. Why?
dragon@dragon-desktop:~/android-ndk-1.6_r1$ make APP=FFmpeg
Android NDK: Building for application 'FFmpeg'
make: *** no rules to create“out/apps/FFmpeg//libffmpeg.so”need object “out/apps/FFmpeg//libavformat.a”。stop。
I dont know how to convert video/audio.
There is nothing showing when I press menu button.Any thing wrong?
Is it possibel to run the project on Android 1.5?
I tried to do so and it failed in loading the jniaudio and jnivideo libraries.
Do I need to build them for 1.5 system?
Is it possible?
How do I do that?
Hi,Havlenapetr:
I debug the FFMPEG files with ndk-gdb, when i list the source file, appear “No symbol table is loaded. Use the "file" command.” But the same way,I can debug other jni project,such as the sample "hello-jni", why? Thank you!
D/dalvikvm(17101): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x40513320
D/dalvikvm(17101): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x40513320
D/dalvikvm(17101): No JNI_OnLoad found in /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x40513320, skipping init
D/dalvikvm(17101): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x40513320
D/dalvikvm(17101): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x40513320
D/dalvikvm(17101): No JNI_OnLoad found in /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x40513320, skipping init
D/dalvikvm(17101): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so 0x40513320
D/dalvikvm(17101): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so 0x40513320
I/ffmpeg_onLoad(17101): loading . . .
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpeg natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegAVFormatContext natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegAVCodecContext natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegAVRational natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegAVInputFormat natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegUtils natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegAVFrame natives
I/ffmpeg_onLoad(17101): Registering com/media/ffmpeg/FFMpegPlayer natives
I/ffmpeg_onLoad(17101): loaded
I/FFMpegPlayer-JNI(17101): native_init
I/FFMpegPlayer-JNI(17101): native_setup
I/FFMpegMediaPlayer(17101): setListener
I/FFMpegPlayer-JNI(17101): setDataSource: path /sdcard/media/20091214075135.WMV.flv
I/FFMpegMediaPlayer(17101): setDataSource(/sdcard/media/20091214075135.WMV.flv)
E/FFMpegMovieViewAndroid(17101): setVideoPath:/sdcard/media/20091214075135.WMV.flv
E/FFMpegPlayerActivity(17101): setVideoPath: /sdcard/media/20091214075135.WMV.flv
I/ActivityManager( 96): Displayed cz.havlena.ffmpeg.ui/.FFMpegPlayerActivity: +347ms
I/SurfaceWrapper(17101): registering video surface
D/dalvikvm(17101): GetFieldID: unable to find field Landroid/view/Surface;.mSurface:I
I/SurfaceWrapper(17101): GetFieldID mNativeSurface
I/SurfaceWrapper(17101): registered
I/AudioTrackWrapper(17101): registering audio track
I/AudioTrackWrapper(17101): registered
I/FFMpegMediaPlayer(17101): prepareVideo
I/SurfaceWrapper(17101): getting surface's pixels 720x480
I/SurfaceWrapper(17101): getted
I/FFMpegMediaPlayer(17101): prepareAudio
I/AudioTrackWrapper(17101): setting audio track
E/FFMpegMovieViewAndroid(17101): mPlayer prepare
E/FFMpegMovieViewAndroid(17101): startVideo
I/FFMpegMediaPlayer(17101): starting main player thread
I/FFMpegMediaPlayer(17101): playing 720x480
I/FFMpegThread(17101): starting thread
I/FFMpegAudioDecoder(17101): decoding audio
I/FFMpegThread(17101): starting thread
I/FFMpegVideoDecoder(17101): decoding video
E/FFMpegVideoDecoder(17101): pts :0.000000
E/FFMpegVideoDecoder(17101): uncompleted
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.020000
E/FFMpegVideoDecoder(17101): uncompleted
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.040000
E/FFMpegVideoDecoder(17101): completed
I/DEBUG (17063): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (17063): Build fingerprint: 'google/passion/passion:2.3.4/GRJ22/121341:user/release-keys'
I/DEBUG (17063): pid: 17101, tid: 17115 >>> cz.havlena.ffmpeg.ui <<<
I/DEBUG (17063): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0077009d
I/DEBUG (17063): r0 00770065 r1 450c1e08 r2 ffffffff r3 451c2020
I/DEBUG (17063): r4 00770065 r5 0032cd48 r6 450c1e08 r7 ffffffff
I/DEBUG (17063): r8 00000000 r9 450c1e08 10 00100000 fp 00000001
I/DEBUG (17063): ip a906004c sp 450c1d88 lr a902dce9 pc a902d866 cpsr a000b830
I/DEBUG (17063): d0 8000000000000000 d1 8000000000000000
I/DEBUG (17063): d2 8000000000000000 d3 8000000000000000
I/DEBUG (17063): d4 8000000000000000 d5 8000000000000000
I/DEBUG (17063): d6 8000000000000000 d7 0000000000000000
I/DEBUG (17063): d8 0000000000000000 d9 c2980000438d33d0
I/DEBUG (17063): d10 434e47664052c980 d11 00000000434e4766
I/DEBUG (17063): d12 0000000000000000 d13 0000000000000000
I/DEBUG (17063): d14 0000000000000000 d15 0000000000000000
I/DEBUG (17063): d16 4431202840534370 d17 7e37e43c8800759c
I/DEBUG (17063): d18 bf56c086eba4cb27 d19 3e185a132c6ff6ff
I/DEBUG (17063): d20 3fa55553e1053a42 d21 3fd799a28b72e08a
I/DEBUG (17063): d22 3e21ee9bcaaa3444 d23 3ef99342e0ee5069
I/DEBUG (17063): d24 3e66376972bea4d0 d25 404c800000000000
I/DEBUG (17063): d26 3ff0000000000000 d27 bf8d0c1646588a48
I/DEBUG (17063): d28 c0016d22c9ff65e7 d29 bfc62e42fefa39ef
I/DEBUG (17063): d30 bc561a893effbcaa d31 3e005c6110000000
I/DEBUG (17063): scr 20000012
I/DEBUG (17063):
I/FFMpegVideoDecoder(17101): run!!!
I/DEBUG (17063): #00 pc 0002d866 /system/lib/libmedia.so
I/DEBUG (17063): #1 pc 0002dce4 /system/lib/libmedia.so
I/DEBUG (17063): #2 pc 00001150 /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so
I/DEBUG (17063): #3 pc 002430ec /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
I/DEBUG (17063): #4 pc 0024229e /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
I/DEBUG (17063): #5 pc 00242902 /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
I/DEBUG (17063): #6 pc 00242862 /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
I/DEBUG (17063): #7 pc 002426d4 /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
I/DEBUG (17063): #8 pc 00242e10 /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so
I/DEBUG (17063): #9 pc 000118e4 /system/lib/libc.so
I/DEBUG (17063): #10 pc 000114b0 /system/lib/libc.so
I/DEBUG (17063):
I/DEBUG (17063): code around pc:
I/DEBUG (17063): a902d844 bd1cf819 4ff0e92d 69c44605 68c82a00
I/DEBUG (17063): a902d854 bfa8b095 0b0af04f 4617460e 4620900d
I/DEBUG (17063): a902d864 f8b4bfb8 2300b038 610b60cb fb7af7ff
I/DEBUG (17063): a902d874 28004682 80b4f040 f8df4620 f7fe8214
I/DEBUG (17063): a902d884 4a81eac0 0044f105 4b829011 fbab44f8
I/DEBUG (17063):
I/DEBUG (17063): code around lr:
I/DEBUG (17063): a902dcc8 e03a0015 f7ff4638 4601fbab f7fe4620
I/DEBUG (17063): a902dcd8 4649e90e 32fff04f 46389005 fdb0f7ff
I/DEBUG (17063): a902dce8 da032800 42984b16 e025d127 0021f897
I/DEBUG (17063): a902dcf8 d1122802 f0116e39 d10e0301 9a079d06
E/FFMpegVideoDecoder(17101): pts :0.060000
E/FFMpegVideoDecoder(17101): completed
I/DEBUG (17063): a902dd08 e007086d c003f916 0180f08c f8220208
I/DEBUG (17063):
I/DEBUG (17063): stack:
I/DEBUG (17063): 450c1d48 00000000
I/DEBUG (17063): 450c1d4c 00000000
I/DEBUG (17063): 450c1d50 00000000
I/DEBUG (17063): 450c1d54 00000000
I/DEBUG (17063): 450c1d58 00000000
I/DEBUG (17063): 450c1d5c 00000000
I/DEBUG (17063): 450c1d60 00000000
I/DEBUG (17063): 450c1d64 00000000
I/DEBUG (17063): 450c1d68 00000000
I/DEBUG (17063): 450c1d6c 00000000
I/DEBUG (17063): 450c1d70 00000000
I/DEBUG (17063): 450c1d74 00000000
I/DEBUG (17063): 450c1d78 00000000
I/DEBUG (17063): 450c1d7c 00000000
I/DEBUG (17063): 450c1d80 df002777
I/DEBUG (17063): 450c1d84 e3a070ad
I/DEBUG (17063): #00 450c1d88 00000000
I/DEBUG (17063): 450c1d8c 00000000
I/DEBUG (17063): 450c1d90 00000000
I/DEBUG (17063): 450c1d94 00000000
I/DEBUG (17063): 450c1d98 00000000
I/DEBUG (17063): 450c1d9c 00000000
I/DEBUG (17063): 450c1da0 00000000
I/DEBUG (17063): 450c1da4 00000000
I/DEBUG (17063): 450c1da8 00000000
I/DEBUG (17063): 450c1dac 00000000
I/DEBUG (17063): 450c1db0 00000000
I/DEBUG (17063): 450c1db4 00000000
I/DEBUG (17063): 450c1db8 00000000
I/DEBUG (17063): 450c1dbc 00001000
I/DEBUG (17063): 450c1dc0 00000000
I/DEBUG (17063): 450c1dc4 00000000
I/DEBUG (17063): 450c1dc8 00000000
I/DEBUG (17063): 450c1dcc 00000000
I/DEBUG (17063): 450c1dd0 00000000
I/DEBUG (17063): 450c1dd4 00000000
I/DEBUG (17063): 450c1dd8 00000000
I/DEBUG (17063): 450c1ddc 00001000
I/DEBUG (17063): 450c1de0 00001000
I/DEBUG (17063): 450c1de4 451c2020
I/DEBUG (17063): 450c1de8 0032cd48
I/DEBUG (17063): 450c1dec 00000000
I/DEBUG (17063): 450c1df0 450c1e08
I/DEBUG (17063): 450c1df4 00100000
I/DEBUG (17063): 450c1df8 00000001
I/DEBUG (17063): 450c1dfc a902dce9 /system/lib/libmedia.so
I/DEBUG (17063): #1 450c1e00 00000000
I/DEBUG (17063): 450c1e04 00000000
I/DEBUG (17063): 450c1e08 00000000
I/DEBUG (17063): 450c1e0c 00000000
I/DEBUG (17063): 450c1e10 00032c2c
I/DEBUG (17063): 450c1e14 00001000
I/DEBUG (17063): 450c1e18 002e90f0
I/DEBUG (17063): 450c1e1c 002e9123
I/DEBUG (17063): 450c1e20 00000198
I/DEBUG (17063): 450c1e24 80503a10
I/DEBUG (17063): 450c1e28 00001000
I/DEBUG (17063): 450c1e2c 80503a64
I/DEBUG (17063): 450c1e30 00000054
I/DEBUG (17063): 450c1e34 451c2020
I/DEBUG (17063): 450c1e38 0032cb30
I/DEBUG (17063): 450c1e3c 80501153 /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.081000
E/FFMpegVideoDecoder(17101): completed
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.101000
E/FFMpegVideoDecoder(17101): completed
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.122000
E/FFMpegVideoDecoder(17101): completed
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.142000
E/FFMpegVideoDecoder(17101): completed
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.162000
E/FFMpegVideoDecoder(17101): completed
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.183000
E/FFMpegVideoDecoder(17101): completed
I/FFMpegVideoDecoder(17101): run!!!
E/FFMpegVideoDecoder(17101): pts :0.203000
E/FFMpegVideoDecoder(17101): completed
I/DEBUG (17063): debuggerd committing suicide to free the zombie!
I/BootReceiver( 96): Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
I/DEBUG (17117): debuggerd: Apr 22 2011 14:08:15
I/ActivityManager( 96): Process cz.havlena.ffmpeg.ui (pid 17101) has died.
I/WindowManager( 96): WIN DEATH: Window{40565898 cz.havlena.ffmpeg.ui/cz.havlena.ffmpeg.ui.FFMpegFileExplorer paused=false}
I/WindowManager( 96): WIN DEATH: Window{40a17e60 SurfaceView paused=false}
I/WindowManager( 96): WIN DEATH: Window{40800318 cz.havlena.ffmpeg.ui/cz.havlena.ffmpeg.ui.FFMpegPlayerActivity paused=false}
how to solve this bug? thanks!
Thanks for providing this great set of source files to be able to build under Android NDK and SDK. It has at least got me to the point that I can build both the native library and Android app.
I have compared these source files with the ones from the ffmpeg git repository and there are a lot of updated and new files. Was the only thing you did was to add the Android.mk files into all the folders? Would it just be a matter of adding the Android.mk files to the folders in the latest source files? Do you have plans to update your git repository with the latest code?
Thanks
Hi, havlenapetr
I have complied the video and audio wrapper,and got the libjnivideo.so and libjniaudio.so both with eclair and froyo,they work well except the synching ,Can you tell me how to synching them? I found the tutorials in http://dranger.com/ffmpeg/tutorial06.html but I couldn't find how to apply to your project,Thank you .
when i build ,i got those error
Administrator@PC-201102141654 ~
$ $NDK/ndk-build NDK_PROJECT_PATH=$NDK/samples/FFMPEG
Compile++ thumb : ffmpeg_jni <= com_media_ffmpeg_FFMpegPlayer.cpp
In file included from F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../libmediaplaye
r/mediaplayer.h:8,
from F:/android-ndk-r5b/samples/FFMPEG/jni/jni/com_media_ffmpeg
_FFMpegPlayer.cpp:24:
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:24:2
3: error: utils/Log.h: No such file or directory
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:25:3
0: error: utils/VectorImpl.h: No such file or directory
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:26:3
1: error: utils/TypeHelpers.h: No such file or directory
In file included from F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../libmediaplaye
r/mediaplayer.h:8,
from F:/android-ndk-r5b/samples/FFMPEG/jni/jni/com_media_ffmpeg
_FFMpegPlayer.cpp:24:
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:40:
error: expected class-name before '{' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:156:
error: 'status_t' does not name a type
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:157:
error: 'status_t' does not name a type
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'void android::Vector::clear()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:60:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'size_t android::Vector::size() const':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:67:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'bool android::Vector::isEmpty() const':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:69:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'size_t android::Vector::capacity() const':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:71:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::setCapacity(size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:73:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
constructor 'android::Vector::Vector()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:175:
error: class 'android::Vector' does not have any field named 'VectorImpl'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:176:
error: 'traits' was not declared in this scope
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:176:
error: expected primary-expression before '>' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:176:
error: '::has_trivial_ctor' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:176:
error: 'HAS_TRIVIAL_CTOR' was not declared in this scope
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:177:
error: expected primary-expression before '>' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:177:
error: '::has_trivial_dtor' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:177:
error: 'HAS_TRIVIAL_DTOR' was not declared in this scope
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:178:
error: expected primary-expression before '>' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:178:
error: '::has_trivial_copy' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:178:
error: 'HAS_TRIVIAL_COPY' was not declared in this scope
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
copy constructor 'android::Vector::Vector(const android::Vector&)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:185:
error: class 'android::Vector' does not have any field named 'VectorImpl'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
destructor 'virtual android::Vector::~Vector()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:190:
error: there are no arguments to 'finish_vector' that depend on a template para
meter, so a declaration of 'finish_vector' must be available
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:190:
note: (if you use '-fpermissive', G++ will accept your code, but allowing the u
se of an undeclared name is deprecated)
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'android::Vector& android::Vector::operator=(const a
ndroid::Vector&)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:195:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'const android::Vector& android::Vector::operator=(c
onst android::Vector&) const':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:201:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'const TYPE* android::Vector::array() const':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:207:
error: there are no arguments to 'arrayImpl' that depend on a template paramete
r, so a declaration of 'arrayImpl' must be available
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'TYPE* android::Vector::editArray()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:212:
error: there are no arguments to 'editArrayImpl' that depend on a template para
meter, so a declaration of 'editArrayImpl' must be available
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'TYPE& android::Vector::editItemAt(size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:243:
error: there are no arguments to 'editItemLocation' that depend on a template p
arameter, so a declaration of 'editItemLocation' must be available
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::insertVectorAt(const android::Ve
ctor&, size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: ISO C++ forbids declaration of 'type name' with no type
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: expected '>' before 'VectorImpl'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: expected '(' before 'VectorImpl'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: 'VectorImpl' was not declared in this scope
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: expected primary-expression before '>' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:253:
error: expected ')' before ';' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::appendVector(const android::Vect
or&)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: ISO C++ forbids declaration of 'type name' with no type
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: expected '>' before 'VectorImpl'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: expected '(' before 'VectorImpl'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: 'VectorImpl' was not declared in this scope
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: expected primary-expression before '>' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:258:
error: expected ')' before ';' token
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::insertAt(const TYPE&, size_t, si
ze_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:263:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'void android::Vector::push(const TYPE&)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:268:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::add(const TYPE&)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:273:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::replaceAt(const TYPE&, size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:278:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::insertAt(size_t, size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:283:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'void android::Vector::pop()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:288:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'void android::Vector::push()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:293:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::add()':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:298:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::replaceAt(size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:303:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: In
member function 'ssize_t android::Vector::removeItemsAt(size_t, size_t)':
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:308:
error: 'VectorImpl' has not been declared
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h: At
global scope:
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:312:
error: expected initializer before 'Vector'
F:/android-ndk-r5b/samples/FFMPEG/jni/jni/../include/android/utils/Vector.h:317:
error: expected initializer before 'Vector'
make: *** [/cygdrive/F/android-ndk-r5b/samples/FFMPEG/obj/local/armeabi/objs/ffm
peg_jni/com_media_ffmpeg_FFMpegPlayer.o] Error 1
Administrator@PC-201102141654 ~
$
Hi,
I am successfuly compiling 'https://github.com/havlenapetr/FFMpeg.git' using ndk-r6, libjniaudio, libjnivideo & ffmpeg_jni R successfuly created under the 'libs' folder.
During runtime I get the folllowing @ System.LoadLibrary:
Surprisingly, the above error is NOT GENERATED for 'libjnivideo' for which 'System.LoadLibrary' succeeds.
I am using Cygwin for the build.
What am I doing wrong here? how can I have the above mentioned problem resolved ?
Any help will B appreciated.
~Nadav
Dear havlenapetr:
I found many head files have wrong path ,and some head file such as TypeHelpers.h are not exist,please tell me how to fix it ,thanks,and sorry for my poor English.
D/dalvikvm( 4127): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjniaudio.so 0x40514dc0
D/FFMpeg ( 4127): Couldn't load lib: jniaudio - Cannot load library: reloc_library[1311]: 67 cannot locate '_ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEb'...
D/dalvikvm( 4127): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x40514dc0
D/dalvikvm( 4127): Added shared lib /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x40514dc0
D/dalvikvm( 4127): No JNI_OnLoad found in /data/data/cz.havlena.ffmpeg.ui/lib/libjnivideo.so 0x40514dc0, skipping init
D/dalvikvm( 4127): Trying to load lib /data/data/cz.havlena.ffmpeg.ui/lib/libffmpeg_jni.so 0x40514dc0
D/FFMpeg ( 4127): Couldn't load lib: ffmpeg_jni - Cannot load library: link_image[1962]: 67 could not load needed library 'libjniaudio.so' for 'libffmpeg_jni.so' (find_library[1219]: 67 'libjniaudio.so' failed to load previously)
D/FFMpegPlayerActivity( 4127): Error when inicializing ffmpeg: Couldn't load native libs
how can i do ?
Hi,
I just wanted to ask, if you know how to use fade-in/out effects in android+ffmpeg?
the normal usage is:
ffmpeg -i input_file -vfilters fade=in:0:30 output_file .
when I try the command like this, program quits, in debug i see that it is not a known command (or something like that).
I have registered the fade in effect in
config.h,
the filters are also added in libavfilter :
allfilters.c
vf_fade.c
makefile
Thanks for your help..
Hi,Havlenapetr:
I want to know the mechanism of running JNI and mediaplayer.cpp,how can I debug it with the ndk-gdb,can you tell me the procedure,or you tell me yonr debug method? Thank you!
I compile the debug branch code, and test on the phone, but can't play video. I want to know whether the FFMpeg project have implement play video? Thank you
hi, how to compile with neon or vfp support?
Hi,
First of all thanks for this working ffmpeg port.
After a few days of trying, i want to be able to playback video's while keeping the aspect ratio the same as the source video. I tried to find where the movie gets upscaled, but couldn't find it. Is there a way i can playback the video using the original aspect ratio and black borders at the left/right or bottom/top?
Thanks in advance..
Using FFMpeg library android now i am able to only create :
( 1. ) libffmpeg_jni.so
(2.) libjniaudio.so
(3.) libjnivideo.so
Now sound coming but video does not appear on surface with independent resolution size.
How to handle this case when using your library , is this bug able to handle or not? if yes then plz help me easily steps i am
working on this issue large time not getting way of success , loosed lot of time .
When I tried to open a wma file with the browser (after removing the extension check in java code), it failed to play, after prepareVideo fails (not surprisingly).
So I modified the mediaplayer.cpp file to not call prepareVideo, only audio. Unfortunately prepareAudio fails too. It finds an audio stream and reaches the point where Output::AudioDriver_set is called, but this call unfortunately fails.
Can you help out?
Hello,
I have two raw RTP Streams (no associated RTCPs, no RTSP interface) for audio and video. Codecs: H263 for video, PCMU or PCMA or GSM8000 for audio. The streams are continuous, length is not known (as it's a SIP session - a video call).
Android MediaPlayer doesn't manage to decode and synchronize raw rtp streams.
before I start digging into the FFMPEG library code, could someone tell me if it's possible with FFMPEG? If yes, what could the quality of video and synchronization be?
Thank you,
Kasia
I have compiled it and it results in a mediaplayer in the emulator,but in your readme file,it looks like a media converter.
could you explain it ? thanks!
08-24 14:39:17.207: ERROR/FFMpegMediaPlayer(2371): AV_LOG_WARNING: No accelerated colorspace conversion found from %s to %s.
(this issue is invalid, was looking at the wrong project)
Here is the steps to reproduce the bug.
First, I thought this might be the display matrix problem, so I have tried apply skewed and/or rotate 90 matrix to the doUpdateSurface() function inside libjnivideo.so library. but image still comes out incorrectly. It seems the problem really comes out from the java side. (Surface etc)
Havlenapetr, can you take a look into this issue. Thanks
I have got a error while debug the code using Ubuntu OS on emulator . Please rectify the give below error . I will appreciate to you
DEBUG/FFMpeg(14322): Couldn't load lib: jniaudio - Cannot load library: reloc_library[1312]: 2578 cannot locate '_ZN7android10AudioTrack3setEijiiijPFviPvS1_ES1_iRKNS_2spINS_7IMemoryEEEb'...
DEBUG/FFMpeg(14322): Couldn't load lib: ffmpeg_jni - Cannot load library: link_image[1963]: 2578 could not load needed library 'libjniaudio.so' for 'libffmpeg_jni.so' (find_library[1220]: 2578 'libjniaudio.so' failed to load previously)
can this port run on android2.3?
thanks a lot.
Error like:
make: ***[.../obj/local/armeabi/objs/ffmpeg-jni/com_media_ffmpeg_FFMpegPlayer.o] Error 1.
Before this,there is more error,but the project is running.
Can U help me?
Hello,
your setDataSource doc states "Sets the data source (file-path or http/rtsp URL) to use", but it seems that it simply tries to open the supplied datasource as a file (with av_open_input_file), so it cannot play streams or remote files.
Are you working on enabling this as well in your library? If not, do you have any pointers on how it could be done?
Thanks for any help!
Hi,
When I compiled the source, I got the error from libavformat repo that pcm_read_seek is not found. I tried and grepped the entire repo but could not find the symbol. Can you please let me know if this is a known issue and you have any solution?
Thanks
Hi Guys,
I have exactly the same probelm and compiling the debug branch didn't help.
https://github.com/havlenapetr/FFMpeg/issues/closed#issue/5
Can you please tell where is: "TypeHelpers.h"
Can you please help?
Tx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.