注册 | 登录  
  PSP新闻  
     
 
分类 RSS
当前位置:  使用心得
ffmpeg代码
文章录入: wyitalia  更新时间: 2005/5/9 14:48:53  点击数: 12562
 

ffmpeg 指令

ffmpeg version 0.4.8, Copyright (c) 2000-2003 Fabrice Bellard
usage: ffmpeg [[options] -i input_file]... {[options] outfile}...
Hyper fast Audio and Video encoder

Main options:
-L show license
-h show help
-formats show available formats, codecs, protocols, ...
-f fmt force format
-img img_fmt force image format
-i filename input file name
-y overwrite output files
-t duration set the recording time
-title string set the title
-author string set the author
-copyright string set the copyright
-comment string set the comment
-v verbose control amount of logging
-hq activate high quality settings

Video options:
-b bitrate set video bitrate (in kbit/s)
-r rate set frame rate (Hz value, fraction or abbreviation)
-s size set frame size (WxH or abbreviation)
-aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-croptop size set top crop band size (in pixels)
-cropbottom size set bottom crop band size (in pixels)
-cropleft size set left crop band size (in pixels)
-cropright size set right crop band size (in pixels)
-vn disable video
-bt tolerance set video bitrate tolerance (in kbit/s)
-maxrate bitrate set max video bitrate tolerance (in kbit/s)
-minrate bitrate set min video bitrate tolerance (in kbit/s)
-bufsize size set ratecontrol buffere size (in kbit)
-vcodec codec force video codec ('copy' to copy stream)
-sameq use same video quality as source (implies VBR)
-pass n select the pass number (1 or 2)
-passlogfile file select two pass log file name

Advanced Video options:
-pix_fmt format set pixel format
-g gop_size set the group of picture size
-intra use only intra frames
-qscale q use fixed video quantiser scale (VBR)
-qmin q min video quantiser scale (VBR)
-qmax q max video quantiser scale (VBR)
-mbqmin q min macroblock quantiser scale (VBR)
-mbqmax q max macroblock quantiser scale (VBR)
-qdiff q max difference between the quantiser scale (VBR)
-qblur blur video quantiser scale blur (VBR)
-qcomp compression video quantiser scale compression (VBR)
-rc_init_cplx complexity initial complexity for 1-pass encoding
-b_qfactor factor qp factor between p and b frames
-i_qfactor factor qp factor between p and i frames
-b_qoffset offset qp offset between p and b frames
-i_qoffset offset qp offset between p and i frames
-rc_eq equation set rate control equation
-rc_override override rate control override for specific intervals
-me method set motion estimation method
-dct_algo algo set dct algo
-idct_algo algo set idct algo
-er n set error resilience
-ec bit_mask set error concealment
-bf frames use 'frames' B frames
-mbd mode macroblock decision
-4mv use four motion vector by macroblock (only MPEG-4)
-part use data partitioning (only MPEG-4)
-bug param workaround not auto detected encoder bugs
-strict strictness how strictly to follow the standarts
-deinterlace deinterlace pictures
-psnr calculate PSNR of compressed frames
-vstats dump video coding statistics to file
-vhook module insert video processing module
-aic enable Advanced intra coding (h263+)
-umv enable Unlimited Motion Vector (h263+)

Audio options:
-ab bitrate set audio bitrate (in kbit/s)
-ar rate set audio sampling rate (in Hz)
-ac channels set number of audio channels
-an disable audio
-acodec codec force audio codec ('copy' to copy stream)

Audio/Video grab options:
-vd device set video grab device
-vc channel set video grab channel (DV1394 only)
-tvstd standard set television standard (NTSC, PAL (SECAM))
-dv1394 set DV1394 grab
-ad device set audio device

Advanced options:
-map file:stream set input stream mapping
-debug print specific debug info
-benchmark add timings for benchmarking
-hex dump each input packet
-bitexact only use bit exact algorithms (for codec testing)
-re read input at native frame rate
-loop loop (current only works with images)
-ps size set packet size in bits

ffmpeg -formats

video# ffmpeg -formats
Output audio/video file formats: mpeg vcd vob mpegts crc image imagepipe ac3 h26
3 m4v h264 mpeg1video mjpeg s16le s16be u16le u16be s8 u8 mulaw alaw rawvideo nu
ll mp2 rm asf asf_stream avi wav swf au gif mov 3gp mp4 mpjpeg singlejpeg dv flv
yuv4mpegpipe ffm audio_device nut rtp
Input audio/video file formats: mpeg mpegts image imagepipe ac3 h263 m4v h264 mp
egvideo mjpeg s16le s16be u16le u16be s8 u8 mulaw alaw rawvideo mp3 rm asf avi w
av swf au gif mov dv 4xm flv psxstr RoQ ipmovie wc3movie yuv4mpegpipe ffm video4
linux audio_device nut rtsp redir sdp rtp
Output image formats: pbm pgm ppm pam pgmyuv yuv png jpeg gif
Input image formats: pnm pam pgmyuv yuv png jpeg gif
Codecs:
Encoders: ac3 mp2 mpeg1video mpeg2video h263 h263p flv rv10 mpeg4 msmpeg4v1 ms
mpeg4v2 msmpeg4 wmv1 wmv2 mjpeg ljpeg huffyuv asv1 asv2 ffv1 rawvideo pcm_s16le
pcm_s16be pcm_u16le pcm_u16be pcm_s8 pcm_u8 pcm_alaw pcm_mulaw adpcm_ima_qt adpc
m_ima_wav adpcm_ima_dk3 adpcm_ima_dk4 adpcm_ms adpcm_4xm
Decoders: rawvideo h263 mpeg4 msmpeg4v1 msmpeg4v2 msmpeg4 wmv1 wmv2 h263i flv
rv10 svq1 svq3 wmav1 wmav2 indeo3 mpeg1video mpeg2video dvvideo dvaudio mjpeg mj
pegb mp2 mp3 mace3 mace6 huffyuv ffv1 cyuv h264 vp3 asv1 asv2 vcr1 cljr 4xm mdec
roqvideo interplayvideo xan_wc3 ac3 real_144 real_288 roq_dpcm interplay_dpcm x
an_dpcm pcm_s16le pcm_s16be pcm_u16le pcm_u16be pcm_s8 pcm_u8 pcm_alaw pcm_mulaw
adpcm_ima_qt adpcm_ima_wav adpcm_ima_dk3 adpcm_ima_dk4 adpcm_ms adpcm_4xm
Supported file protocols: file: pipe: udp: rtp: tcp: http:
Frame size, frame rate abbreviations: ntsc pal qntsc qpal sntsc spal film ntsc-f
ilm sqcif qcif cif 4cif
Motion estimation methods: zero(fastest) full(slowest) log phods epzs(default)

 

ffmpeg -t 30 -r 29.97 -s 352x240

ffmpeg -s 352x240 -b 115200 -vd /dev/bktr -acodec mp2 -ad /dev/dsp0.0 -y test.mpg

ffmpeg -i cola.mpg http://localhost:8090/feed1.ffm

 


上一篇: 用变换君完美转RMVB至MP4--解决声音不同步 (2005/4/9)
下一篇: RMVB转高清晰MP4 (2005/7/19)

 
Copyright 2007 PSP之家
苏ICP备05025990号
服务条款 隐私声明