mirror of
https://github.com/ossrs/srs.git
synced 2025-02-14 20:31:56 +00:00
upgrade x264 and ffmpeg to newest version (#1274)
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>
This commit is contained in:
parent
99430d2edb
commit
78cf3d4b58
5 changed files with 17 additions and 17 deletions
Binary file not shown.
Binary file not shown.
BIN
trunk/3rdparty/x264-snapshot-20181116-2245.zip
vendored
Normal file
BIN
trunk/3rdparty/x264-snapshot-20181116-2245.zip
vendored
Normal file
Binary file not shown.
|
@ -68,34 +68,34 @@ 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} \
|
||||
|
@ -103,7 +103,7 @@ else
|
|||
--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 \
|
||||
|
|
|
@ -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 &&
|
||||
|
@ -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
|
||||
|
||||
#####################################################################################
|
||||
|
|
Loading…
Reference in a new issue