FFMPEG-ALL(1) FFMPEG-ALL(1) (NAME) ffmpeg-all - FFmpeg (SYNOPSIS) ffmpeg [_] {[__] -i _} ... {[__] _} ... (DESCRIPTION) ffmpeg . - - (Transcode) . ffmpeg ( ) "-i" . . () (////) () . "-map" ( (Stream selection) ). ( ) . 0 1 . "2:3" . (Stream specifiers) . . . . ( ) . -- . . . . o : ffmpeg -i input.avi output.mp4 o (bitrate) 64 : ffmpeg -i input.avi -b:v 64k -bufsize 64k output.mp4 o 24 : ffmpeg -i input.avi -r 24 output.mp4 o ( ) 1 24 : ffmpeg -r 1 -i input.m2v -r 24 output.mp4 (-f) . (DETAILED DESCRIPTION) ffmpeg ( ) . . : o (Demuxers) ( "demultiplexers") : o () o ( ) . -i (packets) . splitters () ( ). : | demuxer | | packets for stream 0 elementary stream 0 | | | | global |properties| | packets for stream 1 | and | elementary stream 1 | metadata | | | | | | | | ........... | | | | | | | | packets for stream N | | elementary stream N | | | | | read from file, network stream, | grabbing device, etc. | o (Decoders) () (raw frames) ( PCM ) . ( ) ( (Loopback decoders) ). : packets | | raw frames | decoder | | o (Filtergraphs) . . - (simple) (complex) -filter -filter_complex . . (deinterlacing "yadif") ( "scale") : | simple filtergraph | frames from frames for a decoder | | an encoder | yadif | scale | | | . ( ) ( ) . . ( ) : | complex filtergraph | frames frames |input 0| overlay | overlay |output 0 | | | | frames | | | | | |input 1 | | | | frames frames |input 2|scale|split|output 1 (overlay) . (duplicate) . . . o (Encoders) . () (lossy) - (lossless) . ( ). . : raw frames | | packets | encoder | | o (Muxers) ( "multiplexers") ( ) ( ) (interleave ) ( ) . : packets for stream 0 | | muxer | | elementary stream 0 | | | global | packets for stream 1 | |properties | | elementary stream 1 | and | | | metadata | | | | | | ........... | | | | | | packets for stream N | | | | elementary stream N | | | | | | write to file, network stream, | grabbing device, etc. | | Streamcopy ffmpeg (streamcopy) . INPUT.mkv OUTPUT.mp4 . : | demuxer | | unused elementary stream 0 | | | |INPUT.mkv | | | packets | | muxer | | | elementary stream 1 | elementary stream 0 | | | | |OUTPUT.mp4 | | | | | unused | | elementary stream 2 | | | : ffmpeg -i INPUT.mkv -map 0:1 -c copy OUTPUT.mp4 : o INPUT.mkv o o OUTPUT.mp4 o : o "-map 0:1" - 0 ( ) 1 ( ) o "-c copy" "copy" . . . ( ). . - : | demuxer 0| | packets | | muxer | elementary stream 0 |elementary stream 0 |INPUT0.mkv| | | |OUTPUT.mp4 | | | | | | demuxer 1| | packets |elementary stream 1 | | elementary stream 0 | | | |INPUT1.aac| | : ffmpeg -i INPUT0.mkv -i INPUT1.aac -map 0:0 -map 1:0 -c copy OUTPUT.mp4 -map - . -c . (Stream specifiers) . : | demuxer | | packets | | muxer 0 | elementary stream 0 |elementary stream 0 | | | | |OUTPUT0.mp4| |INPUT.mkv | | | packets | | elementary stream 1 | | muxer 1 | | | | |elementary stream 0 | |OUTPUT1.mp4| : ffmpeg -i INPUT.mkv -map 0:0 -c copy OUTPUT0.mp4 -map 0:1 -c copy OUTPUT1.mp4 -c . ( ) . . Transcoding . ( ) . : o - (deinterlacing) (resampling) o . ffmpeg -c copy . . : | demuxer | | audio packets stream 0 (audio) | | | | |INPUT.mkv video raw | | | | packets | video | video frames | | | stream 1 (video) | decoder | | | | | | | | | | | | video | | | muxer | | packets | video | | | stream 0 (video) | encoder | | | | |(libx264)| | |OUTPUT.mp4 | | | | | | | stream 1 (audio) | | | | : ffmpeg -i INPUT.mkv -map 0:v -map 0:a -c:v libx264 -c:a copy OUTPUT.mp4 ":v" ":a" -c (Stream specifiers) . Filtering . (Simple filtergraphs) ( ) . -filter ( -vf -af -filter:v () -filter:a ()). -af . ( ) : | demuxer | | video stream | packets | video | frames |INPUT.mkv | | decoder | | | | | | | | simple filtergraph | | | | | | yadif | scale | || | | | video | | muxer | | packets | video | | video stream | encoder |OUTPUT.mp4| | | | | | | (Complex filtergraphs) . / . -filter_complex . . -filter_complex . "overlay" . "amix" . Loopback decoders "" (loopback) . "-dec" . . -filter_complex . AVOptions "-dec" /. : ffmpeg -i INPUT \ -map 0:v:0 -c:v libx264 -crf 45 -f null - \ -threads 3 -dec 0:0 \ -filter_complex '[0:v][dec:0]hstack[stack]' \ -map '[stack]' -c:v ffv1 OUTPUT : o ( ) "libx264" o ( ) (threads) o ( ) o ( ) (lossless) OUTPUT . : | demuxer | | video stream | | video | | video | | null muxer | | INPUT | | decoder | encoder |(discards its input)| | | | | |(libx264)| | | | | | |loopback | | | decoder | | | | | | | | | | |complex filtergraph| | | | | | | | hstack | | || | || | | | | muxer | | | video | | video stream | encoder | OUTPUT | | | (ffv1) | | | | (STREAM SELECTION) ffmpeg "-map" . "-map" ffmpeg . "-vn / -an / -sn / -dn" . (Description) . . FFmpeg . (Automatic stream selection) map ffmpeg / . ffmpeg . : o (resolution) o o : . . "-map" . (Manual stream selection) "-map" . (Complex filtergraphs) (pads) . (fatal error) . map . map . . (Stream handling) . "-codec" . ffmpeg . "-codec" ffmpeg . . ( ) . ffmpeg . : (mux) . ffmpeg . (Examples) ffmpeg . . input file 'A.avi' stream 0: video 640x360 stream 1: audio 2 channels input file 'B.mp4' stream 0: video 1920x1080 stream 1: audio 2 channels stream 2: subtitles (text) stream 3: audio 5.1 channels stream 4: subtitles (text) input file 'C.mkv' stream 0: video 1280x720 stream 1: audio 2 channels stream 2: subtitles (image) : (automatic stream selection) ffmpeg -i A.avi -i B.mp4 out1.mkv out2.wav -map 1:a -c:a copy out3.mov "-map" ffmpeg . out1.mkv ffmpeg . "stream 0" B.mp4 . "stream 3" B.mp4 . "stream 2" B.mp4 A.avi B.mp4 . out2.wav "stream 3" B.mp4 . out3.mov "-map" . "-map 1:a" B.mp4 . . . . "copy" -- . . : (automatic subtitles selection) ffmpeg -i C.mkv out1.mkv -c:s dvdsub -an out2.mkv out1.mkv . C.mkv . out2.mkv . "-an" out2.mkv . : (unlabeled filtergraph outputs) ffmpeg -i A.avi -i C.mkv -i B.mp4 -filter_complex "overlay" out1.mp4 out2.srt "-filter_complex" . "overlay" A.avi C.mkv. out1.mp4 . B.mp4 . "stream 3" B.mp4 . MP4 . out2.srt . C.mkv . "stream 2" B.mp4 . : (labeled filtergraph outputs) ffmpeg -i A.avi -i B.mp4 -i C.mkv -filter_complex "[1:v]hue=s=0[outv];overlay;aresample" \ -map '[outv]' -an out1.mp4 \ out2.mkv \ -map '[outv]' -map 1:a:0 out3.mkv "[outv]" . . ffmpeg -i A.avi -i B.mp4 -i C.mkv -filter_complex "[1:v]hue=s=0[outv];overlay;aresample" \ -an out1.mp4 \ out2.mkv \ -map 1:a:0 out3.mkv hue "[outv]" . : ffmpeg -i A.avi -i B.mp4 -i C.mkv -filter_complex "[1:v]hue=s=0,split=2[outv1][outv2];overlay;aresample" \ -map '[outv1]' -an out1.mp4 \ out2.mkv \ -map '[outv2]' -map 1:a:0 out3.mkv B.mp4 hue split () . . overlay . A.avi C.mkv . overlay "-map" out1.mp4 . aresample A.avi . . "-an" . out1.mp4 . "out2.mkv" . out3.mkv hue B.mp4 . (OPTIONS) SI : 'K' 'M' 'G'. 'i' SI . 'B' SI . : 'KB' 'MiB' 'G' 'B' . (boolean) true . "no" false . "-nofoo" "foo" false . . '/' ( ) . : ffmpeg -i INPUT -/filter:v filter.script OUTPUT filter.script . (Stream specifiers) (bitrate) . ( ) . (:) . "-codec:a:1 ac3" "a:1" . ac3 . . "-b:a 128k" . . "-codec copy" "-codec: copy" . : stream_index . "-threads:1 4" 4 . stream_index ( ) stream_index . libavformat (program ID) . . stream_type[:additional_stream_specifier] stream_type : 'v' 'V' 'a' 's' 'd' 't' . 'v' 'V' (thumbnails) . additional_stream_specifier additional_stream_specifier . . g:group_specifier[:additional_stream_specifier] group_specifier . additional_stream_specifier additional_stream_specifier . group_specifier : group_index . #group_id or i:group_id . p:program_id[:additional_stream_specifier] program_id . additional_stream_specifier additional_stream_specifier . #stream_id or i:stream_id ( PID MPEG-TS). m:key[:value] key . value . ':' key value (escape ). disp:dispositions[:additional_stream_specifier] () . dispositions ( -dispositions ) '+' . u . ffmpeg . (Generic options) ff* . -L, -license . -h, -?, -help, --help [arg] . . () . arg : long . full . decoder=decoder_name decoder_name. -decoders . encoder=encoder_name encoder_name. -encoders . demuxer=demuxer_name demuxer_name. -formats . muxer=muxer_name muxer_name. -formats . filter=filter_name filter_name. -filters . bsf=bitstream_filter_name bitstream_filter_name. -bsfs . protocol=protocol_name protocol_name. -protocols . -version . -buildconf (build) . -formats ( ). -demuxers . -muxers . -devices . -codecs libavcodec. 'codec' . -decoders . -encoders . -bsfs . -protocols . -filters libavfilter. -pix_fmts . -sample_fmts . -layouts . -dispositions . -colors . -sources device[,opt1=val1[,opt2=val2]...] . . . ffmpeg -sources pulse,server=192.168.0.4 -sinks device[,opt1=val1[,opt2=val2]...] (sinks) . . . ffmpeg -sinks pulse,server=192.168.0.4 -loglevel [flags+]loglevel | -v [flags+]loglevel . flags : repeat "Last message repeated n times" . level "[level]" . . time . datetime . '+'/'-' / flags loglevel . flags loglevel '+' flags loglevel . loglevel : quiet, -8 . panic, 0 assertion. . fatal, 8 . . error, 16 . warning, 24 . . info, 32 . . . verbose, 40 "info" . debug, 48 . trace, 56 "level" loglevel "verbose": ffmpeg -loglevel repeat+level+verbose -i input output "level" loglevel : ffmpeg [...] -loglevel +repeat stderr . . AV_LOG_FORCE_NOCOLOR AV_LOG_FORCE_COLOR . -report "program-YYYYMMDD-HHMMSS.log" . . "-loglevel debug" . FFREPORT . key=value ':' ':' ( "Quoting and escaping" ffmpeg-utils ). : file %p %t "%%" "%" . level ( "-loglevel" ). ffreport.log 32 ( "info"): FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output . -hide_banner . FFmpeg . . -cpuflags flags (global) (CPU) . . . ffmpeg -cpuflags -sse+mmx ... ffmpeg -cpuflags mmx ... ffmpeg -cpuflags 0 ... : x86 mmx mmxext sse sse2 sse2slow sse3 sse3slow ssse3 atom sse4.1 sse4.2 avx avx2 xop fma3 fma4 3dnow 3dnowext bmi1 bmi2 cmov ARM armv5te armv6 armv6t2 vfp vfpv3 neon setend AArch64 armv8 vfp neon PowerPC altivec Specific Processors pentium2 pentium3 pentium4 k6 k62 athlon athlonxp k8 -cpucount count (global) . . . ffmpeg -cpucount 2 -max_alloc bytes (heap) malloc ffmpeg. . . INT_MAX . AVOptions libavformat libavdevice libavcodec . AVOptions -help . : generic . / AVFormatContext AVCodecContext . private . // . ID3v2.3 ID3v2.4 MP3 id3v2_version MP3 : ffmpeg -i input.flac -id3v2_version 3 out.mp3 AVOptions : ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4 . ac3 640k . (downmix) aac . 128k . : -nooption AVOptions -option 0/-option 1 . : AVOptions v/a/s . (Main options) -f fmt (input/output) . . -i url (input) -y (global) . -n (global) . -stream_loop number (input) (loop) . 0 -1 . -recast_media (global) . . -c[:stream_specifier] codec (input/output,per-stream) -codec[:stream_specifier] codec (input/output,per-stream) ( ) ( ) . codec / "copy" ( ) . ffmpeg -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT libx264 . "c" ffmpeg -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT ( libx264 ) ( libvorbis ) . -t duration (input/output) ( "-i") . ( ) duration . duration Time duration ffmpeg-utils(1) . -to -t -t . -to position (input/output) position. position Time duration ffmpeg-utils(1) . -to -t -t . -fs limit_size (output) . . . -ss position (input/output) ( "-i") position (seek) . ffmpeg position . -accurate_seek () position . -noaccurate_seek . ( ) position . position Time duration ffmpeg-utils(1) . -sseof position (input) "-ss" " ". 0 . -isync input_index (input) (sync source). . . "copyts" "start_at_zero" . . ffmpeg . -1 . . -1 . -itsoffset offset (input) . offset Time duration ffmpeg-utils(1) . . offset . -itsscale scale (input,per-stream) . scale . -timestamp date (output) . date Date ffmpeg-utils(1) . -metadata[:metadata_specifier] key=value (output,per-metadata) / . metadata_specifier . "-map_metadata" . "-map_metadata" . . : ffmpeg -i in.avi -metadata title="my title" out.flv : ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT -disposition[:stream_specifier] value (output,per-stream) (disposition) . : disposition - . value disposition '+' '-' . '+' '-' . '+' '-' value . value . 0 . "-disposition" ffmpeg 'default' . "-dispositions" disposition . : ffmpeg -i in.mkv -c copy -disposition:a:1 default out.mkv : ffmpeg -i in.mkv -c copy -disposition:s:0 0 -disposition:s:1 default out.mkv / : ffmpeg -i in.mp4 -i IMAGE -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic out.mp4 'original' 'comment' : ffmpeg -i in.mkv -c copy -disposition:a:0 +original-comment out.mkv 'original' 'comment' : ffmpeg -i in.mkv -c copy -disposition:a:0 -original+comment out.mkv 'original' 'comment' ( ): ffmpeg -i in.mkv -c copy -disposition:a:0 original+comment out.mkv disposition : ffmpeg -i in.mkv -c copy -disposition:a:0 0 out.mkv JPEG PNG . -program [title=title:][program_num=program_num:]st=stream[:st=stream...] (output) title program_num stream() . -stream_group [map=input_file_id=stream_group][type=type:]st=stream[:st=stream][:stg=stream_group][:id=stream_group_id...] (output) type stream_group_id mapping stream() / stream_group() . type : iamf_audio_element stream Audio Element IAMF type : audio_element_type Audio Element. : channel (Scalable channel audio) scene Ambisonics demixing . ',' key=value : parameter_id dmixp_mode recon_gain (recon gain) . ',' key=value : parameter_id layer Audio Element . ',' . ',' . key=value ":" : ch_layout flags : recon_gain recon_gain output_gain output_gain_flags output_gain . : FL FR BL BR TFL TFR ambisonics_mode ambisonics. audio_element_type channel . : mono ambisonics default_w iamf_mix_presentation stream IAMF Mix Presentation IAMF type : submix Mix Presentation. ',' . ',' . key=value ":" : parameter_id parameter_rate parameter_id default_mix_gain parameter_id element Audio Element Mix Presentation . '|' . '|' . key=value ":" : stg stream_group_id Audio Element parameter_id Audio Element parameter_rate parameter_id default_mix_gain parameter_id annotations key=value "key" BCP-47 "value" . "key" annotations headphones_rendering_mode (binaural) (spatialize) . audio_element_type channel . : stereo binaural layout . '|' . '|' . key=value ":" : layout_type loudspeakers ITU-2051-3 . binaural (binaural) . sound_system A J ITU-2051-3 7.1.2 3.1.2. layout_type binaural . integrated_loudness ITU-1770-4. digital_peak () ITU-1770-4. true_peak ITU-1770-4. dialog_anchored_loudness ITU-1770-4. album_anchored_loudness ITU-1770-4. annotations key=value "key" BCP-47 "value" . "key" annotations . 5.1 IAMF WAV: ffmpeg -i front.wav -i back.wav -i center.wav -i lfe.wav -map 0:0 -map 1:0 -map 2:0 -map 3:0 -c:a opus -stream_group type=iamf_audio_element:id=1:st=0:st=1:st=2:st=3, demixing=parameter_id=998, recon_gain=parameter_id=101, layer=ch_layout=stereo, layer=ch_layout=5.1(side), -stream_group type=iamf_mix_presentation:id=2:stg=0:annotations=en-us=Mix_Presentation, submix=parameter_id=100:parameter_rate=48000|element=stg=0:parameter_id=100:annotations=en-us=Scalable_Submix|layout=sound_system=stereo|layout=sound_system=5.1(side) -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 output.iamf (Audio Element Mix Presentation) IAMF mp4: ffmpeg -i input.iamf -c:a copy -stream_group map=0=0:st=0:st=1:st=2:st=3 -stream_group map=0=1:stg=0 -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 output.mp4 -target type (output) ("vcd", "svcd", "dvd", "dv", "dv50"). type "pal-", "ntsc-" "film-" . ( ) . : ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg : ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg . VCD : -f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324 -s 352x288 -r 25 -codec:v mpeg1video -g 15 -b:v 1150k -maxrate:v 1150k -minrate:v 1150k -bufsize:v 327680 -ar 44100 -ac 2 -codec:a mp2 -b:a 224k : -f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324 -s 352x240 -r 30000/1001 -codec:v mpeg1video -g 18 -b:v 1150k -maxrate:v 1150k -minrate:v 1150k -bufsize:v 327680 -ar 44100 -ac 2 -codec:a mp2 -b:a 224k : -f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324 -s 352x240 -r 24000/1001 -codec:v mpeg1video -g 18 -b:v 1150k -maxrate:v 1150k -minrate:v 1150k -bufsize:v 327680 -ar 44100 -ac 2 -codec:a mp2 -b:a 224k SVCD : -f svcd -packetsize 2324 -s 480x576 -pix_fmt yuv420p -r 25 -codec:v mpeg2video -g 15 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1 -ar 44100 -codec:a mp2 -b:a 224k : -f svcd -packetsize 2324 -s 480x480 -pix_fmt yuv420p -r 30000/1001 -codec:v mpeg2video -g 18 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1 -ar 44100 -codec:a mp2 -b:a 224k : -f svcd -packetsize 2324 -s 480x480 -pix_fmt yuv420p -r 24000/1001 -codec:v mpeg2video -g 18 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1 -ar 44100 -codec:a mp2 -b:a 224k DVD : -f dvd -muxrate 10080k -packetsize 2048 -s 720x576 -pix_fmt yuv420p -r 25 -codec:v mpeg2video -g 15 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008 -ar 48000 -codec:a ac3 -b:a 448k : -f dvd -muxrate 10080k -packetsize 2048 -s 720x480 -pix_fmt yuv420p -r 30000/1001 -codec:v mpeg2video -g 18 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008 -ar 48000 -codec:a ac3 -b:a 448k : -f dvd -muxrate 10080k -packetsize 2048 -s 720x480 -pix_fmt yuv420p -r 24000/1001 -codec:v mpeg2video -g 18 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008 -ar 48000 -codec:a ac3 -b:a 448k DV : -f dv -s 720x576 -pix_fmt yuv420p -r 25 -ar 48000 -ac 2 : -f dv -s 720x480 -pix_fmt yuv411p -r 30000/1001 -ar 48000 -ac 2 : -f dv -s 720x480 -pix_fmt yuv411p -r 24000/1001 -ar 48000 -ac 2 "dv50" "dv" "yuv422p" . . . -dn (input/output) . "-discard" . . "-map" . -dframes number (output) . "-frames:d" . -frames[:stream_specifier] framecount (output,per-stream) framecount . -q[:stream_specifier] q (output,per-stream) -qscale[:stream_specifier] q (output,per-stream) (VBR). q/qscale . qscale stream_specifier stream_specifier . -filter[:stream_specifier] filtergraph (output,per-stream) filtergraph . filtergraph . "in" "out" . ffmpeg-filters . / -filter_complex . -reinit_filter[:stream_specifier] integer (input,per-stream) () . . "n" . . : : : . -drop_changed[:stream_specifier] integer (input,per-stream) . . false . -filter_threads nb_threads (global) . . . -filter_buffered_frames nb_frames (global) . ( ffmpeg ). . . 0 . -pre[:stream_specifier] preset_name (output,per-stream) (preset) () . -stats (global) "info" ( "-loglevel" ). "-nostats" . -stats_period time (global) / . 0.5 . -print_graphs (global) stderr -print_graphs_format . -print_graphs_file filename (global) -print_graphs_format . -print_graphs_format format (global) ( : default, compact, csv, flat, ini, json, xml, mermaid, mermaidhtml). json . -progress url (global) url. . "key=value" . key - . "progress" "continue" "end" . "-stats_period" . stdout: ffmpeg -progress pipe:1 -i in.mkv out.mkv -stdin . . "-nostdin" . ffmpeg . "ffmpeg ... < /dev/null" (shell) . -debug_ts (global) / (latency). . . "-fdebug ts" . -attach filename (output) . . . . ( "-map" ). mimetype : ffmpeg -i INPUT -attach DejaVuSans.ttf -metadata:s:2 mimetype=application/x-truetype-font out.mkv ( ). -dump_attachment[:stream_specifier] filename (input,per-stream) filename. filename "filename" . 'out.ttf': ffmpeg -dump_attachment:t:0 out.ttf -i INPUT "filename" : ffmpeg -dump_attachment:t "" -i INPUT -- extradata extradata . (Video Options) -vframes number (output) . "-frames:v" . -r[:stream_specifier] fps (input/output,per-stream) ( ). fps . -framerate image2 v4l2 ( FFmpeg ). -r -framerate . : video encoding fps . video streamcopy fps . . fps . "setts" . -fpsmax[:stream_specifier] fps (output,per-stream) ( ). (clamp) . . "-r" . . -s[:stream_specifier] size (input/output,per-stream) . video_size -- . "scale" . "scale" . wxh ( - ). -aspect[:stream_specifier] aspect (output,per-stream) aspect . aspect num:den num den . "4:3" "16:9" "1.3333" "1.7777" . -vcodec copy ( ) . -display_rotation[:stream_specifier] rotation (input,per-stream) . rotation ( ) . / ( ) . ( ) "-autorotate" . . "-display_hflip" / "-display_vflip" . -display_hflip[:stream_specifier] (input,per-stream) (flip) . "-display_rotation" . -display_vflip[:stream_specifier] (input,per-stream) (flip) . "-display_rotation" . -mastering_display[:stream_specifier] G(%u,%u)B(%u,%u)R(%u,%u)WP(%u,%u)L(%u,%u) (input,per-stream) (Mastering display metadata). G(%u,%u)B(%u,%u)R(%u,%u)WP(%u,%u)L(%u,%u) X,Y GBR (WP) 0.00002 - (L) 0.0001 . 50000 GBR (WP) 10000 (L) . ( ) . -content_light[:stream_specifier] %u,%u (input,per-stream) (Content light metadata). %u,%u . ( ) . -vn (input/output) . "-discard" . . "-map" . -vcodec codec (output) . "-codec:v" . -pass[:stream_specifier] n (output,per-stream) (1 2). (two-pass) . ( -passlogfile ) . 1 null : ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y NUL ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y /dev/null -passlogfile[:stream_specifier] prefix (output,per-stream) prefix ``ffmpeg2pass'' . PREFIX-N.log N . -vf filtergraph (output) filtergraph . "-filter:v" -filter . -autorotate . -noautorotate . -autoscale . -noautoscale . autoscale / . . autoscale . (Advanced Video options) -pix_fmt[:stream_specifier] format (input/output,per-stream) . "-pix_fmts" . ffmpeg . pix_fmt "+" ffmpeg . pix_fmt "+" ffmpeg ( ) . -sws_flags flags (input/output) libswscale. "scale" . ffmpeg-scaler . -rc_override[:stream_specifier] override (output,per-stream) (Rate control override) "int,int,int" . (quantizer) . -vstats vstats_HHMMSS.log. vstats . -vstats_file file file. vstats . -vstats_version file vstats . 2 . vstats . -vtag fourcc/tag (output) /fourcc. "-tag:v" . -force_key_frames[:stream_specifier] time[,time...] (output,per-stream) -force_key_frames[:stream_specifier] expr:expr (output,per-stream) -force_key_frames[:stream_specifier] source (output,per-stream) -force_key_frames[:stream_specifier] scd_metadata (output,per-stream) force_key_frames : time[,time...] ffmpeg (keyframe) . . "-enc_time_base" . ""chapters"[delta]" delta ( ) . . 5 0.1 : -force_key_frames 0:05:00,chapters-0.1 expr:expr "expr:" expr . . expr : n 0 n_forced prev_forced_n "NAN" prev_forced_t "NAN" t 5 : -force_key_frames expr:gte(t,n_forced*5) 5 13: -force_key_frames expr:if(isnan(prev_forced_t),gte(t,13),gte(t,prev_forced_t+5)) source "source" ffmpeg . . scd_metadata "scd_metadata" ffmpeg "lavfi.scd.time" . "scdet" "scdet_vulkan" . "scdet" . lookahead : fixed-GOP . -apply_cropping[:stream_specifier] source (input,per-stream) (crop) . all . none (0) . all (1) . . codec (2) . container (3) . -copyinkf[:stream_specifier] (output,per-stream) . -init_hw_device type[=name][:device[,key=value...]] type name . "type%d" . device : cuda device CUDA . : primary_ctx 1 primary device context . : -init_hw_device cuda:1 . -init_hw_device cuda:0,primary_ctx=1 primary device context. dxva2 device Direct3D 9 . d3d11va device Direct3D 11 . Direct3D 11 Direct3D 11 VendorId vendor_id . : -init_hw_device d3d11va d3d11va Direct3D 11. -init_hw_device d3d11va:1 d3d11va Direct3D 11 1. -init_hw_device d3d11va:,vendor_id=0x8086 d3d11va Direct3D 11 VendorId 0x8086 . vaapi device X11 DRM render node DirectX . X11 ($DISPLAY) DRM render node (/dev/dri/renderD128) DirectX . : kernel_driver device . drm vaapi . vendor_id device kernel_driver vendor id . drm vaapi kernel_driver . : -init_hw_device vaapi vaapi . -init_hw_device vaapi:/dev/dri/renderD129 vaapi DRM render node /dev/dri/renderD129. -init_hw_device vaapi:1 vaapi 1 DirectX. -init_hw_device vaapi:,kernel_driver=i915 vaapi i915. -init_hw_device vaapi:,vendor_id=0x8086 vaapi vendor id 0x8086. vdpau device X11 . X11 ($DISPLAY) . qsv device MFX_IMPL_* . : auto sw hw auto_any hw_any hw2 hw3 hw4 auto_any . ( QSV (dxva2 d3d11va vaapi) QSV .) : child_device DRM render node DirectX . child_device_type . "--enable-libvpl" d3d11va "--enable-libmfx" dxva2 . vaapi . : -init_hw_device qsv:hw,child_device=/dev/dri/renderD129 QSV MFX_IMPL_HARDWARE DRM render node /dev/dri/renderD129. -init_hw_device qsv:hw,child_device=1 QSV MFX_IMPL_HARDWARE 1 DirectX. -init_hw_device qsv:hw,child_device_type=d3d11va GPU d3d11va QSV MFX_IMPL_HARDWARE. -init_hw_device qsv:hw,child_device_type=dxva2 GPU dxva2 QSV MFX_IMPL_HARDWARE. -init_hw_device qsv:hw,child_device=1,child_device_type=d3d11va QSV MFX_IMPL_HARDWARE 1 DirectX d3d11va. -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device qsv=hw1@va VAAPI va /dev/dri/renderD129 QSV hw1 va. opencl device platform_index.device_index . - . : platform_profile platform_version platform_name platform_vendor platform_extensions device_name device_vendor driver_version device_version device_profile device_extensions device_type . : -init_hw_device opencl:0.1 . -init_hw_device opencl:,device_name=Foo9000 Foo9000. -init_hw_device opencl:1,device_type=gpu,device_extensions=cl_khr_fp16 GPU cl_khr_fp16 . vulkan device . device . : debug 1 validation layer . linear_images 1 hwcontext . instance_extensions instance . device_extensions . : -init_hw_device vulkan:1 . -init_hw_device vulkan:RADV RADV. -init_hw_device vulkan:0,instance_extensions=VK_KHR_wayland_surface+VK_KHR_xcb_surface Wayland XCB. -init_hw_device type[=name]@source type name source. -init_hw_device list ffmpeg. -filter_hw_device name name . "hwupload" "hwmap" . . - . . -hwaccel[:stream_specifier] hwaccel (input,per-stream) () . hwaccel : none (). auto . vdpau VDPAU ( ). dxva2 DXVA2 (DirectX Video Acceleration). d3d11va D3D11VA (DirectX Video Acceleration). vaapi VAAPI (Video Acceleration API). qsv Intel QuickSync . ( qsv ) . QSV . videotoolbox Video Toolbox. hwaccel . (playback) . ffmpeg GPU . . -hwaccel_device[:stream_specifier] hwaccel_device (input,per-stream) . -hwaccel . -init_hw_device -init_hw_device type:hwaccel_device . -hwaccels ffmpeg. . -fix_sub_duration_heartbeat[:stream_specifier] (heartbeat) . (latency) . . -fix_sub_duration heartbeat . (Audio Options) -aframes number () . "-frames:a" . -ar[:stream_specifier] freq (/ ) . . . -aq q () ( VBR). -q:a . -ac[:stream_specifier] channels (/ ) . . . -an (/) . "-discard" . . "-map" . -acodec codec (/) . "-codec:a" . -sample_fmt[:stream_specifier] sample_fmt ( ) . "-sample_fmts" . -af filtergraph () filtergraph . "-filter:a" -filter . (Advanced Audio options) -atag fourcc/tag () /fourcc. "-tag:a" . -ch_layout[:stream_specifier] layout (/ ) "-channel_layout". -channel_layout[:stream_specifier] layout (/ ) . . . . . -guess_layout_max channels ( ) . ffmpeg . . . 0 . "-channel_layout" . (Subtitle options) -scodec codec (/) . "-codec:s" . -sn (/) . "-discard" . . "-map" . (Advanced Subtitle options) -fix_sub_duration . . DVB . . : . -canvas_size size (canvas) . (Advanced options) -map [-]input_file_id[:stream_specifier][:view_specifier][:?] | [linklabel] () . ( ) : ( "-i") ( "-filter_complex") . input_file_id . stream_specifier ( stream_specifier (Stream specifiers) ). "-" "" . . view_specifier (multiview) . : view:view_id view_id 'all' vidx:view_idx (index) 0 1 . vpos:position position "left" "right" "vidx:0". (streamcopy) . "?" : . ( ) . [linklabel] ( -filter_complex ) . linklabel . . / . "-map" . . : map everything : ffmpeg -i INPUT -map 0 output select specific stream 0:0 0:1 . "-map" . : ffmpeg -i INPUT -map 0:1 out.wav INPUT () out.wav . create multiple streams 2 a.mov ( 0:2) 6 b.mov ( 1:6) out.mov: ffmpeg -i a.mov -i b.mov -c copy -map 0:2 -map 1:6 out.mov create multiple streams 2 : ffmpeg -i INPUT -map 0:v -map 0:a:2 OUTPUT negative map : ffmpeg -i INPUT -map 0 -map -0:a:1 OUTPUT optional map "?" : ffmpeg -i INPUT -map 0:v -map 0:a? OUTPUT map by language : ffmpeg -i INPUT -map 0:m:language:eng OUTPUT -ignore_unknown . -copy_unknown . -map_metadata[:metadata_spec_out] infile[:metadata_spec_in] ( ) infile. ( ) . metadata_spec_in/out . : g (global) s[:stream_spec] . stream_spec . . . c:chapter_index (chapter). chapter_index . p:program_index (program). program_index . (global) . / . . . : ffmpeg -i in.ogg -map_metadata 0:s:0 out.mp3 : ffmpeg -i in.mkv -map_metadata:s:a 0:g out.mkv 0 . -map_chapters input_file_index () input_file_index . . . -benchmark () (benchmarking) . . 0 . -benchmark_all () . (/ ) . -timelimit duration () ffmpeg duration (CPU user time) . -dump () (dump) (stderr). -hex () (payload) . -readrate speed () . ( ) . . 1 (real-time) "-re" . ( ) . . ( ) . -re () . "-readrate 1" . -readrate_initial_burst seconds (burst) -re/-readrate . -readrate_catchup speed () . . -fps_mode[:stream_specifier] parameter ( ) / . passthrough . cfr . vfr . auto cfr vfr . . . avoid_negative_ts . -map . () . -frame_drop_threshold parameter . 1.0 . -1.1 . . -apad parameters ( ) (Padding) () . "-af apad" . "apad" . "-shortest" . -copyts . . fps_mode ( avoid_negative_ts ) . -start_at_zero copyts . "-ss 50" . -copytb mode (timebase) . mode : 1 . . . 0 (). . -1 . -1 . -enc_time_base[:stream_specifier] timebase ( ) . timebase : 0 . - 1/framerate - 1/samplerate . demux . filter . a positive number . ( 1:24 1:48000) ( 0.04166 2.0833e-5) . 0 . -bitexact (/) (bitexact) () (/). -shortest () . . "-shortest_buf_duration" . -shortest_buf_duration duration () "-shortest" (sparse) ( -- ) . . "-shortest" . . -dts_delta_threshold threshold . ( "AVFMT_TS_DISCONT" ) MPEG- TS HLS "-copyts" ( ). threshold ffmpeg / DTS PTS . 10 . -dts_error_threshold threshold . ( "AVFMT_TS_DISCONT" ). threshold ffmpeg PTS/DTS . "3600*30" ( ) . -muxdelay seconds () -. -muxpreload seconds () -. -streamid output-stream-index:new-value () (stream-id) . . streamid . PID 0 33 PID 1 36 mpegts: ffmpeg -i inurl -streamid 0:33 -streamid 1:36 out.ts -bsf[:stream_specifier] bitstream_filters (/ ) (Bitstream Filters) . ( ) ( ) . bitstream_filters : [==:=:...] ',=:' . "-bsfs" . : ffmpeg -bsf:v h264_mp4toannexb -i h264.mp4 -c:v copy -an out.h264 "h264_mp4toannexb" ( H.264 MP4 Annex B ) . ffmpeg -i file.mov -an -vn -bsf:s mov2textsub -c:s copy -f rawvideo sub.txt "mov2textsub" ( MOV ) . "-c copy" - . -tag[:stream_specifier] codec_tag (/ ) /fourcc . -timecode hh:mm:ssSEPff (Timecode) . SEP ':' (drop) ';' ( '.') . ffmpeg -i input.mpg -timecode 01:02:03.04 -r 30000/1001 -s ntsc output.mpg -filter_complex filtergraph () / . -- -- -filter . filtergraph " " ffmpeg-filters . - . : o "[file_index:stream_specifier]" ( -map). stream_specifier . -map . o (loopback decoder) [dec:dec_idx] dec_idx . -map . o . : ffmpeg -i input.mkv \ -filter_complex '[0:v]scale=size=hd1080,split=outputs=2[for_enc][orig_scaled]' \ -c:v libx264 -map '[for_enc]' output.mkv \ -dec 0:0 \ -filter_complex '[dec:0][orig_scaled]hstack[stacked]' \ -map '[stacked]' -c:v ffv1 comparison.mkv o ( ) 1920x1080 o ( ) "libx264" output.mkv o ( ) o ( ) ( "libx264") o ( ) (lossless) comparison.mkv . ( ) . . -map . . lavfi . (overlay): ffmpeg -i video.mkv -i image.png -filter_complex '[0:v][1:v]overlay[out]' -map '[out]' out.mkv "[0:v]" () overlay . overlay . : ffmpeg -i video.mkv -i image.png -filter_complex 'overlay[out]' -map '[out]' out.mkv : ffmpeg -i video.mkv -i image.png -filter_complex 'overlay' out.mkv (bitmap) : 720x576 . libavfilter . (hardcode) DVB-T MPEG-TS : ffmpeg -i input.ts -filter_complex \ '[#0x2ef] setpts=PTS+1/TB [sub] ; [#0x2d0] [sub] overlay' \ -sn -map '#0x2dc' output.mkv (0x2d0 0x2dc 0x2ef PID MPEG-TS 0:0 0:3 0:7 ) "color" lavfi: ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv -filter_complex_threads nb_threads () (threads) filter_complex . filter_threads "-filter_complex" . CPU . -lavfi filtergraph () / . -filter_complex. -accurate_seek () (accurate seeking) -ss . . -noaccurate_seek . -seek_timestamp () -ss . . -ss . 0 transport streams . -thread_queue_size size (/) . / ffmpeg . ffmpeg . . -sdp_file file () sdp file. sdp rtp ( rtp ). -discard () . "all" . none . default . noref . bidir (bidirectional) . nokey (keyframes) . all . -abort_on flags () . : empty_output . empty_output_stream . -max_error_rate () ffmpeg 69 . . 0 1 . 2/3 . -xerror () . -max_muxing_queue_size packets ( ) / ffmpeg . . . . -muxing_queue_data_threshold bytes ( ) . . -auto_conversion_filters () -vf -af -filter_complex -lavfi. . (scale, aresample) . "-noauto_conversion_filters" . -bits_per_raw_sample[:stream_specifier] value ( ) value. / . . -stats_enc_pre[:stream_specifier] path ( ) -stats_enc_post[:stream_specifier] path ( ) -stats_mux_pre[:stream_specifier] path ( ) path. -stats_enc_pre -stats_enc_post . -stats_mux_pre . . -stats_enc_pre_fmt / -stats_enc_post_fmt / -stats_mux_pre_fmt . . . -stats_enc_pre_fmt[:stream_specifier] format_spec ( ) -stats_enc_post_fmt[:stream_specifier] format_spec ( ) -stats_mux_pre_fmt[:stream_specifier] format_spec ( ) -stats_enc_pre / -stats_enc_post / -stats_mux_pre. format_spec {fmt} . format_spec ---- \{ \} \\ {, } \ . fmt : fidx . sidx . n . : . : . : . ni . ( ) . -1 . tb / num/den. . tbi ptsi num/den. ptsi 0/1. pts (PTS) . . ptsi (ni ) . tbi . (2^63 - 1 = 9223372036854775807) . t . pts tb. ti (ni ) . ptsi tbi. inf . dts (packet) (DTS) . . dt (packet) . dts tb. sn (frame,audio) . samp (frame,audio) . size (packet) . br (packet) . abr (packet) -1. key (packet) 'K' 'N'. packet -stats_enc_post_fmt -stats_mux_pre_fmt . frame -stats_enc_pre_fmt . audio . : pre-encoding {fidx} {sidx} {n} {t} post-encoding {fidx} {sidx} {n} {t} . . . (Preset files) option=value . ('#') () . presets FFmpeg . : ffpreset avpreset. ffpreset ffpreset "vpre" "apre" "spre" "fpre" . "fpre" . "vpre" "apre" "spre" . "vpre" "apre" "spre" : ffmpeg arg.ffpreset $FFMPEG_DATADIR ( ) $HOME/.ffmpeg datadir ( PREFIX/share/ffmpeg) ffpresets win32 . "libvpx-1080p" libvpx-1080p.ffpreset . ffmpeg codec_name-arg.ffpreset codec_name . "-vcodec libvpx" "-vpre 1080p" libvpx-1080p.ffpreset . avpreset avpreset "pre" . ffpreset . option=value . "pre" ffmpeg avpreset. $AVCONV_DATADIR ( ) $HOME/.avconv datadir ( PREFIX/share/ffmpeg) . ffmpeg codec_name-arg.avpreset codec_name . "-vcodec libvpx" "-pre 1080p" libvpx-1080p.avpreset . ffmpeg arg.avpreset . vstats (vstats file format) "-vstats" "-vstats_file" . "-vstats_version" . 1 : frame= q= PSNR= f_size= s_size= kB time= br= kbits/s avg_br= kbits/s 2 : out= st= frame= q= f PSNR= f_size= s_size= kB time= br= kbits/s avg_br= kbits/s : avg_br Kbits/s br Kbits/s frame out PSNR (Peak Signal to Noise Ratio) q f_size s_size KiB st time type (picture type) -stats_enc . (EXAMPLES) (Video and Audio grabbing) ffmpeg : ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg ALSA ( 1) OSS: ffmpeg -f alsa -ac 1 -i hw:1 -f video4linux2 -i /dev/video0 /tmp/out.mpg ffmpeg Gerd Knorr . . X11 (X11 grabbing) X11 ffmpeg : ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 /tmp/out.mpg 0.0 display.screen X11 DISPLAY. ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0+10,20 /tmp/out.mpg 0.0 display.screen X11 DISPLAY. 10 x 20 y . (Video and Audio file format conversion) ffmpeg : : o YUV : ffmpeg -i /tmp/test%d.Y -i /tmp/out.mpg : /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V, /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc... Y U V . . . ffmpeg -s . o YUV420P : ffmpeg -i /tmp/test.yuv /tmp/out.avi test.yuv (planar) YUV . Y U V . o YUV420P : ffmpeg -i mydivx.avi hugefile.yuv o : ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg a.wav YUV a.yuv MPEG a.mpg . o : ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2 a.wav 22050 MPEG . o : ffmpeg -i /tmp/a.wav -map 0:a -b:a 64k /tmp/a.mp2 -map 0:a -b:a 128k /tmp/b.mp2 a.wav a.mp2 b.mp2 . '-map file:index' . o VOB : ffmpeg -i snatch_1.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k snatch.avi DVD VOB AVI MPEG-4 MP3. B MPEG-4 DivX5 GOP 29.97 . MP3 LAME "--enable-libmp3lame" . DVD . : "ffmpeg -demuxers" . o : : ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg foo-001.jpeg foo-002.jpeg . WxH . "-frames:v" "-t" -ss . : ffmpeg -f image2 -framerate 12 -i foo-%03d.jpeg -s WxH foo.avi "foo-%03d.jpeg" . printf C . -i (globbing) image2 "-pattern_type glob" . glob : "foo-*.jpeg": ffmpeg -f image2 -pattern_type glob -framerate 12 -i 'foo-*.jpeg' -s WxH foo.avi o : ffmpeg -i test1.avi -i test2.avi -map 1:1 -map 1:0 -map 0:1 -map 0:0 -c copy -y test12.nut test12.nut . o (CBR): ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v o lmin lmax mblmin mblmax 'lambda' QP2LAMBDA 'q' : ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext (SYNTAX) FFmpeg . (Quoting and escaping) FFmpeg (Quoting and Escaping) . : o ' \ ( / ). . o \ . o '' (literal) . ' . o (whitespaces) . (shell) . "av_get_token" libavutil/avstring.h . tools/ffescape FFmpeg . o "Crime d'Amour" "'": Crime d\'Amour o "'" : 'Crime d'\''Amour' o : ' this string starts and ends with whitespaces ' o : ' The string '\'string\'' is a string ' o \ : 'c:\foo' can be written as c:\\foo (Date) : [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z] now "now" . Z UTC . -- -- . (Time duration) : [-][:]:[....] HH MM SS . m SS . [-]+[....][s|ms|us] S m . s ms us . - . : 55 55 0.2 0.2 200ms 200 0.2s 200000us 200000 0.2s 12:03:45 12 03 45 23.189 23.189 (Video size) widthxheight . : ntsc 720x480 pal 720x576 qntsc 352x240 qpal 352x288 sntsc 640x480 spal 768x576 film 352x240 ntsc-film 352x240 sqcif 128x96 qcif 176x144 cif 352x288 4cif 704x576 16cif 1408x1152 qqvga 160x120 qvga 320x240 vga 640x480 svga 800x600 xga 1024x768 uxga 1600x1200 qxga 2048x1536 sxga 1280x1024 qsxga 2560x2048 hsxga 5120x4096 wvga 852x480 wxga 1366x768 wsxga 1600x1024 wuxga 1920x1200 woxga 2560x1600 wqsxga 3200x2048 wquxga 3840x2400 whsxga 6400x4096 whuxga 7680x4800 cga 320x200 ega 640x350 hd480 852x480 hd720 1280x720 hd1080 1920x1080 2k 2048x1080 2kflat 1998x1080 2kscope 2048x858 4k 4096x2160 4kflat 3996x2160 4kscope 4096x1716 nhd 640x360 hqvga 240x160 wqvga 400x240 fwqvga 432x240 hvga 480x320 qhd 960x540 2kdci 2048x1080 4kdci 4096x2160 uhd2160 3840x2160 uhd4320 7680x4320 (Video rate) . frame_rate_num/frame_rate_den . : ntsc 30000/1001 pal 25/1 qntsc 30000/1001 qpal 25/1 sntsc 30000/1001 spal 25/1 film 24/1 ntsc-film 24000/1001 (Ratio) numerator:denominator . (1/0) . "0:0" . (Color) ( ) "[0x|#]RRGGBB[AA]" @ . "0x" 0.0 1.0 (opacity) (0x00 0.0 0xff 1.0 ). 0xff . random . : AliceBlue 0xF0F8FF AntiqueWhite 0xFAEBD7 Aqua 0x00FFFF Aquamarine 0x7FFFD4 Azure 0xF0FFFF Beige 0xF5F5DC Bisque 0xFFE4C4 Black 0x000000 BlanchedAlmond 0xFFEBCD Blue 0x0000FF BlueViolet 0x8A2BE2 Brown 0xA52A2A BurlyWood 0xDEB887 CadetBlue 0x5F9EA0 Chartreuse 0x7FFF00 Chocolate 0xD2691E Coral 0xFF7F50 CornflowerBlue 0x6495ED Cornsilk 0xFFF8DC Crimson 0xDC143C Cyan 0x00FFFF DarkBlue 0x00008B DarkCyan 0x008B8B DarkGoldenRod 0xB8860B DarkGray 0xA9A9A9 DarkGreen 0x006400 DarkKhaki 0xBDB76B DarkMagenta 0x8B008B DarkOliveGreen 0x556B2F Darkorange 0xFF8C00 DarkOrchid 0x9932CC DarkRed 0x8B0000 DarkSalmon 0xE9967A DarkSeaGreen 0x8FBC8F DarkSlateBlue 0x483D8B DarkSlateGray 0x2F4F4F DarkTurquoise 0x00CED1 DarkViolet 0x9400D3 DeepPink 0xFF1493 DeepSkyBlue 0x00BFFF DimGray 0x696969 DodgerBlue 0x1E90FF FireBrick 0xB22222 FloralWhite 0xFFFAF0 ForestGreen 0x228B22 Fuchsia 0xFF00FF Gainsboro 0xDCDCDC GhostWhite 0xF8F8FF Gold 0xFFD700 GoldenRod 0xDAA520 Gray 0x808080 Green 0x008000 GreenYellow 0xADFF2F HoneyDew 0xF0FFF0 HotPink 0xFF69B4 IndianRed 0xCD5C5C Indigo 0x4B0082 Ivory 0xFFFFF0 Khaki 0xF0E68C Lavender 0xE6E6FA LavenderBlush 0xFFF0F5 LawnGreen 0x7CFC00 LemonChiffon 0xFFFACD LightBlue 0xADD8E6 LightCoral 0xF08080 LightCyan 0xE0FFFF LightGoldenRodYellow 0xFAFAD2 LightGreen 0x90EE90 LightGrey 0xD3D3D3 LightPink 0xFFB6C1 LightSalmon 0xFFA07A LightSeaGreen 0x20B2AA LightSkyBlue 0x87CEFA LightSlateGray 0x778899 LightSteelBlue 0xB0C4DE LightYellow 0xFFFFE0 Lime 0x00FF00 LimeGreen 0x32CD32 Linen 0xFAF0E6 Magenta 0xFF00FF Maroon 0x800000 MediumAquaMarine 0x66CDAA MediumBlue 0x0000CD MediumOrchid 0xBA55D3 MediumPurple 0x9370D8 MediumSeaGreen 0x3CB371 MediumSlateBlue 0x7B68EE MediumSpringGreen 0x00FA9A MediumTurquoise 0x48D1CC MediumVioletRed 0xC71585 MidnightBlue 0x191970 MintCream 0xF5FFFA MistyRose 0xFFE4E1 Moccasin 0xFFE4B5 NavajoWhite 0xFFDEAD Navy 0x000080 OldLace 0xFDF5E6 Olive 0x808000 OliveDrab 0x6B8E23 Orange 0xFFA500 OrangeRed 0xFF4500 Orchid 0xDA70D6 PaleGoldenRod 0xEEE8AA PaleGreen 0x98FB98 PaleTurquoise 0xAFEEEE PaleVioletRed 0xD87093 PapayaWhip 0xFFEFD5 PeachPuff 0xFFDAB9 Peru 0xCD853F Pink 0xFFC0CB Plum 0xDDA0DD PowderBlue 0xB0E0E6 Purple 0x800080 Red 0xFF0000 RosyBrown 0xBC8F8F RoyalBlue 0x4169E1 SaddleBrown 0x8B4513 Salmon 0xFA8072 SandyBrown 0xF4A460 SeaGreen 0x2E8B57 SeaShell 0xFFF5EE Sienna 0xA0522D Silver 0xC0C0C0 SkyBlue 0x87CEEB SlateBlue 0x6A5ACD SlateGray 0x708090 Snow 0xFFFAFA SpringGreen 0x00FF7F SteelBlue 0x4682B4 Tan 0xD2B48C Teal 0x008080 Thistle 0xD8BFD8 Tomato 0xFF6347 Turquoise 0x40E0D0 Violet 0xEE82EE Wheat 0xF5DEB3 White 0xFFFFFF WhiteSmoke 0xF5F5F5 Yellow 0xFFFF00 YellowGreen 0x9ACD32 (Channel Layout) . FFmpeg . : FL (front left) FR (front right) FC (front center) LFE / (low frequency) BL (back left) BR (back right) FLC FRC BC SL (side left) SR (side right) TC TFL TFC TFR TBL TBC TBR DL DR WL WR SDL SDR LFE2 : mono FC stereo FL+FR 2.1 FL+FR+LFE 3.0 FL+FR+FC 3.0(back) FL+FR+BC 4.0 FL+FR+FC+BC quad FL+FR+BL+BR quad(side) FL+FR+SL+SR 3.1 FL+FR+FC+LFE 5.0 FL+FR+FC+BL+BR 5.0(side) FL+FR+FC+SL+SR 4.1 FL+FR+FC+LFE+BC 5.1 FL+FR+FC+LFE+BL+BR 5.1(side) FL+FR+FC+LFE+SL+SR 6.0 FL+FR+FC+BC+SL+SR 6.0(front) FL+FR+FLC+FRC+SL+SR 3.1.2 FL+FR+FC+LFE+TFL+TFR hexagonal FL+FR+FC+BL+BR+BC 6.1 FL+FR+FC+LFE+BC+SL+SR 6.1 FL+FR+FC+LFE+BL+BR+BC 6.1(front) FL+FR+LFE+FLC+FRC+SL+SR 7.0 FL+FR+FC+BL+BR+SL+SR 7.0(front) FL+FR+FC+FLC+FRC+SL+SR 7.1 FL+FR+FC+LFE+BL+BR+SL+SR 7.1(wide) FL+FR+FC+LFE+BL+BR+FLC+FRC 7.1(wide-side) FL+FR+FC+LFE+FLC+FRC+SL+SR 5.1.2 FL+FR+FC+LFE+BL+BR+TFL+TFR octagonal FL+FR+FC+BL+BR+BC+SL+SR cube FL+FR+BL+BR+TFL+TFR+TBL+TBR 5.1.4 FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR 7.1.2 FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR 7.1.4 FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBL+TBR 7.2.3 FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBC+LFE2 9.1.4 FL+FR+FC+LFE+BL+BR+FLC+FRC+SL+SR+TFL+TFR+TBL+TBR 9.1.6 FL+FR+FC+LFE+BL+BR+FLC+FRC+SL+SR+TFL+TFR+TBL+TBR+TSL+TSR hexadecagonal FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR binaural BIL+BIR downmix DL+DR 22.2 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR '+' . : o ( FL FR FC LFE ) '@' ( FL@Left FR@Right FC@Center LFE@Low_Frequency ) : o ( FL FR FC LFE ) o ( mono stereo 4.0 quad 5.0 ) o 'c' ( "av_channel_layout_default" ). . o 'C' . . o "0x" ( "AV_CH_*" libavutil/channel_layout.h ). 53 libavutil "c" ( "c" "C" ). "av_channel_layout_from_string" libavutil/channel_layout.h . (EXPRESSION EVALUATION) FFmpeg libavutil/eval.h . . expr1 expr2 "expr1;expr2" . expr1 expr2 expr2 . : "+" "-" "*" "/" "^". : "+" "-". . "ld" "st" 0 9 . : abs(x) x. acos(x) x. asin(x) x. atan(x) x. atan2(y, x) y/x. between(x, min, max) 1 x min max 0. bitand(x, y) bitor(x, y) AND OR x y. x y . . ( 2^53 ) . ceil(expr) expr . "ceil(1.5)" "2.0" . clip(x, min, max) x min max. cos(x) x. cosh(x) () x. eq(x, y) 1 x y 0. exp(x) x ( "e" ). floor(expr) expr . "floor(\-1.5)" "\-2.0" . gauss(x) x "exp(\-x*x/2) / sqrt(2*PI)". gcd(x, y) (..) x y. x y 0 . gt(x, y) 1 x y 0. gte(x, y) 1 x y 0. hypot(x, y) C "sqrt(x*x + y*y)" x y (x, y) . if(x, y) x y 0. if(x, y, z) x y z . ifnot(x, y) x y 0. ifnot(x, y, z) x y z . isinf(x) 1.0 x +/-INFINITY 0.0. isnan(x) 1.0 x NAN 0.0. ld(idx) idx st(idx, expr) . . lerp(x, y, z) x y z. log(x) x. lt(x, y) 1 x y 0. lte(x, y) 1 x y 0. max(x, y) x y. min(x, y) x y. mod(x, y) x y. not(expr) 1.0 expr 0.0. pow(x, y) x y "(x)^(y)". print(t) print(t, l) t (loglevel) l. l . . random(idx) 0.0 1.0. idx seed/state st(idx) . seed seed idx . seed 42 0 : st(0,42); print(random(0)); print(random(0)); print(random(0)) randomi(idx, min, max) min max. idx seed/state st(idx) . seed seed idx . root(expr, max) expr ld(0) 0..max 0 . expr . ld(0) ld(0) . 0 . round(expr) expr . "round(1.5)" "2.0" . sgn(x) x. sin(x) x. sinh(x) x. sqrt(expr) () expr. "(expr)^.5". squish(x) "1/(1 + exp(4*x))". st(idx, expr) expr . idx 0 9 . . ld(var) . : . tan(x) x. tanh(x) x. taylor(expr, x) taylor(expr, x, idx) x ld(idx)- 0 . . ld(idx) expr ld(idx) . idx 0 . : y 0 "taylor(expr, x-y)" . time(0) ( ) . trunc(expr) expr . "trunc(\-1.5)" "\-1.0" . while(cond, expr) expr cond expr NAN cond . : PI 3.14 E exp(1) ( ) 2.718 PHI (1+sqrt(5))/2 1.618 "" (true) : "*" AND "+" OR : if (A AND B) then C : if(A*B, C) C . (SI) . 'i' () 1024 1000. 'B' . 'KB' 'MiB' 'G' 'B' . 10 2. y 10^-24 / 2^-80 z 10^-21 / 2^-70 a 10^-18 / 2^-60 f 10^-15 / 2^-50 p 10^-12 / 2^-40 n 10^-9 / 2^-30 u 10^-6 / 2^-20 m 10^-3 / 2^-10 c 10^-2 d 10^-1 h 10^2 k 10^3 / 2^10 K 10^3 / 2^10 M 10^6 / 2^20 G 10^9 / 2^30 T 10^12 / 2^40 P 10^15 / 2^50 E 10^18 / 2^60 Z 10^21 / 2^70 Y 10^24 / 2^80 (CODEC OPTIONS) libavcodec . (private options) . . . -option value FFmpeg "AVCodecContext" API libavutil/opt.h . : b integer () . 200K . ab integer () ( ). 128K . bt integer () ( ) ( ). 1-pass . / . . flags flags (/) . : mv4 (mpeg4). qpel 1/4 (qpel). loop (loop filter). qscale qscale . pass1 2pass . pass2 2pass . gray / ( ). psnr error[?] . truncated . drop_changed . AVERROR_INPUT_CHANGED . ildct DCT (interlaced). low_delay . global_header extradata . bitexact ( (I)DCT). . . aic H263 / AC mpeg4. ilme . cgop GOP (closed GOP). output_corrupt . time_base rational number . ( ) . "1 / frame_rate" 1 . g integer () (GOP). 12 . ar integer (/) ( ). ac integer (/) . cutoff integer () ( ). frame_size integer () . frame_size . CODEC_CAP_VARIABLE_FRAME_SIZE 0 . . frame_number integer . delay integer qcomp float () (VBR). . rc_eq : 0.0-1.0. qblur float () (VBR). qmin integer () (VBR). -1 69 2 . qmax integer () (VBR). -1 1024 31 . qdiff integer () (VBR). bf integer () B B. -1 16 . 0 B . -1 . 0 . b_qfactor float () QP P B. codec_tag integer bug flags () . : autodetect xvid_ilace Xvid ( fourcc==XVIX ) ump4 ( fourcc==UMP4 ) no_padding ( ) amv qpel_chroma std_qpel qpel ( fourcc/) qpel_chroma2 direct_blocksize direct-qpel-blocksize ( fourcc/) edge edge padding ( fourcc/) hpel_chroma dc_clip ms . trunc / strict integer (/) . : very strict normal unofficial experimental (/ /). : . b_qoffset float () QP P B. err_detect flags () . : crccheck CRC bitstream buffer explode ignore_err . . . careful compliant aggressive has_b_frames integer block_align integer rc_override_count integer maxrate integer () ( ). bufsize . minrate integer () ( ). CBR . bufsize integer () ( ). i_qfactor float () QP P I. i_qoffset float () QP P I. dct integer () DCT. : auto () fastint int mmx altivec faan DCT AAN lumi_mask float () . tcplx_mask float () (temporal complexity masking). scplx_mask float () (spatial complexity masking). p_mask float () (inter masking). dark_mask float () . idct integer (/) IDCT. : auto int simple simplemmx simpleauto IDCT simple arm altivec sh4 simplearm simplearmv5te simplearmv6 simpleneon xvid faani IDCT AAN slice_count integer ec flags () (Error Concealment). : guess_mvs (MV) () deblock deblock favor_inter bits_per_coded_sample integer aspect rational number () (SAR). sar rational number () . aspect. debug flags (/) . : pict rc bitstream mb_type (MB) qp (QP) mv dct_coeff skip startcode pts er mmco ( H.264) bugs buffers thread_ops nomc ( ) cmp integer () (full pel me). : sad () sse satd dct DCT psnr ( ) bit rd - (RD) zero 0 vsad vsse nsse w53 5/3 snow w97 9/7 snow dctmax chroma subcmp integer () (sub pel me). : sad () sse satd dct DCT psnr ( ) bit rd - (RD) zero 0 vsad vsse nsse w53 5/3 snow w97 9/7 snow dctmax chroma mbcmp integer () . : sad () sse satd dct DCT psnr ( ) bit rd - (RD) zero 0 vsad vsse nsse w53 5/3 snow w97 9/7 snow dctmax chroma ildctcmp integer () DCT. : sad () sse satd dct DCT psnr ( ) bit rd - (RD) zero 0 vsad vsse nsse w53 5/3 snow w97 9/7 snow dctmax chroma dia_size integer () (diamond) . : (1024, INT_MAX) (1024-INT_MAX) (768, 1024] (HEX) (512, 768] (UMH) (256, 512] (-1, 2) (INT_MIN, -1) last_pred integer () . precmp integer () . : sad () sse satd dct DCT psnr ( ) bit rd - (RD) zero 0 vsad vsse nsse w53 5/3 snow w97 9/7 snow dctmax chroma pre_dia_size integer () . subq integer () . me_range integer () (1023 DivX). global_quality integer () slice_flags integer mbd integer () ( ). : simple mbcmp () bits rd - (RD) rc_init_occupancy integer () (rc buffer) . flags2 flags (/) : fast . noout . ignorecrop (crop) sps. local_header extradata. chunks . showall . export_mvs ("AV_FRAME_DATA_MOTION_VECTORS" ) . doc/examples/export_mvs.c . skip_manual . ass_ro_flush_noop ReadOrder ASS flush. icc_profiles / ICC / (colorimetry). fixed_frame_size . export_side_data flags (/) : mvs ("AV_FRAME_DATA_MOTION_VECTORS" ) . doc/examples/export_mvs.c . prft ("AV_PKT_DATA_PRFT" ) . venc_params ("AV_FRAME_DATA_VIDEO_ENC_PARAMS" ) . H.264 VP9. film_grain ("AV_FRAME_DATA_FILM_GRAIN_PARAMS" ). AV1 . enhancements LCEVC ( "AV_FRAME_DATA_LCEVC" ). threads integer (/) (threads) . : auto, 0 auto . dc integer () intra_dc_precision. nssew integer () nsse. skip_top integer () . skip_bottom integer () . profile integer () . unknown . . level integer () (level) . . unknown . : unknown lowres integer () 1= 1/2 2=1/4 3=1/8. mblmin integer () (VBR). -1 69 2 . mblmax integer () (VBR). -1 1024 31 . skip_loop_filter integer () skip_idct integer () skip_frame integer () / IDCT / . : none / default noref bidir (B) nokey all bidir_refine integer () B. keyint_min integer () IDR/. refs integer () . trellis integer () - Trellis. mv0_threshold integer () (mv0). compression_level integer () . bits_per_raw_sample integer . channel_layout integer (/) . rc_max_vbv_use float () rc_min_vbv_use float () / VBV. color_primaries integer (decoding/encoding,video) Possible values: bt709 BT.709 bt470m BT.470 M bt470bg BT.470 BG smpte170m SMPTE 170 M smpte240m SMPTE 240 M film Film bt2020 BT.2020 smpte428 smpte428_1 SMPTE ST 428-1 smpte431 SMPTE 431-2 smpte432 SMPTE 432-1 jedec-p22 JEDEC P22 color_trc integer (decoding/encoding,video) Possible values: bt709 BT.709 gamma22 BT.470 M gamma28 BT.470 BG smpte170m SMPTE 170 M smpte240m SMPTE 240 M linear Linear log log100 Log log_sqrt log316 Log square root iec61966_2_4 iec61966-2-4 IEC 61966-2-4 bt1361 bt1361e BT.1361 iec61966_2_1 iec61966-2-1 IEC 61966-2-1 bt2020_10 bt2020_10bit BT.2020 - 10 bit bt2020_12 bt2020_12bit BT.2020 - 12 bit smpte2084 SMPTE ST 2084 smpte428 smpte428_1 SMPTE ST 428-1 arib-std-b67 ARIB STD-B67 colorspace integer (decoding/encoding,video) Possible values: rgb RGB bt709 BT.709 fcc FCC bt470bg BT.470 BG smpte170m SMPTE 170 M smpte240m SMPTE 240 M ycocg YCOCG bt2020nc bt2020_ncl BT.2020 NCL bt2020c bt2020_cl BT.2020 CL smpte2085 SMPTE 2085 chroma-derived-nc Chroma-derived NCL chroma-derived-c Chroma-derived CL ictcp ICtCp color_range integer (/) color_range . : tv mpeg limited MPEG (219*2^(n-8)) pc jpeg full JPEG (2^n-1) chroma_sample_location integer (/) . : left center topleft top bottomleft bottom alpha_mode integer (/) . : premultiplied straight log_level_offset integer (log level). slices integer () . thread_type flags (/) . frame . : slice . . frame . slice+frame . audio_service_type integer () . : ma (Main Audio Service) ef (Effects) vi (Visually Impaired) hi (Hearing Impaired) di (Dialogue) co (Commentary) em (Emergency) vo (Voice Over) ka (Karaoke) request_sample_fmt sample_fmt () . "none" . pkt_timebase rational number sub_charenc encoding () . field_order field_order () / . : progressive (Progressive) tt bb tb bt skip_alpha bool () 1 (). gray flags . 0 . codec_whitelist list () . . dump_separator string () . : ffprobe -dump_separator " " -i ~/videos/matrixbench_mpeg2.mpg max_pixels integer (/) . . apply_cropping bool () (cropping) . . 1 () . : "AV_CODEC_FLAG_UNALIGNED" (CPU) . "AV_CODEC_FLAG_UNALIGNED" . / . (DECODERS) FFmpeg ( ) . FFmpeg (native) . "--enable-lib" . "--list-decoders" . "--disable-decoders" "--enable-decoder=DECODER" / "--disable-decoder=DECODER" . "-decoders" *ff . (VIDEO DECODERS) . av1 AOMedia Video 1 (AV1). (Options) operating_point AV1 ( 0 31). 0 . hevc HEVC ( ITU-T H.265 ISO/IEC 23008-2). MV-HEVC . ( view_ids) . get_format() - . . "ffmpeg" . (Options) view_ids (MV-HEVC) . '-1' VPS . view_ids_available (MV-HEVC) VPS . . get_format() . ( ) ( VPS NALU ). view_pos_available (MV-HEVC) ( ) VPS "AVStereo3DView" . view_ids_available "view_pos_available[i]" "view_ids_available[i]" . view_ids_available . rawvideo (Raw video). rawvideo . (Options) top top_field_first . -1 () 0 (Bottom-field-first) 1 (Top-field-first) libdav1d dav1d AV1. libdav1d libavcodec AOMedia Video 1 (AV1) . libdav1d . "--enable-libdav1d" . (Options) libdav1d . max_frame_delay . 0 ( ). filmgrain (Film Grain) . . . "export_side_data" . oppoint AV1 ( 0 31). . alllayers AV1. false . libdavs2 AVS2-P2/IEEE1857.4. libavcodec AVS2 davs2 . libuavs3d AVS3-P2/IEEE1857.10. libuavs3d libavcodec AVS3 . libuavs3d . "--enable-libuavs3d" . (Options) libuavs3d . frame_threads . 0 ( ). libxevd eXtra-fast Essential Video Decoder (XEVD) MPEG-5 EVC. libxevd . --enable-libxevd . xevd . (Options) libxevd . xevd . libxevd "xevd_app --help" libxevd . threads (threads) (Thread). QSV Decoders Intel QuickSync Video ( VC1 MPEG-2 H.264 HEVC JPEG/MJPEG VP8 VP9 AV1 VVC). (Common Options) qsv . async_depth . gpu_copy GPU . default on off HEVC (HEVC Options) hevc_qsv. load_plugin . none hevc_sw hevc_hw load_plugins (:) (UID) . v210 4:2:2 (10-bit). (Options) custom_stride v210 . 0 ( ). -1 v210 Stride BOXX . (AUDIO DECODERS) . ac3 AC-3. ATSC A/52:2010 ETSI TS 102 366 RealAudio 3 ( dnet) . AC-3 (AC-3 Decoder Options) -drc_scale value . AC-3 . . 1 . : drc_scale == 0 DRC . . 0 < drc_scale <= 1 DRC . DRC . . drc_scale > 1 DRC . drc_scale . . . flac FLAC. FLAC Xiph . FLAC (FLAC Decoder options) -use_buggy_lpc FLAC lavc LPC ( ) . LPC lavc . ffwavesynth . . . libgsm libgsm. libgsm libavcodec GSM . libgsm . "--enable-libgsm" . GSM . libilbc libilbc. libilbc libavcodec (iLBC) . libilbc . "--enable-libilbc" . (Options) libilbc . enhance 1 . 0 (). libmpeghdec libmpeghdec. libmpeghdec FFmpeg MPEG-H 3D . libmpeghdec . "--enable-libmpeghdec --enable-nonfree" . libopencore-amrnb libopencore-amrnb. libopencore-amrnb libavcodec (AMR-NB) . libopencore-amrnb . "--enable-libopencore-amrnb" . FFmpeg AMR-NB AMR-NB . libopencore-amrwb libopencore-amrwb. libopencore-amrwb libavcodec (AMR-WB) . libopencore-amrwb . "--enable-libopencore-amrwb" . FFmpeg AMR-WB AMR-WB . libopus libopus. libopus libavcodec Opus . libopus . "--enable-libopus" . FFmpeg Opus Opus . (SUBTITLES DECODERS) libaribb24 ARIB STD-B24. A C ARIB STD-B24 . libaribb24 (libaribb24 Decoder Options) -aribb24-base-path path libaribb24 . ( ) . . -aribb24-skip-ruby-text boolean (Ruby text) . . libaribcaption ARIB STD-B24 libaribcaption. A C ARIB STD-B24 ABNT NBR 15606-1 ISDB-T . libaribcaption () . "--enable-libaribcaption" . libaribb24 libaribcaption libaribcaption . libaribcaption (libaribcaption Decoder Options) -sub_type subtitle_type . bitmap (). ass ASS. text . libaribb24 ass . ( mpv) ARIB ASS . -caption_encoding encoding_scheme . auto (). jis JIS ARIB STD B24. ISDB . utf8 UTF-8 ARIB STD B24. ISDB-T . latin ABNT NBR 15606-1. SBTVD / ISDB-Tb . -font font_name[,font_name2,...] bitmap ass . ass . . -ass_single_rect boolean ARIB STD-B24 ( ). ( mpv) ASS AVSubtitle ASS ASS . false . AVSubtitle ASS true ASS_SINGLE_RECT=1 . -force_outline_text boolean (Outline) . false . -outline_width number (0.0 - 3.0) () . 1.5 . -ignore_background boolean . false . -ignore_ruby boolean () . false . -replace_drcs boolean DRCS . true . -replace_msz_ascii boolean - MSZ ( ) . true . -replace_msz_japanese boolean MSZ ( ) . true . -replace_msz_glyph boolean MSZ ( ) . FreeType DirectWrite Adobe-Japan1 IBM Plex Sans JP Morisawa BIZ UDGothic Morisawa BIZ UDMincho Yu Gothic Yu Mincho Meiryo. true . -canvas_size image_size (Canvas) . "-subtitle_type" bitmap . libaribcaption : 1. PROFILE_A : 1440 x 1080 SAR (PAR) 4:3 2. PROFILE_C : 320 x 180 SAR (PAR) 1:1 . "-canvas_size" . "-canvas_size" . "-canvas_size" . "-canvas_size" SAR . libaribcaption (libaribcaption decoder usage examples) MPEG-TS ARIB "ffplay": ffplay -sub_type bitmap MPEG.TS MPEG-TS 1920x1080 "ffplay": ffplay -sub_type bitmap -canvas_size 1920x1080 MPEG.TS ARIB : ffmpeg -sub_type bitmap -i src.m2t -filter_complex "[0:v][0:s]overlay" -vcodec h264 dest.mp4 dvbsub (Options) compute_clut -2 CLUT clut . -1 CLUT clut . 0 CLUT . 1 CLUT . dvb_substream dvb -1 () . dvdsub DVD VobSub Matroska . (Options) palette . VobSub Matroska VobSub . DVD IFO VOB . ( 0x) : "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b". ifo_palette IFO (). forced_subs_only (Forced) . . 1 . 0 . libzvbi-teletext Libzvbi libavcodec DVB DVB . libzvbi . "--enable-libzvbi" . (Options) txt_page . . "*" "subtitle" . * . txt_default_region 0 87 ( 32 15 ETS 300 706 ). -1 libzvbi . 1.0 . txt_chop_top . 1 . txt_format . bitmap ASS . text . ass ASS . . txt_left (X) 0 . txt_top (Y) 0 . txt_chop_spaces . . 1 . txt_duration . -1 . txt_transparent . 0 . txt_opacity (0-255) . txt_transparent ( ) . 0 txt_transparent 255 . ENCODERS FFmpeg ( ) . FFmpeg (native) . "--enable-lib" . "--list-encoders" . "--disable-encoders" "--enable-encoder=ENCODER" / "--disable-encoder=ENCODER" . "-encoders" *ff . AUDIO ENCODERS . aac (AAC). AAC FFmpeg . (Options) b (bits/s). (CBR) . 128kbps . q (VBR). ffmpeg . global_quality . cutoff (Cutoff Frequency). . aac_coder AAC. : twoloop (TLS). . . aac_is aac_ms aac_pns . anmr (Trellis) (ANMR). twoloop . aac_is aac_pns . . fast . twoloop . ( 64kbps) . aac_ms / (M/S). "auto" M/S . "enable" ( ) "disable" . aac_is (Intensity Stereo). IS . "disable" . aac_pns (PNS) . "disable" . aac_tns FIR . - . "disable" . aac_ltp (LTP) ( ) . profile:a aac_low . -ar . profile : aac_low " " (Low-complexity) AAC. . mpeg2_aac_low "-profile:a aac_low -aac_pns 0". PNS MPEG4 . aac_ltp aac_ltp . MPEG4. aac_low . ac3 and ac3_fixed AC-3. ATSC A/52:2010 ETSI TS 102 366 . ac3 ac3_fixed . . ac3_fixed "-acodec ac3_fixed" . AC-3 (AC-3 Metadata) AC-3 . . . . : *<> *<> *<> *<> (Metadata Control Options) -per_frame_metadata boolean . . 0 (). 1 . (Downmix Levels) -center_mixlev level . (Gain) . . . : 0.707 -3dB 0.595 -4.5dB () 0.500 -6dB -surround_mixlev level . () . . . : 0.707 -3dB 0.500 -6dB () 0.000 () (Audio Production Information) . . -mixing_level number . (SPL) . 80 111 -1 . -1 . "room_type" "mixing_level" -1 . -room_type type . . X (X- curve) (Flat) . "mixing_level" "room_type" . 0 notindicated () 1 large 2 small (Other Metadata Options) -copyright boolean (). . 0 off () 1 on -dialnorm value (Dialogue Normalization). (0 dBFS) . . . -31dB . -31 -1 -31 . -dsur_mode mode (Dolby Surround Mode). Dolby Surround (Pro Logic) . . Dolby Surround . 0 notindicated () 1 off 2 on -original boolean . . 0 off 1 on () (Extended Bitstream Information) (Alternate Bit Stream Syntax) D A/52:2010 . . . . Alternate Bit Stream "center_mixlev" "surround_mixlev" . - (Extended Bitstream Information - Part 1) -dmix_mode mode . Lt/Rt ( ) Lo/Ro ( ) . 0 notindicated () 1 ltrt Lt/Rt 2 loro Lo/Ro -ltrt_cmixlev level Lt/Rt. Lt/Rt . 1.414 +3dB 1.189 +1.5dB 1.000 0dB 0.841 -1.5dB 0.707 -3.0dB 0.595 -4.5dB () 0.500 -6.0dB 0.000 -ltrt_surmixlev level Lt/Rt. Lt/Rt () . 0.841 -1.5dB 0.707 -3.0dB 0.595 -4.5dB 0.500 -6.0dB () 0.000 () -loro_cmixlev level Lo/Ro. Lo/Ro . 1.414 +3dB 1.189 +1.5dB 1.000 0dB 0.841 -1.5dB 0.707 -3.0dB 0.595 -4.5dB () 0.500 -6.0dB 0.000 -loro_surmixlev level Lo/Ro. Lo/Ro () . 0.841 -1.5dB 0.707 -3.0dB 0.595 -4.5dB 0.500 -6.0dB () 0.000 () - (Extended Bitstream Information - Part 2) -dsurex_mode mode EX. EX ( 7.1 5.1) . Dolby Surround EX . 0 notindicated () 1 on EX 2 off EX -dheadphone_mode mode . ( 2.0 ) . Dolby Headphone . 0 notindicated () 1 on 2 off -ad_conv_type type A/D. A/D HDCD . 0 standard A/D () 1 hdcd A/D HDCD AC-3 (Other AC-3 Encoding Options) -stereo_rematrixing boolean (Stereo Rematrixing). / . AC-3 / / . . cutoff frequency . . AC-3 (Floating-Point-Only AC-3 Encoding Options) . -channel_coupling boolean / AC-3 . . . . -1 auto () 0 off 1 on -cpl_start_band number . 1 15 . 1 . auto . . -1 auto () flac FLAC ( ). (Options) flac FFmpeg . compression_level . 0 12 5 . frame_size . lpc_coeff_precision LPC 1 15 15 . lpc_type LPC. none LPC fixed LPC levinson cholesky lpc_passes (Passes) (Cholesky) LPC. min_partition_order . max_partition_order . prediction_order_method . estimation 2level 4level 8level search (Bruteforce search) log ch_mode . auto indep left_side right_side mid_side exact_rice_parameters . 1 . multi_dim_quant . 1 LPC . . opus Opus. FFmpeg Opus . CELT . libopus . (Options) b . . opus_delay . 20 . libfdk_aac libfdk-aac AAC. libfdk-aac Fraunhofer FDK AAC . libfdk-aac . "--enable-libfdk-aac" . GPL GPL "--enable-gpl --enable-nonfree --enable-libfdk-aac" . AAC-HE . VBR vbr flags +qscale . 7.1 libfdk-aac 0.1.3 . fdk-aac . (Options) FFmpeg . b . . VBR . ar ( ). channels . flags +qscale (VBR). vbr VBR . cutoff . ( 0 ) . 0 . profile . : aac_low AAC (LC) aac_he AAC (HE-AAC) aac_he_v2 AAC (HE-AACv2) aac_ld AAC (LD) aac_eld AAC (ELD) aac_low . libfdk_aac . afterburner 1 afterburner 0 . . 1 . eld_sbr 1 SBR ( ) ELD 0 . 0 . eld_v2 1 ELDv2 ( LD-MPS ELD) ELDv2 0 . fdk-aac (4.0.0) : (AACENCODER_LIB_VL0.AACENCODER_LIB_VL1.AACENCODER_LIB_VL2) > (4.0.0). 0 . signaling SBR/PS. : default ( ) implicit explicit_sbr SBR PS explicit_hierarchical default . latm 1 LATM/LOAS 0 . 0 . header_period StreamMuxConfig PCE ( ) LATM/LOAS. . 0 . vbr VBR 1 5. 1 ( ) 5 . 0 VBR CBR ( ) . aac_low VBR . VBR 1 5 : 1 32 kbps 2 40 kbps 3 48-56 kbps 4 64 kbps 5 80-96 kbps 0 . frame_length . . . (Examples) o ffmpeg VBR AAC M4A (MP4): ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a o ffmpeg CBR 64k kbps AAC High-Efficiency AAC: ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a liblc3 liblc3 LC3 ( ). liblc3 . "--enable-liblc3" . Bluetooth SIG LC3 LE Audio LC3plus : o 2.5 5 . o (High-Resolution) 48 96 . liblc3 . (Options) FFmpeg . b bitrate . . ar frequency ( ). channels . frame_duration . 10ms . 2.5ms 5ms 7.5ms 10ms. LC3 ( LE Audio) 7.5ms 10ms LC3plus 2.5ms 5ms 10ms . 10ms LC3 LC3plus . LC3 LC3plus . high_resolution boolean 1 . LC3plus 48 96 . 96 . . LC3 48 20 . libmp3lame MP3 LAME (Lame Ain't an MP3 Encoder). libmp3lame . "--enable-libmp3lame" . MP3 ( ) libshine . (Options) libmp3lame . lame . b (-b) CBR ABR. "bitrate" LAME . q (-V) VBR. ffmpeg . global_quality . compression_level (-q) . 0 9 0 9 . cutoff (--lowpass) . . reservoir 1 (Bit Reservoir) . 1 . LAME --nores . joint_stereo (-m j) ( ) / / . 1 . abr (--abr) 1 ABR . --abr lame FFmpeg ABR b . copyright (-c) 1 MPEG . 0 (). original (-o) 1 MPEG . 1 (). libopencore-amrnb OpenCORE (Adaptive Multi-Rate Narrowband). libopencore-amrnb . "--enable-libopencore-amrnb --enable-version3" . . 8000 strict unofficial . (Options) b . libavcodec : 4750 5150 5900 6700 7400 7950 10200 12200 dtx 1 ( ) . 0 (). libopus libopus Opus. libopus . "--enable-libopus" . (Option Mapping) libopus opusenc opus-tools . libopus opusenc . b (bitrate) . b FFmpeg bitrate opusenc . vbr (vbr, hard-cbr, and cvbr) VBR. vbr FFmpeg opusenc : off (hard-cbr) (CBR). on (vbr) (). constrained (cvbr) . compression_level (comp) . 0 10 . 0 10 . 10 . frame_duration (framesize) . : 2.5, 5, 10, 20, 40, 60. . 20ms . 20ms . packet_loss (expect-loss) . 0 . fec (n/a) (Inband FEC). packet_loss - FEC . . application (N.A.) . : voip . audio (). lowdelay . cutoff (N.A.) . : 4000 6000 8000 12000 20000 . 0 ( ). libopus 15 kbps CELT ( application lowdelay) . mapping_family (mapping_family) . -1 0 1 . LFE libopus . : 0 1 LFE 255 . dtx (N.A.) 1 . 0 (). apply_phase_inv (N.A.) (requires libopus >= 1.2) 0 . 1 ( ). libshine MP3 Shine. Shine MP3 . (FPU) armel . LAME . . CBR . ( ) . Savonet/Liquidsoap . libshine . "--enable-libshine" . libmp3lame . (Options) libshine . shineenc . b (-b) CBR. -b shineenc . libtwolame TwoLAME MP2. libtwolame . "--enable-libtwolame" . (Options) libtwolame . twolame FFmpeg . b (-b) CBR. b twolame . 128k . q (-V) VBR. -50 50 -10 10 . ffmpeg . global_quality . mode (--mode) . : auto . . stereo joint_stereo dual_channel mono psymodel (--psyc-mode) . -1 4 ( ) . . 3 . energy_levels (--energy) 1 . 0 (). error_protection (--protect) 1 CRC . 0 (). copyright (--copyright) 1 MPEG . 0 (). original (--original) 1 MPEG . 0 (). libvo-amrwbenc VisualOn (Adaptive Multi-Rate Wideband). libvo-amrwbenc . "--enable-libvo-amrwbenc --enable-version3" . . 16000 strict unofficial . (Options) b . libavcodec : 6600 8850 12650 14250 15850 18250 19850 23050 23850 dtx 1 ( ) . 0 (). libvorbis libvorbis. libvorbisenc . "--enable-libvorbis" . (Options) libvorbis . oggenc . libvorbis libvorbisenc oggenc . oggenc(1) . b (-b) ABR. oggenc -b . q (-q) VBR. -1.0 10.0 . . 3.0 . ffmpeg . global_quality . cutoff (--advanced-encode-option lowpass_frequency=N) 0 . oggenc . 0 ( ). minrate (-m) . oggenc -m . maxrate (-M) . oggenc -M . ABR . iblock (--advanced-encode-option impulse_noisetune=N) . -15.0 0.0 . . . mjpeg Motion JPEG. (Options) huffman . : default . . optimal . wavpack WavPack. (Options) wavpack . (Shared options) . . (Codec Options) . frame_size (--blocksize) 128 131072 . . libavcodec/wavpackenc.c . compression_level (-f, -h, -hh, and -x) (Private options) joint_stereo (-j) . : on (1) /. off (0) /. auto . optimize_mono . . : on off VIDEO ENCODERS . a64_multi, a64_multi5 A64 / (Commodore 64). "a64_multi5" (colram) . Cinepak Cinepak CVID. 3.1 MacOS (Vintage). (Options) g integer . "-g" . q:v integer . . akiyo_cif.y4m "-q:v" "-g 100" : "-q:v 1" 1918 kb/s "-q:v 2" 1735 kb/s "-q:v 4" 1500 kb/s "-q:v 10" 1041 kb/s "-q:v 20" 826 kb/s "-q:v 40" 553 kb/s "-q:v 100" 394 kb/s "-q:v 200" 312 kb/s "-q:v 400" 266 kb/s "-q:v 1000" 237 kb/s max_extra_cb_iterations integer (Codebook) . skip_empty_cb boolean MacOS. max_strips integer min_strips integer . . . . 1..3 . strip_number_adaptivity integer . . ffv1 FFv1 (Options) FFv1 FFmpeg . context 0 () 1 . coder : rice - (Golomb rice) range_def (Range coder) range_tab slicecrc -1 ( ) 1 crc 2 crc qtable default 8bit greater8bit > remap_optimizer 0 5 3 . GIF / GIF. (Options) gifflags integer GIF. offsetting (Picture Offsetting) . . transdiff . . gifimage integer GIF GIF . 0 . global_palette integer GIF . . 1 . Hap Vidvox Hap. (Options) format integer Hap . hap hap_alpha hap_q hap . chunks integer () 1 64 . . . 1 . compressor integer . none chunks 1 . none snappy snappy . jpeg2000 jpeg 2000 "-q:v" . "-pred 1" . (Options) format integer "j2k" "jp2" () rgb . tile_width integer . 1 1073741824 . 256 . tile_height integer . 1 1073741824 . 256 . pred integer (DWT) : dwt97int (Lossy) dwt53 (Lossless) "dwt97int" . sop boolean SOP . . eph boolean EPH . . prog integer (Progression Order) . : lrcp rlcp rpcl pcrl cprl "lrcp" . layer_rates string . . . "l" "l" . : ffmpeg -i input.bmp -c:v jpeg2000 -layer_rates "100,10,1" output.j2k . librav1e rav1e AV1. rav1e . "--enable-librav1e" . (Options) qmax . qmin . qp (0-255) . speed (0-10) . tiles . tile-rows . tile-columns . rav1e-params rav1e key=value ":". rav1e --help . librav1e -rav1e-params: ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4 libaom-av1 libaom AV1. libaom . "--enable-libaom" . (Options) libavcodec : b . . maxrate minrate crf . g keyint_min . GOP (Intra- only) . GOP . . qmin qmax / . 0 63 (: AV1 - ). min/max ( ) . minrate maxrate bufsize rc_init_occupancy . - . threads . tiles row-mt . . profile . (Chroma subsampling) . : cpu-used . 0 8 . 1 . auto-alt-ref . . arnr-max-frames (frames) altref. -1 . arnr-strength (strength) altref. -1 6 . -1 . aq-mode (aq-mode) . : none (0) . variance (1) . complexity (2) . cyclic (3) . tune (tune) (Tune) . "psnr" . psnr (0) ssim (1) lag-in-frames . . error-resilience : default . . crf ( ) ( ). 0 63 . . static-thresh . ( ). drop-threshold . - . ( ). denoise-noise-level (level) . 0 . denoise-block-size (pixels) . AV1 32 . undershoot-pct (pct) () . -1 100 . -1 . overshoot-pct (pct) () . -1 1000 . -1 . minsection-pct (pct) GOP . minsection-pct libaomenc : "(minrate * 100 / bitrate)". -1 100 . -1 (). maxsection-pct (pct) GOP . maxsection-pct libaomenc : "(maxrate * 100 / bitrate)". -1 5000 . -1 (). frame-parallel (boolean) . true . tiles x . . ( 4K 4K 1x1 ). tile-columns tile-rows log2 . libvpx/VP9 . row-mt (Requires libaom >= 1.0.0-759-g90a15f4f2) . . enable-cdef (boolean) (CDEF). libaom-av1 CDEF . enable-restoration (boolean) (Loop Restoration Filter). libaom-av1 true . enable-global-motion (boolean) . true . enable-intrabc (boolean) . (Screen Content) . true . enable-rect-partitions (boolean) (Requires libaom >= v2.0.0) . true . enable-1to4-partitions (boolean) (Requires libaom >= v2.0.0) :/:. true . enable-ab-partitions (boolean) (Requires libaom >= v2.0.0) AB. true . enable-angle-delta (boolean) (Requires libaom >= v2.0.0) . true . enable-cfl-intra (boolean) (Requires libaom >= v2.0.0) (CfL). true . enable-filter-intra (boolean) (Requires libaom >= v2.0.0) . true . enable-intra-edge-filter (boolean) (Requires libaom >= v2.0.0) . true . enable-smooth-intra (boolean) (Requires libaom >= v2.0.0) . true . enable-paeth-intra (boolean) (Requires libaom >= v2.0.0) . true . enable-palette (boolean) (Requires libaom >= v2.0.0) . true . enable-flip-idtx (boolean) (Requires libaom >= v2.0.0) FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST, ADST_FLIPADST, FLIPADST_ADST, IDTX, V_DCT, H_DCT, V_ADST, H_ADST, V_FLIPADST, H_FLIPADST. true . enable-tx64 (boolean) (Requires libaom >= v2.0.0) (64-pt). true . reduced-tx-type-set (boolean) (Requires libaom >= v2.0.0) . false . use-intra-dct-only (boolean) (Requires libaom >= v2.0.0) DCT INTRA. false . use-inter-dct-only (boolean) (Requires libaom >= v2.0.0) DCT INTER. false . use-intra-default-tx-only (boolean) (Requires libaom >= v2.0.0) INTRA. false . enable-ref-frame-mvs (boolean) (Requires libaom >= v2.0.0) . true . enable-reduced-reference-set (boolean) (Requires libaom >= v2.0.0) . false . enable-obmc (boolean) (Requires libaom >= v2.0.0) (OBMC). true . enable-dual-filter (boolean) (Requires libaom >= v2.0.0) . true . enable-diff-wtd-comp (boolean) (Requires libaom >= v2.0.0) . true . enable-dist-wtd-comp (boolean) (Requires libaom >= v2.0.0) . true . enable-onesided-comp (boolean) (Requires libaom >= v2.0.0) . true . enable-interinter-wedge (boolean) (Requires libaom >= v2.0.0) -. true . enable-interintra-wedge (boolean) (Requires libaom >= v2.0.0) - . true . enable-masked-comp (boolean) (Requires libaom >= v2.0.0) . true . enable-interintra-comp (boolean) (Requires libaom >= v2.0.0) - . true . enable-smooth-interintra (boolean) (Requires libaom >= v2.0.0) - . true . aom-params libaom key=value ":". "AV1 Specific Options" aomenc --help . libaom -aom-params: ffmpeg -i input -c:v libaom-av1 -b:v 500K -aom-params tune=psnr:enable-tpl-model=1 output.mp4 liboapv (Advanced Professional Video). liboapv . --enable-liboapv . liboapv FFmpeg . apv . (Options) liboapv . liboapv liboapv . preset [fastest, fast, medium, slow, placebo, default] qp CQP. oapv-params (parse_apv_params) liboapvenc key=value <<:>> . liboapv . libsvtav1 SVT-AV1. SVT-AV1 . "--enable-libsvtav1" . (Options) profile . main high professional level (operating point level). : '4.0' hielevel . 3level 4level . tier (operating point tier). main . high qmax . qmin . crf crf ( 0 63). qp cqp ( 0 63). sc_detection . la_depth (0-120). preset 0 13. . tile_rows log2 (0-6). tile_columns log2 (0-4). svtav1-params SVT-AV1 key=value <<:>> . SVT-AV1 . libsvtjpegxs SVT-JPEG-XS. SVT-JPEG-XS . "--enable-libsvtjpegxs" . (Options) decomp_v decomp_h quantization . deadzone uniform coding-signs disable fast full coding-sigf coding-vpred disable no_residuals no_coeffs libjxl JPEG XL libjxl. libjxl . "--enable-libjxl" . (Options) libjxl : distance Butteraugli. : distance=1.0 libjpeg . distance=0.0 . 0.0 15.0 5.0 . distance=0.1 . 1.0 . effort (effort) . (quality/bpp) . 1 9 7 . modular (Modular) . VarDCT Modular . VarDCT Modular . libkvazaar Kvazaar H.265/HEVC. libkvazaar . --enable-libkvazaar . (Options) b . kvazaar-params kvazaar name=value (,) . kvazaar . libopenh264 Cisco libopenh264 H.264/MPEG-4 AVC. libopenh264 . "--enable-libopenh264" . pkg-config . . (Options) FFmpeg libopenh264 . b ( ). g GOP. maxrate ( ). flags +global_header . slices (slices) . 0 . slice_mode fixed . loopfilter (loop filter) 1 ( ). 0 . profile . main CABAC ( "SEncParamExt.iEntropyCodingModeFlag" 1). max_nal_size NAL . allow_skip_frames 1. libtheora libtheora Theora. libtheora . "--enable-libtheora" . libtheora . (Options) libtheora . b CBR ( ). VBR ( ) . flags (VBR) qscale "pass1" "pass2" . g GOP. global_quality (lambda units). VBR "flags +qscale" . "FF_QP2LAMBDA" QP [0 - 10] 6.3 libtheora [0-63] . . q VBR QP. [0-10] 6.3 libtheora [0-63] . ffmpeg . global_quality . (Examples) o (VBR) ffmpeg: ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg o ffmpeg Theora CBR 1000 kbps: ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg libvpx VP8/VP9 libvpx. libvpx . "--enable-libvpx" . (Options) libvpx . vpxenc . . (Codec Options) . libvpx ffmpeg -h encoder=libvpx ffmpeg -h encoder=libvpx-vp9 vpxenc --help . (API) libvpx . b (target-bitrate) . b FFmpeg target-bitrate vpxenc . g (kf-max-dist) keyint_min (kf-min-dist) qmin (min-q) ( ). qmax (max-q) ( ). . bufsize (buf-sz, buf-optimal-sz) ( ). vpxenc libvpx : "buf-sz = bufsize * 1000 / bitrate" "buf-optimal-sz = bufsize * 1000 / bitrate * 5 / 6". rc_init_occupancy (buf-initial-sz) rc . vpxenc libvpx : "rc_init_occupancy * 1000 / bitrate". undershoot-pct (undershoot) . overshoot-pct (overshoot) . skip_threshold (drop-frame) qcomp (bias-pct) maxrate (maxsection-pct) GOP . vpxenc libvpx : "(maxrate * 100 / bitrate)". minrate (minsection-pct) GOP . vpxenc libvpx : "(minrate * 100 / bitrate)". minrate, maxrate, b end-usage=cbr "(minrate == maxrate == bitrate)". crf (end-usage=cq, cq-level) tune (tune) psnr (psnr) ssim (ssim) quality, deadline (deadline) best . good . good . cpu-used . realtime (realtime). speed, cpu-used (cpu-used) /. . nr (noise-sensitivity) static-thresh (skip) . slices (token-parts) slices FFmpeg token-parts vpxenc log2(partitions) . max-intra-rate I . 0 . force_key_frames "VPX_EFLAG_FORCE_KF" Alternate reference frame related auto-alt-ref ( 2-pass). ( VP9). arnr-maxframes altref. arnr-type altref: backward forward centered. arnr-strength altref. rc-lookahead, lag-in-frames (lag-in-frames) . min-gf-interval / ( VP9). error-resilient (error resiliency). sharpness integer (sharpness) PSNR. [0, 7] . ts-parameters key=value <<:>>. "ffmpeg": ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\ ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\ ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT "struct vpx_codec_enc_cfg" "vpx/vpx_encoder.h" . ts_number_layers . ts_target_bitrate ( ). ( ). ts_rate_decimator . ts_periodicity . ts_layer_id . ts_layering_mode () . . 0 "metadata" "AVFrame" . vp8-flags . "vpx_codec_encode" "vpx/vpx_encoder.h" . temporal_id . 2 . 0-1... 3 . 0-2-1-2... . 4 "3" . VP8-specific options screen-content-mode : 0 () 1 ( ) 2 ( ). VP9-specific options lossless . tile-columns . log2(tile_columns) . tile-columns . tile-rows . log2(tile_rows) . tile-rows . frame-parallel . aq-mode (0: () 1: 2: 3: cyclic refresh 4: equator360). colorspace color-space . VP9 : rgb sRGB bt709 bt709 unspecified unknown bt470bg bt601 smpte170m smpte170 smpte240m smpte240 bt2020_ncl bt2020 row-mt boolean . tune-content : (0) (1) (2). corpus-complexity Corpus VBR VBR . [0, 10000] . 0 () VBR . enable-tpl boolean . ref-frame-config "vpx_svc_ref_frame_config_t" "vpx/vp8cx.h" . key=value <<:>> . av_dict_set(&av_frame->metadata, "ref-frame-config", \ "rfc_update_buffer_slot=7:rfc_lst_fb_idx=0:rfc_gld_fb_idx=1:rfc_alt_fb_idx=2:rfc_reference_last=0:rfc_reference_golden=0:rfc_reference_alt_ref=0"); rfc_update_buffer_slot rfc_update_last LAST rfc_update_golden GOLDEN rfc_update_alt_ref ALT_REF rfc_lst_fb_idx LAST rfc_gld_fb_idx GOLDEN rfc_alt_fb_idx ALT_REF rfc_reference_last LAST rfc_reference_golden GOLDEN rfc_reference_alt_ref ALT_REF rfc_reference_duration libvpx : libvvenc VVenC H.266/VVC. libvvenc . --enable-libvvenc . VVenC . (Supported Pixel Formats) VVenC . () . (Options) b . g GOP. g=1 ( Intra only) . preset VVenC. levelidc level idc. tier tier vvc. qp . subopt boolean ( ). 1 () . bitdepth8 boolean . 0 () . period (intra refresh) . vvenc-params vvenc key=value <<:>> . vvencapp --fullhelp vvencFFapp --fullhelp . : intraperiod=64:decodingrefreshtype=idr:poc0idr=1:internalbitdepth=8 -vvenc-params : ffmpeg -i input -c:v libvvenc -b 1M -vvenc-params intraperiod=64:decodingrefreshtype=idr:poc0idr=1:internalbitdepth=8 output.mp4 libwebp libwebp WebP libwebp WebP . (lossy) (lossless) . VP8 . . (Pixel Format) libwebp libwebp YUV420 RGB . . API RGB YUV libwebp . . (Options) -lossless boolean / . 0 . -compression_level integer / . . / . . . method libwebp . 0 6 . 4 . -quality float . . 0 100 . 75 . -preset type . . none . default . picture photo drawing icon text libx264, libx264rgb x264 H.264/MPEG-4 AVC. libx264 . "--enable-libx264" . libx264 8x8 4x4 B CAVLC/CABAC (MBAFF) (psy) ( psy-RD psy-trellis). libx264 FFmpeg . x264opts x264-params key=value "x264_param_parse" libx264 . x264 . libx264rgb libx264 YUV RGB (packed) . (Supported Pixel Formats) x264 . x264 . (Options) libx264 . x264 . . (Codec Options) . libx264 x264 --fullhelp libx264 . x264 libavcodec . b (bitrate) . b FFmpeg bitrate x264 . bf (bframes) B I P g (keyint) GOP qmin (qpmin) qmax (qpmax) qdiff (qpstep) qblur (qblur) qcomp (qcomp) refs (ref) P . 0-16 . level (level) "x264_param_t.i_level_idc" . API "AVCodecContext" ( "AVCodecContext") ( 31 IDC <<3.1>> H.264 "x264_levels" ). . "AVCodecContext" IDC ( <<3.1>>) A H.264 . sc_threshold (scenecut) . trellis (trellis) Trellis . . nr (nr) me_range (merange) . me_method (me) . : dia (dia) epzs (dia) (). epzs dia . hex (hex) . umh (umh) . esa (esa) . tesa (tesa) (). forced-idr I I . IDR . subq (subme) . b_strategy (b-adapt) B. (first-pass) . keyint_min (min-keyint) GOP. coder . : ac CABAC. vlc CAVLC CABAC. --no-cabac x264 . cmp . : chroma . sad . --no-chroma-me x264 . threads (threads) . thread_type . : slice . --sliced-threads x264 . frame . flags . GOP GOP "-cgop" . --open-gop x264 . rc_init_occupancy (vbv-init) VBV preset (preset) . tune (tune) . profile (profile) . fastfirstpass 1. 0 --slow-firstpass x264 . crf (crf) . crf_max (crf-max) CRF VBV . qp (qp) . aq-mode (aq-mode) AQ. : none (0) . variance (1) AQ ( ). autovariance (2) AQ (). aq-strength (aq-strength) AQ . psy 1. 0 --no-psy x264 . psy-rd (psy-rd) psy-rd:psy-trellis. rc-lookahead (rc-lookahead) . weightb B 1. 0 --no-weightb x264 . weightp (weightp) P. : none (0) simple (1) smart (2) ssim (ssim) SSIM . intra-refresh (intra-refresh) IDR 1. avcintra-class (class) AVC-Intra. 50 100 200 . bluray-compat (bluray-compat) . "bluray-compat=1 force-cfr=1" . b-bias (b-bias) B. b-pyramid (b-pyramid) B . : none (none) . strict (strict) . normal (normal) ( ). mixed-refs 1. 0 --no-mixed-refs x264 . 8x8dct ( 8x8 ) 1. 0 x264's --no-8x8dct . fast-pskip SKIP P 1. 0 x264's --no-fast-pskip . aud (aud) 1. mbtree 1. 0 x264's --no-mbtree . deblock (deblock) alpha:beta. cplxblur (cplxblur) QP ( ). partitions (partitions) . : p8x8 8x8 P. p4x4 4x4 P. b8x8 4x4 B. i8x8 8x8 I. i4x4 4x4 I. ( p4x4 p8x8 . i8x8 ( 8x8dct) .) none (none) . all (all) . direct-pred (direct) . : none (none) . spatial (spatial) . temporal (temporal) . auto (auto) . slice-max-size (slice-max-size) . RTP (ps) . stats (stats) . nal-hrd (nal-hrd) HRD ( vbv-bufsize ). : none (none) HRD. vbr (vbr) . cbr (cbr) ( MP4 ). x264opts opts x264-params opts x264 key=value <<:>>. key=value <<:>> . x264opts 1 . filter psy-rd <<:>> <<,>> . . : level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 libx264 ffmpeg: ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv libx264 x264 --fullhelp libx264 . a53cc boolean ( ATSC ) . mpeg2 h264 . 1 () . udu_sei boolean SEI . 0 () . mb_info boolean mb_info AVFrameSideData API . 0 () . ffpresets ( pre). libx265 x265 H.265/HEVC. libx265 . --enable-libx265 . (Options) b . bf g GOP. keyint_min GOP. refs P . 1-16 . preset x265. tune x265. profile . crf . qp . qmin . qmax . qdiff . qblur qcomp i_qfactor b_qfactor forced-idr I I . IDR . x265-stats (2-pass). -passlogfile . udu_sei boolean SEI . 0 () . x265-params x265 key=value <<:>>. x265 --help . libx265 -x265-params: ffmpeg -i input -c:v libx265 -x265-params crf=26:psy-rd=1 output.mp4 libxavs2 xavs2 AVS2-P2/IEEE1857.4. libxavs2 . --enable-libxavs2 . libavcodec : o b / bit_rate o g / gop_size o bf / max_b_frames : (Options) lcu_row_threads 1 8 ( 5). initial_qp xavs2 1 63 ( 34). qp . qp xavs2 1 63 ( 34). qp QP (constant-QP) . max_qp qp 1 63 ( 55). min_qp qp 1 63 ( 20). speed_level 0 9 ( 0). . log_level -1 3 ( 0). : -1: 0: 1: 2: 3: . xavs2-params xavs2 key=value <<:>>. libxavs2 -xavs2-params: ffmpeg -i input -c:v libxavs2 -xavs2-params RdoqLevel=0 output.avs2 libxeve MPEG-5 EVC (XEVE). xeve . libxeve . --enable-libxeve . libxeve FFmpeg . xeve-params key=value "parse_xeve_params" libxeve . xeve . (Options) libxeve . xeve . . (Codec Options) . libxeve "xeve_app --help" libxeve . b (bitrate) . b FFmpeg xeve . bf (bframes) B ( 1, 3, 7, 15). g (keyint) GOP ( I). preset (preset) xeve. [fast, medium, slow, placebo] tune (tune) [psnr, zerolatency] profile (profile) [0: baseline 1: main] crf (crf) . <10..49> [: 32] qp (qp) . qp <0..51> [: 32] threads (threads) libxvid Xvid MPEG-4 Part 2. libxvidcore . "--enable-libxvid --enable-gpl" . "mpeg4" MPEG-4 Part 2 . (Options) libxvid . . (Codec Options) . libxvid . b g qmin qmax mpeg_quant threads bf b_qfactor b_qoffset flags . : mv4 . aic AC . gray (). qpel . cgop GOP . global_header (extradata) . gmc (GMC). 0 () . me_quality . : 0 (). 1, 2 16x16 16x16. 3, 4 8x8 8x8 P B. 5, 6 16x16 8x8. mbd . : simple (). bits 16x16. rd 8x8 . lumi_aq (lumi masking) 1. 0 () . variance_aq 1. 0 () . lumi_aq . . trellis . ssim (SSIM). : off SSIM. avg SSIM stdout. SSIM : Average SSIM: %f C %f ( 0.939232). frame SSIM SSIM stdout. : SSIM: avg: %1.3f min: %1.3f max: %1.3f C %1.3f ( 0.932). ssim_acc SSIM. 0-4 0 4 . MediaCodec MediaCodec . H.264 H.265 (HEVC) VP8 VP9 MPEG-4 AV1 ( ). API : Java MediaCodec NDK MediaCodec. MediaCodec . API MediaCodec JVM JVM . ndk_codec boolean API MediaCodec API . av_jni_get_java_vm() NULL . ndk_async boolean NDK MediaCodec (async). (poll) . AV_CODEC_FLAG_GLOBAL_HEADER ( bsf extract_extradata ). . . codec_name string backend ( API createCodecByName MediaCodec). NULL createEncoderByType . bitrate_mode integer : cq vbr cbr cbr_fd pts_as_dts boolean PTS DTS. API . B 0 . operating_rate integer . / ( 30fps) ( 240fps). . qp_i_min integer I. qp_p_min integer P. qp_b_min integer B. qp_i_max integer I. qp_p_max integer P. qp_b_max integer B. MediaFoundation MediaFoundation : * * * . nv12 yuv420p ( -- nv12 ). D3D11 scale_d3d11. MediaFoundation : ffmpeg -h encoder= ffmpeg -h encoder=h264_mf (Options) rate_control . : default cbr CBR pc_vbr VBR (Peak constrained) u_vbr VBR (Unconstrained) quality ld_vbr VBR ( +) g_vbr VBR ( +) gld_vbr VBR ( +) scenario . : default display_remoting ( ) video_conference archive live_streaming camera_record display_remoting_with_feature_map quality (0-100). -1 . hw_encoding (0-1). 0 () . (Examples) : ffmpeg -i input.mp4 -c:v h264_mf -hw_encoding 1 output.mp4 : ffmpeg -hwaccel d3d11va -i input.mp4 -c:v h264_mf -hw_encoding 1 output.mp4 : ffmpeg -hwaccel d3d11va -hwaccel_output_format d3d11 -i input.mp4 -vf scale_d3d11=1920:1080 -c:v hevc_mf -hw_encoding 1 -quality 80 output.mp4 Microsoft RLE Microsoft RLE MSRLE. . Windows 3.1 Windows 95. (Options) g integer . "-g" . mpeg2 MPEG-2. (Options) profile mpeg2 : 422 high ss (Spatially Scalable) snr (SNR Scalable) main simple level mpeg2 : high high1440 main low seq_disp_ext integer sequence_display_extension . -1 auto ( ) . 0 never . 1 always . video_format integer video_format (sequence display extension) . unspecified component pal ntsc secam mac . component . a53cc boolean ( ATSC ) . 1 () . png PNG. (Options) compression_level 0 9 () (Private options) dpi integer (DPI) dpm integer (DPM) pred method (none, sub, up, avg, paeth, mixed) paeth ProRes Apple ProRes. FFmpeg ProRes : prores-aw prores-ks. "-vcodec" . prores-ks (Private Options for prores-ks) profile integer ProRes proxy lt standard hq 4444 4444xq quant_mat integer . auto default proxy lt standard hq auto . default . bits_per_mb integer . . mbs_per_slice integer (1-8) (8) . vendor string . apl0 . alpha_bits integer . 0 8 16 . 0 . (Speed considerations) ( ) . . bits_per_mb . qscale ( ) . QSV Encoders Intel QuickSync Video (MPEG-2, H.264, HEVC, JPEG/MJPEG, VP9, AV1) (Ratecontrol Method) : o global_quality . : - CQP - qscale ( -qscale ffmpeg). - LA_ICQ - (lookahead) look_ahead . - ICQ -- . ICQ . o b : - LA - VBR look_ahead . - VCM - vcm . - CBR - maxrate . - VBR - maxrate . - AVBR - VBR maxrate avbr_accuracy avbr_convergence . H264 HEVC . o CQP . . (verbosity) verbose QSV . -> MSDK (Global Options -> MSDK Options) libavcodec MSDK : o g/gop_size -> GopPicSize o bf/max_b_frames+1 -> GopRefDist o rc_init_occupancy/rc_initial_buffer_occupancy -> InitialDelayInKB o slices -> NumSlice o refs -> NumRefFrame o b_strategy/b_frame_strategy -> BRefType o cgop/CLOSED_GOP -> GopOptFlag o CQP i_qfactor/i_qoffset b_qfactor/b_qoffset QPP QPI QPP QPB . o coder vlc H.264 CABAC CAVLC . (Common Options) qsv . async_depth . . preset veryfast ( ) veryslow ( ) . veryfast faster fast medium slow slower veryslow forced_idr I IDR. low_power ON GPU . (Runtime Options) qsv . global_quality i_quant_factor i_quant_offset b_quant_factor b_quant_offset h264_qsv hevc_qsv . qp qsv . max_frame_size h264_qsv hevc_qsv . MaxFrameSize qsv . gop_size gop qsv . int_ref_type int_ref_cycle_size int_ref_qp_delta int_ref_cycle_dist h264_qsv hevc_qsv . (Intra Refresh) qsv . qmax qmin max_qp_i min_qp_i max_qp_p min_qp_p max_qp_b min_qp_b h264_qsv . max/min qp qsv . low_delay_brc h264_qsv hevc_qsv av1_qsv . low_delay_brc qsv . framerate framerate qsv . bit_rate rc_buffer_size rc_initial_buffer_occupancy rc_max_rate qsv . pic_timing_sei h264_qsv hevc_qsv . pic_timing_sei qsv . qsv_params QSV - . qsv_params "key1=value1:key2=value2:..." . MFXSetParameter Intel Quick Sync Video (QSV) . : ffmpeg -i input.mp4 -c:v h264_qsv -qsv_params "CodingOption1=1:CodingOption2=2" output.mp4 QSV . H264 (H264 options) h264_qsv extbrc . recovery_point_sei SEI . rdo . max_frame_size . max_frame_size_i I . I max_frame_size . max_frame_size_p P . P max_frame_size . max_slice_size . bitrate_limit . QSV . HRD . QSV . CQP : QSV . mbbrc . . low_delay_brc LowDelayBRC qsv . : -1- 0- 1- adaptive_i I QSV . (ON) P B I . adaptive_b B P . p_strategy P: 0- 1- 2- (bf 0 ). b_strategy B . dblk_idc (deblocking) . 0~2 . cavlc CAVLC CABAC . vcm . idr_interval ( I) IDR. pic_timing_sei SEI pic_struct_syntax. single_sei_nal_unit SEI NALU . max_dec_frame_buffering DPB. look_ahead VBR . look_ahead_depth . look_ahead_downsampling . unknown auto off 2x 4x int_ref_type (intra refresh). I . SDK MB . none . vertical MB . horizontal MB . slice . slice in_ref_cycle_size . B 0 . int_ref_cycle_size . . int_ref_qp_delta QP MB . [-51, 51] [-63, 63] [-75, 75] . int_ref_cycle_dist . profile unknown baseline main high a53cc A53 Closed Captions ( ). aud NAL . mfmode (Multi-Frame Mode). off auto repeat_pps pps . max_qp_i I. min_qp_i I. max_qp_p P. min_qp_p P. max_qp_b B. min_qp_b B. scenario . unknown displayremoting videoconference archive livestreaming cameracapture videosurveillance gamestreaming remotegaming avbr_accuracy AVBR ( ). avbr_convergence AVBR ( ) avbr_accuracy avbr_convergence (AVBR) . target_bitrate avbr_accuracy avbr_Convergence . HRD . skip_frame "qsv_skip_frame" . . no_skip . insert_dummy (skipped) . insert_nothing insert_dummy . brc gop . brc_only skip_frame . HEVC (HEVC Options) hevc_qsv extbrc . recovery_point_sei SEI . rdo . max_frame_size . max_frame_size_i I . I max_frame_size . max_frame_size_p P . P max_frame_size . max_slice_size . mbbrc . . low_delay_brc LowDelayBRC qsv . : -1- 0- 1- adaptive_i I QSV . (ON) P B I . adaptive_b B P . p_strategy P: 0- 1- 2- (bf 0 ). b_strategy B . dblk_idc (deblocking) . 0~2 . idr_interval ( I) IDR. begin_only IDR . load_plugin . none hevc_sw hevc_hw load_plugins (UID) <<:>> . look_ahead_depth extbrc. profile ( scc libmfx >= 1.32 ). unknown main main10 mainsp rext scc tier ( level >= 4 high tier ). level . main high gpb 1: GPB ( P/B) 0: P. tile_cols (tiled encoding). tile_rows . aud NAL . pic_timing_sei SEI pic_struct_syntax. transform_skip ON transformskip . ICL . int_ref_type (intra refresh). I . SDK MB . none . vertical MB . horizontal MB . slice . slice in_ref_cycle_size . B 0 . int_ref_cycle_size . . int_ref_qp_delta QP MB . [-51, 51] [-63, 63] [-75, 75] . int_ref_cycle_dist . max_qp_i I. min_qp_i I. max_qp_p P. min_qp_p P. max_qp_b B. min_qp_b B. scenario . unknown displayremoting videoconference archive livestreaming cameracapture videosurveillance gamestreaming remotegaming avbr_accuracy AVBR ( ). avbr_convergence AVBR ( ) avbr_accuracy avbr_convergence (AVBR) . target_bitrate avbr_accuracy avbr_Convergence . HRD . skip_frame "qsv_skip_frame" . . no_skip . insert_dummy (skipped) . insert_nothing insert_dummy . brc gop . brc_only skip_frame . MPEG2 (MPEG2 Options) mpeg2_qsv profile unknown simple main high VP9 (VP9 Options) vp9_qsv profile unknown profile0 profile1 profile2 profile3 tile_cols ( libmfx >= 1.29). tile_rows ( libmfx >= 1.29). AV1 (AV1 Options) av1_qsv ( libvpl). profile unknown main tile_cols . tile_rows . adaptive_i I QSV . (ON) P B I . adaptive_b B P . b_strategy B . extbrc . look_ahead_depth extbrc. low_delay_brc LowDelayBRC qsv . : -1- 0- 1- max_frame_size . QP . CQP . max_frame_size_i I . I max_frame_size . max_frame_size_p P . P max_frame_size . snow (Options) iterative_dia_size (dia size) . VAAPI (VAAPI encoders) VAAPI. VAAPI . hwupload GPU . libavcodec : o g / gop_size o bf / max_b_frames o profile . o level o b / bit_rate o maxrate / rc_max_rate o bufsize / rc_buffer_size o rc_init_occupancy / rc_initial_buffer_occupancy o compression_level / : / . o q / global_quality / : / . o qmin o qmax o i_qfactor / i_quant_factor o i_qoffset / i_quant_offset o b_qfactor / b_quant_factor o b_qoffset / b_quant_offset o slices : low_power / . . idr_interval (intra) (IDR) open-GOP. intra IRAP . b_depth B. () B P I . B . async_depth . . vaSyncBuffer . async_depth hw_frames . max_frame_size . QP . CQP . rc_mode . . : auto . . CQP (Constant-quality). CBR (Constant-bitrate). VBR (Variable-bitrate). ICQ (Intelligent constant-quality). QVBR (Quality-defined variable-bitrate). AVBR (Average variable bitrate). blbrc . CQP . : av1_vaapi profile seq_profile . tier seq_tier . level seq_level_idx . tiles (tiles) columns x rows. ( auto / ). tile_groups . . ( ). h264_vaapi profile profile_idc constraint_set*_flag . level level_idc . coder ( cabac ). : ac cabac CABAC. vlc cavlc CAVLC. aud (access unit delimiters) ( ). sei SEI . : identifier user_data_unregistered . timing ( buffering_period pic_timing). recovery_point ( recovery_point). hevc_vaapi profile level general_profile_idc general_level_idc . aud ( ). tier general_tier_flag. (level) . sei SEI . : hdr HDR ( mastering_display_colour_volume content_light_level). tiles columns x rows. . mjpeg_vaapi DCT . - global_quality ( -). YUV 4:2:0 4:2:2 4:4:4 . RGB JPEG RGB . jfif JFIF ( ). huffman ( ). JPEG MJPEG . mpeg2_vaapi profile level profile_and_level_indication . vp8_vaapi B . global_quality q_idx ( -). loop_filter_level loop_filter_sharpness (loop filter). vp9_vaapi global_quality q_idx P ( -). loop_filter_level loop_filter_sharpness . B . B vp9_raw_reorder . - vp9_superframe . vbn Vizrt (Vizrt Binary Image). Vizrt (texture streaming) . LZW mipmap . (Options) format string VBN . dxt1 dxt5 raw . dxt5 . vc2 SMPTE VC-2 ( BBC Dirac Pro). yuv420 yuv422 yuv444 ( ) ( ) . (Options) b . : ( 1920x1080 50fps yuv422p10 400Mbps ). ( ) . field_order (interlaced) ( tt - ). . wavelet_depth (wavelet transforms) (). . wavelet_depth . wavelet_type . 5_3 (LeGall) 9_7 (Deslauriers-Dubuc) 9_7 . slice_width slice_height (slice) . . slice_width slice_height . tolerance . . qm wavelet_depth . - default . . - flat . PSNR . . - color . (SUBTITLES ENCODERS) dvbsub (bitmap) DVB . MPEG-TS . (Options) min_bpp integer (2, 4, or 8) (bits-per-pixel) (color lookup tables) . DVB . . . dvdsub DVD . VOBSUB (*.idx + *.sub) Matroska . (Options) palette . ( 0x) "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b". even_rows_fix . . . . . lrc LRC . (Options) precision (timestamp) . (Time base) . (centiseconds) . (BITSTREAM FILTERS) FFmpeg . "--list-bsfs" . "--disable-bsfs" "--enable-bsf=BSF" "--disable-bsf=BSF" . "-bsfs" ff* . ff* -bsf '=' . ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT ( ) . aac_adtstoasc MPEG-2/4 AAC ADTS MPEG-4 (Audio Specific Configuration). MPEG-4 AudioSpecificConfig MPEG-2/4 ADTS ADTS . AAC ADTS AAC MPEG-TS MP4A-LATM FLV MOV/MP4 3GP M4A . MP4A-LATM MOV/MP4 . av1_metadata AV1. td OBU (temporal delimiter) . insert TD TU . remove TD TU . color_primaries transfer_characteristics matrix_coefficients ( 6.4.2 AV1 ). color_range ( 6.4.2 AV1 BT.709 sRGB (RGB) ). tv (Limited range). pc (Full range). chroma_sample_position ( 6.4.2 AV1 ). 4:2:0 . vertical ( MPEG-2 H.264). colocated -. tick_rate (time_scale / num_units_in_display_tick) (sequence header). num_ticks_per_picture . tick_rate . delete_padding OBU (Padding OBUs). chomp (packet). dca_core DCA/DTS DTS-HD. dovi_rpu Dolby Vision HEVC/AV1 . strip Dolby Vision ( + RPU) . compression . none . limited . . . extended . . libavcodec limited . dovi_split HEVC (Dolby Vision Profile 7). HEVC (enhancement-layer) NAL (UNSPEC63) RPU NAL (UNSPEC62) . mode Dolby Vision . bl : UNSPEC63 ( EL) UNSPEC62 ( RPU). HEVC Dolby Vision . . bl_rpu NAL RPU. el : NAL UNSPEC63 NAL . HEVC . UNSPEC62 (RPU) . el_rpu NAL RPU. el NAL RPU UNSPEC62 NAL EL . dump_extra extradata extradata . freq . : k keyframe extradata (key packets). e all extradata . k . ffmpeg H.264 "libx264" ( ) extradata : ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts dv_error_marker DV . color . sta . 0xFFFE . ok (concealment). err . res . notok . notres . Aa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru . - 5.5 : eac3_core E-AC-3 . eia608_to_smpte436m "EIA_608" "SMPTE_436M_ANC" (closed captions) CTA-708 CDP VANC. line_number VANC . () . wrapping_type SMPTE 436M vanc_frame . : vanc_frame VANC ( ). vanc_field_1 vanc_field_2 vanc_progressive_frame sample_coding SMPTE 436M 8bit_luma . : 8bit_luma (luma) . 8bit_color_diff . 8bit_luma_and_color_diff . 10bit_luma . 10bit_color_diff . 10bit_luma_and_color_diff . 8bit_luma_parity_error . 8bit_color_diff_parity_error . 8bit_luma_and_color_diff_parity_error . initial_cdp_sequence_cntr "cdp_hdr_sequence_cntr" "cdp_ftr_sequence_cntr" CDP. 0 . cdp_frame_rate "cdp_frame_rate" CDP. CDP . 30000/1001 . extract_extradata extradata (in-band extradata). ( MPEG-2 (VPS/)SPS/PPS H.264/HEVC) <<>> ( ) <<>> ( ) . FFmpeg <> . extradata . remove . filter_units . pass_types . '|' '-' . remove_types pass_types . pass_types remove_types NAL (nal_unit_type) H.264 HEVC H.266 ( 7-1 H.264 HEVC 5 H.266 ) (marker) JPEG ( 0xFF) ( 0x000001) MPEG-2. VP8 VP9 . (Extradata) . NAL VCL H.264: ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT AUD SEI (filler) H.265: ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT MPEG-2 (Closed Captions): ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=178' OUTPUT SEI H264 : ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=6' OUTPUT SEI HEVC HDR : ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=39|40' OUTPUT hapqa_extract Rgb Alpha HAPQA HAPQ HAPAlphaOnly. texture . color alpha HAPQA HAPQ: ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=color -tag:v HapY -metadata:s:v:0 encoder="HAPQ" hapq_file.mov HAPQA HAPAlphaOnly: ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=alpha -tag:v HapA -metadata:s:v:0 encoder="HAPAlpha Only" hapalphaonly_file.mov h264_metadata H.264. aud NAL AUD . pass insert remove pass . sample_aspect_ratio VUI. E-1 H.264 . overscan_appropriate_flag overscan ( E.2.1 H.264 ). video_format video_full_range_flag ( E.2.1 E-2 H.264 ). colour_primaries transfer_characteristics matrix_coefficients ( E.2.1 E-3 E-4 E-5 H.264 ). chroma_sample_loc_type ( E.2.1 E-1 H.264 ). tick_rate (time_scale / num_units_in_tick) VUI. ( ). fixed_frame_rate_flag - ( E.2.1 E-6 H.264 ). zero_new_constraint_set_flags constraint_set4_flag constraint_set5_flag SPS. H.264 . . crop_left crop_right crop_top crop_bottom SPS. . . ( 7.4.2.1.1 H.264 ). sei_user_data SEI (unregistered user data). UUID+string UUID . 086f3693-b7b3-4f2c-9653-21492feee5b8+hello <> UUID . delete_filler NAL SEI. display_orientation SEI (Display orientation). D.1.27 D.2.27 H.264 . pass insert remove extract pass . (insert) "rotate" "flip" . insert remove . (extract) (side data) . rotate SEI ( ). -360 +360 . NaN . flip (flip) SEI . horizontal vertical . level (level) SPS. A.3 A-1 A-5 H.264 . ( 4.2) level_idc ( 42) auto . h264_mp4toannexb H.264 (length prefixed) (start code prefixed) B ITU-T H.264. MPEG-2 ( "mpegts") . MP4 H.264 mpegts ffmpeg : ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts MPEG-TS ( "mpegts") H.264 ( "h264") . h264_redundant_pps H264 - BDMV PPS . PPS extradata . PPS QP . PPS . (seeking) PPS . (BSF) PPS PPS . hevc_metadata HEVC. aud NAL AUD . insert remove sample_aspect_ratio VUI . video_format video_full_range_flag ( E.3.1 E.2 H.265 ). colour_primaries transfer_characteristics matrix_coefficients ( E.3.1 E.3 E.4 E.5 H.265 ). chroma_sample_loc_type ( E.3.1 E.1 H.265 ). tick_rate VPS VUI (time_scale / num_units_in_tick). num_ticks_poc_diff_one . . num_ticks_poc_diff_one poc_proportional_to_timing_flag VPS VUI num_ticks_poc_diff_one_minus1 ( 7.4.3.1 E.3.1 H.265 ). tick_rate . crop_left crop_right crop_top crop_bottom (conformance window) SPS. . . ( 7.4.3.2.1 H.265). width height . level (level) VPS SPS. A.4 A.6 A.7 H.265 . ( 5.1) general_level_idc ( 153 5.1) auto . hevc_mp4toannexb HEVC/H.265 ( B ITU-T H.265 ). MPEG-2 ( "mpegts") . MP4 HEVC mpegts ffmpeg : ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts MPEG-TS ( "mpegts") HEVC/H.265 ( "h265" "hevc") . imxdump MOV Final Cut Pro . mpeg2video Final Cut Pro 7 -tag:v . NTSC IMX MOV: ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov mjpeg2jpeg MJPEG/AVI1 JPEG/JFIF. MJPEG JPEG . : ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg JPEG DHT . : (Avery Lee) rec.video.desktop : < MJPEG AVI (fourcc) MJPG JPEG -- ** -- . JPEG YCbCr 4:2:2 . . . . MJPEG JPEG DHT . OpenDML .>> MJPEG ( AVI1 DHT ) JPEG . ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg exiftran -i -9 frame*.jpg ffmpeg -i frame_%d.jpg -c:v copy rotated.avi mjpegadump MJPEG A Quicktime. mov2textsub MOV . text2movsub . mpeg2_metadata MPEG-2. display_aspect_ratio . : 4/3 16/9 221/100 ( 6.3.3 6-3 H.262 ). frame_rate . - ( 6.3.3 6-4 H.262 ). video_format ( 6.3.6 6-6 H.262 ). colour_primaries transfer_characteristics matrix_coefficients ( 6.3.6 6-7 6-8 6-9 H.262 ). mpeg4_unpack_bframes B DivX. B DivX MPEG-4 Video for Windows . AV CPU ( 2,0,2,0 ) mp4 mpeg-ps/ts MPEG-4 MPEG-4 . AVI MPEG-4 B DivX ffmpeg : ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi noise (drop). (fuzzing) / . : amount . . 0 . amount drop amount -1 . . drop . . . 0 . . dropamount . 0 . drop "dropamount=4" "drop=-4" . drop . "amount" "drop" : n . tb (timebase) . pts (presentation timestamp) . dts (decoding timestamp) . nopts AV_NOPTS_VALUE. startpts PTS AV_NOPTS_VALUE . startdts DTS AV_NOPTS_VALUE . duration d . pos -1 . size . key (keyframe) . state . (Examples) : ffmpeg -i INPUT -c copy -bsf noise=1 output.mkv : ffmpeg -i INPUT -c copy -bsf:v noise=drop='gt(pts*tb\,30)*not(key)' output.mkv : ffmpeg -i INPUT -c copy -bsf:a noise=amount=-1:drop='between(mod(pts*tb\,10)\,9\,10)' output.mkv null . pcm_rechunk PCM . asetnsamples . nb_out_samples, n . . 1024 . pad, p (pad) ( frame_rate ) . 1 . frame_rate, r . . nb_out_samples . frame_rate 1602-1601-1602-1601-1602 48kHz NTSC : ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc - pgs_frame_merge PGS << >> (end of display set) . PGS ( "matroska") . prores_metadata prores. color_primaries (color primaries). : auto (). unknown bt709 bt470bg BT601 625 smpte170m BT601 525 bt2020 smpte431 DCI P3 smpte432 P3 D65 transfer_characteristics (color transfer). : auto (). unknown bt709 BT 601, BT 709, BT 2020 smpte2084 SMPTE ST 2084 arib-std-b67 ARIB STD-B67 matrix_coefficients (matrix coefficient). : auto (). unknown bt709 smpte170m BT 601 bt2020nc Rec709 : ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov Hybrid Log-Gamma : ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov remove_extra extradata . : freq extradata . k extradata . keyframe extradata . e, all extradata . setts PTS DTS . : ts pts dts PTS DTS . duration (duration). time_base . prescale . 0 . API (eval API) : N . 0. TS "ts" "dts" "pts". POS . DTS . PTS . DURATION . STARTDTS DTS . STARTPTS PTS . PREV_INDTS DTS . PREV_INPTS PTS . PREV_INDURATION . PREV_OUTDTS DTS . PREV_OUTPTS PTS . PREV_OUTDURATION . NEXT_DTS DTS . NEXT_PTS PTS . NEXT_DURATION . TB . prescale . TB_OUT . SR . NOPTS AV_NOPTS_VALUE. PTS DTS ( B ): ffmpeg -i INPUT -c:a copy -bsf:a setts=pts=DTS out.mkv showinfo . . smpte436m_to_eia608 "SMPTE_436M_ANC" "EIA_608" CTA-708 CDP VANC . text2movsub MOV ( "mov_text" ) . mov2textsub . trace_headers (syntax elements) ( ). . AV1 H.264 H.265 (M)JPEG MPEG-2 VP9 . truehd_core TrueHD ATMOS. vp9_metadata VP9. color_space . RGB PC RGB 0 2 . unknown bt601 bt709 smpte170 smpte240 bt2020 rgb color_range . . tv pc vp9_superframe (alt-ref) VP9. / VP9 alt-ref . vp9_superframe_split VP9 . vp9_raw_reorder VP9 show-existing-frame . (FORMAT OPTIONS) libavformat . (private options) . -option value FFmpeg "AVFormatContext" API libavutil/opt.h . : avioflags flags (/) : direct . probesize integer () . . . 5000000 . max_probe_packets integer () . 2500 . packetsize integer () . fflags flags . . : discardcorrupt . fastseek . genpts PTS DTS. igndts DTS PTS . PTS DTS NOPTS . "nofillin" . ignidx (index). nobuffer . nofillin . noparse AVParsers "+nofillin" . sortdts DTS. AVI . : autobsf . . bitexact . . . flush_packets . shortest . max_interleave_delta EOF . seek2any integer () . 0 . analyzeduration integer () . . 5,000,000 = . cryptokey hexadecimal string () . indexmem integer () ( ). rtbufsize integer () (real-time). fdebug flags (/) . : ts . id3v2 ID3v2 ID3v2. max_delay integer (/) . fpsprobesize integer () fps. audio_preload integer () . chunk_duration integer () (). chunk_size integer () . err_detect, f_err_detect flags () . "f_err_detect" ffmpeg . : crccheck CRC . bitstream . buffer . explode . careful . compliant . aggressive . max_interleave_delta integer () (interleaving). 10000000 ( ) . libavformat . (sparse) ( ) . libavformat . libavformat . use_wallclock_as_timestamps integer () . 0 . avoid_negative_ts integer () : make_non_negative . . make_zero 0 . auto () . disabled . . . skip_initial_bytes integer () . 0 . correct_ts_overflow integer () . 1 . flush_packets integer () / . -1 () 1 0 I/O . output_ts_offset offset () . offset ffmpeg-utils(1) . . offset . 0 ( ). format_whitelist list () <<,>> . . dump_separator string () . : ffprobe -dump_separator " " -i ~/videos/matrixbench_mpeg2.mpg max_streams integer () . . skip_estimate_duration_from_pts bool () PTS . MPEG-PS MPEG-TS . duration_probesize integer () PTS ( : MPEG-PS MPEG-TS). concat . MPEG-TS CBR PTS : . . . . . strict, f_strict integer (/) . "f_strict" ffmpeg . : very . strict . normal unofficial . experimental (/ / ). : . (Format stream specifiers) . avformat_match_stream_specifier() libavformat/avformat.h ffmpeg(1) . (DEMUXERS) FFmpeg . FFmpeg . "--list-demuxers" . "--disable-demuxers" "--enable-demuxer=DEMUXER" "--disable-demuxer=DEMUXER" . "-demuxers" ff* . "-formats" . . aa Audible. Audible Format 2, 3, and 4 (.aa) . aac (ADTS) AAC. ADTS AAC ID3v1/2 APE . apng (APNG). APNG . PNG ( ) fcTL extradata . fcTL fcTL IEND . -ignore_loop bool . . -max_fps int . 0 . -default_fps int (0 ). 15 . asf (Advanced Systems Format). ASF MMS . -no_resync_search bool . concat (Virtual concatenation). . . . ( ). : ( ) . "duration" . (Syntax) extended-ASCII . '#' . : "file path" (escape) . . "ffconcat version 1.0" . FFmpeg ( BOM) . "duration dur" . . (seek) . "inpoint timestamp" . . . (intra frame) . ( ) ( "duration") . . "outpoint timestamp" . . (exclusive) . intra frame . . . ( "duration") . "file_packet_metadata key=value" . . . "file_packet_meta" . "file_packet_meta key value" . . . "option key value" . . "stream" . . . . "exact_stream_id id" (id) . . MPEG-PS (VOB) . "stream_meta key value" . . "stream_codec value" . "stream_extradata hex_string" (extradata) . "chapter id start end" (chapter). id . (Options) : safe . ( ) . . 1 . auto_convert . 1 . h264_mp4toannexb H.264 MP4 . . segment_time_metadata lavf.concat.start_time lavf.concat.duration . concat . 0 . (Examples) o : # my first filename file /mnt/share/file-1.wav # my second filename including whitespace file '/mnt/share/file 2.wav' # my third filename including whitespace plus single quote file '/mnt/share/file 3'\''.wav' o : ffconcat version 1.0 file file-1.wav duration 20.0 file subdir/file-2.wav dash HTTP (DASH). AVStream . AVStream . "id" "bandwidth" "" "id" "variant_bitrate" . (Options) : cenc_decryption_key ISO (CENC/AES-128 CTR; ISO/IEC 23001-7). cenc_decryption_keys => ISO (CENC/AES-128 CTR; ISO/IEC 23001-7). dvdvideo DVD-Video libdvdnav libdvdread. DVD PGC . ( ) . ( DVD) ISO . "-f dvdvideo" . . DVD . libdvdnav libdvdread . FFmpeg GPL "--enable-libdvdnav" "--enable-libdvdread" . << >> PGC/PG . DVD . . . . DVD . . . FFmpeg . (Background) DVD-Video . MPEG-PS VOB . <<>> (titles) <> . PGC <> ( ). PGC IFO . PGC . DVD (VM) . ( ) PGC . DVD . libdvdnav MPEG-PS ( VOB) . DVD ( ) . NAV . : (Options) : title int . pgc pg . . 0 () ( ) . chapter_start int PTT ( ) . . 1 . chapter_end int PTT . . 0 . angle int VOB . . 1 . region int . . DVD . . 0 "world" () . menu bool . (menu_lu menu_vts pgc pg). false . menu_lu int . DVD . 1 . menu_vts int VTS VMG ( ) . 1 VTS . pgc int PGC pg. title. . . 0 title . pg int PG pgc. title. . 1 PG PGC . preindex bool (PTT) NAV . . DVD . pgc pg . 0 false . trim bool ( ) . PGC DVD . . 1 true . (Examples) o DVD : ffmpeg -f dvdvideo -title 3 -i ... o DVD : ffmpeg -f dvdvideo -chapter_start 3 -chapter_end 6 -title 1 -i ... o DVD : ffmpeg -f dvdvideo -chapter_start 5 -chapter_end 5 -title 1 -i ... o VTS 1 PGC 1 PG 1: ffmpeg -f dvdvideo -menu 1 -menu_lu 1 -menu_vts 1 -pgc 1 -pg 1 -i ... ea Electronic Arts. Electronic Arts . (Options) merge_alpha bool VP6 ( ) . imf (Interoperable Master Format). IMF Composition . ffmpeg [-assetmaps ,,...] -i ... "-assetmaps" ASSETMAP.xml CPL . flv, live_flv, kux (Adobe Flash Video). FLV RTMP . flv live_flv . KUX flv Youku . ffmpeg -f flv -i myfile.flv ... ffmpeg -f live_flv -i rtmp:///anything/key .... -flv_metadata bool onMetaData. -flv_ignore_prevtag bool . -flv_full_metadata bool onMetadata. gif GIF . : min_delay . 0 6000 . 2 . max_gif_delay . 0 65535 . 65535 ( ) . default_delay . 0 6000 . 10 . ignore_loop GIF ( ) . ignore_loop . GIF . 1 . overlay GIF : ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv shortest overlay input.mp4 GIF . hls HLS. HTTP (Apple HTTP Live Streaming). AVStream . id . AVStream ( 'a' 'v' ffplay) . "variant_bitrate" . : live_start_index ( ). prefer_x_start #EXT-X-START live_start_index. allowed_extensions ',' hls . extension_picky . mpegts . . . max_reload . 1000 . m3u8_hold_counters m3u8 . 1000 . http_persistent HTTP. HTTP . . http_multiple HTTP HTTP. HTTP/1.1 . http_seekable HTTP HTTP. 0 = 1 = -1 = . seg_format_options key=value ":" . seg_max_retry . 0 . image2 . . pattern_type . . . : framerate . 25 . loop . 0 . pattern_type . pattern_type : none . . sequence . "%d" "%0Nd" . "%d0Nd" (0-padded) N . '%' "%%" . "%d" "%0Nd" start_number start_number+start_number_range-1 . "img-%03d.bmp" img-001.bmp img-002.bmp ... img-010.bmp "i%%m%%g-%d.jpg" i%m%g-1.jpg i%m%g-2.jpg ... i%m%g-10.jpg . "%d" "%0Nd" img.jpeg : ffmpeg -i img.jpeg img.png glob (glob wildcard). glob() . libavformat globbing . sequence . pixel_format . . start_number . 0 . start_number_range start_number. 5 . ts_from_file . : . 0 . . video_size . . export_path_metadata ( drawtext ). 0 . : lavf.image2dec.source_path . lavf.image2dec.source_basename (basename) . (Examples) o ffmpeg img-001.jpeg img-002.jpeg ... : ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv o : ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv o glob "*.png" ".png" : ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv libgme Game Music Emu . . : track_index (track) . . . . tracks . sample_rate . 1000 999999 . 44100 . max_size (bytes) . . 50 MiB . libmodplug ModPlug : 44.1 kHz . "pal8" . : noise_reduction . 1 () 0 () . 0 . reverb_depth (Reverb). 0-100. 0 . reverb_delay 40-250 ms. 0 . bass_amount XBass megabass. 0 () 100 (). 0 . bass_range ( ). 10-100 Hz . 0 . surround_depth Dolby Pro-Logic. 0 () 100 (). 0 . surround_delay 5-40 ms. 0 . max_size . . 0 100 MiB . 0 ( ). 5 MiB . video_stream_expr eval API . "x" "y" "w" "h" "t" "speed" "tempo" "order" "pattern" "row". video_stream . 1 () 0 () . 0 . video_stream_w 'chars' . 20-512 . 30 . video_stream_h 'chars' . 20-512 . 30 . video_stream_ptxt . "speed" "tempo" "order" "pattern" "row" "ts" ( ). 1 () 0 () . 1 . libopenmpt libopenmpt . () subsong . : subsong . 'all' 'auto' . 0 . 'auto' . libopenmpt . layout . . STEREO . sample_rate libopenmpt. 1000 INT_MAX . 48000 . mcc MacCaption MCC 1.0 2.0 MCC . MCC VANC (EIA-608 CEA-708) pan-scan . MCC EIA-608 CEA-708 "EIA_608" VANC . -eia608_extract 0 VANC "SMPTE_436M_ANC" . o MCC Scenarist (SCC): ffmpeg -i CC.mcc -c:s copy CC.scc SCC EIA-608 CEA-708 . o MCC MXF: ffmpeg -i video_and_audio.mxf -eia608_extract 0 -i CC.mcc -c copy -map 0 -map 1 out.mxf VANC "SMPTE_436M_ANC" MXF . mov/mp4/3gp QuickTime ISO/IEC ( ISO/IEC 14496-12 MPEG-4 Part 12 ISO/IEC 15444-12 JPEG 2000 Part 12). : mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v : enable_drefs . . use_absolute_path . . . seek_streams_individually (seeking) . . true . ignore_editlist (edit list). . false . advanced_editlist . "ignore_editlist" false . "ignore_editlist" false . true . ignore_chapters (chapters) . / 'HiLight' GoPro . (seekable) . false . use_mfra_for (fragmented) (mfra) . : auto mfra PTS DTS () dts mfra DTS pts mfra PTS 0 mfra use_tfdt "baseMediaDecodeTime" "tfdt" . "tfdt" DTS . "earliest_presentation_time" "sidx" . "mfra" "use_mfra_for" pts dts . export_all udta . . false . export_xmp XMP_ uuid "xmp". "export_all" XMP_ "XMP_". false . activation_bytes Audible AAX +AAX. Audible AAX . audible_fixed_key Audible AAX/AAX+. . decryption_key ISO ( CENC/AES-128 CTR ISO/IEC 23001-7). decryption_keys => ISO ( CENC/AES-128 CTR ISO/IEC 23001-7). max_stts_delta stts trak dts . 1 . int32 dts . (time scale) . 0 UINT_MAX . "UINT_MAX - 48000*10" dts 48 kHz . "uint32" . interleaved_read (Interleave) . MOV/MP4 . / (I/O) . Audible AAX Audible AAX M4B . ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4 mpegts (Transport Stream) MPEG-2. : resync_size . 65536 . skip_unknown_pmt PMT PAT . 0 . fix_teletext_pts PTS DTS PCR . 1 0 PTS DTS . ts_packetsize . . scan_all_pmts PMT. -1 1 (-1 1 0 ). -1 . merge_pmt_versions PMT PID . 0 . max_packet_size ( ) . . 184 INT_MAX/2 . 204800 . mpjpeg MJPEG MIME . MJPEG multipart/x-mixed-replace . strict_mime_boundary MIME MIME MJPEG . 1 . rawvideo (Raw video). . . : framerate . 25 . pixel_format . "yuv420p" . stride (padding) . (multiplane) stride . video_size . . input.raw ffplay "rgb24" "320x240" : ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw rawvideo ffplay "yuv420p" "1080x1920" Y UV: ffplay -f rawvideo -pixel_format yuv420p -video_size 1080x1920 -stride 1088,544,544 input.raw rcwt RCWT ( - Raw Captions With Time) ccextractor (CC) 608/708. . . o CC ASS : ffmpeg -i CC.rcwt.bin CC.ass data_field CC . o RCWT Scenarist (SCC): ffmpeg -i CC.rcwt.bin -c:s copy CC.scc SCC CC RCWT ( EIA-708) . sbg SBaGen. SBaGen (binaural beats) . SBG : -SE a: 300-2.5/3 440+4.5/0 b: 300-2.5/0 440+4.5/3 off: - NOW == a +0:07:00 == b +0:14:00 == a +0:21:00 == b +0:30:00 off SBG . ( ) . NOW . . tedcaptions JSON . TED . tools/bookmarklets.html FFmpeg . : start_time TED . 15000 (15 ) . . : : ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt vapoursynth (Wrapper) Vapoursynth. Vapoursynth . ff* "-f vapoursynth" "-i yourscript.vpy" . : max_script_size . . 1 MiB . w64 Sony Wave64. : max_size wav . wav RIFF Wave. : ignore_length bool "data" . "data" . . max_size . 0 . webp WebP . : -min_delay int . 0 60000 . 10 . -max_webp_delay int . 0 16777215 . 16777215 ( ) . -default_delay int . 0 60000 . 100 . -ignore_loop bool WebP () ( ) . ignore_loop true . false WebP . true . usebgcolor bool WebP ANIM WebP . usebgcolor true . false . (MUXERS) FFmpeg . FFmpeg . configure "--list-muxers" . "--disable-muxers" "--enable-muxer=MUXER" / "--disable-muxer=MUXER" . "-muxers" ff* . "-formats" . . (Raw muxers) . . . . . . ac3 audio Dolby Digital AC-3. adx audio CRI Middleware ADX. (seekable) . aptx audio aptX ( ). aptx_hd audio (aptxdh) aptX HD ( ). avs2 video (avs, avs2) AVS2-P2 ( - - ) / IEEE 1857.4 avs3 video (avs3) AVS3-P2 ( - - ) / IEEE 1857.10 cavsvideo video (cavs) AVS ( - ) codec2raw audio Codec 2. ffmpeg "-f codec2raw". data any . . "-map" ffmpeg . ffmpeg "-f data". dfpwm audio (dfpwm) DFPWM1a ( ). dirac video (drc, vc2) BBC Dirac. Dirac Pro SMPTE VC-2 . dnxhd video (dnxhd, dnxhr) Avid DNxHD. SMPTE VC-3 . DNxHR . dts audio DTS Coherent Acoustics (DCA). eac3 audio Dolby Digital Plus Enhanced AC-3. evc video (evc) MPEG-5 Essential Video Coding (EVC) / EVC / MPEG-5 Part 1 EVC. g722 audio ITU-T G.722. g723_1 audio (tco, rco) ITU-T G.723.1. g726 audio ITU-T G.726 (Big-endian " "). ffmpeg "-f g726". g726le audio ITU-T G.726 (Little-endian " "). ffmpeg "-f g726le". gsm audio Global System for Mobile Communications (GSM). h261 video ITU-T H.261. h263 video ITU-T H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2. h264 video (h264, 264) ITU-T H.264 / MPEG-4 Part 10 AVC. Annex B . hevc video (hevc, h265, 265) ITU-T H.265 / MPEG-H Part 2 HEVC. Annex B . m4v video MPEG-4 Part 2. mjpeg video (mjpg, mjpeg) Motion JPEG. mlp audio Meridian Lossless Packing Packed PCM. mp2 audio (mp2, m2a, mpa) MPEG-1 Audio Layer II. mpeg1video video (mpg, mpeg, m1v) MPEG-1 Part 2. mpeg2video video (m2v) ITU-T H.262 / MPEG-2 Part 2. obu video AV1 (Open Bitstream Units). OBU . rawvideo video (yuv, rgb) . sbc audio (sbc, msbc) Bluetooth SIG (SBC). truehd audio (thd) Dolby TrueHD. vc1 video SMPTE 421M / VC-1. o rawvideo ffmpeg: ffmpeg -f lavfi -i testsrc -t 10 -s hd1080p testsrc.yuv rawvideo : ffplay -video_size 1920x1080 -pixel_format rgb24 -f rawvideo testsrc.rgb (Raw PCM muxers) PCM ( ) . . . . . . alaw (al) A-law f32be (Big-endian) f32le (Little-endian) f64be (Big-endian) f64le (Little-endian) mulaw (ul) mu-law s16be (Big-endian) s16le (Little-endian) s24be (Big-endian) s24le (Little-endian) s32be (Big-endian) s32le (Little-endian) s8 (sb) u16be (Big-endian) u16le (Little-endian) u24be (Big-endian) u24le (Little-endian) u32be (Big-endian) u32le (Little-endian) u8 (ub) vidc Archimedes VIDC MPEG-1/MPEG-2 MPEG-1 MPEG-2 . MPEG-1 ( ISO/IEEC 11172-1 MPEG-1) VCD ( ) . MPEG-2 ( ISO/IEEC 13818-1) (Transport Stream) (Program Stream) . MPEG-2 ( VOB) MPEG-1 : . MPEG-2 SVCD DVD . . mpeg (mpg,mpeg) MPEG-1 / MPEG-1. vcd MPEG-1 / MPEG-1 (VCD). VCD ( ) . mpeg . vob MPEG-2 (VOB). dvd MPEG-2 (DVD VOB). DVD ( ) . vob . svcd (vob) MPEG-2 (SVCD VOB). SVCD ( ) . vob . muxrate rate . . 0 . preload delay - . 500000 . MOV/MPEG-4/ISOMBFF QuickTime / MOV MPEG-4 Part 14 ISO (ISOBMFF) . ISO (ISOBMFF) . MOV Apple QuickTime . MPEG-4 Part 1 ( Part 14) ISO/IEC 14496-1 . ISOBMFF MPEG-4 Part 12 ISO/IEC 14496-12 ISO/IEC 15444-12 . . 3gp (3GPP) 3G UMTS 3g2 (3GP2 3GPP2) 3G CDMA2000 3gp f4v Adobe Flash ipod MPEG-4 MOV/MP4 iPod ismv / Microsoft IIS ( ) (ISMV ISMA). MPEG-4 Part 14 Microsoft IIS . mov QuickTime ".mov" mp4 MP4 MPEG-4 Part 14 psp PlayStation Portable MP4/MPEG-4 Part 14. MPEG-4 Part 14 PlayStation . (Fragmentation) mov mp4 ismv . MOV/MP4 . "+faststart" "-movflags" qt-faststart . (fragment) . ( MOV/MP4 ) ( MOV/MP4 ). . : frag_duration frag_size min_frag_duration movflags +frag_keyframe movflags +frag_custom . min_frag_duration . brand brand_string (major brand). empty_hdlr_name bool "hdlr". "false" . encryption_key key encryption_kid kid encryption_scheme scheme none cenc-aes-ctr frag_duration duration duration . frag_interleave number (Interleave) ( ). 0 . frag_size size size (payload) iods_audio_profile profile iods ( -1 255) -1 iods_video_profile profile iods ( -1 255) -1 ism_lookahead num_entries (lookahead) ISM ( 0 255) 0 min_frag_duration duration duration moov_size bytes moov moov . . mov_gamma gamma gama ( 0 10) 0.0 "+ movflags" movflags flags . : cmaf MP4 CMAF ( ) dash MP4 DASH ( HTTP) default_base_moof omit_tfhd_offset base_data_offset tfhd default-base-is-moof . 14496-12:2012 . ( ). delay_moov moov (flush) disable_chpl Nero ( chpl). Nero QuickTime . QuickTime . Nero mp3Tag 2.61a iTunes 11.3 . faststart ( moov) . . frag_custom "av_write_frame(ctx, NULL)" . ( libavformat ffmpeg.) frag_discont frag_every_frame frag_keyframe global_sidx sidx isml ( ) negative_cts_offsets CTTS CTS . DTS/CTS B . DASH-IF . ismv ( ) . omit_tfhd_offset base_data_offset tfhd. / . prefer_icc colr ICC . rtphint RTP (hinting) separate_moof moof ( ) . moof ( ) moof/mdat . skip_sidx sidx. sidx sidx . global_sidx . skip_trailer mfra/tfra/mfro use_metadata_tags mdta write_colr colr . . write_gama gama hybrid_fragmented - . ( ). . (remux) . movie_timescale scale ("mvhd"). 1 INT_MAX . 1000 . rtpflags flags RTP . : h264_mode0 0 H.264 RTP latm MP4A-LATM MPEG4-GENERIC AAC rfc2190 RFC 2190 RFC 4629 H.263 send_bye RTCP BYE skip_rtcp RTCP skip_iods bool iods ( "true" ) use_editlist bool ( "auto" ) use_stream_ids_as_track_ids bool ( "false" ) video_track_timescale scale . 0 INT_MAX . 0 . 0 . write_btrt bool stsd . ( ) . . -1 "auto" MP4 . write_prft option (PRFT) NTP PRFT. wallclock (wallclock) pts PTS . write_tmcd bool "on" "off" "auto" mov mp4 (). pts PTS . decklink video_pts audio_pts abs_wallclock . o Smooth Streaming IIS ismv ffmpeg: ffmpeg -re <> -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1) a64 Commodore 64 A64. "a64_multi" "a64_multi5" . ac4 AC-4. "ac4" . write_crc bool (checksum) CRC "false" adts (ADTS - Audio Data Transport Stream). AAC . write_id3v2 bool ID3v2.4 . . write_apetag bool APE . . write_mpeg2 bool MPEG ADTS 1 MPEG-2 . 0 MPEG-4 . aea MD STUDIO. ATRAC1 44100Hz . AEA . aiff (AIFF - Audio Interchange File Format). write_id3v2 bool ID3v2 1. 0 () . id3v2_version bool ID3v2 . ( ID3v2.3 ID3v2.4) . . alp Lego Racers High Voltage Software. ADPCM_IMA_ALP 44100 Hz . : "tun" "pcm" type type . type : tun (music). 22050 Hz . pcm (sfx). auto . ".pcm" "pcm" "tun" . () amr 3GPP AMR ( ). AMR NB . amv AMV ( Actions). apm Rayman 2 APM Ubisoft. ADPCM IMA APM . apng (APNG). APNG . final_delay delay . 0.0 . plays repetitions 0 1 . o ffmpeg APNG : ffmpeg -i INPUT -final_delay 0.5 -plays 2 out.apng argo_asf ASF Argonaut Games. ADPCM . version_major version (major) 2 version_minor version (minor) 1 name name . . argo_cvg CVG Argonaut Games. ADPCM 22050Hz . loop reverb . skip_rate_check bool ( "false" ) loop bool ( "false" ) reverb boolean (reverb) ( "true" ) asf, asf_stream / ( ) (ASF). asf_stream . Windows Media Audio (wma) Windows Media Video (wmv) . packet_size size . . 3200 100 "64Ki" . ass ASS/SSA (SubStation Alpha). ASS . ignore_readorder bool "false" (cache) . ast AST (Audio Stream). Nintendo Wii . . loopstart loopend . loopstart start -1 "INT_MAX" -1 ( -1) loopend . loopend end 0 "INT_MAX" 0 0 . au SUN AU. . avi (AVI - Audio Video Interleaved). AVI Open DML . . flipped_raw_rgb bool "true" RGB . vflip. "false" . reserve_index_space size OpenDML . . OpenDML . . . . 0 . write_channel_mask bool . . AVI ( "amerge" ffmpeg-filters ). avif AV1 ( ). AV1 . . . AVIF loop . Alliance for Open Media . loop count AVIF 0 0 movie_timescale timescale ("mvhd"). 1 INT_MAX . 1000 . avm2 ShockWave Flash (SWF) / (AVM2). . bit G.729 (.bit). G.729 . caf Apple CAF ( - Core Audio Format). . codec2 Codec2. codec2 . chromaprint Chromaprint. FFmpeg "--enable-chromaprint" . Chromaprint . : (native-endian) . algorithm version . 0 4 . 3 . 1 . fp_format format . : base64 Base64 () compressed raw silence_threshold threshold . -1 32767 -1 . 3 . AcoustID . -1 . crc (CRC - Cyclic Redundancy Check). CRC Adler-32 . CRC . : CRC=0xCRC CRC CRC . framecrc . o ffmpeg CRC out.crc: ffmpeg -i INPUT -f crc out.crc o ffmpeg CRC : ffmpeg -i INPUT -f crc - o ffmpeg . CRC PCM MPEG-2 : ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc - dash HTTP (DASH - Dynamic Adaptive Streaming over HTTP). MPEG-DASH ISO/IEC 23009-1:2014 . : o ISO DASH: o WebM DASH: MPD ( ) . MPD . "SegmentTemplate" 5.3.9.4.4 . "$RepresentationID$" "$Number$" "$Bandwidth$" "$Time$". ffmpeg "$ext$" . ffmpeg "$ext$" "mp4" "webm" . adaptation_sets adaptation_sets (Adaptation Sets) "AdaptationSets" MPD. . : id=,streams= index streams "," . (space) . ( ) "v" ( "a") . . : descriptor ISO/IEC 23009-1:2014/Amd.2:2015 . : XML (self-closing) . frag_duration frag_duration. frag_type frag_type. seg_duration (segment) seg_duration. trick_id (Trick Mode) . adaptation_sets : id=0,seg_duration=2,frag_duration=1,frag_type=duration,streams=v id=1,seg_duration=2,frag_type=none,streams=a id=0,seg_duration=2,frag_type=none,streams=0 id=1,seg_duration=10,frag_type=none,trick_id=0,streams=1 dash_segment_type type DASH. : auto dash . . mp4 dash ISOBMFF/MP4 webm dash WebM extra_window_size size . format_options options_list (mp4/webm) key=value ":" . ":" (escape) . frag_duration duration . frag_type type . : auto every_frame duration pframes P-Frame ( ) global_sidx bool "SIDX". mp4 . hls_master_name file_name HLS. master.m3u8 . hls_playlist bool HLS. hls_master_name . media_0.m3u8 media_1.m3u8 . http_opts http_opts key=value ":" HTTP . HTTP . http_persistent bool HTTP (Persistent). HTTP . http_user_agent user_agent User-Agent HTTP. HTTP . ignore_io_errors bool / (IO) . . . index_correction bool . use_template use_timeline . . . . . . . init_seg_name init_name DASH (initialization segment). "init-stream$RepresentationID$.$ext$" . "$ext$" . ldash bool Dash (Low-latency Dash) . . lhls bool HLS (LHLS). "#EXT-X-PREFETCH" URI . hls.js LHLS . . . streaming hls_playlist . . : LHLS . : master_m3u8_publish_rate segment_intervals_count . max_playback_rate rate . media_seg_name segment_name DASH . "chunk-stream$RepresentationID$-$Number%05d$.$ext$" . "$ext$" . method method HTTP . "PUT" "POST" . min_playback_rate rate . mpd_profile flags MPD. : dash ISO MPEG-DASH dvb_dash DVB-DASH "dash" . remove_at_exit bool . . seg_duration duration ( ). use_template use_timeline . 5 . single_file bool (byte ranges) . . single_file_name . single_file_name file_name DASH "baseURL" . single_file true . "$ext$" . availability_start_time_ms milliseconds "availabilityStartTime" MPD (Unix epoch) . 0 . . streaming bool . "moof" . . suggested_presentation_delay duration "suggestedPresentationDelay" MPD. 0 . target_latency target_latency ( ). streaming write_prft . . timeout timeout (timeout) / ( ). HTTP . update_period period MPD . . 0 . 0 . use_template bool "SegmentTemplate" "SegmentList" . . use_timeline bool "SegmentTimeline" "SegmentTemplate". . utc_timing_url url UTC ISO "https://time.akamai.com/?iso" window_size size . . 0 . 0 . write_prft write_prft Producer Reference Time . prft . utc_url . auto . DASH ffmpeg. libx264 libfdk_aac . 800k 320x170 300k 22005 Hz . window_size . ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \ -b:v:0 800k -profile:v:0 main \ -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline -ar:a:1 22050 \ -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 \ -use_timeline 1 -use_template 1 -window_size 5 \ -adaptation_sets "id=0,streams=v id=1,streams=a" \ -f dash /path/to/out.mpd daud (D-Cinema). 96000 Hz pcm_24daud . ffmpeg 5.1 96000Hz: ffmpeg -i INPUT -af aresample=96000,pan=5.1 slow.302 ffmpeg 7.0 asetnsamples ( ) . ffmpeg ( ) . dv (DV - Digital Video). dvvideo pcm_s16 . ( DV ) . ffmpeg : ffmpeg -i INPUT -s:v 720x480 -pix_fmt yuv411p -r 29.97 -ac 2 -ar 48000 -y out.dv ffmetadata FFmpeg. ffmetadata . (Metadata) . ffmpeg metadata.ffmeta ffmetadata: ffmpeg -i INPUT -f ffmetadata metadata.ffmeta fifo (FIFO). fifo (thread) . tee . fifo_format . fifo ( ) : o . o FIFO . API ("interrupt_callback" "io_open" "io_close") "AVFormatContext" (thread-safe) . attempt_recovery bool . . "false" . drop_pkts_on_overflow bool "true" fifo . . "false" . fifo_format format_name . . format_opts options . key=value ':' . max_recovery_attempts count . 0 () . queue_size size . 60 . recover_any_error bool "true" . "false" ( ) attempt_recovery "true" . recovery_wait_streamtime bool "false" ( recovery_wait_time ). "true" ( recovery_wait_time ). "false" . recovery_wait_time duration . 5 . restart_with_keyframe bool . "false" . timeshift duration . queue_size (timeshift) . fifo . ffmpeg RTMP ( ) : ffmpeg -re -i ... -c:v libx264 -c:a aac -f fifo -fifo_format flv \ -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 \ -map 0:v -map 0:a rtmp://example.com/live/stream_name film_cpk (.cpk). . . cinepak . filmstrip Adobe Filmstrip. Adobe . . fits (FITS - Flexible Image Transport System). . . flac FLAC. FLAC . (disposition) attached_pic . write_header bool "true" "true" ffmpeg attached_pic: ffmpeg -i INPUT -i pic1.png -i pic2.jpg -map 0:a -map 1 -map 2 -disposition:v attached_pic OUTPUT flv Adobe Flash (FLV). flvflags flags : aac_seq_header_detect AAC . no_sequence_end . no_metadata . no_duration_filesize . ( ). add_keyframe_index HTTP. framecrc CRC . CRC Adler-32 . CRC . : , , , , , 0x CRC CRC . CRC INPUT out.crc: ffmpeg -i INPUT -f framecrc out.crc (stdout) : ffmpeg -i INPUT -f framecrc - ffmpeg CRC . CRC PCM MPEG-2 : ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc - crc . framehash . . . . SHA-256 . : , , , , , hash . hash algorithm algorithm. "MD5" "murmur3" "RIPEMD128" "RIPEMD160" "RIPEMD256" "RIPEMD320" "SHA160" "SHA224" "SHA256" () "SHA512/224" "SHA512/256" "SHA384" "SHA512" "CRC32" "adler32". SHA-256 INPUT out.sha256: ffmpeg -i INPUT -f framehash out.sha256 MD5 : ffmpeg -i INPUT -f framehash -hash md5 - hash . framemd5 MD5 . framehash . MD5 . MD5 INPUT out.md5: ffmpeg -i INPUT -f framemd5 out.md5 stdout : ffmpeg -i INPUT -f framemd5 - framehash md5 . gif GIF . GIF : (centisecond) . loop bool . -1 0 () . final_delay delay ( ) . . -1 . . gif : ffmpeg -i INPUT -loop 10 -final_delay 500 out.gif : GIF image2 : ffmpeg -i INPUT -c:v gif -f image2 "out%d.gif" gxf (GXF - General eXchange Format). GXF Grass Valley SMPTE SMPTE 360M SMPTE RDD 14-2007 (HD) . mjpeg mpeg1video mpeg2video dvvideo 512x480 608x576 48000Hz pcm16_le . hash . . . . . SHA-256 . : algo=hash algo hash . hash algorithm algorithm. "MD5" "murmur3" "RIPEMD128" "RIPEMD160" "RIPEMD256" "RIPEMD320" "SHA160" "SHA224" "SHA256" () "SHA512/224" "SHA512/256" "SHA384" "SHA512" "CRC32" "adler32". SHA-256 out.sha256: ffmpeg -i INPUT -f hash out.sha256 MD5 : ffmpeg -i INPUT -f hash -hash md5 - framehash . hds HTTP (HDS - HTTP Dynamic Streaming). HTTP HDS Adobe . HDS MP4 HTTP . HDS (VOD) . .f4m ( Adobe Flash) .abst ( Adobe) . HDS HTTPS . extra_window_size int min_frag_duration microseconds ( ) (10000000) remove_at_exit bool "true" window_size int 0 . . ffmpeg HDS output.hds : ffmpeg -re -i INPUT -f hds -b:v 200k output.hds hls Apple HTTP Live Streaming MPEG-TS HTTP Live Streaming (HLS) . (playlist) . . . .ts . GOP (Closed GOP) GOP . ffmpeg: ffmpeg -i in.mkv -c:v h264 -flags +cgop -g 30 -hls_time 1 out.m3u8 out.m3u8 : out0.ts out1.ts out2.ts . segment HLS . hls_init_time duration . 0 . duration (Time duration) ffmpeg-utils(1) . m3u8 . ffmpeg hls_time . hls_time duration . 2 . duration (Time duration) ffmpeg-utils(1) . . hls_list_size size . 0 . 5 . hls_delete_threshold size "hls_flags delete_segments" . . 1 hls_list_size+1 . hls_start_number_source source ("#EXT-X-MEDIA-SEQUENCE") . hls_flags single_file . hls_flags append_list . : generic () start_number. epoch (1970-01-01 00:00:00). epoch_us (1970-01-01 00:00:00). datetime / YYYYmmddHHMMSS 20161231235759. start_number number ("#EXT-X-MEDIA-SEQUENCE") number hls_start_number_source generic . ( .) hls_flags single_file . 0 . hls_allow_cache bool (1) (0). hls_base_url baseurl baseurl . . wrap . hls_segment_filename filename . hls_flags single_file filename . : ffmpeg -i in.nut -hls_segment_filename 'file%03d.ts' out.m3u8 out.m3u8 : file000.ts file001.ts file002.ts . filename m3u8 . . strftime_mkdir filename m3u8 . var_stream_map filename "%v" . : ffmpeg -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ -hls_segment_filename 'file_%v_%03d.ts' out_%v.m3u8 : file_0_000.ts file_0_001.ts file_0_002.ts file_1_000.ts file_1_001.ts file_1_002.ts . "%v" . ( %v .) %v . . : ffmpeg -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ -hls_segment_filename 'vs%v/file_%03d.ts' vs%v/out.m3u8 : vs0/file_000.ts vs0/file_001.ts vs0/file_002.ts vs1/file_000.ts vs1/file_001.ts vs1/file_002.ts . strftime bool strftime() filename . second_level_segment_index hls_flag %%d . : ffmpeg -i in.nut -strftime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' out.m3u8 out.m3u8 : file-20160215-1455569023.ts file-20160215-1455569024.ts . : / %s . strftime() . : ffmpeg -i in.nut -strftime 1 -hls_flags second_level_segment_index -hls_segment_filename 'file-%Y%m%d-%%04d.ts' out.m3u8 out.m3u8 : file-20160215-0001.ts file-20160215-0002.ts . strftime_mkdir bool strftime hls_segment_filename . : ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename '%Y%m%d/file-%Y%m%d-%s.ts' out.m3u8 20160215 ( ) out.m3u8 : 20160215/file-20160215-1455569023.ts 20160215/file-20160215-1455569024.ts . : ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename '%Y/%m/%d/file-%Y%m%d-%s.ts' out.m3u8 2016/02/15 ( ) out.m3u8 : 2016/02/15/file-20160215-1455569023.ts 2016/02/15/file-20160215-1455569024.ts . hls_segment_options options_list key=value : . ":" . hls_key_info_file key_info_file key_info_file . key_info_file URI . URL . . . (IV) () . key_info_file hls_flags periodic_rekey /IV URI/IV . : (optional) URI : http://server/file.key /path/to/file.key file.key : file.key /path/to/file.key IV: 0123456789ABCDEF0123456789ABCDEF : http://server/file.key /path/to/file.key 0123456789ABCDEF0123456789ABCDEF : #!/bin/sh BASE_URL=${1:-'.'} openssl rand 16 > file.key echo $BASE_URL/file.key > file.keyinfo echo file.key >> file.keyinfo echo $(openssl rand -hex 16) >> file.keyinfo ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 hls_enc bool (1) (0) AES128. playlist name.key . hls_enc_key key . hls_enc_key_url keyurl keyurl baseurl . hls_enc_iv iv . hls_segment_type flags : mpegts MPEG-2 (Transport Stream). HLS . fmp4 MP4 MPEG-DASH. fmp4 HLS . hls_fmp4_init_filename filename init.mp4 . strftime filename . : ffmpeg -i in.nut -hls_segment_type fmp4 -strftime 1 -hls_fmp4_init_filename "%s_init.mp4" out.m3u8 init : 1602678741_init.mp4. hls_fmp4_init_resend bool init m3u8 0 . var_stream_map filename "%v" init . "%v" . . init . hls_flags flags : single_file MPEG-TS . HLS . : ffmpeg -i in.nut -hls_flags single_file out.m3u8 out.m3u8 out.ts . delete_segments . append_list "#EXT-X-ENDLIST" . round_durations . HLS ffmpeg m3u8 HLS . discont_start "#EXT-X-DISCONTINUITY" . omit_endlist "EXT-X-ENDLIST" . periodic_rekey "hls_key_info_file" . AES (atomic) . independent_segments "#EXT-X-INDEPENDENT-SEGMENTS" . iframes_only "#EXT-X-I-FRAMES-ONLY" I "#EXT-X-BYTERANGE" . split_by_time . . hls_time . program_date_time "EXT-X-PROGRAM-DATE-TIME". second_level_segment_index %%d hls_segment_filename / strftime . %%0xd x . second_level_segment_size ( ) %%s hls_segment_filename / strftime . %%0xs x . second_level_segment_duration ( ) %%t hls_segment_filename / strftime . %%0xt x . : ffmpeg -i sample.mpeg \ -f hls -hls_time 3 -hls_list_size 5 \ -hls_flags second_level_segment_index+second_level_segment_size+second_level_segment_duration \ -strftime 1 -strftime_mkdir 1 -hls_segment_filename "segment_%Y%m%d%H%M%S_%%04d_%%08s_%%013t.ts" stream.m3u8 : segment_20170102194334_0003_00122200_0000003000000.ts segment_20170102194334_0004_00120072_0000003000000.ts . temp_file filename.tmp filename . *.tmp m3u8 . m3u8 . . "file" hls_playlist_type vod . master_pl_name "file" master_pl_publish_rate . hls_playlist_type type event "#EXT-X-PLAYLIST-TYPE:EVENT" m3u8 . hls_list_size 0 . vod "#EXT-X-PLAYLIST-TYPE:VOD" m3u8 . hls_list_size 0 . method method HTTP hls. : ffmpeg -re -i in.ts -f hls -method PUT http://example.com/live/out.m3u8 mpegts HTTP PUT m3u8 "refresh" . . http_user_agent agent User-Agent HTTP. HTTP . var_stream_map stream_map (variant streams) . . : "a:0,v:0 a:1,v:1 ....". a: v: s: . 0 9 ( ). "%v" : . "%v" . . . : o hls. 1000k 64k 256k 32k . out_0.m3u8 out_1.m3u8 . ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ http://example.com/live/out_%v.m3u8 o . hls . out_my_hd.m3u8 out_my_sd.m3u8 . ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0,name:my_hd v:1,a:1,name:my_sd" \ http://example.com/live/out_%v.m3u8 o hls. 1000k 64k 256k . out_0.m3u8 out_1.m3u8 out_2.m3u8 . ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k \ -map 0:v -map 0:a -map 0:v -f hls -var_stream_map "v:0 a:0 v:1" \ http://example.com/live/out_%v.m3u8 o . http://example.com/live/vs_0/out.m3u8 http://example.com/live/vs_1/out.m3u8 . ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ http://example.com/live/vs_%v/out.m3u8 o . "#EXT-X-STREAM-INF" "#EXT-X-MEDIA" 'aud_low' 'aud_high' . hls . ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k -b:v:1 3000k \ -map 0:a -map 0:a -map 0:v -map 0:v -f hls \ -var_stream_map "a:0,agroup:aud_low a:1,agroup:aud_high v:0,agroup:aud_low v:1,agroup:aud_high" \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 o . "#EXT-X-STREAM-INF" "#EXT-X-MEDIA" 'aud_low' NO YES . hls . ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -map 0:a -map 0:a -map 0:v -f hls \ -var_stream_map "a:0,agroup:aud_low,default:yes a:1,agroup:aud_low v:0,agroup:aud_low" \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 o . "#EXT-X-STREAM-INF" "#EXT-X-MEDIA" 'aud_low' NO YES ENG CHN . hls . ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -map 0:a -map 0:a -map 0:v -f hls \ -var_stream_map "a:0,agroup:aud_low,default:yes,language:ENG a:1,agroup:aud_low,language:CHN v:0,agroup:aud_low" \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 o . "#EXT-X-MEDIA" "TYPE=SUBTITLES" webvtt 'subtitle' 'English'. . ffmpeg -y -i input_with_subtitle.mkv \ -b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \ -b:a:0 256k \ -c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0 -map 0:s:0 \ -f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle,sname:English" \ -master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \ 10 -master_pl_publish_rate 10 -hls_flags \ delete_segments+discont_start+split_by_time ./tmp/video.m3u8 cc_stream_map cc_stream_map (closed captions) . . : "ccgroup:,instreamid:,language: ....". 'ccgroup' 'instreamid' . 'language' . 'ccgroup' var_stream_map . : ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -a53cc:0 1 -a53cc:1 1 \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls \ -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en ccgroup:cc,instreamid:CC2,language:sp" \ -var_stream_map "v:0,a:0,ccgroup:cc v:1,a:1,ccgroup:cc" \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 "#EXT-X-MEDIA" "TYPE=CLOSED-CAPTIONS" INSTREAM-ID 'CC1' 'CC2' . "CLOSED-CAPTIONS" 'cc' . var_stream_map ccgroup cc_stream_map . : ffmpeg -re -i in.ts -b:v 1000k -b:a 64k -a53cc 1 -f hls \ -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" \ -master_pl_name master.m3u8 \ http://example.com/live/out.m3u8 "#EXT-X-MEDIA" "TYPE=CLOSED-CAPTIONS" 'cc' 'en' () INSTREAM-ID 'CC1' . "CLOSED-CAPTIONS" 'cc' . master_pl_name name HLS . : ffmpeg -re -i in.ts -f hls -master_pl_name master.m3u8 http://example.com/live/out.m3u8 HLS master.m3u8 . master_pl_publish_rate count . : ffmpeg -re -i in.ts -f hls -master_pl_name master.m3u8 \ -hls_time 2 -master_pl_publish_rate 30 http://example.com/live/out.m3u8 HLS master.m3u8 . http_persistent bool HTTP (Persistent). HTTP . timeout timeout / (I/O). HTTP . ignore_io_errors bool / . . headers headers HTTP . HTTP . iamf (IAMF). IAMF () . / . . Alliance for Open Media . . ico ICO. (ICO) : o o BMP PNG o BMP : BMP Bit Depth FFmpeg Pixel Format 1bit pal8 4bit pal8 8bit pal8 16bit rgb555le 24bit bgr24 32bit bgra o BMP DIB BITMAPINFOHEADER o PNG rgba ilbc (iLBC). ilbc . image2, image2pipe . image2 . . "%d" "%0Nd" . "%0Nd" N (0-padded). '%' "%%" . "%d" "%0Nd" . . "img-%03d.bmp" img-001.bmp img-002.bmp ... img-010.bmp . "img%%-%d.jpg" img%-1.jpg img%-2.jpg ... img%-10.jpg . .Y.U.V . YUV420P . '.Y' . '.U' '.V' . image2pipe image2 . frame_pts bool 1 (PTS) . 0 . start_number count . 1 . update bool 1 . 0 . strftime bool 1 strftime() . 0 . atomic_writing bool . . protocol_opts options_list key=value <<:>>. ":" . o ffmpeg img-001.jpeg img-002.jpeg ... : ffmpeg -i in.avi -fps_mode cfr -r 1 -f image2 'img-%03d.jpeg' ffmpeg "-f" image2 : ffmpeg -i in.avi -fps_mode cfr -r 1 'img-%03d.jpeg' "%d" "%0Nd" img.jpeg : ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg o strftime . strftime() . "%Y-%m-%d_%H-%M-%S" strftime() ffmpeg : ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg" o PTS : ffmpeg -f v4l2 -r 1 -i /dev/video0 -copyts -f image2 -frame_pts true %d.jpg o WebDAV : ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts method=PUT http://example.com/desktop.jpg ircam / IRCAM / CARL ( BICSF). /IRCAM/CARL csound Gareth Loy (CARL) IRCAM Rob Gross Dan Timis Institut de Recherche et Coordination Acoustique / Musique (Berkeley Fast Filesystem) . Berkeley/IRCAM/CARL Sound Filesystem . . PCM . ivf On2 IVF. IVF On2 Technologies ( Duck Corporation ) . vp8 vp9 av1 . jacosub JACOsub. jacosub . . kvag Simon & Schuster Interactive VAG. VAG Simon & Schuster Interactive "Real War" "Real War: Rogue States" . adpcm_ima_ssi . lc3 Bluetooth SIG (LC3) ETSI TS 103 634 (LC3plus). lc3 . lrc LRC. LRC ( LyRiCs) MP3 Vorbis MIDI . subrip text . precision number ( ) . 1 6 . 2 . : title album artist author creator encoder encoder_version encoder_version libavformat . matroska (Matroska). matroska webm . : title . FileDescription . language Matroska. ISO-639-2 ( ISO 639-2/B) ( "fre" ) ( "fre-ca" ). stereo_mode . : mono left_right bottom_top - top_bottom - checkerboard_rl checkerboard_lr row_interleaved_rl row_interleaved_lr col_interleaved_rl col_interleaved_lr anaglyph_cyan_red - right_left anaglyph_green_magenta - block_lr Block block_rl Block WebM : ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm reserve_index_space size ( cues ) . -- -- . size Cues . (Cues) . 50kB . cues (seekable) . cues_to_front bool . reserve_index_space . . cluster_size_limit size (Cluster). . cluster_time_limit duration . . dash bool WebM WebM DASH. "false" . dash_track_number index DASH. 1 . live bool . "false" . allow_raw_vfw bool VFW . "false" . flipped_raw_rgb bool "true" RGB . vflip . "false" . write_crc32 bool CRC32 (Level 1). "true" . WebM . default_mode mode FlagDefault . . passthrough . infer (disposition default) FlagDefault . ( ) ( ). . infer_no_subs infer . passthrough FlagDefault AV_DISPOSITION_DEFAULT . md5 MD5. hash . MD5 . hash framemd5 . o MD5 out.md5: ffmpeg -i INPUT -f md5 out.md5 o MD5 : ffmpeg -i INPUT -f md5 - mcc MacCaption MCC 1.0 2.0 MCC . MCC VANC (EIA-608 CEA-708) pan-scan . : override_time_code_rate "Time Code Rate" . "time_base" . use_u_alias "U" "E1h 00h 00h 00h". .mcc . mcc_version MCC. . creation_program . FFmpeg . creation_time . . o MXF "SMPTE_436M_ANC" MXF MCC . ffmpeg -i input.mxf -c copy -map 0:d -override_time_code_rate 30 out.mcc o EIA-608/CTA-708 .mp4 MCC . . ffmpeg -f lavfi -i "movie=input.mp4[out+subcc]" -c:s copy -map 0:s -override_time_code_rate 30000/1001 out.mcc microdvd MicroDVD. microdvd . mmf (SMAF). SMAF . adpcm_yamaha . mp3 MP3 MP3 : o ID3v2 ( ). 2.3 2.4 "id3v2_version" (3 4). "id3v2_version" 0 ID3v2 . ( APIC) ID3v2 . . APIC . title comment description picture type APIC . . APIC . . o Xing/LAME ID3v2 ( ). . "write_xing" . . o ID3v1 ( ). "write_id3v1" . : mp3 ID3v2.3 ID3v1: ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3 mp3 "map" : ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3 MP3 <<>> : ffmpeg -i input.wav -write_xing 0 -id3v2_version 0 out.mp3 mpegts (MPEG transport stream). ISO 13818-1 ETSI EN 300 468 . mpegts "service_provider" "service_name". "service_provider" FFmpeg "service_name" Service01 . : mpegts_transport_stream_id integer transport_stream_id. DVB . 0x0001 . mpegts_original_network_id integer original_network_id. DVB . Original_Network_ID, Transport_Stream_ID . 0xff01 . mpegts_service_id integer service_id DVB (program) . 0x0001 . mpegts_service_type integer service_type . "digital_tv" . : hex_value 0x01 0xff ETSI 300 468 . digital_tv (Digital TV). digital_radio (Digital Radio). teletext (Teletext). advanced_codec_digital_radio . mpeg2_digital_hdtv MPEG2. advanced_codec_digital_sdtv . advanced_codec_digital_hdtv . hevc_digital_hdtv HEVC. mpegts_pmt_start_pid integer PID PMT. 0x1000 0x0020 0x1ffa . m2ts PID PMT 0x0100 . mpegts_start_pid integer PID (elementary streams). 0x0100 0x0020 0x1ffa . m2ts PID . mpegts_m2ts_mode boolean m2ts 1. -1 m2ts . muxrate integer . VBR . pes_payload_size integer (payload) PES . 2930 . mpegts_flags flags mpegts. : resend_headers PAT/PMT . latm LATM AAC. pat_pmt_at_frames PAT PMT . system_b B (DVB) A (ATSC). initial_discontinuity (discontinuity). nit NIT. omit_rai (random access indicator). mpegts_copyts boolean 1 . -1 0 . omit_video_pes_length boolean PES . 1 (true) . pcr_period integer PCR . -1 PCR : 20 CBR 100 VBR . pat_period duration PAT/PMT. 0.1 . sdt_period duration SDT. 0.5 . nit_period duration NIT. 0.5 . tables_version integer PAT PMT SDT NIT ( 0 0 31 ). . "AVFormatContext" ( API) ffmpeg tables_version : ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111 ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111 ... ffmpeg -i source3.ts -codec copy -f mpegts -tables_version 31 udp://1.1.1.1:1111 ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111 ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111 ... ffmpeg -i file.mpg -c copy \ -mpegts_original_network_id 0x1122 \ -mpegts_transport_stream_id 0x3344 \ -mpegts_service_id 0x5566 \ -mpegts_pmt_start_pid 0x1500 \ -mpegts_start_pid 0x150 \ -metadata service_provider="Some provider" \ -metadata service_name="Some Channel" \ out.ts mxf, mxf_d10, mxf_opatom MXF. : store_user_comments bool . IRT D-10 . mxf mxf_opatom mxf_d10 . null (Null). . ffmpeg : ffmpeg -benchmark -i INPUT -f null out.null out.null ffmpeg . : ffmpeg -benchmark -i INPUT -f null - nut -syncpoints flags (syncpoint) nut: default . none Use of this option is not recommended, as the resulting files are very damage sensitive and seeking is not possible. Also in general the overhead from syncpoints is negligible. Note, -C 0 can be used to disable all growing data tables, allowing to mux endless streams with limited memory and without these disadvantages. timestamped (wallclock). none timestamped . -write_index bool . ffmpeg -i INPUT -f_strict experimental -syncpoints none - | processor ogg Ogg. -page_duration duration . duration . . . 0 . 1 . -serial_offset value . ogg . pdv Playdate. Playdate SDK Panic . PDV . max_frames frames frames . . rcwt RCWT ( Raw Captions With Time) ccextractor (CC) 608/708. CC . ccextractor FFmpeg CC . . RCWT ccextractor . ccextractor . RCWT : o RCWT lavfi: ffmpeg -f lavfi -i "movie=INPUT.mkv[out+subcc]" -map 0:s:0 -c:s copy -f rcwt CC.rcwt.bin segment, stream_segment, ssegment () . . image2 "strftime" strftime . "stream_segment" MPEG . "ssegment" "stream_segment" . reference_stream . . . segment_list . segment_list_type . (basename) . hls HLS . : increment_tc 1|0 1 . . 0 . reference_stream specifier specifier . specifier "auto" . ( << >> ffmpeg ) . "auto" . segment_format format . segment_format_options options_list <<:>> key=value. ":" . segment_list name name. . segment_list_flags flags . : cache ( M3U8 ). live . segment_list_size size size . 0 . 0 . segment_list_entry_prefix prefix prefix . . . segment_list_type type . : flat . csv, ext ( ) : ,, segment_filename . CSV ( RFC4180) . segment_start_time segment_end_time . ".csv" ".ext" . ext csv . ffconcat ffconcat . concat FFmpeg . ".ffcat" ".ffconcat" . m3u8 M3U8 3 . ".m3u8" . . segment_time time time . "2" . segment_times . . . min_seg_duration time time . . "segment_time" . "0" . segment_atclocktime 1|0 "1" 00:00 . time segment_time . segment_time "900" 12:00 12:15 12:30 . "0" . segment_clocktime_offset duration segment_atclocktime. segment_time "900" segment_clocktime_offset "300" 12:05 12:20 12:35 . "0" . segment_clocktime_wrap_duration duration . . . segment_time_delta delta . "0" . delta PTS : PTS >= start_time - time_delta GOP . force_key_frames ffmpeg . force_key_frames . 1/(2*frame_rate) force_key_frames . segment_times times . times . segment_time . segment_frames frames . frames . ( 0) . segment_wrap limit limit . segment_start_number number . 0 . strftime 1|0 "strftime" . "strftime" . 0 . break_non_keyframes 1|0 . . 0 . reset_timestamps 1|0 . . / . 0 . initial_offset offset . 0 . write_empty_segments 1|0 . . 0 . GOP (closed GOP) GOP . o in.mkv out-000.nut out-001.nut out.list: ffmpeg -i in.mkv -codec hevc -flags +cgop -g 60 -map 0 -f segment -segment_list out.list out%03d.nut o : ffmpeg -i in.mkv -f segment -segment_time 10 -segment_format_options movflags=+faststart out%03d.mp4 o segment_times: ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 out%03d.nut o force_key_frames ffmpeg segment_time_delta . ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 \ -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 -segment_time_delta 0.05 out%03d.nut () . o segment_frames: ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut o in.mkv TS "libx264" "aac": ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a aac -f ssegment -segment_list out.list out%03d.ts o M3U8 ( HLS ): ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 \ -segment_list_flags +live -segment_time 10 out%03d.mkv smoothstreaming Smooth Streaming (Manifest ) . window_size manifest. 0 ( ). extra_window_size manifest . 5. lookahead_count (lookahead). 2. min_frag_duration ( ). 5000000. remove_at_exit . 0 ( ). streamhash . . . . . SHA-256 . : streamindex,streamtype,algo=hash streamindex streamtype algo hash . hash algorithm algorithm. "MD5" "murmur3" "RIPEMD128" "RIPEMD160" "RIPEMD256" "RIPEMD320" "SHA160" "SHA224" "SHA256" () "SHA512/224" "SHA512/256" "SHA384" "SHA512" "CRC32" "adler32". SHA-256 out.sha256: ffmpeg -i INPUT -f streamhash out.sha256 MD5 : ffmpeg -i INPUT -f streamhash -hash md5 - hash framehash . tee tee . . ffmpeg . tee . . tee API libavformat . tee ffmpeg . "-map" . . tee . global_header . () '|' . '|' ( "Quoting and escaping" ffmpeg-utils(1) ). use_fifo bool 1 (threads) fifo . // . . fifo_options fifo . fifo . key=value ':' . ':' . : f . URL . bsfs[/spec] . "/" . spec ( ). . ( "h264_mp4toannexb" ) . "opt=value" . "," . use_fifo bool use_fifo tee . fifo_options fifo_options tee . fifo . select . . . (",") : "a:0,v" onfail . "abort" () "ignore" . "abort" . "ignore" . o WebM MPEG-TS UDP: ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a "archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/" o ( ): ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a "[onfail=ignore]archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/" o ffmpeg . "dump_extra" extradata MPEG-TS . select out.aac . ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac -f tee "[bsfs/v=dump_extra=freq=keyframe]out.ts|[movflags=+faststart]out.mp4|[select=a]out.aac" o "a:1" . ":" . ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac -f tee "[bsfs/v=dump_extra=freq=keyframe]out.ts|[movflags=+faststart]out.mp4|[select=\'a:1\']out.aac" wav RIFF Wave. rf64 mode RF64 RIFF . RF64 RF64 RIFF . : auto RIFF RF64 RF64 . "JUNK" RIFF WAV . always RF64 . RF64 RIFF WAVE . never RIFF RF64 . "data" . ( "ignore_length" wav .) . write_bext bool "BEXT" Broadcast Wave . false . write_peak mode (Peak Envelope EBU Tech 3285 Supplement 3) . off . off . on "peak_block_size" "peak_format" "peak_ppv". only "on" ( "data" ). peak_block_size int . . peak_format format (1: uint8 2: uint16). 2 (uint16) . peak_ppv int (1 2). 2 . webm_chunk WebM (WebM Live Chunk). WebM WebM DASH . : chunk_start_index ( 0). header . audio_chunk_duration ( 5000). ffmpeg -f v4l2 -i /dev/video0 \ -f alsa -i hw:0 \ -map 0:0 \ -c:v libvpx-vp9 \ -s 640x360 -keyint_min 30 -g 30 \ -f webm_chunk \ -header webm_live_video_360.hdr \ -chunk_start_index 1 \ webm_live_video_360_%d.chk \ -map 1:0 \ -c:a libvorbis \ -b:a 128k \ -f webm_chunk \ -header webm_live_audio_128.hdr \ -chunk_start_index 1 \ -audio_chunk_duration 1000 \ webm_live_audio_128_%d.chk webm_dash_manifest WebM DASH. WebM DASH XML DASH . DASH . : o WebM DASH: o ISO DASH: : adaptation_sets : "id=x,streams=a,b,c id=y,streams=d,e" x y a b c d e . . live 1 DASH . : 0. chunk_start_index . startNumber SegmentTemplate . : 0. chunk_duration_ms . duration SegmentTemplate . : 1000. utc_timing_url (URL) UTC ISO . value UTCTiming . : None. time_shift_buffer_depth ( ) . timeShiftBufferDepth MPD . : 60. minimum_update_period ( ) . minimumUpdatePeriod MPD . : 0. ffmpeg -f webm_dash_manifest -i video1.webm \ -f webm_dash_manifest -i video2.webm \ -f webm_dash_manifest -i audio1.webm \ -f webm_dash_manifest -i audio2.webm \ -map 0 -map 1 -map 2 -map 3 \ -c copy \ -f webm_dash_manifest \ -adaptation_sets "id=0,streams=0,1 id=1,streams=2,3" \ manifest.xml whip WebRTC ( ) WHIP ( WebRTC-HTTP) . . HTTP SDP ICE lite . STUN UDP . DTLS SRTP . RTP SRTP . H.264 B Opus . ffmpeg WebRTC: ffmpeg -re -i input.mp4 -acodec libopus -ar 48000 -ac 2 \ -vcodec libx264 -profile:v baseline -tune zerolatency -threads 1 -bf 0 \ -f whip "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream" . : handshake_timeout integer (timeout) ICE DTLS. 5000 . timeout integer I/O. HTTP . -1 . pkt_size integer RTP . 1200 . ts_buffer_size integer . -1 () . UDP . whip_flags flags : dtls_active DTLS Client Hello . rtp_history integer RTP . 512 . authorization string (Bearer token) WHIP. cert_file string DTLS. key_file string DTLS. (METADATA) FFmpeg INI UTF-8 / metadata . : 1. . 2. ;FFMETADATA ( 1). 3. key=value . 4. (global) . 5. / . 6. ( STREAM CHAPTER) ([ ]) . 7. (timebase) / . TIMEBASE=num/den num den . / . START=num END=num num . 8. ; # . 9. (= ; # \ ) \ . 10. ( foo = bar) ( foo bar ). ffmetadata : ;FFMETADATA1 title=bike\\shed ;this is a comment artist=FFmpeg troll team [CHAPTER] TIMEBASE=1/1000 START=0 #chapter ends at 0:01:00 END=60000 title=chapter \#1 [STREAM] title=multi\ line ffmetadata ffmetadata ffmetadata . ffmetadata ffmpeg : ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE FFMETADATAFILE : ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT (PROTOCOL OPTIONS) libavformat . (private options) . -option value FFmpeg "AVFormatContext" API libavutil/opt.h . : protocol_whitelist list (input) (",") . "ALL" . "-" . ( ) . (PROTOCOLS) FFmpeg . FFmpeg . configure "--list-protocols" . configure "--disable-protocols" "--enable-protocol=PROTOCOL" "--disable-protocol=PROTOCOL" . "-protocols" *ff . : rw_timeout / () . . amqp (AMQP) 0-9-1 (broker) / (publish- subscribe) . AMQP FFmpeg --enable-librabbitmq . AMQP . AMQP RabbitMQ . FFmpeg : ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost] hostname port ( 5672) . / . "guest" . vhost . "/" . : ffplay amqp://[[user]:[password]@]hostname[:port][/vhost] RabbitMQ (Exchange) / . exchange routing_key . : exchange . RabbitMQ : "amq.direct" routing_key "amq.fanout" ( routing_key fanout ) "amq.topic" "amq.direct" ( RabbitMQ ). routing_key (routing key) . "amqp" . "amq.direct" "amq.topic" . pkt_size / . 131072 . 4096 ( int) . FFmpeg . . (truncate) . connection_timeout . rw_timeout 5 rw_timeout . delivery_mode mode . : persistent "persistent" (2) . . . non-persistent "non-persistent" (1) . . async . (thread) / (I/O) . async: async:http://host/resource async:cache:http://host/resource bluray (BluRay). : angle (angle) chapter (1...N) playlist (BDMV/PLAYLIST/?????.mpls) : /mnt/bluray: bluray:/mnt/bluray /mnt/bluray : -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray cache () . . (seeking) . : read_ahead_limit . -1 INT_MAX . -1 . 65536 . URL : cache: concat (Concatenation). . URL : concat:||...| URL1 URL2 ... URLN . split1.mpeg split2.mpeg split3.mpeg ffplay : ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg "|" (shells) . concatf (line break). . URL : concatf: URL . . "Quoting and escaping" ffmpeg-utils(1) . split1.mpeg split2.mpeg split3.mpeg split.txt ffplay : ffplay concatf:split.txt split.txt : split1.mpeg split2.mpeg split3.mpeg crypto AES. : key AES . iv (IV) AES . URL : crypto: crypto+ data URI. . GIF ffmpeg: ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png fd (File descriptor). : fd: -fd fd stdout stdin . pipe fd (seek) . fd URL . : blocksize I/O . "INT_MAX" . . fd . file . . URL : file: filename . URL URL . URL URL ( ). input.mpeg ffmpeg : ffmpeg -i file:input.mpeg output.mpeg : truncate 1. 0 . 1 . blocksize I/O . "INT_MAX" . . follow 1 . rw_timeout ( API) . . seekable . 0 -1 ( ). ( ). pkt_size I/O . . . (32 ) . . . ftp (FTP). FTP. : ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg : timeout I/O . -1 . ftp-user FTP . URL FTP . ftp-password FTP . URL FTP ftp-anonymous-password . ftp-anonymous-password (anonymous). . ftp-write-seekable . 1 0 . 0 . : ( ). FTP . *ff . gopher (Gopher). gophers (Gophers). TLS. http (HTTP). : seekable . 1 0 -1 . -1 . chunked_post 1 Transfer-Encoding post 1 . http_proxy HTTP http://example.com:1234 headers HTTP . . content_type POST (listen). user_agent User-Agent. libavformat ("Lavf/"). referer Referer. 'Referer: URL' HTTP. multiple_requests (Persistent connections) 1 0 . request_size . (range requests) (throttle) . ( 0 ). multiple_requests short_seek_size . FFmpeg HTTP . initial_request_size . "request_size" . MXF MOV . ( ) . ( 0 ). multiple_requests short_seek_size . post_data HTTP post. mime_type MIME. http_version HTTP. "1.0" "1.1". cookies . HTTP Set-Cookie . . icy 1 ICY (SHOUTcast) . icy_metadata_headers icy_metadata_packet . 1 . icy_metadata_headers ICY HTTP ICY . icy_metadata_packet ICY icy 1 . . metadata Icecast . API C . auth_type HTTP. Digest nonce Basic . none HTTP. . basic HTTP. Base64 . Base64 (Base64 ). . HTTPS/TLS . . send_expect_100 Expect: 100-continue POST. 1 0 -1 . -1 . location . API C . offset . end_offset . method HTTP . HTTP () . HTTP Bad Request . HTTP . . reconnect (EOF). reconnect_at_eof EOF / . reconnect_on_network_error TCP/TLS . reconnect_on_http_error HTTP . ( '503') '4xx' / '5xx' . reconnect_streamed / . reconnect_delay_max . reconnect_max_retries . . reconnect_delay_total_max . respect_retry_after Retry-After . . . listen 1 HTTP . HTTP POST . 2 HTTP . ffmpeg.c . # Server side (sending): ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://: # Client side (receiving): ffmpeg -i http://: -c copy somefile.ogg # Client can also be done with wget: wget http://: -O somefile.ogg # Server side (receiving): ffmpeg -listen 1 -i http://: -c copy somefile.ogg # Client side (sending): ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://: # Client can also be done with wget: wget --post-file=somefile.ogg http://: resource HTTP . reply_code HTTP HTTP . short_seek_size (readahead) HTTP . . HTTP (HTTP Cookies) HTTP . cookies . . HTTP HTTP Cookie . . : ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8 Icecast Icecast ( Icecast) : ice_genre (genre) . ice_name . ice_description . ice_url URL . ice_public . 0 (). user_agent User-Agent. "Lavf/" . password (mountpoint) Icecast. content_type . audio/mpeg . legacy_icecast Icecast 2.4.0 HTTP PUT SOURCE . tls TLS (HTTPS) Icecast. icecast://[[:]@]:/ ipfs (IPFS). IPFS (gateways) . http(s) . IPFS ( ipfs:// ipns://) . ( ) IPFS . : gateway . $IPFS_GATEWAY $IPFS_PATH "$HOME/.ipfs/" . . IPFS: ffplay ipfs:// IPNS ( IPNS IPFS ): ffplay ipns:// mmst MMS ( ) TCP. mmsh MMS ( ) HTTP. : mmsh://[:][/][/] md5 MD5. MD5 stdout ( ) . . : # Write the MD5 hash of the encoded AVI file to the file output.avi.md5. ffmpeg -i input.flv -f avi -y md5:output.avi.md5 # Write the MD5 hash of the encoded AVI file to stdout. ffmpeg -i input.flv -f avi -y md5: ( MOV) MD5 . pipe (UNIX pipe). . : pipe:[] fd number ( 0 stdin 1 stdout 2 stderr). number stdout stdin . stdin ffmpeg: cat test.wav | ffmpeg -i pipe:0 # ...this is the same as... cat test.wav | ffmpeg -i pipe: stdout ffmpeg: ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi # ...this is the same as... ffmpeg -i test.wav -f avi pipe: | cat > test.avi : blocksize I/O . "INT_MAX" . . fd . ( MOV) pipe . prompeg FEC Pro-MPEG Code of Practice #3 Release 2. Pro-MPEG CoP#3 FEC (FEC) MPEG-2 RTP . "rtp_mpegts" "rtp" . : -f rtp_mpegts -fec prompeg=