centos7 下编译ffmpeg

下载包:html

wget https://ffmpeg.org/releases/ffmpeg-4.1.tar.gzjava

 

 GCC若是没有yasm:linux

http://yasm.tortall.net/Download.html 下载yasmbash

tar -zxvf yasm.tar.gz
./configure
make
make install

 

回到上一级目录:app

tar -zxvf ffmpeg-4.1.tar.gz测试

cd ffmpeg-4.1.net

./configure --prefix=/usr/local/ffmpegcode

make && make installhtm

 

 测试,将mp4文件转换成ts文件:blog

ffmpeg -y -i test.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb test.ts

 测试,将ts文件转换成mp4文件:

ffmpeg -i test.ts -acodec copy -vcodec copy -f mp4 test.mp4

 

 

参考:https://java-er.com/blog/linux-installffmpeg/

https://blog.51cto.com/12889016/2102827?utm_source=oschina-app

相关文章
相关标签/搜索