怎么编译 ffmpeg 让其支持 hevc(h265)

smart rtmpd 服务器支持 rtmp 的 hevc(h265) 视频流,我们具体 smart rtmpd 的信息简介如下,毕竟 hevc(h265) 不是 adobe 的标准,所以市面上缺少这么一款工具,下面的流程,就会带你怎么制作 ffmpeg ,让其支持自定制的 hevc(h265) 视频流

原文地址:企业通讯,IM,VOIP,P2P,VOD,免费,聊天室,会议室,邮件,期翼嘻嘻 - Powered by Discuz!

一分钟快速搭建 rtmpd 服务器: 一分钟之内搭建自己的直播服务器?_freeabc的博客-CSDN博客

软件下载地址: http://www.qiyicc.com/download/rtmpd.rar

github 地址:GitHub - superconvert/smart_rtmpd: RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)

1. Build x265
$wget https://bitbucket.org/multicoreware/x265_git/downloads/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 GitHub - ksvc/FFmpeg: mirror of git://source.ffmpeg.org/ffmpeg.git, with RTMP protocol extensions for H.265/HEVC powered by KSYUN.
$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 -j4

2.4 Ttry
#push stream
$./ffmpeg -re -i 1.mp4 -c:a copy -c:v libx265 -f flv rtmp://192.168.1.1/live/hevc

#pull stream
$./ffplay rtmp://192.168.1.1/live/hevc

good luck!

你可能感兴趣的:(h265,ffmpeg,RTMP,ffmpeg)