一、第三方库的编译与安装 1. libfaac # tar -zxvf faac-1.28.tar.gz # cd faac-1.28 # ./configure --prefix=/opt/YOUR_SDK_INSTALL_DIRECTORY --enable-static --disable-shared # make; make install
2. libmp3lame # tar -zxvf lame-3.98.4.tar.gz # cd lame-3.98.4 # ./configure --prefix=/opt/YOUR_SDK_INSTALL_DIRECTORY --enable-static --disable-shared # make; make install
3.libx264 # tar -xvf x264-snapshot-20110818-2245.tar # ./configure --prefix=/opt/YOUR_SDK_INSTALL_DIRECTORY --enable-static --disable-shared # make; make install
4. librtmp # tar -xvf rtmpdump_git0819.tar # cd rtmpdump # cd librtmp # vim Makefile #prefix=/usr/local prefix=YOUR_SDK_INSTALL_DIRECTORY ... #CRYPTO=OPENSSL CRYPTO= ... #SO_LDFLAGS_posix=-shared -Wl,-soname,$@ SO_LDFLAGS_posix=-Wl,-soname,$@ ... #SHARED=yes SHARED=no
【保存并退出】 # make # cd .. # vim Makefile #prefix=/usr/local prefix=YOUR_SDK_INSTALL_DIRECTORY 【保存并退出】 # make SYS=darwin XDEF=-DNO_SSL CRYPTO= SHARED= # make; make install
二、FFmpeg SDK的编译与安装 1. 修改FFmpeg 的 configure # cd ffmpeg # vim configure $vim configure ... #enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket enabled librtmp && { check_lib librtmp/rtmp.h RTMP_Socket -lrtmp -lpolarssl -lwinmm -lws2_32 || check_lib librtmp/rtmp.h RTMP_Socket -lrtmp -lssl -lcrypto -lz || die "ERROR: librtmp not found or RTMP_Socket() missing, librtmp