configuration - Building FFMPEG with librtmp for android -


i'm trying build all-in-one static binary of ffmpeg ndk r7b , works fine untill try build rtmp support.

i'm usind sources https://github.com/guardianproject/android-ffmpeg librtmp2.4 , custom config this

.configure \ --target-os=linux \ --cross-prefix=arm-linux-androideabi- \ --arch=arm \ --sysroot=/home/andrey/android-ndk-r7b/platforms/android-3/arch-arm \ --enable-static \ --disable-shared \ --disable-symver \ --enable-small \ --disable-devices \ --disable-avdevice \ --enable-gpl \ --enable-librtmp \ --prefix=../build/ffmpeg/armeabi \ --extra-cflags=-i../rtmpdump/librtmp \ --extra-ldflags=-l../rtmpdump/librtmp \ 

and rtmpdump directory lays on same level ffmpeg. understand last 2 strings in config says compiler may find sources of librtmp. error: librtmp not found

i'm not expereienced ndk , obviosly missing important part can't find myself.

this challenging, think have solution. problem @ configure-time ffmpeg wants detect proper librtmp installation via pkg-config management system.

i'm assuming have cross-compiled librtmp in directory referenced ../rtmpdump. edit ffmpeg configure script , search line:

enabled librtmp    && require_pkg_config librtmp librtmp/rtmp.h rtmp_socket 

comment out (put '#' @ front of line). now, re-run configure, these modifications:

--extra-cflags="-i/full/path/to/rtmpdump" 

it may have absolute path here. also, omit /librtmp/ @ end since #include directives prefix header files librtmp/. next:

--extra-ldflags="-l/full/path/to/rtmpdump -lrtmp" 

again, absolute path, , specify library link against since commented out logic via configure.

now, configure should succeed , cross-compilation should happy. final ffmpeg binary should report family of rtmp modules under protocols:

ffmpeg -protocols [...] rtmp rtmpe rtmps rtmpt rtmpte 

note don't have ndk dev environment test on. tested on desktop ubuntu system compiling librtmp (without package being installed via pkg-config) , performing above steps.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -