yt-watchme
yt-watchme copied to clipboard
ffmpeg-jni.c:104: error: undefined reference to 'av_new_stream'
Hi,
I am getting ffmpeg-jni.c:104: error: undefined reference to 'av_new_stream' during C compilation (ndk-build) - when using latest versions of ffmpeg libraries & NDK r10c.
If a change the source code from -
audio_stream = av_new_stream(fmt_context, 1);
- to -
audio_stream = avformat_new_stream(fmt_context, 1);
- the code builds ok but then I get a run time seg fault during the avformat_new_stream call to create the audio stream -
11-12 22:29:17.253: I/ffmpeg-jni(7522): creating audio stream 11-12 22:29:17.253: A/libc(7522): Fatal signal 11 (SIGSEGV) at 0x00000009 (code=1), thread 7522 (id.apps.watchme)
Please advise / update ffmpeg-jni.c.
Is there some specific version of FFMPEG libraries required for successful build of the Watchme app ???
(I've spent over a week getting this far & I'm not giving up now ... ;-)
Regards
For me it works with FFMPEG 2.3. But you right, in ffmpeg 2.4 this deprecated function was removed.
Ok thanks, I will give FFMPEG 2.3 a shot. And nice to know someone had got this app working ok.
Also you will need libx264 from git://git.videolan.org/x264.git.
Yes I also included & built the x264 library, but I will double check its the same as git://git.videolan.org/x264.git Thanks again
OK, good to know that there is some problems with the latest version (2.4) Have you taken "FFmpeg 2.3.5 "Mandelbrot"" under http://www.ffmpeg.org/olddownload.html?
One question for the libx264 livrary: I assume you have to retrieve it as it is mentionned here https://trac.ffmpeg.org/wiki/How%20to%20quickly%20compile%20libx264
cd /my/path/where/i/keep/compiled/stuff git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-static --enable-shared make make install ldconfig
But when you have done that ,how do you include it to WatchMe?
Thank you!
Yes, download ffmpeg 2.3.5 from the link mentioned. For building libx264 you need to ./configure & build for cross compiling for Android and then ./configure (and make) ffmpeg to enable x264 support, see various examples that you can adapt for yourself - https://github.com/search?utf8=%E2%9C%93&q=ffmpeg+x264+android&type=Repositories&ref=searchresults The libx264.a library file produced needs to be copied into the WatchMe project - $(WORKING_DIR)/../third_party/lib/libx264.a (along with the other ffmpeg & associated library files) so that it can be linked when building libffmpeg.so
Does anyone know AV_CODEC_ID_H264 Value ? Hard -Coded Value I just need to pass the Currect value avcodec_find_encoder(AV_CODEC_ID_H264) where i am getting undeclared Error..
Help needed here..