winlin

build libfdk-aac in ffmpeg. 2.0.108

@@ -525,6 +525,7 @@ Supported operating systems and hardware: @@ -525,6 +525,7 @@ Supported operating systems and hardware:
525 525
526 ### SRS 2.0 history 526 ### SRS 2.0 history
527 527
  528 +* v2.0, 2015-01-29, build libfdk-aac in ffmpeg. 2.0.108
528 * 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 529 * 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
529 * 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 530 * 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
530 * 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 531 * 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) @@ -23,6 +23,9 @@ x264-snapshot-20131129-2245-stable.tar.bz2 (core.138)
23 for srs to support live stream transcoding. 23 for srs to support live stream transcoding.
24 remark: we use *.zip for all linux plantform. 24 remark: we use *.zip for all linux plantform.
25 25
  26 +fdk-aac-0.1.3.zip
  27 + https://github.com/mstorsjo/fdk-aac/releases
  28 +
26 tools/ccache-3.1.9.zip 29 tools/ccache-3.1.9.zip
27 to fast build. 30 to fast build.
28 31
@@ -19,6 +19,9 @@ echo "SRS_JOBS: ${SRS_JOBS}" @@ -19,6 +19,9 @@ echo "SRS_JOBS: ${SRS_JOBS}"
19 mkdir -p ${ff_build_dir} 19 mkdir -p ${ff_build_dir}
20 mkdir -p ${ff_release_dir} 20 mkdir -p ${ff_release_dir}
21 21
  22 +# for ubuntu14, donot compile libaacplus.
  23 +UBUNTU14=NO;grep -in "Ubuntu 14." /etc/issue >/dev/null 2>&1; if [[ $? -eq 0 ]]; then UBUNTU14=YES; fi
  24 +
22 # yasm for libx264 25 # yasm for libx264
23 ff_yasm_bin=${ff_release_dir}/bin/yasm 26 ff_yasm_bin=${ff_release_dir}/bin/yasm
24 if [[ -f ${ff_yasm_bin} ]]; then 27 if [[ -f ${ff_yasm_bin} ]]; then
@@ -35,18 +38,38 @@ fi @@ -35,18 +38,38 @@ fi
35 # ffmpeg can specifies the yasm path when configure it. 38 # ffmpeg can specifies the yasm path when configure it.
36 export PATH=${PATH}:${ff_release_dir}/bin 39 export PATH=${PATH}:${ff_release_dir}/bin
37 40
38 -# libaacplus  
39 -if [[ -f ${ff_release_dir}/lib/libaacplus.a ]]; then  
40 - echo "libaacplus is ok" 41 +# the aac command for ffmepg.
  42 +AAC_FOR_FFMPEG="--enable-libfdk-aac"
  43 +
  44 +# libfdk-aac
  45 +if [[ -f ${ff_release_dir}/lib/libfdk-aac.a ]]; then
  46 + echo "libfdk_aac is ok"
41 else 47 else
42 - echo "build yasm-1.2.0" 48 + echo "build fdk-aac-0.1.3"
43 cd $ff_current_dir && 49 cd $ff_current_dir &&
44 - rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip &&  
45 - cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip &&  
46 - bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install  
47 - ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi 50 + rm -rf fdk-aac-0.1.3 && unzip -q ${ff_src_dir}/fdk-aac-0.1.3.zip &&
  51 + cd fdk-aac-0.1.3 && bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make ${SRS_JOBS} && make install &&
  52 + ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build fdk-aac-0.1.3 failed"; exit 1; fi
48 fi 53 fi
49 54
  55 +# libaacplus
  56 +if [ $UBUNTU14 = NO ]; then
  57 + AAC_FOR_FFMPEG="$AAC_FOR_FFMPEG --enable-libaacplus"
  58 +
  59 + if [[ -f ${ff_release_dir}/lib/libaacplus.a ]]; then
  60 + echo "libaacplus is ok"
  61 + else
  62 + echo "build libaacplus-2.0.2"
  63 + cd $ff_current_dir &&
  64 + rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip &&
  65 + cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip &&
  66 + bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install
  67 + ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi
  68 + fi
  69 +fi
  70 +
  71 +echo "aac for ffmepg: $AAC_FOR_FFMPEG"
  72 +
50 # lame-3.99 73 # lame-3.99
51 if [[ -f ${ff_release_dir}/lib/libmp3lame.a ]]; then 74 if [[ -f ${ff_release_dir}/lib/libmp3lame.a ]]; then
52 echo "libmp3lame is ok" 75 echo "libmp3lame is ok"
@@ -105,7 +128,7 @@ else @@ -105,7 +128,7 @@ else
105 --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \ 128 --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \
106 --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \ 129 --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \
107 --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ 130 --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \
108 - --enable-libx264 --enable-libmp3lame --enable-libaacplus --enable-libspeex \ 131 + --enable-libx264 --enable-libmp3lame $AAC_FOR_FFMPEG --enable-libspeex \
109 --enable-pthreads --extra-libs=-lpthread \ 132 --enable-pthreads --extra-libs=-lpthread \
110 --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers && 133 --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers &&
111 make ${SRS_JOBS} && make install 134 make ${SRS_JOBS} && make install
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR 2 32 #define VERSION_MAJOR 2
33 #define VERSION_MINOR 0 33 #define VERSION_MINOR 0
34 -#define VERSION_REVISION 107 34 +#define VERSION_REVISION 108
35 35
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"