進(jìn)入bin目錄,輸入ffmpeg -help可以查看相關(guān)命令參數(shù),如下:
Getting help: -h -- PRint basic options -h long -- print more options -h full -- print all options (including all format and codec specific options, very long) -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter See man ffmpeg for detailed description of the options.Print help / information / capabilities:顯示許可證,執(zhí)照,版本信息-L show license -h topic show help -? topic show help-help topic show help--help topic show help-version show version顯示配置命令參數(shù)-buildconf show build configuration顯示可用的格式(編碼,協(xié)議相關(guān)的)-formats show available formats-devices show available devices顯示支持的編解碼格式-codecs show available codecs-decoders show available decoders-encoders show available encoders顯示支持的bit流過濾協(xié)議-bsfs show available bit stream filters顯示支持的協(xié)議-protocols show available protocols-filters show available filters顯示支持的像素格式(rgb,yuv,nv...)-pix_fmts show available pixel formats顯示standard聲道布局-layouts show standard channel layouts顯示音頻采樣的格式(8位,16,32位...)-sample_fmts show available audio sample formats-colors show available color names-sources device list sources of the input device-sinks device list sinks of the output device硬件加速方法-hwaccels show available HW acceleration methodsGlobal options (affect whole program instead of just one file:日志相關(guān)-loglevel loglevel set logging level-v loglevel set logging level-report generate a report設(shè)置緩沖區(qū)-max_alloc bytes set maximum size of a single allocated block覆蓋輸出文件-y overwrite output files-n never overwrite output files-ignore_unknown Ignore unknown stream types-stats print progress report during encoding-max_error_rate ratio of errors (0.0: no errors, 1.0: 100% error maximum error rate-bits_per_raw_sample number set the number of bits per raw sample-vol volume change audio volume (256=normal)Per-file main options:強(qiáng)制采用格式fmt-f fmt force format 編解碼名稱-c codec codec name-codec codec codec name-pre preset preset name設(shè)置outfile metadata from infile-map_metadata outfile[,metadata]:infile[,metadata] set metadata information of outfile from infile設(shè)置紀(jì)錄時(shí)間-t duration record or transcode "duration" seconds of audio/video-to time_stop record or transcode stop time-fs limit_size set the limit file size in bytes-ss time_off set the start time offset-sSEOf time_off set the start time offset relative to EOF-seek_timestamp enable/disable seeking by timestamp with -ss-timestamp time set the recording timestamp ('now' to set the current time)-metadata string=string add metadata-program title=string:st=number... add program with specified streams-target type specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")-apad audio pad-frames number set the number of frames to output-filter filter_graph set stream filtergraph-filter_script filename read stream filtergraph description from a file-reinit_filter reinit filtergraph on input parameter changes-discard discard-disposition disposition視頻參數(shù)Video options:設(shè)置視頻幀的數(shù)量-vframes number set the number of video frames to output設(shè)置幀率-r rate set frame rate (Hz value, fraction or abbreviation)設(shè)置幀的大小(格式為寬X高,如1080X720)-s size set frame size (WxH or abbreviation)設(shè)置橫縱比-aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)設(shè)置的文件比特?cái)?shù)量-bits_per_raw_sample number set the number of bits per raw sample不做視頻記錄-vn disable video強(qiáng)制使用codec編解碼方式-vcodec codec force video codec ('copy' to copy stream)-timecode hh:mm:ss[:;.]ff set initial TimeCode value.處理的遍數(shù)-pass n select the pass number (1 to 3)音視頻碼率-vf filter_graph set video filters-ab bitrate audio bitrate (please use -b:a)-b bitrate video bitrate (please use -b:v)-dn disable data音頻參數(shù)Audio options:設(shè)置音頻幀的數(shù)量-aframes number set the number of audio frames to output設(shè)置音頻的質(zhì)量-aq quality set audio quality (codec-specific)設(shè)置音頻的采樣率-ar rate set audio sampling rate (in Hz)設(shè)置音頻的通道-ac channels set number of audio channels不做音頻記錄-an disable audio強(qiáng)制使用編碼-acodec codec force audio codec ('copy' to copy stream)設(shè)置音頻音量-vol volume change audio volume (256=normal)-af filter_graph set audio filtersSubtitle options:-s size set frame size (WxH or abbreviation)-sn disable subtitle-scodec codec force subtitle codec ('copy' to copy stream)-stag fourcc/tag force subtitle tag/fourcc-fix_sub_duration fix subtitles duration-canvas_size size set canvas size (WxH or abbreviation)-spre preset set the subtitle options to the indicated preset常用參數(shù)如下:
主要參數(shù): -i 設(shè)定輸入流 -f 設(shè)定輸出格式 -ss 開始時(shí)間 視頻參數(shù): -b 設(shè)定視頻流量,默認(rèn)為200Kbit/s -r 設(shè)定幀速率,默認(rèn)為25 -s 設(shè)定畫面的寬與高 -aspect 設(shè)定畫面的比例 -vn 不處理視頻 -vcodec 設(shè)定視頻編解碼器,未設(shè)定時(shí)則使用與輸入流相同的編解碼器 音頻參數(shù): -ar 設(shè)定采樣率 -ac 設(shè)定聲音的Channel數(shù) -acodec 設(shè)定聲音編解碼器,未設(shè)定時(shí)則使用與輸入流相同的編解碼器 -an 不處理音頻新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注