期翼嘻嘻即时通讯综合平台
标题:
怎么编译 ffmpeg 让其支持 hevc(h265)
[打印本页]
作者:
admin
时间:
2020-4-15 06:37:59
标题:
怎么编译 ffmpeg 让其支持 hevc(h265)
1. Build x265
$wget
https://bitbucket.org/multicorew ... s/x265_3.2.1.tar.gz
$tar zxvf x265_3.2.1.tar.gz
$cd x265_3.2.1/build/linux
$./make-Makefiles.bash
$make && make install
2. Build ffmpeg
2.1 Prepare souce code
$git clone
https://github.com/ksvc/FFmpeg.git
$cd FFmpeg
$git reset --hard origin/release/3.4
2.2 Configure
./configure --enable-static --enable-pic \
--disable-encoders --enable-encoder=aac --enable-encoder=libx264 --enable-gpl --enable-libx264 --enable-encoder=libx265 --enable-libx265 \
--disable-decoders --enable-decoder=aac --enable-decoder=h264 --enable-decoder=hevc \
--disable-demuxers --enable-demuxer=aac --enable-demuxer=mov --enable-demuxer=mpegts --enable-demuxer=flv --enable-demuxer=h264 --enable-demuxer=hevc --enable-demuxer=hls \
--disable-muxers --enable-muxer=h264 --enable-muxer=flv --enable-muxer=f4v --enable-muxer=mp4 \
--disable-doc --extra-cflags="-fno-stack-check"
2.3 Build
$make -j8
2.4 Ttry
#push stream
$./ffmpeg -re -i ~/video/mp4/oceans.mp4 -c:a copy -c:v libx265 -f flv rtmp://your_rtmp_server/live/h265
#pull stream
$./ffplay rtmp://your_rtmp_server/live/h265
good luck!
欢迎光临 期翼嘻嘻即时通讯综合平台 (http://qiyicc.com/bbs001/)
Powered by Discuz! X2