4

I have been pulling my hair out trying to compile FFMPEG for Android with librtmp enabled. I have successfully built FFMPEG using the Guardian Project here, but it doesn't have librtmp support. The only answer I have found to this issue is on a previous Stack Overflow question (HERE), but it doesn't want to work for me.

At the moment, I have the cross-compiled librtmp.so.0 file from the official rtmpdump android build in an rtmpdump/librtmp folder sitting in the android-ffmpeg folder. An extract from my configure_ffmpeg.sh file reads as follows:

./configure \
$DEBUG_FLAG \
--arch=arm \
--cpu=cortex-a8 \
--target-os=linux \
--enable-runtime-cpudetect \
--prefix=$prefix \
--enable-pic \
--disable-shared \
--enable-static \
--cross-prefix=$NDK_TOOLCHAIN_BASE/bin/$NDK_ABI-linux-androideabi- \
--sysroot="$NDK_SYSROOT" \
--extra-cflags="-I../x264 -mfloat-abi=softfp -mfpu=neon" \
--extra-ldflags="-L../x264" \
--extra-cflags="-I/home/dan/android-ffmpeg/rtmpdump" \
--extra-ldflags="-L/home/dan/android-ffmpeg/rtmpdump -lrtmp"
\

--enable-version3 \
--enable-gpl \
\
--disable-doc \
--enable-yasm \
\
--enable-decoders \
--enable-encoders \
--enable-muxers \
--enable-demuxers \
--enable-parsers \
--enable-protocols \
--enable-filters \
--enable-avresample \
--enable-libfreetype \
\
--disable-indevs \
--enable-indev=lavfi \
--disable-outdevs \
\
--enable-hwaccels \
\
--enable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--enable-ffserver \
--enable-network \
\
--enable-libx264 \
--enable-zlib \
--enable-librtmp \

When I try to compile this, it eventually displays an error and my FFMPEG config.log file tells me that it can't find -lrtmp. I'm positive I'm directing it to the right directory... does anyone have any ideas?

Regards

Dan

Community
  • 1
  • 1
Dan Turner
  • 171
  • 1
  • 11

1 Answers1

2

Dan,

This is somewhat old and maybe not much help because it's not a complete answer, but I've been struggling with this for months. My efforts are documented on one of the ffmpeg forums (here: http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=29&t=1383), and I haven't had any success either.

Ultimately, after building librtmp and telling the build script where to find it (and disabling the pkg-config for librtmp in the ffmpeg conf file), I always have a list of errors like

libavformat/librtmp.o: in function rtmp_read:libavformat/librtmp.c:153: error: undefined reference to 'RTMP_Read'
  • all listing different RTMP functions it claims are undefined. But the header file is present with the rest of the required files.

I just wanted to put this here to help you or others still trying to build ffmpeg with librtmp for Android.

Bradford

datu-puti
  • 1,306
  • 14
  • 33