这几天做视频相关的东西,找到了这款比较牛掰的工具
FFmpeg
Howto Table of Contents * Generic Syntax * Main Options * Encoding :
o D10 (aka Sony IMX)
o DVCAM / DVCPRO25 / DVCPRO50
o VC-3 (aka Avid DNxHD)
o FFV1
o H.264 I-frame only in Highest Quality
o H.264 Long GOP
o MPEG-2 I-frame only in Highest Quality
o MPEG-2 Long GOP * Muxing and Wrapping :
o D10 into QuickTime ( for Final Cut Pro import )
o MPEG-2 Program Stream * Demuxing and Unwrapping :
o MPEG-2 Program Stream * Timecode Management :
o MPEG-2 Start Timecode * Misc :
o Audio Volume Modification
o Input Stream Selection
o Sub-clip Creation
o Make a Video File from a Single Frame Generic Syntax ffmpeg [[infile options][`-i' infile]]... {[outfile options] outfile}... Note : As a general rule, options are applied to the next specified file. Therefore, order is important and you can have the same option on the command line multiple times. Each occurrence is then applied to the next input or output file. Main Options -ab <int> : Set audio bitrate in bit/s ( default = 64k ). -acodec <string> : Force audio codec.
aac : AAC-LC
ac3 : AC3 ( Dolby Digital )
copy : Copy raw codec data as is.
mp2 : MPEG Audio Layer II
mp3 : MPEG Audio Layer III
pcm_s16le : Uncompressed 16-bit PCM Audio -an : Disable audio. -ar <int> : Set audio sampling frequency in Hz ( default = 44100 Hz ). -aspect <string or float> : Set aspect ratio ( 4:3, 16:9, 1.3333, 1.7777 ). -async <int> : Audio sync method. Audio will be stretched or squeezed to match the timestamps. The parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction. -b <int> : Set video bitrate in bit/s ( default = 200k ). -bf <int> : Set number of B-frames ( supported for MPEG-1, MPEG-2 and MPEG-4 ). -b_strategy <boolean> : Strategy to choose between I/P/B-frames ( 0 = off / 1 = on ). -bufsize <int> : Set rate control buffer size ( in bits ). -cmp <string or int> : Full pel motion estimation compare function.
sad ( 0 ) : Sum of absolute differences, fast ( default ).
sse ( 1 ) : Sum of squared errors.
satd ( 2 ) : Sum of absolute Hadamard transformed differences.
dct ( 3 ) : Sum of absolute DCT transformed differences.
psnr ( 4 ) : Sum of squared quantization errors ( avoid, low quality ).
bit ( 5 ) : Number of bits needed for the block.
rd ( 6 ) : Rate distortion optimal, slow.
zero ( 7 ) : 0.
vsad ( 8 ) : Sum of absolute vertical differences.
vsse ( 9 ) : Sum of squared vertical differences.
nsse ( 10 ) : Noise preserving sum of squared differences.
w53 ( 11 ) : 5/3 wavelet ( only used in Snow ).
w97 ( 12 ) : 9/7 wavelet ( only used in Snow ).
dctmax ( 13 )
chroma ( 14 ) -coder <string or int> :
vlc ( 0 ) : Variable length coder / huffman coder.
ac ( 1 ) : Arithmetic coder.
raw ( 2 ) : Raw ( no encoding ).
rle ( 3 ) : Run-length coder.
deflate ( 4 ) : Deflate-based coder. -cropbottom <int> : Set bottom crop band size ( in pixels ). -cropleft <int> : Set left crop band size ( in pixels ). -cropright <int> : Set right crop band size ( in pixels ). -croptop <int> : Set top crop band size ( in pixels ). -deinterlace : Deinterlace pictures. -dc <int> : Intra DC precision. -f <string> : Force file format.
ac3 : Raw AC3
avi : AVI
dv : DV
gxf : GXF ( General eXchange Format )
h264 : Raw H.264
m2v : MPEG-2 Video Elemetary Stream
m4v : MPEG-4 Video Elemetary Stream
mov : QuickTime
mp2 : MPEG Audio Layer II
mp3 : MPEG Audio Layer III
mp4 : MP4
mpeg : MPEG-1 System Stream
mpegts : MPEG-2 Transport Stream
rawvideo : RAW Video
vob : MPEG-2 Program Stream
wav : WAV -flags <string> :
aic : H.263 advanced intra coding / MPEG-4 ac prediction.
aiv : H.263 alternative inter VLC.
alt : Enable alternate scantable ( MPEG-2/MPEG-4 ).
bitexact : Use only bitexact stuff ( except (i)dct ).
cbp : Use rate distortion optimization for cbp.
cgop : Closed GOP.
gmc : Use global motion compensation.
gray : Only decode/encode grayscale.
ildct : Use interlaced DCT.
ilme : Interlaced motion estimation.
loop : Use loop filter.
low_delay : Force low delay.
mv0 : Always try a mb with mv=<0,0>.
mv4 : Use four motion vector by macroblock ( MPEG-4 ).
naq : Normalize adaptive quantization.
obmc : Use overlapped block motion compensation ( H.263+ ).
part : Use data partitioning.
psnr : Error variables will be set during encoding.
qpel : Use 1/4 pel motion compensation.
qprd : Use rate distortion optimization for qp selection.
scan_offset : Will reserve space for svcd scan offset user data.
slice
trell : Use trellis quantization.
umv : Use unlimited motion vectors. -flags2 <string> :
aud : Access unit delimiters ( H.264 ).
bpyramid : Allows B-frames to be used as references for predicting.
brdo : B-frame rate-distortion optimization.
dct8x8 : High profile 8x8 transform ( H.264 ).
drop_frame_timecode
fast : Allow non spec compliant speedup tricks.
fastpskip : Fast pskip ( H.264 ).
ivlc : Intra VLC table.
local_header : Place global headers at every keyframe instead of in extradata.
mixed_refs : One reference per partition, as opposed to one reference per macroblock.
non_linear_q : Use non linear quantizer.
noout : Skip bitstream encoding.
sgop : Strictly enforce GOP size.
skiprd : RD optimal macroblock level residual skipping.
wpred : Weighted biprediction for B-frames ( H.264 ). -formats : Show available formats, codecs, protocols, etc. -g <int> : Set the group of pictures ( GOP ) size. -genpts <boolean> : Generate PTS ( 0 = off / 1 = on ). -h : Show help. -i <string> : Input file name. -intra : Use only intra frames ( I-frames ). -loop_input : Loop ( only works with still images ). -map <file:stream>[:syncfile:syncstream] : Set input stream mapping. -maxrate <int> : Set maximum video bitrate tolerance ( in bit/s ). -me <string or int> : Set motion estimation method.
dia ( 1 ) : Diamond search, radius 1 ( fast ).
hex ( 2 ) : Hexagonal search, radius 2 ( default ).
umh ( 3 ) : Uneven multi-hexagon search.
esa ( 4 ) : Exhaustive search ( slow ). -mbd <string> : Macroblock decision algorithm ( high quality mode ).
simple : Use mbcmp ( default ).
bits : Use fewest bits.
rd : Use best rate distortion. -minrate <int> : Set minimum video bitrate tolerance ( in bit/s ). -padbottom <int> : Set bottom pad band size ( in pixels ). -padcolor <int> : Set color of pad bands ( Hex 000000 to FFFFFF ). -padleft <int> : Set left pad band size ( in pixels ). -padright <int> : Set right pad band size ( in pixels ). -padtop <int> : Set top pad band size ( in pixels ). -pass <int> : Select the pass number ( 1 or 2 ). The statistics of the video are recorded in the first pass and the video is generated at the exact requested bitrate in the second pass. -pix_fmt <string> : Set pixel format.
yuv420p
yuv422p
yuv444p
yuv422
yuv410p
yuv411p
yuvj420p
yuvj422p
yuvj444p
rgb24
bgr24
rgba32
rgb565
rgb555
gray
monow
monob
pal8 -ps <int> : Set packet size in bits. -qmax <int> : Maximum video quantizer scale ( VBR ). -qmin <int> : Minimum video quantizer scale ( VBR ). -r <int or string> : Set frame rate ( Hz value, fraction or abbreviation ). For example : 25, 30000/1001, etc. -rc_init_occupancy <int> : Number of bits which should be loaded into the rate control buffer before decoding starts. -s <string> : Set frame size ( WidthxHeight or abreviation ). -subcmp <string or int> : Sub pel motion estimation compare function.
sad ( 0 ) : Sum of absolute differences, fast ( default ).
sse ( 1 ) : Sum of squared errors.
satd ( 2 ) : Sum of absolute Hadamard transformed differences.
dct ( 3 ) : Sum of absolute DCT transformed differences.
psnr ( 4 ) : Sum of squared quantization errors ( avoid, low quality ).
bit ( 5 ) : Number of bits needed for the block.
rd ( 6 ) : Rate distortion optimal, slow.
zero ( 7 ) : 0.
vsad ( 8 ) : Sum of absolute vertical differences.
vsse ( 9 ) : Sum of squared vertical differences.
nsse ( 10 ) : Noise preserving sum of squared differences.
w53 ( 11 ) : 5/3 wavelet ( only used in Snow ).
w97 ( 12 ) : 9/7 wavelet ( only used in Snow ).
dctmax ( 13 )
chroma ( 14 ) -ss <timecode> : Set start time offset in seconds or hh:mm:ss[.xxx] format. -t <timecode> : Set recording time in seconds or hh:mm:ss[.xxx] format. -timecode_frame_start <int> : Set GOP start timecode value in number of frames ( ex: 1282748 for 14:15:09:23 ). Drop Frame mode is not supported. -top <int> : Field dominance ( top = 1 / bottom = 0 / auto = -1 ). -trellis <int> : Rate-distortion optimal quantization. -vbsf <string> : Bitstream filters.
dump_extra
imxdump
noise
remove_extra -vcodec <string> : Force video codec.
copy : Copy raw codec data as is.
dvvideo : DV Video
ffv1 : FFV1 lossless video codec
h264 : H.264
mpeg2video : MPEG-2 Video
rawvideo : RAW Video
xvid : XviD ( MPEG-4 Part 2 ) -version : Show version. -vframes <int> : Set the number of video frames to record. -vn : Disable video. -vol <int> : Modify audio volume ( 256=normal ). -vsync <int> : Video sync method. Video will be stretched or squeezed to match the timestamps, it is done by duplicating and dropping frames. With -map option, you can select from which stream the timestamps should be taken. You can leave either video or audio unchanged and sync the remaining stream(s) to the unchanged one. -vtag <string> : Force video FourCC/Tag. -y : Overwrite output files. D10 (aka Sony IMX) Encoding ffmpeg -async 1 -i <input_file> -vcodec mpeg2video -r 25 -pix_fmt yuv422p -minrate 50000k -maxrate 50000k -b 50000k -intra -flags +ildct+low_delay -dc 10 -flags2 +ivlc+non_linear_q -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize 2000000 -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25 -an output.m2v Notes :
- Only works for 25 fps content.
- Change minrate, maxrate and b values to 30000k / 40000k / 50000k in order to produce 30/40/50 Mbps D10 essence.
- Set bufsize and rc_init_occupancy values to 1200000 / 1600000 / 2000000 for 30/40/50 Mbps D10 essence.
- Add the -padtop 32 option if you want to produce a 720x608 D10 image size from a 720x576 source. DVCAM / DVCPRO25 / DVCPRO50 Encoding ffmpeg -i <input_file> -pix_fmt yuv420p output_DVCAM.dv
ffmpeg -i <input_file> -pix_fmt yuv411p output_DVCPRO25.dv
ffmpeg -i <input_file> -pix_fmt yuv422p output_DVCPRO50.dv VC-3 (aka Avid DNxHD) Encoding ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov Notes :
- <bitrate> can take the following values : 36Mb, 120Mb, 185Mb ( please refer to the following table ).
- Add the following option for interlaced modes : -flags +ildct
- Add the following option for best quality mode ( very slow ! ) : -mbd rd Supported Resolutions : Project Format Resolution Frame Size Bits FPS <bitrate>
1080i / 59.94 DNxHD 220 1920 x 1080 8 29.97 185Mb
1080i / 59.94 DNxHD 145 1920 x 1080 8 29.97 120Mb
1080i / 50 DNxHD 185 1920 x 1080 8 25 185Mb
1080i / 50 DNxHD 120 1920 x 1080 8 25 120Mb
1080p / 25 DNxHD 185 1920 x 1080 8 25 185Mb
1080p / 25 DNxHD 120 1920 x 1080 8 25 120Mb
1080p / 25 DNxHD 36 1920 x 1080 8 25 36Mb
1080p / 24 DNxHD 175 1920 x 1080 8 24 185Mb
1080p / 24 DNxHD 115 1920 x 1080 8 24 120Mb
1080p / 24 DNxHD 36 1920 x 1080 8 24 36Mb
1080p / 23.976 DNxHD 175 1920 x 1080 8 23.976 185Mb
1080p / 23.976 DNxHD 115 1920 x 1080 8 23.976 120Mb
1080p / 23.976 DNxHD 36 1920 x 1080 8 23.976 36Mb
1080p / 29.7 DNxHD 45 1920 x 1080 8 29.97 36Mb FFV1 Encoding ffmpeg -i <input_file> -vcodec ffv1 -an output.mov H.264 I-frame only Highest Quality Encoding ffmpeg -i <input_file> -vcodec h264 -cqp 1 -intra -coder ac -an output.mp4 H.264 Long GOP Encoding ffmpeg -i <input_file> -vcodec h264 -b <video_bitrate> -g <gop_size> -bf 2 -b_strategy 1 -flags +loop -coder 1 -subcmp 2 -cmp 2 -trellis 2 -me hex -acodec aac -ab <audio_bitrate> output.mp4 MPEG-2 I-frame only Highest Quality Encoding ffmpeg -i <input_file> -vcodec mpeg2video -qscale 1 -qmin 1 -intra -an output.m2v MPEG-2 Long GOP Encoding ffmpeg -i <input_file> -vcodec mpeg2video -b <video_bitrate> -g <gop_size> -bf 2 -b_strategy 1 -acodec mp2 -ab <audio_bitrate> -f vob output.mpg D10 into QuickTime Wrapping ffmpeg -i <input_file> -vcodec copy -acodec pcm_s16le -vtag mx5p -vbsf imxdump output.mov Notes :
- This feature needs a patched version of FFmpeg not available in the current SVN, please contact Baptiste Coudurier or Olivier Amato for more information.
- Set -vtag to mx3p / mx4p / m5xp for D10 30/40/50 PAL or mx3n / mx4n / m5xn for D10 30/40/50 NTSC.
- Input D10 image size must be 720x608 ( use -padtop 32 option during D10 encoding if the original image size is 720x576 ).
- Final Cut Pro compliant. MPEG-2 Program Stream Muxing ffmpeg -genpts 1 -i ES_Video.m2v -i ES_Audio.mp2 -vcodec copy -acodec copy -f vob output.mpg MPEG-2 Program Stream Demuxing ffmpeg -i input.mpg -vcodec copy -f mpeg2video ES_Video.m2v -acodec copy -f mp2 ES_Audio.mp2 Note : This also works for files containing multiple audio tracks :
ffmpeg -i input.mpg -vcodec copy -f mpeg2video ES_Video.m2v -acodec copy -f mp2 ES_Audio1.mp2 -acodec copy -f mp2 ES_Audio2.mp2 MPEG-2 Start Timecode ffmpeg -i <input_file> -timecode_frame_start <start_timecode> -vcodec mpeg2video -an output.m2v Note : Start timecode is set as number of frames. For instance, if you want to start at 18:12:36:15, you will have to set -timecode_frame_start to 1638915 ( for 25 fps content ). Audio Volume Modification ffmpeg -i <input_file> -vol <audio_volume> -acodec <audio_codec> <output_file> Input Stream Selection ffmpeg -i input.vob -map 0:2 -acodec aac -ab <audio_bitrate> -vn output.mp4 Transcode audio stream #0:2. Sub-clip Creation ffmpeg -i <input_file> -ss <timecode> -t <timecode> -vcodec copy -acodec copy <output_file> Make a Video File from a Single Frame ffmpeg -loop_input -vframes <number_of_frames> -i <input_file> <output_file> Please submit new command lines to Olivier Amato 原文地址:http://blog.csdn.net/henreash/article/details/9962057

FFMPEG详细参数的更多相关文章

  1. c# ffmpeg常用参数

    c#  ffmpeg常用参数 转换文件格式的同时抓缩微图: ffmpeg -i "test.avi" -y -f image2 -ss 8 -t 0.001 -s 350x240 ...

  2. jQuery实现商品详情 详细参数页面切换

    利用index实现: <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...

  3. $_SERVER的详细参数整理下

    PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用. $_SERVER['PHP_SELF'] #当前正在执行 脚本的文件名,与 document roo ...

  4. JQuery中Ajax详细参数使用案例

    JQuery中Ajax详细参数使用案例 参考文档:http://www.jb51.net/shouce/jquery1.82/ 参考文档:http://jquery.cuishifeng.cn/jQu ...

  5. ffmpeg命令参数详解

    ffmpeg命令参数详解 http://linux.51yip.com/search/ffmpeg ffmpeg图片加滤镜效果 参考:https://cloud.tencent.com/develop ...

  6. 传奇身上装备升级系列脚本,以及UPGRADEITEMEX 脚本的详细参数解释

    UPGRADEITEMEX 脚本的详细参数解释如下: UPGRADEITEMEX 物品位置(0-12) 属性位置(0-14) 成功机率(0-100) 点数机率(0-255) 是否破碎(0,1) 物品位 ...

  7. FFMPEG ./configure 参数及意义

    FFMPEG版本:2.6.2,编译环境:ubuntu 14.4. 不同版本的FFMPEG参数可能不同,可在FFMPEG目录下使用以下命令查看 ./configure --help --help pri ...

  8. ffmpeg]ffmpeg使用参数的中文说明

    基本选项: -formats 输出所有可用格式 -f fmt 指定格式(音频或视频格式) -i filename 指定输入文件名,在linux下当然也能指定:0.0(屏幕录制)或摄像头 -y 覆盖已有 ...

  9. 【原】rsync的详细参数

    rsync参数的具体解释如下: -v, --verbose 详细模式输出-q, --quiet 精简输出模式-c, --checksum 打开校验开关,强制对文件传输进行校验-a, --archive ...

随机推荐

  1. Linux C++开发学习(一)

    一.简单输出 简单的小程序 1.安装g++ sudo install g++ 2.编写c++程序,helloworld.cpp #include<iostream> using names ...

  2. AJAX 基本结构 数据加载

    AJAX -- 网页数据异步加载 .ashx 一般处理程序   json 数据格式,在不同的语言之间传递数据 对象格式:     "{"key":"value& ...

  3. Java - BlockingQueue

    https://juejin.im/post/5aeebd02518825672f19c546 https://www.infoq.cn/article/java-blocking-queue blo ...

  4. Vue 系列之 基础入门

    背景叙述 渐进式 JavaScript 框架 易用:已经会了 HTML.CSS.JavaScript?即刻阅读指南开始构建应用! 灵活:不断繁荣的生态系统,可以在一个库和一套完整框架之间自如伸缩. 高 ...

  5. 为什么90%的CTO 都做不好绩效管理

    ​ 十多年从业经历,从 2001 年开始带团队到现在,我几乎经历过所有的 IT 角色.2010 年,我随创始团队筹建国美在线至今,经历了从几百单到现在日均百万订单,从只有家电品类到现在全品类.金融.大 ...

  6. 使用 NGINX 流控和 fail2ban 防止 CC 攻击

    背景知识 CC 攻击 攻击者通过创建大量请求导致服务器资源耗尽,主要针对特定服务接口,属于实现 DoS 攻击的一种方式(DoS 攻击更多是针对网络端口,而不是具体服务接口). NGINX 流控 lim ...

  7. SD从零开始67-70 后勤信息系统中的标准分析, 信息结构, 信息的更新规则, 建立统计数据

    SD从零开始67 后勤信息系统中的标准分析 标准分析中的报表Reporting in Standard Analyses 标准分析为高质量的表达和分析LIS中的数据基础提供了大量的功能: 当你决定了一 ...

  8. Tomcat 8默认工具manager管理页面访问配置

    Tomcat 8默认工具manager管理页面访问配置 1. 分配相关的角色权限 需要配置的配置文件是${catalina.home}/conf/tomcat-users.xml先给Tomcat访问相 ...

  9. 安卓开发_startActivityForResult的详细用法

    一个需求:一个activity到另一个activity进行一些设置,返回第一个activity的时候 获取第二个activity设置的数据 百度了一下,发现startActivityForResult ...

  10. 喜闻乐见-Activity生命周期

    Activity的生命周期,对于Android开发者来说,再熟悉不过了.但是我们接触到的资料,绝大部分都只是谈了一些表面上的东西,例如各个回调的顺序等等.本文试图换个角度来讲解,也希望对各位读者有所帮 ...