centos 安装ffmpeg 并生成文件截图

1.安装编译环境

#yum install -y automake autoconf libtool gcc gcc-c++

2. 下载ffmpeg并编译安装

下载: 

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

下载完成之后就是 

#./configure 

#make 

#make install

3.生成视频截图


#ffmpeg -t 0.001 -i 1.mp4  -y -f mjpeg -s 320*240 a.jpg


参数说明:


-L license


-h 帮助


-fromats 显示可用的格式,编解码的,协议的


-f fmt 强迫采用格式fmt


-i filename 输入文件


-y 覆盖输出文件


-t duration 设置纪录时间 hh:mm:ss[.xxx]格式的记录时间也支持


-ss position 搜索到指定的时间 [-]hh:mm:ss[.xxx]的格式也支持


s wxh: 指定视频的宽和高

原文地址:https://www.cnblogs.com/shenlanzifa/p/5288703.html