[FFmpeg-user] How to build ffmpeg statically with librtmp support
Han Jiang
oglops at gmail.com
Sun Aug 17 07:31:55 CEST 2014
Hi all , i was using this build script to build ffmpeg statically on centos
7.
i forked this repo from stvs's build script. the only difference is i added
--enable-librtmp,
https://github.com/oglops/ffmpeg-static
but i have got this error : "ERROR: librtmp not found".
according to this SO link
http://stackoverflow.com/questions/9634496/building-ffmpeg-with-librtmp-for-android
i commented out the following line
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h
RTMP_Socket
but i get a new error when running ./configure.
libavformat/libavformat.a(librtmp.o): In function `rtmp_read_seek':
librtmp.c:(.text+0x30): undefined reference to `RTMP_SendSeek'
libavformat/libavformat.a(librtmp.o): In function `rtmp_read_pause':
librtmp.c:(.text+0x8d): undefined reference to `RTMP_Pause'
libavformat/libavformat.a(librtmp.o): In function `rtmp_close':
librtmp.c:(.text+0xaa): undefined reference to `RTMP_Close'
libavformat/libavformat.a(librtmp.o): In function `rtmp_open':
librtmp.c:(.text+0x124): undefined reference to `RTMP_LogSetLevel'
librtmp.c:(.text+0x12e): undefined reference to `RTMP_LogSetCallback'
librtmp.c:(.text+0x4da): undefined reference to `RTMP_Init'
librtmp.c:(.text+0x4e5): undefined reference to `RTMP_SetupURL'
librtmp.c:(.text+0x506): undefined reference to `RTMP_Connect'
librtmp.c:(.text+0x518): undefined reference to `RTMP_ConnectStream'
librtmp.c:(.text+0x588): undefined reference to `RTMP_EnableWrite'
librtmp.c:(.text+0x5b8): undefined reference to `RTMP_Close'
libavformat/libavformat.a(librtmp.o): In function `rtmp_get_file_handle':
librtmp.c:(.text+0x9): undefined reference to `RTMP_Socket'
libavformat/libavformat.a(librtmp.o): In function `rtmp_write':
librtmp.c:(.text+0xc9): undefined reference to `RTMP_Write'
libavformat/libavformat.a(librtmp.o): In function `rtmp_read':
librtmp.c:(.text+0xd9): undefined reference to `RTMP_Read'
collect2: error: ld returned 1 exit status
make: *** [ffprobe_g] Error 1
it seems it can't find the include folder, but actually the build script
has set that env var already. pkg_config_path is also set.
ps: actually if i copy compiled librtmp files to /usr/lib64 it works , but
since i want to build a "static" build on a system i have no root access
to(in office), i can't do that.
full config.log here : http://pastebin.com/pJgYHw3C
i saw it says it can't find lssl or lcrypto. but openssl is installed in my
system already.
[oglop at localhost ffmpeg-static-git]$ ldconfig -p | grep libssl
libssl3.so (libc6,x86-64) => /lib64/libssl3.so
libssl.so.10 (libc6,x86-64) => /lib64/libssl.so.10
libssl.so (libc6,x86-64) => /lib64/libssl.so
[oglop at localhost ffmpeg-static-git]$ ldconfig -p | grep libcrypto
libcrypto.so.10 (libc6,x86-64) => /lib64/libcrypto.so.10
libcrypto.so (libc6,x86-64) => /lib64/libcrypto.so
i tried various suggestion from here too
http://stackoverflow.com/questions/20721445/undefined-reference-when-compiling-ffmpeg-with-librtmp-on-android
by adding
--enable-librtmp --extra-cflags=-I/$TARGET_DIR/include
--extra-ldflags=-L$TARGET_DIR/lib"
but i got the same error as he did:
...
undefined reference to 'RTMP_Read'
...
More information about the ffmpeg-user
mailing list