Skip to content

Commit

Permalink
upgrade x264 and ffmpeg to newest version (#1274)
Browse files Browse the repository at this point in the history
The ffmpeg and x264 in srs is too old.

Signed-off-by: Steven Liu lq@chinaffmpeg.org
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
  • Loading branch information
T-bagwell authored and winlinvip committed Nov 27, 2018
1 parent 99430d2 commit 78cf3d4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
Binary file not shown.
Binary file not shown.
Binary file added trunk/3rdparty/x264-snapshot-20181116-2245.zip
Binary file not shown.
24 changes: 12 additions & 12 deletions trunk/auto/build_ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,42 +68,42 @@ else
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build speex-1.2rc1 failed"; exit 1; fi
fi

# x264 core.138
# x264 core.157
if [[ -f ${ff_release_dir}/lib/libx264.a ]]; then
echo "x264 is ok"
else
echo "build x264"
cd $ff_current_dir &&
rm -rf x264-snapshot-20131129-2245-stable && unzip -q ${ff_src_dir}/x264-snapshot-20131129-2245-stable.zip &&
cd x264-snapshot-20131129-2245-stable &&
chmod +w configure && patch -p0 <../../../3rdparty/patches/5.x264.osx.gcc.patch &&
./configure --prefix=${ff_release_dir} --disable-opencl --bit-depth=8 \
rm -rf x264-snapshot-20181116-2245 && unzip -q ${ff_src_dir}/x264-snapshot-20181116-2245.zip &&
cd x264-snapshot-20181116-2245 &&
# chmod +w configure && patch -p0 <../../../3rdparty/patches/5.x264.osx.gcc.patch &&
./configure --prefix=${ff_release_dir} --disable-opencl --bit-depth=all \
--enable-static --disable-avs --disable-swscale --disable-lavf \
--disable-ffms --disable-gpac &&
--disable-ffms --disable-gpac --disable-cli &&
make ${SRS_JOBS} && make install
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build x264 failed"; exit 1; fi
fi

# ffmpeg-2.1.1
# ffmpeg-4.1
if [[ -f ${ff_release_dir}/bin/ffmpeg ]]; then
echo "ffmpeg-2.1.1 is ok"
echo "ffmpeg-4.1 is ok"
else
echo "build ffmpeg-2.1.1"
echo "build ffmpeg-4.1"
cd $ff_current_dir &&
rm -rf ffmpeg-2.1.1 && unzip -q ${ff_src_dir}/ffmpeg-2.1.1.zip &&
rm -rf ffmpeg-4.1 && unzip -q ${ff_src_dir}/ffmpeg-4.1.zip &&
echo "remove all so to force the ffmpeg to build in static" &&
rm -f ${ff_release_dir}/lib/*.so* &&
echo "export the dir to enable the build command canbe use." &&
export ffmpeg_exported_release_dir=${ff_release_dir} &&
cd ffmpeg-2.1.1 &&
cd ffmpeg-4.1 &&
./configure \
--enable-gpl --enable-nonfree \
--yasmexe=${ff_yasm_bin} \
--prefix=${ff_release_dir} --cc= \
--enable-static --disable-shared --disable-debug \
--extra-cflags='-I${ffmpeg_exported_release_dir}/include' \
--extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \
--disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \
--disable-ffplay --disable-ffprobe --disable-doc \
--enable-postproc --enable-bzlib --enable-zlib --enable-parsers \
--enable-libx264 --enable-libmp3lame --enable-libfdk-aac --enable-libspeex \
--enable-pthreads --extra-libs=-lpthread \
Expand Down
10 changes: 5 additions & 5 deletions trunk/auto/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -678,13 +678,13 @@ if [ $SRS_SSL = YES ]; then
fi

#####################################################################################
# live transcoding, ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2.
# live transcoding, ffmpeg-4.1, x264-core157, lame-3.99.5, libaacplus-2.0.2.
#####################################################################################
if [ $SRS_FFMPEG_TOOL = YES ]; then
if [[ -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]]; then
echo "ffmpeg-2.1 is ok.";
echo "ffmpeg-4.1 is ok.";
else
echo "build ffmpeg-2.1";
echo "build ffmpeg-4.1";
(
cd ${SRS_OBJS} && pwd_dir=`pwd` &&
rm -rf ffmepg.src && mkdir -p ffmpeg.src && cd ffmpeg.src &&
Expand All @@ -693,8 +693,8 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then
)
fi
# check status
ret=$?; if [[ $ret -ne 0 ]]; then echo "build ffmpeg-2.1 failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-2.1 failed."; exit -1; fi
ret=$?; if [[ $ret -ne 0 ]]; then echo "build ffmpeg-4.1 failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-4.1 failed."; exit -1; fi
fi

#####################################################################################
Expand Down

0 comments on commit 78cf3d4

Please sign in to comment.