最新版本号的ffmpeg 支持 libh265,但是仍是0基础測试阶段linux
在linux 上安装ffmpeg 支持h265编码器依照下面步骤:git
Anyhow here are the simple steps:windows
1. Make sure you have a current build of ffmpeg checked out of git along with any other libs you are using e.g. libx264bash
2. Download the libx265 repository and build as per the instructions here: https://bitbucket.org/multicoreware/x265/wiki/Home (note I assume no one still uses Windows for dev!)ide
hg clone https://bitbucket.org/multicoreware/x265 cd x265/build/linux ./make-Makefiles.bash make make install
3. On your ffmpeg configure it with –enable-libx265 (it is disabled by default). Sample from my configure belowui
./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libvidstab --enable-libx265 make make install
我作測试的时候用的是windows系统,从官网下载最新版本号它就支持编码
ffmpeg -i d:\soft\720p.mp4 -c:v libx265 -b:v 2000k d:\soft\myvideo.mkv
測试视频 新警察故事2013 1280*720高清 540m(当中一部分)。转换后mkv文件 1280*720高清 313m
例如如下截图spa
原视频视频
对照图it
编码差异:
音频编码:
视频编码:
下一步考虑 h265 播放器。用rtmp 协议播放h265 视频,但愿获得技术指导