ffmpeg 一些参数

ffmpeg 是一个开源的,用来做视频转换,抓图的程序。在Windows中是一个编译成exe的程序,可通过Progress调用。

 

在Cmd下查看帮助:

-h -- print basic options

-help topic  查看某一主题相关帮助(如 ffmpeg -formats)

-y overwrite output files(全局选项,影响整个程序,而非单个文件:)

-f fmt force format(具体有哪些格式通过ffmpeg -formats查看, 示例 -f image2)

-i filename input file name

-ss time_off set the start time offset(示例 -ss 00:00:1

-vframes number set the number of video frames to record

示例1:-vframes 1 out.png 

示例2:vframes 2 out_%03d.png, 输出out_001.png, out_002.png两个文件

如果frame的数量大于1, 则文件名应为out_%05d.png这样的格式

 

-ar rate set audio sampling rate (in Hz)

在转换某个文件时,没有指定该参数,程序出错,查询得到原因如下

 

if you have trouble encoding a movie in FLV with the following error :
"Could not write header for output file #0 (incorrect codec
parameters ?)", 
it's maybe cause by a 48000 audio sampling freq of your source. So you
have to force the output sampling to 44100 with the -ar option and... it
works fine.
OUF!

来源:http://osdir.com/ml/video.ffmpeg.user/2005-06/msg00139.html

 

其它网友总结的关于ffmpeg参数

官方文档

posted @ 2012-12-24 16:14  Season2009  阅读(379)  评论(0编辑  收藏  举报