最新版本號的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 視頻,但願獲得技術指導