ffmpeg-0.8.5 http://ffmpeg.org/download.html#release_0.8
SDL-devel-1.2.15-mingw32.tar.gz http://www.libsdl.org/download-1.2.php
./Configure mingw --prefix=`pwd`/win32libs -DL_ENDIAN -DOPENSSL_NO_HW make make installmake 时提示以下错误:
-c -o md2test.o md2test.c md2test.c:1:10: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token make[1]: *** [md2test.o] Error 1 make[1]: Leaving directory `/d/work/multimedia/openssl-1.0.0g/test' make: *** [build_tests] Error 1打开md2test.c,只有一条语句,
$ make SYS=mingw $ make SYS=mingw install
$ ./configure --enable-librtm $ make $ make install
ffmpeg使用SDL来播放,所以在编译ffmpeg之前,需要安装SDL。
编译中的问题:
1)pkg-config的安装END /tmp/ffconf..liangguangwei.500.21836.c gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -std=c99 -fno-common -fomit-frame-pointer -Id:/MinGW/msys/1.0/local/include -Ld:/MinGW/msys/1.0/local/lib -c -o /tmp/ffconf..liangguangwei.500.21836.o /tmp/ffconf..liangguangwei.500.21836.c gcc -Wl,--as-needed -Id:/MinGW/msys/1.0/local/include -Ld:/MinGW/msys/1.0/local/lib -o /tmp/ffconf..liangguangwei.500.21836.exe /tmp/ffconf..liangguangwei.500.21836.o -lrtmp -lz -lssl -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lm -lpthread -lz -lpsapi d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../librtmp.a(rtmp.o):rtmp.c:(.text+0x3ee9): undefined reference to `timeGetTime@0' d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../librtmp.a(rtmp.o):rtmp.c:(.text+0x4461): undefined reference to `timeGetTime@0' d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../librtmp.a(rtmp.o):rtmp.c:(.text+0x4ddf): undefined reference to `timeGetTime@0' d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../librtmp.a(rtmp.o):rtmp.c:(.text+0x4e33): undefined reference to `timeGetTime@0' d:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../librtmp.a(rtmp.o):rtmp.c:(.text+0xc5d): undefined reference to `timeGetTime@0' collect2: ld returned 1 exit status ERROR: librtmp not found
tmp/ffconf.mlRyi10R.c: In function 'check_RTMP_Socket': /tmp/ffconf.mlRyi10R.c:2: error: 'RTMP_Socket' undeclared (first use in this function) /tmp/ffconf.mlRyi10R.c:2: error: (Each undeclared identifier is reported only once /tmp/ffconf.mlRyi10R.c:2: error: for each function it appears in.) ERROR: librtmp not found2)一个奇怪的问题,ffmpeg与librtmp一起编译后,ffplay竟然不能播放rtmp协议的地址了。
3)在使用mingw时,发现编译时竟然不能找到/usr/local/(D:\MinGW\msys\1.0\local)中的*.h与lib文件
新建文件 /etc/profile.d/local.sh#! /usr/bin/sh export CPATH=/usr/local/include:/usr/include:$CPATH export C_INCLUDE_PATH=/usr/local/include:/usr/include:$C_INCLUDE_PATH export CPLUS_INCLUDE_PATH=/usr/local/include:/usr/include:$CPLUS_INCLUDE_PATH export OBJC_INCLUDE_PATH=/usr/local/include:/usr/include:$OBJC_INCLUDE_PATH export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH export LIBRARY_PATH=/usr/local/lib:/usr/lib:$LIBRARY_PATH export LIBPATH=/usr/local/lib:/usr/lib:$LIBPATH
4)在编译rtmpdump时,不使用任何加密传输方式,这时就不需要openssl库的支持了,不再支持rtmpe/rtmps/https
$ make SYS=mingw CRYPTO=
ffmpeg -i test.flv -re -f flv rtmp://192.168.9.80/oflaDemo/stream
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream |
rtmpdump: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory