Open maximeloridan opened 9 years ago
Yes you do need to copy (all) the missing/required header files as mentioned. Also as suggested in another issue raised here that the Watchme app is (claimed to) work ok with ffpmeg version 2.3, so not sure if will work with ffmpeg-2.0.1 & you also need to cross compile with the x264 library as well. The example you are using http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/. does not include building x264 library. (The author did mention 'JNI code is a little bit old, feel free to update and use' so some pain is to be expected ;-)
I did finally manage to build & get the app to run ok yesterday with live streaming to youtube, but I am not getting any audio so far. I re-built ffmpeg with libfdk_acc and linked as indicated in the Android.mk file, but then ...Ffmpeg_init() returned false due to audio run time errors so streaming would not start, so I rebuilt ffmpeg again without libkdk_acc so that it is using the lame library instead.
Hello,
I have the same problem with the audio. Did using lame fix the problem for you?
No I still have no youtube audio when using lame library when it is built as per the Android.mk file in this project. I can see that audio packets are being generated & ingested by ffpmeg ok, but no audio in being played back by youtube. I am getting a lot of buffering in youtube playback due too inadequate bandwidth, so not sure if youtube is causing no audio, but then Sony 'Live on Youtube' app does produce audio ok in Youtube live streaming over the same network. However I am now also thinking that perhaps ffmpeg ./configure needs to include explict --enable-libmp3lame flag as per http://androidwarzone.blogspot.com.au/2012/02/building-ffmpeg-with-libmp3lame-for-arm.html (getting this part working according to those instructions is quite convoluted...) Can anybody else confirm that --enable-libmp3lame flag is actually required in ffmpeg ./configure in order to get audio to playback ok in youtube with 'WatchMe' app ?
The problem is not caused by youtube. I've tested it with another rtmp server (https://github.com/arut/nginx-rtmp-module) and the problem persists. Actually, I've also recorded the stream on my device modifying the url (/mnt/sdcard/stream_name.flv) getting the same results.
Edit: As far as I know lame encodes mp3 but the codec used in the jni code is AAC which made me think about if lame is actually being used.
I had this issue as well but when i ran the configure unix executable file in the ffmpeg folder it built a config.h file for me. But then I started running into other issues so.
anyone need working demo dapp with both video and audio working, Contact me : vranacse@gmail.com
Open a shell and change directory to the FFmpeg source files. Then type './configure'. You have to run that configure script before you build.
Hi,
When I do a "ndk-build" to the android.mk provided, I have the error libavutil/common.h:83:23: fatal error: config.h: No such file or directory
Actually in this file common.h, I have ifdef HAVE_AV_CONFIG_H include "config.h" include "intmath.h" endif
But no config.h in the "android" folder that was generated with http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/. Do I have to use the config.h that is in the root of the ffmpeg folder?
I was trying to copy/paste all the missing headers, but there are a lot (it is a pain! :-)). Is this really what we have to do? (Copy paste the missing headers?) Why were not they directly under the "Android" folder $NDK/sources/ffmpeg-2.0.1/android, which contains arm/include folders.
Thank you!