1、编译x264

git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --enable-shared --enable-static --disable-asm
make
make install
cp /usr/local/lib/libx264.so.164 /lib

x264, the best H.264/AVC encoder - VideoLAN

2、编译x265

git clone http://hg.videolan.org/x265
cd x265/build/linux/
./make-Makefiles.bash
make
make install

x265, the free H.265/HEVC encoder - VideoLAN

3、编译ffmpeg

./configure  --enable-libx265 --enable-libx264 --enable-gpl
make
make install

4、h264、h265编码转换

ffmpeg -i input.mp4 -c:v libx265 output.mp4 
ffmpeg -i input.mp4 -c:v libx265 output.h265
ffmpeg -i input.mp4 -c:v libx265 output.hevc
 
ffmpeg -i input.mp4 -c:v libx264 output.mp4

PS:ffmpeg支持多进程转码:

-threads 5 -preset ultrafast 



标签: none

添加新评论

人机验证正在加载....