winlin

build libfdk-aac in ffmpeg. 2.0.108

... ... @@ -525,6 +525,7 @@ Supported operating systems and hardware:
### SRS 2.0 history
* v2.0, 2015-01-29, build libfdk-aac in ffmpeg. 2.0.108
* v2.0, 2015-01-25, for [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301), hls support h.264+mp3, ok for vlc. 2.0.107
* v2.0, 2015-01-25, for [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301), http ts stream support h.264+mp3. 2.0.106
* v2.0, 2015-01-25, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), refine the pcr start at 0, dts/pts plus delay. 2.0.105
... ...
不能预览此文件类型
... ... @@ -23,6 +23,9 @@ x264-snapshot-20131129-2245-stable.tar.bz2 (core.138)
for srs to support live stream transcoding.
remark: we use *.zip for all linux plantform.
fdk-aac-0.1.3.zip
https://github.com/mstorsjo/fdk-aac/releases
tools/ccache-3.1.9.zip
to fast build.
... ...
... ... @@ -19,6 +19,9 @@ echo "SRS_JOBS: ${SRS_JOBS}"
mkdir -p ${ff_build_dir}
mkdir -p ${ff_release_dir}
# for ubuntu14, donot compile libaacplus.
UBUNTU14=NO;grep -in "Ubuntu 14." /etc/issue >/dev/null 2>&1; if [[ $? -eq 0 ]]; then UBUNTU14=YES; fi
# yasm for libx264
ff_yasm_bin=${ff_release_dir}/bin/yasm
if [[ -f ${ff_yasm_bin} ]]; then
... ... @@ -35,18 +38,38 @@ fi
# ffmpeg can specifies the yasm path when configure it.
export PATH=${PATH}:${ff_release_dir}/bin
# the aac command for ffmepg.
AAC_FOR_FFMPEG="--enable-libfdk-aac"
# libfdk-aac
if [[ -f ${ff_release_dir}/lib/libfdk-aac.a ]]; then
echo "libfdk_aac is ok"
else
echo "build fdk-aac-0.1.3"
cd $ff_current_dir &&
rm -rf fdk-aac-0.1.3 && unzip -q ${ff_src_dir}/fdk-aac-0.1.3.zip &&
cd fdk-aac-0.1.3 && bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make ${SRS_JOBS} && make install &&
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build fdk-aac-0.1.3 failed"; exit 1; fi
fi
# libaacplus
if [[ -f ${ff_release_dir}/lib/libaacplus.a ]]; then
if [ $UBUNTU14 = NO ]; then
AAC_FOR_FFMPEG="$AAC_FOR_FFMPEG --enable-libaacplus"
if [[ -f ${ff_release_dir}/lib/libaacplus.a ]]; then
echo "libaacplus is ok"
else
echo "build yasm-1.2.0"
else
echo "build libaacplus-2.0.2"
cd $ff_current_dir &&
rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip &&
cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip &&
bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi
fi
fi
echo "aac for ffmepg: $AAC_FOR_FFMPEG"
# lame-3.99
if [[ -f ${ff_release_dir}/lib/libmp3lame.a ]]; then
echo "libmp3lame is ok"
... ... @@ -105,7 +128,7 @@ else
--extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \
--disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \
--enable-postproc --enable-bzlib --enable-zlib --enable-parsers \
--enable-libx264 --enable-libmp3lame --enable-libaacplus --enable-libspeex \
--enable-libx264 --enable-libmp3lame $AAC_FOR_FFMPEG --enable-libspeex \
--enable-pthreads --extra-libs=-lpthread \
--enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers &&
make ${SRS_JOBS} && make install
... ...
... ... @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 107
#define VERSION_REVISION 108
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
... ...