1FFPLAY-ALL(1) FFPLAY-ALL(1)
2
3
4
6 ffplay - FFplay media player
7
9 ffplay [options] [input_url]
10
12 FFplay is a very simple and portable media player using the FFmpeg
13 libraries and the SDL library. It is mostly used as a testbed for the
14 various FFmpeg APIs.
15
17 All the numerical options, if not specified otherwise, accept a string
18 representing a number as input, which may be followed by one of the SI
19 unit prefixes, for example: 'K', 'M', or 'G'.
20
21 If 'i' is appended to the SI unit prefix, the complete prefix will be
22 interpreted as a unit prefix for binary multiples, which are based on
23 powers of 1024 instead of powers of 1000. Appending 'B' to the SI unit
24 prefix multiplies the value by 8. This allows using, for example: 'KB',
25 'MiB', 'G' and 'B' as number suffixes.
26
27 Options which do not take arguments are boolean options, and set the
28 corresponding value to true. They can be set to false by prefixing the
29 option name with "no". For example using "-nofoo" will set the boolean
30 option with name "foo" to false.
31
32 Stream specifiers
33 Some options are applied per-stream, e.g. bitrate or codec. Stream
34 specifiers are used to precisely specify which stream(s) a given option
35 belongs to.
36
37 A stream specifier is a string generally appended to the option name
38 and separated from it by a colon. E.g. "-codec:a:1 ac3" contains the
39 "a:1" stream specifier, which matches the second audio stream.
40 Therefore, it would select the ac3 codec for the second audio stream.
41
42 A stream specifier can match several streams, so that the option is
43 applied to all of them. E.g. the stream specifier in "-b:a 128k"
44 matches all audio streams.
45
46 An empty stream specifier matches all streams. For example, "-codec
47 copy" or "-codec: copy" would copy all the streams without reencoding.
48
49 Possible forms of stream specifiers are:
50
51 stream_index
52 Matches the stream with this index. E.g. "-threads:1 4" would set
53 the thread count for the second stream to 4. If stream_index is
54 used as an additional stream specifier (see below), then it selects
55 stream number stream_index from the matching streams. Stream
56 numbering is based on the order of the streams as detected by
57 libavformat except when a program ID is also specified. In this
58 case it is based on the ordering of the streams in the program.
59
60 stream_type[:additional_stream_specifier]
61 stream_type is one of following: 'v' or 'V' for video, 'a' for
62 audio, 's' for subtitle, 'd' for data, and 't' for attachments. 'v'
63 matches all video streams, 'V' only matches video streams which are
64 not attached pictures, video thumbnails or cover arts. If
65 additional_stream_specifier is used, then it matches streams which
66 both have this type and match the additional_stream_specifier.
67 Otherwise, it matches all streams of the specified type.
68
69 p:program_id[:additional_stream_specifier]
70 Matches streams which are in the program with the id program_id. If
71 additional_stream_specifier is used, then it matches streams which
72 both are part of the program and match the
73 additional_stream_specifier.
74
75 #stream_id or i:stream_id
76 Match the stream by stream id (e.g. PID in MPEG-TS container).
77
78 m:key[:value]
79 Matches streams with the metadata tag key having the specified
80 value. If value is not given, matches streams that contain the
81 given tag with any value.
82
83 u Matches streams with usable configuration, the codec must be
84 defined and the essential information such as video dimension or
85 audio sample rate must be present.
86
87 Note that in ffmpeg, matching by metadata will only work properly
88 for input files.
89
90 Generic options
91 These options are shared amongst the ff* tools.
92
93 -L Show license.
94
95 -h, -?, -help, --help [arg]
96 Show help. An optional parameter may be specified to print help
97 about a specific item. If no argument is specified, only basic (non
98 advanced) tool options are shown.
99
100 Possible values of arg are:
101
102 long
103 Print advanced tool options in addition to the basic tool
104 options.
105
106 full
107 Print complete list of options, including shared and private
108 options for encoders, decoders, demuxers, muxers, filters, etc.
109
110 decoder=decoder_name
111 Print detailed information about the decoder named
112 decoder_name. Use the -decoders option to get a list of all
113 decoders.
114
115 encoder=encoder_name
116 Print detailed information about the encoder named
117 encoder_name. Use the -encoders option to get a list of all
118 encoders.
119
120 demuxer=demuxer_name
121 Print detailed information about the demuxer named
122 demuxer_name. Use the -formats option to get a list of all
123 demuxers and muxers.
124
125 muxer=muxer_name
126 Print detailed information about the muxer named muxer_name.
127 Use the -formats option to get a list of all muxers and
128 demuxers.
129
130 filter=filter_name
131 Print detailed information about the filter named filter_name.
132 Use the -filters option to get a list of all filters.
133
134 bsf=bitstream_filter_name
135 Print detailed information about the bitstream filter named
136 bitstream_filter_name. Use the -bsfs option to get a list of
137 all bitstream filters.
138
139 protocol=protocol_name
140 Print detailed information about the protocol named
141 protocol_name. Use the -protocols option to get a list of all
142 protocols.
143
144 -version
145 Show version.
146
147 -buildconf
148 Show the build configuration, one option per line.
149
150 -formats
151 Show available formats (including devices).
152
153 -demuxers
154 Show available demuxers.
155
156 -muxers
157 Show available muxers.
158
159 -devices
160 Show available devices.
161
162 -codecs
163 Show all codecs known to libavcodec.
164
165 Note that the term 'codec' is used throughout this documentation as
166 a shortcut for what is more correctly called a media bitstream
167 format.
168
169 -decoders
170 Show available decoders.
171
172 -encoders
173 Show all available encoders.
174
175 -bsfs
176 Show available bitstream filters.
177
178 -protocols
179 Show available protocols.
180
181 -filters
182 Show available libavfilter filters.
183
184 -pix_fmts
185 Show available pixel formats.
186
187 -sample_fmts
188 Show available sample formats.
189
190 -layouts
191 Show channel names and standard channel layouts.
192
193 -dispositions
194 Show stream dispositions.
195
196 -colors
197 Show recognized color names.
198
199 -sources device[,opt1=val1[,opt2=val2]...]
200 Show autodetected sources of the input device. Some devices may
201 provide system-dependent source names that cannot be autodetected.
202 The returned list cannot be assumed to be always complete.
203
204 ffmpeg -sources pulse,server=192.168.0.4
205
206 -sinks device[,opt1=val1[,opt2=val2]...]
207 Show autodetected sinks of the output device. Some devices may
208 provide system-dependent sink names that cannot be autodetected.
209 The returned list cannot be assumed to be always complete.
210
211 ffmpeg -sinks pulse,server=192.168.0.4
212
213 -loglevel [flags+]loglevel | -v [flags+]loglevel
214 Set logging level and flags used by the library.
215
216 The optional flags prefix can consist of the following values:
217
218 repeat
219 Indicates that repeated log output should not be compressed to
220 the first line and the "Last message repeated n times" line
221 will be omitted.
222
223 level
224 Indicates that log output should add a "[level]" prefix to each
225 message line. This can be used as an alternative to log
226 coloring, e.g. when dumping the log to file.
227
228 Flags can also be used alone by adding a '+'/'-' prefix to
229 set/reset a single flag without affecting other flags or changing
230 loglevel. When setting both flags and loglevel, a '+' separator is
231 expected between the last flags value and before loglevel.
232
233 loglevel is a string or a number containing one of the following
234 values:
235
236 quiet, -8
237 Show nothing at all; be silent.
238
239 panic, 0
240 Only show fatal errors which could lead the process to crash,
241 such as an assertion failure. This is not currently used for
242 anything.
243
244 fatal, 8
245 Only show fatal errors. These are errors after which the
246 process absolutely cannot continue.
247
248 error, 16
249 Show all errors, including ones which can be recovered from.
250
251 warning, 24
252 Show all warnings and errors. Any message related to possibly
253 incorrect or unexpected events will be shown.
254
255 info, 32
256 Show informative messages during processing. This is in
257 addition to warnings and errors. This is the default value.
258
259 verbose, 40
260 Same as "info", except more verbose.
261
262 debug, 48
263 Show everything, including debugging information.
264
265 trace, 56
266
267 For example to enable repeated log output, add the "level" prefix,
268 and set loglevel to "verbose":
269
270 ffmpeg -loglevel repeat+level+verbose -i input output
271
272 Another example that enables repeated log output without affecting
273 current state of "level" prefix flag or loglevel:
274
275 ffmpeg [...] -loglevel +repeat
276
277 By default the program logs to stderr. If coloring is supported by
278 the terminal, colors are used to mark errors and warnings. Log
279 coloring can be disabled setting the environment variable
280 AV_LOG_FORCE_NOCOLOR, or can be forced setting the environment
281 variable AV_LOG_FORCE_COLOR.
282
283 -report
284 Dump full command line and log output to a file named
285 "program-YYYYMMDD-HHMMSS.log" in the current directory. This file
286 can be useful for bug reports. It also implies "-loglevel debug".
287
288 Setting the environment variable FFREPORT to any value has the same
289 effect. If the value is a ':'-separated key=value sequence, these
290 options will affect the report; option values must be escaped if
291 they contain special characters or the options delimiter ':' (see
292 the ``Quoting and escaping'' section in the ffmpeg-utils manual).
293
294 The following options are recognized:
295
296 file
297 set the file name to use for the report; %p is expanded to the
298 name of the program, %t is expanded to a timestamp, "%%" is
299 expanded to a plain "%"
300
301 level
302 set the log verbosity level using a numerical value (see
303 "-loglevel").
304
305 For example, to output a report to a file named ffreport.log using
306 a log level of 32 (alias for log level "info"):
307
308 FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
309
310 Errors in parsing the environment variable are not fatal, and will
311 not appear in the report.
312
313 -hide_banner
314 Suppress printing banner.
315
316 All FFmpeg tools will normally show a copyright notice, build
317 options and library versions. This option can be used to suppress
318 printing this information.
319
320 -cpuflags flags (global)
321 Allows setting and clearing cpu flags. This option is intended for
322 testing. Do not use it unless you know what you're doing.
323
324 ffmpeg -cpuflags -sse+mmx ...
325 ffmpeg -cpuflags mmx ...
326 ffmpeg -cpuflags 0 ...
327
328 Possible flags for this option are:
329
330 x86
331 mmx
332 mmxext
333 sse
334 sse2
335 sse2slow
336 sse3
337 sse3slow
338 ssse3
339 atom
340 sse4.1
341 sse4.2
342 avx
343 avx2
344 xop
345 fma3
346 fma4
347 3dnow
348 3dnowext
349 bmi1
350 bmi2
351 cmov
352 ARM
353 armv5te
354 armv6
355 armv6t2
356 vfp
357 vfpv3
358 neon
359 setend
360 AArch64
361 armv8
362 vfp
363 neon
364 PowerPC
365 altivec
366 Specific Processors
367 pentium2
368 pentium3
369 pentium4
370 k6
371 k62
372 athlon
373 athlonxp
374 k8
375 -cpucount count (global)
376 Override detection of CPU count. This option is intended for
377 testing. Do not use it unless you know what you're doing.
378
379 ffmpeg -cpucount 2
380
381 -max_alloc bytes
382 Set the maximum size limit for allocating a block on the heap by
383 ffmpeg's family of malloc functions. Exercise extreme caution when
384 using this option. Don't use if you do not understand the full
385 consequence of doing so. Default is INT_MAX.
386
387 AVOptions
388 These options are provided directly by the libavformat, libavdevice and
389 libavcodec libraries. To see the list of available AVOptions, use the
390 -help option. They are separated into two categories:
391
392 generic
393 These options can be set for any container, codec or device.
394 Generic options are listed under AVFormatContext options for
395 containers/devices and under AVCodecContext options for codecs.
396
397 private
398 These options are specific to the given container, device or codec.
399 Private options are listed under their corresponding
400 containers/devices/codecs.
401
402 For example to write an ID3v2.3 header instead of a default ID3v2.4 to
403 an MP3 file, use the id3v2_version private option of the MP3 muxer:
404
405 ffmpeg -i input.flac -id3v2_version 3 out.mp3
406
407 All codec AVOptions are per-stream, and thus a stream specifier should
408 be attached to them:
409
410 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
411
412 In the above example, a multichannel audio stream is mapped twice for
413 output. The first instance is encoded with codec ac3 and bitrate 640k.
414 The second instance is downmixed to 2 channels and encoded with codec
415 aac. A bitrate of 128k is specified for it using absolute index of the
416 output stream.
417
418 Note: the -nooption syntax cannot be used for boolean AVOptions, use
419 -option 0/-option 1.
420
421 Note: the old undocumented way of specifying per-stream AVOptions by
422 prepending v/a/s to the options name is now obsolete and will be
423 removed soon.
424
425 Main options
426 -x width
427 Force displayed width.
428
429 -y height
430 Force displayed height.
431
432 -s size
433 Set frame size (WxH or abbreviation), needed for videos which do
434 not contain a header with the frame size like raw YUV. This option
435 has been deprecated in favor of private options, try -video_size.
436
437 -fs Start in fullscreen mode.
438
439 -an Disable audio.
440
441 -vn Disable video.
442
443 -sn Disable subtitles.
444
445 -ss pos
446 Seek to pos. Note that in most formats it is not possible to seek
447 exactly, so ffplay will seek to the nearest seek point to pos.
448
449 pos must be a time duration specification, see the Time duration
450 section in the ffmpeg-utils(1) manual.
451
452 -t duration
453 Play duration seconds of audio/video.
454
455 duration must be a time duration specification, see the Time
456 duration section in the ffmpeg-utils(1) manual.
457
458 -bytes
459 Seek by bytes.
460
461 -seek_interval
462 Set custom interval, in seconds, for seeking using left/right keys.
463 Default is 10 seconds.
464
465 -nodisp
466 Disable graphical display.
467
468 -noborder
469 Borderless window.
470
471 -alwaysontop
472 Window always on top. Available on: X11 with SDL >= 2.0.5, Windows
473 SDL >= 2.0.6.
474
475 -volume
476 Set the startup volume. 0 means silence, 100 means no volume
477 reduction or amplification. Negative values are treated as 0,
478 values above 100 are treated as 100.
479
480 -f fmt
481 Force format.
482
483 -window_title title
484 Set window title (default is the input filename).
485
486 -left title
487 Set the x position for the left of the window (default is a
488 centered window).
489
490 -top title
491 Set the y position for the top of the window (default is a centered
492 window).
493
494 -loop number
495 Loops movie playback <number> times. 0 means forever.
496
497 -showmode mode
498 Set the show mode to use. Available values for mode are:
499
500 0, video
501 show video
502
503 1, waves
504 show audio waves
505
506 2, rdft
507 show audio frequency band using RDFT ((Inverse) Real Discrete
508 Fourier Transform)
509
510 Default value is "video", if video is not present or cannot be
511 played "rdft" is automatically selected.
512
513 You can interactively cycle through the available show modes by
514 pressing the key w.
515
516 -vf filtergraph
517 Create the filtergraph specified by filtergraph and use it to
518 filter the video stream.
519
520 filtergraph is a description of the filtergraph to apply to the
521 stream, and must have a single video input and a single video
522 output. In the filtergraph, the input is associated to the label
523 "in", and the output to the label "out". See the ffmpeg-filters
524 manual for more information about the filtergraph syntax.
525
526 You can specify this parameter multiple times and cycle through the
527 specified filtergraphs along with the show modes by pressing the
528 key w.
529
530 -af filtergraph
531 filtergraph is a description of the filtergraph to apply to the
532 input audio. Use the option "-filters" to show all the available
533 filters (including sources and sinks).
534
535 -i input_url
536 Read input_url.
537
538 Advanced options
539 -pix_fmt format
540 Set pixel format. This option has been deprecated in favor of
541 private options, try -pixel_format.
542
543 -stats
544 Print several playback statistics, in particular show the stream
545 duration, the codec parameters, the current position in the stream
546 and the audio/video synchronisation drift. It is shown by default,
547 unless the log level is lower than "info". Its display can be
548 forced by manually specifying this option. To disable it, you need
549 to specify "-nostats".
550
551 -fast
552 Non-spec-compliant optimizations.
553
554 -genpts
555 Generate pts.
556
557 -sync type
558 Set the master clock to audio ("type=audio"), video ("type=video")
559 or external ("type=ext"). Default is audio. The master clock is
560 used to control audio-video synchronization. Most media players use
561 audio as master clock, but in some cases (streaming or high quality
562 broadcast) it is necessary to change that. This option is mainly
563 used for debugging purposes.
564
565 -ast audio_stream_specifier
566 Select the desired audio stream using the given stream specifier.
567 The stream specifiers are described in the Stream specifiers
568 chapter. If this option is not specified, the "best" audio stream
569 is selected in the program of the already selected video stream.
570
571 -vst video_stream_specifier
572 Select the desired video stream using the given stream specifier.
573 The stream specifiers are described in the Stream specifiers
574 chapter. If this option is not specified, the "best" video stream
575 is selected.
576
577 -sst subtitle_stream_specifier
578 Select the desired subtitle stream using the given stream
579 specifier. The stream specifiers are described in the Stream
580 specifiers chapter. If this option is not specified, the "best"
581 subtitle stream is selected in the program of the already selected
582 video or audio stream.
583
584 -autoexit
585 Exit when video is done playing.
586
587 -exitonkeydown
588 Exit if any key is pressed.
589
590 -exitonmousedown
591 Exit if any mouse button is pressed.
592
593 -codec:media_specifier codec_name
594 Force a specific decoder implementation for the stream identified
595 by media_specifier, which can assume the values "a" (audio), "v"
596 (video), and "s" subtitle.
597
598 -acodec codec_name
599 Force a specific audio decoder.
600
601 -vcodec codec_name
602 Force a specific video decoder.
603
604 -scodec codec_name
605 Force a specific subtitle decoder.
606
607 -autorotate
608 Automatically rotate the video according to file metadata. Enabled
609 by default, use -noautorotate to disable it.
610
611 -framedrop
612 Drop video frames if video is out of sync. Enabled by default if
613 the master clock is not set to video. Use this option to enable
614 frame dropping for all master clock sources, use -noframedrop to
615 disable it.
616
617 -infbuf
618 Do not limit the input buffer size, read as much data as possible
619 from the input as soon as possible. Enabled by default for realtime
620 streams, where data may be dropped if not read in time. Use this
621 option to enable infinite buffers for all inputs, use -noinfbuf to
622 disable it.
623
624 -filter_threads nb_threads
625 Defines how many threads are used to process a filter pipeline.
626 Each pipeline will produce a thread pool with this many threads
627 available for parallel processing. The default is 0 which means
628 that the thread count will be determined by the number of available
629 CPUs.
630
631 While playing
632 q, ESC
633 Quit.
634
635 f Toggle full screen.
636
637 p, SPC
638 Pause.
639
640 m Toggle mute.
641
642 9, 0
643 Decrease and increase volume respectively.
644
645 /, *
646 Decrease and increase volume respectively.
647
648 a Cycle audio channel in the current program.
649
650 v Cycle video channel.
651
652 t Cycle subtitle channel in the current program.
653
654 c Cycle program.
655
656 w Cycle video filters or show modes.
657
658 s Step to the next frame.
659
660 Pause if the stream is not already paused, step to the next video
661 frame, and pause.
662
663 left/right
664 Seek backward/forward 10 seconds.
665
666 down/up
667 Seek backward/forward 1 minute.
668
669 page down/page up
670 Seek to the previous/next chapter. or if there are no chapters
671 Seek backward/forward 10 minutes.
672
673 right mouse click
674 Seek to percentage in file corresponding to fraction of width.
675
676 left mouse double-click
677 Toggle full screen.
678
680 This section documents the syntax and formats employed by the FFmpeg
681 libraries and tools.
682
683 Quoting and escaping
684 FFmpeg adopts the following quoting and escaping mechanism, unless
685 explicitly specified. The following rules are applied:
686
687 • ' and \ are special characters (respectively used for quoting and
688 escaping). In addition to them, there might be other special
689 characters depending on the specific syntax where the escaping and
690 quoting are employed.
691
692 • A special character is escaped by prefixing it with a \.
693
694 • All characters enclosed between '' are included literally in the
695 parsed string. The quote character ' itself cannot be quoted, so
696 you may need to close the quote and escape it.
697
698 • Leading and trailing whitespaces, unless escaped or quoted, are
699 removed from the parsed string.
700
701 Note that you may need to add a second level of escaping when using the
702 command line or a script, which depends on the syntax of the adopted
703 shell language.
704
705 The function "av_get_token" defined in libavutil/avstring.h can be used
706 to parse a token quoted or escaped according to the rules defined
707 above.
708
709 The tool tools/ffescape in the FFmpeg source tree can be used to
710 automatically quote or escape a string in a script.
711
712 Examples
713
714 • Escape the string "Crime d'Amour" containing the "'" special
715 character:
716
717 Crime d\'Amour
718
719 • The string above contains a quote, so the "'" needs to be escaped
720 when quoting it:
721
722 'Crime d'\''Amour'
723
724 • Include leading or trailing whitespaces using quoting:
725
726 ' this string starts and ends with whitespaces '
727
728 • Escaping and quoting can be mixed together:
729
730 ' The string '\'string\'' is a string '
731
732 • To include a literal \ you can use either escaping or quoting:
733
734 'c:\foo' can be written as c:\\foo
735
736 Date
737 The accepted syntax is:
738
739 [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
740 now
741
742 If the value is "now" it takes the current time.
743
744 Time is local time unless Z is appended, in which case it is
745 interpreted as UTC. If the year-month-day part is not specified it
746 takes the current year-month-day.
747
748 Time duration
749 There are two accepted syntaxes for expressing time duration.
750
751 [-][<HH>:]<MM>:<SS>[.<m>...]
752
753 HH expresses the number of hours, MM the number of minutes for a
754 maximum of 2 digits, and SS the number of seconds for a maximum of 2
755 digits. The m at the end expresses decimal value for SS.
756
757 or
758
759 [-]<S>+[.<m>...][s|ms|us]
760
761 S expresses the number of seconds, with the optional decimal part m.
762 The optional literal suffixes s, ms or us indicate to interpret the
763 value as seconds, milliseconds or microseconds, respectively.
764
765 In both expressions, the optional - indicates negative duration.
766
767 Examples
768
769 The following examples are all valid time duration:
770
771 55 55 seconds
772
773 0.2 0.2 seconds
774
775 200ms
776 200 milliseconds, that's 0.2s
777
778 200000us
779 200000 microseconds, that's 0.2s
780
781 12:03:45
782 12 hours, 03 minutes and 45 seconds
783
784 23.189
785 23.189 seconds
786
787 Video size
788 Specify the size of the sourced video, it may be a string of the form
789 widthxheight, or the name of a size abbreviation.
790
791 The following abbreviations are recognized:
792
793 ntsc
794 720x480
795
796 pal 720x576
797
798 qntsc
799 352x240
800
801 qpal
802 352x288
803
804 sntsc
805 640x480
806
807 spal
808 768x576
809
810 film
811 352x240
812
813 ntsc-film
814 352x240
815
816 sqcif
817 128x96
818
819 qcif
820 176x144
821
822 cif 352x288
823
824 4cif
825 704x576
826
827 16cif
828 1408x1152
829
830 qqvga
831 160x120
832
833 qvga
834 320x240
835
836 vga 640x480
837
838 svga
839 800x600
840
841 xga 1024x768
842
843 uxga
844 1600x1200
845
846 qxga
847 2048x1536
848
849 sxga
850 1280x1024
851
852 qsxga
853 2560x2048
854
855 hsxga
856 5120x4096
857
858 wvga
859 852x480
860
861 wxga
862 1366x768
863
864 wsxga
865 1600x1024
866
867 wuxga
868 1920x1200
869
870 woxga
871 2560x1600
872
873 wqsxga
874 3200x2048
875
876 wquxga
877 3840x2400
878
879 whsxga
880 6400x4096
881
882 whuxga
883 7680x4800
884
885 cga 320x200
886
887 ega 640x350
888
889 hd480
890 852x480
891
892 hd720
893 1280x720
894
895 hd1080
896 1920x1080
897
898 2k 2048x1080
899
900 2kflat
901 1998x1080
902
903 2kscope
904 2048x858
905
906 4k 4096x2160
907
908 4kflat
909 3996x2160
910
911 4kscope
912 4096x1716
913
914 nhd 640x360
915
916 hqvga
917 240x160
918
919 wqvga
920 400x240
921
922 fwqvga
923 432x240
924
925 hvga
926 480x320
927
928 qhd 960x540
929
930 2kdci
931 2048x1080
932
933 4kdci
934 4096x2160
935
936 uhd2160
937 3840x2160
938
939 uhd4320
940 7680x4320
941
942 Video rate
943 Specify the frame rate of a video, expressed as the number of frames
944 generated per second. It has to be a string in the format
945 frame_rate_num/frame_rate_den, an integer number, a float number or a
946 valid video frame rate abbreviation.
947
948 The following abbreviations are recognized:
949
950 ntsc
951 30000/1001
952
953 pal 25/1
954
955 qntsc
956 30000/1001
957
958 qpal
959 25/1
960
961 sntsc
962 30000/1001
963
964 spal
965 25/1
966
967 film
968 24/1
969
970 ntsc-film
971 24000/1001
972
973 Ratio
974 A ratio can be expressed as an expression, or in the form
975 numerator:denominator.
976
977 Note that a ratio with infinite (1/0) or negative value is considered
978 valid, so you should check on the returned value if you want to exclude
979 those values.
980
981 The undefined value can be expressed using the "0:0" string.
982
983 Color
984 It can be the name of a color as defined below (case insensitive match)
985 or a "[0x|#]RRGGBB[AA]" sequence, possibly followed by @ and a string
986 representing the alpha component.
987
988 The alpha component may be a string composed by "0x" followed by an
989 hexadecimal number or a decimal number between 0.0 and 1.0, which
990 represents the opacity value (0x00 or 0.0 means completely transparent,
991 0xff or 1.0 completely opaque). If the alpha component is not specified
992 then 0xff is assumed.
993
994 The string random will result in a random color.
995
996 The following names of colors are recognized:
997
998 AliceBlue
999 0xF0F8FF
1000
1001 AntiqueWhite
1002 0xFAEBD7
1003
1004 Aqua
1005 0x00FFFF
1006
1007 Aquamarine
1008 0x7FFFD4
1009
1010 Azure
1011 0xF0FFFF
1012
1013 Beige
1014 0xF5F5DC
1015
1016 Bisque
1017 0xFFE4C4
1018
1019 Black
1020 0x000000
1021
1022 BlanchedAlmond
1023 0xFFEBCD
1024
1025 Blue
1026 0x0000FF
1027
1028 BlueViolet
1029 0x8A2BE2
1030
1031 Brown
1032 0xA52A2A
1033
1034 BurlyWood
1035 0xDEB887
1036
1037 CadetBlue
1038 0x5F9EA0
1039
1040 Chartreuse
1041 0x7FFF00
1042
1043 Chocolate
1044 0xD2691E
1045
1046 Coral
1047 0xFF7F50
1048
1049 CornflowerBlue
1050 0x6495ED
1051
1052 Cornsilk
1053 0xFFF8DC
1054
1055 Crimson
1056 0xDC143C
1057
1058 Cyan
1059 0x00FFFF
1060
1061 DarkBlue
1062 0x00008B
1063
1064 DarkCyan
1065 0x008B8B
1066
1067 DarkGoldenRod
1068 0xB8860B
1069
1070 DarkGray
1071 0xA9A9A9
1072
1073 DarkGreen
1074 0x006400
1075
1076 DarkKhaki
1077 0xBDB76B
1078
1079 DarkMagenta
1080 0x8B008B
1081
1082 DarkOliveGreen
1083 0x556B2F
1084
1085 Darkorange
1086 0xFF8C00
1087
1088 DarkOrchid
1089 0x9932CC
1090
1091 DarkRed
1092 0x8B0000
1093
1094 DarkSalmon
1095 0xE9967A
1096
1097 DarkSeaGreen
1098 0x8FBC8F
1099
1100 DarkSlateBlue
1101 0x483D8B
1102
1103 DarkSlateGray
1104 0x2F4F4F
1105
1106 DarkTurquoise
1107 0x00CED1
1108
1109 DarkViolet
1110 0x9400D3
1111
1112 DeepPink
1113 0xFF1493
1114
1115 DeepSkyBlue
1116 0x00BFFF
1117
1118 DimGray
1119 0x696969
1120
1121 DodgerBlue
1122 0x1E90FF
1123
1124 FireBrick
1125 0xB22222
1126
1127 FloralWhite
1128 0xFFFAF0
1129
1130 ForestGreen
1131 0x228B22
1132
1133 Fuchsia
1134 0xFF00FF
1135
1136 Gainsboro
1137 0xDCDCDC
1138
1139 GhostWhite
1140 0xF8F8FF
1141
1142 Gold
1143 0xFFD700
1144
1145 GoldenRod
1146 0xDAA520
1147
1148 Gray
1149 0x808080
1150
1151 Green
1152 0x008000
1153
1154 GreenYellow
1155 0xADFF2F
1156
1157 HoneyDew
1158 0xF0FFF0
1159
1160 HotPink
1161 0xFF69B4
1162
1163 IndianRed
1164 0xCD5C5C
1165
1166 Indigo
1167 0x4B0082
1168
1169 Ivory
1170 0xFFFFF0
1171
1172 Khaki
1173 0xF0E68C
1174
1175 Lavender
1176 0xE6E6FA
1177
1178 LavenderBlush
1179 0xFFF0F5
1180
1181 LawnGreen
1182 0x7CFC00
1183
1184 LemonChiffon
1185 0xFFFACD
1186
1187 LightBlue
1188 0xADD8E6
1189
1190 LightCoral
1191 0xF08080
1192
1193 LightCyan
1194 0xE0FFFF
1195
1196 LightGoldenRodYellow
1197 0xFAFAD2
1198
1199 LightGreen
1200 0x90EE90
1201
1202 LightGrey
1203 0xD3D3D3
1204
1205 LightPink
1206 0xFFB6C1
1207
1208 LightSalmon
1209 0xFFA07A
1210
1211 LightSeaGreen
1212 0x20B2AA
1213
1214 LightSkyBlue
1215 0x87CEFA
1216
1217 LightSlateGray
1218 0x778899
1219
1220 LightSteelBlue
1221 0xB0C4DE
1222
1223 LightYellow
1224 0xFFFFE0
1225
1226 Lime
1227 0x00FF00
1228
1229 LimeGreen
1230 0x32CD32
1231
1232 Linen
1233 0xFAF0E6
1234
1235 Magenta
1236 0xFF00FF
1237
1238 Maroon
1239 0x800000
1240
1241 MediumAquaMarine
1242 0x66CDAA
1243
1244 MediumBlue
1245 0x0000CD
1246
1247 MediumOrchid
1248 0xBA55D3
1249
1250 MediumPurple
1251 0x9370D8
1252
1253 MediumSeaGreen
1254 0x3CB371
1255
1256 MediumSlateBlue
1257 0x7B68EE
1258
1259 MediumSpringGreen
1260 0x00FA9A
1261
1262 MediumTurquoise
1263 0x48D1CC
1264
1265 MediumVioletRed
1266 0xC71585
1267
1268 MidnightBlue
1269 0x191970
1270
1271 MintCream
1272 0xF5FFFA
1273
1274 MistyRose
1275 0xFFE4E1
1276
1277 Moccasin
1278 0xFFE4B5
1279
1280 NavajoWhite
1281 0xFFDEAD
1282
1283 Navy
1284 0x000080
1285
1286 OldLace
1287 0xFDF5E6
1288
1289 Olive
1290 0x808000
1291
1292 OliveDrab
1293 0x6B8E23
1294
1295 Orange
1296 0xFFA500
1297
1298 OrangeRed
1299 0xFF4500
1300
1301 Orchid
1302 0xDA70D6
1303
1304 PaleGoldenRod
1305 0xEEE8AA
1306
1307 PaleGreen
1308 0x98FB98
1309
1310 PaleTurquoise
1311 0xAFEEEE
1312
1313 PaleVioletRed
1314 0xD87093
1315
1316 PapayaWhip
1317 0xFFEFD5
1318
1319 PeachPuff
1320 0xFFDAB9
1321
1322 Peru
1323 0xCD853F
1324
1325 Pink
1326 0xFFC0CB
1327
1328 Plum
1329 0xDDA0DD
1330
1331 PowderBlue
1332 0xB0E0E6
1333
1334 Purple
1335 0x800080
1336
1337 Red 0xFF0000
1338
1339 RosyBrown
1340 0xBC8F8F
1341
1342 RoyalBlue
1343 0x4169E1
1344
1345 SaddleBrown
1346 0x8B4513
1347
1348 Salmon
1349 0xFA8072
1350
1351 SandyBrown
1352 0xF4A460
1353
1354 SeaGreen
1355 0x2E8B57
1356
1357 SeaShell
1358 0xFFF5EE
1359
1360 Sienna
1361 0xA0522D
1362
1363 Silver
1364 0xC0C0C0
1365
1366 SkyBlue
1367 0x87CEEB
1368
1369 SlateBlue
1370 0x6A5ACD
1371
1372 SlateGray
1373 0x708090
1374
1375 Snow
1376 0xFFFAFA
1377
1378 SpringGreen
1379 0x00FF7F
1380
1381 SteelBlue
1382 0x4682B4
1383
1384 Tan 0xD2B48C
1385
1386 Teal
1387 0x008080
1388
1389 Thistle
1390 0xD8BFD8
1391
1392 Tomato
1393 0xFF6347
1394
1395 Turquoise
1396 0x40E0D0
1397
1398 Violet
1399 0xEE82EE
1400
1401 Wheat
1402 0xF5DEB3
1403
1404 White
1405 0xFFFFFF
1406
1407 WhiteSmoke
1408 0xF5F5F5
1409
1410 Yellow
1411 0xFFFF00
1412
1413 YellowGreen
1414 0x9ACD32
1415
1416 Channel Layout
1417 A channel layout specifies the spatial disposition of the channels in a
1418 multi-channel audio stream. To specify a channel layout, FFmpeg makes
1419 use of a special syntax.
1420
1421 Individual channels are identified by an id, as given by the table
1422 below:
1423
1424 FL front left
1425
1426 FR front right
1427
1428 FC front center
1429
1430 LFE low frequency
1431
1432 BL back left
1433
1434 BR back right
1435
1436 FLC front left-of-center
1437
1438 FRC front right-of-center
1439
1440 BC back center
1441
1442 SL side left
1443
1444 SR side right
1445
1446 TC top center
1447
1448 TFL top front left
1449
1450 TFC top front center
1451
1452 TFR top front right
1453
1454 TBL top back left
1455
1456 TBC top back center
1457
1458 TBR top back right
1459
1460 DL downmix left
1461
1462 DR downmix right
1463
1464 WL wide left
1465
1466 WR wide right
1467
1468 SDL surround direct left
1469
1470 SDR surround direct right
1471
1472 LFE2
1473 low frequency 2
1474
1475 Standard channel layout compositions can be specified by using the
1476 following identifiers:
1477
1478 mono
1479 FC
1480
1481 stereo
1482 FL+FR
1483
1484 2.1 FL+FR+LFE
1485
1486 3.0 FL+FR+FC
1487
1488 3.0(back)
1489 FL+FR+BC
1490
1491 4.0 FL+FR+FC+BC
1492
1493 quad
1494 FL+FR+BL+BR
1495
1496 quad(side)
1497 FL+FR+SL+SR
1498
1499 3.1 FL+FR+FC+LFE
1500
1501 5.0 FL+FR+FC+BL+BR
1502
1503 5.0(side)
1504 FL+FR+FC+SL+SR
1505
1506 4.1 FL+FR+FC+LFE+BC
1507
1508 5.1 FL+FR+FC+LFE+BL+BR
1509
1510 5.1(side)
1511 FL+FR+FC+LFE+SL+SR
1512
1513 6.0 FL+FR+FC+BC+SL+SR
1514
1515 6.0(front)
1516 FL+FR+FLC+FRC+SL+SR
1517
1518 hexagonal
1519 FL+FR+FC+BL+BR+BC
1520
1521 6.1 FL+FR+FC+LFE+BC+SL+SR
1522
1523 6.1 FL+FR+FC+LFE+BL+BR+BC
1524
1525 6.1(front)
1526 FL+FR+LFE+FLC+FRC+SL+SR
1527
1528 7.0 FL+FR+FC+BL+BR+SL+SR
1529
1530 7.0(front)
1531 FL+FR+FC+FLC+FRC+SL+SR
1532
1533 7.1 FL+FR+FC+LFE+BL+BR+SL+SR
1534
1535 7.1(wide)
1536 FL+FR+FC+LFE+BL+BR+FLC+FRC
1537
1538 7.1(wide-side)
1539 FL+FR+FC+LFE+FLC+FRC+SL+SR
1540
1541 octagonal
1542 FL+FR+FC+BL+BR+BC+SL+SR
1543
1544 hexadecagonal
1545 FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
1546
1547 downmix
1548 DL+DR
1549
1550 22.2
1551 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
1552
1553 A custom channel layout can be specified as a sequence of terms,
1554 separated by '+' or '|'. Each term can be:
1555
1556 • the name of a standard channel layout (e.g. mono, stereo, 4.0,
1557 quad, 5.0, etc.)
1558
1559 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.)
1560
1561 • a number of channels, in decimal, followed by 'c', yielding the
1562 default channel layout for that number of channels (see the
1563 function "av_get_default_channel_layout"). Note that not all
1564 channel counts have a default layout.
1565
1566 • a number of channels, in decimal, followed by 'C', yielding an
1567 unknown channel layout with the specified number of channels. Note
1568 that not all channel layout specification strings support unknown
1569 channel layouts.
1570
1571 • a channel layout mask, in hexadecimal starting with "0x" (see the
1572 "AV_CH_*" macros in libavutil/channel_layout.h.
1573
1574 Before libavutil version 53 the trailing character "c" to specify a
1575 number of channels was optional, but now it is required, while a
1576 channel layout mask can also be specified as a decimal number (if and
1577 only if not followed by "c" or "C").
1578
1579 See also the function "av_get_channel_layout" defined in
1580 libavutil/channel_layout.h.
1581
1583 When evaluating an arithmetic expression, FFmpeg uses an internal
1584 formula evaluator, implemented through the libavutil/eval.h interface.
1585
1586 An expression may contain unary, binary operators, constants, and
1587 functions.
1588
1589 Two expressions expr1 and expr2 can be combined to form another
1590 expression "expr1;expr2". expr1 and expr2 are evaluated in turn, and
1591 the new expression evaluates to the value of expr2.
1592
1593 The following binary operators are available: "+", "-", "*", "/", "^".
1594
1595 The following unary operators are available: "+", "-".
1596
1597 The following functions are available:
1598
1599 abs(x)
1600 Compute absolute value of x.
1601
1602 acos(x)
1603 Compute arccosine of x.
1604
1605 asin(x)
1606 Compute arcsine of x.
1607
1608 atan(x)
1609 Compute arctangent of x.
1610
1611 atan2(x, y)
1612 Compute principal value of the arc tangent of y/x.
1613
1614 between(x, min, max)
1615 Return 1 if x is greater than or equal to min and lesser than or
1616 equal to max, 0 otherwise.
1617
1618 bitand(x, y)
1619 bitor(x, y)
1620 Compute bitwise and/or operation on x and y.
1621
1622 The results of the evaluation of x and y are converted to integers
1623 before executing the bitwise operation.
1624
1625 Note that both the conversion to integer and the conversion back to
1626 floating point can lose precision. Beware of unexpected results for
1627 large numbers (usually 2^53 and larger).
1628
1629 ceil(expr)
1630 Round the value of expression expr upwards to the nearest integer.
1631 For example, "ceil(1.5)" is "2.0".
1632
1633 clip(x, min, max)
1634 Return the value of x clipped between min and max.
1635
1636 cos(x)
1637 Compute cosine of x.
1638
1639 cosh(x)
1640 Compute hyperbolic cosine of x.
1641
1642 eq(x, y)
1643 Return 1 if x and y are equivalent, 0 otherwise.
1644
1645 exp(x)
1646 Compute exponential of x (with base "e", the Euler's number).
1647
1648 floor(expr)
1649 Round the value of expression expr downwards to the nearest
1650 integer. For example, "floor(-1.5)" is "-2.0".
1651
1652 gauss(x)
1653 Compute Gauss function of x, corresponding to "exp(-x*x/2) /
1654 sqrt(2*PI)".
1655
1656 gcd(x, y)
1657 Return the greatest common divisor of x and y. If both x and y are
1658 0 or either or both are less than zero then behavior is undefined.
1659
1660 gt(x, y)
1661 Return 1 if x is greater than y, 0 otherwise.
1662
1663 gte(x, y)
1664 Return 1 if x is greater than or equal to y, 0 otherwise.
1665
1666 hypot(x, y)
1667 This function is similar to the C function with the same name; it
1668 returns "sqrt(x*x + y*y)", the length of the hypotenuse of a right
1669 triangle with sides of length x and y, or the distance of the point
1670 (x, y) from the origin.
1671
1672 if(x, y)
1673 Evaluate x, and if the result is non-zero return the result of the
1674 evaluation of y, return 0 otherwise.
1675
1676 if(x, y, z)
1677 Evaluate x, and if the result is non-zero return the evaluation
1678 result of y, otherwise the evaluation result of z.
1679
1680 ifnot(x, y)
1681 Evaluate x, and if the result is zero return the result of the
1682 evaluation of y, return 0 otherwise.
1683
1684 ifnot(x, y, z)
1685 Evaluate x, and if the result is zero return the evaluation result
1686 of y, otherwise the evaluation result of z.
1687
1688 isinf(x)
1689 Return 1.0 if x is +/-INFINITY, 0.0 otherwise.
1690
1691 isnan(x)
1692 Return 1.0 if x is NAN, 0.0 otherwise.
1693
1694 ld(var)
1695 Load the value of the internal variable with number var, which was
1696 previously stored with st(var, expr). The function returns the
1697 loaded value.
1698
1699 lerp(x, y, z)
1700 Return linear interpolation between x and y by amount of z.
1701
1702 log(x)
1703 Compute natural logarithm of x.
1704
1705 lt(x, y)
1706 Return 1 if x is lesser than y, 0 otherwise.
1707
1708 lte(x, y)
1709 Return 1 if x is lesser than or equal to y, 0 otherwise.
1710
1711 max(x, y)
1712 Return the maximum between x and y.
1713
1714 min(x, y)
1715 Return the minimum between x and y.
1716
1717 mod(x, y)
1718 Compute the remainder of division of x by y.
1719
1720 not(expr)
1721 Return 1.0 if expr is zero, 0.0 otherwise.
1722
1723 pow(x, y)
1724 Compute the power of x elevated y, it is equivalent to "(x)^(y)".
1725
1726 print(t)
1727 print(t, l)
1728 Print the value of expression t with loglevel l. If l is not
1729 specified then a default log level is used. Returns the value of
1730 the expression printed.
1731
1732 Prints t with loglevel l
1733
1734 random(x)
1735 Return a pseudo random value between 0.0 and 1.0. x is the index of
1736 the internal variable which will be used to save the seed/state.
1737
1738 root(expr, max)
1739 Find an input value for which the function represented by expr with
1740 argument ld(0) is 0 in the interval 0..max.
1741
1742 The expression in expr must denote a continuous function or the
1743 result is undefined.
1744
1745 ld(0) is used to represent the function input value, which means
1746 that the given expression will be evaluated multiple times with
1747 various input values that the expression can access through ld(0).
1748 When the expression evaluates to 0 then the corresponding input
1749 value will be returned.
1750
1751 round(expr)
1752 Round the value of expression expr to the nearest integer. For
1753 example, "round(1.5)" is "2.0".
1754
1755 sgn(x)
1756 Compute sign of x.
1757
1758 sin(x)
1759 Compute sine of x.
1760
1761 sinh(x)
1762 Compute hyperbolic sine of x.
1763
1764 sqrt(expr)
1765 Compute the square root of expr. This is equivalent to "(expr)^.5".
1766
1767 squish(x)
1768 Compute expression "1/(1 + exp(4*x))".
1769
1770 st(var, expr)
1771 Store the value of the expression expr in an internal variable. var
1772 specifies the number of the variable where to store the value, and
1773 it is a value ranging from 0 to 9. The function returns the value
1774 stored in the internal variable. Note, Variables are currently not
1775 shared between expressions.
1776
1777 tan(x)
1778 Compute tangent of x.
1779
1780 tanh(x)
1781 Compute hyperbolic tangent of x.
1782
1783 taylor(expr, x)
1784 taylor(expr, x, id)
1785 Evaluate a Taylor series at x, given an expression representing the
1786 "ld(id)"-th derivative of a function at 0.
1787
1788 When the series does not converge the result is undefined.
1789
1790 ld(id) is used to represent the derivative order in expr, which
1791 means that the given expression will be evaluated multiple times
1792 with various input values that the expression can access through
1793 "ld(id)". If id is not specified then 0 is assumed.
1794
1795 Note, when you have the derivatives at y instead of 0,
1796 "taylor(expr, x-y)" can be used.
1797
1798 time(0)
1799 Return the current (wallclock) time in seconds.
1800
1801 trunc(expr)
1802 Round the value of expression expr towards zero to the nearest
1803 integer. For example, "trunc(-1.5)" is "-1.0".
1804
1805 while(cond, expr)
1806 Evaluate expression expr while the expression cond is non-zero, and
1807 returns the value of the last expr evaluation, or NAN if cond was
1808 always false.
1809
1810 The following constants are available:
1811
1812 PI area of the unit disc, approximately 3.14
1813
1814 E exp(1) (Euler's number), approximately 2.718
1815
1816 PHI golden ratio (1+sqrt(5))/2, approximately 1.618
1817
1818 Assuming that an expression is considered "true" if it has a non-zero
1819 value, note that:
1820
1821 "*" works like AND
1822
1823 "+" works like OR
1824
1825 For example the construct:
1826
1827 if (A AND B) then C
1828
1829 is equivalent to:
1830
1831 if(A*B, C)
1832
1833 In your C code, you can extend the list of unary and binary functions,
1834 and define recognized constants, so that they are available for your
1835 expressions.
1836
1837 The evaluator also recognizes the International System unit prefixes.
1838 If 'i' is appended after the prefix, binary prefixes are used, which
1839 are based on powers of 1024 instead of powers of 1000. The 'B' postfix
1840 multiplies the value by 8, and can be appended after a unit prefix or
1841 used alone. This allows using for example 'KB', 'MiB', 'G' and 'B' as
1842 number postfix.
1843
1844 The list of available International System prefixes follows, with
1845 indication of the corresponding powers of 10 and of 2.
1846
1847 y 10^-24 / 2^-80
1848
1849 z 10^-21 / 2^-70
1850
1851 a 10^-18 / 2^-60
1852
1853 f 10^-15 / 2^-50
1854
1855 p 10^-12 / 2^-40
1856
1857 n 10^-9 / 2^-30
1858
1859 u 10^-6 / 2^-20
1860
1861 m 10^-3 / 2^-10
1862
1863 c 10^-2
1864
1865 d 10^-1
1866
1867 h 10^2
1868
1869 k 10^3 / 2^10
1870
1871 K 10^3 / 2^10
1872
1873 M 10^6 / 2^20
1874
1875 G 10^9 / 2^30
1876
1877 T 10^12 / 2^40
1878
1879 P 10^15 / 2^40
1880
1881 E 10^18 / 2^50
1882
1883 Z 10^21 / 2^60
1884
1885 Y 10^24 / 2^70
1886
1888 libavcodec provides some generic global options, which can be set on
1889 all the encoders and decoders. In addition each codec may support so-
1890 called private options, which are specific for a given codec.
1891
1892 Sometimes, a global option may only affect a specific kind of codec,
1893 and may be nonsensical or ignored by another, so you need to be aware
1894 of the meaning of the specified options. Also some options are meant
1895 only for decoding or encoding.
1896
1897 Options may be set by specifying -option value in the FFmpeg tools, or
1898 by setting the value explicitly in the "AVCodecContext" options or
1899 using the libavutil/opt.h API for programmatic use.
1900
1901 The list of supported options follow:
1902
1903 b integer (encoding,audio,video)
1904 Set bitrate in bits/s. Default value is 200K.
1905
1906 ab integer (encoding,audio)
1907 Set audio bitrate (in bits/s). Default value is 128K.
1908
1909 bt integer (encoding,video)
1910 Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
1911 tolerance specifies how far ratecontrol is willing to deviate from
1912 the target average bitrate value. This is not related to min/max
1913 bitrate. Lowering tolerance too much has an adverse effect on
1914 quality.
1915
1916 flags flags (decoding/encoding,audio,video,subtitles)
1917 Set generic flags.
1918
1919 Possible values:
1920
1921 mv4 Use four motion vector by macroblock (mpeg4).
1922
1923 qpel
1924 Use 1/4 pel motion compensation.
1925
1926 loop
1927 Use loop filter.
1928
1929 qscale
1930 Use fixed qscale.
1931
1932 pass1
1933 Use internal 2pass ratecontrol in first pass mode.
1934
1935 pass2
1936 Use internal 2pass ratecontrol in second pass mode.
1937
1938 gray
1939 Only decode/encode grayscale.
1940
1941 psnr
1942 Set error[?] variables during encoding.
1943
1944 truncated
1945 Input bitstream might be randomly truncated.
1946
1947 drop_changed
1948 Don't output frames whose parameters differ from first decoded
1949 frame in stream. Error AVERROR_INPUT_CHANGED is returned when
1950 a frame is dropped.
1951
1952 ildct
1953 Use interlaced DCT.
1954
1955 low_delay
1956 Force low delay.
1957
1958 global_header
1959 Place global headers in extradata instead of every keyframe.
1960
1961 bitexact
1962 Only write platform-, build- and time-independent data. (except
1963 (I)DCT). This ensures that file and data checksums are
1964 reproducible and match between platforms. Its primary use is
1965 for regression testing.
1966
1967 aic Apply H263 advanced intra coding / mpeg4 ac prediction.
1968
1969 ilme
1970 Apply interlaced motion estimation.
1971
1972 cgop
1973 Use closed gop.
1974
1975 output_corrupt
1976 Output even potentially corrupted frames.
1977
1978 time_base rational number
1979 Set codec time base.
1980
1981 It is the fundamental unit of time (in seconds) in terms of which
1982 frame timestamps are represented. For fixed-fps content, timebase
1983 should be "1 / frame_rate" and timestamp increments should be
1984 identically 1.
1985
1986 g integer (encoding,video)
1987 Set the group of picture (GOP) size. Default value is 12.
1988
1989 ar integer (decoding/encoding,audio)
1990 Set audio sampling rate (in Hz).
1991
1992 ac integer (decoding/encoding,audio)
1993 Set number of audio channels.
1994
1995 cutoff integer (encoding,audio)
1996 Set cutoff bandwidth. (Supported only by selected encoders, see
1997 their respective documentation sections.)
1998
1999 frame_size integer (encoding,audio)
2000 Set audio frame size.
2001
2002 Each submitted frame except the last must contain exactly
2003 frame_size samples per channel. May be 0 when the codec has
2004 CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is
2005 not restricted. It is set by some decoders to indicate constant
2006 frame size.
2007
2008 frame_number integer
2009 Set the frame number.
2010
2011 delay integer
2012 qcomp float (encoding,video)
2013 Set video quantizer scale compression (VBR). It is used as a
2014 constant in the ratecontrol equation. Recommended range for default
2015 rc_eq: 0.0-1.0.
2016
2017 qblur float (encoding,video)
2018 Set video quantizer scale blur (VBR).
2019
2020 qmin integer (encoding,video)
2021 Set min video quantizer scale (VBR). Must be included between -1
2022 and 69, default value is 2.
2023
2024 qmax integer (encoding,video)
2025 Set max video quantizer scale (VBR). Must be included between -1
2026 and 1024, default value is 31.
2027
2028 qdiff integer (encoding,video)
2029 Set max difference between the quantizer scale (VBR).
2030
2031 bf integer (encoding,video)
2032 Set max number of B frames between non-B-frames.
2033
2034 Must be an integer between -1 and 16. 0 means that B-frames are
2035 disabled. If a value of -1 is used, it will choose an automatic
2036 value depending on the encoder.
2037
2038 Default value is 0.
2039
2040 b_qfactor float (encoding,video)
2041 Set qp factor between P and B frames.
2042
2043 codec_tag integer
2044 bug flags (decoding,video)
2045 Workaround not auto detected encoder bugs.
2046
2047 Possible values:
2048
2049 autodetect
2050 xvid_ilace
2051 Xvid interlacing bug (autodetected if fourcc==XVIX)
2052
2053 ump4
2054 (autodetected if fourcc==UMP4)
2055
2056 no_padding
2057 padding bug (autodetected)
2058
2059 amv
2060 qpel_chroma
2061 std_qpel
2062 old standard qpel (autodetected per fourcc/version)
2063
2064 qpel_chroma2
2065 direct_blocksize
2066 direct-qpel-blocksize bug (autodetected per fourcc/version)
2067
2068 edge
2069 edge padding bug (autodetected per fourcc/version)
2070
2071 hpel_chroma
2072 dc_clip
2073 ms Workaround various bugs in microsoft broken decoders.
2074
2075 trunc
2076 trancated frames
2077
2078 strict integer (decoding/encoding,audio,video)
2079 Specify how strictly to follow the standards.
2080
2081 Possible values:
2082
2083 very
2084 strictly conform to an older more strict version of the spec or
2085 reference software
2086
2087 strict
2088 strictly conform to all the things in the spec no matter what
2089 consequences
2090
2091 normal
2092 unofficial
2093 allow unofficial extensions
2094
2095 experimental
2096 allow non standardized experimental things, experimental
2097 (unfinished/work in progress/not well tested) decoders and
2098 encoders. Note: experimental decoders can pose a security
2099 risk, do not use this for decoding untrusted input.
2100
2101 b_qoffset float (encoding,video)
2102 Set QP offset between P and B frames.
2103
2104 err_detect flags (decoding,audio,video)
2105 Set error detection flags.
2106
2107 Possible values:
2108
2109 crccheck
2110 verify embedded CRCs
2111
2112 bitstream
2113 detect bitstream specification deviations
2114
2115 buffer
2116 detect improper bitstream length
2117
2118 explode
2119 abort decoding on minor error detection
2120
2121 ignore_err
2122 ignore decoding errors, and continue decoding. This is useful
2123 if you want to analyze the content of a video and thus want
2124 everything to be decoded no matter what. This option will not
2125 result in a video that is pleasing to watch in case of errors.
2126
2127 careful
2128 consider things that violate the spec and have not been seen in
2129 the wild as errors
2130
2131 compliant
2132 consider all spec non compliancies as errors
2133
2134 aggressive
2135 consider things that a sane encoder should not do as an error
2136
2137 has_b_frames integer
2138 block_align integer
2139 rc_override_count integer
2140 maxrate integer (encoding,audio,video)
2141 Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
2142
2143 minrate integer (encoding,audio,video)
2144 Set min bitrate tolerance (in bits/s). Most useful in setting up a
2145 CBR encode. It is of little use elsewise.
2146
2147 bufsize integer (encoding,audio,video)
2148 Set ratecontrol buffer size (in bits).
2149
2150 i_qfactor float (encoding,video)
2151 Set QP factor between P and I frames.
2152
2153 i_qoffset float (encoding,video)
2154 Set QP offset between P and I frames.
2155
2156 dct integer (encoding,video)
2157 Set DCT algorithm.
2158
2159 Possible values:
2160
2161 auto
2162 autoselect a good one (default)
2163
2164 fastint
2165 fast integer
2166
2167 int accurate integer
2168
2169 mmx
2170 altivec
2171 faan
2172 floating point AAN DCT
2173
2174 lumi_mask float (encoding,video)
2175 Compress bright areas stronger than medium ones.
2176
2177 tcplx_mask float (encoding,video)
2178 Set temporal complexity masking.
2179
2180 scplx_mask float (encoding,video)
2181 Set spatial complexity masking.
2182
2183 p_mask float (encoding,video)
2184 Set inter masking.
2185
2186 dark_mask float (encoding,video)
2187 Compress dark areas stronger than medium ones.
2188
2189 idct integer (decoding/encoding,video)
2190 Select IDCT implementation.
2191
2192 Possible values:
2193
2194 auto
2195 int
2196 simple
2197 simplemmx
2198 simpleauto
2199 Automatically pick a IDCT compatible with the simple one
2200
2201 arm
2202 altivec
2203 sh4
2204 simplearm
2205 simplearmv5te
2206 simplearmv6
2207 simpleneon
2208 xvid
2209 faani
2210 floating point AAN IDCT
2211
2212 slice_count integer
2213 ec flags (decoding,video)
2214 Set error concealment strategy.
2215
2216 Possible values:
2217
2218 guess_mvs
2219 iterative motion vector (MV) search (slow)
2220
2221 deblock
2222 use strong deblock filter for damaged MBs
2223
2224 favor_inter
2225 favor predicting from the previous frame instead of the current
2226
2227 bits_per_coded_sample integer
2228 aspect rational number (encoding,video)
2229 Set sample aspect ratio.
2230
2231 sar rational number (encoding,video)
2232 Set sample aspect ratio. Alias to aspect.
2233
2234 debug flags (decoding/encoding,audio,video,subtitles)
2235 Print specific debug info.
2236
2237 Possible values:
2238
2239 pict
2240 picture info
2241
2242 rc rate control
2243
2244 bitstream
2245 mb_type
2246 macroblock (MB) type
2247
2248 qp per-block quantization parameter (QP)
2249
2250 dct_coeff
2251 green_metadata
2252 display complexity metadata for the upcoming frame, GoP or for
2253 a given duration.
2254
2255 skip
2256 startcode
2257 er error recognition
2258
2259 mmco
2260 memory management control operations (H.264)
2261
2262 bugs
2263 buffers
2264 picture buffer allocations
2265
2266 thread_ops
2267 threading operations
2268
2269 nomc
2270 skip motion compensation
2271
2272 cmp integer (encoding,video)
2273 Set full pel me compare function.
2274
2275 Possible values:
2276
2277 sad sum of absolute differences, fast (default)
2278
2279 sse sum of squared errors
2280
2281 satd
2282 sum of absolute Hadamard transformed differences
2283
2284 dct sum of absolute DCT transformed differences
2285
2286 psnr
2287 sum of squared quantization errors (avoid, low quality)
2288
2289 bit number of bits needed for the block
2290
2291 rd rate distortion optimal, slow
2292
2293 zero
2294 0
2295
2296 vsad
2297 sum of absolute vertical differences
2298
2299 vsse
2300 sum of squared vertical differences
2301
2302 nsse
2303 noise preserving sum of squared differences
2304
2305 w53 5/3 wavelet, only used in snow
2306
2307 w97 9/7 wavelet, only used in snow
2308
2309 dctmax
2310 chroma
2311 subcmp integer (encoding,video)
2312 Set sub pel me compare function.
2313
2314 Possible values:
2315
2316 sad sum of absolute differences, fast (default)
2317
2318 sse sum of squared errors
2319
2320 satd
2321 sum of absolute Hadamard transformed differences
2322
2323 dct sum of absolute DCT transformed differences
2324
2325 psnr
2326 sum of squared quantization errors (avoid, low quality)
2327
2328 bit number of bits needed for the block
2329
2330 rd rate distortion optimal, slow
2331
2332 zero
2333 0
2334
2335 vsad
2336 sum of absolute vertical differences
2337
2338 vsse
2339 sum of squared vertical differences
2340
2341 nsse
2342 noise preserving sum of squared differences
2343
2344 w53 5/3 wavelet, only used in snow
2345
2346 w97 9/7 wavelet, only used in snow
2347
2348 dctmax
2349 chroma
2350 mbcmp integer (encoding,video)
2351 Set macroblock compare function.
2352
2353 Possible values:
2354
2355 sad sum of absolute differences, fast (default)
2356
2357 sse sum of squared errors
2358
2359 satd
2360 sum of absolute Hadamard transformed differences
2361
2362 dct sum of absolute DCT transformed differences
2363
2364 psnr
2365 sum of squared quantization errors (avoid, low quality)
2366
2367 bit number of bits needed for the block
2368
2369 rd rate distortion optimal, slow
2370
2371 zero
2372 0
2373
2374 vsad
2375 sum of absolute vertical differences
2376
2377 vsse
2378 sum of squared vertical differences
2379
2380 nsse
2381 noise preserving sum of squared differences
2382
2383 w53 5/3 wavelet, only used in snow
2384
2385 w97 9/7 wavelet, only used in snow
2386
2387 dctmax
2388 chroma
2389 ildctcmp integer (encoding,video)
2390 Set interlaced dct compare function.
2391
2392 Possible values:
2393
2394 sad sum of absolute differences, fast (default)
2395
2396 sse sum of squared errors
2397
2398 satd
2399 sum of absolute Hadamard transformed differences
2400
2401 dct sum of absolute DCT transformed differences
2402
2403 psnr
2404 sum of squared quantization errors (avoid, low quality)
2405
2406 bit number of bits needed for the block
2407
2408 rd rate distortion optimal, slow
2409
2410 zero
2411 0
2412
2413 vsad
2414 sum of absolute vertical differences
2415
2416 vsse
2417 sum of squared vertical differences
2418
2419 nsse
2420 noise preserving sum of squared differences
2421
2422 w53 5/3 wavelet, only used in snow
2423
2424 w97 9/7 wavelet, only used in snow
2425
2426 dctmax
2427 chroma
2428 dia_size integer (encoding,video)
2429 Set diamond type & size for motion estimation.
2430
2431 (1024, INT_MAX)
2432 full motion estimation(slowest)
2433
2434 (768, 1024]
2435 umh motion estimation
2436
2437 (512, 768]
2438 hex motion estimation
2439
2440 (256, 512]
2441 l2s diamond motion estimation
2442
2443 [2,256]
2444 var diamond motion estimation
2445
2446 (-1, 2)
2447 small diamond motion estimation
2448
2449 -1 funny diamond motion estimation
2450
2451 (INT_MIN, -1)
2452 sab diamond motion estimation
2453
2454 last_pred integer (encoding,video)
2455 Set amount of motion predictors from the previous frame.
2456
2457 precmp integer (encoding,video)
2458 Set pre motion estimation compare function.
2459
2460 Possible values:
2461
2462 sad sum of absolute differences, fast (default)
2463
2464 sse sum of squared errors
2465
2466 satd
2467 sum of absolute Hadamard transformed differences
2468
2469 dct sum of absolute DCT transformed differences
2470
2471 psnr
2472 sum of squared quantization errors (avoid, low quality)
2473
2474 bit number of bits needed for the block
2475
2476 rd rate distortion optimal, slow
2477
2478 zero
2479 0
2480
2481 vsad
2482 sum of absolute vertical differences
2483
2484 vsse
2485 sum of squared vertical differences
2486
2487 nsse
2488 noise preserving sum of squared differences
2489
2490 w53 5/3 wavelet, only used in snow
2491
2492 w97 9/7 wavelet, only used in snow
2493
2494 dctmax
2495 chroma
2496 pre_dia_size integer (encoding,video)
2497 Set diamond type & size for motion estimation pre-pass.
2498
2499 subq integer (encoding,video)
2500 Set sub pel motion estimation quality.
2501
2502 me_range integer (encoding,video)
2503 Set limit motion vectors range (1023 for DivX player).
2504
2505 global_quality integer (encoding,audio,video)
2506 slice_flags integer
2507 mbd integer (encoding,video)
2508 Set macroblock decision algorithm (high quality mode).
2509
2510 Possible values:
2511
2512 simple
2513 use mbcmp (default)
2514
2515 bits
2516 use fewest bits
2517
2518 rd use best rate distortion
2519
2520 rc_init_occupancy integer (encoding,video)
2521 Set number of bits which should be loaded into the rc buffer before
2522 decoding starts.
2523
2524 flags2 flags (decoding/encoding,audio,video,subtitles)
2525 Possible values:
2526
2527 fast
2528 Allow non spec compliant speedup tricks.
2529
2530 noout
2531 Skip bitstream encoding.
2532
2533 ignorecrop
2534 Ignore cropping information from sps.
2535
2536 local_header
2537 Place global headers at every keyframe instead of in extradata.
2538
2539 chunks
2540 Frame data might be split into multiple chunks.
2541
2542 showall
2543 Show all frames before the first keyframe.
2544
2545 export_mvs
2546 Export motion vectors into frame side-data (see
2547 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
2548 also doc/examples/export_mvs.c.
2549
2550 skip_manual
2551 Do not skip samples and export skip information as frame side
2552 data.
2553
2554 ass_ro_flush_noop
2555 Do not reset ASS ReadOrder field on flush.
2556
2557 export_side_data flags (decoding/encoding,audio,video,subtitles)
2558 Possible values:
2559
2560 mvs Export motion vectors into frame side-data (see
2561 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
2562 also doc/examples/export_mvs.c.
2563
2564 prft
2565 Export encoder Producer Reference Time into packet side-data
2566 (see "AV_PKT_DATA_PRFT") for codecs that support it.
2567
2568 venc_params
2569 Export video encoding parameters through frame side data (see
2570 "AV_FRAME_DATA_VIDEO_ENC_PARAMS") for codecs that support it.
2571 At present, those are H.264 and VP9.
2572
2573 film_grain
2574 Export film grain parameters through frame side data (see
2575 "AV_FRAME_DATA_FILM_GRAIN_PARAMS"). Supported at present by
2576 AV1 decoders.
2577
2578 threads integer (decoding/encoding,video)
2579 Set the number of threads to be used, in case the selected codec
2580 implementation supports multi-threading.
2581
2582 Possible values:
2583
2584 auto, 0
2585 automatically select the number of threads to set
2586
2587 Default value is auto.
2588
2589 dc integer (encoding,video)
2590 Set intra_dc_precision.
2591
2592 nssew integer (encoding,video)
2593 Set nsse weight.
2594
2595 skip_top integer (decoding,video)
2596 Set number of macroblock rows at the top which are skipped.
2597
2598 skip_bottom integer (decoding,video)
2599 Set number of macroblock rows at the bottom which are skipped.
2600
2601 profile integer (encoding,audio,video)
2602 Set encoder codec profile. Default value is unknown. Encoder
2603 specific profiles are documented in the relevant encoder
2604 documentation.
2605
2606 level integer (encoding,audio,video)
2607 Possible values:
2608
2609 unknown
2610 lowres integer (decoding,audio,video)
2611 Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
2612
2613 mblmin integer (encoding,video)
2614 Set min macroblock lagrange factor (VBR).
2615
2616 mblmax integer (encoding,video)
2617 Set max macroblock lagrange factor (VBR).
2618
2619 skip_loop_filter integer (decoding,video)
2620 skip_idct integer (decoding,video)
2621 skip_frame integer (decoding,video)
2622 Make decoder discard processing depending on the frame type
2623 selected by the option value.
2624
2625 skip_loop_filter skips frame loop filtering, skip_idct skips frame
2626 IDCT/dequantization, skip_frame skips decoding.
2627
2628 Possible values:
2629
2630 none
2631 Discard no frame.
2632
2633 default
2634 Discard useless frames like 0-sized frames.
2635
2636 noref
2637 Discard all non-reference frames.
2638
2639 bidir
2640 Discard all bidirectional frames.
2641
2642 nokey
2643 Discard all frames excepts keyframes.
2644
2645 nointra
2646 Discard all frames except I frames.
2647
2648 all Discard all frames.
2649
2650 Default value is default.
2651
2652 bidir_refine integer (encoding,video)
2653 Refine the two motion vectors used in bidirectional macroblocks.
2654
2655 keyint_min integer (encoding,video)
2656 Set minimum interval between IDR-frames.
2657
2658 refs integer (encoding,video)
2659 Set reference frames to consider for motion compensation.
2660
2661 trellis integer (encoding,audio,video)
2662 Set rate-distortion optimal quantization.
2663
2664 mv0_threshold integer (encoding,video)
2665 compression_level integer (encoding,audio,video)
2666 bits_per_raw_sample integer
2667 channel_layout integer (decoding/encoding,audio)
2668 Possible values:
2669
2670 request_channel_layout integer (decoding,audio)
2671 Possible values:
2672
2673 rc_max_vbv_use float (encoding,video)
2674 rc_min_vbv_use float (encoding,video)
2675 ticks_per_frame integer (decoding/encoding,audio,video)
2676 color_primaries integer (decoding/encoding,video)
2677 Possible values:
2678
2679 bt709
2680 BT.709
2681
2682 bt470m
2683 BT.470 M
2684
2685 bt470bg
2686 BT.470 BG
2687
2688 smpte170m
2689 SMPTE 170 M
2690
2691 smpte240m
2692 SMPTE 240 M
2693
2694 film
2695 Film
2696
2697 bt2020
2698 BT.2020
2699
2700 smpte428
2701 smpte428_1
2702 SMPTE ST 428-1
2703
2704 smpte431
2705 SMPTE 431-2
2706
2707 smpte432
2708 SMPTE 432-1
2709
2710 jedec-p22
2711 JEDEC P22
2712
2713 color_trc integer (decoding/encoding,video)
2714 Possible values:
2715
2716 bt709
2717 BT.709
2718
2719 gamma22
2720 BT.470 M
2721
2722 gamma28
2723 BT.470 BG
2724
2725 smpte170m
2726 SMPTE 170 M
2727
2728 smpte240m
2729 SMPTE 240 M
2730
2731 linear
2732 Linear
2733
2734 log
2735 log100
2736 Log
2737
2738 log_sqrt
2739 log316
2740 Log square root
2741
2742 iec61966_2_4
2743 iec61966-2-4
2744 IEC 61966-2-4
2745
2746 bt1361
2747 bt1361e
2748 BT.1361
2749
2750 iec61966_2_1
2751 iec61966-2-1
2752 IEC 61966-2-1
2753
2754 bt2020_10
2755 bt2020_10bit
2756 BT.2020 - 10 bit
2757
2758 bt2020_12
2759 bt2020_12bit
2760 BT.2020 - 12 bit
2761
2762 smpte2084
2763 SMPTE ST 2084
2764
2765 smpte428
2766 smpte428_1
2767 SMPTE ST 428-1
2768
2769 arib-std-b67
2770 ARIB STD-B67
2771
2772 colorspace integer (decoding/encoding,video)
2773 Possible values:
2774
2775 rgb RGB
2776
2777 bt709
2778 BT.709
2779
2780 fcc FCC
2781
2782 bt470bg
2783 BT.470 BG
2784
2785 smpte170m
2786 SMPTE 170 M
2787
2788 smpte240m
2789 SMPTE 240 M
2790
2791 ycocg
2792 YCOCG
2793
2794 bt2020nc
2795 bt2020_ncl
2796 BT.2020 NCL
2797
2798 bt2020c
2799 bt2020_cl
2800 BT.2020 CL
2801
2802 smpte2085
2803 SMPTE 2085
2804
2805 chroma-derived-nc
2806 Chroma-derived NCL
2807
2808 chroma-derived-c
2809 Chroma-derived CL
2810
2811 ictcp
2812 ICtCp
2813
2814 color_range integer (decoding/encoding,video)
2815 If used as input parameter, it serves as a hint to the decoder,
2816 which color_range the input has. Possible values:
2817
2818 tv
2819 mpeg
2820 MPEG (219*2^(n-8))
2821
2822 pc
2823 jpeg
2824 JPEG (2^n-1)
2825
2826 chroma_sample_location integer (decoding/encoding,video)
2827 Possible values:
2828
2829 left
2830 center
2831 topleft
2832 top
2833 bottomleft
2834 bottom
2835 log_level_offset integer
2836 Set the log level offset.
2837
2838 slices integer (encoding,video)
2839 Number of slices, used in parallelized encoding.
2840
2841 thread_type flags (decoding/encoding,video)
2842 Select which multithreading methods to use.
2843
2844 Use of frame will increase decoding delay by one frame per thread,
2845 so clients which cannot provide future frames should not use it.
2846
2847 Possible values:
2848
2849 slice
2850 Decode more than one part of a single frame at once.
2851
2852 Multithreading using slices works only when the video was
2853 encoded with slices.
2854
2855 frame
2856 Decode more than one frame at once.
2857
2858 Default value is slice+frame.
2859
2860 audio_service_type integer (encoding,audio)
2861 Set audio service type.
2862
2863 Possible values:
2864
2865 ma Main Audio Service
2866
2867 ef Effects
2868
2869 vi Visually Impaired
2870
2871 hi Hearing Impaired
2872
2873 di Dialogue
2874
2875 co Commentary
2876
2877 em Emergency
2878
2879 vo Voice Over
2880
2881 ka Karaoke
2882
2883 request_sample_fmt sample_fmt (decoding,audio)
2884 Set sample format audio decoders should prefer. Default value is
2885 "none".
2886
2887 pkt_timebase rational number
2888 sub_charenc encoding (decoding,subtitles)
2889 Set the input subtitles character encoding.
2890
2891 field_order field_order (video)
2892 Set/override the field order of the video. Possible values:
2893
2894 progressive
2895 Progressive video
2896
2897 tt Interlaced video, top field coded and displayed first
2898
2899 bb Interlaced video, bottom field coded and displayed first
2900
2901 tb Interlaced video, top coded first, bottom displayed first
2902
2903 bt Interlaced video, bottom coded first, top displayed first
2904
2905 skip_alpha bool (decoding,video)
2906 Set to 1 to disable processing alpha (transparency). This works
2907 like the gray flag in the flags option which skips chroma
2908 information instead of alpha. Default is 0.
2909
2910 codec_whitelist list (input)
2911 "," separated list of allowed decoders. By default all are allowed.
2912
2913 dump_separator string (input)
2914 Separator used to separate the fields printed on the command line
2915 about the Stream parameters. For example, to separate the fields
2916 with newlines and indentation:
2917
2918 ffprobe -dump_separator "
2919 " -i ~/videos/matrixbench_mpeg2.mpg
2920
2921 max_pixels integer (decoding/encoding,video)
2922 Maximum number of pixels per image. This value can be used to avoid
2923 out of memory failures due to large images.
2924
2925 apply_cropping bool (decoding,video)
2926 Enable cropping if cropping parameters are multiples of the
2927 required alignment for the left and top parameters. If the
2928 alignment is not met the cropping will be partially applied to
2929 maintain alignment. Default is 1 (enabled). Note: The required
2930 alignment depends on if "AV_CODEC_FLAG_UNALIGNED" is set and the
2931 CPU. "AV_CODEC_FLAG_UNALIGNED" cannot be changed from the command
2932 line. Also hardware decoders will not apply left/top Cropping.
2933
2935 Decoders are configured elements in FFmpeg which allow the decoding of
2936 multimedia streams.
2937
2938 When you configure your FFmpeg build, all the supported native decoders
2939 are enabled by default. Decoders requiring an external library must be
2940 enabled manually via the corresponding "--enable-lib" option. You can
2941 list all available decoders using the configure option
2942 "--list-decoders".
2943
2944 You can disable all the decoders with the configure option
2945 "--disable-decoders" and selectively enable / disable single decoders
2946 with the options "--enable-decoder=DECODER" /
2947 "--disable-decoder=DECODER".
2948
2949 The option "-decoders" of the ff* tools will display the list of
2950 enabled decoders.
2951
2953 A description of some of the currently available video decoders
2954 follows.
2955
2956 av1
2957 AOMedia Video 1 (AV1) decoder.
2958
2959 Options
2960
2961 operating_point
2962 Select an operating point of a scalable AV1 bitstream (0 - 31).
2963 Default is 0.
2964
2965 rawvideo
2966 Raw video decoder.
2967
2968 This decoder decodes rawvideo streams.
2969
2970 Options
2971
2972 top top_field_first
2973 Specify the assumed field type of the input video.
2974
2975 -1 the video is assumed to be progressive (default)
2976
2977 0 bottom-field-first is assumed
2978
2979 1 top-field-first is assumed
2980
2981 libdav1d
2982 dav1d AV1 decoder.
2983
2984 libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
2985 Requires the presence of the libdav1d headers and library during
2986 configuration. You need to explicitly configure the build with
2987 "--enable-libdav1d".
2988
2989 Options
2990
2991 The following options are supported by the libdav1d wrapper.
2992
2993 framethreads
2994 Set amount of frame threads to use during decoding. The default
2995 value is 0 (autodetect). This option is deprecated for libdav1d >=
2996 1.0 and will be removed in the future. Use the global option
2997 "threads" instead.
2998
2999 tilethreads
3000 Set amount of tile threads to use during decoding. The default
3001 value is 0 (autodetect). This option is deprecated for libdav1d >=
3002 1.0 and will be removed in the future. Use the global option
3003 "threads" instead.
3004
3005 filmgrain
3006 Apply film grain to the decoded video if present in the bitstream.
3007 Defaults to the internal default of the library. This option is
3008 deprecated and will be removed in the future. See the global option
3009 "export_side_data" to export Film Grain parameters instead of
3010 applying it.
3011
3012 oppoint
3013 Select an operating point of a scalable AV1 bitstream (0 - 31).
3014 Defaults to the internal default of the library.
3015
3016 alllayers
3017 Output all spatial layers of a scalable AV1 bitstream. The default
3018 value is false.
3019
3020 libdavs2
3021 AVS2-P2/IEEE1857.4 video decoder wrapper.
3022
3023 This decoder allows libavcodec to decode AVS2 streams with davs2
3024 library.
3025
3026 libuavs3d
3027 AVS3-P2/IEEE1857.10 video decoder.
3028
3029 libuavs3d allows libavcodec to decode AVS3 streams. Requires the
3030 presence of the libuavs3d headers and library during configuration.
3031 You need to explicitly configure the build with "--enable-libuavs3d".
3032
3033 Options
3034
3035 The following option is supported by the libuavs3d wrapper.
3036
3037 frame_threads
3038 Set amount of frame threads to use during decoding. The default
3039 value is 0 (autodetect).
3040
3042 A description of some of the currently available audio decoders
3043 follows.
3044
3045 ac3
3046 AC-3 audio decoder.
3047
3048 This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as
3049 well as the undocumented RealAudio 3 (a.k.a. dnet).
3050
3051 AC-3 Decoder Options
3052
3053 -drc_scale value
3054 Dynamic Range Scale Factor. The factor to apply to dynamic range
3055 values from the AC-3 stream. This factor is applied exponentially.
3056 The default value is 1. There are 3 notable scale factor ranges:
3057
3058 drc_scale == 0
3059 DRC disabled. Produces full range audio.
3060
3061 0 < drc_scale <= 1
3062 DRC enabled. Applies a fraction of the stream DRC value.
3063 Audio reproduction is between full range and full compression.
3064
3065 drc_scale > 1
3066 DRC enabled. Applies drc_scale asymmetrically. Loud sounds are
3067 fully compressed. Soft sounds are enhanced.
3068
3069 flac
3070 FLAC audio decoder.
3071
3072 This decoder aims to implement the complete FLAC specification from
3073 Xiph.
3074
3075 FLAC Decoder options
3076
3077 -use_buggy_lpc
3078 The lavc FLAC encoder used to produce buggy streams with high lpc
3079 values (like the default value). This option makes it possible to
3080 decode such streams correctly by using lavc's old buggy lpc logic
3081 for decoding.
3082
3083 ffwavesynth
3084 Internal wave synthesizer.
3085
3086 This decoder generates wave patterns according to predefined sequences.
3087 Its use is purely internal and the format of the data it accepts is not
3088 publicly documented.
3089
3090 libcelt
3091 libcelt decoder wrapper.
3092
3093 libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio
3094 codec. Requires the presence of the libcelt headers and library during
3095 configuration. You need to explicitly configure the build with
3096 "--enable-libcelt".
3097
3098 libgsm
3099 libgsm decoder wrapper.
3100
3101 libgsm allows libavcodec to decode the GSM full rate audio codec.
3102 Requires the presence of the libgsm headers and library during
3103 configuration. You need to explicitly configure the build with
3104 "--enable-libgsm".
3105
3106 This decoder supports both the ordinary GSM and the Microsoft variant.
3107
3108 libilbc
3109 libilbc decoder wrapper.
3110
3111 libilbc allows libavcodec to decode the Internet Low Bitrate Codec
3112 (iLBC) audio codec. Requires the presence of the libilbc headers and
3113 library during configuration. You need to explicitly configure the
3114 build with "--enable-libilbc".
3115
3116 Options
3117
3118 The following option is supported by the libilbc wrapper.
3119
3120 enhance
3121 Enable the enhancement of the decoded audio when set to 1. The
3122 default value is 0 (disabled).
3123
3124 libopencore-amrnb
3125 libopencore-amrnb decoder wrapper.
3126
3127 libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
3128 Narrowband audio codec. Using it requires the presence of the
3129 libopencore-amrnb headers and library during configuration. You need to
3130 explicitly configure the build with "--enable-libopencore-amrnb".
3131
3132 An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
3133 without this library.
3134
3135 libopencore-amrwb
3136 libopencore-amrwb decoder wrapper.
3137
3138 libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
3139 Wideband audio codec. Using it requires the presence of the
3140 libopencore-amrwb headers and library during configuration. You need to
3141 explicitly configure the build with "--enable-libopencore-amrwb".
3142
3143 An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
3144 without this library.
3145
3146 libopus
3147 libopus decoder wrapper.
3148
3149 libopus allows libavcodec to decode the Opus Interactive Audio Codec.
3150 Requires the presence of the libopus headers and library during
3151 configuration. You need to explicitly configure the build with
3152 "--enable-libopus".
3153
3154 An FFmpeg native decoder for Opus exists, so users can decode Opus
3155 without this library.
3156
3158 libaribb24
3159 ARIB STD-B24 caption decoder.
3160
3161 Implements profiles A and C of the ARIB STD-B24 standard.
3162
3163 libaribb24 Decoder Options
3164
3165 -aribb24-base-path path
3166 Sets the base path for the libaribb24 library. This is utilized for
3167 reading of configuration files (for custom unicode conversions),
3168 and for dumping of non-text symbols as images under that location.
3169
3170 Unset by default.
3171
3172 -aribb24-skip-ruby-text boolean
3173 Tells the decoder wrapper to skip text blocks that contain half-
3174 height ruby text.
3175
3176 Enabled by default.
3177
3178 dvbsub
3179 Options
3180
3181 compute_clut
3182 -2 Compute clut once if no matching CLUT is in the stream.
3183
3184 -1 Compute clut if no matching CLUT is in the stream.
3185
3186 0 Never compute CLUT
3187
3188 1 Always compute CLUT and override the one provided in the
3189 stream.
3190
3191 dvb_substream
3192 Selects the dvb substream, or all substreams if -1 which is
3193 default.
3194
3195 dvdsub
3196 This codec decodes the bitmap subtitles used in DVDs; the same
3197 subtitles can also be found in VobSub file pairs and in some Matroska
3198 files.
3199
3200 Options
3201
3202 palette
3203 Specify the global palette used by the bitmaps. When stored in
3204 VobSub, the palette is normally specified in the index file; in
3205 Matroska, the palette is stored in the codec extra-data in the same
3206 format as in VobSub. In DVDs, the palette is stored in the IFO
3207 file, and therefore not available when reading from dumped VOB
3208 files.
3209
3210 The format for this option is a string containing 16 24-bits
3211 hexadecimal numbers (without 0x prefix) separated by commas, for
3212 example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
3213 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
3214 7c127b".
3215
3216 ifo_palette
3217 Specify the IFO file from which the global palette is obtained.
3218 (experimental)
3219
3220 forced_subs_only
3221 Only decode subtitle entries marked as forced. Some titles have
3222 forced and non-forced subtitles in the same track. Setting this
3223 flag to 1 will only keep the forced subtitles. Default value is 0.
3224
3225 libzvbi-teletext
3226 Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
3227 subtitles. Requires the presence of the libzvbi headers and library
3228 during configuration. You need to explicitly configure the build with
3229 "--enable-libzvbi".
3230
3231 Options
3232
3233 txt_page
3234 List of teletext page numbers to decode. Pages that do not match
3235 the specified list are dropped. You may use the special "*" string
3236 to match all pages, or "subtitle" to match all subtitle pages.
3237 Default value is *.
3238
3239 txt_default_region
3240 Set default character set used for decoding, a value between 0 and
3241 87 (see ETS 300 706, Section 15, Table 32). Default value is -1,
3242 which does not override the libzvbi default. This option is needed
3243 for some legacy level 1.0 transmissions which cannot signal the
3244 proper charset.
3245
3246 txt_chop_top
3247 Discards the top teletext line. Default value is 1.
3248
3249 txt_format
3250 Specifies the format of the decoded subtitles.
3251
3252 bitmap
3253 The default format, you should use this for teletext pages,
3254 because certain graphics and colors cannot be expressed in
3255 simple text or even ASS.
3256
3257 text
3258 Simple text based output without formatting.
3259
3260 ass Formatted ASS output, subtitle pages and teletext pages are
3261 returned in different styles, subtitle pages are stripped down
3262 to text, but an effort is made to keep the text alignment and
3263 the formatting.
3264
3265 txt_left
3266 X offset of generated bitmaps, default is 0.
3267
3268 txt_top
3269 Y offset of generated bitmaps, default is 0.
3270
3271 txt_chop_spaces
3272 Chops leading and trailing spaces and removes empty lines from the
3273 generated text. This option is useful for teletext based subtitles
3274 where empty spaces may be present at the start or at the end of the
3275 lines or empty lines may be present between the subtitle lines
3276 because of double-sized teletext characters. Default value is 1.
3277
3278 txt_duration
3279 Sets the display duration of the decoded teletext pages or
3280 subtitles in milliseconds. Default value is -1 which means infinity
3281 or until the next subtitle event comes.
3282
3283 txt_transparent
3284 Force transparent background of the generated teletext bitmaps.
3285 Default value is 0 which means an opaque background.
3286
3287 txt_opacity
3288 Sets the opacity (0-255) of the teletext background. If
3289 txt_transparent is not set, it only affects characters between a
3290 start box and an end box, typically subtitles. Default value is 0
3291 if txt_transparent is set, 255 otherwise.
3292
3294 When you configure your FFmpeg build, all the supported bitstream
3295 filters are enabled by default. You can list all available ones using
3296 the configure option "--list-bsfs".
3297
3298 You can disable all the bitstream filters using the configure option
3299 "--disable-bsfs", and selectively enable any bitstream filter using the
3300 option "--enable-bsf=BSF", or you can disable a particular bitstream
3301 filter using the option "--disable-bsf=BSF".
3302
3303 The option "-bsfs" of the ff* tools will display the list of all the
3304 supported bitstream filters included in your build.
3305
3306 The ff* tools have a -bsf option applied per stream, taking a comma-
3307 separated list of filters, whose parameters follow the filter name
3308 after a '='.
3309
3310 ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
3311
3312 Below is a description of the currently available bitstream filters,
3313 with their parameters, if any.
3314
3315 aac_adtstoasc
3316 Convert MPEG-2/4 AAC ADTS to an MPEG-4 Audio Specific Configuration
3317 bitstream.
3318
3319 This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4 ADTS
3320 header and removes the ADTS header.
3321
3322 This filter is required for example when copying an AAC stream from a
3323 raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
3324 to MOV/MP4 files and related formats such as 3GP or M4A. Please note
3325 that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
3326
3327 av1_metadata
3328 Modify metadata embedded in an AV1 stream.
3329
3330 td Insert or remove temporal delimiter OBUs in all temporal units of
3331 the stream.
3332
3333 insert
3334 Insert a TD at the beginning of every TU which does not already
3335 have one.
3336
3337 remove
3338 Remove the TD from the beginning of every TU which has one.
3339
3340 color_primaries
3341 transfer_characteristics
3342 matrix_coefficients
3343 Set the color description fields in the stream (see AV1 section
3344 6.4.2).
3345
3346 color_range
3347 Set the color range in the stream (see AV1 section 6.4.2; note that
3348 this cannot be set for streams using BT.709 primaries, sRGB
3349 transfer characteristic and identity (RGB) matrix coefficients).
3350
3351 tv Limited range.
3352
3353 pc Full range.
3354
3355 chroma_sample_position
3356 Set the chroma sample location in the stream (see AV1 section
3357 6.4.2). This can only be set for 4:2:0 streams.
3358
3359 vertical
3360 Left position (matching the default in MPEG-2 and H.264).
3361
3362 colocated
3363 Top-left position.
3364
3365 tick_rate
3366 Set the tick rate (time_scale / num_units_in_display_tick) in the
3367 timing info in the sequence header.
3368
3369 num_ticks_per_picture
3370 Set the number of ticks in each picture, to indicate that the
3371 stream has a fixed framerate. Ignored if tick_rate is not also
3372 set.
3373
3374 delete_padding
3375 Deletes Padding OBUs.
3376
3377 chomp
3378 Remove zero padding at the end of a packet.
3379
3380 dca_core
3381 Extract the core from a DCA/DTS stream, dropping extensions such as
3382 DTS-HD.
3383
3384 dump_extra
3385 Add extradata to the beginning of the filtered packets except when said
3386 packets already exactly begin with the extradata that is intended to be
3387 added.
3388
3389 freq
3390 The additional argument specifies which packets should be filtered.
3391 It accepts the values:
3392
3393 k
3394 keyframe
3395 add extradata to all key packets
3396
3397 e
3398 all add extradata to all packets
3399
3400 If not specified it is assumed k.
3401
3402 For example the following ffmpeg command forces a global header (thus
3403 disabling individual packet headers) in the H.264 packets generated by
3404 the "libx264" encoder, but corrects them by adding the header stored in
3405 extradata to the key packets:
3406
3407 ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
3408
3409 eac3_core
3410 Extract the core from a E-AC-3 stream, dropping extra channels.
3411
3412 extract_extradata
3413 Extract the in-band extradata.
3414
3415 Certain codecs allow the long-term headers (e.g. MPEG-2 sequence
3416 headers, or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either "in-
3417 band" (i.e. as a part of the bitstream containing the coded frames) or
3418 "out of band" (e.g. on the container level). This latter form is called
3419 "extradata" in FFmpeg terminology.
3420
3421 This bitstream filter detects the in-band headers and makes them
3422 available as extradata.
3423
3424 remove
3425 When this option is enabled, the long-term headers are removed from
3426 the bitstream after extraction.
3427
3428 filter_units
3429 Remove units with types in or not in a given set from the stream.
3430
3431 pass_types
3432 List of unit types or ranges of unit types to pass through while
3433 removing all others. This is specified as a '|'-separated list of
3434 unit type values or ranges of values with '-'.
3435
3436 remove_types
3437 Identical to pass_types, except the units in the given set removed
3438 and all others passed through.
3439
3440 Extradata is unchanged by this transformation, but note that if the
3441 stream contains inline parameter sets then the output may be unusable
3442 if they are removed.
3443
3444 For example, to remove all non-VCL NAL units from an H.264 stream:
3445
3446 ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
3447
3448 To remove all AUDs, SEI and filler from an H.265 stream:
3449
3450 ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
3451
3452 hapqa_extract
3453 Extract Rgb or Alpha part of an HAPQA file, without recompression, in
3454 order to create an HAPQ or an HAPAlphaOnly file.
3455
3456 texture
3457 Specifies the texture to keep.
3458
3459 color
3460 alpha
3461
3462 Convert HAPQA to HAPQ
3463
3464 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
3465
3466 Convert HAPQA to HAPAlphaOnly
3467
3468 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
3469
3470 h264_metadata
3471 Modify metadata embedded in an H.264 stream.
3472
3473 aud Insert or remove AUD NAL units in all access units of the stream.
3474
3475 insert
3476 remove
3477 sample_aspect_ratio
3478 Set the sample aspect ratio of the stream in the VUI parameters.
3479
3480 overscan_appropriate_flag
3481 Set whether the stream is suitable for display using overscan or
3482 not (see H.264 section E.2.1).
3483
3484 video_format
3485 video_full_range_flag
3486 Set the video format in the stream (see H.264 section E.2.1 and
3487 table E-2).
3488
3489 colour_primaries
3490 transfer_characteristics
3491 matrix_coefficients
3492 Set the colour description in the stream (see H.264 section E.2.1
3493 and tables E-3, E-4 and E-5).
3494
3495 chroma_sample_loc_type
3496 Set the chroma sample location in the stream (see H.264 section
3497 E.2.1 and figure E-1).
3498
3499 tick_rate
3500 Set the tick rate (time_scale / num_units_in_tick) in the VUI
3501 parameters. This is the smallest time unit representable in the
3502 stream, and in many cases represents the field rate of the stream
3503 (double the frame rate).
3504
3505 fixed_frame_rate_flag
3506 Set whether the stream has fixed framerate - typically this
3507 indicates that the framerate is exactly half the tick rate, but the
3508 exact meaning is dependent on interlacing and the picture structure
3509 (see H.264 section E.2.1 and table E-6).
3510
3511 zero_new_constraint_set_flags
3512 Zero constraint_set4_flag and constraint_set5_flag in the SPS.
3513 These bits were reserved in a previous version of the H.264 spec,
3514 and thus some hardware decoders require these to be zero. The
3515 result of zeroing this is still a valid bitstream.
3516
3517 crop_left
3518 crop_right
3519 crop_top
3520 crop_bottom
3521 Set the frame cropping offsets in the SPS. These values will
3522 replace the current ones if the stream is already cropped.
3523
3524 These fields are set in pixels. Note that some sizes may not be
3525 representable if the chroma is subsampled or the stream is
3526 interlaced (see H.264 section 7.4.2.1.1).
3527
3528 sei_user_data
3529 Insert a string as SEI unregistered user data. The argument must
3530 be of the form UUID+string, where the UUID is as hex digits
3531 possibly separated by hyphens, and the string can be anything.
3532
3533 For example, 086f3693-b7b3-4f2c-9653-21492feee5b8+hello will insert
3534 the string ``hello'' associated with the given UUID.
3535
3536 delete_filler
3537 Deletes both filler NAL units and filler SEI messages.
3538
3539 level
3540 Set the level in the SPS. Refer to H.264 section A.3 and tables
3541 A-1 to A-5.
3542
3543 The argument must be the name of a level (for example, 4.2), a
3544 level_idc value (for example, 42), or the special name auto
3545 indicating that the filter should attempt to guess the level from
3546 the input stream properties.
3547
3548 h264_mp4toannexb
3549 Convert an H.264 bitstream from length prefixed mode to start code
3550 prefixed mode (as defined in the Annex B of the ITU-T H.264
3551 specification).
3552
3553 This is required by some streaming formats, typically the MPEG-2
3554 transport stream format (muxer "mpegts").
3555
3556 For example to remux an MP4 file containing an H.264 stream to mpegts
3557 format with ffmpeg, you can use the command:
3558
3559 ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
3560
3561 Please note that this filter is auto-inserted for MPEG-TS (muxer
3562 "mpegts") and raw H.264 (muxer "h264") output formats.
3563
3564 h264_redundant_pps
3565 This applies a specific fixup to some Blu-ray streams which contain
3566 redundant PPSs modifying irrelevant parameters of the stream which
3567 confuse other transformations which require correct extradata.
3568
3569 A new single global PPS is created, and all of the redundant PPSs
3570 within the stream are removed.
3571
3572 hevc_metadata
3573 Modify metadata embedded in an HEVC stream.
3574
3575 aud Insert or remove AUD NAL units in all access units of the stream.
3576
3577 insert
3578 remove
3579 sample_aspect_ratio
3580 Set the sample aspect ratio in the stream in the VUI parameters.
3581
3582 video_format
3583 video_full_range_flag
3584 Set the video format in the stream (see H.265 section E.3.1 and
3585 table E.2).
3586
3587 colour_primaries
3588 transfer_characteristics
3589 matrix_coefficients
3590 Set the colour description in the stream (see H.265 section E.3.1
3591 and tables E.3, E.4 and E.5).
3592
3593 chroma_sample_loc_type
3594 Set the chroma sample location in the stream (see H.265 section
3595 E.3.1 and figure E.1).
3596
3597 tick_rate
3598 Set the tick rate in the VPS and VUI parameters (time_scale /
3599 num_units_in_tick). Combined with num_ticks_poc_diff_one, this can
3600 set a constant framerate in the stream. Note that it is likely to
3601 be overridden by container parameters when the stream is in a
3602 container.
3603
3604 num_ticks_poc_diff_one
3605 Set poc_proportional_to_timing_flag in VPS and VUI and use this
3606 value to set num_ticks_poc_diff_one_minus1 (see H.265 sections
3607 7.4.3.1 and E.3.1). Ignored if tick_rate is not also set.
3608
3609 crop_left
3610 crop_right
3611 crop_top
3612 crop_bottom
3613 Set the conformance window cropping offsets in the SPS. These
3614 values will replace the current ones if the stream is already
3615 cropped.
3616
3617 These fields are set in pixels. Note that some sizes may not be
3618 representable if the chroma is subsampled (H.265 section
3619 7.4.3.2.1).
3620
3621 level
3622 Set the level in the VPS and SPS. See H.265 section A.4 and tables
3623 A.6 and A.7.
3624
3625 The argument must be the name of a level (for example, 5.1), a
3626 general_level_idc value (for example, 153 for level 5.1), or the
3627 special name auto indicating that the filter should attempt to
3628 guess the level from the input stream properties.
3629
3630 hevc_mp4toannexb
3631 Convert an HEVC/H.265 bitstream from length prefixed mode to start code
3632 prefixed mode (as defined in the Annex B of the ITU-T H.265
3633 specification).
3634
3635 This is required by some streaming formats, typically the MPEG-2
3636 transport stream format (muxer "mpegts").
3637
3638 For example to remux an MP4 file containing an HEVC stream to mpegts
3639 format with ffmpeg, you can use the command:
3640
3641 ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
3642
3643 Please note that this filter is auto-inserted for MPEG-TS (muxer
3644 "mpegts") and raw HEVC/H.265 (muxer "h265" or "hevc") output formats.
3645
3646 imxdump
3647 Modifies the bitstream to fit in MOV and to be usable by the Final Cut
3648 Pro decoder. This filter only applies to the mpeg2video codec, and is
3649 likely not needed for Final Cut Pro 7 and newer with the appropriate
3650 -tag:v.
3651
3652 For example, to remux 30 MB/sec NTSC IMX to MOV:
3653
3654 ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
3655
3656 mjpeg2jpeg
3657 Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
3658
3659 MJPEG is a video codec wherein each video frame is essentially a JPEG
3660 image. The individual frames can be extracted without loss, e.g. by
3661
3662 ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
3663
3664 Unfortunately, these chunks are incomplete JPEG images, because they
3665 lack the DHT segment required for decoding. Quoting from
3666 <http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml>:
3667
3668 Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
3669 commented that "MJPEG, or at least the MJPEG in AVIs having the MJPG
3670 fourcc, is restricted JPEG with a fixed -- and *omitted* -- Huffman
3671 table. The JPEG must be YCbCr colorspace, it must be 4:2:2, and it must
3672 use basic Huffman encoding, not arithmetic or progressive. . . . You
3673 can indeed extract the MJPEG frames and decode them with a regular JPEG
3674 decoder, but you have to prepend the DHT segment to them, or else the
3675 decoder won't have any idea how to decompress the data. The exact table
3676 necessary is given in the OpenDML spec."
3677
3678 This bitstream filter patches the header of frames extracted from an
3679 MJPEG stream (carrying the AVI1 header ID and lacking a DHT segment) to
3680 produce fully qualified JPEG images.
3681
3682 ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
3683 exiftran -i -9 frame*.jpg
3684 ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
3685
3686 mjpegadump
3687 Add an MJPEG A header to the bitstream, to enable decoding by
3688 Quicktime.
3689
3690 mov2textsub
3691 Extract a representable text file from MOV subtitles, stripping the
3692 metadata header from each subtitle packet.
3693
3694 See also the text2movsub filter.
3695
3696 mp3decomp
3697 Decompress non-standard compressed MP3 audio headers.
3698
3699 mpeg2_metadata
3700 Modify metadata embedded in an MPEG-2 stream.
3701
3702 display_aspect_ratio
3703 Set the display aspect ratio in the stream.
3704
3705 The following fixed values are supported:
3706
3707 4/3
3708 16/9
3709 221/100
3710
3711 Any other value will result in square pixels being signalled
3712 instead (see H.262 section 6.3.3 and table 6-3).
3713
3714 frame_rate
3715 Set the frame rate in the stream. This is constructed from a table
3716 of known values combined with a small multiplier and divisor - if
3717 the supplied value is not exactly representable, the nearest
3718 representable value will be used instead (see H.262 section 6.3.3
3719 and table 6-4).
3720
3721 video_format
3722 Set the video format in the stream (see H.262 section 6.3.6 and
3723 table 6-6).
3724
3725 colour_primaries
3726 transfer_characteristics
3727 matrix_coefficients
3728 Set the colour description in the stream (see H.262 section 6.3.6
3729 and tables 6-7, 6-8 and 6-9).
3730
3731 mpeg4_unpack_bframes
3732 Unpack DivX-style packed B-frames.
3733
3734 DivX-style packed B-frames are not valid MPEG-4 and were only a
3735 workaround for the broken Video for Windows subsystem. They use more
3736 space, can cause minor AV sync issues, require more CPU power to decode
3737 (unless the player has some decoded picture queue to compensate the
3738 2,0,2,0 frame per packet style) and cause trouble if copied into a
3739 standard container like mp4 or mpeg-ps/ts, because MPEG-4 decoders may
3740 not be able to decode them, since they are not valid MPEG-4.
3741
3742 For example to fix an AVI file containing an MPEG-4 stream with DivX-
3743 style packed B-frames using ffmpeg, you can use the command:
3744
3745 ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
3746
3747 noise
3748 Damages the contents of packets or simply drops them without damaging
3749 the container. Can be used for fuzzing or testing error
3750 resilience/concealment.
3751
3752 Parameters:
3753
3754 amount
3755 Accepts an expression whose evaluation per-packet determines how
3756 often bytes in that packet will be modified. A value below 0 will
3757 result in a variable frequency. Default is 0 which results in no
3758 modification. However, if neither amount nor drop is specified,
3759 amount will be set to -1. See below for accepted variables.
3760
3761 drop
3762 Accepts an expression evaluated per-packet whose value determines
3763 whether that packet is dropped. Evaluation to a positive value
3764 results in the packet being dropped. Evaluation to a negative value
3765 results in a variable chance of it being dropped, roughly inverse
3766 in proportion to the magnitude of the value. Default is 0 which
3767 results in no drops. See below for accepted variables.
3768
3769 dropamount
3770 Accepts a non-negative integer, which assigns a variable chance of
3771 it being dropped, roughly inverse in proportion to the value.
3772 Default is 0 which results in no drops. This option is kept for
3773 backwards compatibility and is equivalent to setting drop to a
3774 negative value with the same magnitude i.e. "dropamount=4" is the
3775 same as "drop=-4". Ignored if drop is also specified.
3776
3777 Both "amount" and "drop" accept expressions containing the following
3778 variables:
3779
3780 n The index of the packet, starting from zero.
3781
3782 tb The timebase for packet timestamps.
3783
3784 pts Packet presentation timestamp.
3785
3786 dts Packet decoding timestamp.
3787
3788 nopts
3789 Constant representing AV_NOPTS_VALUE.
3790
3791 startpts
3792 First non-AV_NOPTS_VALUE PTS seen in the stream.
3793
3794 startdts
3795 First non-AV_NOPTS_VALUE DTS seen in the stream.
3796
3797 duration
3798 d Packet duration, in timebase units.
3799
3800 pos Packet position in input; may be -1 when unknown or not set.
3801
3802 size
3803 Packet size, in bytes.
3804
3805 key Whether packet is marked as a keyframe.
3806
3807 state
3808 A pseudo random integer, primarily derived from the content of
3809 packet payload.
3810
3811 Examples
3812
3813 Apply modification to every byte but don't drop any packets.
3814
3815 ffmpeg -i INPUT -c copy -bsf noise=1 output.mkv
3816
3817 Drop every video packet not marked as a keyframe after timestamp 30s
3818 but do not modify any of the remaining packets.
3819
3820 ffmpeg -i INPUT -c copy -bsf:v noise=drop='gt(t\,30)*not(key)' output.mkv
3821
3822 Drop one second of audio every 10 seconds and add some random noise to
3823 the rest.
3824
3825 ffmpeg -i INPUT -c copy -bsf:a noise=amount=-1:drop='between(mod(t\,10)\,9\,10)' output.mkv
3826
3827 null
3828 This bitstream filter passes the packets through unchanged.
3829
3830 pcm_rechunk
3831 Repacketize PCM audio to a fixed number of samples per packet or a
3832 fixed packet rate per second. This is similar to the asetnsamples audio
3833 filter but works on audio packets instead of audio frames.
3834
3835 nb_out_samples, n
3836 Set the number of samples per each output audio packet. The number
3837 is intended as the number of samples per each channel. Default
3838 value is 1024.
3839
3840 pad, p
3841 If set to 1, the filter will pad the last audio packet with
3842 silence, so that it will contain the same number of samples (or
3843 roughly the same number of samples, see frame_rate) as the previous
3844 ones. Default value is 1.
3845
3846 frame_rate, r
3847 This option makes the filter output a fixed number of packets per
3848 second instead of a fixed number of samples per packet. If the
3849 audio sample rate is not divisible by the frame rate then the
3850 number of samples will not be constant but will vary slightly so
3851 that each packet will start as close to the frame boundary as
3852 possible. Using this option has precedence over nb_out_samples.
3853
3854 You can generate the well known 1602-1601-1602-1601-1602 pattern of
3855 48kHz audio for NTSC frame rate using the frame_rate option.
3856
3857 ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
3858
3859 prores_metadata
3860 Modify color property metadata embedded in prores stream.
3861
3862 color_primaries
3863 Set the color primaries. Available values are:
3864
3865 auto
3866 Keep the same color primaries property (default).
3867
3868 unknown
3869 bt709
3870 bt470bg
3871 BT601 625
3872
3873 smpte170m
3874 BT601 525
3875
3876 bt2020
3877 smpte431
3878 DCI P3
3879
3880 smpte432
3881 P3 D65
3882
3883 transfer_characteristics
3884 Set the color transfer. Available values are:
3885
3886 auto
3887 Keep the same transfer characteristics property (default).
3888
3889 unknown
3890 bt709
3891 BT 601, BT 709, BT 2020
3892
3893 smpte2084
3894 SMPTE ST 2084
3895
3896 arib-std-b67
3897 ARIB STD-B67
3898
3899 matrix_coefficients
3900 Set the matrix coefficient. Available values are:
3901
3902 auto
3903 Keep the same colorspace property (default).
3904
3905 unknown
3906 bt709
3907 smpte170m
3908 BT 601
3909
3910 bt2020nc
3911
3912 Set Rec709 colorspace for each frame of the file
3913
3914 ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
3915
3916 Set Hybrid Log-Gamma parameters for each frame of the file
3917
3918 ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov
3919
3920 remove_extra
3921 Remove extradata from packets.
3922
3923 It accepts the following parameter:
3924
3925 freq
3926 Set which frame types to remove extradata from.
3927
3928 k Remove extradata from non-keyframes only.
3929
3930 keyframe
3931 Remove extradata from keyframes only.
3932
3933 e, all
3934 Remove extradata from all frames.
3935
3936 setts
3937 Set PTS and DTS in packets.
3938
3939 It accepts the following parameters:
3940
3941 ts
3942 pts
3943 dts Set expressions for PTS, DTS or both.
3944
3945 The expressions are evaluated through the eval API and can contain the
3946 following constants:
3947
3948 N The count of the input packet. Starting from 0.
3949
3950 TS The demux timestamp in input in case of "ts" or "dts" option or
3951 presentation timestamp in case of "pts" option.
3952
3953 POS The original position in the file of the packet, or undefined if
3954 undefined for the current packet
3955
3956 DTS The demux timestamp in input.
3957
3958 PTS The presentation timestamp in input.
3959
3960 STARTDTS
3961 The DTS of the first packet.
3962
3963 STARTPTS
3964 The PTS of the first packet.
3965
3966 PREV_INDTS
3967 The previous input DTS.
3968
3969 PREV_INPTS
3970 The previous input PTS.
3971
3972 PREV_OUTDTS
3973 The previous output DTS.
3974
3975 PREV_OUTPTS
3976 The previous output PTS.
3977
3978 TB The timebase of stream packet belongs.
3979
3980 SR The sample rate of stream packet belongs.
3981
3982 NOPTS
3983 The AV_NOPTS_VALUE constant.
3984
3985 text2movsub
3986 Convert text subtitles to MOV subtitles (as used by the "mov_text"
3987 codec) with metadata headers.
3988
3989 See also the mov2textsub filter.
3990
3991 trace_headers
3992 Log trace output containing all syntax elements in the coded stream
3993 headers (everything above the level of individual coded blocks). This
3994 can be useful for debugging low-level stream issues.
3995
3996 Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending on
3997 the build only a subset of these may be available.
3998
3999 truehd_core
4000 Extract the core from a TrueHD stream, dropping ATMOS data.
4001
4002 vp9_metadata
4003 Modify metadata embedded in a VP9 stream.
4004
4005 color_space
4006 Set the color space value in the frame header. Note that any frame
4007 set to RGB will be implicitly set to PC range and that RGB is
4008 incompatible with profiles 0 and 2.
4009
4010 unknown
4011 bt601
4012 bt709
4013 smpte170
4014 smpte240
4015 bt2020
4016 rgb
4017 color_range
4018 Set the color range value in the frame header. Note that any value
4019 imposed by the color space will take precedence over this value.
4020
4021 tv
4022 pc
4023
4024 vp9_superframe
4025 Merge VP9 invisible (alt-ref) frames back into VP9 superframes. This
4026 fixes merging of split/segmented VP9 streams where the alt-ref frame
4027 was split from its visible counterpart.
4028
4029 vp9_superframe_split
4030 Split VP9 superframes into single frames.
4031
4032 vp9_raw_reorder
4033 Given a VP9 stream with correct timestamps but possibly out of order,
4034 insert additional show-existing-frame packets to correct the ordering.
4035
4037 The libavformat library provides some generic global options, which can
4038 be set on all the muxers and demuxers. In addition each muxer or
4039 demuxer may support so-called private options, which are specific for
4040 that component.
4041
4042 Options may be set by specifying -option value in the FFmpeg tools, or
4043 by setting the value explicitly in the "AVFormatContext" options or
4044 using the libavutil/opt.h API for programmatic use.
4045
4046 The list of supported options follows:
4047
4048 avioflags flags (input/output)
4049 Possible values:
4050
4051 direct
4052 Reduce buffering.
4053
4054 probesize integer (input)
4055 Set probing size in bytes, i.e. the size of the data to analyze to
4056 get stream information. A higher value will enable detecting more
4057 information in case it is dispersed into the stream, but will
4058 increase latency. Must be an integer not lesser than 32. It is
4059 5000000 by default.
4060
4061 max_probe_packets integer (input)
4062 Set the maximum number of buffered packets when probing a codec.
4063 Default is 2500 packets.
4064
4065 packetsize integer (output)
4066 Set packet size.
4067
4068 fflags flags
4069 Set format flags. Some are implemented for a limited number of
4070 formats.
4071
4072 Possible values for input files:
4073
4074 discardcorrupt
4075 Discard corrupted packets.
4076
4077 fastseek
4078 Enable fast, but inaccurate seeks for some formats.
4079
4080 genpts
4081 Generate missing PTS if DTS is present.
4082
4083 igndts
4084 Ignore DTS if PTS is set. Inert when nofillin is set.
4085
4086 ignidx
4087 Ignore index.
4088
4089 nobuffer
4090 Reduce the latency introduced by buffering during initial input
4091 streams analysis.
4092
4093 nofillin
4094 Do not fill in missing values in packet fields that can be
4095 exactly calculated.
4096
4097 noparse
4098 Disable AVParsers, this needs "+nofillin" too.
4099
4100 sortdts
4101 Try to interleave output packets by DTS. At present, available
4102 only for AVIs with an index.
4103
4104 Possible values for output files:
4105
4106 autobsf
4107 Automatically apply bitstream filters as required by the output
4108 format. Enabled by default.
4109
4110 bitexact
4111 Only write platform-, build- and time-independent data. This
4112 ensures that file and data checksums are reproducible and match
4113 between platforms. Its primary use is for regression testing.
4114
4115 flush_packets
4116 Write out packets immediately.
4117
4118 shortest
4119 Stop muxing at the end of the shortest stream. It may be
4120 needed to increase max_interleave_delta to avoid flushing the
4121 longer streams before EOF.
4122
4123 seek2any integer (input)
4124 Allow seeking to non-keyframes on demuxer level when supported if
4125 set to 1. Default is 0.
4126
4127 analyzeduration integer (input)
4128 Specify how many microseconds are analyzed to probe the input. A
4129 higher value will enable detecting more accurate information, but
4130 will increase latency. It defaults to 5,000,000 microseconds = 5
4131 seconds.
4132
4133 cryptokey hexadecimal string (input)
4134 Set decryption key.
4135
4136 indexmem integer (input)
4137 Set max memory used for timestamp index (per stream).
4138
4139 rtbufsize integer (input)
4140 Set max memory used for buffering real-time frames.
4141
4142 fdebug flags (input/output)
4143 Print specific debug info.
4144
4145 Possible values:
4146
4147 ts
4148 max_delay integer (input/output)
4149 Set maximum muxing or demuxing delay in microseconds.
4150
4151 fpsprobesize integer (input)
4152 Set number of frames used to probe fps.
4153
4154 audio_preload integer (output)
4155 Set microseconds by which audio packets should be interleaved
4156 earlier.
4157
4158 chunk_duration integer (output)
4159 Set microseconds for each chunk.
4160
4161 chunk_size integer (output)
4162 Set size in bytes for each chunk.
4163
4164 err_detect, f_err_detect flags (input)
4165 Set error detection flags. "f_err_detect" is deprecated and should
4166 be used only via the ffmpeg tool.
4167
4168 Possible values:
4169
4170 crccheck
4171 Verify embedded CRCs.
4172
4173 bitstream
4174 Detect bitstream specification deviations.
4175
4176 buffer
4177 Detect improper bitstream length.
4178
4179 explode
4180 Abort decoding on minor error detection.
4181
4182 careful
4183 Consider things that violate the spec and have not been seen in
4184 the wild as errors.
4185
4186 compliant
4187 Consider all spec non compliancies as errors.
4188
4189 aggressive
4190 Consider things that a sane encoder should not do as an error.
4191
4192 max_interleave_delta integer (output)
4193 Set maximum buffering duration for interleaving. The duration is
4194 expressed in microseconds, and defaults to 10000000 (10 seconds).
4195
4196 To ensure all the streams are interleaved correctly, libavformat
4197 will wait until it has at least one packet for each stream before
4198 actually writing any packets to the output file. When some streams
4199 are "sparse" (i.e. there are large gaps between successive
4200 packets), this can result in excessive buffering.
4201
4202 This field specifies the maximum difference between the timestamps
4203 of the first and the last packet in the muxing queue, above which
4204 libavformat will output a packet regardless of whether it has
4205 queued a packet for all the streams.
4206
4207 If set to 0, libavformat will continue buffering packets until it
4208 has a packet for each stream, regardless of the maximum timestamp
4209 difference between the buffered packets.
4210
4211 use_wallclock_as_timestamps integer (input)
4212 Use wallclock as timestamps if set to 1. Default is 0.
4213
4214 avoid_negative_ts integer (output)
4215 Possible values:
4216
4217 make_non_negative
4218 Shift timestamps to make them non-negative. Also note that
4219 this affects only leading negative timestamps, and not non-
4220 monotonic negative timestamps.
4221
4222 make_zero
4223 Shift timestamps so that the first timestamp is 0.
4224
4225 auto (default)
4226 Enables shifting when required by the target format.
4227
4228 disabled
4229 Disables shifting of timestamp.
4230
4231 When shifting is enabled, all output timestamps are shifted by the
4232 same amount. Audio, video, and subtitles desynching and relative
4233 timestamp differences are preserved compared to how they would have
4234 been without shifting.
4235
4236 skip_initial_bytes integer (input)
4237 Set number of bytes to skip before reading header and frames if set
4238 to 1. Default is 0.
4239
4240 correct_ts_overflow integer (input)
4241 Correct single timestamp overflows if set to 1. Default is 1.
4242
4243 flush_packets integer (output)
4244 Flush the underlying I/O stream after each packet. Default is -1
4245 (auto), which means that the underlying protocol will decide, 1
4246 enables it, and has the effect of reducing the latency, 0 disables
4247 it and may increase IO throughput in some cases.
4248
4249 output_ts_offset offset (output)
4250 Set the output time offset.
4251
4252 offset must be a time duration specification, see the Time duration
4253 section in the ffmpeg-utils(1) manual.
4254
4255 The offset is added by the muxer to the output timestamps.
4256
4257 Specifying a positive offset means that the corresponding streams
4258 are delayed bt the time duration specified in offset. Default value
4259 is 0 (meaning that no offset is applied).
4260
4261 format_whitelist list (input)
4262 "," separated list of allowed demuxers. By default all are allowed.
4263
4264 dump_separator string (input)
4265 Separator used to separate the fields printed on the command line
4266 about the Stream parameters. For example, to separate the fields
4267 with newlines and indentation:
4268
4269 ffprobe -dump_separator "
4270 " -i ~/videos/matrixbench_mpeg2.mpg
4271
4272 max_streams integer (input)
4273 Specifies the maximum number of streams. This can be used to reject
4274 files that would require too many resources due to a large number
4275 of streams.
4276
4277 skip_estimate_duration_from_pts bool (input)
4278 Skip estimation of input duration when calculated using PTS. At
4279 present, applicable for MPEG-PS and MPEG-TS.
4280
4281 strict, f_strict integer (input/output)
4282 Specify how strictly to follow the standards. "f_strict" is
4283 deprecated and should be used only via the ffmpeg tool.
4284
4285 Possible values:
4286
4287 very
4288 strictly conform to an older more strict version of the spec or
4289 reference software
4290
4291 strict
4292 strictly conform to all the things in the spec no matter what
4293 consequences
4294
4295 normal
4296 unofficial
4297 allow unofficial extensions
4298
4299 experimental
4300 allow non standardized experimental things, experimental
4301 (unfinished/work in progress/not well tested) decoders and
4302 encoders. Note: experimental decoders can pose a security
4303 risk, do not use this for decoding untrusted input.
4304
4305 Format stream specifiers
4306 Format stream specifiers allow selection of one or more streams that
4307 match specific properties.
4308
4309 The exact semantics of stream specifiers is defined by the
4310 "avformat_match_stream_specifier()" function declared in the
4311 libavformat/avformat.h header and documented in the Stream specifiers
4312 section in the ffmpeg(1) manual.
4313
4315 Demuxers are configured elements in FFmpeg that can read the multimedia
4316 streams from a particular type of file.
4317
4318 When you configure your FFmpeg build, all the supported demuxers are
4319 enabled by default. You can list all available ones using the configure
4320 option "--list-demuxers".
4321
4322 You can disable all the demuxers using the configure option
4323 "--disable-demuxers", and selectively enable a single demuxer with the
4324 option "--enable-demuxer=DEMUXER", or disable it with the option
4325 "--disable-demuxer=DEMUXER".
4326
4327 The option "-demuxers" of the ff* tools will display the list of
4328 enabled demuxers. Use "-formats" to view a combined list of enabled
4329 demuxers and muxers.
4330
4331 The description of some of the currently available demuxers follows.
4332
4333 aa
4334 Audible Format 2, 3, and 4 demuxer.
4335
4336 This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files.
4337
4338 aac
4339 Raw Audio Data Transport Stream AAC demuxer.
4340
4341 This demuxer is used to demux an ADTS input containing a single AAC
4342 stream alongwith any ID3v1/2 or APE tags in it.
4343
4344 apng
4345 Animated Portable Network Graphics demuxer.
4346
4347 This demuxer is used to demux APNG files. All headers, but the PNG
4348 signature, up to (but not including) the first fcTL chunk are
4349 transmitted as extradata. Frames are then split as being all the
4350 chunks between two fcTL ones, or between the last fcTL and IEND chunks.
4351
4352 -ignore_loop bool
4353 Ignore the loop variable in the file if set. Default is enabled.
4354
4355 -max_fps int
4356 Maximum framerate in frames per second. Default of 0 imposes no
4357 limit.
4358
4359 -default_fps int
4360 Default framerate in frames per second when none is specified in
4361 the file (0 meaning as fast as possible). Default is 15.
4362
4363 asf
4364 Advanced Systems Format demuxer.
4365
4366 This demuxer is used to demux ASF files and MMS network streams.
4367
4368 -no_resync_search bool
4369 Do not try to resynchronize by looking for a certain optional start
4370 code.
4371
4372 concat
4373 Virtual concatenation script demuxer.
4374
4375 This demuxer reads a list of files and other directives from a text
4376 file and demuxes them one after the other, as if all their packets had
4377 been muxed together.
4378
4379 The timestamps in the files are adjusted so that the first file starts
4380 at 0 and each next file starts where the previous one finishes. Note
4381 that it is done globally and may cause gaps if all streams do not have
4382 exactly the same length.
4383
4384 All files must have the same streams (same codecs, same time base,
4385 etc.).
4386
4387 The duration of each file is used to adjust the timestamps of the next
4388 file: if the duration is incorrect (because it was computed using the
4389 bit-rate or because the file is truncated, for example), it can cause
4390 artifacts. The "duration" directive can be used to override the
4391 duration stored in each file.
4392
4393 Syntax
4394
4395 The script is a text file in extended-ASCII, with one directive per
4396 line. Empty lines, leading spaces and lines starting with '#' are
4397 ignored. The following directive is recognized:
4398
4399 "file path"
4400 Path to a file to read; special characters and spaces must be
4401 escaped with backslash or single quotes.
4402
4403 All subsequent file-related directives apply to that file.
4404
4405 "ffconcat version 1.0"
4406 Identify the script type and version.
4407
4408 To make FFmpeg recognize the format automatically, this directive
4409 must appear exactly as is (no extra space or byte-order-mark) on
4410 the very first line of the script.
4411
4412 "duration dur"
4413 Duration of the file. This information can be specified from the
4414 file; specifying it here may be more efficient or help if the
4415 information from the file is not available or accurate.
4416
4417 If the duration is set for all files, then it is possible to seek
4418 in the whole concatenated video.
4419
4420 "inpoint timestamp"
4421 In point of the file. When the demuxer opens the file it instantly
4422 seeks to the specified timestamp. Seeking is done so that all
4423 streams can be presented successfully at In point.
4424
4425 This directive works best with intra frame codecs, because for non-
4426 intra frame ones you will usually get extra packets before the
4427 actual In point and the decoded content will most likely contain
4428 frames before In point too.
4429
4430 For each file, packets before the file In point will have
4431 timestamps less than the calculated start timestamp of the file
4432 (negative in case of the first file), and the duration of the files
4433 (if not specified by the "duration" directive) will be reduced
4434 based on their specified In point.
4435
4436 Because of potential packets before the specified In point, packet
4437 timestamps may overlap between two concatenated files.
4438
4439 "outpoint timestamp"
4440 Out point of the file. When the demuxer reaches the specified
4441 decoding timestamp in any of the streams, it handles it as an end
4442 of file condition and skips the current and all the remaining
4443 packets from all streams.
4444
4445 Out point is exclusive, which means that the demuxer will not
4446 output packets with a decoding timestamp greater or equal to Out
4447 point.
4448
4449 This directive works best with intra frame codecs and formats where
4450 all streams are tightly interleaved. For non-intra frame codecs you
4451 will usually get additional packets with presentation timestamp
4452 after Out point therefore the decoded content will most likely
4453 contain frames after Out point too. If your streams are not tightly
4454 interleaved you may not get all the packets from all streams before
4455 Out point and you may only will be able to decode the earliest
4456 stream until Out point.
4457
4458 The duration of the files (if not specified by the "duration"
4459 directive) will be reduced based on their specified Out point.
4460
4461 "file_packet_metadata key=value"
4462 Metadata of the packets of the file. The specified metadata will be
4463 set for each file packet. You can specify this directive multiple
4464 times to add multiple metadata entries. This directive is
4465 deprecated, use "file_packet_meta" instead.
4466
4467 "file_packet_meta key value"
4468 Metadata of the packets of the file. The specified metadata will be
4469 set for each file packet. You can specify this directive multiple
4470 times to add multiple metadata entries.
4471
4472 "option key value"
4473 Option to access, open and probe the file. Can be present multiple
4474 times.
4475
4476 "stream"
4477 Introduce a stream in the virtual file. All subsequent stream-
4478 related directives apply to the last introduced stream. Some
4479 streams properties must be set in order to allow identifying the
4480 matching streams in the subfiles. If no streams are defined in the
4481 script, the streams from the first file are copied.
4482
4483 "exact_stream_id id"
4484 Set the id of the stream. If this directive is given, the string
4485 with the corresponding id in the subfiles will be used. This is
4486 especially useful for MPEG-PS (VOB) files, where the order of the
4487 streams is not reliable.
4488
4489 "stream_meta key value"
4490 Metadata for the stream. Can be present multiple times.
4491
4492 "stream_codec value"
4493 Codec for the stream.
4494
4495 "stream_extradata hex_string"
4496 Extradata for the string, encoded in hexadecimal.
4497
4498 "chapter id start end"
4499 Add a chapter. id is an unique identifier, possibly small and
4500 consecutive.
4501
4502 Options
4503
4504 This demuxer accepts the following option:
4505
4506 safe
4507 If set to 1, reject unsafe file paths and directives. A file path
4508 is considered safe if it does not contain a protocol specification
4509 and is relative and all components only contain characters from the
4510 portable character set (letters, digits, period, underscore and
4511 hyphen) and have no period at the beginning of a component.
4512
4513 If set to 0, any file name is accepted.
4514
4515 The default is 1.
4516
4517 auto_convert
4518 If set to 1, try to perform automatic conversions on packet data to
4519 make the streams concatenable. The default is 1.
4520
4521 Currently, the only conversion is adding the h264_mp4toannexb
4522 bitstream filter to H.264 streams in MP4 format. This is necessary
4523 in particular if there are resolution changes.
4524
4525 segment_time_metadata
4526 If set to 1, every packet will contain the lavf.concat.start_time
4527 and the lavf.concat.duration packet metadata values which are the
4528 start_time and the duration of the respective file segments in the
4529 concatenated output expressed in microseconds. The duration
4530 metadata is only set if it is known based on the concat file. The
4531 default is 0.
4532
4533 Examples
4534
4535 • Use absolute filenames and include some comments:
4536
4537 # my first filename
4538 file /mnt/share/file-1.wav
4539 # my second filename including whitespace
4540 file '/mnt/share/file 2.wav'
4541 # my third filename including whitespace plus single quote
4542 file '/mnt/share/file 3'\''.wav'
4543
4544 • Allow for input format auto-probing, use safe filenames and set the
4545 duration of the first file:
4546
4547 ffconcat version 1.0
4548
4549 file file-1.wav
4550 duration 20.0
4551
4552 file subdir/file-2.wav
4553
4554 dash
4555 Dynamic Adaptive Streaming over HTTP demuxer.
4556
4557 This demuxer presents all AVStreams found in the manifest. By setting
4558 the discard flags on AVStreams the caller can decide which streams to
4559 actually receive. Each stream mirrors the "id" and "bandwidth"
4560 properties from the "<Representation>" as metadata keys named "id" and
4561 "variant_bitrate" respectively.
4562
4563 imf
4564 Interoperable Master Format demuxer.
4565
4566 This demuxer presents audio and video streams found in an IMF
4567 Composition.
4568
4569 flv, live_flv, kux
4570 Adobe Flash Video Format demuxer.
4571
4572 This demuxer is used to demux FLV files and RTMP network streams. In
4573 case of live network streams, if you force format, you may use live_flv
4574 option instead of flv to survive timestamp discontinuities. KUX is a
4575 flv variant used on the Youku platform.
4576
4577 ffmpeg -f flv -i myfile.flv ...
4578 ffmpeg -f live_flv -i rtmp://<any.server>/anything/key ....
4579
4580 -flv_metadata bool
4581 Allocate the streams according to the onMetaData array content.
4582
4583 -flv_ignore_prevtag bool
4584 Ignore the size of previous tag value.
4585
4586 -flv_full_metadata bool
4587 Output all context of the onMetadata.
4588
4589 gif
4590 Animated GIF demuxer.
4591
4592 It accepts the following options:
4593
4594 min_delay
4595 Set the minimum valid delay between frames in hundredths of
4596 seconds. Range is 0 to 6000. Default value is 2.
4597
4598 max_gif_delay
4599 Set the maximum valid delay between frames in hundredth of seconds.
4600 Range is 0 to 65535. Default value is 65535 (nearly eleven
4601 minutes), the maximum value allowed by the specification.
4602
4603 default_delay
4604 Set the default delay between frames in hundredths of seconds.
4605 Range is 0 to 6000. Default value is 10.
4606
4607 ignore_loop
4608 GIF files can contain information to loop a certain number of times
4609 (or infinitely). If ignore_loop is set to 1, then the loop setting
4610 from the input will be ignored and looping will not occur. If set
4611 to 0, then looping will occur and will cycle the number of times
4612 according to the GIF. Default value is 1.
4613
4614 For example, with the overlay filter, place an infinitely looping GIF
4615 over another video:
4616
4617 ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv
4618
4619 Note that in the above example the shortest option for overlay filter
4620 is used to end the output video at the length of the shortest input
4621 file, which in this case is input.mp4 as the GIF in this example loops
4622 infinitely.
4623
4624 hls
4625 HLS demuxer
4626
4627 Apple HTTP Live Streaming demuxer.
4628
4629 This demuxer presents all AVStreams from all variant streams. The id
4630 field is set to the bitrate variant index number. By setting the
4631 discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), the
4632 caller can decide which variant streams to actually receive. The total
4633 bitrate of the variant that the stream belongs to is available in a
4634 metadata key named "variant_bitrate".
4635
4636 It accepts the following options:
4637
4638 live_start_index
4639 segment index to start live streams at (negative values are from
4640 the end).
4641
4642 allowed_extensions
4643 ',' separated list of file extensions that hls is allowed to
4644 access.
4645
4646 max_reload
4647 Maximum number of times a insufficient list is attempted to be
4648 reloaded. Default value is 1000.
4649
4650 m3u8_hold_counters
4651 The maximum number of times to load m3u8 when it refreshes without
4652 new segments. Default value is 1000.
4653
4654 http_persistent
4655 Use persistent HTTP connections. Applicable only for HTTP streams.
4656 Enabled by default.
4657
4658 http_multiple
4659 Use multiple HTTP connections for downloading HTTP segments.
4660 Enabled by default for HTTP/1.1 servers.
4661
4662 http_seekable
4663 Use HTTP partial requests for downloading HTTP segments. 0 =
4664 disable, 1 = enable, -1 = auto, Default is auto.
4665
4666 seg_format_options
4667 Set options for the demuxer of media segments using a list of
4668 key=value pairs separated by ":".
4669
4670 image2
4671 Image file demuxer.
4672
4673 This demuxer reads from a list of image files specified by a pattern.
4674 The syntax and meaning of the pattern is specified by the option
4675 pattern_type.
4676
4677 The pattern may contain a suffix which is used to automatically
4678 determine the format of the images contained in the files.
4679
4680 The size, the pixel format, and the format of each image must be the
4681 same for all the files in the sequence.
4682
4683 This demuxer accepts the following options:
4684
4685 framerate
4686 Set the frame rate for the video stream. It defaults to 25.
4687
4688 loop
4689 If set to 1, loop over the input. Default value is 0.
4690
4691 pattern_type
4692 Select the pattern type used to interpret the provided filename.
4693
4694 pattern_type accepts one of the following values.
4695
4696 none
4697 Disable pattern matching, therefore the video will only contain
4698 the specified image. You should use this option if you do not
4699 want to create sequences from multiple images and your
4700 filenames may contain special pattern characters.
4701
4702 sequence
4703 Select a sequence pattern type, used to specify a sequence of
4704 files indexed by sequential numbers.
4705
4706 A sequence pattern may contain the string "%d" or "%0Nd", which
4707 specifies the position of the characters representing a
4708 sequential number in each filename matched by the pattern. If
4709 the form "%d0Nd" is used, the string representing the number in
4710 each filename is 0-padded and N is the total number of 0-padded
4711 digits representing the number. The literal character '%' can
4712 be specified in the pattern with the string "%%".
4713
4714 If the sequence pattern contains "%d" or "%0Nd", the first
4715 filename of the file list specified by the pattern must contain
4716 a number inclusively contained between start_number and
4717 start_number+start_number_range-1, and all the following
4718 numbers must be sequential.
4719
4720 For example the pattern "img-%03d.bmp" will match a sequence of
4721 filenames of the form img-001.bmp, img-002.bmp, ...,
4722 img-010.bmp, etc.; the pattern "i%%m%%g-%d.jpg" will match a
4723 sequence of filenames of the form i%m%g-1.jpg, i%m%g-2.jpg,
4724 ..., i%m%g-10.jpg, etc.
4725
4726 Note that the pattern must not necessarily contain "%d" or
4727 "%0Nd", for example to convert a single image file img.jpeg you
4728 can employ the command:
4729
4730 ffmpeg -i img.jpeg img.png
4731
4732 glob
4733 Select a glob wildcard pattern type.
4734
4735 The pattern is interpreted like a "glob()" pattern. This is
4736 only selectable if libavformat was compiled with globbing
4737 support.
4738
4739 glob_sequence (deprecated, will be removed)
4740 Select a mixed glob wildcard/sequence pattern.
4741
4742 If your version of libavformat was compiled with globbing
4743 support, and the provided pattern contains at least one glob
4744 meta character among "%*?[]{}" that is preceded by an unescaped
4745 "%", the pattern is interpreted like a "glob()" pattern,
4746 otherwise it is interpreted like a sequence pattern.
4747
4748 All glob special characters "%*?[]{}" must be prefixed with
4749 "%". To escape a literal "%" you shall use "%%".
4750
4751 For example the pattern "foo-%*.jpeg" will match all the
4752 filenames prefixed by "foo-" and terminating with ".jpeg", and
4753 "foo-%?%?%?.jpeg" will match all the filenames prefixed with
4754 "foo-", followed by a sequence of three characters, and
4755 terminating with ".jpeg".
4756
4757 This pattern type is deprecated in favor of glob and sequence.
4758
4759 Default value is glob_sequence.
4760
4761 pixel_format
4762 Set the pixel format of the images to read. If not specified the
4763 pixel format is guessed from the first image file in the sequence.
4764
4765 start_number
4766 Set the index of the file matched by the image file pattern to
4767 start to read from. Default value is 0.
4768
4769 start_number_range
4770 Set the index interval range to check when looking for the first
4771 image file in the sequence, starting from start_number. Default
4772 value is 5.
4773
4774 ts_from_file
4775 If set to 1, will set frame timestamp to modification time of image
4776 file. Note that monotonity of timestamps is not provided: images go
4777 in the same order as without this option. Default value is 0. If
4778 set to 2, will set frame timestamp to the modification time of the
4779 image file in nanosecond precision.
4780
4781 video_size
4782 Set the video size of the images to read. If not specified the
4783 video size is guessed from the first image file in the sequence.
4784
4785 export_path_metadata
4786 If set to 1, will add two extra fields to the metadata found in
4787 input, making them also available for other filters (see drawtext
4788 filter for examples). Default value is 0. The extra fields are
4789 described below:
4790
4791 lavf.image2dec.source_path
4792 Corresponds to the full path to the input file being read.
4793
4794 lavf.image2dec.source_basename
4795 Corresponds to the name of the file being read.
4796
4797 Examples
4798
4799 • Use ffmpeg for creating a video from the images in the file
4800 sequence img-001.jpeg, img-002.jpeg, ..., assuming an input frame
4801 rate of 10 frames per second:
4802
4803 ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
4804
4805 • As above, but start by reading from a file with index 100 in the
4806 sequence:
4807
4808 ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
4809
4810 • Read images matching the "*.png" glob pattern , that is all the
4811 files terminating with the ".png" suffix:
4812
4813 ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv
4814
4815 libgme
4816 The Game Music Emu library is a collection of video game music file
4817 emulators.
4818
4819 See <https://bitbucket.org/mpyne/game-music-emu/overview> for more
4820 information.
4821
4822 It accepts the following options:
4823
4824 track_index
4825 Set the index of which track to demux. The demuxer can only export
4826 one track. Track indexes start at 0. Default is to pick the first
4827 track. Number of tracks is exported as tracks metadata entry.
4828
4829 sample_rate
4830 Set the sampling rate of the exported track. Range is 1000 to
4831 999999. Default is 44100.
4832
4833 max_size (bytes)
4834 The demuxer buffers the entire file into memory. Adjust this value
4835 to set the maximum buffer size, which in turn, acts as a ceiling
4836 for the size of files that can be read. Default is 50 MiB.
4837
4838 libmodplug
4839 ModPlug based module demuxer
4840
4841 See <https://github.com/Konstanty/libmodplug>
4842
4843 It will export one 2-channel 16-bit 44.1 kHz audio stream. Optionally,
4844 a "pal8" 16-color video stream can be exported with or without printed
4845 metadata.
4846
4847 It accepts the following options:
4848
4849 noise_reduction
4850 Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default
4851 is 0.
4852
4853 reverb_depth
4854 Set amount of reverb. Range 0-100. Default is 0.
4855
4856 reverb_delay
4857 Set delay in ms, clamped to 40-250 ms. Default is 0.
4858
4859 bass_amount
4860 Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet)
4861 to 100 (loud). Default is 0.
4862
4863 bass_range
4864 Set cutoff i.e. upper-bound for bass frequencies. Range is 10-100
4865 Hz. Default is 0.
4866
4867 surround_depth
4868 Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100
4869 (heavy). Default is 0.
4870
4871 surround_delay
4872 Set surround delay in ms, clamped to 5-40 ms. Default is 0.
4873
4874 max_size
4875 The demuxer buffers the entire file into memory. Adjust this value
4876 to set the maximum buffer size, which in turn, acts as a ceiling
4877 for the size of files that can be read. Range is 0 to 100 MiB. 0
4878 removes buffer size limit (not recommended). Default is 5 MiB.
4879
4880 video_stream_expr
4881 String which is evaluated using the eval API to assign colors to
4882 the generated video stream. Variables which can be used are "x",
4883 "y", "w", "h", "t", "speed", "tempo", "order", "pattern" and "row".
4884
4885 video_stream
4886 Generate video stream. Can be 1 (on) or 0 (off). Default is 0.
4887
4888 video_stream_w
4889 Set video frame width in 'chars' where one char indicates 8 pixels.
4890 Range is 20-512. Default is 30.
4891
4892 video_stream_h
4893 Set video frame height in 'chars' where one char indicates 8
4894 pixels. Range is 20-512. Default is 30.
4895
4896 video_stream_ptxt
4897 Print metadata on video stream. Includes "speed", "tempo", "order",
4898 "pattern", "row" and "ts" (time in ms). Can be 1 (on) or 0 (off).
4899 Default is 1.
4900
4901 libopenmpt
4902 libopenmpt based module demuxer
4903
4904 See <https://lib.openmpt.org/libopenmpt/> for more information.
4905
4906 Some files have multiple subsongs (tracks) this can be set with the
4907 subsong option.
4908
4909 It accepts the following options:
4910
4911 subsong
4912 Set the subsong index. This can be either 'all', 'auto', or the
4913 index of the subsong. Subsong indexes start at 0. The default is
4914 'auto'.
4915
4916 The default value is to let libopenmpt choose.
4917
4918 layout
4919 Set the channel layout. Valid values are 1, 2, and 4 channel
4920 layouts. The default value is STEREO.
4921
4922 sample_rate
4923 Set the sample rate for libopenmpt to output. Range is from 1000
4924 to INT_MAX. The value default is 48000.
4925
4926 mov/mp4/3gp
4927 Demuxer for Quicktime File Format & ISO/IEC Base Media File Format
4928 (ISO/IEC 14496-12 or MPEG-4 Part 12, ISO/IEC 15444-12 or JPEG 2000 Part
4929 12).
4930
4931 Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism,
4932 ismv, isma, f4v
4933
4934 Options
4935
4936 This demuxer accepts the following options:
4937
4938 enable_drefs
4939 Enable loading of external tracks, disabled by default. Enabling
4940 this can theoretically leak information in some use cases.
4941
4942 use_absolute_path
4943 Allows loading of external tracks via absolute paths, disabled by
4944 default. Enabling this poses a security risk. It should only be
4945 enabled if the source is known to be non-malicious.
4946
4947 seek_streams_individually
4948 When seeking, identify the closest point in each stream
4949 individually and demux packets in that stream from identified
4950 point. This can lead to a different sequence of packets compared to
4951 demuxing linearly from the beginning. Default is true.
4952
4953 ignore_editlist
4954 Ignore any edit list atoms. The demuxer, by default, modifies the
4955 stream index to reflect the timeline described by the edit list.
4956 Default is false.
4957
4958 advanced_editlist
4959 Modify the stream index to reflect the timeline described by the
4960 edit list. "ignore_editlist" must be set to false for this option
4961 to be effective. If both "ignore_editlist" and this option are set
4962 to false, then only the start of the stream index is modified to
4963 reflect initial dwell time or starting timestamp described by the
4964 edit list. Default is true.
4965
4966 ignore_chapters
4967 Don't parse chapters. This includes GoPro 'HiLight' tags/moments.
4968 Note that chapters are only parsed when input is seekable. Default
4969 is false.
4970
4971 use_mfra_for
4972 For seekable fragmented input, set fragment's starting timestamp
4973 from media fragment random access box, if present.
4974
4975 Following options are available:
4976
4977 auto
4978 Auto-detect whether to set mfra timestamps as PTS or DTS
4979 (default)
4980
4981 dts Set mfra timestamps as DTS
4982
4983 pts Set mfra timestamps as PTS
4984
4985 0 Don't use mfra box to set timestamps
4986
4987 use_tfdt
4988 For fragmented input, set fragment's starting timestamp to
4989 "baseMediaDecodeTime" from the "tfdt" box. Default is enabled,
4990 which will prefer to use the "tfdt" box to set DTS. Disable to use
4991 the "earliest_presentation_time" from the "sidx" box. In either
4992 case, the timestamp from the "mfra" box will be used if it's
4993 available and "use_mfra_for" is set to pts or dts.
4994
4995 export_all
4996 Export unrecognized boxes within the udta box as metadata entries.
4997 The first four characters of the box type are set as the key.
4998 Default is false.
4999
5000 export_xmp
5001 Export entire contents of XMP_ box and uuid box as a string with
5002 key "xmp". Note that if "export_all" is set and this option isn't,
5003 the contents of XMP_ box are still exported but with key "XMP_".
5004 Default is false.
5005
5006 activation_bytes
5007 4-byte key required to decrypt Audible AAX and AAX+ files. See
5008 Audible AAX subsection below.
5009
5010 audible_fixed_key
5011 Fixed key used for handling Audible AAX/AAX+ files. It has been
5012 pre-set so should not be necessary to specify.
5013
5014 decryption_key
5015 16-byte key, in hex, to decrypt files encrypted using ISO Common
5016 Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
5017
5018 max_stts_delta
5019 Very high sample deltas written in a trak's stts box may
5020 occasionally be intended but usually they are written in error or
5021 used to store a negative value for dts correction when treated as
5022 signed 32-bit integers. This option lets the user set an upper
5023 limit, beyond which the delta is clamped to 1. Values greater than
5024 the limit if negative when cast to int32 are used to adjust onward
5025 dts.
5026
5027 Unit is the track time scale. Range is 0 to UINT_MAX. Default is
5028 "UINT_MAX - 48000*10" which allows upto a 10 second dts correction
5029 for 48 kHz audio streams while accommodating 99.9% of "uint32"
5030 range.
5031
5032 Audible AAX
5033
5034 Audible AAX files are encrypted M4B files, and they can be decrypted by
5035 specifying a 4 byte activation secret.
5036
5037 ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
5038
5039 mpegts
5040 MPEG-2 transport stream demuxer.
5041
5042 This demuxer accepts the following options:
5043
5044 resync_size
5045 Set size limit for looking up a new synchronization. Default value
5046 is 65536.
5047
5048 skip_unknown_pmt
5049 Skip PMTs for programs not defined in the PAT. Default value is 0.
5050
5051 fix_teletext_pts
5052 Override teletext packet PTS and DTS values with the timestamps
5053 calculated from the PCR of the first program which the teletext
5054 stream is part of and is not discarded. Default value is 1, set
5055 this option to 0 if you want your teletext packet PTS and DTS
5056 values untouched.
5057
5058 ts_packetsize
5059 Output option carrying the raw packet size in bytes. Show the
5060 detected raw packet size, cannot be set by the user.
5061
5062 scan_all_pmts
5063 Scan and combine all PMTs. The value is an integer with value from
5064 -1 to 1 (-1 means automatic setting, 1 means enabled, 0 means
5065 disabled). Default value is -1.
5066
5067 merge_pmt_versions
5068 Re-use existing streams when a PMT's version is updated and
5069 elementary streams move to different PIDs. Default value is 0.
5070
5071 mpjpeg
5072 MJPEG encapsulated in multi-part MIME demuxer.
5073
5074 This demuxer allows reading of MJPEG, where each frame is represented
5075 as a part of multipart/x-mixed-replace stream.
5076
5077 strict_mime_boundary
5078 Default implementation applies a relaxed standard to multi-part
5079 MIME boundary detection, to prevent regression with numerous
5080 existing endpoints not generating a proper MIME MJPEG stream.
5081 Turning this option on by setting it to 1 will result in a stricter
5082 check of the boundary value.
5083
5084 rawvideo
5085 Raw video demuxer.
5086
5087 This demuxer allows one to read raw video data. Since there is no
5088 header specifying the assumed video parameters, the user must specify
5089 them in order to be able to decode the data correctly.
5090
5091 This demuxer accepts the following options:
5092
5093 framerate
5094 Set input video frame rate. Default value is 25.
5095
5096 pixel_format
5097 Set the input video pixel format. Default value is "yuv420p".
5098
5099 video_size
5100 Set the input video size. This value must be specified explicitly.
5101
5102 For example to read a rawvideo file input.raw with ffplay, assuming a
5103 pixel format of "rgb24", a video size of "320x240", and a frame rate of
5104 10 images per second, use the command:
5105
5106 ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw
5107
5108 sbg
5109 SBaGen script demuxer.
5110
5111 This demuxer reads the script language used by SBaGen
5112 <http://uazu.net/sbagen/> to generate binaural beats sessions. A SBG
5113 script looks like that:
5114
5115 -SE
5116 a: 300-2.5/3 440+4.5/0
5117 b: 300-2.5/0 440+4.5/3
5118 off: -
5119 NOW == a
5120 +0:07:00 == b
5121 +0:14:00 == a
5122 +0:21:00 == b
5123 +0:30:00 off
5124
5125 A SBG script can mix absolute and relative timestamps. If the script
5126 uses either only absolute timestamps (including the script start time)
5127 or only relative ones, then its layout is fixed, and the conversion is
5128 straightforward. On the other hand, if the script mixes both kind of
5129 timestamps, then the NOW reference for relative timestamps will be
5130 taken from the current time of day at the time the script is read, and
5131 the script layout will be frozen according to that reference. That
5132 means that if the script is directly played, the actual times will
5133 match the absolute timestamps up to the sound controller's clock
5134 accuracy, but if the user somehow pauses the playback or seeks, all
5135 times will be shifted accordingly.
5136
5137 tedcaptions
5138 JSON captions used for <http://www.ted.com/>.
5139
5140 TED does not provide links to the captions, but they can be guessed
5141 from the page. The file tools/bookmarklets.html from the FFmpeg source
5142 tree contains a bookmarklet to expose them.
5143
5144 This demuxer accepts the following option:
5145
5146 start_time
5147 Set the start time of the TED talk, in milliseconds. The default is
5148 15000 (15s). It is used to sync the captions with the downloadable
5149 videos, because they include a 15s intro.
5150
5151 Example: convert the captions to a format most players understand:
5152
5153 ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
5154
5155 vapoursynth
5156 Vapoursynth wrapper.
5157
5158 Due to security concerns, Vapoursynth scripts will not be autodetected
5159 so the input format has to be forced. For ff* CLI tools, add "-f
5160 vapoursynth" before the input "-i yourscript.vpy".
5161
5162 This demuxer accepts the following option:
5163
5164 max_script_size
5165 The demuxer buffers the entire script into memory. Adjust this
5166 value to set the maximum buffer size, which in turn, acts as a
5167 ceiling for the size of scripts that can be read. Default is 1
5168 MiB.
5169
5171 FFmpeg is able to dump metadata from media files into a simple
5172 UTF-8-encoded INI-like text file and then load it back using the
5173 metadata muxer/demuxer.
5174
5175 The file format is as follows:
5176
5177 1. A file consists of a header and a number of metadata tags divided
5178 into sections, each on its own line.
5179
5180 2. The header is a ;FFMETADATA string, followed by a version number
5181 (now 1).
5182
5183 3. Metadata tags are of the form key=value
5184
5185 4. Immediately after header follows global metadata
5186
5187 5. After global metadata there may be sections with
5188 per-stream/per-chapter metadata.
5189
5190 6. A section starts with the section name in uppercase (i.e. STREAM or
5191 CHAPTER) in brackets ([, ]) and ends with next section or end of
5192 file.
5193
5194 7. At the beginning of a chapter section there may be an optional
5195 timebase to be used for start/end values. It must be in form
5196 TIMEBASE=num/den, where num and den are integers. If the timebase
5197 is missing then start/end times are assumed to be in nanoseconds.
5198
5199 Next a chapter section must contain chapter start and end times in
5200 form START=num, END=num, where num is a positive integer.
5201
5202 8. Empty lines and lines starting with ; or # are ignored.
5203
5204 9. Metadata keys or values containing special characters (=, ;, #, \
5205 and a newline) must be escaped with a backslash \.
5206
5207 10. Note that whitespace in metadata (e.g. foo = bar) is considered to
5208 be a part of the tag (in the example above key is foo , value is
5209 bar).
5210
5211 A ffmetadata file might look like this:
5212
5213 ;FFMETADATA1
5214 title=bike\\shed
5215 ;this is a comment
5216 artist=FFmpeg troll team
5217
5218 [CHAPTER]
5219 TIMEBASE=1/1000
5220 START=0
5221 #chapter ends at 0:01:00
5222 END=60000
5223 title=chapter \#1
5224 [STREAM]
5225 title=multi\
5226 line
5227
5228 By using the ffmetadata muxer and demuxer it is possible to extract
5229 metadata from an input file to an ffmetadata file, and then transcode
5230 the file into an output file with the edited ffmetadata file.
5231
5232 Extracting an ffmetadata file with ffmpeg goes as follows:
5233
5234 ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
5235
5236 Reinserting edited metadata information from the FFMETADATAFILE file
5237 can be done as:
5238
5239 ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
5240
5242 The libavformat library provides some generic global options, which can
5243 be set on all the protocols. In addition each protocol may support so-
5244 called private options, which are specific for that component.
5245
5246 Options may be set by specifying -option value in the FFmpeg tools, or
5247 by setting the value explicitly in the "AVFormatContext" options or
5248 using the libavutil/opt.h API for programmatic use.
5249
5250 The list of supported options follows:
5251
5252 protocol_whitelist list (input)
5253 Set a ","-separated list of allowed protocols. "ALL" matches all
5254 protocols. Protocols prefixed by "-" are disabled. All protocols
5255 are allowed by default but protocols used by an another protocol
5256 (nested protocols) are restricted to a per protocol subset.
5257
5259 Protocols are configured elements in FFmpeg that enable access to
5260 resources that require specific protocols.
5261
5262 When you configure your FFmpeg build, all the supported protocols are
5263 enabled by default. You can list all available ones using the configure
5264 option "--list-protocols".
5265
5266 You can disable all the protocols using the configure option
5267 "--disable-protocols", and selectively enable a protocol using the
5268 option "--enable-protocol=PROTOCOL", or you can disable a particular
5269 protocol using the option "--disable-protocol=PROTOCOL".
5270
5271 The option "-protocols" of the ff* tools will display the list of
5272 supported protocols.
5273
5274 All protocols accept the following options:
5275
5276 rw_timeout
5277 Maximum time to wait for (network) read/write operations to
5278 complete, in microseconds.
5279
5280 A description of the currently available protocols follows.
5281
5282 amqp
5283 Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker
5284 based publish-subscribe communication protocol.
5285
5286 FFmpeg must be compiled with --enable-librabbitmq to support AMQP. A
5287 separate AMQP broker must also be run. An example open-source AMQP
5288 broker is RabbitMQ.
5289
5290 After starting the broker, an FFmpeg client may stream data to the
5291 broker using the command:
5292
5293 ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]
5294
5295 Where hostname and port (default is 5672) is the address of the broker.
5296 The client may also set a user/password for authentication. The default
5297 for both fields is "guest". Name of virtual host on broker can be set
5298 with vhost. The default value is "/".
5299
5300 Muliple subscribers may stream from the broker using the command:
5301
5302 ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]
5303
5304 In RabbitMQ all data published to the broker flows through a specific
5305 exchange, and each subscribing client has an assigned queue/buffer.
5306 When a packet arrives at an exchange, it may be copied to a client's
5307 queue depending on the exchange and routing_key fields.
5308
5309 The following options are supported:
5310
5311 exchange
5312 Sets the exchange to use on the broker. RabbitMQ has several
5313 predefined exchanges: "amq.direct" is the default exchange, where
5314 the publisher and subscriber must have a matching routing_key;
5315 "amq.fanout" is the same as a broadcast operation (i.e. the data is
5316 forwarded to all queues on the fanout exchange independent of the
5317 routing_key); and "amq.topic" is similar to "amq.direct", but
5318 allows for more complex pattern matching (refer to the RabbitMQ
5319 documentation).
5320
5321 routing_key
5322 Sets the routing key. The default value is "amqp". The routing key
5323 is used on the "amq.direct" and "amq.topic" exchanges to decide
5324 whether packets are written to the queue of a subscriber.
5325
5326 pkt_size
5327 Maximum size of each packet sent/received to the broker. Default is
5328 131072. Minimum is 4096 and max is any large value (representable
5329 by an int). When receiving packets, this sets an internal buffer
5330 size in FFmpeg. It should be equal to or greater than the size of
5331 the published packets to the broker. Otherwise the received message
5332 may be truncated causing decoding errors.
5333
5334 connection_timeout
5335 The timeout in seconds during the initial connection to the broker.
5336 The default value is rw_timeout, or 5 seconds if rw_timeout is not
5337 set.
5338
5339 delivery_mode mode
5340 Sets the delivery mode of each message sent to broker. The
5341 following values are accepted:
5342
5343 persistent
5344 Delivery mode set to "persistent" (2). This is the default
5345 value. Messages may be written to the broker's disk depending
5346 on its setup.
5347
5348 non-persistent
5349 Delivery mode set to "non-persistent" (1). Messages will stay
5350 in broker's memory unless the broker is under memory pressure.
5351
5352 async
5353 Asynchronous data filling wrapper for input stream.
5354
5355 Fill data in a background thread, to decouple I/O operation from demux
5356 thread.
5357
5358 async:<URL>
5359 async:http://host/resource
5360 async:cache:http://host/resource
5361
5362 bluray
5363 Read BluRay playlist.
5364
5365 The accepted options are:
5366
5367 angle
5368 BluRay angle
5369
5370 chapter
5371 Start chapter (1...N)
5372
5373 playlist
5374 Playlist to read (BDMV/PLAYLIST/?????.mpls)
5375
5376 Examples:
5377
5378 Read longest playlist from BluRay mounted to /mnt/bluray:
5379
5380 bluray:/mnt/bluray
5381
5382 Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start
5383 from chapter 2:
5384
5385 -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
5386
5387 cache
5388 Caching wrapper for input stream.
5389
5390 Cache the input stream to temporary file. It brings seeking capability
5391 to live streams.
5392
5393 The accepted options are:
5394
5395 read_ahead_limit
5396 Amount in bytes that may be read ahead when seeking isn't
5397 supported. Range is -1 to INT_MAX. -1 for unlimited. Default is
5398 65536.
5399
5400 URL Syntax is
5401
5402 cache:<URL>
5403
5404 concat
5405 Physical concatenation protocol.
5406
5407 Read and seek from many resources in sequence as if they were a unique
5408 resource.
5409
5410 A URL accepted by this protocol has the syntax:
5411
5412 concat:<URL1>|<URL2>|...|<URLN>
5413
5414 where URL1, URL2, ..., URLN are the urls of the resource to be
5415 concatenated, each one possibly specifying a distinct protocol.
5416
5417 For example to read a sequence of files split1.mpeg, split2.mpeg,
5418 split3.mpeg with ffplay use the command:
5419
5420 ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
5421
5422 Note that you may need to escape the character "|" which is special for
5423 many shells.
5424
5425 concatf
5426 Physical concatenation protocol using a line break delimited list of
5427 resources.
5428
5429 Read and seek from many resources in sequence as if they were a unique
5430 resource.
5431
5432 A URL accepted by this protocol has the syntax:
5433
5434 concatf:<URL>
5435
5436 where URL is the url containing a line break delimited list of
5437 resources to be concatenated, each one possibly specifying a distinct
5438 protocol. Special characters must be escaped with backslash or single
5439 quotes. See the "Quoting and escaping" section in the ffmpeg-utils(1)
5440 manual.
5441
5442 For example to read a sequence of files split1.mpeg, split2.mpeg,
5443 split3.mpeg listed in separate lines within a file split.txt with
5444 ffplay use the command:
5445
5446 ffplay concatf:split.txt
5447
5448 Where split.txt contains the lines:
5449
5450 split1.mpeg
5451 split2.mpeg
5452 split3.mpeg
5453
5454 crypto
5455 AES-encrypted stream reading protocol.
5456
5457 The accepted options are:
5458
5459 key Set the AES decryption key binary block from given hexadecimal
5460 representation.
5461
5462 iv Set the AES decryption initialization vector binary block from
5463 given hexadecimal representation.
5464
5465 Accepted URL formats:
5466
5467 crypto:<URL>
5468 crypto+<URL>
5469
5470 data
5471 Data in-line in the URI. See
5472 <http://en.wikipedia.org/wiki/Data_URI_scheme>.
5473
5474 For example, to convert a GIF file given inline with ffmpeg:
5475
5476 ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
5477
5478 file
5479 File access protocol.
5480
5481 Read from or write to a file.
5482
5483 A file URL can have the form:
5484
5485 file:<filename>
5486
5487 where filename is the path of the file to read.
5488
5489 An URL that does not have a protocol prefix will be assumed to be a
5490 file URL. Depending on the build, an URL that looks like a Windows path
5491 with the drive letter at the beginning will also be assumed to be a
5492 file URL (usually not the case in builds for unix-like systems).
5493
5494 For example to read from a file input.mpeg with ffmpeg use the command:
5495
5496 ffmpeg -i file:input.mpeg output.mpeg
5497
5498 This protocol accepts the following options:
5499
5500 truncate
5501 Truncate existing files on write, if set to 1. A value of 0
5502 prevents truncating. Default value is 1.
5503
5504 blocksize
5505 Set I/O operation maximum block size, in bytes. Default value is
5506 "INT_MAX", which results in not limiting the requested block size.
5507 Setting this value reasonably low improves user termination request
5508 reaction time, which is valuable for files on slow medium.
5509
5510 follow
5511 If set to 1, the protocol will retry reading at the end of the
5512 file, allowing reading files that still are being written. In order
5513 for this to terminate, you either need to use the rw_timeout
5514 option, or use the interrupt callback (for API users).
5515
5516 seekable
5517 Controls if seekability is advertised on the file. 0 means non-
5518 seekable, -1 means auto (seekable for normal files, non-seekable
5519 for named pipes).
5520
5521 Many demuxers handle seekable and non-seekable resources
5522 differently, overriding this might speed up opening certain files
5523 at the cost of losing some features (e.g. accurate seeking).
5524
5525 ftp
5526 FTP (File Transfer Protocol).
5527
5528 Read from or write to remote resources using FTP protocol.
5529
5530 Following syntax is required.
5531
5532 ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
5533
5534 This protocol accepts the following options.
5535
5536 timeout
5537 Set timeout in microseconds of socket I/O operations used by the
5538 underlying low level operation. By default it is set to -1, which
5539 means that the timeout is not specified.
5540
5541 ftp-user
5542 Set a user to be used for authenticating to the FTP server. This is
5543 overridden by the user in the FTP URL.
5544
5545 ftp-password
5546 Set a password to be used for authenticating to the FTP server.
5547 This is overridden by the password in the FTP URL, or by ftp-
5548 anonymous-password if no user is set.
5549
5550 ftp-anonymous-password
5551 Password used when login as anonymous user. Typically an e-mail
5552 address should be used.
5553
5554 ftp-write-seekable
5555 Control seekability of connection during encoding. If set to 1 the
5556 resource is supposed to be seekable, if set to 0 it is assumed not
5557 to be seekable. Default value is 0.
5558
5559 NOTE: Protocol can be used as output, but it is recommended to not do
5560 it, unless special care is taken (tests, customized server
5561 configuration etc.). Different FTP servers behave in different way
5562 during seek operation. ff* tools may produce incomplete content due to
5563 server limitations.
5564
5565 gopher
5566 Gopher protocol.
5567
5568 gophers
5569 Gophers protocol.
5570
5571 The Gopher protocol with TLS encapsulation.
5572
5573 hls
5574 Read Apple HTTP Live Streaming compliant segmented stream as a uniform
5575 one. The M3U8 playlists describing the segments can be remote HTTP
5576 resources or local files, accessed using the standard file protocol.
5577 The nested protocol is declared by specifying "+proto" after the hls
5578 URI scheme name, where proto is either "file" or "http".
5579
5580 hls+http://host/path/to/remote/resource.m3u8
5581 hls+file://path/to/local/resource.m3u8
5582
5583 Using this protocol is discouraged - the hls demuxer should work just
5584 as well (if not, please report the issues) and is more complete. To
5585 use the hls demuxer instead, simply use the direct URLs to the m3u8
5586 files.
5587
5588 http
5589 HTTP (Hyper Text Transfer Protocol).
5590
5591 This protocol accepts the following options:
5592
5593 seekable
5594 Control seekability of connection. If set to 1 the resource is
5595 supposed to be seekable, if set to 0 it is assumed not to be
5596 seekable, if set to -1 it will try to autodetect if it is seekable.
5597 Default value is -1.
5598
5599 chunked_post
5600 If set to 1 use chunked Transfer-Encoding for posts, default is 1.
5601
5602 content_type
5603 Set a specific content type for the POST messages or for listen
5604 mode.
5605
5606 http_proxy
5607 set HTTP proxy to tunnel through e.g. http://example.com:1234
5608
5609 headers
5610 Set custom HTTP headers, can override built in default headers. The
5611 value must be a string encoding the headers.
5612
5613 multiple_requests
5614 Use persistent connections if set to 1, default is 0.
5615
5616 post_data
5617 Set custom HTTP post data.
5618
5619 referer
5620 Set the Referer header. Include 'Referer: URL' header in HTTP
5621 request.
5622
5623 user_agent
5624 Override the User-Agent header. If not specified the protocol will
5625 use a string describing the libavformat build. ("Lavf/<version>")
5626
5627 reconnect_at_eof
5628 If set then eof is treated like an error and causes reconnection,
5629 this is useful for live / endless streams.
5630
5631 reconnect_streamed
5632 If set then even streamed/non seekable streams will be reconnected
5633 on errors.
5634
5635 reconnect_on_network_error
5636 Reconnect automatically in case of TCP/TLS errors during connect.
5637
5638 reconnect_on_http_error
5639 A comma separated list of HTTP status codes to reconnect on. The
5640 list can include specific status codes (e.g. '503') or the strings
5641 '4xx' / '5xx'.
5642
5643 reconnect_delay_max
5644 Sets the maximum delay in seconds after which to give up
5645 reconnecting
5646
5647 mime_type
5648 Export the MIME type.
5649
5650 http_version
5651 Exports the HTTP response version number. Usually "1.0" or "1.1".
5652
5653 icy If set to 1 request ICY (SHOUTcast) metadata from the server. If
5654 the server supports this, the metadata has to be retrieved by the
5655 application by reading the icy_metadata_headers and
5656 icy_metadata_packet options. The default is 1.
5657
5658 icy_metadata_headers
5659 If the server supports ICY metadata, this contains the ICY-specific
5660 HTTP reply headers, separated by newline characters.
5661
5662 icy_metadata_packet
5663 If the server supports ICY metadata, and icy was set to 1, this
5664 contains the last non-empty metadata packet sent by the server. It
5665 should be polled in regular intervals by applications interested in
5666 mid-stream metadata updates.
5667
5668 cookies
5669 Set the cookies to be sent in future requests. The format of each
5670 cookie is the same as the value of a Set-Cookie HTTP response
5671 field. Multiple cookies can be delimited by a newline character.
5672
5673 offset
5674 Set initial byte offset.
5675
5676 end_offset
5677 Try to limit the request to bytes preceding this offset.
5678
5679 method
5680 When used as a client option it sets the HTTP method for the
5681 request.
5682
5683 When used as a server option it sets the HTTP method that is going
5684 to be expected from the client(s). If the expected and the
5685 received HTTP method do not match the client will be given a Bad
5686 Request response. When unset the HTTP method is not checked for
5687 now. This will be replaced by autodetection in the future.
5688
5689 listen
5690 If set to 1 enables experimental HTTP server. This can be used to
5691 send data when used as an output option, or read data from a client
5692 with HTTP POST when used as an input option. If set to 2 enables
5693 experimental multi-client HTTP server. This is not yet implemented
5694 in ffmpeg.c and thus must not be used as a command line option.
5695
5696 # Server side (sending):
5697 ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<server>:<port>
5698
5699 # Client side (receiving):
5700 ffmpeg -i http://<server>:<port> -c copy somefile.ogg
5701
5702 # Client can also be done with wget:
5703 wget http://<server>:<port> -O somefile.ogg
5704
5705 # Server side (receiving):
5706 ffmpeg -listen 1 -i http://<server>:<port> -c copy somefile.ogg
5707
5708 # Client side (sending):
5709 ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<server>:<port>
5710
5711 # Client can also be done with wget:
5712 wget --post-file=somefile.ogg http://<server>:<port>
5713
5714 send_expect_100
5715 Send an Expect: 100-continue header for POST. If set to 1 it will
5716 send, if set to 0 it won't, if set to -1 it will try to send if it
5717 is applicable. Default value is -1.
5718
5719 auth_type
5720 Set HTTP authentication type. No option for Digest, since this
5721 method requires getting nonce parameters from the server first and
5722 can't be used straight away like Basic.
5723
5724 none
5725 Choose the HTTP authentication type automatically. This is the
5726 default.
5727
5728 basic
5729 Choose the HTTP basic authentication.
5730
5731 Basic authentication sends a Base64-encoded string that
5732 contains a user name and password for the client. Base64 is not
5733 a form of encryption and should be considered the same as
5734 sending the user name and password in clear text (Base64 is a
5735 reversible encoding). If a resource needs to be protected,
5736 strongly consider using an authentication scheme other than
5737 basic authentication. HTTPS/TLS should be used with basic
5738 authentication. Without these additional security
5739 enhancements, basic authentication should not be used to
5740 protect sensitive or valuable information.
5741
5742 HTTP Cookies
5743
5744 Some HTTP requests will be denied unless cookie values are passed in
5745 with the request. The cookies option allows these cookies to be
5746 specified. At the very least, each cookie must specify a value along
5747 with a path and domain. HTTP requests that match both the domain and
5748 path will automatically include the cookie value in the HTTP Cookie
5749 header field. Multiple cookies can be delimited by a newline.
5750
5751 The required syntax to play a stream specifying a cookie is:
5752
5753 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
5754
5755 Icecast
5756 Icecast protocol (stream to Icecast servers)
5757
5758 This protocol accepts the following options:
5759
5760 ice_genre
5761 Set the stream genre.
5762
5763 ice_name
5764 Set the stream name.
5765
5766 ice_description
5767 Set the stream description.
5768
5769 ice_url
5770 Set the stream website URL.
5771
5772 ice_public
5773 Set if the stream should be public. The default is 0 (not public).
5774
5775 user_agent
5776 Override the User-Agent header. If not specified a string of the
5777 form "Lavf/<version>" will be used.
5778
5779 password
5780 Set the Icecast mountpoint password.
5781
5782 content_type
5783 Set the stream content type. This must be set if it is different
5784 from audio/mpeg.
5785
5786 legacy_icecast
5787 This enables support for Icecast versions < 2.4.0, that do not
5788 support the HTTP PUT method but the SOURCE method.
5789
5790 tls Establish a TLS (HTTPS) connection to Icecast.
5791
5792 icecast://[<username>[:<password>]@]<server>:<port>/<mountpoint>
5793
5794 mmst
5795 MMS (Microsoft Media Server) protocol over TCP.
5796
5797 mmsh
5798 MMS (Microsoft Media Server) protocol over HTTP.
5799
5800 The required syntax is:
5801
5802 mmsh://<server>[:<port>][/<app>][/<playpath>]
5803
5804 md5
5805 MD5 output protocol.
5806
5807 Computes the MD5 hash of the data to be written, and on close writes
5808 this to the designated output or stdout if none is specified. It can be
5809 used to test muxers without writing an actual file.
5810
5811 Some examples follow.
5812
5813 # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
5814 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
5815
5816 # Write the MD5 hash of the encoded AVI file to stdout.
5817 ffmpeg -i input.flv -f avi -y md5:
5818
5819 Note that some formats (typically MOV) require the output protocol to
5820 be seekable, so they will fail with the MD5 output protocol.
5821
5822 pipe
5823 UNIX pipe access protocol.
5824
5825 Read and write from UNIX pipes.
5826
5827 The accepted syntax is:
5828
5829 pipe:[<number>]
5830
5831 number is the number corresponding to the file descriptor of the pipe
5832 (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If number is not
5833 specified, by default the stdout file descriptor will be used for
5834 writing, stdin for reading.
5835
5836 For example to read from stdin with ffmpeg:
5837
5838 cat test.wav | ffmpeg -i pipe:0
5839 # ...this is the same as...
5840 cat test.wav | ffmpeg -i pipe:
5841
5842 For writing to stdout with ffmpeg:
5843
5844 ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
5845 # ...this is the same as...
5846 ffmpeg -i test.wav -f avi pipe: | cat > test.avi
5847
5848 This protocol accepts the following options:
5849
5850 blocksize
5851 Set I/O operation maximum block size, in bytes. Default value is
5852 "INT_MAX", which results in not limiting the requested block size.
5853 Setting this value reasonably low improves user termination request
5854 reaction time, which is valuable if data transmission is slow.
5855
5856 Note that some formats (typically MOV), require the output protocol to
5857 be seekable, so they will fail with the pipe output protocol.
5858
5859 prompeg
5860 Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
5861
5862 The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction
5863 mechanism for MPEG-2 Transport Streams sent over RTP.
5864
5865 This protocol must be used in conjunction with the "rtp_mpegts" muxer
5866 and the "rtp" protocol.
5867
5868 The required syntax is:
5869
5870 -f rtp_mpegts -fec prompeg=<option>=<val>... rtp://<hostname>:<port>
5871
5872 The destination UDP ports are "port + 2" for the column FEC stream and
5873 "port + 4" for the row FEC stream.
5874
5875 This protocol accepts the following options:
5876
5877 l=n The number of columns (4-20, LxD <= 100)
5878
5879 d=n The number of rows (4-20, LxD <= 100)
5880
5881 Example usage:
5882
5883 -f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<hostname>:<port>
5884
5885 rist
5886 Reliable Internet Streaming Transport protocol
5887
5888 The accepted options are:
5889
5890 rist_profile
5891 Supported values:
5892
5893 simple
5894 main
5895 This one is default.
5896
5897 advanced
5898 buffer_size
5899 Set internal RIST buffer size in milliseconds for retransmission of
5900 data. Default value is 0 which means the librist default (1 sec).
5901 Maximum value is 30 seconds.
5902
5903 pkt_size
5904 Set maximum packet size for sending data. 1316 by default.
5905
5906 log_level
5907 Set loglevel for RIST logging messages. You only need to set this
5908 if you explicitly want to enable debug level messages or packet
5909 loss simulation, otherwise the regular loglevel is respected.
5910
5911 secret
5912 Set override of encryption secret, by default is unset.
5913
5914 encryption
5915 Set encryption type, by default is disabled. Acceptable values are
5916 128 and 256.
5917
5918 rtmp
5919 Real-Time Messaging Protocol.
5920
5921 The Real-Time Messaging Protocol (RTMP) is used for streaming
5922 multimedia content across a TCP/IP network.
5923
5924 The required syntax is:
5925
5926 rtmp://[<username>:<password>@]<server>[:<port>][/<app>][/<instance>][/<playpath>]
5927
5928 The accepted parameters are:
5929
5930 username
5931 An optional username (mostly for publishing).
5932
5933 password
5934 An optional password (mostly for publishing).
5935
5936 server
5937 The address of the RTMP server.
5938
5939 port
5940 The number of the TCP port to use (by default is 1935).
5941
5942 app It is the name of the application to access. It usually corresponds
5943 to the path where the application is installed on the RTMP server
5944 (e.g. /ondemand/, /flash/live/, etc.). You can override the value
5945 parsed from the URI through the "rtmp_app" option, too.
5946
5947 playpath
5948 It is the path or name of the resource to play with reference to
5949 the application specified in app, may be prefixed by "mp4:". You
5950 can override the value parsed from the URI through the
5951 "rtmp_playpath" option, too.
5952
5953 listen
5954 Act as a server, listening for an incoming connection.
5955
5956 timeout
5957 Maximum time to wait for the incoming connection. Implies listen.
5958
5959 Additionally, the following parameters can be set via command line
5960 options (or in code via "AVOption"s):
5961
5962 rtmp_app
5963 Name of application to connect on the RTMP server. This option
5964 overrides the parameter specified in the URI.
5965
5966 rtmp_buffer
5967 Set the client buffer time in milliseconds. The default is 3000.
5968
5969 rtmp_conn
5970 Extra arbitrary AMF connection parameters, parsed from a string,
5971 e.g. like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0". Each
5972 value is prefixed by a single character denoting the type, B for
5973 Boolean, N for number, S for string, O for object, or Z for null,
5974 followed by a colon. For Booleans the data must be either 0 or 1
5975 for FALSE or TRUE, respectively. Likewise for Objects the data
5976 must be 0 or 1 to end or begin an object, respectively. Data items
5977 in subobjects may be named, by prefixing the type with 'N' and
5978 specifying the name before the value (i.e. "NB:myFlag:1"). This
5979 option may be used multiple times to construct arbitrary AMF
5980 sequences.
5981
5982 rtmp_flashver
5983 Version of the Flash plugin used to run the SWF player. The default
5984 is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0
5985 (compatible; <libavformat version>).)
5986
5987 rtmp_flush_interval
5988 Number of packets flushed in the same request (RTMPT only). The
5989 default is 10.
5990
5991 rtmp_live
5992 Specify that the media is a live stream. No resuming or seeking in
5993 live streams is possible. The default value is "any", which means
5994 the subscriber first tries to play the live stream specified in the
5995 playpath. If a live stream of that name is not found, it plays the
5996 recorded stream. The other possible values are "live" and
5997 "recorded".
5998
5999 rtmp_pageurl
6000 URL of the web page in which the media was embedded. By default no
6001 value will be sent.
6002
6003 rtmp_playpath
6004 Stream identifier to play or to publish. This option overrides the
6005 parameter specified in the URI.
6006
6007 rtmp_subscribe
6008 Name of live stream to subscribe to. By default no value will be
6009 sent. It is only sent if the option is specified or if rtmp_live
6010 is set to live.
6011
6012 rtmp_swfhash
6013 SHA256 hash of the decompressed SWF file (32 bytes).
6014
6015 rtmp_swfsize
6016 Size of the decompressed SWF file, required for SWFVerification.
6017
6018 rtmp_swfurl
6019 URL of the SWF player for the media. By default no value will be
6020 sent.
6021
6022 rtmp_swfverify
6023 URL to player swf file, compute hash/size automatically.
6024
6025 rtmp_tcurl
6026 URL of the target stream. Defaults to proto://host[:port]/app.
6027
6028 tcp_nodelay=1|0
6029 Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
6030
6031 Remark: Writing to the socket is currently not optimized to
6032 minimize system calls and reduces the efficiency / effect of
6033 TCP_NODELAY.
6034
6035 For example to read with ffplay a multimedia resource named "sample"
6036 from the application "vod" from an RTMP server "myserver":
6037
6038 ffplay rtmp://myserver/vod/sample
6039
6040 To publish to a password protected server, passing the playpath and app
6041 names separately:
6042
6043 ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
6044
6045 rtmpe
6046 Encrypted Real-Time Messaging Protocol.
6047
6048 The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
6049 streaming multimedia content within standard cryptographic primitives,
6050 consisting of Diffie-Hellman key exchange and HMACSHA256, generating a
6051 pair of RC4 keys.
6052
6053 rtmps
6054 Real-Time Messaging Protocol over a secure SSL connection.
6055
6056 The Real-Time Messaging Protocol (RTMPS) is used for streaming
6057 multimedia content across an encrypted connection.
6058
6059 rtmpt
6060 Real-Time Messaging Protocol tunneled through HTTP.
6061
6062 The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
6063 for streaming multimedia content within HTTP requests to traverse
6064 firewalls.
6065
6066 rtmpte
6067 Encrypted Real-Time Messaging Protocol tunneled through HTTP.
6068
6069 The Encrypted Real-Time Messaging Protocol tunneled through HTTP
6070 (RTMPTE) is used for streaming multimedia content within HTTP requests
6071 to traverse firewalls.
6072
6073 rtmpts
6074 Real-Time Messaging Protocol tunneled through HTTPS.
6075
6076 The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is
6077 used for streaming multimedia content within HTTPS requests to traverse
6078 firewalls.
6079
6080 libsmbclient
6081 libsmbclient permits one to manipulate CIFS/SMB network resources.
6082
6083 Following syntax is required.
6084
6085 smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
6086
6087 This protocol accepts the following options.
6088
6089 timeout
6090 Set timeout in milliseconds of socket I/O operations used by the
6091 underlying low level operation. By default it is set to -1, which
6092 means that the timeout is not specified.
6093
6094 truncate
6095 Truncate existing files on write, if set to 1. A value of 0
6096 prevents truncating. Default value is 1.
6097
6098 workgroup
6099 Set the workgroup used for making connections. By default workgroup
6100 is not specified.
6101
6102 For more information see: <http://www.samba.org/>.
6103
6104 libssh
6105 Secure File Transfer Protocol via libssh
6106
6107 Read from or write to remote resources using SFTP protocol.
6108
6109 Following syntax is required.
6110
6111 sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
6112
6113 This protocol accepts the following options.
6114
6115 timeout
6116 Set timeout of socket I/O operations used by the underlying low
6117 level operation. By default it is set to -1, which means that the
6118 timeout is not specified.
6119
6120 truncate
6121 Truncate existing files on write, if set to 1. A value of 0
6122 prevents truncating. Default value is 1.
6123
6124 private_key
6125 Specify the path of the file containing private key to use during
6126 authorization. By default libssh searches for keys in the ~/.ssh/
6127 directory.
6128
6129 Example: Play a file stored on remote server.
6130
6131 ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
6132
6133 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
6134 Real-Time Messaging Protocol and its variants supported through
6135 librtmp.
6136
6137 Requires the presence of the librtmp headers and library during
6138 configuration. You need to explicitly configure the build with
6139 "--enable-librtmp". If enabled this will replace the native RTMP
6140 protocol.
6141
6142 This protocol provides most client functions and a few server functions
6143 needed to support RTMP, RTMP tunneled in HTTP (RTMPT), encrypted RTMP
6144 (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled variants of these
6145 encrypted types (RTMPTE, RTMPTS).
6146
6147 The required syntax is:
6148
6149 <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
6150
6151 where rtmp_proto is one of the strings "rtmp", "rtmpt", "rtmpe",
6152 "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
6153 server, port, app and playpath have the same meaning as specified for
6154 the RTMP native protocol. options contains a list of space-separated
6155 options of the form key=val.
6156
6157 See the librtmp manual page (man 3 librtmp) for more information.
6158
6159 For example, to stream a file in real-time to an RTMP server using
6160 ffmpeg:
6161
6162 ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
6163
6164 To play the same stream using ffplay:
6165
6166 ffplay "rtmp://myserver/live/mystream live=1"
6167
6168 rtp
6169 Real-time Transport Protocol.
6170
6171 The required syntax for an RTP URL is:
6172 rtp://hostname[:port][?option=val...]
6173
6174 port specifies the RTP port to use.
6175
6176 The following URL options are supported:
6177
6178 ttl=n
6179 Set the TTL (Time-To-Live) value (for multicast only).
6180
6181 rtcpport=n
6182 Set the remote RTCP port to n.
6183
6184 localrtpport=n
6185 Set the local RTP port to n.
6186
6187 localrtcpport=n'
6188 Set the local RTCP port to n.
6189
6190 pkt_size=n
6191 Set max packet size (in bytes) to n.
6192
6193 buffer_size=size
6194 Set the maximum UDP socket buffer size in bytes.
6195
6196 connect=0|1
6197 Do a "connect()" on the UDP socket (if set to 1) or not (if set to
6198 0).
6199
6200 sources=ip[,ip]
6201 List allowed source IP addresses.
6202
6203 block=ip[,ip]
6204 List disallowed (blocked) source IP addresses.
6205
6206 write_to_source=0|1
6207 Send packets to the source address of the latest received packet
6208 (if set to 1) or to a default remote address (if set to 0).
6209
6210 localport=n
6211 Set the local RTP port to n.
6212
6213 localaddr=addr
6214 Local IP address of a network interface used for sending packets or
6215 joining multicast groups.
6216
6217 timeout=n
6218 Set timeout (in microseconds) of socket I/O operations to n.
6219
6220 This is a deprecated option. Instead, localrtpport should be used.
6221
6222 Important notes:
6223
6224 1. If rtcpport is not set the RTCP port will be set to the RTP port
6225 value plus 1.
6226
6227 2. If localrtpport (the local RTP port) is not set any available port
6228 will be used for the local RTP and RTCP ports.
6229
6230 3. If localrtcpport (the local RTCP port) is not set it will be set to
6231 the local RTP port value plus 1.
6232
6233 rtsp
6234 Real-Time Streaming Protocol.
6235
6236 RTSP is not technically a protocol handler in libavformat, it is a
6237 demuxer and muxer. The demuxer supports both normal RTSP (with data
6238 transferred over RTP; this is used by e.g. Apple and Microsoft) and
6239 Real-RTSP (with data transferred over RDT).
6240
6241 The muxer can be used to send a stream using RTSP ANNOUNCE to a server
6242 supporting it (currently Darwin Streaming Server and Mischa
6243 Spiegelmock's <https://github.com/revmischa/rtsp-server>).
6244
6245 The required syntax for a RTSP url is:
6246
6247 rtsp://<hostname>[:<port>]/<path>
6248
6249 Options can be set on the ffmpeg/ffplay command line, or set in code
6250 via "AVOption"s or in "avformat_open_input".
6251
6252 The following options are supported.
6253
6254 initial_pause
6255 Do not start playing the stream immediately if set to 1. Default
6256 value is 0.
6257
6258 rtsp_transport
6259 Set RTSP transport protocols.
6260
6261 It accepts the following values:
6262
6263 udp Use UDP as lower transport protocol.
6264
6265 tcp Use TCP (interleaving within the RTSP control channel) as lower
6266 transport protocol.
6267
6268 udp_multicast
6269 Use UDP multicast as lower transport protocol.
6270
6271 http
6272 Use HTTP tunneling as lower transport protocol, which is useful
6273 for passing proxies.
6274
6275 Multiple lower transport protocols may be specified, in that case
6276 they are tried one at a time (if the setup of one fails, the next
6277 one is tried). For the muxer, only the tcp and udp options are
6278 supported.
6279
6280 rtsp_flags
6281 Set RTSP flags.
6282
6283 The following values are accepted:
6284
6285 filter_src
6286 Accept packets only from negotiated peer address and port.
6287
6288 listen
6289 Act as a server, listening for an incoming connection.
6290
6291 prefer_tcp
6292 Try TCP for RTP transport first, if TCP is available as RTSP
6293 RTP transport.
6294
6295 Default value is none.
6296
6297 allowed_media_types
6298 Set media types to accept from the server.
6299
6300 The following flags are accepted:
6301
6302 video
6303 audio
6304 data
6305
6306 By default it accepts all media types.
6307
6308 min_port
6309 Set minimum local UDP port. Default value is 5000.
6310
6311 max_port
6312 Set maximum local UDP port. Default value is 65000.
6313
6314 listen_timeout
6315 Set maximum timeout (in seconds) to establish an initial
6316 connection. Setting listen_timeout > 0 sets rtsp_flags to listen.
6317 Default is -1 which means an infinite timeout when listen mode is
6318 set.
6319
6320 reorder_queue_size
6321 Set number of packets to buffer for handling of reordered packets.
6322
6323 timeout
6324 Set socket TCP I/O timeout in microseconds.
6325
6326 user_agent
6327 Override User-Agent header. If not specified, it defaults to the
6328 libavformat identifier string.
6329
6330 When receiving data over UDP, the demuxer tries to reorder received
6331 packets (since they may arrive out of order, or packets may get lost
6332 totally). This can be disabled by setting the maximum demuxing delay to
6333 zero (via the "max_delay" field of AVFormatContext).
6334
6335 When watching multi-bitrate Real-RTSP streams with ffplay, the streams
6336 to display can be chosen with "-vst" n and "-ast" n for video and audio
6337 respectively, and can be switched on the fly by pressing "v" and "a".
6338
6339 Examples
6340
6341 The following examples all make use of the ffplay and ffmpeg tools.
6342
6343 • Watch a stream over UDP, with a max reordering delay of 0.5
6344 seconds:
6345
6346 ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
6347
6348 • Watch a stream tunneled over HTTP:
6349
6350 ffplay -rtsp_transport http rtsp://server/video.mp4
6351
6352 • Send a stream in realtime to a RTSP server, for others to watch:
6353
6354 ffmpeg -re -i <input> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
6355
6356 • Receive a stream in realtime:
6357
6358 ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <output>
6359
6360 sap
6361 Session Announcement Protocol (RFC 2974). This is not technically a
6362 protocol handler in libavformat, it is a muxer and demuxer. It is used
6363 for signalling of RTP streams, by announcing the SDP for the streams
6364 regularly on a separate port.
6365
6366 Muxer
6367
6368 The syntax for a SAP url given to the muxer is:
6369
6370 sap://<destination>[:<port>][?<options>]
6371
6372 The RTP packets are sent to destination on port port, or to port 5004
6373 if no port is specified. options is a "&"-separated list. The
6374 following options are supported:
6375
6376 announce_addr=address
6377 Specify the destination IP address for sending the announcements
6378 to. If omitted, the announcements are sent to the commonly used
6379 SAP announcement multicast address 224.2.127.254 (sap.mcast.net),
6380 or ff0e::2:7ffe if destination is an IPv6 address.
6381
6382 announce_port=port
6383 Specify the port to send the announcements on, defaults to 9875 if
6384 not specified.
6385
6386 ttl=ttl
6387 Specify the time to live value for the announcements and RTP
6388 packets, defaults to 255.
6389
6390 same_port=0|1
6391 If set to 1, send all RTP streams on the same port pair. If zero
6392 (the default), all streams are sent on unique ports, with each
6393 stream on a port 2 numbers higher than the previous. VLC/Live555
6394 requires this to be set to 1, to be able to receive the stream.
6395 The RTP stack in libavformat for receiving requires all streams to
6396 be sent on unique ports.
6397
6398 Example command lines follow.
6399
6400 To broadcast a stream on the local subnet, for watching in VLC:
6401
6402 ffmpeg -re -i <input> -f sap sap://224.0.0.255?same_port=1
6403
6404 Similarly, for watching in ffplay:
6405
6406 ffmpeg -re -i <input> -f sap sap://224.0.0.255
6407
6408 And for watching in ffplay, over IPv6:
6409
6410 ffmpeg -re -i <input> -f sap sap://[ff0e::1:2:3:4]
6411
6412 Demuxer
6413
6414 The syntax for a SAP url given to the demuxer is:
6415
6416 sap://[<address>][:<port>]
6417
6418 address is the multicast address to listen for announcements on, if
6419 omitted, the default 224.2.127.254 (sap.mcast.net) is used. port is the
6420 port that is listened on, 9875 if omitted.
6421
6422 The demuxers listens for announcements on the given address and port.
6423 Once an announcement is received, it tries to receive that particular
6424 stream.
6425
6426 Example command lines follow.
6427
6428 To play back the first stream announced on the normal SAP multicast
6429 address:
6430
6431 ffplay sap://
6432
6433 To play back the first stream announced on one the default IPv6 SAP
6434 multicast address:
6435
6436 ffplay sap://[ff0e::2:7ffe]
6437
6438 sctp
6439 Stream Control Transmission Protocol.
6440
6441 The accepted URL syntax is:
6442
6443 sctp://<host>:<port>[?<options>]
6444
6445 The protocol accepts the following options:
6446
6447 listen
6448 If set to any value, listen for an incoming connection. Outgoing
6449 connection is done by default.
6450
6451 max_streams
6452 Set the maximum number of streams. By default no limit is set.
6453
6454 srt
6455 Haivision Secure Reliable Transport Protocol via libsrt.
6456
6457 The supported syntax for a SRT URL is:
6458
6459 srt://<hostname>:<port>[?<options>]
6460
6461 options contains a list of &-separated options of the form key=val.
6462
6463 or
6464
6465 <options> srt://<hostname>:<port>
6466
6467 options contains a list of '-key val' options.
6468
6469 This protocol accepts the following options.
6470
6471 connect_timeout=milliseconds
6472 Connection timeout; SRT cannot connect for RTT > 1500 msec (2
6473 handshake exchanges) with the default connect timeout of 3 seconds.
6474 This option applies to the caller and rendezvous connection modes.
6475 The connect timeout is 10 times the value set for the rendezvous
6476 mode (which can be used as a workaround for this connection problem
6477 with earlier versions).
6478
6479 ffs=bytes
6480 Flight Flag Size (Window Size), in bytes. FFS is actually an
6481 internal parameter and you should set it to not less than
6482 recv_buffer_size and mss. The default value is relatively large,
6483 therefore unless you set a very large receiver buffer, you do not
6484 need to change this option. Default value is 25600.
6485
6486 inputbw=bytes/seconds
6487 Sender nominal input rate, in bytes per seconds. Used along with
6488 oheadbw, when maxbw is set to relative (0), to calculate maximum
6489 sending rate when recovery packets are sent along with the main
6490 media stream: inputbw * (100 + oheadbw) / 100 if inputbw is not set
6491 while maxbw is set to relative (0), the actual input rate is
6492 evaluated inside the library. Default value is 0.
6493
6494 iptos=tos
6495 IP Type of Service. Applies to sender only. Default value is 0xB8.
6496
6497 ipttl=ttl
6498 IP Time To Live. Applies to sender only. Default value is 64.
6499
6500 latency=microseconds
6501 Timestamp-based Packet Delivery Delay. Used to absorb bursts of
6502 missed packet retransmissions. This flag sets both rcvlatency and
6503 peerlatency to the same value. Note that prior to version 1.3.0
6504 this is the only flag to set the latency, however this is
6505 effectively equivalent to setting peerlatency, when side is sender
6506 and rcvlatency when side is receiver, and the bidirectional stream
6507 sending is not supported.
6508
6509 listen_timeout=microseconds
6510 Set socket listen timeout.
6511
6512 maxbw=bytes/seconds
6513 Maximum sending bandwidth, in bytes per seconds. -1 infinite
6514 (CSRTCC limit is 30mbps) 0 relative to input rate (see inputbw) >0
6515 absolute limit value Default value is 0 (relative)
6516
6517 mode=caller|listener|rendezvous
6518 Connection mode. caller opens client connection. listener starts
6519 server to listen for incoming connections. rendezvous use Rendez-
6520 Vous connection mode. Default value is caller.
6521
6522 mss=bytes
6523 Maximum Segment Size, in bytes. Used for buffer allocation and rate
6524 calculation using a packet counter assuming fully filled packets.
6525 The smallest MSS between the peers is used. This is 1500 by default
6526 in the overall internet. This is the maximum size of the UDP
6527 packet and can be only decreased, unless you have some unusual
6528 dedicated network settings. Default value is 1500.
6529
6530 nakreport=1|0
6531 If set to 1, Receiver will send `UMSG_LOSSREPORT` messages
6532 periodically until a lost packet is retransmitted or intentionally
6533 dropped. Default value is 1.
6534
6535 oheadbw=percents
6536 Recovery bandwidth overhead above input rate, in percents. See
6537 inputbw. Default value is 25%.
6538
6539 passphrase=string
6540 HaiCrypt Encryption/Decryption Passphrase string, length from 10 to
6541 79 characters. The passphrase is the shared secret between the
6542 sender and the receiver. It is used to generate the Key Encrypting
6543 Key using PBKDF2 (Password-Based Key Derivation Function). It is
6544 used only if pbkeylen is non-zero. It is used on the receiver only
6545 if the received data is encrypted. The configured passphrase
6546 cannot be recovered (write-only).
6547
6548 enforced_encryption=1|0
6549 If true, both connection parties must have the same password set
6550 (including empty, that is, with no encryption). If the password
6551 doesn't match or only one side is unencrypted, the connection is
6552 rejected. Default is true.
6553
6554 kmrefreshrate=packets
6555 The number of packets to be transmitted after which the encryption
6556 key is switched to a new key. Default is -1. -1 means auto
6557 (0x1000000 in srt library). The range for this option is integers
6558 in the 0 - "INT_MAX".
6559
6560 kmpreannounce=packets
6561 The interval between when a new encryption key is sent and when
6562 switchover occurs. This value also applies to the subsequent
6563 interval between when switchover occurs and when the old encryption
6564 key is decommissioned. Default is -1. -1 means auto (0x1000 in srt
6565 library). The range for this option is integers in the 0 -
6566 "INT_MAX".
6567
6568 snddropdelay=microseconds
6569 The sender's extra delay before dropping packets. This delay is
6570 added to the default drop delay time interval value.
6571
6572 Special value -1: Do not drop packets on the sender at all.
6573
6574 payload_size=bytes
6575 Sets the maximum declared size of a packet transferred during the
6576 single call to the sending function in Live mode. Use 0 if this
6577 value isn't used (which is default in file mode). Default is -1
6578 (automatic), which typically means MPEG-TS; if you are going to use
6579 SRT to send any different kind of payload, such as, for example,
6580 wrapping a live stream in very small frames, then you can use a
6581 bigger maximum frame size, though not greater than 1456 bytes.
6582
6583 pkt_size=bytes
6584 Alias for payload_size.
6585
6586 peerlatency=microseconds
6587 The latency value (as described in rcvlatency) that is set by the
6588 sender side as a minimum value for the receiver.
6589
6590 pbkeylen=bytes
6591 Sender encryption key length, in bytes. Only can be set to 0, 16,
6592 24 and 32. Enable sender encryption if not 0. Not required on
6593 receiver (set to 0), key size obtained from sender in HaiCrypt
6594 handshake. Default value is 0.
6595
6596 rcvlatency=microseconds
6597 The time that should elapse since the moment when the packet was
6598 sent and the moment when it's delivered to the receiver application
6599 in the receiving function. This time should be a buffer time large
6600 enough to cover the time spent for sending, unexpectedly extended
6601 RTT time, and the time needed to retransmit the lost UDP packet.
6602 The effective latency value will be the maximum of this options'
6603 value and the value of peerlatency set by the peer side. Before
6604 version 1.3.0 this option is only available as latency.
6605
6606 recv_buffer_size=bytes
6607 Set UDP receive buffer size, expressed in bytes.
6608
6609 send_buffer_size=bytes
6610 Set UDP send buffer size, expressed in bytes.
6611
6612 timeout=microseconds
6613 Set raise error timeouts for read, write and connect operations.
6614 Note that the SRT library has internal timeouts which can be
6615 controlled separately, the value set here is only a cap on those.
6616
6617 tlpktdrop=1|0
6618 Too-late Packet Drop. When enabled on receiver, it skips missing
6619 packets that have not been delivered in time and delivers the
6620 following packets to the application when their time-to-play has
6621 come. It also sends a fake ACK to the sender. When enabled on
6622 sender and enabled on the receiving peer, the sender drops the
6623 older packets that have no chance of being delivered in time. It
6624 was automatically enabled in the sender if the receiver supports
6625 it.
6626
6627 sndbuf=bytes
6628 Set send buffer size, expressed in bytes.
6629
6630 rcvbuf=bytes
6631 Set receive buffer size, expressed in bytes.
6632
6633 Receive buffer must not be greater than ffs.
6634
6635 lossmaxttl=packets
6636 The value up to which the Reorder Tolerance may grow. When Reorder
6637 Tolerance is > 0, then packet loss report is delayed until that
6638 number of packets come in. Reorder Tolerance increases every time a
6639 "belated" packet has come, but it wasn't due to retransmission
6640 (that is, when UDP packets tend to come out of order), with the
6641 difference between the latest sequence and this packet's sequence,
6642 and not more than the value of this option. By default it's 0,
6643 which means that this mechanism is turned off, and the loss report
6644 is always sent immediately upon experiencing a "gap" in sequences.
6645
6646 minversion
6647 The minimum SRT version that is required from the peer. A
6648 connection to a peer that does not satisfy the minimum version
6649 requirement will be rejected.
6650
6651 The version format in hex is 0xXXYYZZ for x.y.z in human readable
6652 form.
6653
6654 streamid=string
6655 A string limited to 512 characters that can be set on the socket
6656 prior to connecting. This stream ID will be able to be retrieved by
6657 the listener side from the socket that is returned from srt_accept
6658 and was connected by a socket with that set stream ID. SRT does not
6659 enforce any special interpretation of the contents of this string.
6660 This option doesnXt make sense in Rendezvous connection; the result
6661 might be that simply one side will override the value from the
6662 other side and itXs the matter of luck which one would win
6663
6664 srt_streamid=string
6665 Alias for streamid to avoid conflict with ffmpeg command line
6666 option.
6667
6668 smoother=live|file
6669 The type of Smoother used for the transmission for that socket,
6670 which is responsible for the transmission and congestion control.
6671 The Smoother type must be exactly the same on both connecting
6672 parties, otherwise the connection is rejected.
6673
6674 messageapi=1|0
6675 When set, this socket uses the Message API, otherwise it uses
6676 Buffer API. Note that in live mode (see transtype) thereXs only
6677 message API available. In File mode you can chose to use one of two
6678 modes:
6679
6680 Stream API (default, when this option is false). In this mode you
6681 may send as many data as you wish with one sending instruction, or
6682 even use dedicated functions that read directly from a file. The
6683 internal facility will take care of any speed and congestion
6684 control. When receiving, you can also receive as many data as
6685 desired, the data not extracted will be waiting for the next call.
6686 There is no boundary between data portions in the Stream mode.
6687
6688 Message API. In this mode your single sending instruction passes
6689 exactly one piece of data that has boundaries (a message). Contrary
6690 to Live mode, this message may span across multiple UDP packets and
6691 the only size limitation is that it shall fit as a whole in the
6692 sending buffer. The receiver shall use as large buffer as necessary
6693 to receive the message, otherwise the message will not be given up.
6694 When the message is not complete (not all packets received or there
6695 was a packet loss) it will not be given up.
6696
6697 transtype=live|file
6698 Sets the transmission type for the socket, in particular, setting
6699 this option sets multiple other parameters to their default values
6700 as required for a particular transmission type.
6701
6702 live: Set options as for live transmission. In this mode, you
6703 should send by one sending instruction only so many data that fit
6704 in one UDP packet, and limited to the value defined first in
6705 payload_size (1316 is default in this mode). There is no speed
6706 control in this mode, only the bandwidth control, if configured, in
6707 order to not exceed the bandwidth with the overhead transmission
6708 (retransmitted and control packets).
6709
6710 file: Set options as for non-live transmission. See messageapi for
6711 further explanations
6712
6713 linger=seconds
6714 The number of seconds that the socket waits for unsent data when
6715 closing. Default is -1. -1 means auto (off with 0 seconds in live
6716 mode, on with 180 seconds in file mode). The range for this option
6717 is integers in the 0 - "INT_MAX".
6718
6719 tsbpd=1|0
6720 When true, use Timestamp-based Packet Delivery mode. The default
6721 behavior depends on the transmission type: enabled in live mode,
6722 disabled in file mode.
6723
6724 For more information see: <https://github.com/Haivision/srt>.
6725
6726 srtp
6727 Secure Real-time Transport Protocol.
6728
6729 The accepted options are:
6730
6731 srtp_in_suite
6732 srtp_out_suite
6733 Select input and output encoding suites.
6734
6735 Supported values:
6736
6737 AES_CM_128_HMAC_SHA1_80
6738 SRTP_AES128_CM_HMAC_SHA1_80
6739 AES_CM_128_HMAC_SHA1_32
6740 SRTP_AES128_CM_HMAC_SHA1_32
6741 srtp_in_params
6742 srtp_out_params
6743 Set input and output encoding parameters, which are expressed by a
6744 base64-encoded representation of a binary block. The first 16 bytes
6745 of this binary block are used as master key, the following 14 bytes
6746 are used as master salt.
6747
6748 subfile
6749 Virtually extract a segment of a file or another stream. The
6750 underlying stream must be seekable.
6751
6752 Accepted options:
6753
6754 start
6755 Start offset of the extracted segment, in bytes.
6756
6757 end End offset of the extracted segment, in bytes. If set to 0,
6758 extract till end of file.
6759
6760 Examples:
6761
6762 Extract a chapter from a DVD VOB file (start and end sectors obtained
6763 externally and multiplied by 2048):
6764
6765 subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
6766
6767 Play an AVI file directly from a TAR archive:
6768
6769 subfile,,start,183241728,end,366490624,,:archive.tar
6770
6771 Play a MPEG-TS file from start offset till end:
6772
6773 subfile,,start,32815239,end,0,,:video.ts
6774
6775 tee
6776 Writes the output to multiple protocols. The individual outputs are
6777 separated by |
6778
6779 tee:file://path/to/local/this.avi|file://path/to/local/that.avi
6780
6781 tcp
6782 Transmission Control Protocol.
6783
6784 The required syntax for a TCP url is:
6785
6786 tcp://<hostname>:<port>[?<options>]
6787
6788 options contains a list of &-separated options of the form key=val.
6789
6790 The list of supported options follows.
6791
6792 listen=2|1|0
6793 Listen for an incoming connection. 0 disables listen, 1 enables
6794 listen in single client mode, 2 enables listen in multi-client
6795 mode. Default value is 0.
6796
6797 timeout=microseconds
6798 Set raise error timeout, expressed in microseconds.
6799
6800 This option is only relevant in read mode: if no data arrived in
6801 more than this time interval, raise error.
6802
6803 listen_timeout=milliseconds
6804 Set listen timeout, expressed in milliseconds.
6805
6806 recv_buffer_size=bytes
6807 Set receive buffer size, expressed bytes.
6808
6809 send_buffer_size=bytes
6810 Set send buffer size, expressed bytes.
6811
6812 tcp_nodelay=1|0
6813 Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
6814
6815 Remark: Writing to the socket is currently not optimized to
6816 minimize system calls and reduces the efficiency / effect of
6817 TCP_NODELAY.
6818
6819 tcp_mss=bytes
6820 Set maximum segment size for outgoing TCP packets, expressed in
6821 bytes.
6822
6823 The following example shows how to setup a listening TCP connection
6824 with ffmpeg, which is then accessed with ffplay:
6825
6826 ffmpeg -i <input> -f <format> tcp://<hostname>:<port>?listen
6827 ffplay tcp://<hostname>:<port>
6828
6829 tls
6830 Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
6831
6832 The required syntax for a TLS/SSL url is:
6833
6834 tls://<hostname>:<port>[?<options>]
6835
6836 The following parameters can be set via command line options (or in
6837 code via "AVOption"s):
6838
6839 ca_file, cafile=filename
6840 A file containing certificate authority (CA) root certificates to
6841 treat as trusted. If the linked TLS library contains a default this
6842 might not need to be specified for verification to work, but not
6843 all libraries and setups have defaults built in. The file must be
6844 in OpenSSL PEM format.
6845
6846 tls_verify=1|0
6847 If enabled, try to verify the peer that we are communicating with.
6848 Note, if using OpenSSL, this currently only makes sure that the
6849 peer certificate is signed by one of the root certificates in the
6850 CA database, but it does not validate that the certificate actually
6851 matches the host name we are trying to connect to. (With other
6852 backends, the host name is validated as well.)
6853
6854 This is disabled by default since it requires a CA database to be
6855 provided by the caller in many cases.
6856
6857 cert_file, cert=filename
6858 A file containing a certificate to use in the handshake with the
6859 peer. (When operating as server, in listen mode, this is more
6860 often required by the peer, while client certificates only are
6861 mandated in certain setups.)
6862
6863 key_file, key=filename
6864 A file containing the private key for the certificate.
6865
6866 listen=1|0
6867 If enabled, listen for connections on the provided port, and assume
6868 the server role in the handshake instead of the client role.
6869
6870 http_proxy
6871 The HTTP proxy to tunnel through, e.g. "http://example.com:1234".
6872 The proxy must support the CONNECT method.
6873
6874 Example command lines:
6875
6876 To create a TLS/SSL server that serves an input stream.
6877
6878 ffmpeg -i <input> -f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
6879
6880 To play back a stream from the TLS/SSL server using ffplay:
6881
6882 ffplay tls://<hostname>:<port>
6883
6884 udp
6885 User Datagram Protocol.
6886
6887 The required syntax for an UDP URL is:
6888
6889 udp://<hostname>:<port>[?<options>]
6890
6891 options contains a list of &-separated options of the form key=val.
6892
6893 In case threading is enabled on the system, a circular buffer is used
6894 to store the incoming data, which allows one to reduce loss of data due
6895 to UDP socket buffer overruns. The fifo_size and overrun_nonfatal
6896 options are related to this buffer.
6897
6898 The list of supported options follows.
6899
6900 buffer_size=size
6901 Set the UDP maximum socket buffer size in bytes. This is used to
6902 set either the receive or send buffer size, depending on what the
6903 socket is used for. Default is 32 KB for output, 384 KB for input.
6904 See also fifo_size.
6905
6906 bitrate=bitrate
6907 If set to nonzero, the output will have the specified constant
6908 bitrate if the input has enough packets to sustain it.
6909
6910 burst_bits=bits
6911 When using bitrate this specifies the maximum number of bits in
6912 packet bursts.
6913
6914 localport=port
6915 Override the local UDP port to bind with.
6916
6917 localaddr=addr
6918 Local IP address of a network interface used for sending packets or
6919 joining multicast groups.
6920
6921 pkt_size=size
6922 Set the size in bytes of UDP packets.
6923
6924 reuse=1|0
6925 Explicitly allow or disallow reusing UDP sockets.
6926
6927 ttl=ttl
6928 Set the time to live value (for multicast only).
6929
6930 connect=1|0
6931 Initialize the UDP socket with "connect()". In this case, the
6932 destination address can't be changed with ff_udp_set_remote_url
6933 later. If the destination address isn't known at the start, this
6934 option can be specified in ff_udp_set_remote_url, too. This allows
6935 finding out the source address for the packets with getsockname,
6936 and makes writes return with AVERROR(ECONNREFUSED) if "destination
6937 unreachable" is received. For receiving, this gives the benefit of
6938 only receiving packets from the specified peer address/port.
6939
6940 sources=address[,address]
6941 Only receive packets sent from the specified addresses. In case of
6942 multicast, also subscribe to multicast traffic coming from these
6943 addresses only.
6944
6945 block=address[,address]
6946 Ignore packets sent from the specified addresses. In case of
6947 multicast, also exclude the source addresses in the multicast
6948 subscription.
6949
6950 fifo_size=units
6951 Set the UDP receiving circular buffer size, expressed as a number
6952 of packets with size of 188 bytes. If not specified defaults to
6953 7*4096.
6954
6955 overrun_nonfatal=1|0
6956 Survive in case of UDP receiving circular buffer overrun. Default
6957 value is 0.
6958
6959 timeout=microseconds
6960 Set raise error timeout, expressed in microseconds.
6961
6962 This option is only relevant in read mode: if no data arrived in
6963 more than this time interval, raise error.
6964
6965 broadcast=1|0
6966 Explicitly allow or disallow UDP broadcasting.
6967
6968 Note that broadcasting may not work properly on networks having a
6969 broadcast storm protection.
6970
6971 Examples
6972
6973 • Use ffmpeg to stream over UDP to a remote endpoint:
6974
6975 ffmpeg -i <input> -f <format> udp://<hostname>:<port>
6976
6977 • Use ffmpeg to stream in mpegts format over UDP using 188 sized UDP
6978 packets, using a large input buffer:
6979
6980 ffmpeg -i <input> -f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
6981
6982 • Use ffmpeg to receive over UDP from a remote endpoint:
6983
6984 ffmpeg -i udp://[<multicast-address>]:<port> ...
6985
6986 unix
6987 Unix local socket
6988
6989 The required syntax for a Unix socket URL is:
6990
6991 unix://<filepath>
6992
6993 The following parameters can be set via command line options (or in
6994 code via "AVOption"s):
6995
6996 timeout
6997 Timeout in ms.
6998
6999 listen
7000 Create the Unix socket in listening mode.
7001
7002 zmq
7003 ZeroMQ asynchronous messaging using the libzmq library.
7004
7005 This library supports unicast streaming to multiple clients without
7006 relying on an external server.
7007
7008 The required syntax for streaming or connecting to a stream is:
7009
7010 zmq:tcp://ip-address:port
7011
7012 Example: Create a localhost stream on port 5555:
7013
7014 ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
7015
7016 Multiple clients may connect to the stream using:
7017
7018 ffplay zmq:tcp://127.0.0.1:5555
7019
7020 Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub
7021 pattern. The server side binds to a port and publishes data. Clients
7022 connect to the server (via IP address/port) and subscribe to the
7023 stream. The order in which the server and client start generally does
7024 not matter.
7025
7026 ffmpeg must be compiled with the --enable-libzmq option to support this
7027 protocol.
7028
7029 Options can be set on the ffmpeg/ffplay command line. The following
7030 options are supported:
7031
7032 pkt_size
7033 Forces the maximum packet size for sending/receiving data. The
7034 default value is 131,072 bytes. On the server side, this sets the
7035 maximum size of sent packets via ZeroMQ. On the clients, it sets an
7036 internal buffer size for receiving packets. Note that pkt_size on
7037 the clients should be equal to or greater than pkt_size on the
7038 server. Otherwise the received message may be truncated causing
7039 decoding errors.
7040
7042 The libavdevice library provides the same interface as libavformat.
7043 Namely, an input device is considered like a demuxer, and an output
7044 device like a muxer, and the interface and generic device options are
7045 the same provided by libavformat (see the ffmpeg-formats manual).
7046
7047 In addition each input or output device may support so-called private
7048 options, which are specific for that component.
7049
7050 Options may be set by specifying -option value in the FFmpeg tools, or
7051 by setting the value explicitly in the device "AVFormatContext" options
7052 or using the libavutil/opt.h API for programmatic use.
7053
7055 Input devices are configured elements in FFmpeg which enable accessing
7056 the data coming from a multimedia device attached to your system.
7057
7058 When you configure your FFmpeg build, all the supported input devices
7059 are enabled by default. You can list all available ones using the
7060 configure option "--list-indevs".
7061
7062 You can disable all the input devices using the configure option
7063 "--disable-indevs", and selectively enable an input device using the
7064 option "--enable-indev=INDEV", or you can disable a particular input
7065 device using the option "--disable-indev=INDEV".
7066
7067 The option "-devices" of the ff* tools will display the list of
7068 supported input devices.
7069
7070 A description of the currently available input devices follows.
7071
7072 alsa
7073 ALSA (Advanced Linux Sound Architecture) input device.
7074
7075 To enable this input device during configuration you need libasound
7076 installed on your system.
7077
7078 This device allows capturing from an ALSA device. The name of the
7079 device to capture has to be an ALSA card identifier.
7080
7081 An ALSA identifier has the syntax:
7082
7083 hw:<CARD>[,<DEV>[,<SUBDEV>]]
7084
7085 where the DEV and SUBDEV components are optional.
7086
7087 The three arguments (in order: CARD,DEV,SUBDEV) specify card number or
7088 identifier, device number and subdevice number (-1 means any).
7089
7090 To see the list of cards currently recognized by your system check the
7091 files /proc/asound/cards and /proc/asound/devices.
7092
7093 For example to capture with ffmpeg from an ALSA device with card id 0,
7094 you may run the command:
7095
7096 ffmpeg -f alsa -i hw:0 alsaout.wav
7097
7098 For more information see:
7099 <http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html>
7100
7101 Options
7102
7103 sample_rate
7104 Set the sample rate in Hz. Default is 48000.
7105
7106 channels
7107 Set the number of channels. Default is 2.
7108
7109 android_camera
7110 Android camera input device.
7111
7112 This input devices uses the Android Camera2 NDK API which is available
7113 on devices with API level 24+. The availability of android_camera is
7114 autodetected during configuration.
7115
7116 This device allows capturing from all cameras on an Android device,
7117 which are integrated into the Camera2 NDK API.
7118
7119 The available cameras are enumerated internally and can be selected
7120 with the camera_index parameter. The input file string is discarded.
7121
7122 Generally the back facing camera has index 0 while the front facing
7123 camera has index 1.
7124
7125 Options
7126
7127 video_size
7128 Set the video size given as a string such as 640x480 or hd720.
7129 Falls back to the first available configuration reported by Android
7130 if requested video size is not available or by default.
7131
7132 framerate
7133 Set the video framerate. Falls back to the first available
7134 configuration reported by Android if requested framerate is not
7135 available or by default (-1).
7136
7137 camera_index
7138 Set the index of the camera to use. Default is 0.
7139
7140 input_queue_size
7141 Set the maximum number of frames to buffer. Default is 5.
7142
7143 avfoundation
7144 AVFoundation input device.
7145
7146 AVFoundation is the currently recommended framework by Apple for
7147 streamgrabbing on OSX >= 10.7 as well as on iOS.
7148
7149 The input filename has to be given in the following syntax:
7150
7151 -i "[[VIDEO]:[AUDIO]]"
7152
7153 The first entry selects the video input while the latter selects the
7154 audio input. The stream has to be specified by the device name or the
7155 device index as shown by the device list. Alternatively, the video
7156 and/or audio input device can be chosen by index using the
7157
7158 B<-video_device_index E<lt>INDEXE<gt>>
7159
7160 and/or
7161
7162 B<-audio_device_index E<lt>INDEXE<gt>>
7163
7164 , overriding any device name or index given in the input filename.
7165
7166 All available devices can be enumerated by using -list_devices true,
7167 listing all device names and corresponding indices.
7168
7169 There are two device name aliases:
7170
7171 "default"
7172 Select the AVFoundation default device of the corresponding type.
7173
7174 "none"
7175 Do not record the corresponding media type. This is equivalent to
7176 specifying an empty device name or index.
7177
7178 Options
7179
7180 AVFoundation supports the following options:
7181
7182 -list_devices <TRUE|FALSE>
7183 If set to true, a list of all available input devices is given
7184 showing all device names and indices.
7185
7186 -video_device_index <INDEX>
7187 Specify the video device by its index. Overrides anything given in
7188 the input filename.
7189
7190 -audio_device_index <INDEX>
7191 Specify the audio device by its index. Overrides anything given in
7192 the input filename.
7193
7194 -pixel_format <FORMAT>
7195 Request the video device to use a specific pixel format. If the
7196 specified format is not supported, a list of available formats is
7197 given and the first one in this list is used instead. Available
7198 pixel formats are: "monob, rgb555be, rgb555le, rgb565be, rgb565le,
7199 rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
7200 bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16,
7201 yuv422p10, yuv444p10,
7202 yuv420p, nv12, yuyv422, gray"
7203
7204 -framerate
7205 Set the grabbing frame rate. Default is "ntsc", corresponding to a
7206 frame rate of "30000/1001".
7207
7208 -video_size
7209 Set the video frame size.
7210
7211 -capture_cursor
7212 Capture the mouse pointer. Default is 0.
7213
7214 -capture_mouse_clicks
7215 Capture the screen mouse clicks. Default is 0.
7216
7217 -capture_raw_data
7218 Capture the raw device data. Default is 0. Using this option may
7219 result in receiving the underlying data delivered to the
7220 AVFoundation framework. E.g. for muxed devices that sends raw DV
7221 data to the framework (like tape-based camcorders), setting this
7222 option to false results in extracted video frames captured in the
7223 designated pixel format only. Setting this option to true results
7224 in receiving the raw DV stream untouched.
7225
7226 Examples
7227
7228 • Print the list of AVFoundation supported devices and exit:
7229
7230 $ ffmpeg -f avfoundation -list_devices true -i ""
7231
7232 • Record video from video device 0 and audio from audio device 0 into
7233 out.avi:
7234
7235 $ ffmpeg -f avfoundation -i "0:0" out.avi
7236
7237 • Record video from video device 2 and audio from audio device 1 into
7238 out.avi:
7239
7240 $ ffmpeg -f avfoundation -video_device_index 2 -i ":1" out.avi
7241
7242 • Record video from the system default video device using the pixel
7243 format bgr0 and do not record any audio into out.avi:
7244
7245 $ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi
7246
7247 • Record raw DV data from a suitable input device and write the
7248 output into out.dv:
7249
7250 $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv
7251
7252 bktr
7253 BSD video input device.
7254
7255 Options
7256
7257 framerate
7258 Set the frame rate.
7259
7260 video_size
7261 Set the video frame size. Default is "vga".
7262
7263 standard
7264 Available values are:
7265
7266 pal
7267 ntsc
7268 secam
7269 paln
7270 palm
7271 ntscj
7272
7273 decklink
7274 The decklink input device provides capture capabilities for Blackmagic
7275 DeckLink devices.
7276
7277 To enable this input device, you need the Blackmagic DeckLink SDK and
7278 you need to configure with the appropriate "--extra-cflags" and
7279 "--extra-ldflags". On Windows, you need to run the IDL files through
7280 widl.
7281
7282 DeckLink is very picky about the formats it supports. Pixel format of
7283 the input can be set with raw_format. Framerate and video size must be
7284 determined for your device with -list_formats 1. Audio sample rate is
7285 always 48 kHz and the number of channels can be 2, 8 or 16. Note that
7286 all audio channels are bundled in one single audio track.
7287
7288 Options
7289
7290 list_devices
7291 If set to true, print a list of devices and exit. Defaults to
7292 false. This option is deprecated, please use the "-sources" option
7293 of ffmpeg to list the available input devices.
7294
7295 list_formats
7296 If set to true, print a list of supported formats and exit.
7297 Defaults to false.
7298
7299 format_code <FourCC>
7300 This sets the input video format to the format given by the FourCC.
7301 To see the supported values of your device(s) use list_formats.
7302 Note that there is a FourCC 'pal ' that can also be used as pal (3
7303 letters). Default behavior is autodetection of the input video
7304 format, if the hardware supports it.
7305
7306 raw_format
7307 Set the pixel format of the captured video. Available values are:
7308
7309 auto
7310 This is the default which means 8-bit YUV 422 or 8-bit ARGB if
7311 format autodetection is used, 8-bit YUV 422 otherwise.
7312
7313 uyvy422
7314 8-bit YUV 422.
7315
7316 yuv422p10
7317 10-bit YUV 422.
7318
7319 argb
7320 8-bit RGB.
7321
7322 bgra
7323 8-bit RGB.
7324
7325 rgb10
7326 10-bit RGB.
7327
7328 teletext_lines
7329 If set to nonzero, an additional teletext stream will be captured
7330 from the vertical ancillary data. Both SD PAL (576i) and HD (1080i
7331 or 1080p) sources are supported. In case of HD sources, OP47
7332 packets are decoded.
7333
7334 This option is a bitmask of the SD PAL VBI lines captured,
7335 specifically lines 6 to 22, and lines 318 to 335. Line 6 is the LSB
7336 in the mask. Selected lines which do not contain teletext
7337 information will be ignored. You can use the special all constant
7338 to select all possible lines, or standard to skip lines 6, 318 and
7339 319, which are not compatible with all receivers.
7340
7341 For SD sources, ffmpeg needs to be compiled with
7342 "--enable-libzvbi". For HD sources, on older (pre-4K) DeckLink card
7343 models you have to capture in 10 bit mode.
7344
7345 channels
7346 Defines number of audio channels to capture. Must be 2, 8 or 16.
7347 Defaults to 2.
7348
7349 duplex_mode
7350 Sets the decklink device duplex/profile mode. Must be unset, half,
7351 full, one_sub_device_full, one_sub_device_half,
7352 two_sub_device_full, four_sub_device_half Defaults to unset.
7353
7354 Note: DeckLink SDK 11.0 have replaced the duplex property by a
7355 profile property. For the DeckLink Duo 2 and DeckLink Quad 2, a
7356 profile is shared between any 2 sub-devices that utilize the same
7357 connectors. For the DeckLink 8K Pro, a profile is shared between
7358 all 4 sub-devices. So DeckLink 8K Pro support four profiles.
7359
7360 Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
7361 one_sub_device_full, one_sub_device_half, two_sub_device_full,
7362 four_sub_device_half
7363
7364 Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: half,
7365 full
7366
7367 timecode_format
7368 Timecode type to include in the frame and video stream metadata.
7369 Must be none, rp188vitc, rp188vitc2, rp188ltc, rp188hfr, rp188any,
7370 vitc, vitc2, or serial. Defaults to none (not included).
7371
7372 In order to properly support 50/60 fps timecodes, the ordering of
7373 the queried timecode types for rp188any is HFR, VITC1, VITC2 and
7374 LTC for >30 fps content. Note that this is slightly different to
7375 the ordering used by the DeckLink API, which is HFR, VITC1, LTC,
7376 VITC2.
7377
7378 video_input
7379 Sets the video input source. Must be unset, sdi, hdmi, optical_sdi,
7380 component, composite or s_video. Defaults to unset.
7381
7382 audio_input
7383 Sets the audio input source. Must be unset, embedded, aes_ebu,
7384 analog, analog_xlr, analog_rca or microphone. Defaults to unset.
7385
7386 video_pts
7387 Sets the video packet timestamp source. Must be video, audio,
7388 reference, wallclock or abs_wallclock. Defaults to video.
7389
7390 audio_pts
7391 Sets the audio packet timestamp source. Must be video, audio,
7392 reference, wallclock or abs_wallclock. Defaults to audio.
7393
7394 draw_bars
7395 If set to true, color bars are drawn in the event of a signal loss.
7396 Defaults to true.
7397
7398 queue_size
7399 Sets maximum input buffer size in bytes. If the buffering reaches
7400 this value, incoming frames will be dropped. Defaults to
7401 1073741824.
7402
7403 audio_depth
7404 Sets the audio sample bit depth. Must be 16 or 32. Defaults to 16.
7405
7406 decklink_copyts
7407 If set to true, timestamps are forwarded as they are without
7408 removing the initial offset. Defaults to false.
7409
7410 timestamp_align
7411 Capture start time alignment in seconds. If set to nonzero, input
7412 frames are dropped till the system timestamp aligns with configured
7413 value. Alignment difference of up to one frame duration is
7414 tolerated. This is useful for maintaining input synchronization
7415 across N different hardware devices deployed for 'N-way'
7416 redundancy. The system time of different hardware devices should be
7417 synchronized with protocols such as NTP or PTP, before using this
7418 option. Note that this method is not foolproof. In some border
7419 cases input synchronization may not happen due to thread scheduling
7420 jitters in the OS. Either sync could go wrong by 1 frame or in a
7421 rarer case timestamp_align seconds. Defaults to 0.
7422
7423 wait_for_tc (bool)
7424 Drop frames till a frame with timecode is received. Sometimes
7425 serial timecode isn't received with the first input frame. If that
7426 happens, the stored stream timecode will be inaccurate. If this
7427 option is set to true, input frames are dropped till a frame with
7428 timecode is received. Option timecode_format must be specified.
7429 Defaults to false.
7430
7431 enable_klv(bool)
7432 If set to true, extracts KLV data from VANC and outputs KLV
7433 packets. KLV VANC packets are joined based on MID and PSC fields
7434 and aggregated into one KLV packet. Defaults to false.
7435
7436 Examples
7437
7438 • List input devices:
7439
7440 ffmpeg -sources decklink
7441
7442 • List supported formats:
7443
7444 ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
7445
7446 • Capture video clip at 1080i50:
7447
7448 ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
7449
7450 • Capture video clip at 1080i50 10 bit:
7451
7452 ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
7453
7454 • Capture video clip at 1080i50 with 16 audio channels:
7455
7456 ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
7457
7458 dshow
7459 Windows DirectShow input device.
7460
7461 DirectShow support is enabled when FFmpeg is built with the mingw-w64
7462 project. Currently only audio and video devices are supported.
7463
7464 Multiple devices may be opened as separate inputs, but they may also be
7465 opened on the same input, which should improve synchronism between
7466 them.
7467
7468 The input name should be in the format:
7469
7470 <TYPE>=<NAME>[:<TYPE>=<NAME>]
7471
7472 where TYPE can be either audio or video, and NAME is the device's name
7473 or alternative name..
7474
7475 Options
7476
7477 If no options are specified, the device's defaults are used. If the
7478 device does not support the requested options, it will fail to open.
7479
7480 video_size
7481 Set the video size in the captured video.
7482
7483 framerate
7484 Set the frame rate in the captured video.
7485
7486 sample_rate
7487 Set the sample rate (in Hz) of the captured audio.
7488
7489 sample_size
7490 Set the sample size (in bits) of the captured audio.
7491
7492 channels
7493 Set the number of channels in the captured audio.
7494
7495 list_devices
7496 If set to true, print a list of devices and exit.
7497
7498 list_options
7499 If set to true, print a list of selected device's options and exit.
7500
7501 video_device_number
7502 Set video device number for devices with the same name (starts at
7503 0, defaults to 0).
7504
7505 audio_device_number
7506 Set audio device number for devices with the same name (starts at
7507 0, defaults to 0).
7508
7509 pixel_format
7510 Select pixel format to be used by DirectShow. This may only be set
7511 when the video codec is not set or set to rawvideo.
7512
7513 audio_buffer_size
7514 Set audio device buffer size in milliseconds (which can directly
7515 impact latency, depending on the device). Defaults to using the
7516 audio device's default buffer size (typically some multiple of
7517 500ms). Setting this value too low can degrade performance. See
7518 also
7519 <http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx>
7520
7521 video_pin_name
7522 Select video capture pin to use by name or alternative name.
7523
7524 audio_pin_name
7525 Select audio capture pin to use by name or alternative name.
7526
7527 crossbar_video_input_pin_number
7528 Select video input pin number for crossbar device. This will be
7529 routed to the crossbar device's Video Decoder output pin. Note
7530 that changing this value can affect future invocations (sets a new
7531 default) until system reboot occurs.
7532
7533 crossbar_audio_input_pin_number
7534 Select audio input pin number for crossbar device. This will be
7535 routed to the crossbar device's Audio Decoder output pin. Note
7536 that changing this value can affect future invocations (sets a new
7537 default) until system reboot occurs.
7538
7539 show_video_device_dialog
7540 If set to true, before capture starts, popup a display dialog to
7541 the end user, allowing them to change video filter properties and
7542 configurations manually. Note that for crossbar devices, adjusting
7543 values in this dialog may be needed at times to toggle between PAL
7544 (25 fps) and NTSC (29.97) input frame rates, sizes, interlacing,
7545 etc. Changing these values can enable different scan rates/frame
7546 rates and avoiding green bars at the bottom, flickering scan lines,
7547 etc. Note that with some devices, changing these properties can
7548 also affect future invocations (sets new defaults) until system
7549 reboot occurs.
7550
7551 show_audio_device_dialog
7552 If set to true, before capture starts, popup a display dialog to
7553 the end user, allowing them to change audio filter properties and
7554 configurations manually.
7555
7556 show_video_crossbar_connection_dialog
7557 If set to true, before capture starts, popup a display dialog to
7558 the end user, allowing them to manually modify crossbar pin
7559 routings, when it opens a video device.
7560
7561 show_audio_crossbar_connection_dialog
7562 If set to true, before capture starts, popup a display dialog to
7563 the end user, allowing them to manually modify crossbar pin
7564 routings, when it opens an audio device.
7565
7566 show_analog_tv_tuner_dialog
7567 If set to true, before capture starts, popup a display dialog to
7568 the end user, allowing them to manually modify TV channels and
7569 frequencies.
7570
7571 show_analog_tv_tuner_audio_dialog
7572 If set to true, before capture starts, popup a display dialog to
7573 the end user, allowing them to manually modify TV audio (like mono
7574 vs. stereo, Language A,B or C).
7575
7576 audio_device_load
7577 Load an audio capture filter device from file instead of searching
7578 it by name. It may load additional parameters too, if the filter
7579 supports the serialization of its properties to. To use this an
7580 audio capture source has to be specified, but it can be anything
7581 even fake one.
7582
7583 audio_device_save
7584 Save the currently used audio capture filter device and its
7585 parameters (if the filter supports it) to a file. If a file with
7586 the same name exists it will be overwritten.
7587
7588 video_device_load
7589 Load a video capture filter device from file instead of searching
7590 it by name. It may load additional parameters too, if the filter
7591 supports the serialization of its properties to. To use this a
7592 video capture source has to be specified, but it can be anything
7593 even fake one.
7594
7595 video_device_save
7596 Save the currently used video capture filter device and its
7597 parameters (if the filter supports it) to a file. If a file with
7598 the same name exists it will be overwritten.
7599
7600 use_video_device_timestamps
7601 If set to false, the timestamp for video frames will be derived
7602 from the wallclock instead of the timestamp provided by the capture
7603 device. This allows working around devices that provide unreliable
7604 timestamps.
7605
7606 Examples
7607
7608 • Print the list of DirectShow supported devices and exit:
7609
7610 $ ffmpeg -list_devices true -f dshow -i dummy
7611
7612 • Open video device Camera:
7613
7614 $ ffmpeg -f dshow -i video="Camera"
7615
7616 • Open second video device with name Camera:
7617
7618 $ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
7619
7620 • Open video device Camera and audio device Microphone:
7621
7622 $ ffmpeg -f dshow -i video="Camera":audio="Microphone"
7623
7624 • Print the list of supported options in selected device and exit:
7625
7626 $ ffmpeg -list_options true -f dshow -i video="Camera"
7627
7628 • Specify pin names to capture by name or alternative name, specify
7629 alternative device name:
7630
7631 $ ffmpeg -f dshow -audio_pin_name "Audio Out" -video_pin_name 2 -i video=video="@device_pnp_\\?\pci#ven_1a0a&dev_6200&subsys_62021461&rev_01#4&e2c7dd6&0&00e1#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6}":audio="Microphone"
7632
7633 • Configure a crossbar device, specifying crossbar pins, allow user
7634 to adjust video capture properties at startup:
7635
7636 $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
7637 -crossbar_audio_input_pin_number 3 -i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture"
7638
7639 fbdev
7640 Linux framebuffer input device.
7641
7642 The Linux framebuffer is a graphic hardware-independent abstraction
7643 layer to show graphics on a computer monitor, typically on the console.
7644 It is accessed through a file device node, usually /dev/fb0.
7645
7646 For more detailed information read the file
7647 Documentation/fb/framebuffer.txt included in the Linux source tree.
7648
7649 See also <http://linux-fbdev.sourceforge.net/>, and fbset(1).
7650
7651 To record from the framebuffer device /dev/fb0 with ffmpeg:
7652
7653 ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
7654
7655 You can take a single screenshot image with the command:
7656
7657 ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
7658
7659 Options
7660
7661 framerate
7662 Set the frame rate. Default is 25.
7663
7664 gdigrab
7665 Win32 GDI-based screen capture device.
7666
7667 This device allows you to capture a region of the display on Windows.
7668
7669 There are two options for the input filename:
7670
7671 desktop
7672
7673 or
7674
7675 title=<window_title>
7676
7677 The first option will capture the entire desktop, or a fixed region of
7678 the desktop. The second option will instead capture the contents of a
7679 single window, regardless of its position on the screen.
7680
7681 For example, to grab the entire desktop using ffmpeg:
7682
7683 ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
7684
7685 Grab a 640x480 region at position "10,20":
7686
7687 ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
7688
7689 Grab the contents of the window named "Calculator"
7690
7691 ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
7692
7693 Options
7694
7695 draw_mouse
7696 Specify whether to draw the mouse pointer. Use the value 0 to not
7697 draw the pointer. Default value is 1.
7698
7699 framerate
7700 Set the grabbing frame rate. Default value is "ntsc", corresponding
7701 to a frame rate of "30000/1001".
7702
7703 show_region
7704 Show grabbed region on screen.
7705
7706 If show_region is specified with 1, then the grabbing region will
7707 be indicated on screen. With this option, it is easy to know what
7708 is being grabbed if only a portion of the screen is grabbed.
7709
7710 Note that show_region is incompatible with grabbing the contents of
7711 a single window.
7712
7713 For example:
7714
7715 ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
7716
7717 video_size
7718 Set the video frame size. The default is to capture the full screen
7719 if desktop is selected, or the full window size if
7720 title=window_title is selected.
7721
7722 offset_x
7723 When capturing a region with video_size, set the distance from the
7724 left edge of the screen or desktop.
7725
7726 Note that the offset calculation is from the top left corner of the
7727 primary monitor on Windows. If you have a monitor positioned to the
7728 left of your primary monitor, you will need to use a negative
7729 offset_x value to move the region to that monitor.
7730
7731 offset_y
7732 When capturing a region with video_size, set the distance from the
7733 top edge of the screen or desktop.
7734
7735 Note that the offset calculation is from the top left corner of the
7736 primary monitor on Windows. If you have a monitor positioned above
7737 your primary monitor, you will need to use a negative offset_y
7738 value to move the region to that monitor.
7739
7740 iec61883
7741 FireWire DV/HDV input device using libiec61883.
7742
7743 To enable this input device, you need libiec61883, libraw1394 and
7744 libavc1394 installed on your system. Use the configure option
7745 "--enable-libiec61883" to compile with the device enabled.
7746
7747 The iec61883 capture device supports capturing from a video device
7748 connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
7749 FireWire stack (juju). This is the default DV/HDV input method in Linux
7750 Kernel 2.6.37 and later, since the old FireWire stack was removed.
7751
7752 Specify the FireWire port to be used as input file, or "auto" to choose
7753 the first port connected.
7754
7755 Options
7756
7757 dvtype
7758 Override autodetection of DV/HDV. This should only be used if auto
7759 detection does not work, or if usage of a different device type
7760 should be prohibited. Treating a DV device as HDV (or vice versa)
7761 will not work and result in undefined behavior. The values auto,
7762 dv and hdv are supported.
7763
7764 dvbuffer
7765 Set maximum size of buffer for incoming data, in frames. For DV,
7766 this is an exact value. For HDV, it is not frame exact, since HDV
7767 does not have a fixed frame size.
7768
7769 dvguid
7770 Select the capture device by specifying its GUID. Capturing will
7771 only be performed from the specified device and fails if no device
7772 with the given GUID is found. This is useful to select the input if
7773 multiple devices are connected at the same time. Look at
7774 /sys/bus/firewire/devices to find out the GUIDs.
7775
7776 Examples
7777
7778 • Grab and show the input of a FireWire DV/HDV device.
7779
7780 ffplay -f iec61883 -i auto
7781
7782 • Grab and record the input of a FireWire DV/HDV device, using a
7783 packet buffer of 100000 packets if the source is HDV.
7784
7785 ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
7786
7787 jack
7788 JACK input device.
7789
7790 To enable this input device during configuration you need libjack
7791 installed on your system.
7792
7793 A JACK input device creates one or more JACK writable clients, one for
7794 each audio channel, with name client_name:input_N, where client_name is
7795 the name provided by the application, and N is a number which
7796 identifies the channel. Each writable client will send the acquired
7797 data to the FFmpeg input device.
7798
7799 Once you have created one or more JACK readable clients, you need to
7800 connect them to one or more JACK writable clients.
7801
7802 To connect or disconnect JACK clients you can use the jack_connect and
7803 jack_disconnect programs, or do it through a graphical interface, for
7804 example with qjackctl.
7805
7806 To list the JACK clients and their properties you can invoke the
7807 command jack_lsp.
7808
7809 Follows an example which shows how to capture a JACK readable client
7810 with ffmpeg.
7811
7812 # Create a JACK writable client with name "ffmpeg".
7813 $ ffmpeg -f jack -i ffmpeg -y out.wav
7814
7815 # Start the sample jack_metro readable client.
7816 $ jack_metro -b 120 -d 0.2 -f 4000
7817
7818 # List the current JACK clients.
7819 $ jack_lsp -c
7820 system:capture_1
7821 system:capture_2
7822 system:playback_1
7823 system:playback_2
7824 ffmpeg:input_1
7825 metro:120_bpm
7826
7827 # Connect metro to the ffmpeg writable client.
7828 $ jack_connect metro:120_bpm ffmpeg:input_1
7829
7830 For more information read: <http://jackaudio.org/>
7831
7832 Options
7833
7834 channels
7835 Set the number of channels. Default is 2.
7836
7837 kmsgrab
7838 KMS video input device.
7839
7840 Captures the KMS scanout framebuffer associated with a specified CRTC
7841 or plane as a DRM object that can be passed to other hardware
7842 functions.
7843
7844 Requires either DRM master or CAP_SYS_ADMIN to run.
7845
7846 If you don't understand what all of that means, you probably don't want
7847 this. Look at x11grab instead.
7848
7849 Options
7850
7851 device
7852 DRM device to capture on. Defaults to /dev/dri/card0.
7853
7854 format
7855 Pixel format of the framebuffer. This can be autodetected if you
7856 are running Linux 5.7 or later, but needs to be provided for
7857 earlier versions. Defaults to bgr0, which is the most common
7858 format used by the Linux console and Xorg X server.
7859
7860 format_modifier
7861 Format modifier to signal on output frames. This is necessary to
7862 import correctly into some APIs. It can be autodetected if you are
7863 running Linux 5.7 or later, but will need to be provided explicitly
7864 when needed in earlier versions. See the libdrm documentation for
7865 possible values.
7866
7867 crtc_id
7868 KMS CRTC ID to define the capture source. The first active plane
7869 on the given CRTC will be used.
7870
7871 plane_id
7872 KMS plane ID to define the capture source. Defaults to the first
7873 active plane found if neither crtc_id nor plane_id are specified.
7874
7875 framerate
7876 Framerate to capture at. This is not synchronised to any page
7877 flipping or framebuffer changes - it just defines the interval at
7878 which the framebuffer is sampled. Sampling faster than the
7879 framebuffer update rate will generate independent frames with the
7880 same content. Defaults to 30.
7881
7882 Examples
7883
7884 • Capture from the first active plane, download the result to normal
7885 frames and encode. This will only work if the framebuffer is both
7886 linear and mappable - if not, the result may be scrambled or fail
7887 to download.
7888
7889 ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
7890
7891 • Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert
7892 to NV12 and encode as H.264.
7893
7894 ffmpeg -crtc_id 42 -framerate 60 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi output.mp4
7895
7896 • To capture only part of a plane the output can be cropped - this
7897 can be used to capture a single window, as long as it has a known
7898 absolute position and size. For example, to capture and encode the
7899 middle quarter of a 1920x1080 plane:
7900
7901 ffmpeg -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,crop=960:540:480:270,scale_vaapi=960:540:nv12' -c:v h264_vaapi output.mp4
7902
7903 lavfi
7904 Libavfilter input virtual device.
7905
7906 This input device reads data from the open output pads of a libavfilter
7907 filtergraph.
7908
7909 For each filtergraph open output, the input device will create a
7910 corresponding stream which is mapped to the generated output. Currently
7911 only video data is supported. The filtergraph is specified through the
7912 option graph.
7913
7914 Options
7915
7916 graph
7917 Specify the filtergraph to use as input. Each video open output
7918 must be labelled by a unique string of the form "outN", where N is
7919 a number starting from 0 corresponding to the mapped input stream
7920 generated by the device. The first unlabelled output is
7921 automatically assigned to the "out0" label, but all the others need
7922 to be specified explicitly.
7923
7924 The suffix "+subcc" can be appended to the output label to create
7925 an extra stream with the closed captions packets attached to that
7926 output (experimental; only for EIA-608 / CEA-708 for now). The
7927 subcc streams are created after all the normal streams, in the
7928 order of the corresponding stream. For example, if there is
7929 "out19+subcc", "out7+subcc" and up to "out42", the stream #43 is
7930 subcc for stream #7 and stream #44 is subcc for stream #19.
7931
7932 If not specified defaults to the filename specified for the input
7933 device.
7934
7935 graph_file
7936 Set the filename of the filtergraph to be read and sent to the
7937 other filters. Syntax of the filtergraph is the same as the one
7938 specified by the option graph.
7939
7940 dumpgraph
7941 Dump graph to stderr.
7942
7943 Examples
7944
7945 • Create a color video stream and play it back with ffplay:
7946
7947 ffplay -f lavfi -graph "color=c=pink [out0]" dummy
7948
7949 • As the previous example, but use filename for specifying the graph
7950 description, and omit the "out0" label:
7951
7952 ffplay -f lavfi color=c=pink
7953
7954 • Create three different video test filtered sources and play them:
7955
7956 ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
7957
7958 • Read an audio stream from a file using the amovie source and play
7959 it back with ffplay:
7960
7961 ffplay -f lavfi "amovie=test.wav"
7962
7963 • Read an audio stream and a video stream and play it back with
7964 ffplay:
7965
7966 ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
7967
7968 • Dump decoded frames to images and closed captions to a file
7969 (experimental):
7970
7971 ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
7972
7973 libcdio
7974 Audio-CD input device based on libcdio.
7975
7976 To enable this input device during configuration you need libcdio
7977 installed on your system. It requires the configure option
7978 "--enable-libcdio".
7979
7980 This device allows playing and grabbing from an Audio-CD.
7981
7982 For example to copy with ffmpeg the entire Audio-CD in /dev/sr0, you
7983 may run the command:
7984
7985 ffmpeg -f libcdio -i /dev/sr0 cd.wav
7986
7987 Options
7988
7989 speed
7990 Set drive reading speed. Default value is 0.
7991
7992 The speed is specified CD-ROM speed units. The speed is set through
7993 the libcdio "cdio_cddap_speed_set" function. On many CD-ROM drives,
7994 specifying a value too large will result in using the fastest
7995 speed.
7996
7997 paranoia_mode
7998 Set paranoia recovery mode flags. It accepts one of the following
7999 values:
8000
8001 disable
8002 verify
8003 overlap
8004 neverskip
8005 full
8006
8007 Default value is disable.
8008
8009 For more information about the available recovery modes, consult
8010 the paranoia project documentation.
8011
8012 libdc1394
8013 IIDC1394 input device, based on libdc1394 and libraw1394.
8014
8015 Requires the configure option "--enable-libdc1394".
8016
8017 Options
8018
8019 framerate
8020 Set the frame rate. Default is "ntsc", corresponding to a frame
8021 rate of "30000/1001".
8022
8023 pixel_format
8024 Select the pixel format. Default is "uyvy422".
8025
8026 video_size
8027 Set the video size given as a string such as "640x480" or "hd720".
8028 Default is "qvga".
8029
8030 openal
8031 The OpenAL input device provides audio capture on all systems with a
8032 working OpenAL 1.1 implementation.
8033
8034 To enable this input device during configuration, you need OpenAL
8035 headers and libraries installed on your system, and need to configure
8036 FFmpeg with "--enable-openal".
8037
8038 OpenAL headers and libraries should be provided as part of your OpenAL
8039 implementation, or as an additional download (an SDK). Depending on
8040 your installation you may need to specify additional flags via the
8041 "--extra-cflags" and "--extra-ldflags" for allowing the build system to
8042 locate the OpenAL headers and libraries.
8043
8044 An incomplete list of OpenAL implementations follows:
8045
8046 Creative
8047 The official Windows implementation, providing hardware
8048 acceleration with supported devices and software fallback. See
8049 <http://openal.org/>.
8050
8051 OpenAL Soft
8052 Portable, open source (LGPL) software implementation. Includes
8053 backends for the most common sound APIs on the Windows, Linux,
8054 Solaris, and BSD operating systems. See
8055 <http://kcat.strangesoft.net/openal.html>.
8056
8057 Apple
8058 OpenAL is part of Core Audio, the official Mac OS X Audio
8059 interface. See
8060 <http://developer.apple.com/technologies/mac/audio-and-video.html>
8061
8062 This device allows one to capture from an audio input device handled
8063 through OpenAL.
8064
8065 You need to specify the name of the device to capture in the provided
8066 filename. If the empty string is provided, the device will
8067 automatically select the default device. You can get the list of the
8068 supported devices by using the option list_devices.
8069
8070 Options
8071
8072 channels
8073 Set the number of channels in the captured audio. Only the values 1
8074 (monaural) and 2 (stereo) are currently supported. Defaults to 2.
8075
8076 sample_size
8077 Set the sample size (in bits) of the captured audio. Only the
8078 values 8 and 16 are currently supported. Defaults to 16.
8079
8080 sample_rate
8081 Set the sample rate (in Hz) of the captured audio. Defaults to
8082 44.1k.
8083
8084 list_devices
8085 If set to true, print a list of devices and exit. Defaults to
8086 false.
8087
8088 Examples
8089
8090 Print the list of OpenAL supported devices and exit:
8091
8092 $ ffmpeg -list_devices true -f openal -i dummy out.ogg
8093
8094 Capture from the OpenAL device DR-BT101 via PulseAudio:
8095
8096 $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
8097
8098 Capture from the default device (note the empty string '' as filename):
8099
8100 $ ffmpeg -f openal -i '' out.ogg
8101
8102 Capture from two devices simultaneously, writing to two different
8103 files, within the same ffmpeg command:
8104
8105 $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
8106
8107 Note: not all OpenAL implementations support multiple simultaneous
8108 capture - try the latest OpenAL Soft if the above does not work.
8109
8110 oss
8111 Open Sound System input device.
8112
8113 The filename to provide to the input device is the device node
8114 representing the OSS input device, and is usually set to /dev/dsp.
8115
8116 For example to grab from /dev/dsp using ffmpeg use the command:
8117
8118 ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
8119
8120 For more information about OSS see:
8121 <http://manuals.opensound.com/usersguide/dsp.html>
8122
8123 Options
8124
8125 sample_rate
8126 Set the sample rate in Hz. Default is 48000.
8127
8128 channels
8129 Set the number of channels. Default is 2.
8130
8131 pulse
8132 PulseAudio input device.
8133
8134 To enable this output device you need to configure FFmpeg with
8135 "--enable-libpulse".
8136
8137 The filename to provide to the input device is a source device or the
8138 string "default"
8139
8140 To list the PulseAudio source devices and their properties you can
8141 invoke the command pactl list sources.
8142
8143 More information about PulseAudio can be found on
8144 <http://www.pulseaudio.org>.
8145
8146 Options
8147
8148 server
8149 Connect to a specific PulseAudio server, specified by an IP
8150 address. Default server is used when not provided.
8151
8152 name
8153 Specify the application name PulseAudio will use when showing
8154 active clients, by default it is the "LIBAVFORMAT_IDENT" string.
8155
8156 stream_name
8157 Specify the stream name PulseAudio will use when showing active
8158 streams, by default it is "record".
8159
8160 sample_rate
8161 Specify the samplerate in Hz, by default 48kHz is used.
8162
8163 channels
8164 Specify the channels in use, by default 2 (stereo) is set.
8165
8166 frame_size
8167 Specify the number of bytes per frame, by default it is set to
8168 1024.
8169
8170 fragment_size
8171 Specify the minimal buffering fragment in PulseAudio, it will
8172 affect the audio latency. By default it is unset.
8173
8174 wallclock
8175 Set the initial PTS using the current time. Default is 1.
8176
8177 Examples
8178
8179 Record a stream from default device:
8180
8181 ffmpeg -f pulse -i default /tmp/pulse.wav
8182
8183 sndio
8184 sndio input device.
8185
8186 To enable this input device during configuration you need libsndio
8187 installed on your system.
8188
8189 The filename to provide to the input device is the device node
8190 representing the sndio input device, and is usually set to /dev/audio0.
8191
8192 For example to grab from /dev/audio0 using ffmpeg use the command:
8193
8194 ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
8195
8196 Options
8197
8198 sample_rate
8199 Set the sample rate in Hz. Default is 48000.
8200
8201 channels
8202 Set the number of channels. Default is 2.
8203
8204 video4linux2, v4l2
8205 Video4Linux2 input video device.
8206
8207 "v4l2" can be used as alias for "video4linux2".
8208
8209 If FFmpeg is built with v4l-utils support (by using the
8210 "--enable-libv4l2" configure option), it is possible to use it with the
8211 "-use_libv4l2" input device option.
8212
8213 The name of the device to grab is a file device node, usually Linux
8214 systems tend to automatically create such nodes when the device (e.g.
8215 an USB webcam) is plugged into the system, and has a name of the kind
8216 /dev/videoN, where N is a number associated to the device.
8217
8218 Video4Linux2 devices usually support a limited set of widthxheight
8219 sizes and frame rates. You can check which are supported using
8220 -list_formats all for Video4Linux2 devices. Some devices, like TV
8221 cards, support one or more standards. It is possible to list all the
8222 supported standards using -list_standards all.
8223
8224 The time base for the timestamps is 1 microsecond. Depending on the
8225 kernel version and configuration, the timestamps may be derived from
8226 the real time clock (origin at the Unix Epoch) or the monotonic clock
8227 (origin usually at boot time, unaffected by NTP or manual changes to
8228 the clock). The -timestamps abs or -ts abs option can be used to force
8229 conversion into the real time clock.
8230
8231 Some usage examples of the video4linux2 device with ffmpeg and ffplay:
8232
8233 • List supported formats for a video4linux2 device:
8234
8235 ffplay -f video4linux2 -list_formats all /dev/video0
8236
8237 • Grab and show the input of a video4linux2 device:
8238
8239 ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
8240
8241 • Grab and record the input of a video4linux2 device, leave the frame
8242 rate and size as previously set:
8243
8244 ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
8245
8246 For more information about Video4Linux, check <http://linuxtv.org/>.
8247
8248 Options
8249
8250 standard
8251 Set the standard. Must be the name of a supported standard. To get
8252 a list of the supported standards, use the list_standards option.
8253
8254 channel
8255 Set the input channel number. Default to -1, which means using the
8256 previously selected channel.
8257
8258 video_size
8259 Set the video frame size. The argument must be a string in the form
8260 WIDTHxHEIGHT or a valid size abbreviation.
8261
8262 pixel_format
8263 Select the pixel format (only valid for raw video input).
8264
8265 input_format
8266 Set the preferred pixel format (for raw video) or a codec name.
8267 This option allows one to select the input format, when several are
8268 available.
8269
8270 framerate
8271 Set the preferred video frame rate.
8272
8273 list_formats
8274 List available formats (supported pixel formats, codecs, and frame
8275 sizes) and exit.
8276
8277 Available values are:
8278
8279 all Show all available (compressed and non-compressed) formats.
8280
8281 raw Show only raw video (non-compressed) formats.
8282
8283 compressed
8284 Show only compressed formats.
8285
8286 list_standards
8287 List supported standards and exit.
8288
8289 Available values are:
8290
8291 all Show all supported standards.
8292
8293 timestamps, ts
8294 Set type of timestamps for grabbed frames.
8295
8296 Available values are:
8297
8298 default
8299 Use timestamps from the kernel.
8300
8301 abs Use absolute timestamps (wall clock).
8302
8303 mono2abs
8304 Force conversion from monotonic to absolute timestamps.
8305
8306 Default value is "default".
8307
8308 use_libv4l2
8309 Use libv4l2 (v4l-utils) conversion functions. Default is 0.
8310
8311 vfwcap
8312 VfW (Video for Windows) capture input device.
8313
8314 The filename passed as input is the capture driver number, ranging from
8315 0 to 9. You may use "list" as filename to print a list of drivers. Any
8316 other filename will be interpreted as device number 0.
8317
8318 Options
8319
8320 video_size
8321 Set the video frame size.
8322
8323 framerate
8324 Set the grabbing frame rate. Default value is "ntsc", corresponding
8325 to a frame rate of "30000/1001".
8326
8327 x11grab
8328 X11 video input device.
8329
8330 To enable this input device during configuration you need libxcb
8331 installed on your system. It will be automatically detected during
8332 configuration.
8333
8334 This device allows one to capture a region of an X11 display.
8335
8336 The filename passed as input has the syntax:
8337
8338 [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
8339
8340 hostname:display_number.screen_number specifies the X11 display name of
8341 the screen to grab from. hostname can be omitted, and defaults to
8342 "localhost". The environment variable DISPLAY contains the default
8343 display name.
8344
8345 x_offset and y_offset specify the offsets of the grabbed area with
8346 respect to the top-left border of the X11 screen. They default to 0.
8347
8348 Check the X11 documentation (e.g. man X) for more detailed information.
8349
8350 Use the xdpyinfo program for getting basic information about the
8351 properties of your X11 display (e.g. grep for "name" or "dimensions").
8352
8353 For example to grab from :0.0 using ffmpeg:
8354
8355 ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
8356
8357 Grab at position "10,20":
8358
8359 ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
8360
8361 Options
8362
8363 select_region
8364 Specify whether to select the grabbing area graphically using the
8365 pointer. A value of 1 prompts the user to select the grabbing area
8366 graphically by clicking and dragging. A single click with no
8367 dragging will select the whole screen. A region with zero width or
8368 height will also select the whole screen. This option overwrites
8369 the video_size, grab_x, and grab_y options. Default value is 0.
8370
8371 draw_mouse
8372 Specify whether to draw the mouse pointer. A value of 0 specifies
8373 not to draw the pointer. Default value is 1.
8374
8375 follow_mouse
8376 Make the grabbed area follow the mouse. The argument can be
8377 "centered" or a number of pixels PIXELS.
8378
8379 When it is specified with "centered", the grabbing region follows
8380 the mouse pointer and keeps the pointer at the center of region;
8381 otherwise, the region follows only when the mouse pointer reaches
8382 within PIXELS (greater than zero) to the edge of region.
8383
8384 For example:
8385
8386 ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
8387
8388 To follow only when the mouse pointer reaches within 100 pixels to
8389 edge:
8390
8391 ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
8392
8393 framerate
8394 Set the grabbing frame rate. Default value is "ntsc", corresponding
8395 to a frame rate of "30000/1001".
8396
8397 show_region
8398 Show grabbed region on screen.
8399
8400 If show_region is specified with 1, then the grabbing region will
8401 be indicated on screen. With this option, it is easy to know what
8402 is being grabbed if only a portion of the screen is grabbed.
8403
8404 region_border
8405 Set the region border thickness if -show_region 1 is used. Range
8406 is 1 to 128 and default is 3 (XCB-based x11grab only).
8407
8408 For example:
8409
8410 ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
8411
8412 With follow_mouse:
8413
8414 ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
8415
8416 window_id
8417 Grab this window, instead of the whole screen. Default value is 0,
8418 which maps to the whole screen (root window).
8419
8420 The id of a window can be found using the xwininfo program,
8421 possibly with options -tree and -root.
8422
8423 If the window is later enlarged, the new area is not recorded.
8424 Video ends when the window is closed, unmapped (i.e., iconified) or
8425 shrunk beyond the video size (which defaults to the initial window
8426 size).
8427
8428 This option disables options follow_mouse and select_region.
8429
8430 video_size
8431 Set the video frame size. Default is the full desktop or window.
8432
8433 grab_x
8434 grab_y
8435 Set the grabbing region coordinates. They are expressed as offset
8436 from the top left corner of the X11 window and correspond to the
8437 x_offset and y_offset parameters in the device name. The default
8438 value for both options is 0.
8439
8441 The audio resampler supports the following named options.
8442
8443 Options may be set by specifying -option value in the FFmpeg tools,
8444 option=value for the aresample filter, by setting the value explicitly
8445 in the "SwrContext" options or using the libavutil/opt.h API for
8446 programmatic use.
8447
8448 ich, in_channel_count
8449 Set the number of input channels. Default value is 0. Setting this
8450 value is not mandatory if the corresponding channel layout
8451 in_channel_layout is set.
8452
8453 och, out_channel_count
8454 Set the number of output channels. Default value is 0. Setting this
8455 value is not mandatory if the corresponding channel layout
8456 out_channel_layout is set.
8457
8458 uch, used_channel_count
8459 Set the number of used input channels. Default value is 0. This
8460 option is only used for special remapping.
8461
8462 isr, in_sample_rate
8463 Set the input sample rate. Default value is 0.
8464
8465 osr, out_sample_rate
8466 Set the output sample rate. Default value is 0.
8467
8468 isf, in_sample_fmt
8469 Specify the input sample format. It is set by default to "none".
8470
8471 osf, out_sample_fmt
8472 Specify the output sample format. It is set by default to "none".
8473
8474 tsf, internal_sample_fmt
8475 Set the internal sample format. Default value is "none". This will
8476 automatically be chosen when it is not explicitly set.
8477
8478 icl, in_channel_layout
8479 ocl, out_channel_layout
8480 Set the input/output channel layout.
8481
8482 See the Channel Layout section in the ffmpeg-utils(1) manual for
8483 the required syntax.
8484
8485 clev, center_mix_level
8486 Set the center mix level. It is a value expressed in deciBel, and
8487 must be in the interval [-32,32].
8488
8489 slev, surround_mix_level
8490 Set the surround mix level. It is a value expressed in deciBel, and
8491 must be in the interval [-32,32].
8492
8493 lfe_mix_level
8494 Set LFE mix into non LFE level. It is used when there is a LFE
8495 input but no LFE output. It is a value expressed in deciBel, and
8496 must be in the interval [-32,32].
8497
8498 rmvol, rematrix_volume
8499 Set rematrix volume. Default value is 1.0.
8500
8501 rematrix_maxval
8502 Set maximum output value for rematrixing. This can be used to
8503 prevent clipping vs. preventing volume reduction. A value of 1.0
8504 prevents clipping.
8505
8506 flags, swr_flags
8507 Set flags used by the converter. Default value is 0.
8508
8509 It supports the following individual flags:
8510
8511 res force resampling, this flag forces resampling to be used even
8512 when the input and output sample rates match.
8513
8514 dither_scale
8515 Set the dither scale. Default value is 1.
8516
8517 dither_method
8518 Set dither method. Default value is 0.
8519
8520 Supported values:
8521
8522 rectangular
8523 select rectangular dither
8524
8525 triangular
8526 select triangular dither
8527
8528 triangular_hp
8529 select triangular dither with high pass
8530
8531 lipshitz
8532 select Lipshitz noise shaping dither.
8533
8534 shibata
8535 select Shibata noise shaping dither.
8536
8537 low_shibata
8538 select low Shibata noise shaping dither.
8539
8540 high_shibata
8541 select high Shibata noise shaping dither.
8542
8543 f_weighted
8544 select f-weighted noise shaping dither
8545
8546 modified_e_weighted
8547 select modified-e-weighted noise shaping dither
8548
8549 improved_e_weighted
8550 select improved-e-weighted noise shaping dither
8551
8552 resampler
8553 Set resampling engine. Default value is swr.
8554
8555 Supported values:
8556
8557 swr select the native SW Resampler; filter options precision and
8558 cheby are not applicable in this case.
8559
8560 soxr
8561 select the SoX Resampler (where available); compensation, and
8562 filter options filter_size, phase_shift, exact_rational,
8563 filter_type & kaiser_beta, are not applicable in this case.
8564
8565 filter_size
8566 For swr only, set resampling filter size, default value is 32.
8567
8568 phase_shift
8569 For swr only, set resampling phase shift, default value is 10, and
8570 must be in the interval [0,30].
8571
8572 linear_interp
8573 Use linear interpolation when enabled (the default). Disable it if
8574 you want to preserve speed instead of quality when exact_rational
8575 fails.
8576
8577 exact_rational
8578 For swr only, when enabled, try to use exact phase_count based on
8579 input and output sample rate. However, if it is larger than "1 <<
8580 phase_shift", the phase_count will be "1 << phase_shift" as
8581 fallback. Default is enabled.
8582
8583 cutoff
8584 Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must
8585 be a float value between 0 and 1. Default value is 0.97 with swr,
8586 and 0.91 with soxr (which, with a sample-rate of 44100, preserves
8587 the entire audio band to 20kHz).
8588
8589 precision
8590 For soxr only, the precision in bits to which the resampled signal
8591 will be calculated. The default value of 20 (which, with suitable
8592 dithering, is appropriate for a destination bit-depth of 16) gives
8593 SoX's 'High Quality'; a value of 28 gives SoX's 'Very High
8594 Quality'.
8595
8596 cheby
8597 For soxr only, selects passband rolloff none (Chebyshev) & higher-
8598 precision approximation for 'irrational' ratios. Default value is
8599 0.
8600
8601 async
8602 For swr only, simple 1 parameter audio sync to timestamps using
8603 stretching, squeezing, filling and trimming. Setting this to 1 will
8604 enable filling and trimming, larger values represent the maximum
8605 amount in samples that the data may be stretched or squeezed for
8606 each second. Default value is 0, thus no compensation is applied
8607 to make the samples match the audio timestamps.
8608
8609 first_pts
8610 For swr only, assume the first pts should be this value. The time
8611 unit is 1 / sample rate. This allows for padding/trimming at the
8612 start of stream. By default, no assumption is made about the first
8613 frame's expected pts, so no padding or trimming is done. For
8614 example, this could be set to 0 to pad the beginning with silence
8615 if an audio stream starts after the video stream or to trim any
8616 samples with a negative pts due to encoder delay.
8617
8618 min_comp
8619 For swr only, set the minimum difference between timestamps and
8620 audio data (in seconds) to trigger stretching/squeezing/filling or
8621 trimming of the data to make it match the timestamps. The default
8622 is that stretching/squeezing/filling and trimming is disabled
8623 (min_comp = "FLT_MAX").
8624
8625 min_hard_comp
8626 For swr only, set the minimum difference between timestamps and
8627 audio data (in seconds) to trigger adding/dropping samples to make
8628 it match the timestamps. This option effectively is a threshold to
8629 select between hard (trim/fill) and soft (squeeze/stretch)
8630 compensation. Note that all compensation is by default disabled
8631 through min_comp. The default is 0.1.
8632
8633 comp_duration
8634 For swr only, set duration (in seconds) over which data is
8635 stretched/squeezed to make it match the timestamps. Must be a non-
8636 negative double float value, default value is 1.0.
8637
8638 max_soft_comp
8639 For swr only, set maximum factor by which data is
8640 stretched/squeezed to make it match the timestamps. Must be a non-
8641 negative double float value, default value is 0.
8642
8643 matrix_encoding
8644 Select matrixed stereo encoding.
8645
8646 It accepts the following values:
8647
8648 none
8649 select none
8650
8651 dolby
8652 select Dolby
8653
8654 dplii
8655 select Dolby Pro Logic II
8656
8657 Default value is "none".
8658
8659 filter_type
8660 For swr only, select resampling filter type. This only affects
8661 resampling operations.
8662
8663 It accepts the following values:
8664
8665 cubic
8666 select cubic
8667
8668 blackman_nuttall
8669 select Blackman Nuttall windowed sinc
8670
8671 kaiser
8672 select Kaiser windowed sinc
8673
8674 kaiser_beta
8675 For swr only, set Kaiser window beta value. Must be a double float
8676 value in the interval [2,16], default value is 9.
8677
8678 output_sample_bits
8679 For swr only, set number of used output sample bits for dithering.
8680 Must be an integer in the interval [0,64], default value is 0,
8681 which means it's not used.
8682
8684 The video scaler supports the following named options.
8685
8686 Options may be set by specifying -option value in the FFmpeg tools,
8687 with a few API-only exceptions noted below. For programmatic use, they
8688 can be set explicitly in the "SwsContext" options or through the
8689 libavutil/opt.h API.
8690
8691 sws_flags
8692 Set the scaler flags. This is also used to set the scaling
8693 algorithm. Only a single algorithm should be selected. Default
8694 value is bicubic.
8695
8696 It accepts the following values:
8697
8698 fast_bilinear
8699 Select fast bilinear scaling algorithm.
8700
8701 bilinear
8702 Select bilinear scaling algorithm.
8703
8704 bicubic
8705 Select bicubic scaling algorithm.
8706
8707 experimental
8708 Select experimental scaling algorithm.
8709
8710 neighbor
8711 Select nearest neighbor rescaling algorithm.
8712
8713 area
8714 Select averaging area rescaling algorithm.
8715
8716 bicublin
8717 Select bicubic scaling algorithm for the luma component,
8718 bilinear for chroma components.
8719
8720 gauss
8721 Select Gaussian rescaling algorithm.
8722
8723 sinc
8724 Select sinc rescaling algorithm.
8725
8726 lanczos
8727 Select Lanczos rescaling algorithm. The default width (alpha)
8728 is 3 and can be changed by setting "param0".
8729
8730 spline
8731 Select natural bicubic spline rescaling algorithm.
8732
8733 print_info
8734 Enable printing/debug logging.
8735
8736 accurate_rnd
8737 Enable accurate rounding.
8738
8739 full_chroma_int
8740 Enable full chroma interpolation.
8741
8742 full_chroma_inp
8743 Select full chroma input.
8744
8745 bitexact
8746 Enable bitexact output.
8747
8748 srcw (API only)
8749 Set source width.
8750
8751 srch (API only)
8752 Set source height.
8753
8754 dstw (API only)
8755 Set destination width.
8756
8757 dsth (API only)
8758 Set destination height.
8759
8760 src_format (API only)
8761 Set source pixel format (must be expressed as an integer).
8762
8763 dst_format (API only)
8764 Set destination pixel format (must be expressed as an integer).
8765
8766 src_range (boolean)
8767 If value is set to 1, indicates source is full range. Default value
8768 is 0, which indicates source is limited range.
8769
8770 dst_range (boolean)
8771 If value is set to 1, enable full range for destination. Default
8772 value is 0, which enables limited range.
8773
8774 param0, param1
8775 Set scaling algorithm parameters. The specified values are specific
8776 of some scaling algorithms and ignored by others. The specified
8777 values are floating point number values.
8778
8779 sws_dither
8780 Set the dithering algorithm. Accepts one of the following values.
8781 Default value is auto.
8782
8783 auto
8784 automatic choice
8785
8786 none
8787 no dithering
8788
8789 bayer
8790 bayer dither
8791
8792 ed error diffusion dither
8793
8794 a_dither
8795 arithmetic dither, based using addition
8796
8797 x_dither
8798 arithmetic dither, based using xor (more random/less apparent
8799 patterning that a_dither).
8800
8801 alphablend
8802 Set the alpha blending to use when the input has alpha but the
8803 output does not. Default value is none.
8804
8805 uniform_color
8806 Blend onto a uniform background color
8807
8808 checkerboard
8809 Blend onto a checkerboard
8810
8811 none
8812 No blending
8813
8815 Filtering in FFmpeg is enabled through the libavfilter library.
8816
8817 In libavfilter, a filter can have multiple inputs and multiple outputs.
8818 To illustrate the sorts of things that are possible, we consider the
8819 following filtergraph.
8820
8821 [main]
8822 input --> split ---------------------> overlay --> output
8823 | ^
8824 |[tmp] [flip]|
8825 +-----> crop --> vflip -------+
8826
8827 This filtergraph splits the input stream in two streams, then sends one
8828 stream through the crop filter and the vflip filter, before merging it
8829 back with the other stream by overlaying it on top. You can use the
8830 following command to achieve this:
8831
8832 ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
8833
8834 The result will be that the top half of the video is mirrored onto the
8835 bottom half of the output video.
8836
8837 Filters in the same linear chain are separated by commas, and distinct
8838 linear chains of filters are separated by semicolons. In our example,
8839 crop,vflip are in one linear chain, split and overlay are separately in
8840 another. The points where the linear chains join are labelled by names
8841 enclosed in square brackets. In the example, the split filter generates
8842 two outputs that are associated to the labels [main] and [tmp].
8843
8844 The stream sent to the second output of split, labelled as [tmp], is
8845 processed through the crop filter, which crops away the lower half part
8846 of the video, and then vertically flipped. The overlay filter takes in
8847 input the first unchanged output of the split filter (which was
8848 labelled as [main]), and overlay on its lower half the output generated
8849 by the crop,vflip filterchain.
8850
8851 Some filters take in input a list of parameters: they are specified
8852 after the filter name and an equal sign, and are separated from each
8853 other by a colon.
8854
8855 There exist so-called source filters that do not have an audio/video
8856 input, and sink filters that will not have audio/video output.
8857
8859 The graph2dot program included in the FFmpeg tools directory can be
8860 used to parse a filtergraph description and issue a corresponding
8861 textual representation in the dot language.
8862
8863 Invoke the command:
8864
8865 graph2dot -h
8866
8867 to see how to use graph2dot.
8868
8869 You can then pass the dot description to the dot program (from the
8870 graphviz suite of programs) and obtain a graphical representation of
8871 the filtergraph.
8872
8873 For example the sequence of commands:
8874
8875 echo <GRAPH_DESCRIPTION> | \
8876 tools/graph2dot -o graph.tmp && \
8877 dot -Tpng graph.tmp -o graph.png && \
8878 display graph.png
8879
8880 can be used to create and display an image representing the graph
8881 described by the GRAPH_DESCRIPTION string. Note that this string must
8882 be a complete self-contained graph, with its inputs and outputs
8883 explicitly defined. For example if your command line is of the form:
8884
8885 ffmpeg -i infile -vf scale=640:360 outfile
8886
8887 your GRAPH_DESCRIPTION string will need to be of the form:
8888
8889 nullsrc,scale=640:360,nullsink
8890
8891 you may also need to set the nullsrc parameters and add a format filter
8892 in order to simulate a specific input file.
8893
8895 A filtergraph is a directed graph of connected filters. It can contain
8896 cycles, and there can be multiple links between a pair of filters. Each
8897 link has one input pad on one side connecting it to one filter from
8898 which it takes its input, and one output pad on the other side
8899 connecting it to one filter accepting its output.
8900
8901 Each filter in a filtergraph is an instance of a filter class
8902 registered in the application, which defines the features and the
8903 number of input and output pads of the filter.
8904
8905 A filter with no input pads is called a "source", and a filter with no
8906 output pads is called a "sink".
8907
8908 Filtergraph syntax
8909 A filtergraph has a textual representation, which is recognized by the
8910 -filter/-vf/-af and -filter_complex options in ffmpeg and -vf/-af in
8911 ffplay, and by the "avfilter_graph_parse_ptr()" function defined in
8912 libavfilter/avfilter.h.
8913
8914 A filterchain consists of a sequence of connected filters, each one
8915 connected to the previous one in the sequence. A filterchain is
8916 represented by a list of ","-separated filter descriptions.
8917
8918 A filtergraph consists of a sequence of filterchains. A sequence of
8919 filterchains is represented by a list of ";"-separated filterchain
8920 descriptions.
8921
8922 A filter is represented by a string of the form:
8923 [in_link_1]...[in_link_N]filter_name@id=arguments[out_link_1]...[out_link_M]
8924
8925 filter_name is the name of the filter class of which the described
8926 filter is an instance of, and has to be the name of one of the filter
8927 classes registered in the program optionally followed by "@id". The
8928 name of the filter class is optionally followed by a string
8929 "=arguments".
8930
8931 arguments is a string which contains the parameters used to initialize
8932 the filter instance. It may have one of two forms:
8933
8934 • A ':'-separated list of key=value pairs.
8935
8936 • A ':'-separated list of value. In this case, the keys are assumed
8937 to be the option names in the order they are declared. E.g. the
8938 "fade" filter declares three options in this order -- type,
8939 start_frame and nb_frames. Then the parameter list in:0:30 means
8940 that the value in is assigned to the option type, 0 to start_frame
8941 and 30 to nb_frames.
8942
8943 • A ':'-separated list of mixed direct value and long key=value
8944 pairs. The direct value must precede the key=value pairs, and
8945 follow the same constraints order of the previous point. The
8946 following key=value pairs can be set in any preferred order.
8947
8948 If the option value itself is a list of items (e.g. the "format" filter
8949 takes a list of pixel formats), the items in the list are usually
8950 separated by |.
8951
8952 The list of arguments can be quoted using the character ' as initial
8953 and ending mark, and the character \ for escaping the characters within
8954 the quoted text; otherwise the argument string is considered terminated
8955 when the next special character (belonging to the set []=;,) is
8956 encountered.
8957
8958 The name and arguments of the filter are optionally preceded and
8959 followed by a list of link labels. A link label allows one to name a
8960 link and associate it to a filter output or input pad. The preceding
8961 labels in_link_1 ... in_link_N, are associated to the filter input
8962 pads, the following labels out_link_1 ... out_link_M, are associated to
8963 the output pads.
8964
8965 When two link labels with the same name are found in the filtergraph, a
8966 link between the corresponding input and output pad is created.
8967
8968 If an output pad is not labelled, it is linked by default to the first
8969 unlabelled input pad of the next filter in the filterchain. For
8970 example in the filterchain
8971
8972 nullsrc, split[L1], [L2]overlay, nullsink
8973
8974 the split filter instance has two output pads, and the overlay filter
8975 instance two input pads. The first output pad of split is labelled
8976 "L1", the first input pad of overlay is labelled "L2", and the second
8977 output pad of split is linked to the second input pad of overlay, which
8978 are both unlabelled.
8979
8980 In a filter description, if the input label of the first filter is not
8981 specified, "in" is assumed; if the output label of the last filter is
8982 not specified, "out" is assumed.
8983
8984 In a complete filterchain all the unlabelled filter input and output
8985 pads must be connected. A filtergraph is considered valid if all the
8986 filter input and output pads of all the filterchains are connected.
8987
8988 Libavfilter will automatically insert scale filters where format
8989 conversion is required. It is possible to specify swscale flags for
8990 those automatically inserted scalers by prepending "sws_flags=flags;"
8991 to the filtergraph description.
8992
8993 Here is a BNF description of the filtergraph syntax:
8994
8995 <NAME> ::= sequence of alphanumeric characters and '_'
8996 <FILTER_NAME> ::= <NAME>["@"<NAME>]
8997 <LINKLABEL> ::= "[" <NAME> "]"
8998 <LINKLABELS> ::= <LINKLABEL> [<LINKLABELS>]
8999 <FILTER_ARGUMENTS> ::= sequence of chars (possibly quoted)
9000 <FILTER> ::= [<LINKLABELS>] <FILTER_NAME> ["=" <FILTER_ARGUMENTS>] [<LINKLABELS>]
9001 <FILTERCHAIN> ::= <FILTER> [,<FILTERCHAIN>]
9002 <FILTERGRAPH> ::= [sws_flags=<flags>;] <FILTERCHAIN> [;<FILTERGRAPH>]
9003
9004 Notes on filtergraph escaping
9005 Filtergraph description composition entails several levels of escaping.
9006 See the "Quoting and escaping" section in the ffmpeg-utils(1) manual
9007 for more information about the employed escaping procedure.
9008
9009 A first level escaping affects the content of each filter option value,
9010 which may contain the special character ":" used to separate values, or
9011 one of the escaping characters "\'".
9012
9013 A second level escaping affects the whole filter description, which may
9014 contain the escaping characters "\'" or the special characters "[],;"
9015 used by the filtergraph description.
9016
9017 Finally, when you specify a filtergraph on a shell commandline, you
9018 need to perform a third level escaping for the shell special characters
9019 contained within it.
9020
9021 For example, consider the following string to be embedded in the
9022 drawtext filter description text value:
9023
9024 this is a 'string': may contain one, or more, special characters
9025
9026 This string contains the "'" special escaping character, and the ":"
9027 special character, so it needs to be escaped in this way:
9028
9029 text=this is a \'string\'\: may contain one, or more, special characters
9030
9031 A second level of escaping is required when embedding the filter
9032 description in a filtergraph description, in order to escape all the
9033 filtergraph special characters. Thus the example above becomes:
9034
9035 drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
9036
9037 (note that in addition to the "\'" escaping special characters, also
9038 "," needs to be escaped).
9039
9040 Finally an additional level of escaping is needed when writing the
9041 filtergraph description in a shell command, which depends on the
9042 escaping rules of the adopted shell. For example, assuming that "\" is
9043 special and needs to be escaped with another "\", the previous string
9044 will finally result in:
9045
9046 -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters"
9047
9049 Some filters support a generic enable option. For the filters
9050 supporting timeline editing, this option can be set to an expression
9051 which is evaluated before sending a frame to the filter. If the
9052 evaluation is non-zero, the filter will be enabled, otherwise the frame
9053 will be sent unchanged to the next filter in the filtergraph.
9054
9055 The expression accepts the following values:
9056
9057 t timestamp expressed in seconds, NAN if the input timestamp is
9058 unknown
9059
9060 n sequential number of the input frame, starting from 0
9061
9062 pos the position in the file of the input frame, NAN if unknown
9063
9064 w
9065 h width and height of the input frame if video
9066
9067 Additionally, these filters support an enable command that can be used
9068 to re-define the expression.
9069
9070 Like any other filtering option, the enable option follows the same
9071 rules.
9072
9073 For example, to enable a blur filter (smartblur) from 10 seconds to 3
9074 minutes, and a curves filter starting at 3 seconds:
9075
9076 smartblur = enable='between(t,10,3*60)',
9077 curves = enable='gte(t,3)' : preset=cross_process
9078
9079 See "ffmpeg -filters" to view which filters have timeline support.
9080
9082 Some options can be changed during the operation of the filter using a
9083 command. These options are marked 'T' on the output of ffmpeg -h
9084 filter=<name of filter>. The name of the command is the name of the
9085 option and the argument is the new value.
9086
9088 Some filters with several inputs support a common set of options.
9089 These options can only be set by name, not with the short notation.
9090
9091 eof_action
9092 The action to take when EOF is encountered on the secondary input;
9093 it accepts one of the following values:
9094
9095 repeat
9096 Repeat the last frame (the default).
9097
9098 endall
9099 End both streams.
9100
9101 pass
9102 Pass the main input through.
9103
9104 shortest
9105 If set to 1, force the output to terminate when the shortest input
9106 terminates. Default value is 0.
9107
9108 repeatlast
9109 If set to 1, force the filter to extend the last frame of secondary
9110 streams until the end of the primary stream. A value of 0 disables
9111 this behavior. Default value is 1.
9112
9114 When you configure your FFmpeg build, you can disable any of the
9115 existing filters using "--disable-filters". The configure output will
9116 show the audio filters included in your build.
9117
9118 Below is a description of the currently available audio filters.
9119
9120 acompressor
9121 A compressor is mainly used to reduce the dynamic range of a signal.
9122 Especially modern music is mostly compressed at a high ratio to improve
9123 the overall loudness. It's done to get the highest attention of a
9124 listener, "fatten" the sound and bring more "power" to the track. If a
9125 signal is compressed too much it may sound dull or "dead" afterwards or
9126 it may start to "pump" (which could be a powerful effect but can also
9127 destroy a track completely). The right compression is the key to reach
9128 a professional sound and is the high art of mixing and mastering.
9129 Because of its complex settings it may take a long time to get the
9130 right feeling for this kind of effect.
9131
9132 Compression is done by detecting the volume above a chosen level
9133 "threshold" and dividing it by the factor set with "ratio". So if you
9134 set the threshold to -12dB and your signal reaches -6dB a ratio of 2:1
9135 will result in a signal at -9dB. Because an exact manipulation of the
9136 signal would cause distortion of the waveform the reduction can be
9137 levelled over the time. This is done by setting "Attack" and "Release".
9138 "attack" determines how long the signal has to rise above the threshold
9139 before any reduction will occur and "release" sets the time the signal
9140 has to fall below the threshold to reduce the reduction again. Shorter
9141 signals than the chosen attack time will be left untouched. The
9142 overall reduction of the signal can be made up afterwards with the
9143 "makeup" setting. So compressing the peaks of a signal about 6dB and
9144 raising the makeup to this level results in a signal twice as loud than
9145 the source. To gain a softer entry in the compression the "knee"
9146 flattens the hard edge at the threshold in the range of the chosen
9147 decibels.
9148
9149 The filter accepts the following options:
9150
9151 level_in
9152 Set input gain. Default is 1. Range is between 0.015625 and 64.
9153
9154 mode
9155 Set mode of compressor operation. Can be "upward" or "downward".
9156 Default is "downward".
9157
9158 threshold
9159 If a signal of stream rises above this level it will affect the
9160 gain reduction. By default it is 0.125. Range is between
9161 0.00097563 and 1.
9162
9163 ratio
9164 Set a ratio by which the signal is reduced. 1:2 means that if the
9165 level rose 4dB above the threshold, it will be only 2dB above after
9166 the reduction. Default is 2. Range is between 1 and 20.
9167
9168 attack
9169 Amount of milliseconds the signal has to rise above the threshold
9170 before gain reduction starts. Default is 20. Range is between 0.01
9171 and 2000.
9172
9173 release
9174 Amount of milliseconds the signal has to fall below the threshold
9175 before reduction is decreased again. Default is 250. Range is
9176 between 0.01 and 9000.
9177
9178 makeup
9179 Set the amount by how much signal will be amplified after
9180 processing. Default is 1. Range is from 1 to 64.
9181
9182 knee
9183 Curve the sharp knee around the threshold to enter gain reduction
9184 more softly. Default is 2.82843. Range is between 1 and 8.
9185
9186 link
9187 Choose if the "average" level between all channels of input stream
9188 or the louder("maximum") channel of input stream affects the
9189 reduction. Default is "average".
9190
9191 detection
9192 Should the exact signal be taken in case of "peak" or an RMS one in
9193 case of "rms". Default is "rms" which is mostly smoother.
9194
9195 mix How much to use compressed signal in output. Default is 1. Range
9196 is between 0 and 1.
9197
9198 Commands
9199
9200 This filter supports the all above options as commands.
9201
9202 acontrast
9203 Simple audio dynamic range compression/expansion filter.
9204
9205 The filter accepts the following options:
9206
9207 contrast
9208 Set contrast. Default is 33. Allowed range is between 0 and 100.
9209
9210 acopy
9211 Copy the input audio source unchanged to the output. This is mainly
9212 useful for testing purposes.
9213
9214 acrossfade
9215 Apply cross fade from one input audio stream to another input audio
9216 stream. The cross fade is applied for specified duration near the end
9217 of first stream.
9218
9219 The filter accepts the following options:
9220
9221 nb_samples, ns
9222 Specify the number of samples for which the cross fade effect has
9223 to last. At the end of the cross fade effect the first input audio
9224 will be completely silent. Default is 44100.
9225
9226 duration, d
9227 Specify the duration of the cross fade effect. See the Time
9228 duration section in the ffmpeg-utils(1) manual for the accepted
9229 syntax. By default the duration is determined by nb_samples. If
9230 set this option is used instead of nb_samples.
9231
9232 overlap, o
9233 Should first stream end overlap with second stream start. Default
9234 is enabled.
9235
9236 curve1
9237 Set curve for cross fade transition for first stream.
9238
9239 curve2
9240 Set curve for cross fade transition for second stream.
9241
9242 For description of available curve types see afade filter
9243 description.
9244
9245 Examples
9246
9247 • Cross fade from one input to another:
9248
9249 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
9250
9251 • Cross fade from one input to another but without overlapping:
9252
9253 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
9254
9255 acrossover
9256 Split audio stream into several bands.
9257
9258 This filter splits audio stream into two or more frequency ranges.
9259 Summing all streams back will give flat output.
9260
9261 The filter accepts the following options:
9262
9263 split
9264 Set split frequencies. Those must be positive and increasing.
9265
9266 order
9267 Set filter order for each band split. This controls filter roll-off
9268 or steepness of filter transfer function. Available values are:
9269
9270 2nd 12 dB per octave.
9271
9272 4th 24 dB per octave.
9273
9274 6th 36 dB per octave.
9275
9276 8th 48 dB per octave.
9277
9278 10th
9279 60 dB per octave.
9280
9281 12th
9282 72 dB per octave.
9283
9284 14th
9285 84 dB per octave.
9286
9287 16th
9288 96 dB per octave.
9289
9290 18th
9291 108 dB per octave.
9292
9293 20th
9294 120 dB per octave.
9295
9296 Default is 4th.
9297
9298 level
9299 Set input gain level. Allowed range is from 0 to 1. Default value
9300 is 1.
9301
9302 gains
9303 Set output gain for each band. Default value is 1 for all bands.
9304
9305 Examples
9306
9307 • Split input audio stream into two bands (low and high) with split
9308 frequency of 1500 Hz, each band will be in separate stream:
9309
9310 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
9311
9312 • Same as above, but with higher filter order:
9313
9314 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
9315
9316 • Same as above, but also with additional middle band (frequencies
9317 between 1500 and 8000):
9318
9319 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500 8000:order=8th[LOW][MID][HIGH]' -map '[LOW]' low.wav -map '[MID]' mid.wav -map '[HIGH]' high.wav
9320
9321 acrusher
9322 Reduce audio bit resolution.
9323
9324 This filter is bit crusher with enhanced functionality. A bit crusher
9325 is used to audibly reduce number of bits an audio signal is sampled
9326 with. This doesn't change the bit depth at all, it just produces the
9327 effect. Material reduced in bit depth sounds more harsh and "digital".
9328 This filter is able to even round to continuous values instead of
9329 discrete bit depths. Additionally it has a D/C offset which results in
9330 different crushing of the lower and the upper half of the signal. An
9331 Anti-Aliasing setting is able to produce "softer" crushing sounds.
9332
9333 Another feature of this filter is the logarithmic mode. This setting
9334 switches from linear distances between bits to logarithmic ones. The
9335 result is a much more "natural" sounding crusher which doesn't gate low
9336 signals for example. The human ear has a logarithmic perception, so
9337 this kind of crushing is much more pleasant. Logarithmic crushing is
9338 also able to get anti-aliased.
9339
9340 The filter accepts the following options:
9341
9342 level_in
9343 Set level in.
9344
9345 level_out
9346 Set level out.
9347
9348 bits
9349 Set bit reduction.
9350
9351 mix Set mixing amount.
9352
9353 mode
9354 Can be linear: "lin" or logarithmic: "log".
9355
9356 dc Set DC.
9357
9358 aa Set anti-aliasing.
9359
9360 samples
9361 Set sample reduction.
9362
9363 lfo Enable LFO. By default disabled.
9364
9365 lforange
9366 Set LFO range.
9367
9368 lforate
9369 Set LFO rate.
9370
9371 Commands
9372
9373 This filter supports the all above options as commands.
9374
9375 acue
9376 Delay audio filtering until a given wallclock timestamp. See the cue
9377 filter.
9378
9379 adeclick
9380 Remove impulsive noise from input audio.
9381
9382 Samples detected as impulsive noise are replaced by interpolated
9383 samples using autoregressive modelling.
9384
9385 window, w
9386 Set window size, in milliseconds. Allowed range is from 10 to 100.
9387 Default value is 55 milliseconds. This sets size of window which
9388 will be processed at once.
9389
9390 overlap, o
9391 Set window overlap, in percentage of window size. Allowed range is
9392 from 50 to 95. Default value is 75 percent. Setting this to a very
9393 high value increases impulsive noise removal but makes whole
9394 process much slower.
9395
9396 arorder, a
9397 Set autoregression order, in percentage of window size. Allowed
9398 range is from 0 to 25. Default value is 2 percent. This option also
9399 controls quality of interpolated samples using neighbour good
9400 samples.
9401
9402 threshold, t
9403 Set threshold value. Allowed range is from 1 to 100. Default value
9404 is 2. This controls the strength of impulsive noise which is going
9405 to be removed. The lower value, the more samples will be detected
9406 as impulsive noise.
9407
9408 burst, b
9409 Set burst fusion, in percentage of window size. Allowed range is 0
9410 to 10. Default value is 2. If any two samples detected as noise
9411 are spaced less than this value then any sample between those two
9412 samples will be also detected as noise.
9413
9414 method, m
9415 Set overlap method.
9416
9417 It accepts the following values:
9418
9419 add, a
9420 Select overlap-add method. Even not interpolated samples are
9421 slightly changed with this method.
9422
9423 save, s
9424 Select overlap-save method. Not interpolated samples remain
9425 unchanged.
9426
9427 Default value is "a".
9428
9429 adeclip
9430 Remove clipped samples from input audio.
9431
9432 Samples detected as clipped are replaced by interpolated samples using
9433 autoregressive modelling.
9434
9435 window, w
9436 Set window size, in milliseconds. Allowed range is from 10 to 100.
9437 Default value is 55 milliseconds. This sets size of window which
9438 will be processed at once.
9439
9440 overlap, o
9441 Set window overlap, in percentage of window size. Allowed range is
9442 from 50 to 95. Default value is 75 percent.
9443
9444 arorder, a
9445 Set autoregression order, in percentage of window size. Allowed
9446 range is from 0 to 25. Default value is 8 percent. This option also
9447 controls quality of interpolated samples using neighbour good
9448 samples.
9449
9450 threshold, t
9451 Set threshold value. Allowed range is from 1 to 100. Default value
9452 is 10. Higher values make clip detection less aggressive.
9453
9454 hsize, n
9455 Set size of histogram used to detect clips. Allowed range is from
9456 100 to 9999. Default value is 1000. Higher values make clip
9457 detection less aggressive.
9458
9459 method, m
9460 Set overlap method.
9461
9462 It accepts the following values:
9463
9464 add, a
9465 Select overlap-add method. Even not interpolated samples are
9466 slightly changed with this method.
9467
9468 save, s
9469 Select overlap-save method. Not interpolated samples remain
9470 unchanged.
9471
9472 Default value is "a".
9473
9474 adecorrelate
9475 Apply decorrelation to input audio stream.
9476
9477 The filter accepts the following options:
9478
9479 stages
9480 Set decorrelation stages of filtering. Allowed range is from 1 to
9481 16. Default value is 6.
9482
9483 seed
9484 Set random seed used for setting delay in samples across channels.
9485
9486 adelay
9487 Delay one or more audio channels.
9488
9489 Samples in delayed channel are filled with silence.
9490
9491 The filter accepts the following option:
9492
9493 delays
9494 Set list of delays in milliseconds for each channel separated by
9495 '|'. Unused delays will be silently ignored. If number of given
9496 delays is smaller than number of channels all remaining channels
9497 will not be delayed. If you want to delay exact number of samples,
9498 append 'S' to number. If you want instead to delay in seconds,
9499 append 's' to number.
9500
9501 all Use last set delay for all remaining channels. By default is
9502 disabled. This option if enabled changes how option "delays" is
9503 interpreted.
9504
9505 Examples
9506
9507 • Delay first channel by 1.5 seconds, the third channel by 0.5
9508 seconds and leave the second channel (and any other channels that
9509 may be present) unchanged.
9510
9511 adelay=1500|0|500
9512
9513 • Delay second channel by 500 samples, the third channel by 700
9514 samples and leave the first channel (and any other channels that
9515 may be present) unchanged.
9516
9517 adelay=0|500S|700S
9518
9519 • Delay all channels by same number of samples:
9520
9521 adelay=delays=64S:all=1
9522
9523 adenorm
9524 Remedy denormals in audio by adding extremely low-level noise.
9525
9526 This filter shall be placed before any filter that can produce
9527 denormals.
9528
9529 A description of the accepted parameters follows.
9530
9531 level
9532 Set level of added noise in dB. Default is "-351". Allowed range
9533 is from -451 to -90.
9534
9535 type
9536 Set type of added noise.
9537
9538 dc Add DC signal.
9539
9540 ac Add AC signal.
9541
9542 square
9543 Add square signal.
9544
9545 pulse
9546 Add pulse signal.
9547
9548 Default is "dc".
9549
9550 Commands
9551
9552 This filter supports the all above options as commands.
9553
9554 aderivative, aintegral
9555 Compute derivative/integral of audio stream.
9556
9557 Applying both filters one after another produces original audio.
9558
9559 adynamicequalizer
9560 Apply dynamic equalization to input audio stream.
9561
9562 A description of the accepted options follows.
9563
9564 threshold
9565 Set the detection threshold used to trigger equalization.
9566 Threshold detection is using bandpass filter. Default value is 0.
9567 Allowed range is from 0 to 100.
9568
9569 dfrequency
9570 Set the detection frequency in Hz used for bandpass filter used to
9571 trigger equalization. Default value is 1000 Hz. Allowed range is
9572 between 2 and 1000000 Hz.
9573
9574 dqfactor
9575 Set the detection resonance factor for bandpass filter used to
9576 trigger equalization. Default value is 1. Allowed range is from
9577 0.001 to 1000.
9578
9579 tfrequency
9580 Set the target frequency of equalization filter. Default value is
9581 1000 Hz. Allowed range is between 2 and 1000000 Hz.
9582
9583 tqfactor
9584 Set the target resonance factor for target equalization filter.
9585 Default value is 1. Allowed range is from 0.001 to 1000.
9586
9587 attack
9588 Set the amount of milliseconds the signal from detection has to
9589 rise above the detection threshold before equalization starts.
9590 Default is 20. Allowed range is between 1 and 2000.
9591
9592 release
9593 Set the amount of milliseconds the signal from detection has to
9594 fall below the detection threshold before equalization ends.
9595 Default is 200. Allowed range is between 1 and 2000.
9596
9597 knee
9598 Curve the sharp knee around the detection threshold to calculate
9599 equalization gain more softly. Default is 1. Allowed range is
9600 between 0 and 8.
9601
9602 ratio
9603 Set the ratio by which the equalization gain is raised. Default is
9604 1. Allowed range is between 1 and 20.
9605
9606 makeup
9607 Set the makeup offset in dB by which the equalization gain is
9608 raised. Default is 0. Allowed range is between 0 and 30.
9609
9610 range
9611 Set the max allowed cut/boost amount in dB. Default is 0. Allowed
9612 range is from 0 to 200.
9613
9614 slew
9615 Set the slew factor. Default is 1. Allowed range is from 1 to 200.
9616
9617 mode
9618 Set the mode of filter operation, can be one of the following:
9619
9620 listen
9621 Output only isolated bandpass signal.
9622
9623 cut Cut frequencies above detection threshold.
9624
9625 boost
9626 Boost frequencies bellow detection threshold.
9627
9628 Default mode is cut.
9629
9630 Commands
9631
9632 This filter supports the all above options as commands.
9633
9634 adynamicsmooth
9635 Apply dynamic smoothing to input audio stream.
9636
9637 A description of the accepted options follows.
9638
9639 sensitivity
9640 Set an amount of sensitivity to frequency fluctations. Default is
9641 2. Allowed range is from 0 to 1e+06.
9642
9643 basefreq
9644 Set a base frequency for smoothing. Default value is 22050.
9645 Allowed range is from 2 to 1e+06.
9646
9647 Commands
9648
9649 This filter supports the all above options as commands.
9650
9651 aecho
9652 Apply echoing to the input audio.
9653
9654 Echoes are reflected sound and can occur naturally amongst mountains
9655 (and sometimes large buildings) when talking or shouting; digital echo
9656 effects emulate this behaviour and are often used to help fill out the
9657 sound of a single instrument or vocal. The time difference between the
9658 original signal and the reflection is the "delay", and the loudness of
9659 the reflected signal is the "decay". Multiple echoes can have
9660 different delays and decays.
9661
9662 A description of the accepted parameters follows.
9663
9664 in_gain
9665 Set input gain of reflected signal. Default is 0.6.
9666
9667 out_gain
9668 Set output gain of reflected signal. Default is 0.3.
9669
9670 delays
9671 Set list of time intervals in milliseconds between original signal
9672 and reflections separated by '|'. Allowed range for each "delay" is
9673 "(0 - 90000.0]". Default is 1000.
9674
9675 decays
9676 Set list of loudness of reflected signals separated by '|'.
9677 Allowed range for each "decay" is "(0 - 1.0]". Default is 0.5.
9678
9679 Examples
9680
9681 • Make it sound as if there are twice as many instruments as are
9682 actually playing:
9683
9684 aecho=0.8:0.88:60:0.4
9685
9686 • If delay is very short, then it sounds like a (metallic) robot
9687 playing music:
9688
9689 aecho=0.8:0.88:6:0.4
9690
9691 • A longer delay will sound like an open air concert in the
9692 mountains:
9693
9694 aecho=0.8:0.9:1000:0.3
9695
9696 • Same as above but with one more mountain:
9697
9698 aecho=0.8:0.9:1000|1800:0.3|0.25
9699
9700 aemphasis
9701 Audio emphasis filter creates or restores material directly taken from
9702 LPs or emphased CDs with different filter curves. E.g. to store music
9703 on vinyl the signal has to be altered by a filter first to even out the
9704 disadvantages of this recording medium. Once the material is played
9705 back the inverse filter has to be applied to restore the distortion of
9706 the frequency response.
9707
9708 The filter accepts the following options:
9709
9710 level_in
9711 Set input gain.
9712
9713 level_out
9714 Set output gain.
9715
9716 mode
9717 Set filter mode. For restoring material use "reproduction" mode,
9718 otherwise use "production" mode. Default is "reproduction" mode.
9719
9720 type
9721 Set filter type. Selects medium. Can be one of the following:
9722
9723 col select Columbia.
9724
9725 emi select EMI.
9726
9727 bsi select BSI (78RPM).
9728
9729 riaa
9730 select RIAA.
9731
9732 cd select Compact Disc (CD).
9733
9734 50fm
9735 select 50Xs (FM).
9736
9737 75fm
9738 select 75Xs (FM).
9739
9740 50kf
9741 select 50Xs (FM-KF).
9742
9743 75kf
9744 select 75Xs (FM-KF).
9745
9746 Commands
9747
9748 This filter supports the all above options as commands.
9749
9750 aeval
9751 Modify an audio signal according to the specified expressions.
9752
9753 This filter accepts one or more expressions (one for each channel),
9754 which are evaluated and used to modify a corresponding audio signal.
9755
9756 It accepts the following parameters:
9757
9758 exprs
9759 Set the '|'-separated expressions list for each separate channel.
9760 If the number of input channels is greater than the number of
9761 expressions, the last specified expression is used for the
9762 remaining output channels.
9763
9764 channel_layout, c
9765 Set output channel layout. If not specified, the channel layout is
9766 specified by the number of expressions. If set to same, it will use
9767 by default the same input channel layout.
9768
9769 Each expression in exprs can contain the following constants and
9770 functions:
9771
9772 ch channel number of the current expression
9773
9774 n number of the evaluated sample, starting from 0
9775
9776 s sample rate
9777
9778 t time of the evaluated sample expressed in seconds
9779
9780 nb_in_channels
9781 nb_out_channels
9782 input and output number of channels
9783
9784 val(CH)
9785 the value of input channel with number CH
9786
9787 Note: this filter is slow. For faster processing you should use a
9788 dedicated filter.
9789
9790 Examples
9791
9792 • Half volume:
9793
9794 aeval=val(ch)/2:c=same
9795
9796 • Invert phase of the second channel:
9797
9798 aeval=val(0)|-val(1)
9799
9800 aexciter
9801 An exciter is used to produce high sound that is not present in the
9802 original signal. This is done by creating harmonic distortions of the
9803 signal which are restricted in range and added to the original signal.
9804 An Exciter raises the upper end of an audio signal without simply
9805 raising the higher frequencies like an equalizer would do to create a
9806 more "crisp" or "brilliant" sound.
9807
9808 The filter accepts the following options:
9809
9810 level_in
9811 Set input level prior processing of signal. Allowed range is from
9812 0 to 64. Default value is 1.
9813
9814 level_out
9815 Set output level after processing of signal. Allowed range is from
9816 0 to 64. Default value is 1.
9817
9818 amount
9819 Set the amount of harmonics added to original signal. Allowed
9820 range is from 0 to 64. Default value is 1.
9821
9822 drive
9823 Set the amount of newly created harmonics. Allowed range is from
9824 0.1 to 10. Default value is 8.5.
9825
9826 blend
9827 Set the octave of newly created harmonics. Allowed range is from
9828 -10 to 10. Default value is 0.
9829
9830 freq
9831 Set the lower frequency limit of producing harmonics in Hz.
9832 Allowed range is from 2000 to 12000 Hz. Default is 7500 Hz.
9833
9834 ceil
9835 Set the upper frequency limit of producing harmonics. Allowed
9836 range is from 9999 to 20000 Hz. If value is lower than 10000 Hz no
9837 limit is applied.
9838
9839 listen
9840 Mute the original signal and output only added harmonics. By
9841 default is disabled.
9842
9843 Commands
9844
9845 This filter supports the all above options as commands.
9846
9847 afade
9848 Apply fade-in/out effect to input audio.
9849
9850 A description of the accepted parameters follows.
9851
9852 type, t
9853 Specify the effect type, can be either "in" for fade-in, or "out"
9854 for a fade-out effect. Default is "in".
9855
9856 start_sample, ss
9857 Specify the number of the start sample for starting to apply the
9858 fade effect. Default is 0.
9859
9860 nb_samples, ns
9861 Specify the number of samples for which the fade effect has to
9862 last. At the end of the fade-in effect the output audio will have
9863 the same volume as the input audio, at the end of the fade-out
9864 transition the output audio will be silence. Default is 44100.
9865
9866 start_time, st
9867 Specify the start time of the fade effect. Default is 0. The value
9868 must be specified as a time duration; see the Time duration section
9869 in the ffmpeg-utils(1) manual for the accepted syntax. If set this
9870 option is used instead of start_sample.
9871
9872 duration, d
9873 Specify the duration of the fade effect. See the Time duration
9874 section in the ffmpeg-utils(1) manual for the accepted syntax. At
9875 the end of the fade-in effect the output audio will have the same
9876 volume as the input audio, at the end of the fade-out transition
9877 the output audio will be silence. By default the duration is
9878 determined by nb_samples. If set this option is used instead of
9879 nb_samples.
9880
9881 curve
9882 Set curve for fade transition.
9883
9884 It accepts the following values:
9885
9886 tri select triangular, linear slope (default)
9887
9888 qsin
9889 select quarter of sine wave
9890
9891 hsin
9892 select half of sine wave
9893
9894 esin
9895 select exponential sine wave
9896
9897 log select logarithmic
9898
9899 ipar
9900 select inverted parabola
9901
9902 qua select quadratic
9903
9904 cub select cubic
9905
9906 squ select square root
9907
9908 cbr select cubic root
9909
9910 par select parabola
9911
9912 exp select exponential
9913
9914 iqsin
9915 select inverted quarter of sine wave
9916
9917 ihsin
9918 select inverted half of sine wave
9919
9920 dese
9921 select double-exponential seat
9922
9923 desi
9924 select double-exponential sigmoid
9925
9926 losi
9927 select logistic sigmoid
9928
9929 sinc
9930 select sine cardinal function
9931
9932 isinc
9933 select inverted sine cardinal function
9934
9935 nofade
9936 no fade applied
9937
9938 Commands
9939
9940 This filter supports the all above options as commands.
9941
9942 Examples
9943
9944 • Fade in first 15 seconds of audio:
9945
9946 afade=t=in:ss=0:d=15
9947
9948 • Fade out last 25 seconds of a 900 seconds audio:
9949
9950 afade=t=out:st=875:d=25
9951
9952 afftdn
9953 Denoise audio samples with FFT.
9954
9955 A description of the accepted parameters follows.
9956
9957 nr Set the noise reduction in dB, allowed range is 0.01 to 97.
9958 Default value is 12 dB.
9959
9960 nf Set the noise floor in dB, allowed range is -80 to -20. Default
9961 value is -50 dB.
9962
9963 nt Set the noise type.
9964
9965 It accepts the following values:
9966
9967 w Select white noise.
9968
9969 v Select vinyl noise.
9970
9971 s Select shellac noise.
9972
9973 c Select custom noise, defined in "bn" option.
9974
9975 Default value is white noise.
9976
9977 bn Set custom band noise for every one of 15 bands. Bands are
9978 separated by ' ' or '|'.
9979
9980 rf Set the residual floor in dB, allowed range is -80 to -20. Default
9981 value is -38 dB.
9982
9983 tn Enable noise tracking. By default is disabled. With this enabled,
9984 noise floor is automatically adjusted.
9985
9986 tr Enable residual tracking. By default is disabled.
9987
9988 om Set the output mode.
9989
9990 It accepts the following values:
9991
9992 i Pass input unchanged.
9993
9994 o Pass noise filtered out.
9995
9996 n Pass only noise.
9997
9998 Default value is o.
9999
10000 Commands
10001
10002 This filter supports the following commands:
10003
10004 sample_noise, sn
10005 Start or stop measuring noise profile. Syntax for the command is :
10006 "start" or "stop" string. After measuring noise profile is stopped
10007 it will be automatically applied in filtering.
10008
10009 noise_reduction, nr
10010 Change noise reduction. Argument is single float number. Syntax
10011 for the command is : "noise_reduction"
10012
10013 noise_floor, nf
10014 Change noise floor. Argument is single float number. Syntax for
10015 the command is : "noise_floor"
10016
10017 output_mode, om
10018 Change output mode operation. Syntax for the command is : "i", "o"
10019 or "n" string.
10020
10021 afftfilt
10022 Apply arbitrary expressions to samples in frequency domain.
10023
10024 real
10025 Set frequency domain real expression for each separate channel
10026 separated by '|'. Default is "re". If the number of input channels
10027 is greater than the number of expressions, the last specified
10028 expression is used for the remaining output channels.
10029
10030 imag
10031 Set frequency domain imaginary expression for each separate channel
10032 separated by '|'. Default is "im".
10033
10034 Each expression in real and imag can contain the following
10035 constants and functions:
10036
10037 sr sample rate
10038
10039 b current frequency bin number
10040
10041 nb number of available bins
10042
10043 ch channel number of the current expression
10044
10045 chs number of channels
10046
10047 pts current frame pts
10048
10049 re current real part of frequency bin of current channel
10050
10051 im current imaginary part of frequency bin of current channel
10052
10053 real(b, ch)
10054 Return the value of real part of frequency bin at location
10055 (bin,channel)
10056
10057 imag(b, ch)
10058 Return the value of imaginary part of frequency bin at location
10059 (bin,channel)
10060
10061 win_size
10062 Set window size. Allowed range is from 16 to 131072. Default is
10063 4096
10064
10065 win_func
10066 Set window function.
10067
10068 It accepts the following values:
10069
10070 rect
10071 bartlett
10072 hann, hanning
10073 hamming
10074 blackman
10075 welch
10076 flattop
10077 bharris
10078 bnuttall
10079 bhann
10080 sine
10081 nuttall
10082 lanczos
10083 gauss
10084 tukey
10085 dolph
10086 cauchy
10087 parzen
10088 poisson
10089 bohman
10090
10091 Default is "hann".
10092
10093 overlap
10094 Set window overlap. If set to 1, the recommended overlap for
10095 selected window function will be picked. Default is 0.75.
10096
10097 Examples
10098
10099 • Leave almost only low frequencies in audio:
10100
10101 afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'"
10102
10103 • Apply robotize effect:
10104
10105 afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75"
10106
10107 • Apply whisper effect:
10108
10109 afftfilt="real='hypot(re,im)*cos((random(0)*2-1)*2*3.14)':imag='hypot(re,im)*sin((random(1)*2-1)*2*3.14)':win_size=128:overlap=0.8"
10110
10111 afir
10112 Apply an arbitrary Finite Impulse Response filter.
10113
10114 This filter is designed for applying long FIR filters, up to 60 seconds
10115 long.
10116
10117 It can be used as component for digital crossover filters, room
10118 equalization, cross talk cancellation, wavefield synthesis,
10119 auralization, ambiophonics, ambisonics and spatialization.
10120
10121 This filter uses the streams higher than first one as FIR coefficients.
10122 If the non-first stream holds a single channel, it will be used for all
10123 input channels in the first stream, otherwise the number of channels in
10124 the non-first stream must be same as the number of channels in the
10125 first stream.
10126
10127 It accepts the following parameters:
10128
10129 dry Set dry gain. This sets input gain.
10130
10131 wet Set wet gain. This sets final output gain.
10132
10133 length
10134 Set Impulse Response filter length. Default is 1, which means whole
10135 IR is processed.
10136
10137 gtype
10138 Enable applying gain measured from power of IR.
10139
10140 Set which approach to use for auto gain measurement.
10141
10142 none
10143 Do not apply any gain.
10144
10145 peak
10146 select peak gain, very conservative approach. This is default
10147 value.
10148
10149 dc select DC gain, limited application.
10150
10151 gn select gain to noise approach, this is most popular one.
10152
10153 irgain
10154 Set gain to be applied to IR coefficients before filtering.
10155 Allowed range is 0 to 1. This gain is applied after any gain
10156 applied with gtype option.
10157
10158 irfmt
10159 Set format of IR stream. Can be "mono" or "input". Default is
10160 "input".
10161
10162 maxir
10163 Set max allowed Impulse Response filter duration in seconds.
10164 Default is 30 seconds. Allowed range is 0.1 to 60 seconds.
10165
10166 response
10167 Show IR frequency response, magnitude(magenta), phase(green) and
10168 group delay(yellow) in additional video stream. By default it is
10169 disabled.
10170
10171 channel
10172 Set for which IR channel to display frequency response. By default
10173 is first channel displayed. This option is used only when response
10174 is enabled.
10175
10176 size
10177 Set video stream size. This option is used only when response is
10178 enabled.
10179
10180 rate
10181 Set video stream frame rate. This option is used only when response
10182 is enabled.
10183
10184 minp
10185 Set minimal partition size used for convolution. Default is 8192.
10186 Allowed range is from 1 to 32768. Lower values decreases latency
10187 at cost of higher CPU usage.
10188
10189 maxp
10190 Set maximal partition size used for convolution. Default is 8192.
10191 Allowed range is from 8 to 32768. Lower values may increase CPU
10192 usage.
10193
10194 nbirs
10195 Set number of input impulse responses streams which will be
10196 switchable at runtime. Allowed range is from 1 to 32. Default is
10197 1.
10198
10199 ir Set IR stream which will be used for convolution, starting from 0,
10200 should always be lower than supplied value by "nbirs" option.
10201 Default is 0. This option can be changed at runtime via commands.
10202
10203 Examples
10204
10205 • Apply reverb to stream using mono IR file as second input, complete
10206 command using ffmpeg:
10207
10208 ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
10209
10210 aformat
10211 Set output format constraints for the input audio. The framework will
10212 negotiate the most appropriate format to minimize conversions.
10213
10214 It accepts the following parameters:
10215
10216 sample_fmts, f
10217 A '|'-separated list of requested sample formats.
10218
10219 sample_rates, r
10220 A '|'-separated list of requested sample rates.
10221
10222 channel_layouts, cl
10223 A '|'-separated list of requested channel layouts.
10224
10225 See the Channel Layout section in the ffmpeg-utils(1) manual for
10226 the required syntax.
10227
10228 If a parameter is omitted, all values are allowed.
10229
10230 Force the output to either unsigned 8-bit or signed 16-bit stereo
10231
10232 aformat=sample_fmts=u8|s16:channel_layouts=stereo
10233
10234 afreqshift
10235 Apply frequency shift to input audio samples.
10236
10237 The filter accepts the following options:
10238
10239 shift
10240 Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
10241 Default value is 0.0.
10242
10243 level
10244 Set output gain applied to final output. Allowed range is from 0.0
10245 to 1.0. Default value is 1.0.
10246
10247 order
10248 Set filter order used for filtering. Allowed range is from 1 to 16.
10249 Default value is 8.
10250
10251 Commands
10252
10253 This filter supports the all above options as commands.
10254
10255 afwtdn
10256 Reduce broadband noise from input samples using Wavelets.
10257
10258 A description of the accepted options follows.
10259
10260 sigma
10261 Set the noise sigma, allowed range is from 0 to 1. Default value
10262 is 0. This option controls strength of denoising applied to input
10263 samples. Most useful way to set this option is via decibels, eg.
10264 -45dB.
10265
10266 levels
10267 Set the number of wavelet levels of decomposition. Allowed range
10268 is from 1 to 12. Default value is 10. Setting this too low make
10269 denoising performance very poor.
10270
10271 wavet
10272 Set wavelet type for decomposition of input frame. They are sorted
10273 by number of coefficients, from lowest to highest. More
10274 coefficients means worse filtering speed, but overall better
10275 quality. Available wavelets are:
10276
10277 sym2
10278 sym4
10279 rbior68
10280 deb10
10281 sym10
10282 coif5
10283 bl3
10284 percent
10285 Set percent of full denoising. Allowed range is from 0 to 100
10286 percent. Default value is 85 percent or partial denoising.
10287
10288 profile
10289 If enabled, first input frame will be used as noise profile. If
10290 first frame samples contain non-noise performance will be very
10291 poor.
10292
10293 adaptive
10294 If enabled, input frames are analyzed for presence of noise. If
10295 noise is detected with high possibility then input frame profile
10296 will be used for processing following frames, until new noise frame
10297 is detected.
10298
10299 samples
10300 Set size of single frame in number of samples. Allowed range is
10301 from 512 to 65536. Default frame size is 8192 samples.
10302
10303 softness
10304 Set softness applied inside thresholding function. Allowed range is
10305 from 0 to 10. Default softness is 1.
10306
10307 Commands
10308
10309 This filter supports the all above options as commands.
10310
10311 agate
10312 A gate is mainly used to reduce lower parts of a signal. This kind of
10313 signal processing reduces disturbing noise between useful signals.
10314
10315 Gating is done by detecting the volume below a chosen level threshold
10316 and dividing it by the factor set with ratio. The bottom of the noise
10317 floor is set via range. Because an exact manipulation of the signal
10318 would cause distortion of the waveform the reduction can be levelled
10319 over time. This is done by setting attack and release.
10320
10321 attack determines how long the signal has to fall below the threshold
10322 before any reduction will occur and release sets the time the signal
10323 has to rise above the threshold to reduce the reduction again. Shorter
10324 signals than the chosen attack time will be left untouched.
10325
10326 level_in
10327 Set input level before filtering. Default is 1. Allowed range is
10328 from 0.015625 to 64.
10329
10330 mode
10331 Set the mode of operation. Can be "upward" or "downward". Default
10332 is "downward". If set to "upward" mode, higher parts of signal will
10333 be amplified, expanding dynamic range in upward direction.
10334 Otherwise, in case of "downward" lower parts of signal will be
10335 reduced.
10336
10337 range
10338 Set the level of gain reduction when the signal is below the
10339 threshold. Default is 0.06125. Allowed range is from 0 to 1.
10340 Setting this to 0 disables reduction and then filter behaves like
10341 expander.
10342
10343 threshold
10344 If a signal rises above this level the gain reduction is released.
10345 Default is 0.125. Allowed range is from 0 to 1.
10346
10347 ratio
10348 Set a ratio by which the signal is reduced. Default is 2. Allowed
10349 range is from 1 to 9000.
10350
10351 attack
10352 Amount of milliseconds the signal has to rise above the threshold
10353 before gain reduction stops. Default is 20 milliseconds. Allowed
10354 range is from 0.01 to 9000.
10355
10356 release
10357 Amount of milliseconds the signal has to fall below the threshold
10358 before the reduction is increased again. Default is 250
10359 milliseconds. Allowed range is from 0.01 to 9000.
10360
10361 makeup
10362 Set amount of amplification of signal after processing. Default is
10363 1. Allowed range is from 1 to 64.
10364
10365 knee
10366 Curve the sharp knee around the threshold to enter gain reduction
10367 more softly. Default is 2.828427125. Allowed range is from 1 to 8.
10368
10369 detection
10370 Choose if exact signal should be taken for detection or an RMS like
10371 one. Default is "rms". Can be "peak" or "rms".
10372
10373 link
10374 Choose if the average level between all channels or the louder
10375 channel affects the reduction. Default is "average". Can be
10376 "average" or "maximum".
10377
10378 Commands
10379
10380 This filter supports the all above options as commands.
10381
10382 aiir
10383 Apply an arbitrary Infinite Impulse Response filter.
10384
10385 It accepts the following parameters:
10386
10387 zeros, z
10388 Set B/numerator/zeros/reflection coefficients.
10389
10390 poles, p
10391 Set A/denominator/poles/ladder coefficients.
10392
10393 gains, k
10394 Set channels gains.
10395
10396 dry_gain
10397 Set input gain.
10398
10399 wet_gain
10400 Set output gain.
10401
10402 format, f
10403 Set coefficients format.
10404
10405 ll lattice-ladder function
10406
10407 sf analog transfer function
10408
10409 tf digital transfer function
10410
10411 zp Z-plane zeros/poles, cartesian (default)
10412
10413 pr Z-plane zeros/poles, polar radians
10414
10415 pd Z-plane zeros/poles, polar degrees
10416
10417 sp S-plane zeros/poles
10418
10419 process, r
10420 Set type of processing.
10421
10422 d direct processing
10423
10424 s serial processing
10425
10426 p parallel processing
10427
10428 precision, e
10429 Set filtering precision.
10430
10431 dbl double-precision floating-point (default)
10432
10433 flt single-precision floating-point
10434
10435 i32 32-bit integers
10436
10437 i16 16-bit integers
10438
10439 normalize, n
10440 Normalize filter coefficients, by default is enabled. Enabling it
10441 will normalize magnitude response at DC to 0dB.
10442
10443 mix How much to use filtered signal in output. Default is 1. Range is
10444 between 0 and 1.
10445
10446 response
10447 Show IR frequency response, magnitude(magenta), phase(green) and
10448 group delay(yellow) in additional video stream. By default it is
10449 disabled.
10450
10451 channel
10452 Set for which IR channel to display frequency response. By default
10453 is first channel displayed. This option is used only when response
10454 is enabled.
10455
10456 size
10457 Set video stream size. This option is used only when response is
10458 enabled.
10459
10460 Coefficients in "tf" and "sf" format are separated by spaces and are in
10461 ascending order.
10462
10463 Coefficients in "zp" format are separated by spaces and order of
10464 coefficients doesn't matter. Coefficients in "zp" format are complex
10465 numbers with i imaginary unit.
10466
10467 Different coefficients and gains can be provided for every channel, in
10468 such case use '|' to separate coefficients or gains. Last provided
10469 coefficients will be used for all remaining channels.
10470
10471 Examples
10472
10473 • Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample
10474 rate:
10475
10476 aiir=k=1:z=7.957584807809675810E-1 -2.575128568908332300 3.674839853930788710 -2.57512875289799137 7.957586296317130880E-1:p=1 -2.86950072432325953 3.63022088054647218 -2.28075678147272232 6.361362326477423500E-1:f=tf:r=d
10477
10478 • Same as above but in "zp" format:
10479
10480 aiir=k=0.79575848078096756:z=0.80918701+0.58773007i 0.80918701-0.58773007i 0.80884700+0.58784055i 0.80884700-0.58784055i:p=0.63892345+0.59951235i 0.63892345-0.59951235i 0.79582691+0.44198673i 0.79582691-0.44198673i:f=zp:r=s
10481
10482 • Apply 3-rd order analog normalized Butterworth low-pass filter,
10483 using analog transfer function format:
10484
10485 aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
10486
10487 alimiter
10488 The limiter prevents an input signal from rising over a desired
10489 threshold. This limiter uses lookahead technology to prevent your
10490 signal from distorting. It means that there is a small delay after the
10491 signal is processed. Keep in mind that the delay it produces is the
10492 attack time you set.
10493
10494 The filter accepts the following options:
10495
10496 level_in
10497 Set input gain. Default is 1.
10498
10499 level_out
10500 Set output gain. Default is 1.
10501
10502 limit
10503 Don't let signals above this level pass the limiter. Default is 1.
10504
10505 attack
10506 The limiter will reach its attenuation level in this amount of time
10507 in milliseconds. Default is 5 milliseconds.
10508
10509 release
10510 Come back from limiting to attenuation 1.0 in this amount of
10511 milliseconds. Default is 50 milliseconds.
10512
10513 asc When gain reduction is always needed ASC takes care of releasing to
10514 an average reduction level rather than reaching a reduction of 0 in
10515 the release time.
10516
10517 asc_level
10518 Select how much the release time is affected by ASC, 0 means nearly
10519 no changes in release time while 1 produces higher release times.
10520
10521 level
10522 Auto level output signal. Default is enabled. This normalizes
10523 audio back to 0dB if enabled.
10524
10525 Depending on picked setting it is recommended to upsample input 2x or
10526 4x times with aresample before applying this filter.
10527
10528 allpass
10529 Apply a two-pole all-pass filter with central frequency (in Hz)
10530 frequency, and filter-width width. An all-pass filter changes the
10531 audio's frequency to phase relationship without changing its frequency
10532 to amplitude relationship.
10533
10534 The filter accepts the following options:
10535
10536 frequency, f
10537 Set frequency in Hz.
10538
10539 width_type, t
10540 Set method to specify band-width of filter.
10541
10542 h Hz
10543
10544 q Q-Factor
10545
10546 o octave
10547
10548 s slope
10549
10550 k kHz
10551
10552 width, w
10553 Specify the band-width of a filter in width_type units.
10554
10555 mix, m
10556 How much to use filtered signal in output. Default is 1. Range is
10557 between 0 and 1.
10558
10559 channels, c
10560 Specify which channels to filter, by default all available are
10561 filtered.
10562
10563 normalize, n
10564 Normalize biquad coefficients, by default is disabled. Enabling it
10565 will normalize magnitude response at DC to 0dB.
10566
10567 order, o
10568 Set the filter order, can be 1 or 2. Default is 2.
10569
10570 transform, a
10571 Set transform type of IIR filter.
10572
10573 di
10574 dii
10575 tdii
10576 latt
10577 svf
10578 precision, r
10579 Set precison of filtering.
10580
10581 auto
10582 Pick automatic sample format depending on surround filters.
10583
10584 s16 Always use signed 16-bit.
10585
10586 s32 Always use signed 32-bit.
10587
10588 f32 Always use float 32-bit.
10589
10590 f64 Always use float 64-bit.
10591
10592 Commands
10593
10594 This filter supports the following commands:
10595
10596 frequency, f
10597 Change allpass frequency. Syntax for the command is : "frequency"
10598
10599 width_type, t
10600 Change allpass width_type. Syntax for the command is :
10601 "width_type"
10602
10603 width, w
10604 Change allpass width. Syntax for the command is : "width"
10605
10606 mix, m
10607 Change allpass mix. Syntax for the command is : "mix"
10608
10609 aloop
10610 Loop audio samples.
10611
10612 The filter accepts the following options:
10613
10614 loop
10615 Set the number of loops. Setting this value to -1 will result in
10616 infinite loops. Default is 0.
10617
10618 size
10619 Set maximal number of samples. Default is 0.
10620
10621 start
10622 Set first sample of loop. Default is 0.
10623
10624 amerge
10625 Merge two or more audio streams into a single multi-channel stream.
10626
10627 The filter accepts the following options:
10628
10629 inputs
10630 Set the number of inputs. Default is 2.
10631
10632 If the channel layouts of the inputs are disjoint, and therefore
10633 compatible, the channel layout of the output will be set accordingly
10634 and the channels will be reordered as necessary. If the channel layouts
10635 of the inputs are not disjoint, the output will have all the channels
10636 of the first input then all the channels of the second input, in that
10637 order, and the channel layout of the output will be the default value
10638 corresponding to the total number of channels.
10639
10640 For example, if the first input is in 2.1 (FL+FR+LF) and the second
10641 input is FC+BL+BR, then the output will be in 5.1, with the channels in
10642 the following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of
10643 the first input, b1 is the first channel of the second input).
10644
10645 On the other hand, if both input are in stereo, the output channels
10646 will be in the default order: a1, a2, b1, b2, and the channel layout
10647 will be arbitrarily set to 4.0, which may or may not be the expected
10648 value.
10649
10650 All inputs must have the same sample rate, and format.
10651
10652 If inputs do not have the same duration, the output will stop with the
10653 shortest.
10654
10655 Examples
10656
10657 • Merge two mono files into a stereo stream:
10658
10659 amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
10660
10661 • Multiple merges assuming 1 video stream and 6 audio streams in
10662 input.mkv:
10663
10664 ffmpeg -i input.mkv -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6] amerge=inputs=6" -c:a pcm_s16le output.mkv
10665
10666 amix
10667 Mixes multiple audio inputs into a single output.
10668
10669 Note that this filter only supports float samples (the amerge and pan
10670 audio filters support many formats). If the amix input has integer
10671 samples then aresample will be automatically inserted to perform the
10672 conversion to float samples.
10673
10674 For example
10675
10676 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
10677
10678 will mix 3 input audio streams to a single output with the same
10679 duration as the first input and a dropout transition time of 3 seconds.
10680
10681 It accepts the following parameters:
10682
10683 inputs
10684 The number of inputs. If unspecified, it defaults to 2.
10685
10686 duration
10687 How to determine the end-of-stream.
10688
10689 longest
10690 The duration of the longest input. (default)
10691
10692 shortest
10693 The duration of the shortest input.
10694
10695 first
10696 The duration of the first input.
10697
10698 dropout_transition
10699 The transition time, in seconds, for volume renormalization when an
10700 input stream ends. The default value is 2 seconds.
10701
10702 weights
10703 Specify weight of each input audio stream as sequence. Each weight
10704 is separated by space. By default all inputs have same weight.
10705
10706 normalize
10707 Always scale inputs instead of only doing summation of samples.
10708 Beware of heavy clipping if inputs are not normalized prior or
10709 after filtering by this filter if this option is disabled. By
10710 default is enabled.
10711
10712 Commands
10713
10714 This filter supports the following commands:
10715
10716 weights
10717 normalize
10718 Syntax is same as option with same name.
10719
10720 amultiply
10721 Multiply first audio stream with second audio stream and store result
10722 in output audio stream. Multiplication is done by multiplying each
10723 sample from first stream with sample at same position from second
10724 stream.
10725
10726 With this element-wise multiplication one can create amplitude fades
10727 and amplitude modulations.
10728
10729 anequalizer
10730 High-order parametric multiband equalizer for each channel.
10731
10732 It accepts the following parameters:
10733
10734 params
10735 This option string is in format: "cchn f=cf w=w g=g t=f | ..."
10736 Each equalizer band is separated by '|'.
10737
10738 chn Set channel number to which equalization will be applied. If
10739 input doesn't have that channel the entry is ignored.
10740
10741 f Set central frequency for band. If input doesn't have that
10742 frequency the entry is ignored.
10743
10744 w Set band width in Hertz.
10745
10746 g Set band gain in dB.
10747
10748 t Set filter type for band, optional, can be:
10749
10750 0 Butterworth, this is default.
10751
10752 1 Chebyshev type 1.
10753
10754 2 Chebyshev type 2.
10755
10756 curves
10757 With this option activated frequency response of anequalizer is
10758 displayed in video stream.
10759
10760 size
10761 Set video stream size. Only useful if curves option is activated.
10762
10763 mgain
10764 Set max gain that will be displayed. Only useful if curves option
10765 is activated. Setting this to a reasonable value makes it possible
10766 to display gain which is derived from neighbour bands which are too
10767 close to each other and thus produce higher gain when both are
10768 activated.
10769
10770 fscale
10771 Set frequency scale used to draw frequency response in video
10772 output. Can be linear or logarithmic. Default is logarithmic.
10773
10774 colors
10775 Set color for each channel curve which is going to be displayed in
10776 video stream. This is list of color names separated by space or by
10777 '|'. Unrecognised or missing colors will be replaced by white
10778 color.
10779
10780 Examples
10781
10782 • Lower gain by 10 of central frequency 200Hz and width 100 Hz for
10783 first 2 channels using Chebyshev type 1 filter:
10784
10785 anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
10786
10787 Commands
10788
10789 This filter supports the following commands:
10790
10791 change
10792 Alter existing filter parameters. Syntax for the commands is :
10793 "fN|f=freq|w=width|g=gain"
10794
10795 fN is existing filter number, starting from 0, if no such filter is
10796 available error is returned. freq set new frequency parameter.
10797 width set new width parameter in Hertz. gain set new gain
10798 parameter in dB.
10799
10800 Full filter invocation with asendcmd may look like this:
10801 asendcmd=c='4.0 anequalizer change
10802 0|f=200|w=50|g=1',anequalizer=...
10803
10804 anlmdn
10805 Reduce broadband noise in audio samples using Non-Local Means
10806 algorithm.
10807
10808 Each sample is adjusted by looking for other samples with similar
10809 contexts. This context similarity is defined by comparing their
10810 surrounding patches of size p. Patches are searched in an area of r
10811 around the sample.
10812
10813 The filter accepts the following options:
10814
10815 strength, s
10816 Set denoising strength. Allowed range is from 0.00001 to 10.
10817 Default value is 0.00001.
10818
10819 patch, p
10820 Set patch radius duration. Allowed range is from 1 to 100
10821 milliseconds. Default value is 2 milliseconds.
10822
10823 research, r
10824 Set research radius duration. Allowed range is from 2 to 300
10825 milliseconds. Default value is 6 milliseconds.
10826
10827 output, o
10828 Set the output mode.
10829
10830 It accepts the following values:
10831
10832 i Pass input unchanged.
10833
10834 o Pass noise filtered out.
10835
10836 n Pass only noise.
10837
10838 Default value is o.
10839
10840 smooth, m
10841 Set smooth factor. Default value is 11. Allowed range is from 1 to
10842 15.
10843
10844 Commands
10845
10846 This filter supports the all above options as commands.
10847
10848 anlmf, anlms
10849 Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first
10850 audio stream using the second audio stream.
10851
10852 This adaptive filter is used to mimic a desired filter by finding the
10853 filter coefficients that relate to producing the least mean square of
10854 the error signal (difference between the desired, 2nd input audio
10855 stream and the actual signal, the 1st input audio stream).
10856
10857 A description of the accepted options follows.
10858
10859 order
10860 Set filter order.
10861
10862 mu Set filter mu.
10863
10864 eps Set the filter eps.
10865
10866 leakage
10867 Set the filter leakage.
10868
10869 out_mode
10870 It accepts the following values:
10871
10872 i Pass the 1st input.
10873
10874 d Pass the 2nd input.
10875
10876 o Pass filtered samples.
10877
10878 n Pass difference between desired and filtered samples.
10879
10880 Default value is o.
10881
10882 Examples
10883
10884 • One of many usages of this filter is noise reduction, input audio
10885 is filtered with same samples that are delayed by fixed amount, one
10886 such example for stereo audio is:
10887
10888 asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
10889
10890 Commands
10891
10892 This filter supports the same commands as options, excluding option
10893 "order".
10894
10895 anull
10896 Pass the audio source unchanged to the output.
10897
10898 apad
10899 Pad the end of an audio stream with silence.
10900
10901 This can be used together with ffmpeg -shortest to extend audio streams
10902 to the same length as the video stream.
10903
10904 A description of the accepted options follows.
10905
10906 packet_size
10907 Set silence packet size. Default value is 4096.
10908
10909 pad_len
10910 Set the number of samples of silence to add to the end. After the
10911 value is reached, the stream is terminated. This option is mutually
10912 exclusive with whole_len.
10913
10914 whole_len
10915 Set the minimum total number of samples in the output audio stream.
10916 If the value is longer than the input audio length, silence is
10917 added to the end, until the value is reached. This option is
10918 mutually exclusive with pad_len.
10919
10920 pad_dur
10921 Specify the duration of samples of silence to add. See the Time
10922 duration section in the ffmpeg-utils(1) manual for the accepted
10923 syntax. Used only if set to non-negative value.
10924
10925 whole_dur
10926 Specify the minimum total duration in the output audio stream. See
10927 the Time duration section in the ffmpeg-utils(1) manual for the
10928 accepted syntax. Used only if set to non-negative value. If the
10929 value is longer than the input audio length, silence is added to
10930 the end, until the value is reached. This option is mutually
10931 exclusive with pad_dur
10932
10933 If neither the pad_len nor the whole_len nor pad_dur nor whole_dur
10934 option is set, the filter will add silence to the end of the input
10935 stream indefinitely.
10936
10937 Note that for ffmpeg 4.4 and earlier a zero pad_dur or whole_dur also
10938 caused the filter to add silence indefinitely.
10939
10940 Examples
10941
10942 • Add 1024 samples of silence to the end of the input:
10943
10944 apad=pad_len=1024
10945
10946 • Make sure the audio output will contain at least 10000 samples, pad
10947 the input with silence if required:
10948
10949 apad=whole_len=10000
10950
10951 • Use ffmpeg to pad the audio input with silence, so that the video
10952 stream will always result the shortest and will be converted until
10953 the end in the output file when using the shortest option:
10954
10955 ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT
10956
10957 aphaser
10958 Add a phasing effect to the input audio.
10959
10960 A phaser filter creates series of peaks and troughs in the frequency
10961 spectrum. The position of the peaks and troughs are modulated so that
10962 they vary over time, creating a sweeping effect.
10963
10964 A description of the accepted parameters follows.
10965
10966 in_gain
10967 Set input gain. Default is 0.4.
10968
10969 out_gain
10970 Set output gain. Default is 0.74
10971
10972 delay
10973 Set delay in milliseconds. Default is 3.0.
10974
10975 decay
10976 Set decay. Default is 0.4.
10977
10978 speed
10979 Set modulation speed in Hz. Default is 0.5.
10980
10981 type
10982 Set modulation type. Default is triangular.
10983
10984 It accepts the following values:
10985
10986 triangular, t
10987 sinusoidal, s
10988
10989 aphaseshift
10990 Apply phase shift to input audio samples.
10991
10992 The filter accepts the following options:
10993
10994 shift
10995 Specify phase shift. Allowed range is from -1.0 to 1.0. Default
10996 value is 0.0.
10997
10998 level
10999 Set output gain applied to final output. Allowed range is from 0.0
11000 to 1.0. Default value is 1.0.
11001
11002 order
11003 Set filter order used for filtering. Allowed range is from 1 to 16.
11004 Default value is 8.
11005
11006 Commands
11007
11008 This filter supports the all above options as commands.
11009
11010 apsyclip
11011 Apply Psychoacoustic clipper to input audio stream.
11012
11013 The filter accepts the following options:
11014
11015 level_in
11016 Set input gain. By default it is 1. Range is [0.015625 - 64].
11017
11018 level_out
11019 Set output gain. By default it is 1. Range is [0.015625 - 64].
11020
11021 clip
11022 Set the clipping start value. Default value is 0dBFS or 1.
11023
11024 diff
11025 Output only difference samples, useful to hear introduced
11026 distortions. By default is disabled.
11027
11028 adaptive
11029 Set strenght of adaptive distortion applied. Default value is 0.5.
11030 Allowed range is from 0 to 1.
11031
11032 iterations
11033 Set number of iterations of psychoacoustic clipper. Allowed range
11034 is from 1 to 20. Default value is 10.
11035
11036 level
11037 Auto level output signal. Default is disabled. This normalizes
11038 audio back to 0dBFS if enabled.
11039
11040 Commands
11041
11042 This filter supports the all above options as commands.
11043
11044 apulsator
11045 Audio pulsator is something between an autopanner and a tremolo. But
11046 it can produce funny stereo effects as well. Pulsator changes the
11047 volume of the left and right channel based on a LFO (low frequency
11048 oscillator) with different waveforms and shifted phases. This filter
11049 have the ability to define an offset between left and right channel. An
11050 offset of 0 means that both LFO shapes match each other. The left and
11051 right channel are altered equally - a conventional tremolo. An offset
11052 of 50% means that the shape of the right channel is exactly shifted in
11053 phase (or moved backwards about half of the frequency) - pulsator acts
11054 as an autopanner. At 1 both curves match again. Every setting in
11055 between moves the phase shift gapless between all stages and produces
11056 some "bypassing" sounds with sine and triangle waveforms. The more you
11057 set the offset near 1 (starting from the 0.5) the faster the signal
11058 passes from the left to the right speaker.
11059
11060 The filter accepts the following options:
11061
11062 level_in
11063 Set input gain. By default it is 1. Range is [0.015625 - 64].
11064
11065 level_out
11066 Set output gain. By default it is 1. Range is [0.015625 - 64].
11067
11068 mode
11069 Set waveform shape the LFO will use. Can be one of: sine, triangle,
11070 square, sawup or sawdown. Default is sine.
11071
11072 amount
11073 Set modulation. Define how much of original signal is affected by
11074 the LFO.
11075
11076 offset_l
11077 Set left channel offset. Default is 0. Allowed range is [0 - 1].
11078
11079 offset_r
11080 Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
11081
11082 width
11083 Set pulse width. Default is 1. Allowed range is [0 - 2].
11084
11085 timing
11086 Set possible timing mode. Can be one of: bpm, ms or hz. Default is
11087 hz.
11088
11089 bpm Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if
11090 timing is set to bpm.
11091
11092 ms Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if
11093 timing is set to ms.
11094
11095 hz Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100].
11096 Only used if timing is set to hz.
11097
11098 aresample
11099 Resample the input audio to the specified parameters, using the
11100 libswresample library. If none are specified then the filter will
11101 automatically convert between its input and output.
11102
11103 This filter is also able to stretch/squeeze the audio data to make it
11104 match the timestamps or to inject silence / cut out audio to make it
11105 match the timestamps, do a combination of both or do neither.
11106
11107 The filter accepts the syntax [sample_rate:]resampler_options, where
11108 sample_rate expresses a sample rate and resampler_options is a list of
11109 key=value pairs, separated by ":". See the "Resampler Options" section
11110 in the ffmpeg-resampler(1) manual for the complete list of supported
11111 options.
11112
11113 Examples
11114
11115 • Resample the input audio to 44100Hz:
11116
11117 aresample=44100
11118
11119 • Stretch/squeeze samples to the given timestamps, with a maximum of
11120 1000 samples per second compensation:
11121
11122 aresample=async=1000
11123
11124 areverse
11125 Reverse an audio clip.
11126
11127 Warning: This filter requires memory to buffer the entire clip, so
11128 trimming is suggested.
11129
11130 Examples
11131
11132 • Take the first 5 seconds of a clip, and reverse it.
11133
11134 atrim=end=5,areverse
11135
11136 arnndn
11137 Reduce noise from speech using Recurrent Neural Networks.
11138
11139 This filter accepts the following options:
11140
11141 model, m
11142 Set train model file to load. This option is always required.
11143
11144 mix Set how much to mix filtered samples into final output. Allowed
11145 range is from -1 to 1. Default value is 1. Negative values are
11146 special, they set how much to keep filtered noise in the final
11147 filter output. Set this option to -1 to hear actual noise removed
11148 from input signal.
11149
11150 Commands
11151
11152 This filter supports the all above options as commands.
11153
11154 asdr
11155 Measure Audio Signal-to-Distortion Ratio.
11156
11157 This filter takes two audio streams for input, and outputs first audio
11158 stream. Results are in dB per channel at end of either input.
11159
11160 asetnsamples
11161 Set the number of samples per each output audio frame.
11162
11163 The last output packet may contain a different number of samples, as
11164 the filter will flush all the remaining samples when the input audio
11165 signals its end.
11166
11167 The filter accepts the following options:
11168
11169 nb_out_samples, n
11170 Set the number of frames per each output audio frame. The number is
11171 intended as the number of samples per each channel. Default value
11172 is 1024.
11173
11174 pad, p
11175 If set to 1, the filter will pad the last audio frame with zeroes,
11176 so that the last frame will contain the same number of samples as
11177 the previous ones. Default value is 1.
11178
11179 For example, to set the number of per-frame samples to 1234 and disable
11180 padding for the last frame, use:
11181
11182 asetnsamples=n=1234:p=0
11183
11184 asetrate
11185 Set the sample rate without altering the PCM data. This will result in
11186 a change of speed and pitch.
11187
11188 The filter accepts the following options:
11189
11190 sample_rate, r
11191 Set the output sample rate. Default is 44100 Hz.
11192
11193 ashowinfo
11194 Show a line containing various information for each input audio frame.
11195 The input audio is not modified.
11196
11197 The shown line contains a sequence of key/value pairs of the form
11198 key:value.
11199
11200 The following values are shown in the output:
11201
11202 n The (sequential) number of the input frame, starting from 0.
11203
11204 pts The presentation timestamp of the input frame, in time base units;
11205 the time base depends on the filter input pad, and is usually
11206 1/sample_rate.
11207
11208 pts_time
11209 The presentation timestamp of the input frame in seconds.
11210
11211 pos position of the frame in the input stream, -1 if this information
11212 in unavailable and/or meaningless (for example in case of synthetic
11213 audio)
11214
11215 fmt The sample format.
11216
11217 chlayout
11218 The channel layout.
11219
11220 rate
11221 The sample rate for the audio frame.
11222
11223 nb_samples
11224 The number of samples (per channel) in the frame.
11225
11226 checksum
11227 The Adler-32 checksum (printed in hexadecimal) of the audio data.
11228 For planar audio, the data is treated as if all the planes were
11229 concatenated.
11230
11231 plane_checksums
11232 A list of Adler-32 checksums for each data plane.
11233
11234 asoftclip
11235 Apply audio soft clipping.
11236
11237 Soft clipping is a type of distortion effect where the amplitude of a
11238 signal is saturated along a smooth curve, rather than the abrupt shape
11239 of hard-clipping.
11240
11241 This filter accepts the following options:
11242
11243 type
11244 Set type of soft-clipping.
11245
11246 It accepts the following values:
11247
11248 hard
11249 tanh
11250 atan
11251 cubic
11252 exp
11253 alg
11254 quintic
11255 sin
11256 erf
11257 threshold
11258 Set threshold from where to start clipping. Default value is 0dB or
11259 1.
11260
11261 output
11262 Set gain applied to output. Default value is 0dB or 1.
11263
11264 param
11265 Set additional parameter which controls sigmoid function.
11266
11267 oversample
11268 Set oversampling factor.
11269
11270 Commands
11271
11272 This filter supports the all above options as commands.
11273
11274 aspectralstats
11275 Display frequency domain statistical information about the audio
11276 channels. Statistics are calculated and stored as metadata for each
11277 audio channel and for each audio frame.
11278
11279 It accepts the following option:
11280
11281 win_size
11282 Set the window length in samples. Default value is 2048. Allowed
11283 range is from 32 to 65536.
11284
11285 win_func
11286 Set window function.
11287
11288 It accepts the following values:
11289
11290 rect
11291 bartlett
11292 hann, hanning
11293 hamming
11294 blackman
11295 welch
11296 flattop
11297 bharris
11298 bnuttall
11299 bhann
11300 sine
11301 nuttall
11302 lanczos
11303 gauss
11304 tukey
11305 dolph
11306 cauchy
11307 parzen
11308 poisson
11309 bohman
11310
11311 Default is "hann".
11312
11313 overlap
11314 Set window overlap. Allowed range is from 0 to 1. Default value is
11315 0.5.
11316
11317 A list of each metadata key follows:
11318
11319 mean
11320 variance
11321 centroid
11322 spread
11323 skewness
11324 kurtosis
11325 entropy
11326 flatness
11327 crest
11328 flux
11329 slope
11330 decrease
11331 rolloff
11332
11333 asr
11334 Automatic Speech Recognition
11335
11336 This filter uses PocketSphinx for speech recognition. To enable
11337 compilation of this filter, you need to configure FFmpeg with
11338 "--enable-pocketsphinx".
11339
11340 It accepts the following options:
11341
11342 rate
11343 Set sampling rate of input audio. Defaults is 16000. This need to
11344 match speech models, otherwise one will get poor results.
11345
11346 hmm Set dictionary containing acoustic model files.
11347
11348 dict
11349 Set pronunciation dictionary.
11350
11351 lm Set language model file.
11352
11353 lmctl
11354 Set language model set.
11355
11356 lmname
11357 Set which language model to use.
11358
11359 logfn
11360 Set output for log messages.
11361
11362 The filter exports recognized speech as the frame metadata
11363 "lavfi.asr.text".
11364
11365 astats
11366 Display time domain statistical information about the audio channels.
11367 Statistics are calculated and displayed for each audio channel and,
11368 where applicable, an overall figure is also given.
11369
11370 It accepts the following option:
11371
11372 length
11373 Short window length in seconds, used for peak and trough RMS
11374 measurement. Default is 0.05 (50 milliseconds). Allowed range is
11375 "[0 - 10]".
11376
11377 metadata
11378 Set metadata injection. All the metadata keys are prefixed with
11379 "lavfi.astats.X", where "X" is channel number starting from 1 or
11380 string "Overall". Default is disabled.
11381
11382 Available keys for each channel are: DC_offset Min_level Max_level
11383 Min_difference Max_difference Mean_difference RMS_difference
11384 Peak_level RMS_peak RMS_trough Crest_factor Flat_factor Peak_count
11385 Noise_floor Noise_floor_count Entropy Bit_depth Dynamic_range
11386 Zero_crossings Zero_crossings_rate Number_of_NaNs Number_of_Infs
11387 Number_of_denormals
11388
11389 and for Overall: DC_offset Min_level Max_level Min_difference
11390 Max_difference Mean_difference RMS_difference Peak_level RMS_level
11391 RMS_peak RMS_trough Flat_factor Peak_count Noise_floor
11392 Noise_floor_count Entropy Bit_depth Number_of_samples
11393 Number_of_NaNs Number_of_Infs Number_of_denormals
11394
11395 For example full key look like this "lavfi.astats.1.DC_offset" or
11396 this "lavfi.astats.Overall.Peak_count".
11397
11398 For description what each key means read below.
11399
11400 reset
11401 Set the number of frames over which cumulative stats are calculated
11402 before being reset Default is disabled.
11403
11404 measure_perchannel
11405 Select the parameters which are measured per channel. The metadata
11406 keys can be used as flags, default is all which measures
11407 everything. none disables all per channel measurement.
11408
11409 measure_overall
11410 Select the parameters which are measured overall. The metadata keys
11411 can be used as flags, default is all which measures everything.
11412 none disables all overall measurement.
11413
11414 A description of each shown parameter follows:
11415
11416 DC offset
11417 Mean amplitude displacement from zero.
11418
11419 Min level
11420 Minimal sample level.
11421
11422 Max level
11423 Maximal sample level.
11424
11425 Min difference
11426 Minimal difference between two consecutive samples.
11427
11428 Max difference
11429 Maximal difference between two consecutive samples.
11430
11431 Mean difference
11432 Mean difference between two consecutive samples. The average of
11433 each difference between two consecutive samples.
11434
11435 RMS difference
11436 Root Mean Square difference between two consecutive samples.
11437
11438 Peak level dB
11439 RMS level dB
11440 Standard peak and RMS level measured in dBFS.
11441
11442 RMS peak dB
11443 RMS trough dB
11444 Peak and trough values for RMS level measured over a short window.
11445
11446 Crest factor
11447 Standard ratio of peak to RMS level (note: not in dB).
11448
11449 Flat factor
11450 Flatness (i.e. consecutive samples with the same value) of the
11451 signal at its peak levels (i.e. either Min level or Max level).
11452
11453 Peak count
11454 Number of occasions (not the number of samples) that the signal
11455 attained either Min level or Max level.
11456
11457 Noise floor dB
11458 Minimum local peak measured in dBFS over a short window.
11459
11460 Noise floor count
11461 Number of occasions (not the number of samples) that the signal
11462 attained Noise floor.
11463
11464 Entropy
11465 Entropy measured across whole audio. Entropy of value near 1.0 is
11466 typically measured for white noise.
11467
11468 Bit depth
11469 Overall bit depth of audio. Number of bits used for each sample.
11470
11471 Dynamic range
11472 Measured dynamic range of audio in dB.
11473
11474 Zero crossings
11475 Number of points where the waveform crosses the zero level axis.
11476
11477 Zero crossings rate
11478 Rate of Zero crossings and number of audio samples.
11479
11480 asubboost
11481 Boost subwoofer frequencies.
11482
11483 The filter accepts the following options:
11484
11485 dry Set dry gain, how much of original signal is kept. Allowed range is
11486 from 0 to 1. Default value is 0.7.
11487
11488 wet Set wet gain, how much of filtered signal is kept. Allowed range is
11489 from 0 to 1. Default value is 0.7.
11490
11491 decay
11492 Set delay line decay gain value. Allowed range is from 0 to 1.
11493 Default value is 0.7.
11494
11495 feedback
11496 Set delay line feedback gain value. Allowed range is from 0 to 1.
11497 Default value is 0.9.
11498
11499 cutoff
11500 Set cutoff frequency in Hertz. Allowed range is 50 to 900. Default
11501 value is 100.
11502
11503 slope
11504 Set slope amount for cutoff frequency. Allowed range is 0.0001 to
11505 1. Default value is 0.5.
11506
11507 delay
11508 Set delay. Allowed range is from 1 to 100. Default value is 20.
11509
11510 Commands
11511
11512 This filter supports the all above options as commands.
11513
11514 asubcut
11515 Cut subwoofer frequencies.
11516
11517 This filter allows to set custom, steeper roll off than highpass
11518 filter, and thus is able to more attenuate frequency content in stop-
11519 band.
11520
11521 The filter accepts the following options:
11522
11523 cutoff
11524 Set cutoff frequency in Hertz. Allowed range is 2 to 200. Default
11525 value is 20.
11526
11527 order
11528 Set filter order. Available values are from 3 to 20. Default value
11529 is 10.
11530
11531 level
11532 Set input gain level. Allowed range is from 0 to 1. Default value
11533 is 1.
11534
11535 Commands
11536
11537 This filter supports the all above options as commands.
11538
11539 asupercut
11540 Cut super frequencies.
11541
11542 The filter accepts the following options:
11543
11544 cutoff
11545 Set cutoff frequency in Hertz. Allowed range is 20000 to 192000.
11546 Default value is 20000.
11547
11548 order
11549 Set filter order. Available values are from 3 to 20. Default value
11550 is 10.
11551
11552 level
11553 Set input gain level. Allowed range is from 0 to 1. Default value
11554 is 1.
11555
11556 Commands
11557
11558 This filter supports the all above options as commands.
11559
11560 asuperpass
11561 Apply high order Butterworth band-pass filter.
11562
11563 The filter accepts the following options:
11564
11565 centerf
11566 Set center frequency in Hertz. Allowed range is 2 to 999999.
11567 Default value is 1000.
11568
11569 order
11570 Set filter order. Available values are from 4 to 20. Default value
11571 is 4.
11572
11573 qfactor
11574 Set Q-factor. Allowed range is from 0.01 to 100. Default value is
11575 1.
11576
11577 level
11578 Set input gain level. Allowed range is from 0 to 2. Default value
11579 is 1.
11580
11581 Commands
11582
11583 This filter supports the all above options as commands.
11584
11585 asuperstop
11586 Apply high order Butterworth band-stop filter.
11587
11588 The filter accepts the following options:
11589
11590 centerf
11591 Set center frequency in Hertz. Allowed range is 2 to 999999.
11592 Default value is 1000.
11593
11594 order
11595 Set filter order. Available values are from 4 to 20. Default value
11596 is 4.
11597
11598 qfactor
11599 Set Q-factor. Allowed range is from 0.01 to 100. Default value is
11600 1.
11601
11602 level
11603 Set input gain level. Allowed range is from 0 to 2. Default value
11604 is 1.
11605
11606 Commands
11607
11608 This filter supports the all above options as commands.
11609
11610 atempo
11611 Adjust audio tempo.
11612
11613 The filter accepts exactly one parameter, the audio tempo. If not
11614 specified then the filter will assume nominal 1.0 tempo. Tempo must be
11615 in the [0.5, 100.0] range.
11616
11617 Note that tempo greater than 2 will skip some samples rather than blend
11618 them in. If for any reason this is a concern it is always possible to
11619 daisy-chain several instances of atempo to achieve the desired product
11620 tempo.
11621
11622 Examples
11623
11624 • Slow down audio to 80% tempo:
11625
11626 atempo=0.8
11627
11628 • To speed up audio to 300% tempo:
11629
11630 atempo=3
11631
11632 • To speed up audio to 300% tempo by daisy-chaining two atempo
11633 instances:
11634
11635 atempo=sqrt(3),atempo=sqrt(3)
11636
11637 Commands
11638
11639 This filter supports the following commands:
11640
11641 tempo
11642 Change filter tempo scale factor. Syntax for the command is :
11643 "tempo"
11644
11645 atilt
11646 Apply spectral tilt filter to audio stream.
11647
11648 This filter apply any spectral roll-off slope over any specified
11649 frequency band.
11650
11651 The filter accepts the following options:
11652
11653 freq
11654 Set central frequency of tilt in Hz. Default is 10000 Hz.
11655
11656 slope
11657 Set slope direction of tilt. Default is 0. Allowed range is from -1
11658 to 1.
11659
11660 width
11661 Set width of tilt. Default is 1000. Allowed range is from 100 to
11662 10000.
11663
11664 order
11665 Set order of tilt filter.
11666
11667 level
11668 Set input volume level. Allowed range is from 0 to 4. Defalt is 1.
11669
11670 Commands
11671
11672 This filter supports the all above options as commands.
11673
11674 atrim
11675 Trim the input so that the output contains one continuous subpart of
11676 the input.
11677
11678 It accepts the following parameters:
11679
11680 start
11681 Timestamp (in seconds) of the start of the section to keep. I.e.
11682 the audio sample with the timestamp start will be the first sample
11683 in the output.
11684
11685 end Specify time of the first audio sample that will be dropped, i.e.
11686 the audio sample immediately preceding the one with the timestamp
11687 end will be the last sample in the output.
11688
11689 start_pts
11690 Same as start, except this option sets the start timestamp in
11691 samples instead of seconds.
11692
11693 end_pts
11694 Same as end, except this option sets the end timestamp in samples
11695 instead of seconds.
11696
11697 duration
11698 The maximum duration of the output in seconds.
11699
11700 start_sample
11701 The number of the first sample that should be output.
11702
11703 end_sample
11704 The number of the first sample that should be dropped.
11705
11706 start, end, and duration are expressed as time duration specifications;
11707 see the Time duration section in the ffmpeg-utils(1) manual.
11708
11709 Note that the first two sets of the start/end options and the duration
11710 option look at the frame timestamp, while the _sample options simply
11711 count the samples that pass through the filter. So start/end_pts and
11712 start/end_sample will give different results when the timestamps are
11713 wrong, inexact or do not start at zero. Also note that this filter does
11714 not modify the timestamps. If you wish to have the output timestamps
11715 start at zero, insert the asetpts filter after the atrim filter.
11716
11717 If multiple start or end options are set, this filter tries to be
11718 greedy and keep all samples that match at least one of the specified
11719 constraints. To keep only the part that matches all the constraints at
11720 once, chain multiple atrim filters.
11721
11722 The defaults are such that all the input is kept. So it is possible to
11723 set e.g. just the end values to keep everything before the specified
11724 time.
11725
11726 Examples:
11727
11728 • Drop everything except the second minute of input:
11729
11730 ffmpeg -i INPUT -af atrim=60:120
11731
11732 • Keep only the first 1000 samples:
11733
11734 ffmpeg -i INPUT -af atrim=end_sample=1000
11735
11736 axcorrelate
11737 Calculate normalized windowed cross-correlation between two input audio
11738 streams.
11739
11740 Resulted samples are always between -1 and 1 inclusive. If result is 1
11741 it means two input samples are highly correlated in that selected
11742 segment. Result 0 means they are not correlated at all. If result is
11743 -1 it means two input samples are out of phase, which means they cancel
11744 each other.
11745
11746 The filter accepts the following options:
11747
11748 size
11749 Set size of segment over which cross-correlation is calculated.
11750 Default is 256. Allowed range is from 2 to 131072.
11751
11752 algo
11753 Set algorithm for cross-correlation. Can be "slow" or "fast".
11754 Default is "slow". Fast algorithm assumes mean values over any
11755 given segment are always zero and thus need much less calculations
11756 to make. This is generally not true, but is valid for typical
11757 audio streams.
11758
11759 Examples
11760
11761 • Calculate correlation between channels in stereo audio stream:
11762
11763 ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
11764
11765 bandpass
11766 Apply a two-pole Butterworth band-pass filter with central frequency
11767 frequency, and (3dB-point) band-width width. The csg option selects a
11768 constant skirt gain (peak gain = Q) instead of the default: constant
11769 0dB peak gain. The filter roll off at 6dB per octave (20dB per
11770 decade).
11771
11772 The filter accepts the following options:
11773
11774 frequency, f
11775 Set the filter's central frequency. Default is 3000.
11776
11777 csg Constant skirt gain if set to 1. Defaults to 0.
11778
11779 width_type, t
11780 Set method to specify band-width of filter.
11781
11782 h Hz
11783
11784 q Q-Factor
11785
11786 o octave
11787
11788 s slope
11789
11790 k kHz
11791
11792 width, w
11793 Specify the band-width of a filter in width_type units.
11794
11795 mix, m
11796 How much to use filtered signal in output. Default is 1. Range is
11797 between 0 and 1.
11798
11799 channels, c
11800 Specify which channels to filter, by default all available are
11801 filtered.
11802
11803 normalize, n
11804 Normalize biquad coefficients, by default is disabled. Enabling it
11805 will normalize magnitude response at DC to 0dB.
11806
11807 transform, a
11808 Set transform type of IIR filter.
11809
11810 di
11811 dii
11812 tdii
11813 latt
11814 svf
11815 precision, r
11816 Set precison of filtering.
11817
11818 auto
11819 Pick automatic sample format depending on surround filters.
11820
11821 s16 Always use signed 16-bit.
11822
11823 s32 Always use signed 32-bit.
11824
11825 f32 Always use float 32-bit.
11826
11827 f64 Always use float 64-bit.
11828
11829 Commands
11830
11831 This filter supports the following commands:
11832
11833 frequency, f
11834 Change bandpass frequency. Syntax for the command is : "frequency"
11835
11836 width_type, t
11837 Change bandpass width_type. Syntax for the command is :
11838 "width_type"
11839
11840 width, w
11841 Change bandpass width. Syntax for the command is : "width"
11842
11843 mix, m
11844 Change bandpass mix. Syntax for the command is : "mix"
11845
11846 bandreject
11847 Apply a two-pole Butterworth band-reject filter with central frequency
11848 frequency, and (3dB-point) band-width width. The filter roll off at
11849 6dB per octave (20dB per decade).
11850
11851 The filter accepts the following options:
11852
11853 frequency, f
11854 Set the filter's central frequency. Default is 3000.
11855
11856 width_type, t
11857 Set method to specify band-width of filter.
11858
11859 h Hz
11860
11861 q Q-Factor
11862
11863 o octave
11864
11865 s slope
11866
11867 k kHz
11868
11869 width, w
11870 Specify the band-width of a filter in width_type units.
11871
11872 mix, m
11873 How much to use filtered signal in output. Default is 1. Range is
11874 between 0 and 1.
11875
11876 channels, c
11877 Specify which channels to filter, by default all available are
11878 filtered.
11879
11880 normalize, n
11881 Normalize biquad coefficients, by default is disabled. Enabling it
11882 will normalize magnitude response at DC to 0dB.
11883
11884 transform, a
11885 Set transform type of IIR filter.
11886
11887 di
11888 dii
11889 tdii
11890 latt
11891 svf
11892 precision, r
11893 Set precison of filtering.
11894
11895 auto
11896 Pick automatic sample format depending on surround filters.
11897
11898 s16 Always use signed 16-bit.
11899
11900 s32 Always use signed 32-bit.
11901
11902 f32 Always use float 32-bit.
11903
11904 f64 Always use float 64-bit.
11905
11906 Commands
11907
11908 This filter supports the following commands:
11909
11910 frequency, f
11911 Change bandreject frequency. Syntax for the command is :
11912 "frequency"
11913
11914 width_type, t
11915 Change bandreject width_type. Syntax for the command is :
11916 "width_type"
11917
11918 width, w
11919 Change bandreject width. Syntax for the command is : "width"
11920
11921 mix, m
11922 Change bandreject mix. Syntax for the command is : "mix"
11923
11924 bass, lowshelf
11925 Boost or cut the bass (lower) frequencies of the audio using a two-pole
11926 shelving filter with a response similar to that of a standard hi-fi's
11927 tone-controls. This is also known as shelving equalisation (EQ).
11928
11929 The filter accepts the following options:
11930
11931 gain, g
11932 Give the gain at 0 Hz. Its useful range is about -20 (for a large
11933 cut) to +20 (for a large boost). Beware of clipping when using a
11934 positive gain.
11935
11936 frequency, f
11937 Set the filter's central frequency and so can be used to extend or
11938 reduce the frequency range to be boosted or cut. The default value
11939 is 100 Hz.
11940
11941 width_type, t
11942 Set method to specify band-width of filter.
11943
11944 h Hz
11945
11946 q Q-Factor
11947
11948 o octave
11949
11950 s slope
11951
11952 k kHz
11953
11954 width, w
11955 Determine how steep is the filter's shelf transition.
11956
11957 poles, p
11958 Set number of poles. Default is 2.
11959
11960 mix, m
11961 How much to use filtered signal in output. Default is 1. Range is
11962 between 0 and 1.
11963
11964 channels, c
11965 Specify which channels to filter, by default all available are
11966 filtered.
11967
11968 normalize, n
11969 Normalize biquad coefficients, by default is disabled. Enabling it
11970 will normalize magnitude response at DC to 0dB.
11971
11972 transform, a
11973 Set transform type of IIR filter.
11974
11975 di
11976 dii
11977 tdii
11978 latt
11979 svf
11980 precision, r
11981 Set precison of filtering.
11982
11983 auto
11984 Pick automatic sample format depending on surround filters.
11985
11986 s16 Always use signed 16-bit.
11987
11988 s32 Always use signed 32-bit.
11989
11990 f32 Always use float 32-bit.
11991
11992 f64 Always use float 64-bit.
11993
11994 Commands
11995
11996 This filter supports the following commands:
11997
11998 frequency, f
11999 Change bass frequency. Syntax for the command is : "frequency"
12000
12001 width_type, t
12002 Change bass width_type. Syntax for the command is : "width_type"
12003
12004 width, w
12005 Change bass width. Syntax for the command is : "width"
12006
12007 gain, g
12008 Change bass gain. Syntax for the command is : "gain"
12009
12010 mix, m
12011 Change bass mix. Syntax for the command is : "mix"
12012
12013 biquad
12014 Apply a biquad IIR filter with the given coefficients. Where b0, b1,
12015 b2 and a0, a1, a2 are the numerator and denominator coefficients
12016 respectively. and channels, c specify which channels to filter, by
12017 default all available are filtered.
12018
12019 Commands
12020
12021 This filter supports the following commands:
12022
12023 a0
12024 a1
12025 a2
12026 b0
12027 b1
12028 b2 Change biquad parameter. Syntax for the command is : "value"
12029
12030 mix, m
12031 How much to use filtered signal in output. Default is 1. Range is
12032 between 0 and 1.
12033
12034 channels, c
12035 Specify which channels to filter, by default all available are
12036 filtered.
12037
12038 normalize, n
12039 Normalize biquad coefficients, by default is disabled. Enabling it
12040 will normalize magnitude response at DC to 0dB.
12041
12042 transform, a
12043 Set transform type of IIR filter.
12044
12045 di
12046 dii
12047 tdii
12048 latt
12049 svf
12050 precision, r
12051 Set precison of filtering.
12052
12053 auto
12054 Pick automatic sample format depending on surround filters.
12055
12056 s16 Always use signed 16-bit.
12057
12058 s32 Always use signed 32-bit.
12059
12060 f32 Always use float 32-bit.
12061
12062 f64 Always use float 64-bit.
12063
12064 bs2b
12065 Bauer stereo to binaural transformation, which improves headphone
12066 listening of stereo audio records.
12067
12068 To enable compilation of this filter you need to configure FFmpeg with
12069 "--enable-libbs2b".
12070
12071 It accepts the following parameters:
12072
12073 profile
12074 Pre-defined crossfeed level.
12075
12076 default
12077 Default level (fcut=700, feed=50).
12078
12079 cmoy
12080 Chu Moy circuit (fcut=700, feed=60).
12081
12082 jmeier
12083 Jan Meier circuit (fcut=650, feed=95).
12084
12085 fcut
12086 Cut frequency (in Hz).
12087
12088 feed
12089 Feed level (in Hz).
12090
12091 channelmap
12092 Remap input channels to new locations.
12093
12094 It accepts the following parameters:
12095
12096 map Map channels from input to output. The argument is a '|'-separated
12097 list of mappings, each in the "in_channel-out_channel" or
12098 in_channel form. in_channel can be either the name of the input
12099 channel (e.g. FL for front left) or its index in the input channel
12100 layout. out_channel is the name of the output channel or its index
12101 in the output channel layout. If out_channel is not given then it
12102 is implicitly an index, starting with zero and increasing by one
12103 for each mapping.
12104
12105 channel_layout
12106 The channel layout of the output stream.
12107
12108 If no mapping is present, the filter will implicitly map input channels
12109 to output channels, preserving indices.
12110
12111 Examples
12112
12113 • For example, assuming a 5.1+downmix input MOV file,
12114
12115 ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
12116
12117 will create an output WAV file tagged as stereo from the downmix
12118 channels of the input.
12119
12120 • To fix a 5.1 WAV improperly encoded in AAC's native channel order
12121
12122 ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
12123
12124 channelsplit
12125 Split each channel from an input audio stream into a separate output
12126 stream.
12127
12128 It accepts the following parameters:
12129
12130 channel_layout
12131 The channel layout of the input stream. The default is "stereo".
12132
12133 channels
12134 A channel layout describing the channels to be extracted as
12135 separate output streams or "all" to extract each input channel as a
12136 separate stream. The default is "all".
12137
12138 Choosing channels not present in channel layout in the input will
12139 result in an error.
12140
12141 Examples
12142
12143 • For example, assuming a stereo input MP3 file,
12144
12145 ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
12146
12147 will create an output Matroska file with two audio streams, one
12148 containing only the left channel and the other the right channel.
12149
12150 • Split a 5.1 WAV file into per-channel files:
12151
12152 ffmpeg -i in.wav -filter_complex
12153 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
12154 -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
12155 front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
12156 side_right.wav
12157
12158 • Extract only LFE from a 5.1 WAV file:
12159
12160 ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
12161 -map '[LFE]' lfe.wav
12162
12163 chorus
12164 Add a chorus effect to the audio.
12165
12166 Can make a single vocal sound like a chorus, but can also be applied to
12167 instrumentation.
12168
12169 Chorus resembles an echo effect with a short delay, but whereas with
12170 echo the delay is constant, with chorus, it is varied using using
12171 sinusoidal or triangular modulation. The modulation depth defines the
12172 range the modulated delay is played before or after the delay. Hence
12173 the delayed sound will sound slower or faster, that is the delayed
12174 sound tuned around the original one, like in a chorus where some vocals
12175 are slightly off key.
12176
12177 It accepts the following parameters:
12178
12179 in_gain
12180 Set input gain. Default is 0.4.
12181
12182 out_gain
12183 Set output gain. Default is 0.4.
12184
12185 delays
12186 Set delays. A typical delay is around 40ms to 60ms.
12187
12188 decays
12189 Set decays.
12190
12191 speeds
12192 Set speeds.
12193
12194 depths
12195 Set depths.
12196
12197 Examples
12198
12199 • A single delay:
12200
12201 chorus=0.7:0.9:55:0.4:0.25:2
12202
12203 • Two delays:
12204
12205 chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
12206
12207 • Fuller sounding chorus with three delays:
12208
12209 chorus=0.5:0.9:50|60|40:0.4|0.32|0.3:0.25|0.4|0.3:2|2.3|1.3
12210
12211 compand
12212 Compress or expand the audio's dynamic range.
12213
12214 It accepts the following parameters:
12215
12216 attacks
12217 decays
12218 A list of times in seconds for each channel over which the
12219 instantaneous level of the input signal is averaged to determine
12220 its volume. attacks refers to increase of volume and decays refers
12221 to decrease of volume. For most situations, the attack time
12222 (response to the audio getting louder) should be shorter than the
12223 decay time, because the human ear is more sensitive to sudden loud
12224 audio than sudden soft audio. A typical value for attack is 0.3
12225 seconds and a typical value for decay is 0.8 seconds. If specified
12226 number of attacks & decays is lower than number of channels, the
12227 last set attack/decay will be used for all remaining channels.
12228
12229 points
12230 A list of points for the transfer function, specified in dB
12231 relative to the maximum possible signal amplitude. Each key points
12232 list must be defined using the following syntax:
12233 "x0/y0|x1/y1|x2/y2|...." or "x0/y0 x1/y1 x2/y2 ...."
12234
12235 The input values must be in strictly increasing order but the
12236 transfer function does not have to be monotonically rising. The
12237 point "0/0" is assumed but may be overridden (by "0/out-dBn").
12238 Typical values for the transfer function are "-70/-70|-60/-20|1/0".
12239
12240 soft-knee
12241 Set the curve radius in dB for all joints. It defaults to 0.01.
12242
12243 gain
12244 Set the additional gain in dB to be applied at all points on the
12245 transfer function. This allows for easy adjustment of the overall
12246 gain. It defaults to 0.
12247
12248 volume
12249 Set an initial volume, in dB, to be assumed for each channel when
12250 filtering starts. This permits the user to supply a nominal level
12251 initially, so that, for example, a very large gain is not applied
12252 to initial signal levels before the companding has begun to
12253 operate. A typical value for audio which is initially quiet is -90
12254 dB. It defaults to 0.
12255
12256 delay
12257 Set a delay, in seconds. The input audio is analyzed immediately,
12258 but audio is delayed before being fed to the volume adjuster.
12259 Specifying a delay approximately equal to the attack/decay times
12260 allows the filter to effectively operate in predictive rather than
12261 reactive mode. It defaults to 0.
12262
12263 Examples
12264
12265 • Make music with both quiet and loud passages suitable for listening
12266 to in a noisy environment:
12267
12268 compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
12269
12270 Another example for audio with whisper and explosion parts:
12271
12272 compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
12273
12274 • A noise gate for when the noise is at a lower level than the
12275 signal:
12276
12277 compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
12278
12279 • Here is another noise gate, this time for when the noise is at a
12280 higher level than the signal (making it, in some ways, similar to
12281 squelch):
12282
12283 compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
12284
12285 • 2:1 compression starting at -6dB:
12286
12287 compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
12288
12289 • 2:1 compression starting at -9dB:
12290
12291 compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
12292
12293 • 2:1 compression starting at -12dB:
12294
12295 compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
12296
12297 • 2:1 compression starting at -18dB:
12298
12299 compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
12300
12301 • 3:1 compression starting at -15dB:
12302
12303 compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
12304
12305 • Compressor/Gate:
12306
12307 compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
12308
12309 • Expander:
12310
12311 compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3
12312
12313 • Hard limiter at -6dB:
12314
12315 compand=attacks=0:points=-80/-80|-6/-6|20/-6
12316
12317 • Hard limiter at -12dB:
12318
12319 compand=attacks=0:points=-80/-80|-12/-12|20/-12
12320
12321 • Hard noise gate at -35 dB:
12322
12323 compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
12324
12325 • Soft limiter:
12326
12327 compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
12328
12329 compensationdelay
12330 Compensation Delay Line is a metric based delay to compensate differing
12331 positions of microphones or speakers.
12332
12333 For example, you have recorded guitar with two microphones placed in
12334 different locations. Because the front of sound wave has fixed speed in
12335 normal conditions, the phasing of microphones can vary and depends on
12336 their location and interposition. The best sound mix can be achieved
12337 when these microphones are in phase (synchronized). Note that a
12338 distance of ~30 cm between microphones makes one microphone capture the
12339 signal in antiphase to the other microphone. That makes the final mix
12340 sound moody. This filter helps to solve phasing problems by adding
12341 different delays to each microphone track and make them synchronized.
12342
12343 The best result can be reached when you take one track as base and
12344 synchronize other tracks one by one with it. Remember that
12345 synchronization/delay tolerance depends on sample rate, too. Higher
12346 sample rates will give more tolerance.
12347
12348 The filter accepts the following parameters:
12349
12350 mm Set millimeters distance. This is compensation distance for fine
12351 tuning. Default is 0.
12352
12353 cm Set cm distance. This is compensation distance for tightening
12354 distance setup. Default is 0.
12355
12356 m Set meters distance. This is compensation distance for hard
12357 distance setup. Default is 0.
12358
12359 dry Set dry amount. Amount of unprocessed (dry) signal. Default is 0.
12360
12361 wet Set wet amount. Amount of processed (wet) signal. Default is 1.
12362
12363 temp
12364 Set temperature in degrees Celsius. This is the temperature of the
12365 environment. Default is 20.
12366
12367 crossfeed
12368 Apply headphone crossfeed filter.
12369
12370 Crossfeed is the process of blending the left and right channels of
12371 stereo audio recording. It is mainly used to reduce extreme stereo
12372 separation of low frequencies.
12373
12374 The intent is to produce more speaker like sound to the listener.
12375
12376 The filter accepts the following options:
12377
12378 strength
12379 Set strength of crossfeed. Default is 0.2. Allowed range is from 0
12380 to 1. This sets gain of low shelf filter for side part of stereo
12381 image. Default is -6dB. Max allowed is -30db when strength is set
12382 to 1.
12383
12384 range
12385 Set soundstage wideness. Default is 0.5. Allowed range is from 0 to
12386 1. This sets cut off frequency of low shelf filter. Default is cut
12387 off near 1550 Hz. With range set to 1 cut off frequency is set to
12388 2100 Hz.
12389
12390 slope
12391 Set curve slope of low shelf filter. Default is 0.5. Allowed range
12392 is from 0.01 to 1.
12393
12394 level_in
12395 Set input gain. Default is 0.9.
12396
12397 level_out
12398 Set output gain. Default is 1.
12399
12400 Commands
12401
12402 This filter supports the all above options as commands.
12403
12404 crystalizer
12405 Simple algorithm for audio noise sharpening.
12406
12407 This filter linearly increases differences betweeen each audio sample.
12408
12409 The filter accepts the following options:
12410
12411 i Sets the intensity of effect (default: 2.0). Must be in range
12412 between -10.0 to 0 (unchanged sound) to 10.0 (maximum effect). To
12413 inverse filtering use negative value.
12414
12415 c Enable clipping. By default is enabled.
12416
12417 Commands
12418
12419 This filter supports the all above options as commands.
12420
12421 dcshift
12422 Apply a DC shift to the audio.
12423
12424 This can be useful to remove a DC offset (caused perhaps by a hardware
12425 problem in the recording chain) from the audio. The effect of a DC
12426 offset is reduced headroom and hence volume. The astats filter can be
12427 used to determine if a signal has a DC offset.
12428
12429 shift
12430 Set the DC shift, allowed range is [-1, 1]. It indicates the amount
12431 to shift the audio.
12432
12433 limitergain
12434 Optional. It should have a value much less than 1 (e.g. 0.05 or
12435 0.02) and is used to prevent clipping.
12436
12437 deesser
12438 Apply de-essing to the audio samples.
12439
12440 i Set intensity for triggering de-essing. Allowed range is from 0 to
12441 1. Default is 0.
12442
12443 m Set amount of ducking on treble part of sound. Allowed range is
12444 from 0 to 1. Default is 0.5.
12445
12446 f How much of original frequency content to keep when de-essing.
12447 Allowed range is from 0 to 1. Default is 0.5.
12448
12449 s Set the output mode.
12450
12451 It accepts the following values:
12452
12453 i Pass input unchanged.
12454
12455 o Pass ess filtered out.
12456
12457 e Pass only ess.
12458
12459 Default value is o.
12460
12461 drmeter
12462 Measure audio dynamic range.
12463
12464 DR values of 14 and higher is found in very dynamic material. DR of 8
12465 to 13 is found in transition material. And anything less that 8 have
12466 very poor dynamics and is very compressed.
12467
12468 The filter accepts the following options:
12469
12470 length
12471 Set window length in seconds used to split audio into segments of
12472 equal length. Default is 3 seconds.
12473
12474 dynaudnorm
12475 Dynamic Audio Normalizer.
12476
12477 This filter applies a certain amount of gain to the input audio in
12478 order to bring its peak magnitude to a target level (e.g. 0 dBFS).
12479 However, in contrast to more "simple" normalization algorithms, the
12480 Dynamic Audio Normalizer *dynamically* re-adjusts the gain factor to
12481 the input audio. This allows for applying extra gain to the "quiet"
12482 sections of the audio while avoiding distortions or clipping the "loud"
12483 sections. In other words: The Dynamic Audio Normalizer will "even out"
12484 the volume of quiet and loud sections, in the sense that the volume of
12485 each section is brought to the same target level. Note, however, that
12486 the Dynamic Audio Normalizer achieves this goal *without* applying
12487 "dynamic range compressing". It will retain 100% of the dynamic range
12488 *within* each section of the audio file.
12489
12490 framelen, f
12491 Set the frame length in milliseconds. In range from 10 to 8000
12492 milliseconds. Default is 500 milliseconds. The Dynamic Audio
12493 Normalizer processes the input audio in small chunks, referred to
12494 as frames. This is required, because a peak magnitude has no
12495 meaning for just a single sample value. Instead, we need to
12496 determine the peak magnitude for a contiguous sequence of sample
12497 values. While a "standard" normalizer would simply use the peak
12498 magnitude of the complete file, the Dynamic Audio Normalizer
12499 determines the peak magnitude individually for each frame. The
12500 length of a frame is specified in milliseconds. By default, the
12501 Dynamic Audio Normalizer uses a frame length of 500 milliseconds,
12502 which has been found to give good results with most files. Note
12503 that the exact frame length, in number of samples, will be
12504 determined automatically, based on the sampling rate of the
12505 individual input audio file.
12506
12507 gausssize, g
12508 Set the Gaussian filter window size. In range from 3 to 301, must
12509 be odd number. Default is 31. Probably the most important
12510 parameter of the Dynamic Audio Normalizer is the "window size" of
12511 the Gaussian smoothing filter. The filter's window size is
12512 specified in frames, centered around the current frame. For the
12513 sake of simplicity, this must be an odd number. Consequently, the
12514 default value of 31 takes into account the current frame, as well
12515 as the 15 preceding frames and the 15 subsequent frames. Using a
12516 larger window results in a stronger smoothing effect and thus in
12517 less gain variation, i.e. slower gain adaptation. Conversely, using
12518 a smaller window results in a weaker smoothing effect and thus in
12519 more gain variation, i.e. faster gain adaptation. In other words,
12520 the more you increase this value, the more the Dynamic Audio
12521 Normalizer will behave like a "traditional" normalization filter.
12522 On the contrary, the more you decrease this value, the more the
12523 Dynamic Audio Normalizer will behave like a dynamic range
12524 compressor.
12525
12526 peak, p
12527 Set the target peak value. This specifies the highest permissible
12528 magnitude level for the normalized audio input. This filter will
12529 try to approach the target peak magnitude as closely as possible,
12530 but at the same time it also makes sure that the normalized signal
12531 will never exceed the peak magnitude. A frame's maximum local gain
12532 factor is imposed directly by the target peak magnitude. The
12533 default value is 0.95 and thus leaves a headroom of 5%*. It is not
12534 recommended to go above this value.
12535
12536 maxgain, m
12537 Set the maximum gain factor. In range from 1.0 to 100.0. Default is
12538 10.0. The Dynamic Audio Normalizer determines the maximum possible
12539 (local) gain factor for each input frame, i.e. the maximum gain
12540 factor that does not result in clipping or distortion. The maximum
12541 gain factor is determined by the frame's highest magnitude sample.
12542 However, the Dynamic Audio Normalizer additionally bounds the
12543 frame's maximum gain factor by a predetermined (global) maximum
12544 gain factor. This is done in order to avoid excessive gain factors
12545 in "silent" or almost silent frames. By default, the maximum gain
12546 factor is 10.0, For most inputs the default value should be
12547 sufficient and it usually is not recommended to increase this
12548 value. Though, for input with an extremely low overall volume
12549 level, it may be necessary to allow even higher gain factors. Note,
12550 however, that the Dynamic Audio Normalizer does not simply apply a
12551 "hard" threshold (i.e. cut off values above the threshold).
12552 Instead, a "sigmoid" threshold function will be applied. This way,
12553 the gain factors will smoothly approach the threshold value, but
12554 never exceed that value.
12555
12556 targetrms, r
12557 Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 -
12558 disabled. By default, the Dynamic Audio Normalizer performs "peak"
12559 normalization. This means that the maximum local gain factor for
12560 each frame is defined (only) by the frame's highest magnitude
12561 sample. This way, the samples can be amplified as much as possible
12562 without exceeding the maximum signal level, i.e. without clipping.
12563 Optionally, however, the Dynamic Audio Normalizer can also take
12564 into account the frame's root mean square, abbreviated RMS. In
12565 electrical engineering, the RMS is commonly used to determine the
12566 power of a time-varying signal. It is therefore considered that the
12567 RMS is a better approximation of the "perceived loudness" than just
12568 looking at the signal's peak magnitude. Consequently, by adjusting
12569 all frames to a constant RMS value, a uniform "perceived loudness"
12570 can be established. If a target RMS value has been specified, a
12571 frame's local gain factor is defined as the factor that would
12572 result in exactly that RMS value. Note, however, that the maximum
12573 local gain factor is still restricted by the frame's highest
12574 magnitude sample, in order to prevent clipping.
12575
12576 coupling, n
12577 Enable channels coupling. By default is enabled. By default, the
12578 Dynamic Audio Normalizer will amplify all channels by the same
12579 amount. This means the same gain factor will be applied to all
12580 channels, i.e. the maximum possible gain factor is determined by
12581 the "loudest" channel. However, in some recordings, it may happen
12582 that the volume of the different channels is uneven, e.g. one
12583 channel may be "quieter" than the other one(s). In this case, this
12584 option can be used to disable the channel coupling. This way, the
12585 gain factor will be determined independently for each channel,
12586 depending only on the individual channel's highest magnitude
12587 sample. This allows for harmonizing the volume of the different
12588 channels.
12589
12590 correctdc, c
12591 Enable DC bias correction. By default is disabled. An audio signal
12592 (in the time domain) is a sequence of sample values. In the
12593 Dynamic Audio Normalizer these sample values are represented in the
12594 -1.0 to 1.0 range, regardless of the original input format.
12595 Normally, the audio signal, or "waveform", should be centered
12596 around the zero point. That means if we calculate the mean value
12597 of all samples in a file, or in a single frame, then the result
12598 should be 0.0 or at least very close to that value. If, however,
12599 there is a significant deviation of the mean value from 0.0, in
12600 either positive or negative direction, this is referred to as a DC
12601 bias or DC offset. Since a DC bias is clearly undesirable, the
12602 Dynamic Audio Normalizer provides optional DC bias correction.
12603 With DC bias correction enabled, the Dynamic Audio Normalizer will
12604 determine the mean value, or "DC correction" offset, of each input
12605 frame and subtract that value from all of the frame's sample values
12606 which ensures those samples are centered around 0.0 again. Also, in
12607 order to avoid "gaps" at the frame boundaries, the DC correction
12608 offset values will be interpolated smoothly between neighbouring
12609 frames.
12610
12611 altboundary, b
12612 Enable alternative boundary mode. By default is disabled. The
12613 Dynamic Audio Normalizer takes into account a certain neighbourhood
12614 around each frame. This includes the preceding frames as well as
12615 the subsequent frames. However, for the "boundary" frames, located
12616 at the very beginning and at the very end of the audio file, not
12617 all neighbouring frames are available. In particular, for the first
12618 few frames in the audio file, the preceding frames are not known.
12619 And, similarly, for the last few frames in the audio file, the
12620 subsequent frames are not known. Thus, the question arises which
12621 gain factors should be assumed for the missing frames in the
12622 "boundary" region. The Dynamic Audio Normalizer implements two
12623 modes to deal with this situation. The default boundary mode
12624 assumes a gain factor of exactly 1.0 for the missing frames,
12625 resulting in a smooth "fade in" and "fade out" at the beginning and
12626 at the end of the input, respectively.
12627
12628 compress, s
12629 Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
12630 By default, the Dynamic Audio Normalizer does not apply
12631 "traditional" compression. This means that signal peaks will not be
12632 pruned and thus the full dynamic range will be retained within each
12633 local neighbourhood. However, in some cases it may be desirable to
12634 combine the Dynamic Audio Normalizer's normalization algorithm with
12635 a more "traditional" compression. For this purpose, the Dynamic
12636 Audio Normalizer provides an optional compression (thresholding)
12637 function. If (and only if) the compression feature is enabled, all
12638 input frames will be processed by a soft knee thresholding function
12639 prior to the actual normalization process. Put simply, the
12640 thresholding function is going to prune all samples whose magnitude
12641 exceeds a certain threshold value. However, the Dynamic Audio
12642 Normalizer does not simply apply a fixed threshold value. Instead,
12643 the threshold value will be adjusted for each individual frame. In
12644 general, smaller parameters result in stronger compression, and
12645 vice versa. Values below 3.0 are not recommended, because audible
12646 distortion may appear.
12647
12648 threshold, t
12649 Set the target threshold value. This specifies the lowest
12650 permissible magnitude level for the audio input which will be
12651 normalized. If input frame volume is above this value frame will
12652 be normalized. Otherwise frame may not be normalized at all. The
12653 default value is set to 0, which means all input frames will be
12654 normalized. This option is mostly useful if digital noise is not
12655 wanted to be amplified.
12656
12657 Commands
12658
12659 This filter supports the all above options as commands.
12660
12661 earwax
12662 Make audio easier to listen to on headphones.
12663
12664 This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio
12665 so that when listened to on headphones the stereo image is moved from
12666 inside your head (standard for headphones) to outside and in front of
12667 the listener (standard for speakers).
12668
12669 Ported from SoX.
12670
12671 equalizer
12672 Apply a two-pole peaking equalisation (EQ) filter. With this filter,
12673 the signal-level at and around a selected frequency can be increased or
12674 decreased, whilst (unlike bandpass and bandreject filters) that at all
12675 other frequencies is unchanged.
12676
12677 In order to produce complex equalisation curves, this filter can be
12678 given several times, each with a different central frequency.
12679
12680 The filter accepts the following options:
12681
12682 frequency, f
12683 Set the filter's central frequency in Hz.
12684
12685 width_type, t
12686 Set method to specify band-width of filter.
12687
12688 h Hz
12689
12690 q Q-Factor
12691
12692 o octave
12693
12694 s slope
12695
12696 k kHz
12697
12698 width, w
12699 Specify the band-width of a filter in width_type units.
12700
12701 gain, g
12702 Set the required gain or attenuation in dB. Beware of clipping
12703 when using a positive gain.
12704
12705 mix, m
12706 How much to use filtered signal in output. Default is 1. Range is
12707 between 0 and 1.
12708
12709 channels, c
12710 Specify which channels to filter, by default all available are
12711 filtered.
12712
12713 normalize, n
12714 Normalize biquad coefficients, by default is disabled. Enabling it
12715 will normalize magnitude response at DC to 0dB.
12716
12717 transform, a
12718 Set transform type of IIR filter.
12719
12720 di
12721 dii
12722 tdii
12723 latt
12724 svf
12725 precision, r
12726 Set precison of filtering.
12727
12728 auto
12729 Pick automatic sample format depending on surround filters.
12730
12731 s16 Always use signed 16-bit.
12732
12733 s32 Always use signed 32-bit.
12734
12735 f32 Always use float 32-bit.
12736
12737 f64 Always use float 64-bit.
12738
12739 Examples
12740
12741 • Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
12742
12743 equalizer=f=1000:t=h:width=200:g=-10
12744
12745 • Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz
12746 with Q 2:
12747
12748 equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
12749
12750 Commands
12751
12752 This filter supports the following commands:
12753
12754 frequency, f
12755 Change equalizer frequency. Syntax for the command is :
12756 "frequency"
12757
12758 width_type, t
12759 Change equalizer width_type. Syntax for the command is :
12760 "width_type"
12761
12762 width, w
12763 Change equalizer width. Syntax for the command is : "width"
12764
12765 gain, g
12766 Change equalizer gain. Syntax for the command is : "gain"
12767
12768 mix, m
12769 Change equalizer mix. Syntax for the command is : "mix"
12770
12771 extrastereo
12772 Linearly increases the difference between left and right channels which
12773 adds some sort of "live" effect to playback.
12774
12775 The filter accepts the following options:
12776
12777 m Sets the difference coefficient (default: 2.5). 0.0 means mono
12778 sound (average of both channels), with 1.0 sound will be unchanged,
12779 with -1.0 left and right channels will be swapped.
12780
12781 c Enable clipping. By default is enabled.
12782
12783 Commands
12784
12785 This filter supports the all above options as commands.
12786
12787 firequalizer
12788 Apply FIR Equalization using arbitrary frequency response.
12789
12790 The filter accepts the following option:
12791
12792 gain
12793 Set gain curve equation (in dB). The expression can contain
12794 variables:
12795
12796 f the evaluated frequency
12797
12798 sr sample rate
12799
12800 ch channel number, set to 0 when multichannels evaluation is
12801 disabled
12802
12803 chid
12804 channel id, see libavutil/channel_layout.h, set to the first
12805 channel id when multichannels evaluation is disabled
12806
12807 chs number of channels
12808
12809 chlayout
12810 channel_layout, see libavutil/channel_layout.h
12811
12812 and functions:
12813
12814 gain_interpolate(f)
12815 interpolate gain on frequency f based on gain_entry
12816
12817 cubic_interpolate(f)
12818 same as gain_interpolate, but smoother
12819
12820 This option is also available as command. Default is
12821 gain_interpolate(f).
12822
12823 gain_entry
12824 Set gain entry for gain_interpolate function. The expression can
12825 contain functions:
12826
12827 entry(f, g)
12828 store gain entry at frequency f with value g
12829
12830 This option is also available as command.
12831
12832 delay
12833 Set filter delay in seconds. Higher value means more accurate.
12834 Default is 0.01.
12835
12836 accuracy
12837 Set filter accuracy in Hz. Lower value means more accurate.
12838 Default is 5.
12839
12840 wfunc
12841 Set window function. Acceptable values are:
12842
12843 rectangular
12844 rectangular window, useful when gain curve is already smooth
12845
12846 hann
12847 hann window (default)
12848
12849 hamming
12850 hamming window
12851
12852 blackman
12853 blackman window
12854
12855 nuttall3
12856 3-terms continuous 1st derivative nuttall window
12857
12858 mnuttall3
12859 minimum 3-terms discontinuous nuttall window
12860
12861 nuttall
12862 4-terms continuous 1st derivative nuttall window
12863
12864 bnuttall
12865 minimum 4-terms discontinuous nuttall (blackman-nuttall) window
12866
12867 bharris
12868 blackman-harris window
12869
12870 tukey
12871 tukey window
12872
12873 fixed
12874 If enabled, use fixed number of audio samples. This improves speed
12875 when filtering with large delay. Default is disabled.
12876
12877 multi
12878 Enable multichannels evaluation on gain. Default is disabled.
12879
12880 zero_phase
12881 Enable zero phase mode by subtracting timestamp to compensate
12882 delay. Default is disabled.
12883
12884 scale
12885 Set scale used by gain. Acceptable values are:
12886
12887 linlin
12888 linear frequency, linear gain
12889
12890 linlog
12891 linear frequency, logarithmic (in dB) gain (default)
12892
12893 loglin
12894 logarithmic (in octave scale where 20 Hz is 0) frequency,
12895 linear gain
12896
12897 loglog
12898 logarithmic frequency, logarithmic gain
12899
12900 dumpfile
12901 Set file for dumping, suitable for gnuplot.
12902
12903 dumpscale
12904 Set scale for dumpfile. Acceptable values are same with scale
12905 option. Default is linlog.
12906
12907 fft2
12908 Enable 2-channel convolution using complex FFT. This improves speed
12909 significantly. Default is disabled.
12910
12911 min_phase
12912 Enable minimum phase impulse response. Default is disabled.
12913
12914 Examples
12915
12916 • lowpass at 1000 Hz:
12917
12918 firequalizer=gain='if(lt(f,1000), 0, -INF)'
12919
12920 • lowpass at 1000 Hz with gain_entry:
12921
12922 firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
12923
12924 • custom equalization:
12925
12926 firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
12927
12928 • higher delay with zero phase to compensate delay:
12929
12930 firequalizer=delay=0.1:fixed=on:zero_phase=on
12931
12932 • lowpass on left channel, highpass on right channel:
12933
12934 firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
12935 :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
12936
12937 flanger
12938 Apply a flanging effect to the audio.
12939
12940 The filter accepts the following options:
12941
12942 delay
12943 Set base delay in milliseconds. Range from 0 to 30. Default value
12944 is 0.
12945
12946 depth
12947 Set added sweep delay in milliseconds. Range from 0 to 10. Default
12948 value is 2.
12949
12950 regen
12951 Set percentage regeneration (delayed signal feedback). Range from
12952 -95 to 95. Default value is 0.
12953
12954 width
12955 Set percentage of delayed signal mixed with original. Range from 0
12956 to 100. Default value is 71.
12957
12958 speed
12959 Set sweeps per second (Hz). Range from 0.1 to 10. Default value is
12960 0.5.
12961
12962 shape
12963 Set swept wave shape, can be triangular or sinusoidal. Default
12964 value is sinusoidal.
12965
12966 phase
12967 Set swept wave percentage-shift for multi channel. Range from 0 to
12968 100. Default value is 25.
12969
12970 interp
12971 Set delay-line interpolation, linear or quadratic. Default is
12972 linear.
12973
12974 haas
12975 Apply Haas effect to audio.
12976
12977 Note that this makes most sense to apply on mono signals. With this
12978 filter applied to mono signals it give some directionality and
12979 stretches its stereo image.
12980
12981 The filter accepts the following options:
12982
12983 level_in
12984 Set input level. By default is 1, or 0dB
12985
12986 level_out
12987 Set output level. By default is 1, or 0dB.
12988
12989 side_gain
12990 Set gain applied to side part of signal. By default is 1.
12991
12992 middle_source
12993 Set kind of middle source. Can be one of the following:
12994
12995 left
12996 Pick left channel.
12997
12998 right
12999 Pick right channel.
13000
13001 mid Pick middle part signal of stereo image.
13002
13003 side
13004 Pick side part signal of stereo image.
13005
13006 middle_phase
13007 Change middle phase. By default is disabled.
13008
13009 left_delay
13010 Set left channel delay. By default is 2.05 milliseconds.
13011
13012 left_balance
13013 Set left channel balance. By default is -1.
13014
13015 left_gain
13016 Set left channel gain. By default is 1.
13017
13018 left_phase
13019 Change left phase. By default is disabled.
13020
13021 right_delay
13022 Set right channel delay. By defaults is 2.12 milliseconds.
13023
13024 right_balance
13025 Set right channel balance. By default is 1.
13026
13027 right_gain
13028 Set right channel gain. By default is 1.
13029
13030 right_phase
13031 Change right phase. By default is enabled.
13032
13033 hdcd
13034 Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM
13035 stream with embedded HDCD codes is expanded into a 20-bit PCM stream.
13036
13037 The filter supports the Peak Extend and Low-level Gain Adjustment
13038 features of HDCD, and detects the Transient Filter flag.
13039
13040 ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
13041
13042 When using the filter with wav, note the default encoding for wav is
13043 16-bit, so the resulting 20-bit stream will be truncated back to
13044 16-bit. Use something like -acodec pcm_s24le after the filter to get
13045 24-bit PCM output.
13046
13047 ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
13048 ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
13049
13050 The filter accepts the following options:
13051
13052 disable_autoconvert
13053 Disable any automatic format conversion or resampling in the filter
13054 graph.
13055
13056 process_stereo
13057 Process the stereo channels together. If target_gain does not match
13058 between channels, consider it invalid and use the last valid
13059 target_gain.
13060
13061 cdt_ms
13062 Set the code detect timer period in ms.
13063
13064 force_pe
13065 Always extend peaks above -3dBFS even if PE isn't signaled.
13066
13067 analyze_mode
13068 Replace audio with a solid tone and adjust the amplitude to signal
13069 some specific aspect of the decoding process. The output file can
13070 be loaded in an audio editor alongside the original to aid
13071 analysis.
13072
13073 "analyze_mode=pe:force_pe=true" can be used to see all samples
13074 above the PE level.
13075
13076 Modes are:
13077
13078 0, off
13079 Disabled
13080
13081 1, lle
13082 Gain adjustment level at each sample
13083
13084 2, pe
13085 Samples where peak extend occurs
13086
13087 3, cdt
13088 Samples where the code detect timer is active
13089
13090 4, tgm
13091 Samples where the target gain does not match between channels
13092
13093 headphone
13094 Apply head-related transfer functions (HRTFs) to create virtual
13095 loudspeakers around the user for binaural listening via headphones.
13096 The HRIRs are provided via additional streams, for each channel one
13097 stereo input stream is needed.
13098
13099 The filter accepts the following options:
13100
13101 map Set mapping of input streams for convolution. The argument is a
13102 '|'-separated list of channel names in order as they are given as
13103 additional stream inputs for filter. This also specify number of
13104 input streams. Number of input streams must be not less than number
13105 of channels in first stream plus one.
13106
13107 gain
13108 Set gain applied to audio. Value is in dB. Default is 0.
13109
13110 type
13111 Set processing type. Can be time or freq. time is processing audio
13112 in time domain which is slow. freq is processing audio in
13113 frequency domain which is fast. Default is freq.
13114
13115 lfe Set custom gain for LFE channels. Value is in dB. Default is 0.
13116
13117 size
13118 Set size of frame in number of samples which will be processed at
13119 once. Default value is 1024. Allowed range is from 1024 to 96000.
13120
13121 hrir
13122 Set format of hrir stream. Default value is stereo. Alternative
13123 value is multich. If value is set to stereo, number of additional
13124 streams should be greater or equal to number of input channels in
13125 first input stream. Also each additional stream should have stereo
13126 number of channels. If value is set to multich, number of
13127 additional streams should be exactly one. Also number of input
13128 channels of additional stream should be equal or greater than twice
13129 number of channels of first input stream.
13130
13131 Examples
13132
13133 • Full example using wav files as coefficients with amovie filters
13134 for 7.1 downmix, each amovie filter use stereo file with IR
13135 coefficients as input. The files give coefficients for each
13136 position of virtual loudspeaker:
13137
13138 ffmpeg -i input.wav
13139 -filter_complex "amovie=azi_270_ele_0_DFC.wav[sr];amovie=azi_90_ele_0_DFC.wav[sl];amovie=azi_225_ele_0_DFC.wav[br];amovie=azi_135_ele_0_DFC.wav[bl];amovie=azi_0_ele_0_DFC.wav,asplit[fc][lfe];amovie=azi_35_ele_0_DFC.wav[fl];amovie=azi_325_ele_0_DFC.wav[fr];[0:a][fl][fr][fc][lfe][bl][br][sl][sr]headphone=FL|FR|FC|LFE|BL|BR|SL|SR"
13140 output.wav
13141
13142 • Full example using wav files as coefficients with amovie filters
13143 for 7.1 downmix, but now in multich hrir format.
13144
13145 ffmpeg -i input.wav -filter_complex "amovie=minp.wav[hrirs];[0:a][hrirs]headphone=map=FL|FR|FC|LFE|BL|BR|SL|SR:hrir=multich"
13146 output.wav
13147
13148 highpass
13149 Apply a high-pass filter with 3dB point frequency. The filter can be
13150 either single-pole, or double-pole (the default). The filter roll off
13151 at 6dB per pole per octave (20dB per pole per decade).
13152
13153 The filter accepts the following options:
13154
13155 frequency, f
13156 Set frequency in Hz. Default is 3000.
13157
13158 poles, p
13159 Set number of poles. Default is 2.
13160
13161 width_type, t
13162 Set method to specify band-width of filter.
13163
13164 h Hz
13165
13166 q Q-Factor
13167
13168 o octave
13169
13170 s slope
13171
13172 k kHz
13173
13174 width, w
13175 Specify the band-width of a filter in width_type units. Applies
13176 only to double-pole filter. The default is 0.707q and gives a
13177 Butterworth response.
13178
13179 mix, m
13180 How much to use filtered signal in output. Default is 1. Range is
13181 between 0 and 1.
13182
13183 channels, c
13184 Specify which channels to filter, by default all available are
13185 filtered.
13186
13187 normalize, n
13188 Normalize biquad coefficients, by default is disabled. Enabling it
13189 will normalize magnitude response at DC to 0dB.
13190
13191 transform, a
13192 Set transform type of IIR filter.
13193
13194 di
13195 dii
13196 tdii
13197 latt
13198 svf
13199 precision, r
13200 Set precison of filtering.
13201
13202 auto
13203 Pick automatic sample format depending on surround filters.
13204
13205 s16 Always use signed 16-bit.
13206
13207 s32 Always use signed 32-bit.
13208
13209 f32 Always use float 32-bit.
13210
13211 f64 Always use float 64-bit.
13212
13213 Commands
13214
13215 This filter supports the following commands:
13216
13217 frequency, f
13218 Change highpass frequency. Syntax for the command is : "frequency"
13219
13220 width_type, t
13221 Change highpass width_type. Syntax for the command is :
13222 "width_type"
13223
13224 width, w
13225 Change highpass width. Syntax for the command is : "width"
13226
13227 mix, m
13228 Change highpass mix. Syntax for the command is : "mix"
13229
13230 join
13231 Join multiple input streams into one multi-channel stream.
13232
13233 It accepts the following parameters:
13234
13235 inputs
13236 The number of input streams. It defaults to 2.
13237
13238 channel_layout
13239 The desired output channel layout. It defaults to stereo.
13240
13241 map Map channels from inputs to output. The argument is a '|'-separated
13242 list of mappings, each in the "input_idx.in_channel-out_channel"
13243 form. input_idx is the 0-based index of the input stream.
13244 in_channel can be either the name of the input channel (e.g. FL for
13245 front left) or its index in the specified input stream. out_channel
13246 is the name of the output channel.
13247
13248 The filter will attempt to guess the mappings when they are not
13249 specified explicitly. It does so by first trying to find an unused
13250 matching input channel and if that fails it picks the first unused
13251 input channel.
13252
13253 Join 3 inputs (with properly set channel layouts):
13254
13255 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
13256
13257 Build a 5.1 output from 6 single-channel streams:
13258
13259 ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
13260 'join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-SL|4.0-SR|5.0-LFE'
13261 out
13262
13263 ladspa
13264 Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin.
13265
13266 To enable compilation of this filter you need to configure FFmpeg with
13267 "--enable-ladspa".
13268
13269 file, f
13270 Specifies the name of LADSPA plugin library to load. If the
13271 environment variable LADSPA_PATH is defined, the LADSPA plugin is
13272 searched in each one of the directories specified by the colon
13273 separated list in LADSPA_PATH, otherwise in the standard LADSPA
13274 paths, which are in this order: HOME/.ladspa/lib/,
13275 /usr/local/lib/ladspa/, /usr/lib/ladspa/.
13276
13277 plugin, p
13278 Specifies the plugin within the library. Some libraries contain
13279 only one plugin, but others contain many of them. If this is not
13280 set filter will list all available plugins within the specified
13281 library.
13282
13283 controls, c
13284 Set the '|' separated list of controls which are zero or more
13285 floating point values that determine the behavior of the loaded
13286 plugin (for example delay, threshold or gain). Controls need to be
13287 defined using the following syntax:
13288 c0=value0|c1=value1|c2=value2|..., where valuei is the value set on
13289 the i-th control. Alternatively they can be also defined using the
13290 following syntax: value0|value1|value2|..., where valuei is the
13291 value set on the i-th control. If controls is set to "help", all
13292 available controls and their valid ranges are printed.
13293
13294 sample_rate, s
13295 Specify the sample rate, default to 44100. Only used if plugin have
13296 zero inputs.
13297
13298 nb_samples, n
13299 Set the number of samples per channel per each output frame,
13300 default is 1024. Only used if plugin have zero inputs.
13301
13302 duration, d
13303 Set the minimum duration of the sourced audio. See the Time
13304 duration section in the ffmpeg-utils(1) manual for the accepted
13305 syntax. Note that the resulting duration may be greater than the
13306 specified duration, as the generated audio is always cut at the end
13307 of a complete frame. If not specified, or the expressed duration
13308 is negative, the audio is supposed to be generated forever. Only
13309 used if plugin have zero inputs.
13310
13311 latency, l
13312 Enable latency compensation, by default is disabled. Only used if
13313 plugin have inputs.
13314
13315 Examples
13316
13317 • List all available plugins within amp (LADSPA example plugin)
13318 library:
13319
13320 ladspa=file=amp
13321
13322 • List all available controls and their valid ranges for "vcf_notch"
13323 plugin from "VCF" library:
13324
13325 ladspa=f=vcf:p=vcf_notch:c=help
13326
13327 • Simulate low quality audio equipment using "Computer Music Toolkit"
13328 (CMT) plugin library:
13329
13330 ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
13331
13332 • Add reverberation to the audio using TAP-plugins (Tom's Audio
13333 Processing plugins):
13334
13335 ladspa=file=tap_reverb:tap_reverb
13336
13337 • Generate white noise, with 0.2 amplitude:
13338
13339 ladspa=file=cmt:noise_source_white:c=c0=.2
13340
13341 • Generate 20 bpm clicks using plugin "C* Click - Metronome" from the
13342 "C* Audio Plugin Suite" (CAPS) library:
13343
13344 ladspa=file=caps:Click:c=c1=20'
13345
13346 • Apply "C* Eq10X2 - Stereo 10-band equaliser" effect:
13347
13348 ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
13349
13350 • Increase volume by 20dB using fast lookahead limiter from Steve
13351 Harris "SWH Plugins" collection:
13352
13353 ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
13354
13355 • Attenuate low frequencies using Multiband EQ from Steve Harris "SWH
13356 Plugins" collection:
13357
13358 ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
13359
13360 • Reduce stereo image using "Narrower" from the "C* Audio Plugin
13361 Suite" (CAPS) library:
13362
13363 ladspa=caps:Narrower
13364
13365 • Another white noise, now using "C* Audio Plugin Suite" (CAPS)
13366 library:
13367
13368 ladspa=caps:White:.2
13369
13370 • Some fractal noise, using "C* Audio Plugin Suite" (CAPS) library:
13371
13372 ladspa=caps:Fractal:c=c1=1
13373
13374 • Dynamic volume normalization using "VLevel" plugin:
13375
13376 ladspa=vlevel-ladspa:vlevel_mono
13377
13378 Commands
13379
13380 This filter supports the following commands:
13381
13382 cN Modify the N-th control value.
13383
13384 If the specified value is not valid, it is ignored and prior one is
13385 kept.
13386
13387 loudnorm
13388 EBU R128 loudness normalization. Includes both dynamic and linear
13389 normalization modes. Support for both single pass (livestreams, files)
13390 and double pass (files) modes. This algorithm can target IL, LRA, and
13391 maximum true peak. In dynamic mode, to accurately detect true peaks,
13392 the audio stream will be upsampled to 192 kHz. Use the "-ar" option or
13393 "aresample" filter to explicitly set an output sample rate.
13394
13395 The filter accepts the following options:
13396
13397 I, i
13398 Set integrated loudness target. Range is -70.0 - -5.0. Default
13399 value is -24.0.
13400
13401 LRA, lra
13402 Set loudness range target. Range is 1.0 - 20.0. Default value is
13403 7.0.
13404
13405 TP, tp
13406 Set maximum true peak. Range is -9.0 - +0.0. Default value is
13407 -2.0.
13408
13409 measured_I, measured_i
13410 Measured IL of input file. Range is -99.0 - +0.0.
13411
13412 measured_LRA, measured_lra
13413 Measured LRA of input file. Range is 0.0 - 99.0.
13414
13415 measured_TP, measured_tp
13416 Measured true peak of input file. Range is -99.0 - +99.0.
13417
13418 measured_thresh
13419 Measured threshold of input file. Range is -99.0 - +0.0.
13420
13421 offset
13422 Set offset gain. Gain is applied before the true-peak limiter.
13423 Range is -99.0 - +99.0. Default is +0.0.
13424
13425 linear
13426 Normalize by linearly scaling the source audio. "measured_I",
13427 "measured_LRA", "measured_TP", and "measured_thresh" must all be
13428 specified. Target LRA shouldn't be lower than source LRA and the
13429 change in integrated loudness shouldn't result in a true peak which
13430 exceeds the target TP. If any of these conditions aren't met,
13431 normalization mode will revert to dynamic. Options are "true" or
13432 "false". Default is "true".
13433
13434 dual_mono
13435 Treat mono input files as "dual-mono". If a mono file is intended
13436 for playback on a stereo system, its EBU R128 measurement will be
13437 perceptually incorrect. If set to "true", this option will
13438 compensate for this effect. Multi-channel input files are not
13439 affected by this option. Options are true or false. Default is
13440 false.
13441
13442 print_format
13443 Set print format for stats. Options are summary, json, or none.
13444 Default value is none.
13445
13446 lowpass
13447 Apply a low-pass filter with 3dB point frequency. The filter can be
13448 either single-pole or double-pole (the default). The filter roll off
13449 at 6dB per pole per octave (20dB per pole per decade).
13450
13451 The filter accepts the following options:
13452
13453 frequency, f
13454 Set frequency in Hz. Default is 500.
13455
13456 poles, p
13457 Set number of poles. Default is 2.
13458
13459 width_type, t
13460 Set method to specify band-width of filter.
13461
13462 h Hz
13463
13464 q Q-Factor
13465
13466 o octave
13467
13468 s slope
13469
13470 k kHz
13471
13472 width, w
13473 Specify the band-width of a filter in width_type units. Applies
13474 only to double-pole filter. The default is 0.707q and gives a
13475 Butterworth response.
13476
13477 mix, m
13478 How much to use filtered signal in output. Default is 1. Range is
13479 between 0 and 1.
13480
13481 channels, c
13482 Specify which channels to filter, by default all available are
13483 filtered.
13484
13485 normalize, n
13486 Normalize biquad coefficients, by default is disabled. Enabling it
13487 will normalize magnitude response at DC to 0dB.
13488
13489 transform, a
13490 Set transform type of IIR filter.
13491
13492 di
13493 dii
13494 tdii
13495 latt
13496 svf
13497 precision, r
13498 Set precison of filtering.
13499
13500 auto
13501 Pick automatic sample format depending on surround filters.
13502
13503 s16 Always use signed 16-bit.
13504
13505 s32 Always use signed 32-bit.
13506
13507 f32 Always use float 32-bit.
13508
13509 f64 Always use float 64-bit.
13510
13511 Examples
13512
13513 • Lowpass only LFE channel, it LFE is not present it does nothing:
13514
13515 lowpass=c=LFE
13516
13517 Commands
13518
13519 This filter supports the following commands:
13520
13521 frequency, f
13522 Change lowpass frequency. Syntax for the command is : "frequency"
13523
13524 width_type, t
13525 Change lowpass width_type. Syntax for the command is :
13526 "width_type"
13527
13528 width, w
13529 Change lowpass width. Syntax for the command is : "width"
13530
13531 mix, m
13532 Change lowpass mix. Syntax for the command is : "mix"
13533
13534 lv2
13535 Load a LV2 (LADSPA Version 2) plugin.
13536
13537 To enable compilation of this filter you need to configure FFmpeg with
13538 "--enable-lv2".
13539
13540 plugin, p
13541 Specifies the plugin URI. You may need to escape ':'.
13542
13543 controls, c
13544 Set the '|' separated list of controls which are zero or more
13545 floating point values that determine the behavior of the loaded
13546 plugin (for example delay, threshold or gain). If controls is set
13547 to "help", all available controls and their valid ranges are
13548 printed.
13549
13550 sample_rate, s
13551 Specify the sample rate, default to 44100. Only used if plugin have
13552 zero inputs.
13553
13554 nb_samples, n
13555 Set the number of samples per channel per each output frame,
13556 default is 1024. Only used if plugin have zero inputs.
13557
13558 duration, d
13559 Set the minimum duration of the sourced audio. See the Time
13560 duration section in the ffmpeg-utils(1) manual for the accepted
13561 syntax. Note that the resulting duration may be greater than the
13562 specified duration, as the generated audio is always cut at the end
13563 of a complete frame. If not specified, or the expressed duration
13564 is negative, the audio is supposed to be generated forever. Only
13565 used if plugin have zero inputs.
13566
13567 Examples
13568
13569 • Apply bass enhancer plugin from Calf:
13570
13571 lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
13572
13573 • Apply vinyl plugin from Calf:
13574
13575 lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
13576
13577 • Apply bit crusher plugin from ArtyFX:
13578
13579 lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
13580
13581 mcompand
13582 Multiband Compress or expand the audio's dynamic range.
13583
13584 The input audio is divided into bands using 4th order Linkwitz-Riley
13585 IIRs. This is akin to the crossover of a loudspeaker, and results in
13586 flat frequency response when absent compander action.
13587
13588 It accepts the following parameters:
13589
13590 args
13591 This option syntax is: attack,decay,[attack,decay..] soft-knee
13592 points crossover_frequency [delay [initial_volume [gain]]] |
13593 attack,decay ... For explanation of each item refer to compand
13594 filter documentation.
13595
13596 pan
13597 Mix channels with specific gain levels. The filter accepts the output
13598 channel layout followed by a set of channels definitions.
13599
13600 This filter is also designed to efficiently remap the channels of an
13601 audio stream.
13602
13603 The filter accepts parameters of the form: "l|outdef|outdef|..."
13604
13605 l output channel layout or number of channels
13606
13607 outdef
13608 output channel specification, of the form:
13609 "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
13610
13611 out_name
13612 output channel to define, either a channel name (FL, FR, etc.) or a
13613 channel number (c0, c1, etc.)
13614
13615 gain
13616 multiplicative coefficient for the channel, 1 leaving the volume
13617 unchanged
13618
13619 in_name
13620 input channel to use, see out_name for details; it is not possible
13621 to mix named and numbered input channels
13622
13623 If the `=' in a channel specification is replaced by `<', then the
13624 gains for that specification will be renormalized so that the total is
13625 1, thus avoiding clipping noise.
13626
13627 Mixing examples
13628
13629 For example, if you want to down-mix from stereo to mono, but with a
13630 bigger factor for the left channel:
13631
13632 pan=1c|c0=0.9*c0+0.1*c1
13633
13634 A customized down-mix to stereo that works automatically for 3-, 4-, 5-
13635 and 7-channels surround:
13636
13637 pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR
13638
13639 Note that ffmpeg integrates a default down-mix (and up-mix) system that
13640 should be preferred (see "-ac" option) unless you have very specific
13641 needs.
13642
13643 Remapping examples
13644
13645 The channel remapping will be effective if, and only if:
13646
13647 *<gain coefficients are zeroes or ones,>
13648 *<only one input per channel output,>
13649
13650 If all these conditions are satisfied, the filter will notify the user
13651 ("Pure channel mapping detected"), and use an optimized and lossless
13652 method to do the remapping.
13653
13654 For example, if you have a 5.1 source and want a stereo audio stream by
13655 dropping the extra channels:
13656
13657 pan="stereo| c0=FL | c1=FR"
13658
13659 Given the same source, you can also switch front left and front right
13660 channels and keep the input channel layout:
13661
13662 pan="5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5"
13663
13664 If the input is a stereo audio stream, you can mute the front left
13665 channel (and still keep the stereo channel layout) with:
13666
13667 pan="stereo|c1=c1"
13668
13669 Still with a stereo audio stream input, you can copy the right channel
13670 in both front left and right:
13671
13672 pan="stereo| c0=FR | c1=FR"
13673
13674 replaygain
13675 ReplayGain scanner filter. This filter takes an audio stream as an
13676 input and outputs it unchanged. At end of filtering it displays
13677 "track_gain" and "track_peak".
13678
13679 resample
13680 Convert the audio sample format, sample rate and channel layout. It is
13681 not meant to be used directly.
13682
13683 rubberband
13684 Apply time-stretching and pitch-shifting with librubberband.
13685
13686 To enable compilation of this filter, you need to configure FFmpeg with
13687 "--enable-librubberband".
13688
13689 The filter accepts the following options:
13690
13691 tempo
13692 Set tempo scale factor.
13693
13694 pitch
13695 Set pitch scale factor.
13696
13697 transients
13698 Set transients detector. Possible values are:
13699
13700 crisp
13701 mixed
13702 smooth
13703 detector
13704 Set detector. Possible values are:
13705
13706 compound
13707 percussive
13708 soft
13709 phase
13710 Set phase. Possible values are:
13711
13712 laminar
13713 independent
13714 window
13715 Set processing window size. Possible values are:
13716
13717 standard
13718 short
13719 long
13720 smoothing
13721 Set smoothing. Possible values are:
13722
13723 off
13724 on
13725 formant
13726 Enable formant preservation when shift pitching. Possible values
13727 are:
13728
13729 shifted
13730 preserved
13731 pitchq
13732 Set pitch quality. Possible values are:
13733
13734 quality
13735 speed
13736 consistency
13737 channels
13738 Set channels. Possible values are:
13739
13740 apart
13741 together
13742
13743 Commands
13744
13745 This filter supports the following commands:
13746
13747 tempo
13748 Change filter tempo scale factor. Syntax for the command is :
13749 "tempo"
13750
13751 pitch
13752 Change filter pitch scale factor. Syntax for the command is :
13753 "pitch"
13754
13755 sidechaincompress
13756 This filter acts like normal compressor but has the ability to compress
13757 detected signal using second input signal. It needs two input streams
13758 and returns one output stream. First input stream will be processed
13759 depending on second stream signal. The filtered signal then can be
13760 filtered with other filters in later stages of processing. See pan and
13761 amerge filter.
13762
13763 The filter accepts the following options:
13764
13765 level_in
13766 Set input gain. Default is 1. Range is between 0.015625 and 64.
13767
13768 mode
13769 Set mode of compressor operation. Can be "upward" or "downward".
13770 Default is "downward".
13771
13772 threshold
13773 If a signal of second stream raises above this level it will affect
13774 the gain reduction of first stream. By default is 0.125. Range is
13775 between 0.00097563 and 1.
13776
13777 ratio
13778 Set a ratio about which the signal is reduced. 1:2 means that if
13779 the level raised 4dB above the threshold, it will be only 2dB above
13780 after the reduction. Default is 2. Range is between 1 and 20.
13781
13782 attack
13783 Amount of milliseconds the signal has to rise above the threshold
13784 before gain reduction starts. Default is 20. Range is between 0.01
13785 and 2000.
13786
13787 release
13788 Amount of milliseconds the signal has to fall below the threshold
13789 before reduction is decreased again. Default is 250. Range is
13790 between 0.01 and 9000.
13791
13792 makeup
13793 Set the amount by how much signal will be amplified after
13794 processing. Default is 1. Range is from 1 to 64.
13795
13796 knee
13797 Curve the sharp knee around the threshold to enter gain reduction
13798 more softly. Default is 2.82843. Range is between 1 and 8.
13799
13800 link
13801 Choose if the "average" level between all channels of side-chain
13802 stream or the louder("maximum") channel of side-chain stream
13803 affects the reduction. Default is "average".
13804
13805 detection
13806 Should the exact signal be taken in case of "peak" or an RMS one in
13807 case of "rms". Default is "rms" which is mainly smoother.
13808
13809 level_sc
13810 Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
13811
13812 mix How much to use compressed signal in output. Default is 1. Range
13813 is between 0 and 1.
13814
13815 Commands
13816
13817 This filter supports the all above options as commands.
13818
13819 Examples
13820
13821 • Full ffmpeg example taking 2 audio inputs, 1st input to be
13822 compressed depending on the signal of 2nd input and later
13823 compressed signal to be merged with 2nd input:
13824
13825 ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
13826
13827 sidechaingate
13828 A sidechain gate acts like a normal (wideband) gate but has the ability
13829 to filter the detected signal before sending it to the gain reduction
13830 stage. Normally a gate uses the full range signal to detect a level
13831 above the threshold. For example: If you cut all lower frequencies
13832 from your sidechain signal the gate will decrease the volume of your
13833 track only if not enough highs appear. With this technique you are able
13834 to reduce the resonation of a natural drum or remove "rumbling" of
13835 muted strokes from a heavily distorted guitar. It needs two input
13836 streams and returns one output stream. First input stream will be
13837 processed depending on second stream signal.
13838
13839 The filter accepts the following options:
13840
13841 level_in
13842 Set input level before filtering. Default is 1. Allowed range is
13843 from 0.015625 to 64.
13844
13845 mode
13846 Set the mode of operation. Can be "upward" or "downward". Default
13847 is "downward". If set to "upward" mode, higher parts of signal will
13848 be amplified, expanding dynamic range in upward direction.
13849 Otherwise, in case of "downward" lower parts of signal will be
13850 reduced.
13851
13852 range
13853 Set the level of gain reduction when the signal is below the
13854 threshold. Default is 0.06125. Allowed range is from 0 to 1.
13855 Setting this to 0 disables reduction and then filter behaves like
13856 expander.
13857
13858 threshold
13859 If a signal rises above this level the gain reduction is released.
13860 Default is 0.125. Allowed range is from 0 to 1.
13861
13862 ratio
13863 Set a ratio about which the signal is reduced. Default is 2.
13864 Allowed range is from 1 to 9000.
13865
13866 attack
13867 Amount of milliseconds the signal has to rise above the threshold
13868 before gain reduction stops. Default is 20 milliseconds. Allowed
13869 range is from 0.01 to 9000.
13870
13871 release
13872 Amount of milliseconds the signal has to fall below the threshold
13873 before the reduction is increased again. Default is 250
13874 milliseconds. Allowed range is from 0.01 to 9000.
13875
13876 makeup
13877 Set amount of amplification of signal after processing. Default is
13878 1. Allowed range is from 1 to 64.
13879
13880 knee
13881 Curve the sharp knee around the threshold to enter gain reduction
13882 more softly. Default is 2.828427125. Allowed range is from 1 to 8.
13883
13884 detection
13885 Choose if exact signal should be taken for detection or an RMS like
13886 one. Default is rms. Can be peak or rms.
13887
13888 link
13889 Choose if the average level between all channels or the louder
13890 channel affects the reduction. Default is average. Can be average
13891 or maximum.
13892
13893 level_sc
13894 Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
13895
13896 Commands
13897
13898 This filter supports the all above options as commands.
13899
13900 silencedetect
13901 Detect silence in an audio stream.
13902
13903 This filter logs a message when it detects that the input audio volume
13904 is less or equal to a noise tolerance value for a duration greater or
13905 equal to the minimum detected noise duration.
13906
13907 The printed times and duration are expressed in seconds. The
13908 "lavfi.silence_start" or "lavfi.silence_start.X" metadata key is set on
13909 the first frame whose timestamp equals or exceeds the detection
13910 duration and it contains the timestamp of the first frame of the
13911 silence.
13912
13913 The "lavfi.silence_duration" or "lavfi.silence_duration.X" and
13914 "lavfi.silence_end" or "lavfi.silence_end.X" metadata keys are set on
13915 the first frame after the silence. If mono is enabled, and each channel
13916 is evaluated separately, the ".X" suffixed keys are used, and "X"
13917 corresponds to the channel number.
13918
13919 The filter accepts the following options:
13920
13921 noise, n
13922 Set noise tolerance. Can be specified in dB (in case "dB" is
13923 appended to the specified value) or amplitude ratio. Default is
13924 -60dB, or 0.001.
13925
13926 duration, d
13927 Set silence duration until notification (default is 2 seconds). See
13928 the Time duration section in the ffmpeg-utils(1) manual for the
13929 accepted syntax.
13930
13931 mono, m
13932 Process each channel separately, instead of combined. By default is
13933 disabled.
13934
13935 Examples
13936
13937 • Detect 5 seconds of silence with -50dB noise tolerance:
13938
13939 silencedetect=n=-50dB:d=5
13940
13941 • Complete example with ffmpeg to detect silence with 0.0001 noise
13942 tolerance in silence.mp3:
13943
13944 ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
13945
13946 silenceremove
13947 Remove silence from the beginning, middle or end of the audio.
13948
13949 The filter accepts the following options:
13950
13951 start_periods
13952 This value is used to indicate if audio should be trimmed at
13953 beginning of the audio. A value of zero indicates no silence should
13954 be trimmed from the beginning. When specifying a non-zero value, it
13955 trims audio up until it finds non-silence. Normally, when trimming
13956 silence from beginning of audio the start_periods will be 1 but it
13957 can be increased to higher values to trim all audio up to specific
13958 count of non-silence periods. Default value is 0.
13959
13960 start_duration
13961 Specify the amount of time that non-silence must be detected before
13962 it stops trimming audio. By increasing the duration, bursts of
13963 noises can be treated as silence and trimmed off. Default value is
13964 0.
13965
13966 start_threshold
13967 This indicates what sample value should be treated as silence. For
13968 digital audio, a value of 0 may be fine but for audio recorded from
13969 analog, you may wish to increase the value to account for
13970 background noise. Can be specified in dB (in case "dB" is appended
13971 to the specified value) or amplitude ratio. Default value is 0.
13972
13973 start_silence
13974 Specify max duration of silence at beginning that will be kept
13975 after trimming. Default is 0, which is equal to trimming all
13976 samples detected as silence.
13977
13978 start_mode
13979 Specify mode of detection of silence end in start of multi-channel
13980 audio. Can be any or all. Default is any. With any, any sample
13981 that is detected as non-silence will cause stopped trimming of
13982 silence. With all, only if all channels are detected as non-
13983 silence will cause stopped trimming of silence.
13984
13985 stop_periods
13986 Set the count for trimming silence from the end of audio. To
13987 remove silence from the middle of a file, specify a stop_periods
13988 that is negative. This value is then treated as a positive value
13989 and is used to indicate the effect should restart processing as
13990 specified by start_periods, making it suitable for removing periods
13991 of silence in the middle of the audio. Default value is 0.
13992
13993 stop_duration
13994 Specify a duration of silence that must exist before audio is not
13995 copied any more. By specifying a higher duration, silence that is
13996 wanted can be left in the audio. Default value is 0.
13997
13998 stop_threshold
13999 This is the same as start_threshold but for trimming silence from
14000 the end of audio. Can be specified in dB (in case "dB" is appended
14001 to the specified value) or amplitude ratio. Default value is 0.
14002
14003 stop_silence
14004 Specify max duration of silence at end that will be kept after
14005 trimming. Default is 0, which is equal to trimming all samples
14006 detected as silence.
14007
14008 stop_mode
14009 Specify mode of detection of silence start in end of multi-channel
14010 audio. Can be any or all. Default is any. With any, any sample
14011 that is detected as non-silence will cause stopped trimming of
14012 silence. With all, only if all channels are detected as non-
14013 silence will cause stopped trimming of silence.
14014
14015 detection
14016 Set how is silence detected. Can be "rms" or "peak". Second is
14017 faster and works better with digital silence which is exactly 0.
14018 Default value is "rms".
14019
14020 window
14021 Set duration in number of seconds used to calculate size of window
14022 in number of samples for detecting silence. Default value is 0.02.
14023 Allowed range is from 0 to 10.
14024
14025 Examples
14026
14027 • The following example shows how this filter can be used to start a
14028 recording that does not contain the delay at the start which
14029 usually occurs between pressing the record button and the start of
14030 the performance:
14031
14032 silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
14033
14034 • Trim all silence encountered from beginning to end where there is
14035 more than 1 second of silence in audio:
14036
14037 silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
14038
14039 • Trim all digital silence samples, using peak detection, from
14040 beginning to end where there is more than 0 samples of digital
14041 silence in audio and digital silence is detected in all channels at
14042 same positions in stream:
14043
14044 silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
14045
14046 sofalizer
14047 SOFAlizer uses head-related transfer functions (HRTFs) to create
14048 virtual loudspeakers around the user for binaural listening via
14049 headphones (audio formats up to 9 channels supported). The HRTFs are
14050 stored in SOFA files (see <http://www.sofacoustics.org/> for a
14051 database). SOFAlizer is developed at the Acoustics Research Institute
14052 (ARI) of the Austrian Academy of Sciences.
14053
14054 To enable compilation of this filter you need to configure FFmpeg with
14055 "--enable-libmysofa".
14056
14057 The filter accepts the following options:
14058
14059 sofa
14060 Set the SOFA file used for rendering.
14061
14062 gain
14063 Set gain applied to audio. Value is in dB. Default is 0.
14064
14065 rotation
14066 Set rotation of virtual loudspeakers in deg. Default is 0.
14067
14068 elevation
14069 Set elevation of virtual speakers in deg. Default is 0.
14070
14071 radius
14072 Set distance in meters between loudspeakers and the listener with
14073 near-field HRTFs. Default is 1.
14074
14075 type
14076 Set processing type. Can be time or freq. time is processing audio
14077 in time domain which is slow. freq is processing audio in
14078 frequency domain which is fast. Default is freq.
14079
14080 speakers
14081 Set custom positions of virtual loudspeakers. Syntax for this
14082 option is: <CH> <AZIM> <ELEV>[|<CH> <AZIM> <ELEV>|...]. Each
14083 virtual loudspeaker is described with short channel name following
14084 with azimuth and elevation in degrees. Each virtual loudspeaker
14085 description is separated by '|'. For example to override front
14086 left and front right channel positions use: 'speakers=FL 45 15|FR
14087 345 15'. Descriptions with unrecognised channel names are ignored.
14088
14089 lfegain
14090 Set custom gain for LFE channels. Value is in dB. Default is 0.
14091
14092 framesize
14093 Set custom frame size in number of samples. Default is 1024.
14094 Allowed range is from 1024 to 96000. Only used if option type is
14095 set to freq.
14096
14097 normalize
14098 Should all IRs be normalized upon importing SOFA file. By default
14099 is enabled.
14100
14101 interpolate
14102 Should nearest IRs be interpolated with neighbor IRs if exact
14103 position does not match. By default is disabled.
14104
14105 minphase
14106 Minphase all IRs upon loading of SOFA file. By default is disabled.
14107
14108 anglestep
14109 Set neighbor search angle step. Only used if option interpolate is
14110 enabled.
14111
14112 radstep
14113 Set neighbor search radius step. Only used if option interpolate is
14114 enabled.
14115
14116 Examples
14117
14118 • Using ClubFritz6 sofa file:
14119
14120 sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
14121
14122 • Using ClubFritz12 sofa file and bigger radius with small rotation:
14123
14124 sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
14125
14126 • Similar as above but with custom speaker positions for front left,
14127 front right, back left and back right and also with custom gain:
14128
14129 "sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28"
14130
14131 speechnorm
14132 Speech Normalizer.
14133
14134 This filter expands or compresses each half-cycle of audio samples
14135 (local set of samples all above or all below zero and between two
14136 nearest zero crossings) depending on threshold value, so audio reaches
14137 target peak value under conditions controlled by below options.
14138
14139 The filter accepts the following options:
14140
14141 peak, p
14142 Set the expansion target peak value. This specifies the highest
14143 allowed absolute amplitude level for the normalized audio input.
14144 Default value is 0.95. Allowed range is from 0.0 to 1.0.
14145
14146 expansion, e
14147 Set the maximum expansion factor. Allowed range is from 1.0 to
14148 50.0. Default value is 2.0. This option controls maximum local
14149 half-cycle of samples expansion. The maximum expansion would be
14150 such that local peak value reaches target peak value but never to
14151 surpass it and that ratio between new and previous peak value does
14152 not surpass this option value.
14153
14154 compression, c
14155 Set the maximum compression factor. Allowed range is from 1.0 to
14156 50.0. Default value is 2.0. This option controls maximum local
14157 half-cycle of samples compression. This option is used only if
14158 threshold option is set to value greater than 0.0, then in such
14159 cases when local peak is lower or same as value set by threshold
14160 all samples belonging to that peak's half-cycle will be compressed
14161 by current compression factor.
14162
14163 threshold, t
14164 Set the threshold value. Default value is 0.0. Allowed range is
14165 from 0.0 to 1.0. This option specifies which half-cycles of
14166 samples will be compressed and which will be expanded. Any half-
14167 cycle samples with their local peak value below or same as this
14168 option value will be compressed by current compression factor,
14169 otherwise, if greater than threshold value they will be expanded
14170 with expansion factor so that it could reach peak target value but
14171 never surpass it.
14172
14173 raise, r
14174 Set the expansion raising amount per each half-cycle of samples.
14175 Default value is 0.001. Allowed range is from 0.0 to 1.0. This
14176 controls how fast expansion factor is raised per each new half-
14177 cycle until it reaches expansion value. Setting this options too
14178 high may lead to distortions.
14179
14180 fall, f
14181 Set the compression raising amount per each half-cycle of samples.
14182 Default value is 0.001. Allowed range is from 0.0 to 1.0. This
14183 controls how fast compression factor is raised per each new half-
14184 cycle until it reaches compression value.
14185
14186 channels, h
14187 Specify which channels to filter, by default all available channels
14188 are filtered.
14189
14190 invert, i
14191 Enable inverted filtering, by default is disabled. This inverts
14192 interpretation of threshold option. When enabled any half-cycle of
14193 samples with their local peak value below or same as threshold
14194 option will be expanded otherwise it will be compressed.
14195
14196 link, l
14197 Link channels when calculating gain applied to each filtered
14198 channel sample, by default is disabled. When disabled each
14199 filtered channel gain calculation is independent, otherwise when
14200 this option is enabled the minimum of all possible gains for each
14201 filtered channel is used.
14202
14203 Commands
14204
14205 This filter supports the all above options as commands.
14206
14207 stereotools
14208 This filter has some handy utilities to manage stereo signals, for
14209 converting M/S stereo recordings to L/R signal while having control
14210 over the parameters or spreading the stereo image of master track.
14211
14212 The filter accepts the following options:
14213
14214 level_in
14215 Set input level before filtering for both channels. Defaults is 1.
14216 Allowed range is from 0.015625 to 64.
14217
14218 level_out
14219 Set output level after filtering for both channels. Defaults is 1.
14220 Allowed range is from 0.015625 to 64.
14221
14222 balance_in
14223 Set input balance between both channels. Default is 0. Allowed
14224 range is from -1 to 1.
14225
14226 balance_out
14227 Set output balance between both channels. Default is 0. Allowed
14228 range is from -1 to 1.
14229
14230 softclip
14231 Enable softclipping. Results in analog distortion instead of harsh
14232 digital 0dB clipping. Disabled by default.
14233
14234 mutel
14235 Mute the left channel. Disabled by default.
14236
14237 muter
14238 Mute the right channel. Disabled by default.
14239
14240 phasel
14241 Change the phase of the left channel. Disabled by default.
14242
14243 phaser
14244 Change the phase of the right channel. Disabled by default.
14245
14246 mode
14247 Set stereo mode. Available values are:
14248
14249 lr>lr
14250 Left/Right to Left/Right, this is default.
14251
14252 lr>ms
14253 Left/Right to Mid/Side.
14254
14255 ms>lr
14256 Mid/Side to Left/Right.
14257
14258 lr>ll
14259 Left/Right to Left/Left.
14260
14261 lr>rr
14262 Left/Right to Right/Right.
14263
14264 lr>l+r
14265 Left/Right to Left + Right.
14266
14267 lr>rl
14268 Left/Right to Right/Left.
14269
14270 ms>ll
14271 Mid/Side to Left/Left.
14272
14273 ms>rr
14274 Mid/Side to Right/Right.
14275
14276 ms>rl
14277 Mid/Side to Right/Left.
14278
14279 lr>l-r
14280 Left/Right to Left - Right.
14281
14282 slev
14283 Set level of side signal. Default is 1. Allowed range is from
14284 0.015625 to 64.
14285
14286 sbal
14287 Set balance of side signal. Default is 0. Allowed range is from -1
14288 to 1.
14289
14290 mlev
14291 Set level of the middle signal. Default is 1. Allowed range is
14292 from 0.015625 to 64.
14293
14294 mpan
14295 Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
14296
14297 base
14298 Set stereo base between mono and inversed channels. Default is 0.
14299 Allowed range is from -1 to 1.
14300
14301 delay
14302 Set delay in milliseconds how much to delay left from right channel
14303 and vice versa. Default is 0. Allowed range is from -20 to 20.
14304
14305 sclevel
14306 Set S/C level. Default is 1. Allowed range is from 1 to 100.
14307
14308 phase
14309 Set the stereo phase in degrees. Default is 0. Allowed range is
14310 from 0 to 360.
14311
14312 bmode_in, bmode_out
14313 Set balance mode for balance_in/balance_out option.
14314
14315 Can be one of the following:
14316
14317 balance
14318 Classic balance mode. Attenuate one channel at time. Gain is
14319 raised up to 1.
14320
14321 amplitude
14322 Similar as classic mode above but gain is raised up to 2.
14323
14324 power
14325 Equal power distribution, from -6dB to +6dB range.
14326
14327 Commands
14328
14329 This filter supports the all above options as commands.
14330
14331 Examples
14332
14333 • Apply karaoke like effect:
14334
14335 stereotools=mlev=0.015625
14336
14337 • Convert M/S signal to L/R:
14338
14339 "stereotools=mode=ms>lr"
14340
14341 stereowiden
14342 This filter enhance the stereo effect by suppressing signal common to
14343 both channels and by delaying the signal of left into right and vice
14344 versa, thereby widening the stereo effect.
14345
14346 The filter accepts the following options:
14347
14348 delay
14349 Time in milliseconds of the delay of left signal into right and
14350 vice versa. Default is 20 milliseconds.
14351
14352 feedback
14353 Amount of gain in delayed signal into right and vice versa. Gives a
14354 delay effect of left signal in right output and vice versa which
14355 gives widening effect. Default is 0.3.
14356
14357 crossfeed
14358 Cross feed of left into right with inverted phase. This helps in
14359 suppressing the mono. If the value is 1 it will cancel all the
14360 signal common to both channels. Default is 0.3.
14361
14362 drymix
14363 Set level of input signal of original channel. Default is 0.8.
14364
14365 Commands
14366
14367 This filter supports the all above options except "delay" as commands.
14368
14369 superequalizer
14370 Apply 18 band equalizer.
14371
14372 The filter accepts the following options:
14373
14374 1b Set 65Hz band gain.
14375
14376 2b Set 92Hz band gain.
14377
14378 3b Set 131Hz band gain.
14379
14380 4b Set 185Hz band gain.
14381
14382 5b Set 262Hz band gain.
14383
14384 6b Set 370Hz band gain.
14385
14386 7b Set 523Hz band gain.
14387
14388 8b Set 740Hz band gain.
14389
14390 9b Set 1047Hz band gain.
14391
14392 10b Set 1480Hz band gain.
14393
14394 11b Set 2093Hz band gain.
14395
14396 12b Set 2960Hz band gain.
14397
14398 13b Set 4186Hz band gain.
14399
14400 14b Set 5920Hz band gain.
14401
14402 15b Set 8372Hz band gain.
14403
14404 16b Set 11840Hz band gain.
14405
14406 17b Set 16744Hz band gain.
14407
14408 18b Set 20000Hz band gain.
14409
14410 surround
14411 Apply audio surround upmix filter.
14412
14413 This filter allows to produce multichannel output from audio stream.
14414
14415 The filter accepts the following options:
14416
14417 chl_out
14418 Set output channel layout. By default, this is 5.1.
14419
14420 See the Channel Layout section in the ffmpeg-utils(1) manual for
14421 the required syntax.
14422
14423 chl_in
14424 Set input channel layout. By default, this is stereo.
14425
14426 See the Channel Layout section in the ffmpeg-utils(1) manual for
14427 the required syntax.
14428
14429 level_in
14430 Set input volume level. By default, this is 1.
14431
14432 level_out
14433 Set output volume level. By default, this is 1.
14434
14435 lfe Enable LFE channel output if output channel layout has it. By
14436 default, this is enabled.
14437
14438 lfe_low
14439 Set LFE low cut off frequency. By default, this is 128 Hz.
14440
14441 lfe_high
14442 Set LFE high cut off frequency. By default, this is 256 Hz.
14443
14444 lfe_mode
14445 Set LFE mode, can be add or sub. Default is add. In add mode, LFE
14446 channel is created from input audio and added to output. In sub
14447 mode, LFE channel is created from input audio and added to output
14448 but also all non-LFE output channels are subtracted with output LFE
14449 channel.
14450
14451 angle
14452 Set angle of stereo surround transform, Allowed range is from 0 to
14453 360. Default is 90.
14454
14455 fc_in
14456 Set front center input volume. By default, this is 1.
14457
14458 fc_out
14459 Set front center output volume. By default, this is 1.
14460
14461 fl_in
14462 Set front left input volume. By default, this is 1.
14463
14464 fl_out
14465 Set front left output volume. By default, this is 1.
14466
14467 fr_in
14468 Set front right input volume. By default, this is 1.
14469
14470 fr_out
14471 Set front right output volume. By default, this is 1.
14472
14473 sl_in
14474 Set side left input volume. By default, this is 1.
14475
14476 sl_out
14477 Set side left output volume. By default, this is 1.
14478
14479 sr_in
14480 Set side right input volume. By default, this is 1.
14481
14482 sr_out
14483 Set side right output volume. By default, this is 1.
14484
14485 bl_in
14486 Set back left input volume. By default, this is 1.
14487
14488 bl_out
14489 Set back left output volume. By default, this is 1.
14490
14491 br_in
14492 Set back right input volume. By default, this is 1.
14493
14494 br_out
14495 Set back right output volume. By default, this is 1.
14496
14497 bc_in
14498 Set back center input volume. By default, this is 1.
14499
14500 bc_out
14501 Set back center output volume. By default, this is 1.
14502
14503 lfe_in
14504 Set LFE input volume. By default, this is 1.
14505
14506 lfe_out
14507 Set LFE output volume. By default, this is 1.
14508
14509 allx
14510 Set spread usage of stereo image across X axis for all channels.
14511
14512 ally
14513 Set spread usage of stereo image across Y axis for all channels.
14514
14515 fcx, flx, frx, blx, brx, slx, srx, bcx
14516 Set spread usage of stereo image across X axis for each channel.
14517
14518 fcy, fly, fry, bly, bry, sly, sry, bcy
14519 Set spread usage of stereo image across Y axis for each channel.
14520
14521 win_size
14522 Set window size. Allowed range is from 1024 to 65536. Default size
14523 is 4096.
14524
14525 win_func
14526 Set window function.
14527
14528 It accepts the following values:
14529
14530 rect
14531 bartlett
14532 hann, hanning
14533 hamming
14534 blackman
14535 welch
14536 flattop
14537 bharris
14538 bnuttall
14539 bhann
14540 sine
14541 nuttall
14542 lanczos
14543 gauss
14544 tukey
14545 dolph
14546 cauchy
14547 parzen
14548 poisson
14549 bohman
14550
14551 Default is "hann".
14552
14553 overlap
14554 Set window overlap. If set to 1, the recommended overlap for
14555 selected window function will be picked. Default is 0.5.
14556
14557 treble, highshelf
14558 Boost or cut treble (upper) frequencies of the audio using a two-pole
14559 shelving filter with a response similar to that of a standard hi-fi's
14560 tone-controls. This is also known as shelving equalisation (EQ).
14561
14562 The filter accepts the following options:
14563
14564 gain, g
14565 Give the gain at whichever is the lower of ~22 kHz and the Nyquist
14566 frequency. Its useful range is about -20 (for a large cut) to +20
14567 (for a large boost). Beware of clipping when using a positive gain.
14568
14569 frequency, f
14570 Set the filter's central frequency and so can be used to extend or
14571 reduce the frequency range to be boosted or cut. The default value
14572 is 3000 Hz.
14573
14574 width_type, t
14575 Set method to specify band-width of filter.
14576
14577 h Hz
14578
14579 q Q-Factor
14580
14581 o octave
14582
14583 s slope
14584
14585 k kHz
14586
14587 width, w
14588 Determine how steep is the filter's shelf transition.
14589
14590 poles, p
14591 Set number of poles. Default is 2.
14592
14593 mix, m
14594 How much to use filtered signal in output. Default is 1. Range is
14595 between 0 and 1.
14596
14597 channels, c
14598 Specify which channels to filter, by default all available are
14599 filtered.
14600
14601 normalize, n
14602 Normalize biquad coefficients, by default is disabled. Enabling it
14603 will normalize magnitude response at DC to 0dB.
14604
14605 transform, a
14606 Set transform type of IIR filter.
14607
14608 di
14609 dii
14610 tdii
14611 latt
14612 svf
14613 precision, r
14614 Set precison of filtering.
14615
14616 auto
14617 Pick automatic sample format depending on surround filters.
14618
14619 s16 Always use signed 16-bit.
14620
14621 s32 Always use signed 32-bit.
14622
14623 f32 Always use float 32-bit.
14624
14625 f64 Always use float 64-bit.
14626
14627 Commands
14628
14629 This filter supports the following commands:
14630
14631 frequency, f
14632 Change treble frequency. Syntax for the command is : "frequency"
14633
14634 width_type, t
14635 Change treble width_type. Syntax for the command is : "width_type"
14636
14637 width, w
14638 Change treble width. Syntax for the command is : "width"
14639
14640 gain, g
14641 Change treble gain. Syntax for the command is : "gain"
14642
14643 mix, m
14644 Change treble mix. Syntax for the command is : "mix"
14645
14646 tremolo
14647 Sinusoidal amplitude modulation.
14648
14649 The filter accepts the following options:
14650
14651 f Modulation frequency in Hertz. Modulation frequencies in the
14652 subharmonic range (20 Hz or lower) will result in a tremolo effect.
14653 This filter may also be used as a ring modulator by specifying a
14654 modulation frequency higher than 20 Hz. Range is 0.1 - 20000.0.
14655 Default value is 5.0 Hz.
14656
14657 d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default
14658 value is 0.5.
14659
14660 vibrato
14661 Sinusoidal phase modulation.
14662
14663 The filter accepts the following options:
14664
14665 f Modulation frequency in Hertz. Range is 0.1 - 20000.0. Default
14666 value is 5.0 Hz.
14667
14668 d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default
14669 value is 0.5.
14670
14671 volume
14672 Adjust the input audio volume.
14673
14674 It accepts the following parameters:
14675
14676 volume
14677 Set audio volume expression.
14678
14679 Output values are clipped to the maximum value.
14680
14681 The output audio volume is given by the relation:
14682
14683 <output_volume> = <volume> * <input_volume>
14684
14685 The default value for volume is "1.0".
14686
14687 precision
14688 This parameter represents the mathematical precision.
14689
14690 It determines which input sample formats will be allowed, which
14691 affects the precision of the volume scaling.
14692
14693 fixed
14694 8-bit fixed-point; this limits input sample format to U8, S16,
14695 and S32.
14696
14697 float
14698 32-bit floating-point; this limits input sample format to FLT.
14699 (default)
14700
14701 double
14702 64-bit floating-point; this limits input sample format to DBL.
14703
14704 replaygain
14705 Choose the behaviour on encountering ReplayGain side data in input
14706 frames.
14707
14708 drop
14709 Remove ReplayGain side data, ignoring its contents (the
14710 default).
14711
14712 ignore
14713 Ignore ReplayGain side data, but leave it in the frame.
14714
14715 track
14716 Prefer the track gain, if present.
14717
14718 album
14719 Prefer the album gain, if present.
14720
14721 replaygain_preamp
14722 Pre-amplification gain in dB to apply to the selected replaygain
14723 gain.
14724
14725 Default value for replaygain_preamp is 0.0.
14726
14727 replaygain_noclip
14728 Prevent clipping by limiting the gain applied.
14729
14730 Default value for replaygain_noclip is 1.
14731
14732 eval
14733 Set when the volume expression is evaluated.
14734
14735 It accepts the following values:
14736
14737 once
14738 only evaluate expression once during the filter initialization,
14739 or when the volume command is sent
14740
14741 frame
14742 evaluate expression for each incoming frame
14743
14744 Default value is once.
14745
14746 The volume expression can contain the following parameters.
14747
14748 n frame number (starting at zero)
14749
14750 nb_channels
14751 number of channels
14752
14753 nb_consumed_samples
14754 number of samples consumed by the filter
14755
14756 nb_samples
14757 number of samples in the current frame
14758
14759 pos original frame position in the file
14760
14761 pts frame PTS
14762
14763 sample_rate
14764 sample rate
14765
14766 startpts
14767 PTS at start of stream
14768
14769 startt
14770 time at start of stream
14771
14772 t frame time
14773
14774 tb timestamp timebase
14775
14776 volume
14777 last set volume value
14778
14779 Note that when eval is set to once only the sample_rate and tb
14780 variables are available, all other variables will evaluate to NAN.
14781
14782 Commands
14783
14784 This filter supports the following commands:
14785
14786 volume
14787 Modify the volume expression. The command accepts the same syntax
14788 of the corresponding option.
14789
14790 If the specified expression is not valid, it is kept at its current
14791 value.
14792
14793 Examples
14794
14795 • Halve the input audio volume:
14796
14797 volume=volume=0.5
14798 volume=volume=1/2
14799 volume=volume=-6.0206dB
14800
14801 In all the above example the named key for volume can be omitted,
14802 for example like in:
14803
14804 volume=0.5
14805
14806 • Increase input audio power by 6 decibels using fixed-point
14807 precision:
14808
14809 volume=volume=6dB:precision=fixed
14810
14811 • Fade volume after time 10 with an annihilation period of 5 seconds:
14812
14813 volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
14814
14815 volumedetect
14816 Detect the volume of the input video.
14817
14818 The filter has no parameters. The input is not modified. Statistics
14819 about the volume will be printed in the log when the input stream end
14820 is reached.
14821
14822 In particular it will show the mean volume (root mean square), maximum
14823 volume (on a per-sample basis), and the beginning of a histogram of the
14824 registered volume values (from the maximum value to a cumulated 1/1000
14825 of the samples).
14826
14827 All volumes are in decibels relative to the maximum PCM value.
14828
14829 Examples
14830
14831 Here is an excerpt of the output:
14832
14833 [Parsed_volumedetect_0 0xa23120] mean_volume: -27 dB
14834 [Parsed_volumedetect_0 0xa23120] max_volume: -4 dB
14835 [Parsed_volumedetect_0 0xa23120] histogram_4db: 6
14836 [Parsed_volumedetect_0 0xa23120] histogram_5db: 62
14837 [Parsed_volumedetect_0 0xa23120] histogram_6db: 286
14838 [Parsed_volumedetect_0 0xa23120] histogram_7db: 1042
14839 [Parsed_volumedetect_0 0xa23120] histogram_8db: 2551
14840 [Parsed_volumedetect_0 0xa23120] histogram_9db: 4609
14841 [Parsed_volumedetect_0 0xa23120] histogram_10db: 8409
14842
14843 It means that:
14844
14845 • The mean square energy is approximately -27 dB, or 10^-2.7.
14846
14847 • The largest sample is at -4 dB, or more precisely between -4 dB and
14848 -5 dB.
14849
14850 • There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
14851
14852 In other words, raising the volume by +4 dB does not cause any
14853 clipping, raising it by +5 dB causes clipping for 6 samples, etc.
14854
14856 Below is a description of the currently available audio sources.
14857
14858 abuffer
14859 Buffer audio frames, and make them available to the filter chain.
14860
14861 This source is mainly intended for a programmatic use, in particular
14862 through the interface defined in libavfilter/buffersrc.h.
14863
14864 It accepts the following parameters:
14865
14866 time_base
14867 The timebase which will be used for timestamps of submitted frames.
14868 It must be either a floating-point number or in
14869 numerator/denominator form.
14870
14871 sample_rate
14872 The sample rate of the incoming audio buffers.
14873
14874 sample_fmt
14875 The sample format of the incoming audio buffers. Either a sample
14876 format name or its corresponding integer representation from the
14877 enum AVSampleFormat in libavutil/samplefmt.h
14878
14879 channel_layout
14880 The channel layout of the incoming audio buffers. Either a channel
14881 layout name from channel_layout_map in libavutil/channel_layout.c
14882 or its corresponding integer representation from the AV_CH_LAYOUT_*
14883 macros in libavutil/channel_layout.h
14884
14885 channels
14886 The number of channels of the incoming audio buffers. If both
14887 channels and channel_layout are specified, then they must be
14888 consistent.
14889
14890 Examples
14891
14892 abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
14893
14894 will instruct the source to accept planar 16bit signed stereo at
14895 44100Hz. Since the sample format with name "s16p" corresponds to the
14896 number 6 and the "stereo" channel layout corresponds to the value 0x3,
14897 this is equivalent to:
14898
14899 abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
14900
14901 aevalsrc
14902 Generate an audio signal specified by an expression.
14903
14904 This source accepts in input one or more expressions (one for each
14905 channel), which are evaluated and used to generate a corresponding
14906 audio signal.
14907
14908 This source accepts the following options:
14909
14910 exprs
14911 Set the '|'-separated expressions list for each separate channel.
14912 In case the channel_layout option is not specified, the selected
14913 channel layout depends on the number of provided expressions.
14914 Otherwise the last specified expression is applied to the remaining
14915 output channels.
14916
14917 channel_layout, c
14918 Set the channel layout. The number of channels in the specified
14919 layout must be equal to the number of specified expressions.
14920
14921 duration, d
14922 Set the minimum duration of the sourced audio. See the Time
14923 duration section in the ffmpeg-utils(1) manual for the accepted
14924 syntax. Note that the resulting duration may be greater than the
14925 specified duration, as the generated audio is always cut at the end
14926 of a complete frame.
14927
14928 If not specified, or the expressed duration is negative, the audio
14929 is supposed to be generated forever.
14930
14931 nb_samples, n
14932 Set the number of samples per channel per each output frame,
14933 default to 1024.
14934
14935 sample_rate, s
14936 Specify the sample rate, default to 44100.
14937
14938 Each expression in exprs can contain the following constants:
14939
14940 n number of the evaluated sample, starting from 0
14941
14942 t time of the evaluated sample expressed in seconds, starting from 0
14943
14944 s sample rate
14945
14946 Examples
14947
14948 • Generate silence:
14949
14950 aevalsrc=0
14951
14952 • Generate a sin signal with frequency of 440 Hz, set sample rate to
14953 8000 Hz:
14954
14955 aevalsrc="sin(440*2*PI*t):s=8000"
14956
14957 • Generate a two channels signal, specify the channel layout (Front
14958 Center + Back Center) explicitly:
14959
14960 aevalsrc="sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC"
14961
14962 • Generate white noise:
14963
14964 aevalsrc="-2+random(0)"
14965
14966 • Generate an amplitude modulated signal:
14967
14968 aevalsrc="sin(10*2*PI*t)*sin(880*2*PI*t)"
14969
14970 • Generate 2.5 Hz binaural beats on a 360 Hz carrier:
14971
14972 aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)"
14973
14974 afirsrc
14975 Generate a FIR coefficients using frequency sampling method.
14976
14977 The resulting stream can be used with afir filter for filtering the
14978 audio signal.
14979
14980 The filter accepts the following options:
14981
14982 taps, t
14983 Set number of filter coefficents in output audio stream. Default
14984 value is 1025.
14985
14986 frequency, f
14987 Set frequency points from where magnitude and phase are set. This
14988 must be in non decreasing order, and first element must be 0, while
14989 last element must be 1. Elements are separated by white spaces.
14990
14991 magnitude, m
14992 Set magnitude value for every frequency point set by frequency.
14993 Number of values must be same as number of frequency points.
14994 Values are separated by white spaces.
14995
14996 phase, p
14997 Set phase value for every frequency point set by frequency. Number
14998 of values must be same as number of frequency points. Values are
14999 separated by white spaces.
15000
15001 sample_rate, r
15002 Set sample rate, default is 44100.
15003
15004 nb_samples, n
15005 Set number of samples per each frame. Default is 1024.
15006
15007 win_func, w
15008 Set window function. Default is blackman.
15009
15010 anullsrc
15011 The null audio source, return unprocessed audio frames. It is mainly
15012 useful as a template and to be employed in analysis / debugging tools,
15013 or as the source for filters which ignore the input data (for example
15014 the sox synth filter).
15015
15016 This source accepts the following options:
15017
15018 channel_layout, cl
15019 Specifies the channel layout, and can be either an integer or a
15020 string representing a channel layout. The default value of
15021 channel_layout is "stereo".
15022
15023 Check the channel_layout_map definition in
15024 libavutil/channel_layout.c for the mapping between strings and
15025 channel layout values.
15026
15027 sample_rate, r
15028 Specifies the sample rate, and defaults to 44100.
15029
15030 nb_samples, n
15031 Set the number of samples per requested frames.
15032
15033 duration, d
15034 Set the duration of the sourced audio. See the Time duration
15035 section in the ffmpeg-utils(1) manual for the accepted syntax.
15036
15037 If not specified, or the expressed duration is negative, the audio
15038 is supposed to be generated forever.
15039
15040 Examples
15041
15042 • Set the sample rate to 48000 Hz and the channel layout to
15043 AV_CH_LAYOUT_MONO.
15044
15045 anullsrc=r=48000:cl=4
15046
15047 • Do the same operation with a more obvious syntax:
15048
15049 anullsrc=r=48000:cl=mono
15050
15051 All the parameters need to be explicitly defined.
15052
15053 flite
15054 Synthesize a voice utterance using the libflite library.
15055
15056 To enable compilation of this filter you need to configure FFmpeg with
15057 "--enable-libflite".
15058
15059 Note that versions of the flite library prior to 2.0 are not thread-
15060 safe.
15061
15062 The filter accepts the following options:
15063
15064 list_voices
15065 If set to 1, list the names of the available voices and exit
15066 immediately. Default value is 0.
15067
15068 nb_samples, n
15069 Set the maximum number of samples per frame. Default value is 512.
15070
15071 textfile
15072 Set the filename containing the text to speak.
15073
15074 text
15075 Set the text to speak.
15076
15077 voice, v
15078 Set the voice to use for the speech synthesis. Default value is
15079 "kal". See also the list_voices option.
15080
15081 Examples
15082
15083 • Read from file speech.txt, and synthesize the text using the
15084 standard flite voice:
15085
15086 flite=textfile=speech.txt
15087
15088 • Read the specified text selecting the "slt" voice:
15089
15090 flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
15091
15092 • Input text to ffmpeg:
15093
15094 ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
15095
15096 • Make ffplay speak the specified text, using "flite" and the "lavfi"
15097 device:
15098
15099 ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
15100
15101 For more information about libflite, check:
15102 <http://www.festvox.org/flite/>
15103
15104 anoisesrc
15105 Generate a noise audio signal.
15106
15107 The filter accepts the following options:
15108
15109 sample_rate, r
15110 Specify the sample rate. Default value is 48000 Hz.
15111
15112 amplitude, a
15113 Specify the amplitude (0.0 - 1.0) of the generated audio stream.
15114 Default value is 1.0.
15115
15116 duration, d
15117 Specify the duration of the generated audio stream. Not specifying
15118 this option results in noise with an infinite length.
15119
15120 color, colour, c
15121 Specify the color of noise. Available noise colors are white, pink,
15122 brown, blue, violet and velvet. Default color is white.
15123
15124 seed, s
15125 Specify a value used to seed the PRNG.
15126
15127 nb_samples, n
15128 Set the number of samples per each output frame, default is 1024.
15129
15130 Examples
15131
15132 • Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate
15133 and an amplitude of 0.5:
15134
15135 anoisesrc=d=60:c=pink:r=44100:a=0.5
15136
15137 hilbert
15138 Generate odd-tap Hilbert transform FIR coefficients.
15139
15140 The resulting stream can be used with afir filter for phase-shifting
15141 the signal by 90 degrees.
15142
15143 This is used in many matrix coding schemes and for analytic signal
15144 generation. The process is often written as a multiplication by i (or
15145 j), the imaginary unit.
15146
15147 The filter accepts the following options:
15148
15149 sample_rate, s
15150 Set sample rate, default is 44100.
15151
15152 taps, t
15153 Set length of FIR filter, default is 22051.
15154
15155 nb_samples, n
15156 Set number of samples per each frame.
15157
15158 win_func, w
15159 Set window function to be used when generating FIR coefficients.
15160
15161 sinc
15162 Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or
15163 band-reject FIR coefficients.
15164
15165 The resulting stream can be used with afir filter for filtering the
15166 audio signal.
15167
15168 The filter accepts the following options:
15169
15170 sample_rate, r
15171 Set sample rate, default is 44100.
15172
15173 nb_samples, n
15174 Set number of samples per each frame. Default is 1024.
15175
15176 hp Set high-pass frequency. Default is 0.
15177
15178 lp Set low-pass frequency. Default is 0. If high-pass frequency is
15179 lower than low-pass frequency and low-pass frequency is higher than
15180 0 then filter will create band-pass filter coefficients, otherwise
15181 band-reject filter coefficients.
15182
15183 phase
15184 Set filter phase response. Default is 50. Allowed range is from 0
15185 to 100.
15186
15187 beta
15188 Set Kaiser window beta.
15189
15190 att Set stop-band attenuation. Default is 120dB, allowed range is from
15191 40 to 180 dB.
15192
15193 round
15194 Enable rounding, by default is disabled.
15195
15196 hptaps
15197 Set number of taps for high-pass filter.
15198
15199 lptaps
15200 Set number of taps for low-pass filter.
15201
15202 sine
15203 Generate an audio signal made of a sine wave with amplitude 1/8.
15204
15205 The audio signal is bit-exact.
15206
15207 The filter accepts the following options:
15208
15209 frequency, f
15210 Set the carrier frequency. Default is 440 Hz.
15211
15212 beep_factor, b
15213 Enable a periodic beep every second with frequency beep_factor
15214 times the carrier frequency. Default is 0, meaning the beep is
15215 disabled.
15216
15217 sample_rate, r
15218 Specify the sample rate, default is 44100.
15219
15220 duration, d
15221 Specify the duration of the generated audio stream.
15222
15223 samples_per_frame
15224 Set the number of samples per output frame.
15225
15226 The expression can contain the following constants:
15227
15228 n The (sequential) number of the output audio frame, starting
15229 from 0.
15230
15231 pts The PTS (Presentation TimeStamp) of the output audio frame,
15232 expressed in TB units.
15233
15234 t The PTS of the output audio frame, expressed in seconds.
15235
15236 TB The timebase of the output audio frames.
15237
15238 Default is 1024.
15239
15240 Examples
15241
15242 • Generate a simple 440 Hz sine wave:
15243
15244 sine
15245
15246 • Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5
15247 seconds:
15248
15249 sine=220:4:d=5
15250 sine=f=220:b=4:d=5
15251 sine=frequency=220:beep_factor=4:duration=5
15252
15253 • Generate a 1 kHz sine wave following "1602,1601,1602,1601,1602"
15254 NTSC pattern:
15255
15256 sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
15257
15259 Below is a description of the currently available audio sinks.
15260
15261 abuffersink
15262 Buffer audio frames, and make them available to the end of filter
15263 chain.
15264
15265 This sink is mainly intended for programmatic use, in particular
15266 through the interface defined in libavfilter/buffersink.h or the
15267 options system.
15268
15269 It accepts a pointer to an AVABufferSinkContext structure, which
15270 defines the incoming buffers' formats, to be passed as the opaque
15271 parameter to "avfilter_init_filter" for initialization.
15272
15273 anullsink
15274 Null audio sink; do absolutely nothing with the input audio. It is
15275 mainly useful as a template and for use in analysis / debugging tools.
15276
15278 When you configure your FFmpeg build, you can disable any of the
15279 existing filters using "--disable-filters". The configure output will
15280 show the video filters included in your build.
15281
15282 Below is a description of the currently available video filters.
15283
15284 addroi
15285 Mark a region of interest in a video frame.
15286
15287 The frame data is passed through unchanged, but metadata is attached to
15288 the frame indicating regions of interest which can affect the behaviour
15289 of later encoding. Multiple regions can be marked by applying the
15290 filter multiple times.
15291
15292 x Region distance in pixels from the left edge of the frame.
15293
15294 y Region distance in pixels from the top edge of the frame.
15295
15296 w Region width in pixels.
15297
15298 h Region height in pixels.
15299
15300 The parameters x, y, w and h are expressions, and may contain the
15301 following variables:
15302
15303 iw Width of the input frame.
15304
15305 ih Height of the input frame.
15306
15307 qoffset
15308 Quantisation offset to apply within the region.
15309
15310 This must be a real value in the range -1 to +1. A value of zero
15311 indicates no quality change. A negative value asks for better
15312 quality (less quantisation), while a positive value asks for worse
15313 quality (greater quantisation).
15314
15315 The range is calibrated so that the extreme values indicate the
15316 largest possible offset - if the rest of the frame is encoded with
15317 the worst possible quality, an offset of -1 indicates that this
15318 region should be encoded with the best possible quality anyway.
15319 Intermediate values are then interpolated in some codec-dependent
15320 way.
15321
15322 For example, in 10-bit H.264 the quantisation parameter varies
15323 between -12 and 51. A typical qoffset value of -1/10 therefore
15324 indicates that this region should be encoded with a QP around one-
15325 tenth of the full range better than the rest of the frame. So, if
15326 most of the frame were to be encoded with a QP of around 30, this
15327 region would get a QP of around 24 (an offset of approximately
15328 -1/10 * (51 - -12) = -6.3). An extreme value of -1 would indicate
15329 that this region should be encoded with the best possible quality
15330 regardless of the treatment of the rest of the frame - that is,
15331 should be encoded at a QP of -12.
15332
15333 clear
15334 If set to true, remove any existing regions of interest marked on
15335 the frame before adding the new one.
15336
15337 Examples
15338
15339 • Mark the centre quarter of the frame as interesting.
15340
15341 addroi=iw/4:ih/4:iw/2:ih/2:-1/10
15342
15343 • Mark the 100-pixel-wide region on the left edge of the frame as
15344 very uninteresting (to be encoded at much lower quality than the
15345 rest of the frame).
15346
15347 addroi=0:0:100:ih:+1/5
15348
15349 alphaextract
15350 Extract the alpha component from the input as a grayscale video. This
15351 is especially useful with the alphamerge filter.
15352
15353 alphamerge
15354 Add or replace the alpha component of the primary input with the
15355 grayscale value of a second input. This is intended for use with
15356 alphaextract to allow the transmission or storage of frame sequences
15357 that have alpha in a format that doesn't support an alpha channel.
15358
15359 For example, to reconstruct full frames from a normal YUV-encoded video
15360 and a separate video created with alphaextract, you might use:
15361
15362 movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
15363
15364 amplify
15365 Amplify differences between current pixel and pixels of adjacent frames
15366 in same pixel location.
15367
15368 This filter accepts the following options:
15369
15370 radius
15371 Set frame radius. Default is 2. Allowed range is from 1 to 63. For
15372 example radius of 3 will instruct filter to calculate average of 7
15373 frames.
15374
15375 factor
15376 Set factor to amplify difference. Default is 2. Allowed range is
15377 from 0 to 65535.
15378
15379 threshold
15380 Set threshold for difference amplification. Any difference greater
15381 or equal to this value will not alter source pixel. Default is 10.
15382 Allowed range is from 0 to 65535.
15383
15384 tolerance
15385 Set tolerance for difference amplification. Any difference lower to
15386 this value will not alter source pixel. Default is 0. Allowed
15387 range is from 0 to 65535.
15388
15389 low Set lower limit for changing source pixel. Default is 65535.
15390 Allowed range is from 0 to 65535. This option controls maximum
15391 possible value that will decrease source pixel value.
15392
15393 high
15394 Set high limit for changing source pixel. Default is 65535. Allowed
15395 range is from 0 to 65535. This option controls maximum possible
15396 value that will increase source pixel value.
15397
15398 planes
15399 Set which planes to filter. Default is all. Allowed range is from 0
15400 to 15.
15401
15402 Commands
15403
15404 This filter supports the following commands that corresponds to option
15405 of same name:
15406
15407 factor
15408 threshold
15409 tolerance
15410 low
15411 high
15412 planes
15413
15414 ass
15415 Same as the subtitles filter, except that it doesn't require libavcodec
15416 and libavformat to work. On the other hand, it is limited to ASS
15417 (Advanced Substation Alpha) subtitles files.
15418
15419 This filter accepts the following option in addition to the common
15420 options from the subtitles filter:
15421
15422 shaping
15423 Set the shaping engine
15424
15425 Available values are:
15426
15427 auto
15428 The default libass shaping engine, which is the best available.
15429
15430 simple
15431 Fast, font-agnostic shaper that can do only substitutions
15432
15433 complex
15434 Slower shaper using OpenType for substitutions and positioning
15435
15436 The default is "auto".
15437
15438 atadenoise
15439 Apply an Adaptive Temporal Averaging Denoiser to the video input.
15440
15441 The filter accepts the following options:
15442
15443 0a Set threshold A for 1st plane. Default is 0.02. Valid range is 0
15444 to 0.3.
15445
15446 0b Set threshold B for 1st plane. Default is 0.04. Valid range is 0
15447 to 5.
15448
15449 1a Set threshold A for 2nd plane. Default is 0.02. Valid range is 0
15450 to 0.3.
15451
15452 1b Set threshold B for 2nd plane. Default is 0.04. Valid range is 0
15453 to 5.
15454
15455 2a Set threshold A for 3rd plane. Default is 0.02. Valid range is 0
15456 to 0.3.
15457
15458 2b Set threshold B for 3rd plane. Default is 0.04. Valid range is 0
15459 to 5.
15460
15461 Threshold A is designed to react on abrupt changes in the input
15462 signal and threshold B is designed to react on continuous changes
15463 in the input signal.
15464
15465 s Set number of frames filter will use for averaging. Default is 9.
15466 Must be odd number in range [5, 129].
15467
15468 p Set what planes of frame filter will use for averaging. Default is
15469 all.
15470
15471 a Set what variant of algorithm filter will use for averaging.
15472 Default is "p" parallel. Alternatively can be set to "s" serial.
15473
15474 Parallel can be faster then serial, while other way around is never
15475 true. Parallel will abort early on first change being greater then
15476 thresholds, while serial will continue processing other side of
15477 frames if they are equal or below thresholds.
15478
15479 0s
15480 1s
15481 2s Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
15482 Valid range is from 0 to 32767. This options controls weight for
15483 each pixel in radius defined by size. Default value means every
15484 pixel have same weight. Setting this option to 0 effectively
15485 disables filtering.
15486
15487 Commands
15488
15489 This filter supports same commands as options except option "s". The
15490 command accepts the same syntax of the corresponding option.
15491
15492 avgblur
15493 Apply average blur filter.
15494
15495 The filter accepts the following options:
15496
15497 sizeX
15498 Set horizontal radius size.
15499
15500 planes
15501 Set which planes to filter. By default all planes are filtered.
15502
15503 sizeY
15504 Set vertical radius size, if zero it will be same as "sizeX".
15505 Default is 0.
15506
15507 Commands
15508
15509 This filter supports same commands as options. The command accepts the
15510 same syntax of the corresponding option.
15511
15512 If the specified expression is not valid, it is kept at its current
15513 value.
15514
15515 bbox
15516 Compute the bounding box for the non-black pixels in the input frame
15517 luminance plane.
15518
15519 This filter computes the bounding box containing all the pixels with a
15520 luminance value greater than the minimum allowed value. The parameters
15521 describing the bounding box are printed on the filter log.
15522
15523 The filter accepts the following option:
15524
15525 min_val
15526 Set the minimal luminance value. Default is 16.
15527
15528 Commands
15529
15530 This filter supports the all above options as commands.
15531
15532 bilateral
15533 Apply bilateral filter, spatial smoothing while preserving edges.
15534
15535 The filter accepts the following options:
15536
15537 sigmaS
15538 Set sigma of gaussian function to calculate spatial weight.
15539 Allowed range is 0 to 512. Default is 0.1.
15540
15541 sigmaR
15542 Set sigma of gaussian function to calculate range weight. Allowed
15543 range is 0 to 1. Default is 0.1.
15544
15545 planes
15546 Set planes to filter. Default is first only.
15547
15548 Commands
15549
15550 This filter supports the all above options as commands.
15551
15552 bitplanenoise
15553 Show and measure bit plane noise.
15554
15555 The filter accepts the following options:
15556
15557 bitplane
15558 Set which plane to analyze. Default is 1.
15559
15560 filter
15561 Filter out noisy pixels from "bitplane" set above. Default is
15562 disabled.
15563
15564 blackdetect
15565 Detect video intervals that are (almost) completely black. Can be
15566 useful to detect chapter transitions, commercials, or invalid
15567 recordings.
15568
15569 The filter outputs its detection analysis to both the log as well as
15570 frame metadata. If a black segment of at least the specified minimum
15571 duration is found, a line with the start and end timestamps as well as
15572 duration is printed to the log with level "info". In addition, a log
15573 line with level "debug" is printed per frame showing the black amount
15574 detected for that frame.
15575
15576 The filter also attaches metadata to the first frame of a black segment
15577 with key "lavfi.black_start" and to the first frame after the black
15578 segment ends with key "lavfi.black_end". The value is the frame's
15579 timestamp. This metadata is added regardless of the minimum duration
15580 specified.
15581
15582 The filter accepts the following options:
15583
15584 black_min_duration, d
15585 Set the minimum detected black duration expressed in seconds. It
15586 must be a non-negative floating point number.
15587
15588 Default value is 2.0.
15589
15590 picture_black_ratio_th, pic_th
15591 Set the threshold for considering a picture "black". Express the
15592 minimum value for the ratio:
15593
15594 <nb_black_pixels> / <nb_pixels>
15595
15596 for which a picture is considered black. Default value is 0.98.
15597
15598 pixel_black_th, pix_th
15599 Set the threshold for considering a pixel "black".
15600
15601 The threshold expresses the maximum pixel luminance value for which
15602 a pixel is considered "black". The provided value is scaled
15603 according to the following equation:
15604
15605 <absolute_threshold> = <luminance_minimum_value> + <pixel_black_th> * <luminance_range_size>
15606
15607 luminance_range_size and luminance_minimum_value depend on the
15608 input video format, the range is [0-255] for YUV full-range formats
15609 and [16-235] for YUV non full-range formats.
15610
15611 Default value is 0.10.
15612
15613 The following example sets the maximum pixel threshold to the minimum
15614 value, and detects only black intervals of 2 or more seconds:
15615
15616 blackdetect=d=2:pix_th=0.00
15617
15618 blackframe
15619 Detect frames that are (almost) completely black. Can be useful to
15620 detect chapter transitions or commercials. Output lines consist of the
15621 frame number of the detected frame, the percentage of blackness, the
15622 position in the file if known or -1 and the timestamp in seconds.
15623
15624 In order to display the output lines, you need to set the loglevel at
15625 least to the AV_LOG_INFO value.
15626
15627 This filter exports frame metadata "lavfi.blackframe.pblack". The
15628 value represents the percentage of pixels in the picture that are below
15629 the threshold value.
15630
15631 It accepts the following parameters:
15632
15633 amount
15634 The percentage of the pixels that have to be below the threshold;
15635 it defaults to 98.
15636
15637 threshold, thresh
15638 The threshold below which a pixel value is considered black; it
15639 defaults to 32.
15640
15641 blend
15642 Blend two video frames into each other.
15643
15644 The "blend" filter takes two input streams and outputs one stream, the
15645 first input is the "top" layer and second input is "bottom" layer. By
15646 default, the output terminates when the longest input terminates.
15647
15648 The "tblend" (time blend) filter takes two consecutive frames from one
15649 single stream, and outputs the result obtained by blending the new
15650 frame on top of the old frame.
15651
15652 A description of the accepted options follows.
15653
15654 c0_mode
15655 c1_mode
15656 c2_mode
15657 c3_mode
15658 all_mode
15659 Set blend mode for specific pixel component or all pixel components
15660 in case of all_mode. Default value is "normal".
15661
15662 Available values for component modes are:
15663
15664 addition
15665 and
15666 average
15667 bleach
15668 burn
15669 darken
15670 difference
15671 divide
15672 dodge
15673 exclusion
15674 extremity
15675 freeze
15676 geometric
15677 glow
15678 grainextract
15679 grainmerge
15680 hardlight
15681 hardmix
15682 hardoverlay
15683 harmonic
15684 heat
15685 interpolate
15686 lighten
15687 linearlight
15688 multiply
15689 multiply128
15690 negation
15691 normal
15692 or
15693 overlay
15694 phoenix
15695 pinlight
15696 reflect
15697 screen
15698 softdifference
15699 softlight
15700 stain
15701 subtract
15702 vividlight
15703 xor
15704 c0_opacity
15705 c1_opacity
15706 c2_opacity
15707 c3_opacity
15708 all_opacity
15709 Set blend opacity for specific pixel component or all pixel
15710 components in case of all_opacity. Only used in combination with
15711 pixel component blend modes.
15712
15713 c0_expr
15714 c1_expr
15715 c2_expr
15716 c3_expr
15717 all_expr
15718 Set blend expression for specific pixel component or all pixel
15719 components in case of all_expr. Note that related mode options will
15720 be ignored if those are set.
15721
15722 The expressions can use the following variables:
15723
15724 N The sequential number of the filtered frame, starting from 0.
15725
15726 X
15727 Y the coordinates of the current sample
15728
15729 W
15730 H the width and height of currently filtered plane
15731
15732 SW
15733 SH Width and height scale for the plane being filtered. It is the
15734 ratio between the dimensions of the current plane to the luma
15735 plane, e.g. for a "yuv420p" frame, the values are "1,1" for the
15736 luma plane and "0.5,0.5" for the chroma planes.
15737
15738 T Time of the current frame, expressed in seconds.
15739
15740 TOP, A
15741 Value of pixel component at current location for first video
15742 frame (top layer).
15743
15744 BOTTOM, B
15745 Value of pixel component at current location for second video
15746 frame (bottom layer).
15747
15748 The "blend" filter also supports the framesync options.
15749
15750 Examples
15751
15752 • Apply transition from bottom layer to top layer in first 10
15753 seconds:
15754
15755 blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
15756
15757 • Apply linear horizontal transition from top layer to bottom layer:
15758
15759 blend=all_expr='A*(X/W)+B*(1-X/W)'
15760
15761 • Apply 1x1 checkerboard effect:
15762
15763 blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
15764
15765 • Apply uncover left effect:
15766
15767 blend=all_expr='if(gte(N*SW+X,W),A,B)'
15768
15769 • Apply uncover down effect:
15770
15771 blend=all_expr='if(gte(Y-N*SH,0),A,B)'
15772
15773 • Apply uncover up-left effect:
15774
15775 blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
15776
15777 • Split diagonally video and shows top and bottom layer on each side:
15778
15779 blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
15780
15781 • Display differences between the current and the previous frame:
15782
15783 tblend=all_mode=grainextract
15784
15785 Commands
15786
15787 This filter supports same commands as options.
15788
15789 bm3d
15790 Denoise frames using Block-Matching 3D algorithm.
15791
15792 The filter accepts the following options.
15793
15794 sigma
15795 Set denoising strength. Default value is 1. Allowed range is from
15796 0 to 999.9. The denoising algorithm is very sensitive to sigma, so
15797 adjust it according to the source.
15798
15799 block
15800 Set local patch size. This sets dimensions in 2D.
15801
15802 bstep
15803 Set sliding step for processing blocks. Default value is 4.
15804 Allowed range is from 1 to 64. Smaller values allows processing
15805 more reference blocks and is slower.
15806
15807 group
15808 Set maximal number of similar blocks for 3rd dimension. Default
15809 value is 1. When set to 1, no block matching is done. Larger
15810 values allows more blocks in single group. Allowed range is from 1
15811 to 256.
15812
15813 range
15814 Set radius for search block matching. Default is 9. Allowed range
15815 is from 1 to INT32_MAX.
15816
15817 mstep
15818 Set step between two search locations for block matching. Default
15819 is 1. Allowed range is from 1 to 64. Smaller is slower.
15820
15821 thmse
15822 Set threshold of mean square error for block matching. Valid range
15823 is 0 to INT32_MAX.
15824
15825 hdthr
15826 Set thresholding parameter for hard thresholding in 3D transformed
15827 domain. Larger values results in stronger hard-thresholding
15828 filtering in frequency domain.
15829
15830 estim
15831 Set filtering estimation mode. Can be "basic" or "final". Default
15832 is "basic".
15833
15834 ref If enabled, filter will use 2nd stream for block matching. Default
15835 is disabled for "basic" value of estim option, and always enabled
15836 if value of estim is "final".
15837
15838 planes
15839 Set planes to filter. Default is all available except alpha.
15840
15841 Examples
15842
15843 • Basic filtering with bm3d:
15844
15845 bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
15846
15847 • Same as above, but filtering only luma:
15848
15849 bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
15850
15851 • Same as above, but with both estimation modes:
15852
15853 split[a][b],[a]bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic[a],[b][a]bm3d=sigma=3:block=4:bstep=2:group=16:estim=final:ref=1
15854
15855 • Same as above, but prefilter with nlmeans filter instead:
15856
15857 split[a][b],[a]nlmeans=s=3:r=7:p=3[a],[b][a]bm3d=sigma=3:block=4:bstep=2:group=16:estim=final:ref=1
15858
15859 boxblur
15860 Apply a boxblur algorithm to the input video.
15861
15862 It accepts the following parameters:
15863
15864 luma_radius, lr
15865 luma_power, lp
15866 chroma_radius, cr
15867 chroma_power, cp
15868 alpha_radius, ar
15869 alpha_power, ap
15870
15871 A description of the accepted options follows.
15872
15873 luma_radius, lr
15874 chroma_radius, cr
15875 alpha_radius, ar
15876 Set an expression for the box radius in pixels used for blurring
15877 the corresponding input plane.
15878
15879 The radius value must be a non-negative number, and must not be
15880 greater than the value of the expression "min(w,h)/2" for the luma
15881 and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
15882
15883 Default value for luma_radius is "2". If not specified,
15884 chroma_radius and alpha_radius default to the corresponding value
15885 set for luma_radius.
15886
15887 The expressions can contain the following constants:
15888
15889 w
15890 h The input width and height in pixels.
15891
15892 cw
15893 ch The input chroma image width and height in pixels.
15894
15895 hsub
15896 vsub
15897 The horizontal and vertical chroma subsample values. For
15898 example, for the pixel format "yuv422p", hsub is 2 and vsub is
15899 1.
15900
15901 luma_power, lp
15902 chroma_power, cp
15903 alpha_power, ap
15904 Specify how many times the boxblur filter is applied to the
15905 corresponding plane.
15906
15907 Default value for luma_power is 2. If not specified, chroma_power
15908 and alpha_power default to the corresponding value set for
15909 luma_power.
15910
15911 A value of 0 will disable the effect.
15912
15913 Examples
15914
15915 • Apply a boxblur filter with the luma, chroma, and alpha radii set
15916 to 2:
15917
15918 boxblur=luma_radius=2:luma_power=1
15919 boxblur=2:1
15920
15921 • Set the luma radius to 2, and alpha and chroma radius to 0:
15922
15923 boxblur=2:1:cr=0:ar=0
15924
15925 • Set the luma and chroma radii to a fraction of the video dimension:
15926
15927 boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
15928
15929 bwdif
15930 Deinterlace the input video ("bwdif" stands for "Bob Weaver
15931 Deinterlacing Filter").
15932
15933 Motion adaptive deinterlacing based on yadif with the use of w3fdif and
15934 cubic interpolation algorithms. It accepts the following parameters:
15935
15936 mode
15937 The interlacing mode to adopt. It accepts one of the following
15938 values:
15939
15940 0, send_frame
15941 Output one frame for each frame.
15942
15943 1, send_field
15944 Output one frame for each field.
15945
15946 The default value is "send_field".
15947
15948 parity
15949 The picture field parity assumed for the input interlaced video. It
15950 accepts one of the following values:
15951
15952 0, tff
15953 Assume the top field is first.
15954
15955 1, bff
15956 Assume the bottom field is first.
15957
15958 -1, auto
15959 Enable automatic detection of field parity.
15960
15961 The default value is "auto". If the interlacing is unknown or the
15962 decoder does not export this information, top field first will be
15963 assumed.
15964
15965 deint
15966 Specify which frames to deinterlace. Accepts one of the following
15967 values:
15968
15969 0, all
15970 Deinterlace all frames.
15971
15972 1, interlaced
15973 Only deinterlace frames marked as interlaced.
15974
15975 The default value is "all".
15976
15977 cas
15978 Apply Contrast Adaptive Sharpen filter to video stream.
15979
15980 The filter accepts the following options:
15981
15982 strength
15983 Set the sharpening strength. Default value is 0.
15984
15985 planes
15986 Set planes to filter. Default value is to filter all planes except
15987 alpha plane.
15988
15989 Commands
15990
15991 This filter supports same commands as options.
15992
15993 chromahold
15994 Remove all color information for all colors except for certain one.
15995
15996 The filter accepts the following options:
15997
15998 color
15999 The color which will not be replaced with neutral chroma.
16000
16001 similarity
16002 Similarity percentage with the above color. 0.01 matches only the
16003 exact key color, while 1.0 matches everything.
16004
16005 blend
16006 Blend percentage. 0.0 makes pixels either fully gray, or not gray
16007 at all. Higher values result in more preserved color.
16008
16009 yuv Signals that the color passed is already in YUV instead of RGB.
16010
16011 Literal colors like "green" or "red" don't make sense with this
16012 enabled anymore. This can be used to pass exact YUV values as
16013 hexadecimal numbers.
16014
16015 Commands
16016
16017 This filter supports same commands as options. The command accepts the
16018 same syntax of the corresponding option.
16019
16020 If the specified expression is not valid, it is kept at its current
16021 value.
16022
16023 chromakey
16024 YUV colorspace color/chroma keying.
16025
16026 The filter accepts the following options:
16027
16028 color
16029 The color which will be replaced with transparency.
16030
16031 similarity
16032 Similarity percentage with the key color.
16033
16034 0.01 matches only the exact key color, while 1.0 matches
16035 everything.
16036
16037 blend
16038 Blend percentage.
16039
16040 0.0 makes pixels either fully transparent, or not transparent at
16041 all.
16042
16043 Higher values result in semi-transparent pixels, with a higher
16044 transparency the more similar the pixels color is to the key color.
16045
16046 yuv Signals that the color passed is already in YUV instead of RGB.
16047
16048 Literal colors like "green" or "red" don't make sense with this
16049 enabled anymore. This can be used to pass exact YUV values as
16050 hexadecimal numbers.
16051
16052 Commands
16053
16054 This filter supports same commands as options. The command accepts the
16055 same syntax of the corresponding option.
16056
16057 If the specified expression is not valid, it is kept at its current
16058 value.
16059
16060 Examples
16061
16062 • Make every green pixel in the input image transparent:
16063
16064 ffmpeg -i input.png -vf chromakey=green out.png
16065
16066 • Overlay a greenscreen-video on top of a static black background.
16067
16068 ffmpeg -f lavfi -i color=c=black:s=1280x720 -i video.mp4 -shortest -filter_complex "[1:v]chromakey=0x70de77:0.1:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.mkv
16069
16070 chromanr
16071 Reduce chrominance noise.
16072
16073 The filter accepts the following options:
16074
16075 thres
16076 Set threshold for averaging chrominance values. Sum of absolute
16077 difference of Y, U and V pixel components of current pixel and
16078 neighbour pixels lower than this threshold will be used in
16079 averaging. Luma component is left unchanged and is copied to
16080 output. Default value is 30. Allowed range is from 1 to 200.
16081
16082 sizew
16083 Set horizontal radius of rectangle used for averaging. Allowed
16084 range is from 1 to 100. Default value is 5.
16085
16086 sizeh
16087 Set vertical radius of rectangle used for averaging. Allowed range
16088 is from 1 to 100. Default value is 5.
16089
16090 stepw
16091 Set horizontal step when averaging. Default value is 1. Allowed
16092 range is from 1 to 50. Mostly useful to speed-up filtering.
16093
16094 steph
16095 Set vertical step when averaging. Default value is 1. Allowed
16096 range is from 1 to 50. Mostly useful to speed-up filtering.
16097
16098 threy
16099 Set Y threshold for averaging chrominance values. Set finer
16100 control for max allowed difference between Y components of current
16101 pixel and neigbour pixels. Default value is 200. Allowed range is
16102 from 1 to 200.
16103
16104 threu
16105 Set U threshold for averaging chrominance values. Set finer
16106 control for max allowed difference between U components of current
16107 pixel and neigbour pixels. Default value is 200. Allowed range is
16108 from 1 to 200.
16109
16110 threv
16111 Set V threshold for averaging chrominance values. Set finer
16112 control for max allowed difference between V components of current
16113 pixel and neigbour pixels. Default value is 200. Allowed range is
16114 from 1 to 200.
16115
16116 distance
16117 Set distance type used in calculations.
16118
16119 manhattan
16120 Absolute difference.
16121
16122 euclidean
16123 Difference squared.
16124
16125 Default distance type is manhattan.
16126
16127 Commands
16128
16129 This filter supports same commands as options. The command accepts the
16130 same syntax of the corresponding option.
16131
16132 chromashift
16133 Shift chroma pixels horizontally and/or vertically.
16134
16135 The filter accepts the following options:
16136
16137 cbh Set amount to shift chroma-blue horizontally.
16138
16139 cbv Set amount to shift chroma-blue vertically.
16140
16141 crh Set amount to shift chroma-red horizontally.
16142
16143 crv Set amount to shift chroma-red vertically.
16144
16145 edge
16146 Set edge mode, can be smear, default, or warp.
16147
16148 Commands
16149
16150 This filter supports the all above options as commands.
16151
16152 ciescope
16153 Display CIE color diagram with pixels overlaid onto it.
16154
16155 The filter accepts the following options:
16156
16157 system
16158 Set color system.
16159
16160 ntsc, 470m
16161 ebu, 470bg
16162 smpte
16163 240m
16164 apple
16165 widergb
16166 cie1931
16167 rec709, hdtv
16168 uhdtv, rec2020
16169 dcip3
16170 cie Set CIE system.
16171
16172 xyy
16173 ucs
16174 luv
16175 gamuts
16176 Set what gamuts to draw.
16177
16178 See "system" option for available values.
16179
16180 size, s
16181 Set ciescope size, by default set to 512.
16182
16183 intensity, i
16184 Set intensity used to map input pixel values to CIE diagram.
16185
16186 contrast
16187 Set contrast used to draw tongue colors that are out of active
16188 color system gamut.
16189
16190 corrgamma
16191 Correct gamma displayed on scope, by default enabled.
16192
16193 showwhite
16194 Show white point on CIE diagram, by default disabled.
16195
16196 gamma
16197 Set input gamma. Used only with XYZ input color space.
16198
16199 codecview
16200 Visualize information exported by some codecs.
16201
16202 Some codecs can export information through frames using side-data or
16203 other means. For example, some MPEG based codecs export motion vectors
16204 through the export_mvs flag in the codec flags2 option.
16205
16206 The filter accepts the following option:
16207
16208 block
16209 Display block partition structure using the luma plane.
16210
16211 mv Set motion vectors to visualize.
16212
16213 Available flags for mv are:
16214
16215 pf forward predicted MVs of P-frames
16216
16217 bf forward predicted MVs of B-frames
16218
16219 bb backward predicted MVs of B-frames
16220
16221 qp Display quantization parameters using the chroma planes.
16222
16223 mv_type, mvt
16224 Set motion vectors type to visualize. Includes MVs from all frames
16225 unless specified by frame_type option.
16226
16227 Available flags for mv_type are:
16228
16229 fp forward predicted MVs
16230
16231 bp backward predicted MVs
16232
16233 frame_type, ft
16234 Set frame type to visualize motion vectors of.
16235
16236 Available flags for frame_type are:
16237
16238 if intra-coded frames (I-frames)
16239
16240 pf predicted frames (P-frames)
16241
16242 bf bi-directionally predicted frames (B-frames)
16243
16244 Examples
16245
16246 • Visualize forward predicted MVs of all frames using ffplay:
16247
16248 ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
16249
16250 • Visualize multi-directionals MVs of P and B-Frames using ffplay:
16251
16252 ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
16253
16254 colorbalance
16255 Modify intensity of primary colors (red, green and blue) of input
16256 frames.
16257
16258 The filter allows an input frame to be adjusted in the shadows,
16259 midtones or highlights regions for the red-cyan, green-magenta or blue-
16260 yellow balance.
16261
16262 A positive adjustment value shifts the balance towards the primary
16263 color, a negative value towards the complementary color.
16264
16265 The filter accepts the following options:
16266
16267 rs
16268 gs
16269 bs Adjust red, green and blue shadows (darkest pixels).
16270
16271 rm
16272 gm
16273 bm Adjust red, green and blue midtones (medium pixels).
16274
16275 rh
16276 gh
16277 bh Adjust red, green and blue highlights (brightest pixels).
16278
16279 Allowed ranges for options are "[-1.0, 1.0]". Defaults are 0.
16280
16281 pl Preserve lightness when changing color balance. Default is
16282 disabled.
16283
16284 Examples
16285
16286 • Add red color cast to shadows:
16287
16288 colorbalance=rs=.3
16289
16290 Commands
16291
16292 This filter supports the all above options as commands.
16293
16294 colorcontrast
16295 Adjust color contrast between RGB components.
16296
16297 The filter accepts the following options:
16298
16299 rc Set the red-cyan contrast. Defaults is 0.0. Allowed range is from
16300 -1.0 to 1.0.
16301
16302 gm Set the green-magenta contrast. Defaults is 0.0. Allowed range is
16303 from -1.0 to 1.0.
16304
16305 by Set the blue-yellow contrast. Defaults is 0.0. Allowed range is
16306 from -1.0 to 1.0.
16307
16308 rcw
16309 gmw
16310 byw Set the weight of each "rc", "gm", "by" option value. Default value
16311 is 0.0. Allowed range is from 0.0 to 1.0. If all weights are 0.0
16312 filtering is disabled.
16313
16314 pl Set the amount of preserving lightness. Default value is 0.0.
16315 Allowed range is from 0.0 to 1.0.
16316
16317 Commands
16318
16319 This filter supports the all above options as commands.
16320
16321 colorcorrect
16322 Adjust color white balance selectively for blacks and whites. This
16323 filter operates in YUV colorspace.
16324
16325 The filter accepts the following options:
16326
16327 rl Set the red shadow spot. Allowed range is from -1.0 to 1.0.
16328 Default value is 0.
16329
16330 bl Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
16331 Default value is 0.
16332
16333 rh Set the red highlight spot. Allowed range is from -1.0 to 1.0.
16334 Default value is 0.
16335
16336 bh Set the red highlight spot. Allowed range is from -1.0 to 1.0.
16337 Default value is 0.
16338
16339 saturation
16340 Set the amount of saturation. Allowed range is from -3.0 to 3.0.
16341 Default value is 1.
16342
16343 analyze
16344 If set to anything other than "manual" it will analyze every frame
16345 and use derived parameters for filtering output frame.
16346
16347 Possible values are:
16348
16349 manual
16350 average
16351 minmax
16352 median
16353
16354 Default value is "manual".
16355
16356 Commands
16357
16358 This filter supports the all above options as commands.
16359
16360 colorchannelmixer
16361 Adjust video input frames by re-mixing color channels.
16362
16363 This filter modifies a color channel by adding the values associated to
16364 the other channels of the same pixels. For example if the value to
16365 modify is red, the output value will be:
16366
16367 <red>=<red>*<rr> + <blue>*<rb> + <green>*<rg> + <alpha>*<ra>
16368
16369 The filter accepts the following options:
16370
16371 rr
16372 rg
16373 rb
16374 ra Adjust contribution of input red, green, blue and alpha channels
16375 for output red channel. Default is 1 for rr, and 0 for rg, rb and
16376 ra.
16377
16378 gr
16379 gg
16380 gb
16381 ga Adjust contribution of input red, green, blue and alpha channels
16382 for output green channel. Default is 1 for gg, and 0 for gr, gb
16383 and ga.
16384
16385 br
16386 bg
16387 bb
16388 ba Adjust contribution of input red, green, blue and alpha channels
16389 for output blue channel. Default is 1 for bb, and 0 for br, bg and
16390 ba.
16391
16392 ar
16393 ag
16394 ab
16395 aa Adjust contribution of input red, green, blue and alpha channels
16396 for output alpha channel. Default is 1 for aa, and 0 for ar, ag
16397 and ab.
16398
16399 Allowed ranges for options are "[-2.0, 2.0]".
16400
16401 pc Set preserve color mode. The accepted values are:
16402
16403 none
16404 Disable color preserving, this is default.
16405
16406 lum Preserve luminance.
16407
16408 max Preserve max value of RGB triplet.
16409
16410 avg Preserve average value of RGB triplet.
16411
16412 sum Preserve sum value of RGB triplet.
16413
16414 nrm Preserve normalized value of RGB triplet.
16415
16416 pwr Preserve power value of RGB triplet.
16417
16418 pa Set the preserve color amount when changing colors. Allowed range
16419 is from "[0.0, 1.0]". Default is 0.0, thus disabled.
16420
16421 Examples
16422
16423 • Convert source to grayscale:
16424
16425 colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
16426
16427 • Simulate sepia tones:
16428
16429 colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
16430
16431 Commands
16432
16433 This filter supports the all above options as commands.
16434
16435 colorize
16436 Overlay a solid color on the video stream.
16437
16438 The filter accepts the following options:
16439
16440 hue Set the color hue. Allowed range is from 0 to 360. Default value
16441 is 0.
16442
16443 saturation
16444 Set the color saturation. Allowed range is from 0 to 1. Default
16445 value is 0.5.
16446
16447 lightness
16448 Set the color lightness. Allowed range is from 0 to 1. Default
16449 value is 0.5.
16450
16451 mix Set the mix of source lightness. By default is set to 1.0. Allowed
16452 range is from 0.0 to 1.0.
16453
16454 Commands
16455
16456 This filter supports the all above options as commands.
16457
16458 colorkey
16459 RGB colorspace color keying. This filter operates on 8-bit RGB format
16460 frames by setting the alpha component of each pixel which falls within
16461 the similarity radius of the key color to 0. The alpha value for pixels
16462 outside the similarity radius depends on the value of the blend option.
16463
16464 The filter accepts the following options:
16465
16466 color
16467 Set the color for which alpha will be set to 0 (full transparency).
16468 See "Color" section in the ffmpeg-utils manual. Default is
16469 "black".
16470
16471 similarity
16472 Set the radius from the key color within which other colors also
16473 have full transparency. The computed distance is related to the
16474 unit fractional distance in 3D space between the RGB values of the
16475 key color and the pixel's color. Range is 0.01 to 1.0. 0.01 matches
16476 within a very small radius around the exact key color, while 1.0
16477 matches everything. Default is 0.01.
16478
16479 blend
16480 Set how the alpha value for pixels that fall outside the similarity
16481 radius is computed. 0.0 makes pixels either fully transparent or
16482 fully opaque. Higher values result in semi-transparent pixels,
16483 with greater transparency the more similar the pixel color is to
16484 the key color. Range is 0.0 to 1.0. Default is 0.0.
16485
16486 Examples
16487
16488 • Make every green pixel in the input image transparent:
16489
16490 ffmpeg -i input.png -vf colorkey=green out.png
16491
16492 • Overlay a greenscreen-video on top of a static background image.
16493
16494 ffmpeg -i background.png -i video.mp4 -filter_complex "[1:v]colorkey=0x3BBD1E:0.3:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.flv
16495
16496 Commands
16497
16498 This filter supports same commands as options. The command accepts the
16499 same syntax of the corresponding option.
16500
16501 If the specified expression is not valid, it is kept at its current
16502 value.
16503
16504 colorhold
16505 Remove all color information for all RGB colors except for certain one.
16506
16507 The filter accepts the following options:
16508
16509 color
16510 The color which will not be replaced with neutral gray.
16511
16512 similarity
16513 Similarity percentage with the above color. 0.01 matches only the
16514 exact key color, while 1.0 matches everything.
16515
16516 blend
16517 Blend percentage. 0.0 makes pixels fully gray. Higher values
16518 result in more preserved color.
16519
16520 Commands
16521
16522 This filter supports same commands as options. The command accepts the
16523 same syntax of the corresponding option.
16524
16525 If the specified expression is not valid, it is kept at its current
16526 value.
16527
16528 colorlevels
16529 Adjust video input frames using levels.
16530
16531 The filter accepts the following options:
16532
16533 rimin
16534 gimin
16535 bimin
16536 aimin
16537 Adjust red, green, blue and alpha input black point. Allowed
16538 ranges for options are "[-1.0, 1.0]". Defaults are 0.
16539
16540 rimax
16541 gimax
16542 bimax
16543 aimax
16544 Adjust red, green, blue and alpha input white point. Allowed
16545 ranges for options are "[-1.0, 1.0]". Defaults are 1.
16546
16547 Input levels are used to lighten highlights (bright tones), darken
16548 shadows (dark tones), change the balance of bright and dark tones.
16549
16550 romin
16551 gomin
16552 bomin
16553 aomin
16554 Adjust red, green, blue and alpha output black point. Allowed
16555 ranges for options are "[0, 1.0]". Defaults are 0.
16556
16557 romax
16558 gomax
16559 bomax
16560 aomax
16561 Adjust red, green, blue and alpha output white point. Allowed
16562 ranges for options are "[0, 1.0]". Defaults are 1.
16563
16564 Output levels allows manual selection of a constrained output level
16565 range.
16566
16567 preserve
16568 Set preserve color mode. The accepted values are:
16569
16570 none
16571 Disable color preserving, this is default.
16572
16573 lum Preserve luminance.
16574
16575 max Preserve max value of RGB triplet.
16576
16577 avg Preserve average value of RGB triplet.
16578
16579 sum Preserve sum value of RGB triplet.
16580
16581 nrm Preserve normalized value of RGB triplet.
16582
16583 pwr Preserve power value of RGB triplet.
16584
16585 Examples
16586
16587 • Make video output darker:
16588
16589 colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
16590
16591 • Increase contrast:
16592
16593 colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
16594
16595 • Make video output lighter:
16596
16597 colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
16598
16599 • Increase brightness:
16600
16601 colorlevels=romin=0.5:gomin=0.5:bomin=0.5
16602
16603 Commands
16604
16605 This filter supports the all above options as commands.
16606
16607 colormatrix
16608 Convert color matrix.
16609
16610 The filter accepts the following options:
16611
16612 src
16613 dst Specify the source and destination color matrix. Both values must
16614 be specified.
16615
16616 The accepted values are:
16617
16618 bt709
16619 BT.709
16620
16621 fcc FCC
16622
16623 bt601
16624 BT.601
16625
16626 bt470
16627 BT.470
16628
16629 bt470bg
16630 BT.470BG
16631
16632 smpte170m
16633 SMPTE-170M
16634
16635 smpte240m
16636 SMPTE-240M
16637
16638 bt2020
16639 BT.2020
16640
16641 For example to convert from BT.601 to SMPTE-240M, use the command:
16642
16643 colormatrix=bt601:smpte240m
16644
16645 colorspace
16646 Convert colorspace, transfer characteristics or color primaries. Input
16647 video needs to have an even size.
16648
16649 The filter accepts the following options:
16650
16651 all Specify all color properties at once.
16652
16653 The accepted values are:
16654
16655 bt470m
16656 BT.470M
16657
16658 bt470bg
16659 BT.470BG
16660
16661 bt601-6-525
16662 BT.601-6 525
16663
16664 bt601-6-625
16665 BT.601-6 625
16666
16667 bt709
16668 BT.709
16669
16670 smpte170m
16671 SMPTE-170M
16672
16673 smpte240m
16674 SMPTE-240M
16675
16676 bt2020
16677 BT.2020
16678
16679 space
16680 Specify output colorspace.
16681
16682 The accepted values are:
16683
16684 bt709
16685 BT.709
16686
16687 fcc FCC
16688
16689 bt470bg
16690 BT.470BG or BT.601-6 625
16691
16692 smpte170m
16693 SMPTE-170M or BT.601-6 525
16694
16695 smpte240m
16696 SMPTE-240M
16697
16698 ycgco
16699 YCgCo
16700
16701 bt2020ncl
16702 BT.2020 with non-constant luminance
16703
16704 trc Specify output transfer characteristics.
16705
16706 The accepted values are:
16707
16708 bt709
16709 BT.709
16710
16711 bt470m
16712 BT.470M
16713
16714 bt470bg
16715 BT.470BG
16716
16717 gamma22
16718 Constant gamma of 2.2
16719
16720 gamma28
16721 Constant gamma of 2.8
16722
16723 smpte170m
16724 SMPTE-170M, BT.601-6 625 or BT.601-6 525
16725
16726 smpte240m
16727 SMPTE-240M
16728
16729 srgb
16730 SRGB
16731
16732 iec61966-2-1
16733 iec61966-2-1
16734
16735 iec61966-2-4
16736 iec61966-2-4
16737
16738 xvycc
16739 xvycc
16740
16741 bt2020-10
16742 BT.2020 for 10-bits content
16743
16744 bt2020-12
16745 BT.2020 for 12-bits content
16746
16747 primaries
16748 Specify output color primaries.
16749
16750 The accepted values are:
16751
16752 bt709
16753 BT.709
16754
16755 bt470m
16756 BT.470M
16757
16758 bt470bg
16759 BT.470BG or BT.601-6 625
16760
16761 smpte170m
16762 SMPTE-170M or BT.601-6 525
16763
16764 smpte240m
16765 SMPTE-240M
16766
16767 film
16768 film
16769
16770 smpte431
16771 SMPTE-431
16772
16773 smpte432
16774 SMPTE-432
16775
16776 bt2020
16777 BT.2020
16778
16779 jedec-p22
16780 JEDEC P22 phosphors
16781
16782 range
16783 Specify output color range.
16784
16785 The accepted values are:
16786
16787 tv TV (restricted) range
16788
16789 mpeg
16790 MPEG (restricted) range
16791
16792 pc PC (full) range
16793
16794 jpeg
16795 JPEG (full) range
16796
16797 format
16798 Specify output color format.
16799
16800 The accepted values are:
16801
16802 yuv420p
16803 YUV 4:2:0 planar 8-bits
16804
16805 yuv420p10
16806 YUV 4:2:0 planar 10-bits
16807
16808 yuv420p12
16809 YUV 4:2:0 planar 12-bits
16810
16811 yuv422p
16812 YUV 4:2:2 planar 8-bits
16813
16814 yuv422p10
16815 YUV 4:2:2 planar 10-bits
16816
16817 yuv422p12
16818 YUV 4:2:2 planar 12-bits
16819
16820 yuv444p
16821 YUV 4:4:4 planar 8-bits
16822
16823 yuv444p10
16824 YUV 4:4:4 planar 10-bits
16825
16826 yuv444p12
16827 YUV 4:4:4 planar 12-bits
16828
16829 fast
16830 Do a fast conversion, which skips gamma/primary correction. This
16831 will take significantly less CPU, but will be mathematically
16832 incorrect. To get output compatible with that produced by the
16833 colormatrix filter, use fast=1.
16834
16835 dither
16836 Specify dithering mode.
16837
16838 The accepted values are:
16839
16840 none
16841 No dithering
16842
16843 fsb Floyd-Steinberg dithering
16844
16845 wpadapt
16846 Whitepoint adaptation mode.
16847
16848 The accepted values are:
16849
16850 bradford
16851 Bradford whitepoint adaptation
16852
16853 vonkries
16854 von Kries whitepoint adaptation
16855
16856 identity
16857 identity whitepoint adaptation (i.e. no whitepoint adaptation)
16858
16859 iall
16860 Override all input properties at once. Same accepted values as all.
16861
16862 ispace
16863 Override input colorspace. Same accepted values as space.
16864
16865 iprimaries
16866 Override input color primaries. Same accepted values as primaries.
16867
16868 itrc
16869 Override input transfer characteristics. Same accepted values as
16870 trc.
16871
16872 irange
16873 Override input color range. Same accepted values as range.
16874
16875 The filter converts the transfer characteristics, color space and color
16876 primaries to the specified user values. The output value, if not
16877 specified, is set to a default value based on the "all" property. If
16878 that property is also not specified, the filter will log an error. The
16879 output color range and format default to the same value as the input
16880 color range and format. The input transfer characteristics, color
16881 space, color primaries and color range should be set on the input data.
16882 If any of these are missing, the filter will log an error and no
16883 conversion will take place.
16884
16885 For example to convert the input to SMPTE-240M, use the command:
16886
16887 colorspace=smpte240m
16888
16889 colortemperature
16890 Adjust color temperature in video to simulate variations in ambient
16891 color temperature.
16892
16893 The filter accepts the following options:
16894
16895 temperature
16896 Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
16897 Default value is 6500 K.
16898
16899 mix Set mixing with filtered output. Allowed range is from 0 to 1.
16900 Default value is 1.
16901
16902 pl Set the amount of preserving lightness. Allowed range is from 0 to
16903 1. Default value is 0.
16904
16905 Commands
16906
16907 This filter supports same commands as options.
16908
16909 convolution
16910 Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49
16911 elements.
16912
16913 The filter accepts the following options:
16914
16915 0m
16916 1m
16917 2m
16918 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49
16919 signed integers in square mode, and from 1 to 49 odd number of
16920 signed integers in row mode.
16921
16922 0rdiv
16923 1rdiv
16924 2rdiv
16925 3rdiv
16926 Set multiplier for calculated value for each plane. If unset or 0,
16927 it will be sum of all matrix elements.
16928
16929 0bias
16930 1bias
16931 2bias
16932 3bias
16933 Set bias for each plane. This value is added to the result of the
16934 multiplication. Useful for making the overall image brighter or
16935 darker. Default is 0.0.
16936
16937 0mode
16938 1mode
16939 2mode
16940 3mode
16941 Set matrix mode for each plane. Can be square, row or column.
16942 Default is square.
16943
16944 Commands
16945
16946 This filter supports the all above options as commands.
16947
16948 Examples
16949
16950 • Apply sharpen:
16951
16952 convolution="0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0"
16953
16954 • Apply blur:
16955
16956 convolution="1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9"
16957
16958 • Apply edge enhance:
16959
16960 convolution="0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128"
16961
16962 • Apply edge detect:
16963
16964 convolution="0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128"
16965
16966 • Apply laplacian edge detector which includes diagonals:
16967
16968 convolution="1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0"
16969
16970 • Apply emboss:
16971
16972 convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2"
16973
16974 convolve
16975 Apply 2D convolution of video stream in frequency domain using second
16976 stream as impulse.
16977
16978 The filter accepts the following options:
16979
16980 planes
16981 Set which planes to process.
16982
16983 impulse
16984 Set which impulse video frames will be processed, can be first or
16985 all. Default is all.
16986
16987 The "convolve" filter also supports the framesync options.
16988
16989 copy
16990 Copy the input video source unchanged to the output. This is mainly
16991 useful for testing purposes.
16992
16993 coreimage
16994 Video filtering on GPU using Apple's CoreImage API on OSX.
16995
16996 Hardware acceleration is based on an OpenGL context. Usually, this
16997 means it is processed by video hardware. However, software-based OpenGL
16998 implementations exist which means there is no guarantee for hardware
16999 processing. It depends on the respective OSX.
17000
17001 There are many filters and image generators provided by Apple that come
17002 with a large variety of options. The filter has to be referenced by its
17003 name along with its options.
17004
17005 The coreimage filter accepts the following options:
17006
17007 list_filters
17008 List all available filters and generators along with all their
17009 respective options as well as possible minimum and maximum values
17010 along with the default values.
17011
17012 list_filters=true
17013
17014 filter
17015 Specify all filters by their respective name and options. Use
17016 list_filters to determine all valid filter names and options.
17017 Numerical options are specified by a float value and are
17018 automatically clamped to their respective value range. Vector and
17019 color options have to be specified by a list of space separated
17020 float values. Character escaping has to be done. A special option
17021 name "default" is available to use default options for a filter.
17022
17023 It is required to specify either "default" or at least one of the
17024 filter options. All omitted options are used with their default
17025 values. The syntax of the filter string is as follows:
17026
17027 filter=<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...][#<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...]][#...]
17028
17029 output_rect
17030 Specify a rectangle where the output of the filter chain is copied
17031 into the input image. It is given by a list of space separated
17032 float values:
17033
17034 output_rect=x\ y\ width\ height
17035
17036 If not given, the output rectangle equals the dimensions of the
17037 input image. The output rectangle is automatically cropped at the
17038 borders of the input image. Negative values are valid for each
17039 component.
17040
17041 output_rect=25\ 25\ 100\ 100
17042
17043 Several filters can be chained for successive processing without GPU-
17044 HOST transfers allowing for fast processing of complex filter chains.
17045 Currently, only filters with zero (generators) or exactly one (filters)
17046 input image and one output image are supported. Also, transition
17047 filters are not yet usable as intended.
17048
17049 Some filters generate output images with additional padding depending
17050 on the respective filter kernel. The padding is automatically removed
17051 to ensure the filter output has the same size as the input image.
17052
17053 For image generators, the size of the output image is determined by the
17054 previous output image of the filter chain or the input image of the
17055 whole filterchain, respectively. The generators do not use the pixel
17056 information of this image to generate their output. However, the
17057 generated output is blended onto this image, resulting in partial or
17058 complete coverage of the output image.
17059
17060 The coreimagesrc video source can be used for generating input images
17061 which are directly fed into the filter chain. By using it, providing
17062 input images by another video source or an input video is not required.
17063
17064 Examples
17065
17066 • List all filters available:
17067
17068 coreimage=list_filters=true
17069
17070 • Use the CIBoxBlur filter with default options to blur an image:
17071
17072 coreimage=filter=CIBoxBlur@default
17073
17074 • Use a filter chain with CISepiaTone at default values and
17075 CIVignetteEffect with its center at 100x100 and a radius of 50
17076 pixels:
17077
17078 coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
17079
17080 • Use nullsrc and CIQRCodeGenerator to create a QR code for the
17081 FFmpeg homepage, given as complete and escaped command-line for
17082 Apple's standard bash shell:
17083
17084 ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
17085
17086 cover_rect
17087 Cover a rectangular object
17088
17089 It accepts the following options:
17090
17091 cover
17092 Filepath of the optional cover image, needs to be in yuv420.
17093
17094 mode
17095 Set covering mode.
17096
17097 It accepts the following values:
17098
17099 cover
17100 cover it by the supplied image
17101
17102 blur
17103 cover it by interpolating the surrounding pixels
17104
17105 Default value is blur.
17106
17107 Examples
17108
17109 • Cover a rectangular object by the supplied image of a given video
17110 using ffmpeg:
17111
17112 ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
17113
17114 crop
17115 Crop the input video to given dimensions.
17116
17117 It accepts the following parameters:
17118
17119 w, out_w
17120 The width of the output video. It defaults to "iw". This
17121 expression is evaluated only once during the filter configuration,
17122 or when the w or out_w command is sent.
17123
17124 h, out_h
17125 The height of the output video. It defaults to "ih". This
17126 expression is evaluated only once during the filter configuration,
17127 or when the h or out_h command is sent.
17128
17129 x The horizontal position, in the input video, of the left edge of
17130 the output video. It defaults to "(in_w-out_w)/2". This expression
17131 is evaluated per-frame.
17132
17133 y The vertical position, in the input video, of the top edge of the
17134 output video. It defaults to "(in_h-out_h)/2". This expression is
17135 evaluated per-frame.
17136
17137 keep_aspect
17138 If set to 1 will force the output display aspect ratio to be the
17139 same of the input, by changing the output sample aspect ratio. It
17140 defaults to 0.
17141
17142 exact
17143 Enable exact cropping. If enabled, subsampled videos will be
17144 cropped at exact width/height/x/y as specified and will not be
17145 rounded to nearest smaller value. It defaults to 0.
17146
17147 The out_w, out_h, x, y parameters are expressions containing the
17148 following constants:
17149
17150 x
17151 y The computed values for x and y. They are evaluated for each new
17152 frame.
17153
17154 in_w
17155 in_h
17156 The input width and height.
17157
17158 iw
17159 ih These are the same as in_w and in_h.
17160
17161 out_w
17162 out_h
17163 The output (cropped) width and height.
17164
17165 ow
17166 oh These are the same as out_w and out_h.
17167
17168 a same as iw / ih
17169
17170 sar input sample aspect ratio
17171
17172 dar input display aspect ratio, it is the same as (iw / ih) * sar
17173
17174 hsub
17175 vsub
17176 horizontal and vertical chroma subsample values. For example for
17177 the pixel format "yuv422p" hsub is 2 and vsub is 1.
17178
17179 n The number of the input frame, starting from 0.
17180
17181 pos the position in the file of the input frame, NAN if unknown
17182
17183 t The timestamp expressed in seconds. It's NAN if the input timestamp
17184 is unknown.
17185
17186 The expression for out_w may depend on the value of out_h, and the
17187 expression for out_h may depend on out_w, but they cannot depend on x
17188 and y, as x and y are evaluated after out_w and out_h.
17189
17190 The x and y parameters specify the expressions for the position of the
17191 top-left corner of the output (non-cropped) area. They are evaluated
17192 for each frame. If the evaluated value is not valid, it is approximated
17193 to the nearest valid value.
17194
17195 The expression for x may depend on y, and the expression for y may
17196 depend on x.
17197
17198 Examples
17199
17200 • Crop area with size 100x100 at position (12,34).
17201
17202 crop=100:100:12:34
17203
17204 Using named options, the example above becomes:
17205
17206 crop=w=100:h=100:x=12:y=34
17207
17208 • Crop the central input area with size 100x100:
17209
17210 crop=100:100
17211
17212 • Crop the central input area with size 2/3 of the input video:
17213
17214 crop=2/3*in_w:2/3*in_h
17215
17216 • Crop the input video central square:
17217
17218 crop=out_w=in_h
17219 crop=in_h
17220
17221 • Delimit the rectangle with the top-left corner placed at position
17222 100:100 and the right-bottom corner corresponding to the right-
17223 bottom corner of the input image.
17224
17225 crop=in_w-100:in_h-100:100:100
17226
17227 • Crop 10 pixels from the left and right borders, and 20 pixels from
17228 the top and bottom borders
17229
17230 crop=in_w-2*10:in_h-2*20
17231
17232 • Keep only the bottom right quarter of the input image:
17233
17234 crop=in_w/2:in_h/2:in_w/2:in_h/2
17235
17236 • Crop height for getting Greek harmony:
17237
17238 crop=in_w:1/PHI*in_w
17239
17240 • Apply trembling effect:
17241
17242 crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)
17243
17244 • Apply erratic camera effect depending on timestamp:
17245
17246 crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)"
17247
17248 • Set x depending on the value of y:
17249
17250 crop=in_w/2:in_h/2:y:10+10*sin(n/10)
17251
17252 Commands
17253
17254 This filter supports the following commands:
17255
17256 w, out_w
17257 h, out_h
17258 x
17259 y Set width/height of the output video and the horizontal/vertical
17260 position in the input video. The command accepts the same syntax
17261 of the corresponding option.
17262
17263 If the specified expression is not valid, it is kept at its current
17264 value.
17265
17266 cropdetect
17267 Auto-detect the crop size.
17268
17269 It calculates the necessary cropping parameters and prints the
17270 recommended parameters via the logging system. The detected dimensions
17271 correspond to the non-black area of the input video.
17272
17273 It accepts the following parameters:
17274
17275 limit
17276 Set higher black value threshold, which can be optionally specified
17277 from nothing (0) to everything (255 for 8-bit based formats). An
17278 intensity value greater to the set value is considered non-black.
17279 It defaults to 24. You can also specify a value between 0.0 and
17280 1.0 which will be scaled depending on the bitdepth of the pixel
17281 format.
17282
17283 round
17284 The value which the width/height should be divisible by. It
17285 defaults to 16. The offset is automatically adjusted to center the
17286 video. Use 2 to get only even dimensions (needed for 4:2:2 video).
17287 16 is best when encoding to most video codecs.
17288
17289 skip
17290 Set the number of initial frames for which evaluation is skipped.
17291 Default is 2. Range is 0 to INT_MAX.
17292
17293 reset_count, reset
17294 Set the counter that determines after how many frames cropdetect
17295 will reset the previously detected largest video area and start
17296 over to detect the current optimal crop area. Default value is 0.
17297
17298 This can be useful when channel logos distort the video area. 0
17299 indicates 'never reset', and returns the largest area encountered
17300 during playback.
17301
17302 cue
17303 Delay video filtering until a given wallclock timestamp. The filter
17304 first passes on preroll amount of frames, then it buffers at most
17305 buffer amount of frames and waits for the cue. After reaching the cue
17306 it forwards the buffered frames and also any subsequent frames coming
17307 in its input.
17308
17309 The filter can be used synchronize the output of multiple ffmpeg
17310 processes for realtime output devices like decklink. By putting the
17311 delay in the filtering chain and pre-buffering frames the process can
17312 pass on data to output almost immediately after the target wallclock
17313 timestamp is reached.
17314
17315 Perfect frame accuracy cannot be guaranteed, but the result is good
17316 enough for some use cases.
17317
17318 cue The cue timestamp expressed in a UNIX timestamp in microseconds.
17319 Default is 0.
17320
17321 preroll
17322 The duration of content to pass on as preroll expressed in seconds.
17323 Default is 0.
17324
17325 buffer
17326 The maximum duration of content to buffer before waiting for the
17327 cue expressed in seconds. Default is 0.
17328
17329 curves
17330 Apply color adjustments using curves.
17331
17332 This filter is similar to the Adobe Photoshop and GIMP curves tools.
17333 Each component (red, green and blue) has its values defined by N key
17334 points tied from each other using a smooth curve. The x-axis represents
17335 the pixel values from the input frame, and the y-axis the new pixel
17336 values to be set for the output frame.
17337
17338 By default, a component curve is defined by the two points (0;0) and
17339 (1;1). This creates a straight line where each original pixel value is
17340 "adjusted" to its own value, which means no change to the image.
17341
17342 The filter allows you to redefine these two points and add some more. A
17343 new curve (using a natural cubic spline interpolation) will be define
17344 to pass smoothly through all these new coordinates. The new defined
17345 points needs to be strictly increasing over the x-axis, and their x and
17346 y values must be in the [0;1] interval. If the computed curves
17347 happened to go outside the vector spaces, the values will be clipped
17348 accordingly.
17349
17350 The filter accepts the following options:
17351
17352 preset
17353 Select one of the available color presets. This option can be used
17354 in addition to the r, g, b parameters; in this case, the later
17355 options takes priority on the preset values. Available presets
17356 are:
17357
17358 none
17359 color_negative
17360 cross_process
17361 darker
17362 increase_contrast
17363 lighter
17364 linear_contrast
17365 medium_contrast
17366 negative
17367 strong_contrast
17368 vintage
17369
17370 Default is "none".
17371
17372 master, m
17373 Set the master key points. These points will define a second pass
17374 mapping. It is sometimes called a "luminance" or "value" mapping.
17375 It can be used with r, g, b or all since it acts like a post-
17376 processing LUT.
17377
17378 red, r
17379 Set the key points for the red component.
17380
17381 green, g
17382 Set the key points for the green component.
17383
17384 blue, b
17385 Set the key points for the blue component.
17386
17387 all Set the key points for all components (not including master). Can
17388 be used in addition to the other key points component options. In
17389 this case, the unset component(s) will fallback on this all
17390 setting.
17391
17392 psfile
17393 Specify a Photoshop curves file (".acv") to import the settings
17394 from.
17395
17396 plot
17397 Save Gnuplot script of the curves in specified file.
17398
17399 To avoid some filtergraph syntax conflicts, each key points list need
17400 to be defined using the following syntax: "x0/y0 x1/y1 x2/y2 ...".
17401
17402 Commands
17403
17404 This filter supports same commands as options.
17405
17406 Examples
17407
17408 • Increase slightly the middle level of blue:
17409
17410 curves=blue='0/0 0.5/0.58 1/1'
17411
17412 • Vintage effect:
17413
17414 curves=r='0/0.11 .42/.51 1/0.95':g='0/0 0.50/0.48 1/1':b='0/0.22 .49/.44 1/0.8'
17415
17416 Here we obtain the following coordinates for each components:
17417
17418 red "(0;0.11) (0.42;0.51) (1;0.95)"
17419
17420 green
17421 "(0;0) (0.50;0.48) (1;1)"
17422
17423 blue
17424 "(0;0.22) (0.49;0.44) (1;0.80)"
17425
17426 • The previous example can also be achieved with the associated
17427 built-in preset:
17428
17429 curves=preset=vintage
17430
17431 • Or simply:
17432
17433 curves=vintage
17434
17435 • Use a Photoshop preset and redefine the points of the green
17436 component:
17437
17438 curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
17439
17440 • Check out the curves of the "cross_process" profile using ffmpeg
17441 and gnuplot:
17442
17443 ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
17444 gnuplot -p /tmp/curves.plt
17445
17446 datascope
17447 Video data analysis filter.
17448
17449 This filter shows hexadecimal pixel values of part of video.
17450
17451 The filter accepts the following options:
17452
17453 size, s
17454 Set output video size.
17455
17456 x Set x offset from where to pick pixels.
17457
17458 y Set y offset from where to pick pixels.
17459
17460 mode
17461 Set scope mode, can be one of the following:
17462
17463 mono
17464 Draw hexadecimal pixel values with white color on black
17465 background.
17466
17467 color
17468 Draw hexadecimal pixel values with input video pixel color on
17469 black background.
17470
17471 color2
17472 Draw hexadecimal pixel values on color background picked from
17473 input video, the text color is picked in such way so its always
17474 visible.
17475
17476 axis
17477 Draw rows and columns numbers on left and top of video.
17478
17479 opacity
17480 Set background opacity.
17481
17482 format
17483 Set display number format. Can be "hex", or "dec". Default is
17484 "hex".
17485
17486 components
17487 Set pixel components to display. By default all pixel components
17488 are displayed.
17489
17490 Commands
17491
17492 This filter supports same commands as options excluding "size" option.
17493
17494 dblur
17495 Apply Directional blur filter.
17496
17497 The filter accepts the following options:
17498
17499 angle
17500 Set angle of directional blur. Default is 45.
17501
17502 radius
17503 Set radius of directional blur. Default is 5.
17504
17505 planes
17506 Set which planes to filter. By default all planes are filtered.
17507
17508 Commands
17509
17510 This filter supports same commands as options. The command accepts the
17511 same syntax of the corresponding option.
17512
17513 If the specified expression is not valid, it is kept at its current
17514 value.
17515
17516 dctdnoiz
17517 Denoise frames using 2D DCT (frequency domain filtering).
17518
17519 This filter is not designed for real time.
17520
17521 The filter accepts the following options:
17522
17523 sigma, s
17524 Set the noise sigma constant.
17525
17526 This sigma defines a hard threshold of "3 * sigma"; every DCT
17527 coefficient (absolute value) below this threshold with be dropped.
17528
17529 If you need a more advanced filtering, see expr.
17530
17531 Default is 0.
17532
17533 overlap
17534 Set number overlapping pixels for each block. Since the filter can
17535 be slow, you may want to reduce this value, at the cost of a less
17536 effective filter and the risk of various artefacts.
17537
17538 If the overlapping value doesn't permit processing the whole input
17539 width or height, a warning will be displayed and according borders
17540 won't be denoised.
17541
17542 Default value is blocksize-1, which is the best possible setting.
17543
17544 expr, e
17545 Set the coefficient factor expression.
17546
17547 For each coefficient of a DCT block, this expression will be
17548 evaluated as a multiplier value for the coefficient.
17549
17550 If this is option is set, the sigma option will be ignored.
17551
17552 The absolute value of the coefficient can be accessed through the c
17553 variable.
17554
17555 n Set the blocksize using the number of bits. "1<<n" defines the
17556 blocksize, which is the width and height of the processed blocks.
17557
17558 The default value is 3 (8x8) and can be raised to 4 for a blocksize
17559 of 16x16. Note that changing this setting has huge consequences on
17560 the speed processing. Also, a larger block size does not
17561 necessarily means a better de-noising.
17562
17563 Examples
17564
17565 Apply a denoise with a sigma of 4.5:
17566
17567 dctdnoiz=4.5
17568
17569 The same operation can be achieved using the expression system:
17570
17571 dctdnoiz=e='gte(c, 4.5*3)'
17572
17573 Violent denoise using a block size of "16x16":
17574
17575 dctdnoiz=15:n=4
17576
17577 deband
17578 Remove banding artifacts from input video. It works by replacing
17579 banded pixels with average value of referenced pixels.
17580
17581 The filter accepts the following options:
17582
17583 1thr
17584 2thr
17585 3thr
17586 4thr
17587 Set banding detection threshold for each plane. Default is 0.02.
17588 Valid range is 0.00003 to 0.5. If difference between current pixel
17589 and reference pixel is less than threshold, it will be considered
17590 as banded.
17591
17592 range, r
17593 Banding detection range in pixels. Default is 16. If positive,
17594 random number in range 0 to set value will be used. If negative,
17595 exact absolute value will be used. The range defines square of
17596 four pixels around current pixel.
17597
17598 direction, d
17599 Set direction in radians from which four pixel will be compared. If
17600 positive, random direction from 0 to set direction will be picked.
17601 If negative, exact of absolute value will be picked. For example
17602 direction 0, -PI or -2*PI radians will pick only pixels on same row
17603 and -PI/2 will pick only pixels on same column.
17604
17605 blur, b
17606 If enabled, current pixel is compared with average value of all
17607 four surrounding pixels. The default is enabled. If disabled
17608 current pixel is compared with all four surrounding pixels. The
17609 pixel is considered banded if only all four differences with
17610 surrounding pixels are less than threshold.
17611
17612 coupling, c
17613 If enabled, current pixel is changed if and only if all pixel
17614 components are banded, e.g. banding detection threshold is
17615 triggered for all color components. The default is disabled.
17616
17617 Commands
17618
17619 This filter supports the all above options as commands.
17620
17621 deblock
17622 Remove blocking artifacts from input video.
17623
17624 The filter accepts the following options:
17625
17626 filter
17627 Set filter type, can be weak or strong. Default is strong. This
17628 controls what kind of deblocking is applied.
17629
17630 block
17631 Set size of block, allowed range is from 4 to 512. Default is 8.
17632
17633 alpha
17634 beta
17635 gamma
17636 delta
17637 Set blocking detection thresholds. Allowed range is 0 to 1.
17638 Defaults are: 0.098 for alpha and 0.05 for the rest. Using higher
17639 threshold gives more deblocking strength. Setting alpha controls
17640 threshold detection at exact edge of block. Remaining options
17641 controls threshold detection near the edge. Each one for
17642 below/above or left/right. Setting any of those to 0 disables
17643 deblocking.
17644
17645 planes
17646 Set planes to filter. Default is to filter all available planes.
17647
17648 Examples
17649
17650 • Deblock using weak filter and block size of 4 pixels.
17651
17652 deblock=filter=weak:block=4
17653
17654 • Deblock using strong filter, block size of 4 pixels and custom
17655 thresholds for deblocking more edges.
17656
17657 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
17658
17659 • Similar as above, but filter only first plane.
17660
17661 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
17662
17663 • Similar as above, but filter only second and third plane.
17664
17665 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
17666
17667 Commands
17668
17669 This filter supports the all above options as commands.
17670
17671 decimate
17672 Drop duplicated frames at regular intervals.
17673
17674 The filter accepts the following options:
17675
17676 cycle
17677 Set the number of frames from which one will be dropped. Setting
17678 this to N means one frame in every batch of N frames will be
17679 dropped. Default is 5.
17680
17681 dupthresh
17682 Set the threshold for duplicate detection. If the difference metric
17683 for a frame is less than or equal to this value, then it is
17684 declared as duplicate. Default is 1.1
17685
17686 scthresh
17687 Set scene change threshold. Default is 15.
17688
17689 blockx
17690 blocky
17691 Set the size of the x and y-axis blocks used during metric
17692 calculations. Larger blocks give better noise suppression, but
17693 also give worse detection of small movements. Must be a power of
17694 two. Default is 32.
17695
17696 ppsrc
17697 Mark main input as a pre-processed input and activate clean source
17698 input stream. This allows the input to be pre-processed with
17699 various filters to help the metrics calculation while keeping the
17700 frame selection lossless. When set to 1, the first stream is for
17701 the pre-processed input, and the second stream is the clean source
17702 from where the kept frames are chosen. Default is 0.
17703
17704 chroma
17705 Set whether or not chroma is considered in the metric calculations.
17706 Default is 1.
17707
17708 deconvolve
17709 Apply 2D deconvolution of video stream in frequency domain using second
17710 stream as impulse.
17711
17712 The filter accepts the following options:
17713
17714 planes
17715 Set which planes to process.
17716
17717 impulse
17718 Set which impulse video frames will be processed, can be first or
17719 all. Default is all.
17720
17721 noise
17722 Set noise when doing divisions. Default is 0.0000001. Useful when
17723 width and height are not same and not power of 2 or if stream prior
17724 to convolving had noise.
17725
17726 The "deconvolve" filter also supports the framesync options.
17727
17728 dedot
17729 Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from
17730 video.
17731
17732 It accepts the following options:
17733
17734 m Set mode of operation. Can be combination of dotcrawl for cross-
17735 luminance reduction and/or rainbows for cross-color reduction.
17736
17737 lt Set spatial luma threshold. Lower values increases reduction of
17738 cross-luminance.
17739
17740 tl Set tolerance for temporal luma. Higher values increases reduction
17741 of cross-luminance.
17742
17743 tc Set tolerance for chroma temporal variation. Higher values
17744 increases reduction of cross-color.
17745
17746 ct Set temporal chroma threshold. Lower values increases reduction of
17747 cross-color.
17748
17749 deflate
17750 Apply deflate effect to the video.
17751
17752 This filter replaces the pixel by the local(3x3) average by taking into
17753 account only values lower than the pixel.
17754
17755 It accepts the following options:
17756
17757 threshold0
17758 threshold1
17759 threshold2
17760 threshold3
17761 Limit the maximum change for each plane, default is 65535. If 0,
17762 plane will remain unchanged.
17763
17764 Commands
17765
17766 This filter supports the all above options as commands.
17767
17768 deflicker
17769 Remove temporal frame luminance variations.
17770
17771 It accepts the following options:
17772
17773 size, s
17774 Set moving-average filter size in frames. Default is 5. Allowed
17775 range is 2 - 129.
17776
17777 mode, m
17778 Set averaging mode to smooth temporal luminance variations.
17779
17780 Available values are:
17781
17782 am Arithmetic mean
17783
17784 gm Geometric mean
17785
17786 hm Harmonic mean
17787
17788 qm Quadratic mean
17789
17790 cm Cubic mean
17791
17792 pm Power mean
17793
17794 median
17795 Median
17796
17797 bypass
17798 Do not actually modify frame. Useful when one only wants metadata.
17799
17800 dejudder
17801 Remove judder produced by partially interlaced telecined content.
17802
17803 Judder can be introduced, for instance, by pullup filter. If the
17804 original source was partially telecined content then the output of
17805 "pullup,dejudder" will have a variable frame rate. May change the
17806 recorded frame rate of the container. Aside from that change, this
17807 filter will not affect constant frame rate video.
17808
17809 The option available in this filter is:
17810
17811 cycle
17812 Specify the length of the window over which the judder repeats.
17813
17814 Accepts any integer greater than 1. Useful values are:
17815
17816 4 If the original was telecined from 24 to 30 fps (Film to NTSC).
17817
17818 5 If the original was telecined from 25 to 30 fps (PAL to NTSC).
17819
17820 20 If a mixture of the two.
17821
17822 The default is 4.
17823
17824 delogo
17825 Suppress a TV station logo by a simple interpolation of the surrounding
17826 pixels. Just set a rectangle covering the logo and watch it disappear
17827 (and sometimes something even uglier appear - your mileage may vary).
17828
17829 It accepts the following parameters:
17830
17831 x
17832 y Specify the top left corner coordinates of the logo. They must be
17833 specified.
17834
17835 w
17836 h Specify the width and height of the logo to clear. They must be
17837 specified.
17838
17839 show
17840 When set to 1, a green rectangle is drawn on the screen to simplify
17841 finding the right x, y, w, and h parameters. The default value is
17842 0.
17843
17844 The rectangle is drawn on the outermost pixels which will be
17845 (partly) replaced with interpolated values. The values of the next
17846 pixels immediately outside this rectangle in each direction will be
17847 used to compute the interpolated pixel values inside the rectangle.
17848
17849 Examples
17850
17851 • Set a rectangle covering the area with top left corner coordinates
17852 0,0 and size 100x77:
17853
17854 delogo=x=0:y=0:w=100:h=77
17855
17856 derain
17857 Remove the rain in the input image/video by applying the derain methods
17858 based on convolutional neural networks. Supported models:
17859
17860 • Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
17861 See
17862 <http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf>.
17863
17864 Training as well as model generation scripts are provided in the
17865 repository at <https://github.com/XueweiMeng/derain_filter.git>.
17866
17867 Native model files (.model) can be generated from TensorFlow model
17868 files (.pb) by using tools/python/convert.py
17869
17870 The filter accepts the following options:
17871
17872 filter_type
17873 Specify which filter to use. This option accepts the following
17874 values:
17875
17876 derain
17877 Derain filter. To conduct derain filter, you need to use a
17878 derain model.
17879
17880 dehaze
17881 Dehaze filter. To conduct dehaze filter, you need to use a
17882 dehaze model.
17883
17884 Default value is derain.
17885
17886 dnn_backend
17887 Specify which DNN backend to use for model loading and execution.
17888 This option accepts the following values:
17889
17890 native
17891 Native implementation of DNN loading and execution.
17892
17893 tensorflow
17894 TensorFlow backend. To enable this backend you need to install
17895 the TensorFlow for C library (see
17896 <https://www.tensorflow.org/install/lang_c>) and configure
17897 FFmpeg with "--enable-libtensorflow"
17898
17899 Default value is native.
17900
17901 model
17902 Set path to model file specifying network architecture and its
17903 parameters. Note that different backends use different file
17904 formats. TensorFlow and native backend can load files for only its
17905 format.
17906
17907 To get full functionality (such as async execution), please use the
17908 dnn_processing filter.
17909
17910 deshake
17911 Attempt to fix small changes in horizontal and/or vertical shift. This
17912 filter helps remove camera shake from hand-holding a camera, bumping a
17913 tripod, moving on a vehicle, etc.
17914
17915 The filter accepts the following options:
17916
17917 x
17918 y
17919 w
17920 h Specify a rectangular area where to limit the search for motion
17921 vectors. If desired the search for motion vectors can be limited
17922 to a rectangular area of the frame defined by its top left corner,
17923 width and height. These parameters have the same meaning as the
17924 drawbox filter which can be used to visualise the position of the
17925 bounding box.
17926
17927 This is useful when simultaneous movement of subjects within the
17928 frame might be confused for camera motion by the motion vector
17929 search.
17930
17931 If any or all of x, y, w and h are set to -1 then the full frame is
17932 used. This allows later options to be set without specifying the
17933 bounding box for the motion vector search.
17934
17935 Default - search the whole frame.
17936
17937 rx
17938 ry Specify the maximum extent of movement in x and y directions in the
17939 range 0-64 pixels. Default 16.
17940
17941 edge
17942 Specify how to generate pixels to fill blanks at the edge of the
17943 frame. Available values are:
17944
17945 blank, 0
17946 Fill zeroes at blank locations
17947
17948 original, 1
17949 Original image at blank locations
17950
17951 clamp, 2
17952 Extruded edge value at blank locations
17953
17954 mirror, 3
17955 Mirrored edge at blank locations
17956
17957 Default value is mirror.
17958
17959 blocksize
17960 Specify the blocksize to use for motion search. Range 4-128 pixels,
17961 default 8.
17962
17963 contrast
17964 Specify the contrast threshold for blocks. Only blocks with more
17965 than the specified contrast (difference between darkest and
17966 lightest pixels) will be considered. Range 1-255, default 125.
17967
17968 search
17969 Specify the search strategy. Available values are:
17970
17971 exhaustive, 0
17972 Set exhaustive search
17973
17974 less, 1
17975 Set less exhaustive search.
17976
17977 Default value is exhaustive.
17978
17979 filename
17980 If set then a detailed log of the motion search is written to the
17981 specified file.
17982
17983 despill
17984 Remove unwanted contamination of foreground colors, caused by reflected
17985 color of greenscreen or bluescreen.
17986
17987 This filter accepts the following options:
17988
17989 type
17990 Set what type of despill to use.
17991
17992 mix Set how spillmap will be generated.
17993
17994 expand
17995 Set how much to get rid of still remaining spill.
17996
17997 red Controls amount of red in spill area.
17998
17999 green
18000 Controls amount of green in spill area. Should be -1 for
18001 greenscreen.
18002
18003 blue
18004 Controls amount of blue in spill area. Should be -1 for
18005 bluescreen.
18006
18007 brightness
18008 Controls brightness of spill area, preserving colors.
18009
18010 alpha
18011 Modify alpha from generated spillmap.
18012
18013 Commands
18014
18015 This filter supports the all above options as commands.
18016
18017 detelecine
18018 Apply an exact inverse of the telecine operation. It requires a
18019 predefined pattern specified using the pattern option which must be the
18020 same as that passed to the telecine filter.
18021
18022 This filter accepts the following options:
18023
18024 first_field
18025 top, t
18026 top field first
18027
18028 bottom, b
18029 bottom field first The default value is "top".
18030
18031 pattern
18032 A string of numbers representing the pulldown pattern you wish to
18033 apply. The default value is 23.
18034
18035 start_frame
18036 A number representing position of the first frame with respect to
18037 the telecine pattern. This is to be used if the stream is cut. The
18038 default value is 0.
18039
18040 dilation
18041 Apply dilation effect to the video.
18042
18043 This filter replaces the pixel by the local(3x3) maximum.
18044
18045 It accepts the following options:
18046
18047 threshold0
18048 threshold1
18049 threshold2
18050 threshold3
18051 Limit the maximum change for each plane, default is 65535. If 0,
18052 plane will remain unchanged.
18053
18054 coordinates
18055 Flag which specifies the pixel to refer to. Default is 255 i.e. all
18056 eight pixels are used.
18057
18058 Flags to local 3x3 coordinates maps like this:
18059
18060 1 2 3
18061 4 5
18062 6 7 8
18063
18064 Commands
18065
18066 This filter supports the all above options as commands.
18067
18068 displace
18069 Displace pixels as indicated by second and third input stream.
18070
18071 It takes three input streams and outputs one stream, the first input is
18072 the source, and second and third input are displacement maps.
18073
18074 The second input specifies how much to displace pixels along the
18075 x-axis, while the third input specifies how much to displace pixels
18076 along the y-axis. If one of displacement map streams terminates, last
18077 frame from that displacement map will be used.
18078
18079 Note that once generated, displacements maps can be reused over and
18080 over again.
18081
18082 A description of the accepted options follows.
18083
18084 edge
18085 Set displace behavior for pixels that are out of range.
18086
18087 Available values are:
18088
18089 blank
18090 Missing pixels are replaced by black pixels.
18091
18092 smear
18093 Adjacent pixels will spread out to replace missing pixels.
18094
18095 wrap
18096 Out of range pixels are wrapped so they point to pixels of
18097 other side.
18098
18099 mirror
18100 Out of range pixels will be replaced with mirrored pixels.
18101
18102 Default is smear.
18103
18104 Examples
18105
18106 • Add ripple effect to rgb input of video size hd720:
18107
18108 ffmpeg -i INPUT -f lavfi -i nullsrc=s=hd720,lutrgb=128:128:128 -f lavfi -i nullsrc=s=hd720,geq='r=128+30*sin(2*PI*X/400+T):g=128+30*sin(2*PI*X/400+T):b=128+30*sin(2*PI*X/400+T)' -lavfi '[0][1][2]displace' OUTPUT
18109
18110 • Add wave effect to rgb input of video size hd720:
18111
18112 ffmpeg -i INPUT -f lavfi -i nullsrc=hd720,geq='r=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):g=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):b=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T))' -lavfi '[1]split[x][y],[0][x][y]displace' OUTPUT
18113
18114 dnn_classify
18115 Do classification with deep neural networks based on bounding boxes.
18116
18117 The filter accepts the following options:
18118
18119 dnn_backend
18120 Specify which DNN backend to use for model loading and execution.
18121 This option accepts only openvino now, tensorflow backends will be
18122 added.
18123
18124 model
18125 Set path to model file specifying network architecture and its
18126 parameters. Note that different backends use different file
18127 formats.
18128
18129 input
18130 Set the input name of the dnn network.
18131
18132 output
18133 Set the output name of the dnn network.
18134
18135 confidence
18136 Set the confidence threshold (default: 0.5).
18137
18138 labels
18139 Set path to label file specifying the mapping between label id and
18140 name. Each label name is written in one line, tailing spaces and
18141 empty lines are skipped. The first line is the name of label id 0,
18142 and the second line is the name of label id 1, etc. The label id
18143 is considered as name if the label file is not provided.
18144
18145 backend_configs
18146 Set the configs to be passed into backend
18147
18148 For tensorflow backend, you can set its configs with sess_config
18149 options, please use tools/python/tf_sess_config.py to get the
18150 configs for your system.
18151
18152 dnn_detect
18153 Do object detection with deep neural networks.
18154
18155 The filter accepts the following options:
18156
18157 dnn_backend
18158 Specify which DNN backend to use for model loading and execution.
18159 This option accepts only openvino now, tensorflow backends will be
18160 added.
18161
18162 model
18163 Set path to model file specifying network architecture and its
18164 parameters. Note that different backends use different file
18165 formats.
18166
18167 input
18168 Set the input name of the dnn network.
18169
18170 output
18171 Set the output name of the dnn network.
18172
18173 confidence
18174 Set the confidence threshold (default: 0.5).
18175
18176 labels
18177 Set path to label file specifying the mapping between label id and
18178 name. Each label name is written in one line, tailing spaces and
18179 empty lines are skipped. The first line is the name of label id 0
18180 (usually it is 'background'), and the second line is the name of
18181 label id 1, etc. The label id is considered as name if the label
18182 file is not provided.
18183
18184 backend_configs
18185 Set the configs to be passed into backend. To use async execution,
18186 set async (default: set). Roll back to sync execution if the
18187 backend does not support async.
18188
18189 dnn_processing
18190 Do image processing with deep neural networks. It works together with
18191 another filter which converts the pixel format of the Frame to what the
18192 dnn network requires.
18193
18194 The filter accepts the following options:
18195
18196 dnn_backend
18197 Specify which DNN backend to use for model loading and execution.
18198 This option accepts the following values:
18199
18200 native
18201 Native implementation of DNN loading and execution.
18202
18203 tensorflow
18204 TensorFlow backend. To enable this backend you need to install
18205 the TensorFlow for C library (see
18206 <https://www.tensorflow.org/install/lang_c>) and configure
18207 FFmpeg with "--enable-libtensorflow"
18208
18209 openvino
18210 OpenVINO backend. To enable this backend you need to build and
18211 install the OpenVINO for C library (see
18212 <https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md>)
18213 and configure FFmpeg with "--enable-libopenvino"
18214 (--extra-cflags=-I... --extra-ldflags=-L... might be needed if
18215 the header files and libraries are not installed into system
18216 path)
18217
18218 Default value is native.
18219
18220 model
18221 Set path to model file specifying network architecture and its
18222 parameters. Note that different backends use different file
18223 formats. TensorFlow, OpenVINO and native backend can load files for
18224 only its format.
18225
18226 Native model file (.model) can be generated from TensorFlow model
18227 file (.pb) by using tools/python/convert.py
18228
18229 input
18230 Set the input name of the dnn network.
18231
18232 output
18233 Set the output name of the dnn network.
18234
18235 backend_configs
18236 Set the configs to be passed into backend. To use async execution,
18237 set async (default: set). Roll back to sync execution if the
18238 backend does not support async.
18239
18240 For tensorflow backend, you can set its configs with sess_config
18241 options, please use tools/python/tf_sess_config.py to get the
18242 configs of TensorFlow backend for your system.
18243
18244 Examples
18245
18246 • Remove rain in rgb24 frame with can.pb (see derain filter):
18247
18248 ./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg
18249
18250 • Halve the pixel value of the frame with format gray32f:
18251
18252 ffmpeg -i input.jpg -vf format=grayf32,dnn_processing=model=halve_gray_float.model:input=dnn_in:output=dnn_out:dnn_backend=native -y out.native.png
18253
18254 • Handle the Y channel with srcnn.pb (see sr filter) for frame with
18255 yuv420p (planar YUV formats supported):
18256
18257 ./ffmpeg -i 480p.jpg -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=tensorflow:model=srcnn.pb:input=x:output=y -y srcnn.jpg
18258
18259 • Handle the Y channel with espcn.pb (see sr filter), which changes
18260 frame size, for format yuv420p (planar YUV formats supported),
18261 please use tools/python/tf_sess_config.py to get the configs of
18262 TensorFlow backend for your system.
18263
18264 ./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y:backend_configs=sess_config=0x10022805320e09cdccccccccccec3f20012a01303801 -y tmp.espcn.jpg
18265
18266 drawbox
18267 Draw a colored box on the input image.
18268
18269 It accepts the following parameters:
18270
18271 x
18272 y The expressions which specify the top left corner coordinates of
18273 the box. It defaults to 0.
18274
18275 width, w
18276 height, h
18277 The expressions which specify the width and height of the box; if 0
18278 they are interpreted as the input width and height. It defaults to
18279 0.
18280
18281 color, c
18282 Specify the color of the box to write. For the general syntax of
18283 this option, check the "Color" section in the ffmpeg-utils manual.
18284 If the special value "invert" is used, the box edge color is the
18285 same as the video with inverted luma.
18286
18287 thickness, t
18288 The expression which sets the thickness of the box edge. A value
18289 of "fill" will create a filled box. Default value is 3.
18290
18291 See below for the list of accepted constants.
18292
18293 replace
18294 Applicable if the input has alpha. With value 1, the pixels of the
18295 painted box will overwrite the video's color and alpha pixels.
18296 Default is 0, which composites the box onto the input, leaving the
18297 video's alpha intact.
18298
18299 The parameters for x, y, w and h and t are expressions containing the
18300 following constants:
18301
18302 dar The input display aspect ratio, it is the same as (w / h) * sar.
18303
18304 hsub
18305 vsub
18306 horizontal and vertical chroma subsample values. For example for
18307 the pixel format "yuv422p" hsub is 2 and vsub is 1.
18308
18309 in_h, ih
18310 in_w, iw
18311 The input width and height.
18312
18313 sar The input sample aspect ratio.
18314
18315 x
18316 y The x and y offset coordinates where the box is drawn.
18317
18318 w
18319 h The width and height of the drawn box.
18320
18321 box_source
18322 Box source can be set as side_data_detection_bboxes if you want to
18323 use box data in detection bboxes of side data.
18324
18325 If box_source is set, the x, y, width and height will be ignored
18326 and still use box data in detection bboxes of side data. So please
18327 do not use this parameter if you were not sure about the box
18328 source.
18329
18330 t The thickness of the drawn box.
18331
18332 These constants allow the x, y, w, h and t expressions to refer to
18333 each other, so you may for example specify "y=x/dar" or "h=w/dar".
18334
18335 Examples
18336
18337 • Draw a black box around the edge of the input image:
18338
18339 drawbox
18340
18341 • Draw a box with color red and an opacity of 50%:
18342
18343 drawbox=10:20:200:60:red@0.5
18344
18345 The previous example can be specified as:
18346
18347 drawbox=x=10:y=20:w=200:h=60:color=red@0.5
18348
18349 • Fill the box with pink color:
18350
18351 drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
18352
18353 • Draw a 2-pixel red 2.40:1 mask:
18354
18355 drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red
18356
18357 Commands
18358
18359 This filter supports same commands as options. The command accepts the
18360 same syntax of the corresponding option.
18361
18362 If the specified expression is not valid, it is kept at its current
18363 value.
18364
18365 drawgraph
18366 Draw a graph using input video metadata.
18367
18368 It accepts the following parameters:
18369
18370 m1 Set 1st frame metadata key from which metadata values will be used
18371 to draw a graph.
18372
18373 fg1 Set 1st foreground color expression.
18374
18375 m2 Set 2nd frame metadata key from which metadata values will be used
18376 to draw a graph.
18377
18378 fg2 Set 2nd foreground color expression.
18379
18380 m3 Set 3rd frame metadata key from which metadata values will be used
18381 to draw a graph.
18382
18383 fg3 Set 3rd foreground color expression.
18384
18385 m4 Set 4th frame metadata key from which metadata values will be used
18386 to draw a graph.
18387
18388 fg4 Set 4th foreground color expression.
18389
18390 min Set minimal value of metadata value.
18391
18392 max Set maximal value of metadata value.
18393
18394 bg Set graph background color. Default is white.
18395
18396 mode
18397 Set graph mode.
18398
18399 Available values for mode is:
18400
18401 bar
18402 dot
18403 line
18404
18405 Default is "line".
18406
18407 slide
18408 Set slide mode.
18409
18410 Available values for slide is:
18411
18412 frame
18413 Draw new frame when right border is reached.
18414
18415 replace
18416 Replace old columns with new ones.
18417
18418 scroll
18419 Scroll from right to left.
18420
18421 rscroll
18422 Scroll from left to right.
18423
18424 picture
18425 Draw single picture.
18426
18427 Default is "frame".
18428
18429 size
18430 Set size of graph video. For the syntax of this option, check the
18431 "Video size" section in the ffmpeg-utils manual. The default value
18432 is "900x256".
18433
18434 rate, r
18435 Set the output frame rate. Default value is 25.
18436
18437 The foreground color expressions can use the following variables:
18438
18439 MIN Minimal value of metadata value.
18440
18441 MAX Maximal value of metadata value.
18442
18443 VAL Current metadata key value.
18444
18445 The color is defined as 0xAABBGGRR.
18446
18447 Example using metadata from signalstats filter:
18448
18449 signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
18450
18451 Example using metadata from ebur128 filter:
18452
18453 ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
18454
18455 drawgrid
18456 Draw a grid on the input image.
18457
18458 It accepts the following parameters:
18459
18460 x
18461 y The expressions which specify the coordinates of some point of grid
18462 intersection (meant to configure offset). Both default to 0.
18463
18464 width, w
18465 height, h
18466 The expressions which specify the width and height of the grid
18467 cell, if 0 they are interpreted as the input width and height,
18468 respectively, minus "thickness", so image gets framed. Default to
18469 0.
18470
18471 color, c
18472 Specify the color of the grid. For the general syntax of this
18473 option, check the "Color" section in the ffmpeg-utils manual. If
18474 the special value "invert" is used, the grid color is the same as
18475 the video with inverted luma.
18476
18477 thickness, t
18478 The expression which sets the thickness of the grid line. Default
18479 value is 1.
18480
18481 See below for the list of accepted constants.
18482
18483 replace
18484 Applicable if the input has alpha. With 1 the pixels of the painted
18485 grid will overwrite the video's color and alpha pixels. Default is
18486 0, which composites the grid onto the input, leaving the video's
18487 alpha intact.
18488
18489 The parameters for x, y, w and h and t are expressions containing the
18490 following constants:
18491
18492 dar The input display aspect ratio, it is the same as (w / h) * sar.
18493
18494 hsub
18495 vsub
18496 horizontal and vertical chroma subsample values. For example for
18497 the pixel format "yuv422p" hsub is 2 and vsub is 1.
18498
18499 in_h, ih
18500 in_w, iw
18501 The input grid cell width and height.
18502
18503 sar The input sample aspect ratio.
18504
18505 x
18506 y The x and y coordinates of some point of grid intersection (meant
18507 to configure offset).
18508
18509 w
18510 h The width and height of the drawn cell.
18511
18512 t The thickness of the drawn cell.
18513
18514 These constants allow the x, y, w, h and t expressions to refer to
18515 each other, so you may for example specify "y=x/dar" or "h=w/dar".
18516
18517 Examples
18518
18519 • Draw a grid with cell 100x100 pixels, thickness 2 pixels, with
18520 color red and an opacity of 50%:
18521
18522 drawgrid=width=100:height=100:thickness=2:color=red@0.5
18523
18524 • Draw a white 3x3 grid with an opacity of 50%:
18525
18526 drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
18527
18528 Commands
18529
18530 This filter supports same commands as options. The command accepts the
18531 same syntax of the corresponding option.
18532
18533 If the specified expression is not valid, it is kept at its current
18534 value.
18535
18536 drawtext
18537 Draw a text string or text from a specified file on top of a video,
18538 using the libfreetype library.
18539
18540 To enable compilation of this filter, you need to configure FFmpeg with
18541 "--enable-libfreetype". To enable default font fallback and the font
18542 option you need to configure FFmpeg with "--enable-libfontconfig". To
18543 enable the text_shaping option, you need to configure FFmpeg with
18544 "--enable-libfribidi".
18545
18546 Syntax
18547
18548 It accepts the following parameters:
18549
18550 box Used to draw a box around text using the background color. The
18551 value must be either 1 (enable) or 0 (disable). The default value
18552 of box is 0.
18553
18554 boxborderw
18555 Set the width of the border to be drawn around the box using
18556 boxcolor. The default value of boxborderw is 0.
18557
18558 boxcolor
18559 The color to be used for drawing box around text. For the syntax of
18560 this option, check the "Color" section in the ffmpeg-utils manual.
18561
18562 The default value of boxcolor is "white".
18563
18564 line_spacing
18565 Set the line spacing in pixels of the border to be drawn around the
18566 box using box. The default value of line_spacing is 0.
18567
18568 borderw
18569 Set the width of the border to be drawn around the text using
18570 bordercolor. The default value of borderw is 0.
18571
18572 bordercolor
18573 Set the color to be used for drawing border around text. For the
18574 syntax of this option, check the "Color" section in the ffmpeg-
18575 utils manual.
18576
18577 The default value of bordercolor is "black".
18578
18579 expansion
18580 Select how the text is expanded. Can be either "none", "strftime"
18581 (deprecated) or "normal" (default). See the drawtext_expansion,
18582 Text expansion section below for details.
18583
18584 basetime
18585 Set a start time for the count. Value is in microseconds. Only
18586 applied in the deprecated strftime expansion mode. To emulate in
18587 normal expansion mode use the "pts" function, supplying the start
18588 time (in seconds) as the second argument.
18589
18590 fix_bounds
18591 If true, check and fix text coords to avoid clipping.
18592
18593 fontcolor
18594 The color to be used for drawing fonts. For the syntax of this
18595 option, check the "Color" section in the ffmpeg-utils manual.
18596
18597 The default value of fontcolor is "black".
18598
18599 fontcolor_expr
18600 String which is expanded the same way as text to obtain dynamic
18601 fontcolor value. By default this option has empty value and is not
18602 processed. When this option is set, it overrides fontcolor option.
18603
18604 font
18605 The font family to be used for drawing text. By default Sans.
18606
18607 fontfile
18608 The font file to be used for drawing text. The path must be
18609 included. This parameter is mandatory if the fontconfig support is
18610 disabled.
18611
18612 alpha
18613 Draw the text applying alpha blending. The value can be a number
18614 between 0.0 and 1.0. The expression accepts the same variables x,
18615 y as well. The default value is 1. Please see fontcolor_expr.
18616
18617 fontsize
18618 The font size to be used for drawing text. The default value of
18619 fontsize is 16.
18620
18621 text_shaping
18622 If set to 1, attempt to shape the text (for example, reverse the
18623 order of right-to-left text and join Arabic characters) before
18624 drawing it. Otherwise, just draw the text exactly as given. By
18625 default 1 (if supported).
18626
18627 ft_load_flags
18628 The flags to be used for loading the fonts.
18629
18630 The flags map the corresponding flags supported by libfreetype, and
18631 are a combination of the following values:
18632
18633 default
18634 no_scale
18635 no_hinting
18636 render
18637 no_bitmap
18638 vertical_layout
18639 force_autohint
18640 crop_bitmap
18641 pedantic
18642 ignore_global_advance_width
18643 no_recurse
18644 ignore_transform
18645 monochrome
18646 linear_design
18647 no_autohint
18648
18649 Default value is "default".
18650
18651 For more information consult the documentation for the FT_LOAD_*
18652 libfreetype flags.
18653
18654 shadowcolor
18655 The color to be used for drawing a shadow behind the drawn text.
18656 For the syntax of this option, check the "Color" section in the
18657 ffmpeg-utils manual.
18658
18659 The default value of shadowcolor is "black".
18660
18661 shadowx
18662 shadowy
18663 The x and y offsets for the text shadow position with respect to
18664 the position of the text. They can be either positive or negative
18665 values. The default value for both is "0".
18666
18667 start_number
18668 The starting frame number for the n/frame_num variable. The default
18669 value is "0".
18670
18671 tabsize
18672 The size in number of spaces to use for rendering the tab. Default
18673 value is 4.
18674
18675 timecode
18676 Set the initial timecode representation in "hh:mm:ss[:;.]ff"
18677 format. It can be used with or without text parameter.
18678 timecode_rate option must be specified.
18679
18680 timecode_rate, rate, r
18681 Set the timecode frame rate (timecode only). Value will be rounded
18682 to nearest integer. Minimum value is "1". Drop-frame timecode is
18683 supported for frame rates 30 & 60.
18684
18685 tc24hmax
18686 If set to 1, the output of the timecode option will wrap around at
18687 24 hours. Default is 0 (disabled).
18688
18689 text
18690 The text string to be drawn. The text must be a sequence of UTF-8
18691 encoded characters. This parameter is mandatory if no file is
18692 specified with the parameter textfile.
18693
18694 textfile
18695 A text file containing text to be drawn. The text must be a
18696 sequence of UTF-8 encoded characters.
18697
18698 This parameter is mandatory if no text string is specified with the
18699 parameter text.
18700
18701 If both text and textfile are specified, an error is thrown.
18702
18703 text_source
18704 Text source should be set as side_data_detection_bboxes if you want
18705 to use text data in detection bboxes of side data.
18706
18707 If text source is set, text and textfile will be ignored and still
18708 use text data in detection bboxes of side data. So please do not
18709 use this parameter if you are not sure about the text source.
18710
18711 reload
18712 If set to 1, the textfile will be reloaded before each frame. Be
18713 sure to update it atomically, or it may be read partially, or even
18714 fail.
18715
18716 x
18717 y The expressions which specify the offsets where text will be drawn
18718 within the video frame. They are relative to the top/left border of
18719 the output image.
18720
18721 The default value of x and y is "0".
18722
18723 See below for the list of accepted constants and functions.
18724
18725 The parameters for x and y are expressions containing the following
18726 constants and functions:
18727
18728 dar input display aspect ratio, it is the same as (w / h) * sar
18729
18730 hsub
18731 vsub
18732 horizontal and vertical chroma subsample values. For example for
18733 the pixel format "yuv422p" hsub is 2 and vsub is 1.
18734
18735 line_h, lh
18736 the height of each text line
18737
18738 main_h, h, H
18739 the input height
18740
18741 main_w, w, W
18742 the input width
18743
18744 max_glyph_a, ascent
18745 the maximum distance from the baseline to the highest/upper grid
18746 coordinate used to place a glyph outline point, for all the
18747 rendered glyphs. It is a positive value, due to the grid's
18748 orientation with the Y axis upwards.
18749
18750 max_glyph_d, descent
18751 the maximum distance from the baseline to the lowest grid
18752 coordinate used to place a glyph outline point, for all the
18753 rendered glyphs. This is a negative value, due to the grid's
18754 orientation, with the Y axis upwards.
18755
18756 max_glyph_h
18757 maximum glyph height, that is the maximum height for all the glyphs
18758 contained in the rendered text, it is equivalent to ascent -
18759 descent.
18760
18761 max_glyph_w
18762 maximum glyph width, that is the maximum width for all the glyphs
18763 contained in the rendered text
18764
18765 n the number of input frame, starting from 0
18766
18767 rand(min, max)
18768 return a random number included between min and max
18769
18770 sar The input sample aspect ratio.
18771
18772 t timestamp expressed in seconds, NAN if the input timestamp is
18773 unknown
18774
18775 text_h, th
18776 the height of the rendered text
18777
18778 text_w, tw
18779 the width of the rendered text
18780
18781 x
18782 y the x and y offset coordinates where the text is drawn.
18783
18784 These parameters allow the x and y expressions to refer to each
18785 other, so you can for example specify "y=x/dar".
18786
18787 pict_type
18788 A one character description of the current frame's picture type.
18789
18790 pkt_pos
18791 The current packet's position in the input file or stream (in
18792 bytes, from the start of the input). A value of -1 indicates this
18793 info is not available.
18794
18795 pkt_duration
18796 The current packet's duration, in seconds.
18797
18798 pkt_size
18799 The current packet's size (in bytes).
18800
18801 Text expansion
18802
18803 If expansion is set to "strftime", the filter recognizes strftime()
18804 sequences in the provided text and expands them accordingly. Check the
18805 documentation of strftime(). This feature is deprecated.
18806
18807 If expansion is set to "none", the text is printed verbatim.
18808
18809 If expansion is set to "normal" (which is the default), the following
18810 expansion mechanism is used.
18811
18812 The backslash character \, followed by any character, always expands to
18813 the second character.
18814
18815 Sequences of the form "%{...}" are expanded. The text between the
18816 braces is a function name, possibly followed by arguments separated by
18817 ':'. If the arguments contain special characters or delimiters (':' or
18818 '}'), they should be escaped.
18819
18820 Note that they probably must also be escaped as the value for the text
18821 option in the filter argument string and as the filter argument in the
18822 filtergraph description, and possibly also for the shell, that makes up
18823 to four levels of escaping; using a text file avoids these problems.
18824
18825 The following functions are available:
18826
18827 expr, e
18828 The expression evaluation result.
18829
18830 It must take one argument specifying the expression to be
18831 evaluated, which accepts the same constants and functions as the x
18832 and y values. Note that not all constants should be used, for
18833 example the text size is not known when evaluating the expression,
18834 so the constants text_w and text_h will have an undefined value.
18835
18836 expr_int_format, eif
18837 Evaluate the expression's value and output as formatted integer.
18838
18839 The first argument is the expression to be evaluated, just as for
18840 the expr function. The second argument specifies the output
18841 format. Allowed values are x, X, d and u. They are treated exactly
18842 as in the "printf" function. The third parameter is optional and
18843 sets the number of positions taken by the output. It can be used
18844 to add padding with zeros from the left.
18845
18846 gmtime
18847 The time at which the filter is running, expressed in UTC. It can
18848 accept an argument: a strftime() format string.
18849
18850 localtime
18851 The time at which the filter is running, expressed in the local
18852 time zone. It can accept an argument: a strftime() format string.
18853
18854 metadata
18855 Frame metadata. Takes one or two arguments.
18856
18857 The first argument is mandatory and specifies the metadata key.
18858
18859 The second argument is optional and specifies a default value, used
18860 when the metadata key is not found or empty.
18861
18862 Available metadata can be identified by inspecting entries starting
18863 with TAG included within each frame section printed by running
18864 "ffprobe -show_frames".
18865
18866 String metadata generated in filters leading to the drawtext filter
18867 are also available.
18868
18869 n, frame_num
18870 The frame number, starting from 0.
18871
18872 pict_type
18873 A one character description of the current picture type.
18874
18875 pts The timestamp of the current frame. It can take up to three
18876 arguments.
18877
18878 The first argument is the format of the timestamp; it defaults to
18879 "flt" for seconds as a decimal number with microsecond accuracy;
18880 "hms" stands for a formatted [-]HH:MM:SS.mmm timestamp with
18881 millisecond accuracy. "gmtime" stands for the timestamp of the
18882 frame formatted as UTC time; "localtime" stands for the timestamp
18883 of the frame formatted as local time zone time.
18884
18885 The second argument is an offset added to the timestamp.
18886
18887 If the format is set to "hms", a third argument "24HH" may be
18888 supplied to present the hour part of the formatted timestamp in 24h
18889 format (00-23).
18890
18891 If the format is set to "localtime" or "gmtime", a third argument
18892 may be supplied: a strftime() format string. By default, YYYY-MM-
18893 DD HH:MM:SS format will be used.
18894
18895 Commands
18896
18897 This filter supports altering parameters via commands:
18898
18899 reinit
18900 Alter existing filter parameters.
18901
18902 Syntax for the argument is the same as for filter invocation, e.g.
18903
18904 fontsize=56:fontcolor=green:text='Hello World'
18905
18906 Full filter invocation with sendcmd would look like this:
18907
18908 sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
18909
18910 If the entire argument can't be parsed or applied as valid values then
18911 the filter will continue with its existing parameters.
18912
18913 Examples
18914
18915 • Draw "Test Text" with font FreeSerif, using the default values for
18916 the optional parameters.
18917
18918 drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'"
18919
18920 • Draw 'Test Text' with font FreeSerif of size 24 at position x=100
18921 and y=50 (counting from the top-left corner of the screen), text is
18922 yellow with a red box around it. Both the text and the box have an
18923 opacity of 20%.
18924
18925 drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
18926 x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2"
18927
18928 Note that the double quotes are not necessary if spaces are not
18929 used within the parameter list.
18930
18931 • Show the text at the center of the video frame:
18932
18933 drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2"
18934
18935 • Show the text at a random position, switching to a new position
18936 every 30 seconds:
18937
18938 drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=if(eq(mod(t\,30)\,0)\,rand(0\,(w-text_w))\,x):y=if(eq(mod(t\,30)\,0)\,rand(0\,(h-text_h))\,y)"
18939
18940 • Show a text line sliding from right to left in the last row of the
18941 video frame. The file LONG_LINE is assumed to contain a single line
18942 with no newlines.
18943
18944 drawtext="fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t"
18945
18946 • Show the content of file CREDITS off the bottom of the frame and
18947 scroll up.
18948
18949 drawtext="fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t"
18950
18951 • Draw a single green letter "g", at the center of the input video.
18952 The glyph baseline is placed at half screen height.
18953
18954 drawtext="fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent"
18955
18956 • Show text for 1 second every 3 seconds:
18957
18958 drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'"
18959
18960 • Use fontconfig to set the font. Note that the colons need to be
18961 escaped.
18962
18963 drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
18964
18965 • Draw "Test Text" with font size dependent on height of the video.
18966
18967 drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)"
18968
18969 • Print the date of a real-time encoding (see strftime(3)):
18970
18971 drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
18972
18973 • Show text fading in and out (appearing/disappearing):
18974
18975 #!/bin/sh
18976 DS=1.0 # display start
18977 DE=10.0 # display end
18978 FID=1.5 # fade in duration
18979 FOD=5 # fade out duration
18980 ffplay -f lavfi "color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 }"
18981
18982 • Horizontally align multiple separate texts. Note that max_glyph_a
18983 and the fontsize value are included in the y offset.
18984
18985 drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
18986 drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
18987
18988 • Plot special lavf.image2dec.source_basename metadata onto each
18989 frame if such metadata exists. Otherwise, plot the string "NA".
18990 Note that image2 demuxer must have option -export_path_metadata 1
18991 for the special metadata fields to be available for filters.
18992
18993 drawtext="fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10"
18994
18995 For more information about libfreetype, check:
18996 <http://www.freetype.org/>.
18997
18998 For more information about fontconfig, check:
18999 <http://freedesktop.org/software/fontconfig/fontconfig-user.html>.
19000
19001 For more information about libfribidi, check: <http://fribidi.org/>.
19002
19003 edgedetect
19004 Detect and draw edges. The filter uses the Canny Edge Detection
19005 algorithm.
19006
19007 The filter accepts the following options:
19008
19009 low
19010 high
19011 Set low and high threshold values used by the Canny thresholding
19012 algorithm.
19013
19014 The high threshold selects the "strong" edge pixels, which are then
19015 connected through 8-connectivity with the "weak" edge pixels
19016 selected by the low threshold.
19017
19018 low and high threshold values must be chosen in the range [0,1],
19019 and low should be lesser or equal to high.
19020
19021 Default value for low is "20/255", and default value for high is
19022 "50/255".
19023
19024 mode
19025 Define the drawing mode.
19026
19027 wires
19028 Draw white/gray wires on black background.
19029
19030 colormix
19031 Mix the colors to create a paint/cartoon effect.
19032
19033 canny
19034 Apply Canny edge detector on all selected planes.
19035
19036 Default value is wires.
19037
19038 planes
19039 Select planes for filtering. By default all available planes are
19040 filtered.
19041
19042 Examples
19043
19044 • Standard edge detection with custom values for the hysteresis
19045 thresholding:
19046
19047 edgedetect=low=0.1:high=0.4
19048
19049 • Painting effect without thresholding:
19050
19051 edgedetect=mode=colormix:high=0
19052
19053 elbg
19054 Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
19055
19056 For each input image, the filter will compute the optimal mapping from
19057 the input to the output given the codebook length, that is the number
19058 of distinct output colors.
19059
19060 This filter accepts the following options.
19061
19062 codebook_length, l
19063 Set codebook length. The value must be a positive integer, and
19064 represents the number of distinct output colors. Default value is
19065 256.
19066
19067 nb_steps, n
19068 Set the maximum number of iterations to apply for computing the
19069 optimal mapping. The higher the value the better the result and the
19070 higher the computation time. Default value is 1.
19071
19072 seed, s
19073 Set a random seed, must be an integer included between 0 and
19074 UINT32_MAX. If not specified, or if explicitly set to -1, the
19075 filter will try to use a good random seed on a best effort basis.
19076
19077 pal8
19078 Set pal8 output pixel format. This option does not work with
19079 codebook length greater than 256. Default is disabled.
19080
19081 use_alpha
19082 Include alpha values in the quantization calculation. Allows
19083 creating palettized output images (e.g. PNG8) with multiple alpha
19084 smooth blending.
19085
19086 entropy
19087 Measure graylevel entropy in histogram of color channels of video
19088 frames.
19089
19090 It accepts the following parameters:
19091
19092 mode
19093 Can be either normal or diff. Default is normal.
19094
19095 diff mode measures entropy of histogram delta values, absolute
19096 differences between neighbour histogram values.
19097
19098 epx
19099 Apply the EPX magnification filter which is designed for pixel art.
19100
19101 It accepts the following option:
19102
19103 n Set the scaling dimension: 2 for "2xEPX", 3 for "3xEPX". Default
19104 is 3.
19105
19106 eq
19107 Set brightness, contrast, saturation and approximate gamma adjustment.
19108
19109 The filter accepts the following options:
19110
19111 contrast
19112 Set the contrast expression. The value must be a float value in
19113 range "-1000.0" to 1000.0. The default value is "1".
19114
19115 brightness
19116 Set the brightness expression. The value must be a float value in
19117 range "-1.0" to 1.0. The default value is "0".
19118
19119 saturation
19120 Set the saturation expression. The value must be a float in range
19121 0.0 to 3.0. The default value is "1".
19122
19123 gamma
19124 Set the gamma expression. The value must be a float in range 0.1 to
19125 10.0. The default value is "1".
19126
19127 gamma_r
19128 Set the gamma expression for red. The value must be a float in
19129 range 0.1 to 10.0. The default value is "1".
19130
19131 gamma_g
19132 Set the gamma expression for green. The value must be a float in
19133 range 0.1 to 10.0. The default value is "1".
19134
19135 gamma_b
19136 Set the gamma expression for blue. The value must be a float in
19137 range 0.1 to 10.0. The default value is "1".
19138
19139 gamma_weight
19140 Set the gamma weight expression. It can be used to reduce the
19141 effect of a high gamma value on bright image areas, e.g. keep them
19142 from getting overamplified and just plain white. The value must be
19143 a float in range 0.0 to 1.0. A value of 0.0 turns the gamma
19144 correction all the way down while 1.0 leaves it at its full
19145 strength. Default is "1".
19146
19147 eval
19148 Set when the expressions for brightness, contrast, saturation and
19149 gamma expressions are evaluated.
19150
19151 It accepts the following values:
19152
19153 init
19154 only evaluate expressions once during the filter initialization
19155 or when a command is processed
19156
19157 frame
19158 evaluate expressions for each incoming frame
19159
19160 Default value is init.
19161
19162 The expressions accept the following parameters:
19163
19164 n frame count of the input frame starting from 0
19165
19166 pos byte position of the corresponding packet in the input file, NAN if
19167 unspecified
19168
19169 r frame rate of the input video, NAN if the input frame rate is
19170 unknown
19171
19172 t timestamp expressed in seconds, NAN if the input timestamp is
19173 unknown
19174
19175 Commands
19176
19177 The filter supports the following commands:
19178
19179 contrast
19180 Set the contrast expression.
19181
19182 brightness
19183 Set the brightness expression.
19184
19185 saturation
19186 Set the saturation expression.
19187
19188 gamma
19189 Set the gamma expression.
19190
19191 gamma_r
19192 Set the gamma_r expression.
19193
19194 gamma_g
19195 Set gamma_g expression.
19196
19197 gamma_b
19198 Set gamma_b expression.
19199
19200 gamma_weight
19201 Set gamma_weight expression.
19202
19203 The command accepts the same syntax of the corresponding option.
19204
19205 If the specified expression is not valid, it is kept at its current
19206 value.
19207
19208 erosion
19209 Apply erosion effect to the video.
19210
19211 This filter replaces the pixel by the local(3x3) minimum.
19212
19213 It accepts the following options:
19214
19215 threshold0
19216 threshold1
19217 threshold2
19218 threshold3
19219 Limit the maximum change for each plane, default is 65535. If 0,
19220 plane will remain unchanged.
19221
19222 coordinates
19223 Flag which specifies the pixel to refer to. Default is 255 i.e. all
19224 eight pixels are used.
19225
19226 Flags to local 3x3 coordinates maps like this:
19227
19228 1 2 3
19229 4 5
19230 6 7 8
19231
19232 Commands
19233
19234 This filter supports the all above options as commands.
19235
19236 estdif
19237 Deinterlace the input video ("estdif" stands for "Edge Slope Tracing
19238 Deinterlacing Filter").
19239
19240 Spatial only filter that uses edge slope tracing algorithm to
19241 interpolate missing lines. It accepts the following parameters:
19242
19243 mode
19244 The interlacing mode to adopt. It accepts one of the following
19245 values:
19246
19247 frame
19248 Output one frame for each frame.
19249
19250 field
19251 Output one frame for each field.
19252
19253 The default value is "field".
19254
19255 parity
19256 The picture field parity assumed for the input interlaced video. It
19257 accepts one of the following values:
19258
19259 tff Assume the top field is first.
19260
19261 bff Assume the bottom field is first.
19262
19263 auto
19264 Enable automatic detection of field parity.
19265
19266 The default value is "auto". If the interlacing is unknown or the
19267 decoder does not export this information, top field first will be
19268 assumed.
19269
19270 deint
19271 Specify which frames to deinterlace. Accepts one of the following
19272 values:
19273
19274 all Deinterlace all frames.
19275
19276 interlaced
19277 Only deinterlace frames marked as interlaced.
19278
19279 The default value is "all".
19280
19281 rslope
19282 Specify the search radius for edge slope tracing. Default value is
19283 1. Allowed range is from 1 to 15.
19284
19285 redge
19286 Specify the search radius for best edge matching. Default value is
19287 2. Allowed range is from 0 to 15.
19288
19289 ecost
19290 Specify the edge cost for edge matching. Default value is 0.03125.
19291 Allowed range is from 0 to 1.
19292
19293 mcost
19294 Specify the middle cost for edge matching. Default value is 0.5.
19295 Allowed range is from 0 to 1.
19296
19297 dcost
19298 Specify the distance cost for edge matching. Default value is 0.5.
19299 Allowed range is from 0 to 1.
19300
19301 interp
19302 Specify the interpolation used. Default is 4-point interpolation.
19303 It accepts one of the following values:
19304
19305 2p Two-point interpolation.
19306
19307 4p Four-point interpolation.
19308
19309 6p Six-point interpolation.
19310
19311 Commands
19312
19313 This filter supports same commands as options.
19314
19315 exposure
19316 Adjust exposure of the video stream.
19317
19318 The filter accepts the following options:
19319
19320 exposure
19321 Set the exposure correction in EV. Allowed range is from -3.0 to
19322 3.0 EV Default value is 0 EV.
19323
19324 black
19325 Set the black level correction. Allowed range is from -1.0 to 1.0.
19326 Default value is 0.
19327
19328 Commands
19329
19330 This filter supports same commands as options.
19331
19332 extractplanes
19333 Extract color channel components from input video stream into separate
19334 grayscale video streams.
19335
19336 The filter accepts the following option:
19337
19338 planes
19339 Set plane(s) to extract.
19340
19341 Available values for planes are:
19342
19343 y
19344 u
19345 v
19346 a
19347 r
19348 g
19349 b
19350
19351 Choosing planes not available in the input will result in an error.
19352 That means you cannot select "r", "g", "b" planes with "y", "u",
19353 "v" planes at same time.
19354
19355 Examples
19356
19357 • Extract luma, u and v color channel component from input video
19358 frame into 3 grayscale outputs:
19359
19360 ffmpeg -i video.avi -filter_complex 'extractplanes=y+u+v[y][u][v]' -map '[y]' y.avi -map '[u]' u.avi -map '[v]' v.avi
19361
19362 fade
19363 Apply a fade-in/out effect to the input video.
19364
19365 It accepts the following parameters:
19366
19367 type, t
19368 The effect type can be either "in" for a fade-in, or "out" for a
19369 fade-out effect. Default is "in".
19370
19371 start_frame, s
19372 Specify the number of the frame to start applying the fade effect
19373 at. Default is 0.
19374
19375 nb_frames, n
19376 The number of frames that the fade effect lasts. At the end of the
19377 fade-in effect, the output video will have the same intensity as
19378 the input video. At the end of the fade-out transition, the output
19379 video will be filled with the selected color. Default is 25.
19380
19381 alpha
19382 If set to 1, fade only alpha channel, if one exists on the input.
19383 Default value is 0.
19384
19385 start_time, st
19386 Specify the timestamp (in seconds) of the frame to start to apply
19387 the fade effect. If both start_frame and start_time are specified,
19388 the fade will start at whichever comes last. Default is 0.
19389
19390 duration, d
19391 The number of seconds for which the fade effect has to last. At the
19392 end of the fade-in effect the output video will have the same
19393 intensity as the input video, at the end of the fade-out transition
19394 the output video will be filled with the selected color. If both
19395 duration and nb_frames are specified, duration is used. Default is
19396 0 (nb_frames is used by default).
19397
19398 color, c
19399 Specify the color of the fade. Default is "black".
19400
19401 Examples
19402
19403 • Fade in the first 30 frames of video:
19404
19405 fade=in:0:30
19406
19407 The command above is equivalent to:
19408
19409 fade=t=in:s=0:n=30
19410
19411 • Fade out the last 45 frames of a 200-frame video:
19412
19413 fade=out:155:45
19414 fade=type=out:start_frame=155:nb_frames=45
19415
19416 • Fade in the first 25 frames and fade out the last 25 frames of a
19417 1000-frame video:
19418
19419 fade=in:0:25, fade=out:975:25
19420
19421 • Make the first 5 frames yellow, then fade in from frame 5-24:
19422
19423 fade=in:5:20:color=yellow
19424
19425 • Fade in alpha over first 25 frames of video:
19426
19427 fade=in:0:25:alpha=1
19428
19429 • Make the first 5.5 seconds black, then fade in for 0.5 seconds:
19430
19431 fade=t=in:st=5.5:d=0.5
19432
19433 fftdnoiz
19434 Denoise frames using 3D FFT (frequency domain filtering).
19435
19436 The filter accepts the following options:
19437
19438 sigma
19439 Set the noise sigma constant. This sets denoising strength.
19440 Default value is 1. Allowed range is from 0 to 30. Using very high
19441 sigma with low overlap may give blocking artifacts.
19442
19443 amount
19444 Set amount of denoising. By default all detected noise is reduced.
19445 Default value is 1. Allowed range is from 0 to 1.
19446
19447 block
19448 Set size of block, Default is 4, can be 3, 4, 5 or 6. Actual size
19449 of block in pixels is 2 to power of block, so by default block size
19450 in pixels is 2^4 which is 16.
19451
19452 overlap
19453 Set block overlap. Default is 0.5. Allowed range is from 0.2 to
19454 0.8.
19455
19456 prev
19457 Set number of previous frames to use for denoising. By default is
19458 set to 0.
19459
19460 next
19461 Set number of next frames to to use for denoising. By default is
19462 set to 0.
19463
19464 planes
19465 Set planes which will be filtered, by default are all available
19466 filtered except alpha.
19467
19468 fftfilt
19469 Apply arbitrary expressions to samples in frequency domain
19470
19471 dc_Y
19472 Adjust the dc value (gain) of the luma plane of the image. The
19473 filter accepts an integer value in range 0 to 1000. The default
19474 value is set to 0.
19475
19476 dc_U
19477 Adjust the dc value (gain) of the 1st chroma plane of the image.
19478 The filter accepts an integer value in range 0 to 1000. The default
19479 value is set to 0.
19480
19481 dc_V
19482 Adjust the dc value (gain) of the 2nd chroma plane of the image.
19483 The filter accepts an integer value in range 0 to 1000. The default
19484 value is set to 0.
19485
19486 weight_Y
19487 Set the frequency domain weight expression for the luma plane.
19488
19489 weight_U
19490 Set the frequency domain weight expression for the 1st chroma
19491 plane.
19492
19493 weight_V
19494 Set the frequency domain weight expression for the 2nd chroma
19495 plane.
19496
19497 eval
19498 Set when the expressions are evaluated.
19499
19500 It accepts the following values:
19501
19502 init
19503 Only evaluate expressions once during the filter
19504 initialization.
19505
19506 frame
19507 Evaluate expressions for each incoming frame.
19508
19509 Default value is init.
19510
19511 The filter accepts the following variables:
19512
19513 X
19514 Y The coordinates of the current sample.
19515
19516 W
19517 H The width and height of the image.
19518
19519 N The number of input frame, starting from 0.
19520
19521 WS
19522 HS The size of FFT array for horizontal and vertical processing.
19523
19524 Examples
19525
19526 • High-pass:
19527
19528 fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
19529
19530 • Low-pass:
19531
19532 fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
19533
19534 • Sharpen:
19535
19536 fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
19537
19538 • Blur:
19539
19540 fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
19541
19542 field
19543 Extract a single field from an interlaced image using stride arithmetic
19544 to avoid wasting CPU time. The output frames are marked as non-
19545 interlaced.
19546
19547 The filter accepts the following options:
19548
19549 type
19550 Specify whether to extract the top (if the value is 0 or "top") or
19551 the bottom field (if the value is 1 or "bottom").
19552
19553 fieldhint
19554 Create new frames by copying the top and bottom fields from surrounding
19555 frames supplied as numbers by the hint file.
19556
19557 hint
19558 Set file containing hints: absolute/relative frame numbers.
19559
19560 There must be one line for each frame in a clip. Each line must
19561 contain two numbers separated by the comma, optionally followed by
19562 "-" or "+". Numbers supplied on each line of file can not be out
19563 of [N-1,N+1] where N is current frame number for "absolute" mode or
19564 out of [-1, 1] range for "relative" mode. First number tells from
19565 which frame to pick up top field and second number tells from which
19566 frame to pick up bottom field.
19567
19568 If optionally followed by "+" output frame will be marked as
19569 interlaced, else if followed by "-" output frame will be marked as
19570 progressive, else it will be marked same as input frame. If
19571 optionally followed by "t" output frame will use only top field, or
19572 in case of "b" it will use only bottom field. If line starts with
19573 "#" or ";" that line is skipped.
19574
19575 mode
19576 Can be item "absolute" or "relative". Default is "absolute".
19577
19578 Example of first several lines of "hint" file for "relative" mode:
19579
19580 0,0 - # first frame
19581 1,0 - # second frame, use third's frame top field and second's frame bottom field
19582 1,0 - # third frame, use fourth's frame top field and third's frame bottom field
19583 1,0 -
19584 0,0 -
19585 0,0 -
19586 1,0 -
19587 1,0 -
19588 1,0 -
19589 0,0 -
19590 0,0 -
19591 1,0 -
19592 1,0 -
19593 1,0 -
19594 0,0 -
19595
19596 fieldmatch
19597 Field matching filter for inverse telecine. It is meant to reconstruct
19598 the progressive frames from a telecined stream. The filter does not
19599 drop duplicated frames, so to achieve a complete inverse telecine
19600 "fieldmatch" needs to be followed by a decimation filter such as
19601 decimate in the filtergraph.
19602
19603 The separation of the field matching and the decimation is notably
19604 motivated by the possibility of inserting a de-interlacing filter
19605 fallback between the two. If the source has mixed telecined and real
19606 interlaced content, "fieldmatch" will not be able to match fields for
19607 the interlaced parts. But these remaining combed frames will be marked
19608 as interlaced, and thus can be de-interlaced by a later filter such as
19609 yadif before decimation.
19610
19611 In addition to the various configuration options, "fieldmatch" can take
19612 an optional second stream, activated through the ppsrc option. If
19613 enabled, the frames reconstruction will be based on the fields and
19614 frames from this second stream. This allows the first input to be pre-
19615 processed in order to help the various algorithms of the filter, while
19616 keeping the output lossless (assuming the fields are matched properly).
19617 Typically, a field-aware denoiser, or brightness/contrast adjustments
19618 can help.
19619
19620 Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth
19621 project) and VIVTC/VFM (VapourSynth project). The later is a light
19622 clone of TFM from which "fieldmatch" is based on. While the semantic
19623 and usage are very close, some behaviour and options names can differ.
19624
19625 The decimate filter currently only works for constant frame rate input.
19626 If your input has mixed telecined (30fps) and progressive content with
19627 a lower framerate like 24fps use the following filterchain to produce
19628 the necessary cfr stream:
19629 "dejudder,fps=30000/1001,fieldmatch,decimate".
19630
19631 The filter accepts the following options:
19632
19633 order
19634 Specify the assumed field order of the input stream. Available
19635 values are:
19636
19637 auto
19638 Auto detect parity (use FFmpeg's internal parity value).
19639
19640 bff Assume bottom field first.
19641
19642 tff Assume top field first.
19643
19644 Note that it is sometimes recommended not to trust the parity
19645 announced by the stream.
19646
19647 Default value is auto.
19648
19649 mode
19650 Set the matching mode or strategy to use. pc mode is the safest in
19651 the sense that it won't risk creating jerkiness due to duplicate
19652 frames when possible, but if there are bad edits or blended fields
19653 it will end up outputting combed frames when a good match might
19654 actually exist. On the other hand, pcn_ub mode is the most risky in
19655 terms of creating jerkiness, but will almost always find a good
19656 frame if there is one. The other values are all somewhere in
19657 between pc and pcn_ub in terms of risking jerkiness and creating
19658 duplicate frames versus finding good matches in sections with bad
19659 edits, orphaned fields, blended fields, etc.
19660
19661 More details about p/c/n/u/b are available in p/c/n/u/b meaning
19662 section.
19663
19664 Available values are:
19665
19666 pc 2-way matching (p/c)
19667
19668 pc_n
19669 2-way matching, and trying 3rd match if still combed (p/c + n)
19670
19671 pc_u
19672 2-way matching, and trying 3rd match (same order) if still
19673 combed (p/c + u)
19674
19675 pc_n_ub
19676 2-way matching, trying 3rd match if still combed, and trying
19677 4th/5th matches if still combed (p/c + n + u/b)
19678
19679 pcn 3-way matching (p/c/n)
19680
19681 pcn_ub
19682 3-way matching, and trying 4th/5th matches if all 3 of the
19683 original matches are detected as combed (p/c/n + u/b)
19684
19685 The parenthesis at the end indicate the matches that would be used
19686 for that mode assuming order=tff (and field on auto or top).
19687
19688 In terms of speed pc mode is by far the fastest and pcn_ub is the
19689 slowest.
19690
19691 Default value is pc_n.
19692
19693 ppsrc
19694 Mark the main input stream as a pre-processed input, and enable the
19695 secondary input stream as the clean source to pick the fields from.
19696 See the filter introduction for more details. It is similar to the
19697 clip2 feature from VFM/TFM.
19698
19699 Default value is 0 (disabled).
19700
19701 field
19702 Set the field to match from. It is recommended to set this to the
19703 same value as order unless you experience matching failures with
19704 that setting. In certain circumstances changing the field that is
19705 used to match from can have a large impact on matching performance.
19706 Available values are:
19707
19708 auto
19709 Automatic (same value as order).
19710
19711 bottom
19712 Match from the bottom field.
19713
19714 top Match from the top field.
19715
19716 Default value is auto.
19717
19718 mchroma
19719 Set whether or not chroma is included during the match comparisons.
19720 In most cases it is recommended to leave this enabled. You should
19721 set this to 0 only if your clip has bad chroma problems such as
19722 heavy rainbowing or other artifacts. Setting this to 0 could also
19723 be used to speed things up at the cost of some accuracy.
19724
19725 Default value is 1.
19726
19727 y0
19728 y1 These define an exclusion band which excludes the lines between y0
19729 and y1 from being included in the field matching decision. An
19730 exclusion band can be used to ignore subtitles, a logo, or other
19731 things that may interfere with the matching. y0 sets the starting
19732 scan line and y1 sets the ending line; all lines in between y0 and
19733 y1 (including y0 and y1) will be ignored. Setting y0 and y1 to the
19734 same value will disable the feature. y0 and y1 defaults to 0.
19735
19736 scthresh
19737 Set the scene change detection threshold as a percentage of maximum
19738 change on the luma plane. Good values are in the "[8.0, 14.0]"
19739 range. Scene change detection is only relevant in case
19740 combmatch=sc. The range for scthresh is "[0.0, 100.0]".
19741
19742 Default value is 12.0.
19743
19744 combmatch
19745 When combatch is not none, "fieldmatch" will take into account the
19746 combed scores of matches when deciding what match to use as the
19747 final match. Available values are:
19748
19749 none
19750 No final matching based on combed scores.
19751
19752 sc Combed scores are only used when a scene change is detected.
19753
19754 full
19755 Use combed scores all the time.
19756
19757 Default is sc.
19758
19759 combdbg
19760 Force "fieldmatch" to calculate the combed metrics for certain
19761 matches and print them. This setting is known as micout in TFM/VFM
19762 vocabulary. Available values are:
19763
19764 none
19765 No forced calculation.
19766
19767 pcn Force p/c/n calculations.
19768
19769 pcnub
19770 Force p/c/n/u/b calculations.
19771
19772 Default value is none.
19773
19774 cthresh
19775 This is the area combing threshold used for combed frame detection.
19776 This essentially controls how "strong" or "visible" combing must be
19777 to be detected. Larger values mean combing must be more visible
19778 and smaller values mean combing can be less visible or strong and
19779 still be detected. Valid settings are from "-1" (every pixel will
19780 be detected as combed) to 255 (no pixel will be detected as
19781 combed). This is basically a pixel difference value. A good range
19782 is "[8, 12]".
19783
19784 Default value is 9.
19785
19786 chroma
19787 Sets whether or not chroma is considered in the combed frame
19788 decision. Only disable this if your source has chroma problems
19789 (rainbowing, etc.) that are causing problems for the combed frame
19790 detection with chroma enabled. Actually, using chroma=0 is usually
19791 more reliable, except for the case where there is chroma only
19792 combing in the source.
19793
19794 Default value is 0.
19795
19796 blockx
19797 blocky
19798 Respectively set the x-axis and y-axis size of the window used
19799 during combed frame detection. This has to do with the size of the
19800 area in which combpel pixels are required to be detected as combed
19801 for a frame to be declared combed. See the combpel parameter
19802 description for more info. Possible values are any number that is
19803 a power of 2 starting at 4 and going up to 512.
19804
19805 Default value is 16.
19806
19807 combpel
19808 The number of combed pixels inside any of the blocky by blockx size
19809 blocks on the frame for the frame to be detected as combed. While
19810 cthresh controls how "visible" the combing must be, this setting
19811 controls "how much" combing there must be in any localized area (a
19812 window defined by the blockx and blocky settings) on the frame.
19813 Minimum value is 0 and maximum is "blocky x blockx" (at which point
19814 no frames will ever be detected as combed). This setting is known
19815 as MI in TFM/VFM vocabulary.
19816
19817 Default value is 80.
19818
19819 p/c/n/u/b meaning
19820
19821 p/c/n
19822
19823 We assume the following telecined stream:
19824
19825 Top fields: 1 2 2 3 4
19826 Bottom fields: 1 2 3 4 4
19827
19828 The numbers correspond to the progressive frame the fields relate to.
19829 Here, the first two frames are progressive, the 3rd and 4th are combed,
19830 and so on.
19831
19832 When "fieldmatch" is configured to run a matching from bottom
19833 (field=bottom) this is how this input stream get transformed:
19834
19835 Input stream:
19836 T 1 2 2 3 4
19837 B 1 2 3 4 4 <-- matching reference
19838
19839 Matches: c c n n c
19840
19841 Output stream:
19842 T 1 2 3 4 4
19843 B 1 2 3 4 4
19844
19845 As a result of the field matching, we can see that some frames get
19846 duplicated. To perform a complete inverse telecine, you need to rely
19847 on a decimation filter after this operation. See for instance the
19848 decimate filter.
19849
19850 The same operation now matching from top fields (field=top) looks like
19851 this:
19852
19853 Input stream:
19854 T 1 2 2 3 4 <-- matching reference
19855 B 1 2 3 4 4
19856
19857 Matches: c c p p c
19858
19859 Output stream:
19860 T 1 2 2 3 4
19861 B 1 2 2 3 4
19862
19863 In these examples, we can see what p, c and n mean; basically, they
19864 refer to the frame and field of the opposite parity:
19865
19866 *<p matches the field of the opposite parity in the previous frame>
19867 *<c matches the field of the opposite parity in the current frame>
19868 *<n matches the field of the opposite parity in the next frame>
19869
19870 u/b
19871
19872 The u and b matching are a bit special in the sense that they match
19873 from the opposite parity flag. In the following examples, we assume
19874 that we are currently matching the 2nd frame (Top:2, bottom:2).
19875 According to the match, a 'x' is placed above and below each matched
19876 fields.
19877
19878 With bottom matching (field=bottom):
19879
19880 Match: c p n b u
19881
19882 x x x x x
19883 Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
19884 Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
19885 x x x x x
19886
19887 Output frames:
19888 2 1 2 2 2
19889 2 2 2 1 3
19890
19891 With top matching (field=top):
19892
19893 Match: c p n b u
19894
19895 x x x x x
19896 Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
19897 Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
19898 x x x x x
19899
19900 Output frames:
19901 2 2 2 1 2
19902 2 1 3 2 2
19903
19904 Examples
19905
19906 Simple IVTC of a top field first telecined stream:
19907
19908 fieldmatch=order=tff:combmatch=none, decimate
19909
19910 Advanced IVTC, with fallback on yadif for still combed frames:
19911
19912 fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
19913
19914 fieldorder
19915 Transform the field order of the input video.
19916
19917 It accepts the following parameters:
19918
19919 order
19920 The output field order. Valid values are tff for top field first or
19921 bff for bottom field first.
19922
19923 The default value is tff.
19924
19925 The transformation is done by shifting the picture content up or down
19926 by one line, and filling the remaining line with appropriate picture
19927 content. This method is consistent with most broadcast field order
19928 converters.
19929
19930 If the input video is not flagged as being interlaced, or it is already
19931 flagged as being of the required output field order, then this filter
19932 does not alter the incoming video.
19933
19934 It is very useful when converting to or from PAL DV material, which is
19935 bottom field first.
19936
19937 For example:
19938
19939 ffmpeg -i in.vob -vf "fieldorder=bff" out.dv
19940
19941 fifo, afifo
19942 Buffer input images and send them when they are requested.
19943
19944 It is mainly useful when auto-inserted by the libavfilter framework.
19945
19946 It does not take parameters.
19947
19948 fillborders
19949 Fill borders of the input video, without changing video stream
19950 dimensions. Sometimes video can have garbage at the four edges and you
19951 may not want to crop video input to keep size multiple of some number.
19952
19953 This filter accepts the following options:
19954
19955 left
19956 Number of pixels to fill from left border.
19957
19958 right
19959 Number of pixels to fill from right border.
19960
19961 top Number of pixels to fill from top border.
19962
19963 bottom
19964 Number of pixels to fill from bottom border.
19965
19966 mode
19967 Set fill mode.
19968
19969 It accepts the following values:
19970
19971 smear
19972 fill pixels using outermost pixels
19973
19974 mirror
19975 fill pixels using mirroring (half sample symmetric)
19976
19977 fixed
19978 fill pixels with constant value
19979
19980 reflect
19981 fill pixels using reflecting (whole sample symmetric)
19982
19983 wrap
19984 fill pixels using wrapping
19985
19986 fade
19987 fade pixels to constant value
19988
19989 margins
19990 fill pixels at top and bottom with weighted averages pixels
19991 near borders
19992
19993 Default is smear.
19994
19995 color
19996 Set color for pixels in fixed or fade mode. Default is black.
19997
19998 Commands
19999
20000 This filter supports same commands as options. The command accepts the
20001 same syntax of the corresponding option.
20002
20003 If the specified expression is not valid, it is kept at its current
20004 value.
20005
20006 find_rect
20007 Find a rectangular object
20008
20009 It accepts the following options:
20010
20011 object
20012 Filepath of the object image, needs to be in gray8.
20013
20014 threshold
20015 Detection threshold, default is 0.5.
20016
20017 mipmaps
20018 Number of mipmaps, default is 3.
20019
20020 xmin, ymin, xmax, ymax
20021 Specifies the rectangle in which to search.
20022
20023 discard
20024 Discard frames where object is not detected. Default is disabled.
20025
20026 Examples
20027
20028 • Cover a rectangular object by the supplied image of a given video
20029 using ffmpeg:
20030
20031 ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
20032
20033 floodfill
20034 Flood area with values of same pixel components with another values.
20035
20036 It accepts the following options:
20037
20038 x Set pixel x coordinate.
20039
20040 y Set pixel y coordinate.
20041
20042 s0 Set source #0 component value.
20043
20044 s1 Set source #1 component value.
20045
20046 s2 Set source #2 component value.
20047
20048 s3 Set source #3 component value.
20049
20050 d0 Set destination #0 component value.
20051
20052 d1 Set destination #1 component value.
20053
20054 d2 Set destination #2 component value.
20055
20056 d3 Set destination #3 component value.
20057
20058 format
20059 Convert the input video to one of the specified pixel formats.
20060 Libavfilter will try to pick one that is suitable as input to the next
20061 filter.
20062
20063 It accepts the following parameters:
20064
20065 pix_fmts
20066 A '|'-separated list of pixel format names, such as
20067 "pix_fmts=yuv420p|monow|rgb24".
20068
20069 Examples
20070
20071 • Convert the input video to the yuv420p format
20072
20073 format=pix_fmts=yuv420p
20074
20075 Convert the input video to any of the formats in the list
20076
20077 format=pix_fmts=yuv420p|yuv444p|yuv410p
20078
20079 fps
20080 Convert the video to specified constant frame rate by duplicating or
20081 dropping frames as necessary.
20082
20083 It accepts the following parameters:
20084
20085 fps The desired output frame rate. It accepts expressions containing
20086 the following constants:
20087
20088 source_fps
20089 The input's frame rate
20090
20091 ntsc
20092 NTSC frame rate of "30000/1001"
20093
20094 pal PAL frame rate of 25.0
20095
20096 film
20097 Film frame rate of 24.0
20098
20099 ntsc_film
20100 NTSC-film frame rate of "24000/1001"
20101
20102 The default is 25.
20103
20104 start_time
20105 Assume the first PTS should be the given value, in seconds. This
20106 allows for padding/trimming at the start of stream. By default, no
20107 assumption is made about the first frame's expected PTS, so no
20108 padding or trimming is done. For example, this could be set to 0
20109 to pad the beginning with duplicates of the first frame if a video
20110 stream starts after the audio stream or to trim any frames with a
20111 negative PTS.
20112
20113 round
20114 Timestamp (PTS) rounding method.
20115
20116 Possible values are:
20117
20118 zero
20119 round towards 0
20120
20121 inf round away from 0
20122
20123 down
20124 round towards -infinity
20125
20126 up round towards +infinity
20127
20128 near
20129 round to nearest
20130
20131 The default is "near".
20132
20133 eof_action
20134 Action performed when reading the last frame.
20135
20136 Possible values are:
20137
20138 round
20139 Use same timestamp rounding method as used for other frames.
20140
20141 pass
20142 Pass through last frame if input duration has not been reached
20143 yet.
20144
20145 The default is "round".
20146
20147 Alternatively, the options can be specified as a flat string:
20148 fps[:start_time[:round]].
20149
20150 See also the setpts filter.
20151
20152 Examples
20153
20154 • A typical usage in order to set the fps to 25:
20155
20156 fps=fps=25
20157
20158 • Sets the fps to 24, using abbreviation and rounding method to round
20159 to nearest:
20160
20161 fps=fps=film:round=near
20162
20163 framepack
20164 Pack two different video streams into a stereoscopic video, setting
20165 proper metadata on supported codecs. The two views should have the same
20166 size and framerate and processing will stop when the shorter video
20167 ends. Please note that you may conveniently adjust view properties with
20168 the scale and fps filters.
20169
20170 It accepts the following parameters:
20171
20172 format
20173 The desired packing format. Supported values are:
20174
20175 sbs The views are next to each other (default).
20176
20177 tab The views are on top of each other.
20178
20179 lines
20180 The views are packed by line.
20181
20182 columns
20183 The views are packed by column.
20184
20185 frameseq
20186 The views are temporally interleaved.
20187
20188 Some examples:
20189
20190 # Convert left and right views into a frame-sequential video
20191 ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
20192
20193 # Convert views into a side-by-side video with the same output resolution as the input
20194 ffmpeg -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT
20195
20196 framerate
20197 Change the frame rate by interpolating new video output frames from the
20198 source frames.
20199
20200 This filter is not designed to function correctly with interlaced
20201 media. If you wish to change the frame rate of interlaced media then
20202 you are required to deinterlace before this filter and re-interlace
20203 after this filter.
20204
20205 A description of the accepted options follows.
20206
20207 fps Specify the output frames per second. This option can also be
20208 specified as a value alone. The default is 50.
20209
20210 interp_start
20211 Specify the start of a range where the output frame will be created
20212 as a linear interpolation of two frames. The range is [0-255], the
20213 default is 15.
20214
20215 interp_end
20216 Specify the end of a range where the output frame will be created
20217 as a linear interpolation of two frames. The range is [0-255], the
20218 default is 240.
20219
20220 scene
20221 Specify the level at which a scene change is detected as a value
20222 between 0 and 100 to indicate a new scene; a low value reflects a
20223 low probability for the current frame to introduce a new scene,
20224 while a higher value means the current frame is more likely to be
20225 one. The default is 8.2.
20226
20227 flags
20228 Specify flags influencing the filter process.
20229
20230 Available value for flags is:
20231
20232 scene_change_detect, scd
20233 Enable scene change detection using the value of the option
20234 scene. This flag is enabled by default.
20235
20236 framestep
20237 Select one frame every N-th frame.
20238
20239 This filter accepts the following option:
20240
20241 step
20242 Select frame after every "step" frames. Allowed values are
20243 positive integers higher than 0. Default value is 1.
20244
20245 freezedetect
20246 Detect frozen video.
20247
20248 This filter logs a message and sets frame metadata when it detects that
20249 the input video has no significant change in content during a specified
20250 duration. Video freeze detection calculates the mean average absolute
20251 difference of all the components of video frames and compares it to a
20252 noise floor.
20253
20254 The printed times and duration are expressed in seconds. The
20255 "lavfi.freezedetect.freeze_start" metadata key is set on the first
20256 frame whose timestamp equals or exceeds the detection duration and it
20257 contains the timestamp of the first frame of the freeze. The
20258 "lavfi.freezedetect.freeze_duration" and
20259 "lavfi.freezedetect.freeze_end" metadata keys are set on the first
20260 frame after the freeze.
20261
20262 The filter accepts the following options:
20263
20264 noise, n
20265 Set noise tolerance. Can be specified in dB (in case "dB" is
20266 appended to the specified value) or as a difference ratio between 0
20267 and 1. Default is -60dB, or 0.001.
20268
20269 duration, d
20270 Set freeze duration until notification (default is 2 seconds).
20271
20272 freezeframes
20273 Freeze video frames.
20274
20275 This filter freezes video frames using frame from 2nd input.
20276
20277 The filter accepts the following options:
20278
20279 first
20280 Set number of first frame from which to start freeze.
20281
20282 last
20283 Set number of last frame from which to end freeze.
20284
20285 replace
20286 Set number of frame from 2nd input which will be used instead of
20287 replaced frames.
20288
20289 frei0r
20290 Apply a frei0r effect to the input video.
20291
20292 To enable the compilation of this filter, you need to install the
20293 frei0r header and configure FFmpeg with "--enable-frei0r".
20294
20295 It accepts the following parameters:
20296
20297 filter_name
20298 The name of the frei0r effect to load. If the environment variable
20299 FREI0R_PATH is defined, the frei0r effect is searched for in each
20300 of the directories specified by the colon-separated list in
20301 FREI0R_PATH. Otherwise, the standard frei0r paths are searched, in
20302 this order: HOME/.frei0r-1/lib/, /usr/local/lib/frei0r-1/,
20303 /usr/lib/frei0r-1/.
20304
20305 filter_params
20306 A '|'-separated list of parameters to pass to the frei0r effect.
20307
20308 A frei0r effect parameter can be a boolean (its value is either "y" or
20309 "n"), a double, a color (specified as R/G/B, where R, G, and B are
20310 floating point numbers between 0.0 and 1.0, inclusive) or a color
20311 description as specified in the "Color" section in the ffmpeg-utils
20312 manual, a position (specified as X/Y, where X and Y are floating point
20313 numbers) and/or a string.
20314
20315 The number and types of parameters depend on the loaded effect. If an
20316 effect parameter is not specified, the default value is set.
20317
20318 Examples
20319
20320 • Apply the distort0r effect, setting the first two double
20321 parameters:
20322
20323 frei0r=filter_name=distort0r:filter_params=0.5|0.01
20324
20325 • Apply the colordistance effect, taking a color as the first
20326 parameter:
20327
20328 frei0r=colordistance:0.2/0.3/0.4
20329 frei0r=colordistance:violet
20330 frei0r=colordistance:0x112233
20331
20332 • Apply the perspective effect, specifying the top left and top right
20333 image positions:
20334
20335 frei0r=perspective:0.2/0.2|0.8/0.2
20336
20337 For more information, see <http://frei0r.dyne.org>
20338
20339 Commands
20340
20341 This filter supports the filter_params option as commands.
20342
20343 fspp
20344 Apply fast and simple postprocessing. It is a faster version of spp.
20345
20346 It splits (I)DCT into horizontal/vertical passes. Unlike the simple
20347 post- processing filter, one of them is performed once per block, not
20348 per pixel. This allows for much higher speed.
20349
20350 The filter accepts the following options:
20351
20352 quality
20353 Set quality. This option defines the number of levels for
20354 averaging. It accepts an integer in the range 4-5. Default value is
20355 4.
20356
20357 qp Force a constant quantization parameter. It accepts an integer in
20358 range 0-63. If not set, the filter will use the QP from the video
20359 stream (if available).
20360
20361 strength
20362 Set filter strength. It accepts an integer in range -15 to 32.
20363 Lower values mean more details but also more artifacts, while
20364 higher values make the image smoother but also blurrier. Default
20365 value is 0 X PSNR optimal.
20366
20367 use_bframe_qp
20368 Enable the use of the QP from the B-Frames if set to 1. Using this
20369 option may cause flicker since the B-Frames have often larger QP.
20370 Default is 0 (not enabled).
20371
20372 gblur
20373 Apply Gaussian blur filter.
20374
20375 The filter accepts the following options:
20376
20377 sigma
20378 Set horizontal sigma, standard deviation of Gaussian blur. Default
20379 is 0.5.
20380
20381 steps
20382 Set number of steps for Gaussian approximation. Default is 1.
20383
20384 planes
20385 Set which planes to filter. By default all planes are filtered.
20386
20387 sigmaV
20388 Set vertical sigma, if negative it will be same as "sigma".
20389 Default is "-1".
20390
20391 Commands
20392
20393 This filter supports same commands as options. The command accepts the
20394 same syntax of the corresponding option.
20395
20396 If the specified expression is not valid, it is kept at its current
20397 value.
20398
20399 geq
20400 Apply generic equation to each pixel.
20401
20402 The filter accepts the following options:
20403
20404 lum_expr, lum
20405 Set the luminance expression.
20406
20407 cb_expr, cb
20408 Set the chrominance blue expression.
20409
20410 cr_expr, cr
20411 Set the chrominance red expression.
20412
20413 alpha_expr, a
20414 Set the alpha expression.
20415
20416 red_expr, r
20417 Set the red expression.
20418
20419 green_expr, g
20420 Set the green expression.
20421
20422 blue_expr, b
20423 Set the blue expression.
20424
20425 The colorspace is selected according to the specified options. If one
20426 of the lum_expr, cb_expr, or cr_expr options is specified, the filter
20427 will automatically select a YCbCr colorspace. If one of the red_expr,
20428 green_expr, or blue_expr options is specified, it will select an RGB
20429 colorspace.
20430
20431 If one of the chrominance expression is not defined, it falls back on
20432 the other one. If no alpha expression is specified it will evaluate to
20433 opaque value. If none of chrominance expressions are specified, they
20434 will evaluate to the luminance expression.
20435
20436 The expressions can use the following variables and functions:
20437
20438 N The sequential number of the filtered frame, starting from 0.
20439
20440 X
20441 Y The coordinates of the current sample.
20442
20443 W
20444 H The width and height of the image.
20445
20446 SW
20447 SH Width and height scale depending on the currently filtered plane.
20448 It is the ratio between the corresponding luma plane number of
20449 pixels and the current plane ones. E.g. for YUV4:2:0 the values are
20450 "1,1" for the luma plane, and "0.5,0.5" for chroma planes.
20451
20452 T Time of the current frame, expressed in seconds.
20453
20454 p(x, y)
20455 Return the value of the pixel at location (x,y) of the current
20456 plane.
20457
20458 lum(x, y)
20459 Return the value of the pixel at location (x,y) of the luminance
20460 plane.
20461
20462 cb(x, y)
20463 Return the value of the pixel at location (x,y) of the blue-
20464 difference chroma plane. Return 0 if there is no such plane.
20465
20466 cr(x, y)
20467 Return the value of the pixel at location (x,y) of the red-
20468 difference chroma plane. Return 0 if there is no such plane.
20469
20470 r(x, y)
20471 g(x, y)
20472 b(x, y)
20473 Return the value of the pixel at location (x,y) of the
20474 red/green/blue component. Return 0 if there is no such component.
20475
20476 alpha(x, y)
20477 Return the value of the pixel at location (x,y) of the alpha plane.
20478 Return 0 if there is no such plane.
20479
20480 psum(x,y), lumsum(x, y), cbsum(x,y), crsum(x,y), rsum(x,y), gsum(x,y),
20481 bsum(x,y), alphasum(x,y)
20482 Sum of sample values in the rectangle from (0,0) to (x,y), this
20483 allows obtaining sums of samples within a rectangle. See the
20484 functions without the sum postfix.
20485
20486 interpolation
20487 Set one of interpolation methods:
20488
20489 nearest, n
20490 bilinear, b
20491
20492 Default is bilinear.
20493
20494 For functions, if x and y are outside the area, the value will be
20495 automatically clipped to the closer edge.
20496
20497 Please note that this filter can use multiple threads in which case
20498 each slice will have its own expression state. If you want to use only
20499 a single expression state because your expressions depend on previous
20500 state then you should limit the number of filter threads to 1.
20501
20502 Examples
20503
20504 • Flip the image horizontally:
20505
20506 geq=p(W-X\,Y)
20507
20508 • Generate a bidimensional sine wave, with angle "PI/3" and a
20509 wavelength of 100 pixels:
20510
20511 geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
20512
20513 • Generate a fancy enigmatic moving light:
20514
20515 nullsrc=s=256x256,geq=random(1)/hypot(X-cos(N*0.07)*W/2-W/2\,Y-sin(N*0.09)*H/2-H/2)^2*1000000*sin(N*0.02):128:128
20516
20517 • Generate a quick emboss effect:
20518
20519 format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
20520
20521 • Modify RGB components depending on pixel position:
20522
20523 geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
20524
20525 • Create a radial gradient that is the same size as the input (also
20526 see the vignette filter):
20527
20528 geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
20529
20530 gradfun
20531 Fix the banding artifacts that are sometimes introduced into nearly
20532 flat regions by truncation to 8-bit color depth. Interpolate the
20533 gradients that should go where the bands are, and dither them.
20534
20535 It is designed for playback only. Do not use it prior to lossy
20536 compression, because compression tends to lose the dither and bring
20537 back the bands.
20538
20539 It accepts the following parameters:
20540
20541 strength
20542 The maximum amount by which the filter will change any one pixel.
20543 This is also the threshold for detecting nearly flat regions.
20544 Acceptable values range from .51 to 64; the default value is 1.2.
20545 Out-of-range values will be clipped to the valid range.
20546
20547 radius
20548 The neighborhood to fit the gradient to. A larger radius makes for
20549 smoother gradients, but also prevents the filter from modifying the
20550 pixels near detailed regions. Acceptable values are 8-32; the
20551 default value is 16. Out-of-range values will be clipped to the
20552 valid range.
20553
20554 Alternatively, the options can be specified as a flat string:
20555 strength[:radius]
20556
20557 Examples
20558
20559 • Apply the filter with a 3.5 strength and radius of 8:
20560
20561 gradfun=3.5:8
20562
20563 • Specify radius, omitting the strength (which will fall-back to the
20564 default value):
20565
20566 gradfun=radius=8
20567
20568 graphmonitor
20569 Show various filtergraph stats.
20570
20571 With this filter one can debug complete filtergraph. Especially issues
20572 with links filling with queued frames.
20573
20574 The filter accepts the following options:
20575
20576 size, s
20577 Set video output size. Default is hd720.
20578
20579 opacity, o
20580 Set video opacity. Default is 0.9. Allowed range is from 0 to 1.
20581
20582 mode, m
20583 Set output mode, can be fulll or compact. In compact mode only
20584 filters with some queued frames have displayed stats.
20585
20586 flags, f
20587 Set flags which enable which stats are shown in video.
20588
20589 Available values for flags are:
20590
20591 queue
20592 Display number of queued frames in each link.
20593
20594 frame_count_in
20595 Display number of frames taken from filter.
20596
20597 frame_count_out
20598 Display number of frames given out from filter.
20599
20600 pts Display current filtered frame pts.
20601
20602 time
20603 Display current filtered frame time.
20604
20605 timebase
20606 Display time base for filter link.
20607
20608 format
20609 Display used format for filter link.
20610
20611 size
20612 Display video size or number of audio channels in case of audio
20613 used by filter link.
20614
20615 rate
20616 Display video frame rate or sample rate in case of audio used
20617 by filter link.
20618
20619 eof Display link output status.
20620
20621 sample_count_in
20622 Display number of samples taken from filter.
20623
20624 sample_count_out
20625 Display number of samples given out from filter.
20626
20627 rate, r
20628 Set upper limit for video rate of output stream, Default value is
20629 25. This guarantee that output video frame rate will not be higher
20630 than this value.
20631
20632 grayworld
20633 A color constancy filter that applies color correction based on the
20634 grayworld assumption
20635
20636 See:
20637 <https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging>
20638
20639 The algorithm uses linear light, so input data should be linearized
20640 beforehand (and possibly correctly tagged).
20641
20642 ffmpeg -i INPUT -vf zscale=transfer=linear,grayworld,zscale=transfer=bt709,format=yuv420p OUTPUT
20643
20644 greyedge
20645 A color constancy variation filter which estimates scene illumination
20646 via grey edge algorithm and corrects the scene colors accordingly.
20647
20648 See: <https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf>
20649
20650 The filter accepts the following options:
20651
20652 difford
20653 The order of differentiation to be applied on the scene. Must be
20654 chosen in the range [0,2] and default value is 1.
20655
20656 minknorm
20657 The Minkowski parameter to be used for calculating the Minkowski
20658 distance. Must be chosen in the range [0,20] and default value is
20659 1. Set to 0 for getting max value instead of calculating Minkowski
20660 distance.
20661
20662 sigma
20663 The standard deviation of Gaussian blur to be applied on the scene.
20664 Must be chosen in the range [0,1024.0] and default value = 1.
20665 floor( sigma * break_off_sigma(3) ) can't be equal to 0 if difford
20666 is greater than 0.
20667
20668 Examples
20669
20670 • Grey Edge:
20671
20672 greyedge=difford=1:minknorm=5:sigma=2
20673
20674 • Max Edge:
20675
20676 greyedge=difford=1:minknorm=0:sigma=2
20677
20678 guided
20679 Apply guided filter for edge-preserving smoothing, dehazing and so on.
20680
20681 The filter accepts the following options:
20682
20683 radius
20684 Set the box radius in pixels. Allowed range is 1 to 20. Default is
20685 3.
20686
20687 eps Set regularization parameter (with square). Allowed range is 0 to
20688 1. Default is 0.01.
20689
20690 mode
20691 Set filter mode. Can be "basic" or "fast". Default is "basic".
20692
20693 sub Set subsampling ratio for "fast" mode. Range is 2 to 64. Default
20694 is 4. No subsampling occurs in "basic" mode.
20695
20696 guidance
20697 Set guidance mode. Can be "off" or "on". Default is "off". If
20698 "off", single input is required. If "on", two inputs of the same
20699 resolution and pixel format are required. The second input serves
20700 as the guidance.
20701
20702 planes
20703 Set planes to filter. Default is first only.
20704
20705 Commands
20706
20707 This filter supports the all above options as commands.
20708
20709 Examples
20710
20711 • Edge-preserving smoothing with guided filter:
20712
20713 ffmpeg -i in.png -vf guided out.png
20714
20715 • Dehazing, structure-transferring filtering, detail enhancement with
20716 guided filter. For the generation of guidance image, refer to
20717 paper "Guided Image Filtering". See:
20718 <http://kaiminghe.com/publications/pami12guidedfilter.pdf>.
20719
20720 ffmpeg -i in.png -i guidance.png -filter_complex guided=guidance=on out.png
20721
20722 haldclut
20723 Apply a Hald CLUT to a video stream.
20724
20725 First input is the video stream to process, and second one is the Hald
20726 CLUT. The Hald CLUT input can be a simple picture or a complete video
20727 stream.
20728
20729 The filter accepts the following options:
20730
20731 shortest
20732 Force termination when the shortest input terminates. Default is 0.
20733
20734 repeatlast
20735 Continue applying the last CLUT after the end of the stream. A
20736 value of 0 disable the filter after the last frame of the CLUT is
20737 reached. Default is 1.
20738
20739 "haldclut" also has the same interpolation options as lut3d (both
20740 filters share the same internals).
20741
20742 This filter also supports the framesync options.
20743
20744 More information about the Hald CLUT can be found on Eskil Steenberg's
20745 website (Hald CLUT author) at
20746 <http://www.quelsolaar.com/technology/clut.html>.
20747
20748 Commands
20749
20750 This filter supports the "interp" option as commands.
20751
20752 Workflow examples
20753
20754 Hald CLUT video stream
20755
20756 Generate an identity Hald CLUT stream altered with various effects:
20757
20758 ffmpeg -f lavfi -i B<haldclutsrc>=8 -vf "hue=H=2*PI*t:s=sin(2*PI*t)+1, curves=cross_process" -t 10 -c:v ffv1 clut.nut
20759
20760 Note: make sure you use a lossless codec.
20761
20762 Then use it with "haldclut" to apply it on some random stream:
20763
20764 ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
20765
20766 The Hald CLUT will be applied to the 10 first seconds (duration of
20767 clut.nut), then the latest picture of that CLUT stream will be applied
20768 to the remaining frames of the "mandelbrot" stream.
20769
20770 Hald CLUT with preview
20771
20772 A Hald CLUT is supposed to be a squared image of "Level*Level*Level" by
20773 "Level*Level*Level" pixels. For a given Hald CLUT, FFmpeg will select
20774 the biggest possible square starting at the top left of the picture.
20775 The remaining padding pixels (bottom or right) will be ignored. This
20776 area can be used to add a preview of the Hald CLUT.
20777
20778 Typically, the following generated Hald CLUT will be supported by the
20779 "haldclut" filter:
20780
20781 ffmpeg -f lavfi -i B<haldclutsrc>=8 -vf "
20782 pad=iw+320 [padded_clut];
20783 smptebars=s=320x256, split [a][b];
20784 [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
20785 [main][b] overlay=W-320" -frames:v 1 clut.png
20786
20787 It contains the original and a preview of the effect of the CLUT: SMPTE
20788 color bars are displayed on the right-top, and below the same color
20789 bars processed by the color changes.
20790
20791 Then, the effect of this Hald CLUT can be visualized with:
20792
20793 ffplay input.mkv -vf "movie=clut.png, [in] haldclut"
20794
20795 hflip
20796 Flip the input video horizontally.
20797
20798 For example, to horizontally flip the input video with ffmpeg:
20799
20800 ffmpeg -i in.avi -vf "hflip" out.avi
20801
20802 histeq
20803 This filter applies a global color histogram equalization on a per-
20804 frame basis.
20805
20806 It can be used to correct video that has a compressed range of pixel
20807 intensities. The filter redistributes the pixel intensities to
20808 equalize their distribution across the intensity range. It may be
20809 viewed as an "automatically adjusting contrast filter". This filter is
20810 useful only for correcting degraded or poorly captured source video.
20811
20812 The filter accepts the following options:
20813
20814 strength
20815 Determine the amount of equalization to be applied. As the
20816 strength is reduced, the distribution of pixel intensities more-
20817 and-more approaches that of the input frame. The value must be a
20818 float number in the range [0,1] and defaults to 0.200.
20819
20820 intensity
20821 Set the maximum intensity that can generated and scale the output
20822 values appropriately. The strength should be set as desired and
20823 then the intensity can be limited if needed to avoid washing-out.
20824 The value must be a float number in the range [0,1] and defaults to
20825 0.210.
20826
20827 antibanding
20828 Set the antibanding level. If enabled the filter will randomly vary
20829 the luminance of output pixels by a small amount to avoid banding
20830 of the histogram. Possible values are "none", "weak" or "strong".
20831 It defaults to "none".
20832
20833 histogram
20834 Compute and draw a color distribution histogram for the input video.
20835
20836 The computed histogram is a representation of the color component
20837 distribution in an image.
20838
20839 Standard histogram displays the color components distribution in an
20840 image. Displays color graph for each color component. Shows
20841 distribution of the Y, U, V, A or R, G, B components, depending on
20842 input format, in the current frame. Below each graph a color component
20843 scale meter is shown.
20844
20845 The filter accepts the following options:
20846
20847 level_height
20848 Set height of level. Default value is 200. Allowed range is [50,
20849 2048].
20850
20851 scale_height
20852 Set height of color scale. Default value is 12. Allowed range is
20853 [0, 40].
20854
20855 display_mode
20856 Set display mode. It accepts the following values:
20857
20858 stack
20859 Per color component graphs are placed below each other.
20860
20861 parade
20862 Per color component graphs are placed side by side.
20863
20864 overlay
20865 Presents information identical to that in the "parade", except
20866 that the graphs representing color components are superimposed
20867 directly over one another.
20868
20869 Default is "stack".
20870
20871 levels_mode
20872 Set mode. Can be either "linear", or "logarithmic". Default is
20873 "linear".
20874
20875 components
20876 Set what color components to display. Default is 7.
20877
20878 fgopacity
20879 Set foreground opacity. Default is 0.7.
20880
20881 bgopacity
20882 Set background opacity. Default is 0.5.
20883
20884 colors_mode
20885 Set colors mode. It accepts the following values:
20886
20887 whiteonblack
20888 blackonwhite
20889 whiteongray
20890 blackongray
20891 coloronblack
20892 coloronwhite
20893 colorongray
20894 blackoncolor
20895 whiteoncolor
20896 grayoncolor
20897
20898 Default is "whiteonblack".
20899
20900 Examples
20901
20902 • Calculate and draw histogram:
20903
20904 ffplay -i input -vf histogram
20905
20906 hqdn3d
20907 This is a high precision/quality 3d denoise filter. It aims to reduce
20908 image noise, producing smooth images and making still images really
20909 still. It should enhance compressibility.
20910
20911 It accepts the following optional parameters:
20912
20913 luma_spatial
20914 A non-negative floating point number which specifies spatial luma
20915 strength. It defaults to 4.0.
20916
20917 chroma_spatial
20918 A non-negative floating point number which specifies spatial chroma
20919 strength. It defaults to 3.0*luma_spatial/4.0.
20920
20921 luma_tmp
20922 A floating point number which specifies luma temporal strength. It
20923 defaults to 6.0*luma_spatial/4.0.
20924
20925 chroma_tmp
20926 A floating point number which specifies chroma temporal strength.
20927 It defaults to luma_tmp*chroma_spatial/luma_spatial.
20928
20929 Commands
20930
20931 This filter supports same commands as options. The command accepts the
20932 same syntax of the corresponding option.
20933
20934 If the specified expression is not valid, it is kept at its current
20935 value.
20936
20937 hwdownload
20938 Download hardware frames to system memory.
20939
20940 The input must be in hardware frames, and the output a non-hardware
20941 format. Not all formats will be supported on the output - it may be
20942 necessary to insert an additional format filter immediately following
20943 in the graph to get the output in a supported format.
20944
20945 hwmap
20946 Map hardware frames to system memory or to another device.
20947
20948 This filter has several different modes of operation; which one is used
20949 depends on the input and output formats:
20950
20951 • Hardware frame input, normal frame output
20952
20953 Map the input frames to system memory and pass them to the output.
20954 If the original hardware frame is later required (for example,
20955 after overlaying something else on part of it), the hwmap filter
20956 can be used again in the next mode to retrieve it.
20957
20958 • Normal frame input, hardware frame output
20959
20960 If the input is actually a software-mapped hardware frame, then
20961 unmap it - that is, return the original hardware frame.
20962
20963 Otherwise, a device must be provided. Create new hardware surfaces
20964 on that device for the output, then map them back to the software
20965 format at the input and give those frames to the preceding filter.
20966 This will then act like the hwupload filter, but may be able to
20967 avoid an additional copy when the input is already in a compatible
20968 format.
20969
20970 • Hardware frame input and output
20971
20972 A device must be supplied for the output, either directly or with
20973 the derive_device option. The input and output devices must be of
20974 different types and compatible - the exact meaning of this is
20975 system-dependent, but typically it means that they must refer to
20976 the same underlying hardware context (for example, refer to the
20977 same graphics card).
20978
20979 If the input frames were originally created on the output device,
20980 then unmap to retrieve the original frames.
20981
20982 Otherwise, map the frames to the output device - create new
20983 hardware frames on the output corresponding to the frames on the
20984 input.
20985
20986 The following additional parameters are accepted:
20987
20988 mode
20989 Set the frame mapping mode. Some combination of:
20990
20991 read
20992 The mapped frame should be readable.
20993
20994 write
20995 The mapped frame should be writeable.
20996
20997 overwrite
20998 The mapping will always overwrite the entire frame.
20999
21000 This may improve performance in some cases, as the original
21001 contents of the frame need not be loaded.
21002
21003 direct
21004 The mapping must not involve any copying.
21005
21006 Indirect mappings to copies of frames are created in some cases
21007 where either direct mapping is not possible or it would have
21008 unexpected properties. Setting this flag ensures that the
21009 mapping is direct and will fail if that is not possible.
21010
21011 Defaults to read+write if not specified.
21012
21013 derive_device type
21014 Rather than using the device supplied at initialisation, instead
21015 derive a new device of type type from the device the input frames
21016 exist on.
21017
21018 reverse
21019 In a hardware to hardware mapping, map in reverse - create frames
21020 in the sink and map them back to the source. This may be necessary
21021 in some cases where a mapping in one direction is required but only
21022 the opposite direction is supported by the devices being used.
21023
21024 This option is dangerous - it may break the preceding filter in
21025 undefined ways if there are any additional constraints on that
21026 filter's output. Do not use it without fully understanding the
21027 implications of its use.
21028
21029 hwupload
21030 Upload system memory frames to hardware surfaces.
21031
21032 The device to upload to must be supplied when the filter is
21033 initialised. If using ffmpeg, select the appropriate device with the
21034 -filter_hw_device option or with the derive_device option. The input
21035 and output devices must be of different types and compatible - the
21036 exact meaning of this is system-dependent, but typically it means that
21037 they must refer to the same underlying hardware context (for example,
21038 refer to the same graphics card).
21039
21040 The following additional parameters are accepted:
21041
21042 derive_device type
21043 Rather than using the device supplied at initialisation, instead
21044 derive a new device of type type from the device the input frames
21045 exist on.
21046
21047 hwupload_cuda
21048 Upload system memory frames to a CUDA device.
21049
21050 It accepts the following optional parameters:
21051
21052 device
21053 The number of the CUDA device to use
21054
21055 hqx
21056 Apply a high-quality magnification filter designed for pixel art. This
21057 filter was originally created by Maxim Stepin.
21058
21059 It accepts the following option:
21060
21061 n Set the scaling dimension: 2 for "hq2x", 3 for "hq3x" and 4 for
21062 "hq4x". Default is 3.
21063
21064 hstack
21065 Stack input videos horizontally.
21066
21067 All streams must be of same pixel format and of same height.
21068
21069 Note that this filter is faster than using overlay and pad filter to
21070 create same output.
21071
21072 The filter accepts the following option:
21073
21074 inputs
21075 Set number of input streams. Default is 2.
21076
21077 shortest
21078 If set to 1, force the output to terminate when the shortest input
21079 terminates. Default value is 0.
21080
21081 hsvhold
21082 Turns a certain HSV range into gray values.
21083
21084 This filter measures color difference between set HSV color in options
21085 and ones measured in video stream. Depending on options, output colors
21086 can be changed to be gray or not.
21087
21088 The filter accepts the following options:
21089
21090 hue Set the hue value which will be used in color difference
21091 calculation. Allowed range is from -360 to 360. Default value is
21092 0.
21093
21094 sat Set the saturation value which will be used in color difference
21095 calculation. Allowed range is from -1 to 1. Default value is 0.
21096
21097 val Set the value which will be used in color difference calculation.
21098 Allowed range is from -1 to 1. Default value is 0.
21099
21100 similarity
21101 Set similarity percentage with the key color. Allowed range is
21102 from 0 to 1. Default value is 0.01.
21103
21104 0.00001 matches only the exact key color, while 1.0 matches
21105 everything.
21106
21107 blend
21108 Blend percentage. Allowed range is from 0 to 1. Default value is
21109 0.
21110
21111 0.0 makes pixels either fully gray, or not gray at all.
21112
21113 Higher values result in more gray pixels, with a higher gray pixel
21114 the more similar the pixels color is to the key color.
21115
21116 hsvkey
21117 Turns a certain HSV range into transparency.
21118
21119 This filter measures color difference between set HSV color in options
21120 and ones measured in video stream. Depending on options, output colors
21121 can be changed to transparent by adding alpha channel.
21122
21123 The filter accepts the following options:
21124
21125 hue Set the hue value which will be used in color difference
21126 calculation. Allowed range is from -360 to 360. Default value is
21127 0.
21128
21129 sat Set the saturation value which will be used in color difference
21130 calculation. Allowed range is from -1 to 1. Default value is 0.
21131
21132 val Set the value which will be used in color difference calculation.
21133 Allowed range is from -1 to 1. Default value is 0.
21134
21135 similarity
21136 Set similarity percentage with the key color. Allowed range is
21137 from 0 to 1. Default value is 0.01.
21138
21139 0.00001 matches only the exact key color, while 1.0 matches
21140 everything.
21141
21142 blend
21143 Blend percentage. Allowed range is from 0 to 1. Default value is
21144 0.
21145
21146 0.0 makes pixels either fully transparent, or not transparent at
21147 all.
21148
21149 Higher values result in semi-transparent pixels, with a higher
21150 transparency the more similar the pixels color is to the key color.
21151
21152 hue
21153 Modify the hue and/or the saturation of the input.
21154
21155 It accepts the following parameters:
21156
21157 h Specify the hue angle as a number of degrees. It accepts an
21158 expression, and defaults to "0".
21159
21160 s Specify the saturation in the [-10,10] range. It accepts an
21161 expression and defaults to "1".
21162
21163 H Specify the hue angle as a number of radians. It accepts an
21164 expression, and defaults to "0".
21165
21166 b Specify the brightness in the [-10,10] range. It accepts an
21167 expression and defaults to "0".
21168
21169 h and H are mutually exclusive, and can't be specified at the same
21170 time.
21171
21172 The b, h, H and s option values are expressions containing the
21173 following constants:
21174
21175 n frame count of the input frame starting from 0
21176
21177 pts presentation timestamp of the input frame expressed in time base
21178 units
21179
21180 r frame rate of the input video, NAN if the input frame rate is
21181 unknown
21182
21183 t timestamp expressed in seconds, NAN if the input timestamp is
21184 unknown
21185
21186 tb time base of the input video
21187
21188 Examples
21189
21190 • Set the hue to 90 degrees and the saturation to 1.0:
21191
21192 hue=h=90:s=1
21193
21194 • Same command but expressing the hue in radians:
21195
21196 hue=H=PI/2:s=1
21197
21198 • Rotate hue and make the saturation swing between 0 and 2 over a
21199 period of 1 second:
21200
21201 hue="H=2*PI*t: s=sin(2*PI*t)+1"
21202
21203 • Apply a 3 seconds saturation fade-in effect starting at 0:
21204
21205 hue="s=min(t/3\,1)"
21206
21207 The general fade-in expression can be written as:
21208
21209 hue="s=min(0\, max((t-START)/DURATION\, 1))"
21210
21211 • Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
21212
21213 hue="s=max(0\, min(1\, (8-t)/3))"
21214
21215 The general fade-out expression can be written as:
21216
21217 hue="s=max(0\, min(1\, (START+DURATION-t)/DURATION))"
21218
21219 Commands
21220
21221 This filter supports the following commands:
21222
21223 b
21224 s
21225 h
21226 H Modify the hue and/or the saturation and/or brightness of the input
21227 video. The command accepts the same syntax of the corresponding
21228 option.
21229
21230 If the specified expression is not valid, it is kept at its current
21231 value.
21232
21233 huesaturation
21234 Apply hue-saturation-intensity adjustments to input video stream.
21235
21236 This filter operates in RGB colorspace.
21237
21238 This filter accepts the following options:
21239
21240 hue Set the hue shift in degrees to apply. Default is 0. Allowed range
21241 is from -180 to 180.
21242
21243 saturation
21244 Set the saturation shift. Default is 0. Allowed range is from -1
21245 to 1.
21246
21247 intensity
21248 Set the intensity shift. Default is 0. Allowed range is from -1 to
21249 1.
21250
21251 colors
21252 Set which primary and complementary colors are going to be
21253 adjusted. This options is set by providing one or multiple values.
21254 This can select multiple colors at once. By default all colors are
21255 selected.
21256
21257 r Adjust reds.
21258
21259 y Adjust yellows.
21260
21261 g Adjust greens.
21262
21263 c Adjust cyans.
21264
21265 b Adjust blues.
21266
21267 m Adjust magentas.
21268
21269 a Adjust all colors.
21270
21271 strength
21272 Set strength of filtering. Allowed range is from 0 to 100. Default
21273 value is 1.
21274
21275 rw, gw, bw
21276 Set weight for each RGB component. Allowed range is from 0 to 1.
21277 By default is set to 0.333, 0.334, 0.333. Those options are used
21278 in saturation and lightess processing.
21279
21280 lightness
21281 Set preserving lightness, by default is disabled. Adjusting hues
21282 can change lightness from original RGB triplet, with this option
21283 enabled lightness is kept at same value.
21284
21285 hysteresis
21286 Grow first stream into second stream by connecting components. This
21287 makes it possible to build more robust edge masks.
21288
21289 This filter accepts the following options:
21290
21291 planes
21292 Set which planes will be processed as bitmap, unprocessed planes
21293 will be copied from first stream. By default value 0xf, all planes
21294 will be processed.
21295
21296 threshold
21297 Set threshold which is used in filtering. If pixel component value
21298 is higher than this value filter algorithm for connecting
21299 components is activated. By default value is 0.
21300
21301 The "hysteresis" filter also supports the framesync options.
21302
21303 identity
21304 Obtain the identity score between two input videos.
21305
21306 This filter takes two input videos.
21307
21308 Both input videos must have the same resolution and pixel format for
21309 this filter to work correctly. Also it assumes that both inputs have
21310 the same number of frames, which are compared one by one.
21311
21312 The obtained per component, average, min and max identity score is
21313 printed through the logging system.
21314
21315 The filter stores the calculated identity scores of each frame in frame
21316 metadata.
21317
21318 In the below example the input file main.mpg being processed is
21319 compared with the reference file ref.mpg.
21320
21321 ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
21322
21323 idet
21324 Detect video interlacing type.
21325
21326 This filter tries to detect if the input frames are interlaced,
21327 progressive, top or bottom field first. It will also try to detect
21328 fields that are repeated between adjacent frames (a sign of telecine).
21329
21330 Single frame detection considers only immediately adjacent frames when
21331 classifying each frame. Multiple frame detection incorporates the
21332 classification history of previous frames.
21333
21334 The filter will log these metadata values:
21335
21336 single.current_frame
21337 Detected type of current frame using single-frame detection. One
21338 of: ``tff'' (top field first), ``bff'' (bottom field first),
21339 ``progressive'', or ``undetermined''
21340
21341 single.tff
21342 Cumulative number of frames detected as top field first using
21343 single-frame detection.
21344
21345 multiple.tff
21346 Cumulative number of frames detected as top field first using
21347 multiple-frame detection.
21348
21349 single.bff
21350 Cumulative number of frames detected as bottom field first using
21351 single-frame detection.
21352
21353 multiple.current_frame
21354 Detected type of current frame using multiple-frame detection. One
21355 of: ``tff'' (top field first), ``bff'' (bottom field first),
21356 ``progressive'', or ``undetermined''
21357
21358 multiple.bff
21359 Cumulative number of frames detected as bottom field first using
21360 multiple-frame detection.
21361
21362 single.progressive
21363 Cumulative number of frames detected as progressive using single-
21364 frame detection.
21365
21366 multiple.progressive
21367 Cumulative number of frames detected as progressive using multiple-
21368 frame detection.
21369
21370 single.undetermined
21371 Cumulative number of frames that could not be classified using
21372 single-frame detection.
21373
21374 multiple.undetermined
21375 Cumulative number of frames that could not be classified using
21376 multiple-frame detection.
21377
21378 repeated.current_frame
21379 Which field in the current frame is repeated from the last. One of
21380 ``neither'', ``top'', or ``bottom''.
21381
21382 repeated.neither
21383 Cumulative number of frames with no repeated field.
21384
21385 repeated.top
21386 Cumulative number of frames with the top field repeated from the
21387 previous frame's top field.
21388
21389 repeated.bottom
21390 Cumulative number of frames with the bottom field repeated from the
21391 previous frame's bottom field.
21392
21393 The filter accepts the following options:
21394
21395 intl_thres
21396 Set interlacing threshold.
21397
21398 prog_thres
21399 Set progressive threshold.
21400
21401 rep_thres
21402 Threshold for repeated field detection.
21403
21404 half_life
21405 Number of frames after which a given frame's contribution to the
21406 statistics is halved (i.e., it contributes only 0.5 to its
21407 classification). The default of 0 means that all frames seen are
21408 given full weight of 1.0 forever.
21409
21410 analyze_interlaced_flag
21411 When this is not 0 then idet will use the specified number of
21412 frames to determine if the interlaced flag is accurate, it will not
21413 count undetermined frames. If the flag is found to be accurate it
21414 will be used without any further computations, if it is found to be
21415 inaccurate it will be cleared without any further computations.
21416 This allows inserting the idet filter as a low computational method
21417 to clean up the interlaced flag
21418
21419 il
21420 Deinterleave or interleave fields.
21421
21422 This filter allows one to process interlaced images fields without
21423 deinterlacing them. Deinterleaving splits the input frame into 2 fields
21424 (so called half pictures). Odd lines are moved to the top half of the
21425 output image, even lines to the bottom half. You can process (filter)
21426 them independently and then re-interleave them.
21427
21428 The filter accepts the following options:
21429
21430 luma_mode, l
21431 chroma_mode, c
21432 alpha_mode, a
21433 Available values for luma_mode, chroma_mode and alpha_mode are:
21434
21435 none
21436 Do nothing.
21437
21438 deinterleave, d
21439 Deinterleave fields, placing one above the other.
21440
21441 interleave, i
21442 Interleave fields. Reverse the effect of deinterleaving.
21443
21444 Default value is "none".
21445
21446 luma_swap, ls
21447 chroma_swap, cs
21448 alpha_swap, as
21449 Swap luma/chroma/alpha fields. Exchange even & odd lines. Default
21450 value is 0.
21451
21452 Commands
21453
21454 This filter supports the all above options as commands.
21455
21456 inflate
21457 Apply inflate effect to the video.
21458
21459 This filter replaces the pixel by the local(3x3) average by taking into
21460 account only values higher than the pixel.
21461
21462 It accepts the following options:
21463
21464 threshold0
21465 threshold1
21466 threshold2
21467 threshold3
21468 Limit the maximum change for each plane, default is 65535. If 0,
21469 plane will remain unchanged.
21470
21471 Commands
21472
21473 This filter supports the all above options as commands.
21474
21475 interlace
21476 Simple interlacing filter from progressive contents. This interleaves
21477 upper (or lower) lines from odd frames with lower (or upper) lines from
21478 even frames, halving the frame rate and preserving image height.
21479
21480 Original Original New Frame
21481 Frame 'j' Frame 'j+1' (tff)
21482 ========== =========== ==================
21483 Line 0 --------------------> Frame 'j' Line 0
21484 Line 1 Line 1 ----> Frame 'j+1' Line 1
21485 Line 2 ---------------------> Frame 'j' Line 2
21486 Line 3 Line 3 ----> Frame 'j+1' Line 3
21487 ... ... ...
21488 New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
21489
21490 It accepts the following optional parameters:
21491
21492 scan
21493 This determines whether the interlaced frame is taken from the even
21494 (tff - default) or odd (bff) lines of the progressive frame.
21495
21496 lowpass
21497 Vertical lowpass filter to avoid twitter interlacing and reduce
21498 moire patterns.
21499
21500 0, off
21501 Disable vertical lowpass filter
21502
21503 1, linear
21504 Enable linear filter (default)
21505
21506 2, complex
21507 Enable complex filter. This will slightly less reduce twitter
21508 and moire but better retain detail and subjective sharpness
21509 impression.
21510
21511 kerndeint
21512 Deinterlace input video by applying Donald Graft's adaptive kernel
21513 deinterling. Work on interlaced parts of a video to produce progressive
21514 frames.
21515
21516 The description of the accepted parameters follows.
21517
21518 thresh
21519 Set the threshold which affects the filter's tolerance when
21520 determining if a pixel line must be processed. It must be an
21521 integer in the range [0,255] and defaults to 10. A value of 0 will
21522 result in applying the process on every pixels.
21523
21524 map Paint pixels exceeding the threshold value to white if set to 1.
21525 Default is 0.
21526
21527 order
21528 Set the fields order. Swap fields if set to 1, leave fields alone
21529 if 0. Default is 0.
21530
21531 sharp
21532 Enable additional sharpening if set to 1. Default is 0.
21533
21534 twoway
21535 Enable twoway sharpening if set to 1. Default is 0.
21536
21537 Examples
21538
21539 • Apply default values:
21540
21541 kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
21542
21543 • Enable additional sharpening:
21544
21545 kerndeint=sharp=1
21546
21547 • Paint processed pixels in white:
21548
21549 kerndeint=map=1
21550
21551 kirsch
21552 Apply kirsch operator to input video stream.
21553
21554 The filter accepts the following option:
21555
21556 planes
21557 Set which planes will be processed, unprocessed planes will be
21558 copied. By default value 0xf, all planes will be processed.
21559
21560 scale
21561 Set value which will be multiplied with filtered result.
21562
21563 delta
21564 Set value which will be added to filtered result.
21565
21566 Commands
21567
21568 This filter supports the all above options as commands.
21569
21570 lagfun
21571 Slowly update darker pixels.
21572
21573 This filter makes short flashes of light appear longer. This filter
21574 accepts the following options:
21575
21576 decay
21577 Set factor for decaying. Default is .95. Allowed range is from 0 to
21578 1.
21579
21580 planes
21581 Set which planes to filter. Default is all. Allowed range is from 0
21582 to 15.
21583
21584 Commands
21585
21586 This filter supports the all above options as commands.
21587
21588 lenscorrection
21589 Correct radial lens distortion
21590
21591 This filter can be used to correct for radial distortion as can result
21592 from the use of wide angle lenses, and thereby re-rectify the image. To
21593 find the right parameters one can use tools available for example as
21594 part of opencv or simply trial-and-error. To use opencv use the
21595 calibration sample (under samples/cpp) from the opencv sources and
21596 extract the k1 and k2 coefficients from the resulting matrix.
21597
21598 Note that effectively the same filter is available in the open-source
21599 tools Krita and Digikam from the KDE project.
21600
21601 In contrast to the vignette filter, which can also be used to
21602 compensate lens errors, this filter corrects the distortion of the
21603 image, whereas vignette corrects the brightness distribution, so you
21604 may want to use both filters together in certain cases, though you will
21605 have to take care of ordering, i.e. whether vignetting should be
21606 applied before or after lens correction.
21607
21608 Options
21609
21610 The filter accepts the following options:
21611
21612 cx Relative x-coordinate of the focal point of the image, and thereby
21613 the center of the distortion. This value has a range [0,1] and is
21614 expressed as fractions of the image width. Default is 0.5.
21615
21616 cy Relative y-coordinate of the focal point of the image, and thereby
21617 the center of the distortion. This value has a range [0,1] and is
21618 expressed as fractions of the image height. Default is 0.5.
21619
21620 k1 Coefficient of the quadratic correction term. This value has a
21621 range [-1,1]. 0 means no correction. Default is 0.
21622
21623 k2 Coefficient of the double quadratic correction term. This value has
21624 a range [-1,1]. 0 means no correction. Default is 0.
21625
21626 i Set interpolation type. Can be "nearest" or "bilinear". Default is
21627 "nearest".
21628
21629 fc Specify the color of the unmapped pixels. For the syntax of this
21630 option, check the "Color" section in the ffmpeg-utils manual.
21631 Default color is "black@0".
21632
21633 The formula that generates the correction is:
21634
21635 r_src = r_tgt * (1 + k1 * (r_tgt / r_0)^2 + k2 * (r_tgt / r_0)^4)
21636
21637 where r_0 is halve of the image diagonal and r_src and r_tgt are the
21638 distances from the focal point in the source and target images,
21639 respectively.
21640
21641 Commands
21642
21643 This filter supports the all above options as commands.
21644
21645 lensfun
21646 Apply lens correction via the lensfun library
21647 (<http://lensfun.sourceforge.net/>).
21648
21649 The "lensfun" filter requires the camera make, camera model, and lens
21650 model to apply the lens correction. The filter will load the lensfun
21651 database and query it to find the corresponding camera and lens entries
21652 in the database. As long as these entries can be found with the given
21653 options, the filter can perform corrections on frames. Note that
21654 incomplete strings will result in the filter choosing the best match
21655 with the given options, and the filter will output the chosen camera
21656 and lens models (logged with level "info"). You must provide the make,
21657 camera model, and lens model as they are required.
21658
21659 The filter accepts the following options:
21660
21661 make
21662 The make of the camera (for example, "Canon"). This option is
21663 required.
21664
21665 model
21666 The model of the camera (for example, "Canon EOS 100D"). This
21667 option is required.
21668
21669 lens_model
21670 The model of the lens (for example, "Canon EF-S 18-55mm f/3.5-5.6
21671 IS STM"). This option is required.
21672
21673 mode
21674 The type of correction to apply. The following values are valid
21675 options:
21676
21677 vignetting
21678 Enables fixing lens vignetting.
21679
21680 geometry
21681 Enables fixing lens geometry. This is the default.
21682
21683 subpixel
21684 Enables fixing chromatic aberrations.
21685
21686 vig_geo
21687 Enables fixing lens vignetting and lens geometry.
21688
21689 vig_subpixel
21690 Enables fixing lens vignetting and chromatic aberrations.
21691
21692 distortion
21693 Enables fixing both lens geometry and chromatic aberrations.
21694
21695 all Enables all possible corrections.
21696
21697 focal_length
21698 The focal length of the image/video (zoom; expected constant for
21699 video). For example, a 18--55mm lens has focal length range of
21700 [18--55], so a value in that range should be chosen when using that
21701 lens. Default 18.
21702
21703 aperture
21704 The aperture of the image/video (expected constant for video). Note
21705 that aperture is only used for vignetting correction. Default 3.5.
21706
21707 focus_distance
21708 The focus distance of the image/video (expected constant for
21709 video). Note that focus distance is only used for vignetting and
21710 only slightly affects the vignetting correction process. If
21711 unknown, leave it at the default value (which is 1000).
21712
21713 scale
21714 The scale factor which is applied after transformation. After
21715 correction the video is no longer necessarily rectangular. This
21716 parameter controls how much of the resulting image is visible. The
21717 value 0 means that a value will be chosen automatically such that
21718 there is little or no unmapped area in the output image. 1.0 means
21719 that no additional scaling is done. Lower values may result in more
21720 of the corrected image being visible, while higher values may avoid
21721 unmapped areas in the output.
21722
21723 target_geometry
21724 The target geometry of the output image/video. The following values
21725 are valid options:
21726
21727 rectilinear (default)
21728 fisheye
21729 panoramic
21730 equirectangular
21731 fisheye_orthographic
21732 fisheye_stereographic
21733 fisheye_equisolid
21734 fisheye_thoby
21735 reverse
21736 Apply the reverse of image correction (instead of correcting
21737 distortion, apply it).
21738
21739 interpolation
21740 The type of interpolation used when correcting distortion. The
21741 following values are valid options:
21742
21743 nearest
21744 linear (default)
21745 lanczos
21746
21747 Examples
21748
21749 • Apply lens correction with make "Canon", camera model "Canon EOS
21750 100D", and lens model "Canon EF-S 18-55mm f/3.5-5.6 IS STM" with
21751 focal length of "18" and aperture of "8.0".
21752
21753 ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Canon EF-S 18-55mm f/3.5-5.6 IS STM":focal_length=18:aperture=8 -c:v h264 -b:v 8000k output.mov
21754
21755 • Apply the same as before, but only for the first 5 seconds of
21756 video.
21757
21758 ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Canon EF-S 18-55mm f/3.5-5.6 IS STM":focal_length=18:aperture=8:enable='lte(t\,5)' -c:v h264 -b:v 8000k output.mov
21759
21760 libvmaf
21761 Obtain the VMAF (Video Multi-Method Assessment Fusion) score between
21762 two input videos.
21763
21764 The first input is the encoded video, and the second input is the
21765 reference video.
21766
21767 The obtained VMAF score is printed through the logging system.
21768
21769 It requires Netflix's vmaf library (libvmaf) as a pre-requisite. After
21770 installing the library it can be enabled using: "./configure
21771 --enable-libvmaf". If no model path is specified it uses the default
21772 model: "vmaf_v0.6.1.pkl".
21773
21774 The filter has following options:
21775
21776 model_path
21777 Set the model path which is to be used for SVM. Default value:
21778 "/usr/local/share/model/vmaf_v0.6.1.pkl"
21779
21780 log_path
21781 Set the file path to be used to store logs.
21782
21783 log_fmt
21784 Set the format of the log file (csv, json or xml).
21785
21786 enable_transform
21787 This option can enable/disable the "score_transform" applied to the
21788 final predicted VMAF score, if you have specified score_transform
21789 option in the input parameter file passed to "run_vmaf_training.py"
21790 Default value: "false"
21791
21792 phone_model
21793 Invokes the phone model which will generate VMAF scores higher than
21794 in the regular model, which is more suitable for laptop, TV, etc.
21795 viewing conditions. Default value: "false"
21796
21797 psnr
21798 Enables computing psnr along with vmaf. Default value: "false"
21799
21800 ssim
21801 Enables computing ssim along with vmaf. Default value: "false"
21802
21803 ms_ssim
21804 Enables computing ms_ssim along with vmaf. Default value: "false"
21805
21806 pool
21807 Set the pool method to be used for computing vmaf. Options are
21808 "min", "harmonic_mean" or "mean" (default).
21809
21810 n_threads
21811 Set number of threads to be used when computing vmaf. Default
21812 value: 0, which makes use of all available logical processors.
21813
21814 n_subsample
21815 Set interval for frame subsampling used when computing vmaf.
21816 Default value: 1
21817
21818 enable_conf_interval
21819 Enables confidence interval. Default value: "false"
21820
21821 This filter also supports the framesync options.
21822
21823 Examples
21824
21825 • On the below examples the input file main.mpg being processed is
21826 compared with the reference file ref.mpg.
21827
21828 ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
21829
21830 • Example with options:
21831
21832 ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf="psnr=1:log_fmt=json" -f null -
21833
21834 • Example with options and different containers:
21835
21836 ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=psnr=1:log_fmt=json" -f null -
21837
21838 limitdiff
21839 Apply limited difference filter using second and optionally third video
21840 stream.
21841
21842 The filter accepts the following options:
21843
21844 threshold
21845 Set the threshold to use when allowing certain differences between
21846 video streams. Any absolute difference value lower or exact than
21847 this threshold will pick pixel components from first video stream.
21848
21849 elasticity
21850 Set the elasticity of soft thresholding when processing video
21851 streams. This value multiplied with first one sets second
21852 threshold. Any absolute difference value greater or exact than
21853 second threshold will pick pixel components from second video
21854 stream. For values between those two threshold linear interpolation
21855 between first and second video stream will be used.
21856
21857 reference
21858 Enable the reference (third) video stream processing. By default is
21859 disabled. If set, this video stream will be used for calculating
21860 absolute difference with first video stream.
21861
21862 planes
21863 Specify which planes will be processed. Defaults to all available.
21864
21865 Commands
21866
21867 This filter supports the all above options as commands except option
21868 reference.
21869
21870 limiter
21871 Limits the pixel components values to the specified range [min, max].
21872
21873 The filter accepts the following options:
21874
21875 min Lower bound. Defaults to the lowest allowed value for the input.
21876
21877 max Upper bound. Defaults to the highest allowed value for the input.
21878
21879 planes
21880 Specify which planes will be processed. Defaults to all available.
21881
21882 Commands
21883
21884 This filter supports the all above options as commands.
21885
21886 loop
21887 Loop video frames.
21888
21889 The filter accepts the following options:
21890
21891 loop
21892 Set the number of loops. Setting this value to -1 will result in
21893 infinite loops. Default is 0.
21894
21895 size
21896 Set maximal size in number of frames. Default is 0.
21897
21898 start
21899 Set first frame of loop. Default is 0.
21900
21901 Examples
21902
21903 • Loop single first frame infinitely:
21904
21905 loop=loop=-1:size=1:start=0
21906
21907 • Loop single first frame 10 times:
21908
21909 loop=loop=10:size=1:start=0
21910
21911 • Loop 10 first frames 5 times:
21912
21913 loop=loop=5:size=10:start=0
21914
21915 lut1d
21916 Apply a 1D LUT to an input video.
21917
21918 The filter accepts the following options:
21919
21920 file
21921 Set the 1D LUT file name.
21922
21923 Currently supported formats:
21924
21925 cube
21926 Iridas
21927
21928 csp cineSpace
21929
21930 interp
21931 Select interpolation mode.
21932
21933 Available values are:
21934
21935 nearest
21936 Use values from the nearest defined point.
21937
21938 linear
21939 Interpolate values using the linear interpolation.
21940
21941 cosine
21942 Interpolate values using the cosine interpolation.
21943
21944 cubic
21945 Interpolate values using the cubic interpolation.
21946
21947 spline
21948 Interpolate values using the spline interpolation.
21949
21950 Commands
21951
21952 This filter supports the all above options as commands.
21953
21954 lut3d
21955 Apply a 3D LUT to an input video.
21956
21957 The filter accepts the following options:
21958
21959 file
21960 Set the 3D LUT file name.
21961
21962 Currently supported formats:
21963
21964 3dl AfterEffects
21965
21966 cube
21967 Iridas
21968
21969 dat DaVinci
21970
21971 m3d Pandora
21972
21973 csp cineSpace
21974
21975 interp
21976 Select interpolation mode.
21977
21978 Available values are:
21979
21980 nearest
21981 Use values from the nearest defined point.
21982
21983 trilinear
21984 Interpolate values using the 8 points defining a cube.
21985
21986 tetrahedral
21987 Interpolate values using a tetrahedron.
21988
21989 pyramid
21990 Interpolate values using a pyramid.
21991
21992 prism
21993 Interpolate values using a prism.
21994
21995 Commands
21996
21997 This filter supports the "interp" option as commands.
21998
21999 lumakey
22000 Turn certain luma values into transparency.
22001
22002 The filter accepts the following options:
22003
22004 threshold
22005 Set the luma which will be used as base for transparency. Default
22006 value is 0.
22007
22008 tolerance
22009 Set the range of luma values to be keyed out. Default value is
22010 0.01.
22011
22012 softness
22013 Set the range of softness. Default value is 0. Use this to control
22014 gradual transition from zero to full transparency.
22015
22016 Commands
22017
22018 This filter supports same commands as options. The command accepts the
22019 same syntax of the corresponding option.
22020
22021 If the specified expression is not valid, it is kept at its current
22022 value.
22023
22024 lut, lutrgb, lutyuv
22025 Compute a look-up table for binding each pixel component input value to
22026 an output value, and apply it to the input video.
22027
22028 lutyuv applies a lookup table to a YUV input video, lutrgb to an RGB
22029 input video.
22030
22031 These filters accept the following parameters:
22032
22033 c0 set first pixel component expression
22034
22035 c1 set second pixel component expression
22036
22037 c2 set third pixel component expression
22038
22039 c3 set fourth pixel component expression, corresponds to the alpha
22040 component
22041
22042 r set red component expression
22043
22044 g set green component expression
22045
22046 b set blue component expression
22047
22048 a alpha component expression
22049
22050 y set Y/luminance component expression
22051
22052 u set U/Cb component expression
22053
22054 v set V/Cr component expression
22055
22056 Each of them specifies the expression to use for computing the lookup
22057 table for the corresponding pixel component values.
22058
22059 The exact component associated to each of the c* options depends on the
22060 format in input.
22061
22062 The lut filter requires either YUV or RGB pixel formats in input,
22063 lutrgb requires RGB pixel formats in input, and lutyuv requires YUV.
22064
22065 The expressions can contain the following constants and functions:
22066
22067 w
22068 h The input width and height.
22069
22070 val The input value for the pixel component.
22071
22072 clipval
22073 The input value, clipped to the minval-maxval range.
22074
22075 maxval
22076 The maximum value for the pixel component.
22077
22078 minval
22079 The minimum value for the pixel component.
22080
22081 negval
22082 The negated value for the pixel component value, clipped to the
22083 minval-maxval range; it corresponds to the expression
22084 "maxval-clipval+minval".
22085
22086 clip(val)
22087 The computed value in val, clipped to the minval-maxval range.
22088
22089 gammaval(gamma)
22090 The computed gamma correction value of the pixel component value,
22091 clipped to the minval-maxval range. It corresponds to the
22092 expression
22093 "pow((clipval-minval)/(maxval-minval)\,gamma)*(maxval-minval)+minval"
22094
22095 All expressions default to "val".
22096
22097 Commands
22098
22099 This filter supports same commands as options.
22100
22101 Examples
22102
22103 • Negate input video:
22104
22105 lutrgb="r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val"
22106 lutyuv="y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val"
22107
22108 The above is the same as:
22109
22110 lutrgb="r=negval:g=negval:b=negval"
22111 lutyuv="y=negval:u=negval:v=negval"
22112
22113 • Negate luminance:
22114
22115 lutyuv=y=negval
22116
22117 • Remove chroma components, turning the video into a graytone image:
22118
22119 lutyuv="u=128:v=128"
22120
22121 • Apply a luma burning effect:
22122
22123 lutyuv="y=2*val"
22124
22125 • Remove green and blue components:
22126
22127 lutrgb="g=0:b=0"
22128
22129 • Set a constant alpha channel value on input:
22130
22131 format=rgba,lutrgb=a="maxval-minval/2"
22132
22133 • Correct luminance gamma by a factor of 0.5:
22134
22135 lutyuv=y=gammaval(0.5)
22136
22137 • Discard least significant bits of luma:
22138
22139 lutyuv=y='bitand(val, 128+64+32)'
22140
22141 • Technicolor like effect:
22142
22143 lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
22144
22145 lut2, tlut2
22146 The "lut2" filter takes two input streams and outputs one stream.
22147
22148 The "tlut2" (time lut2) filter takes two consecutive frames from one
22149 single stream.
22150
22151 This filter accepts the following parameters:
22152
22153 c0 set first pixel component expression
22154
22155 c1 set second pixel component expression
22156
22157 c2 set third pixel component expression
22158
22159 c3 set fourth pixel component expression, corresponds to the alpha
22160 component
22161
22162 d set output bit depth, only available for "lut2" filter. By default
22163 is 0, which means bit depth is automatically picked from first
22164 input format.
22165
22166 The "lut2" filter also supports the framesync options.
22167
22168 Each of them specifies the expression to use for computing the lookup
22169 table for the corresponding pixel component values.
22170
22171 The exact component associated to each of the c* options depends on the
22172 format in inputs.
22173
22174 The expressions can contain the following constants:
22175
22176 w
22177 h The input width and height.
22178
22179 x The first input value for the pixel component.
22180
22181 y The second input value for the pixel component.
22182
22183 bdx The first input video bit depth.
22184
22185 bdy The second input video bit depth.
22186
22187 All expressions default to "x".
22188
22189 Commands
22190
22191 This filter supports the all above options as commands except option
22192 "d".
22193
22194 Examples
22195
22196 • Highlight differences between two RGB video streams:
22197
22198 lut2='ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,0,pow(2,bdx)-1)'
22199
22200 • Highlight differences between two YUV video streams:
22201
22202 lut2='ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,pow(2,bdx-1),pow(2,bdx)-1):ifnot(x-y,pow(2,bdx-1),pow(2,bdx)-1)'
22203
22204 • Show max difference between two video streams:
22205
22206 lut2='if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1))):if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1))):if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1)))'
22207
22208 maskedclamp
22209 Clamp the first input stream with the second input and third input
22210 stream.
22211
22212 Returns the value of first stream to be between second input stream -
22213 "undershoot" and third input stream + "overshoot".
22214
22215 This filter accepts the following options:
22216
22217 undershoot
22218 Default value is 0.
22219
22220 overshoot
22221 Default value is 0.
22222
22223 planes
22224 Set which planes will be processed as bitmap, unprocessed planes
22225 will be copied from first stream. By default value 0xf, all planes
22226 will be processed.
22227
22228 Commands
22229
22230 This filter supports the all above options as commands.
22231
22232 maskedmax
22233 Merge the second and third input stream into output stream using
22234 absolute differences between second input stream and first input stream
22235 and absolute difference between third input stream and first input
22236 stream. The picked value will be from second input stream if second
22237 absolute difference is greater than first one or from third input
22238 stream otherwise.
22239
22240 This filter accepts the following options:
22241
22242 planes
22243 Set which planes will be processed as bitmap, unprocessed planes
22244 will be copied from first stream. By default value 0xf, all planes
22245 will be processed.
22246
22247 Commands
22248
22249 This filter supports the all above options as commands.
22250
22251 maskedmerge
22252 Merge the first input stream with the second input stream using per
22253 pixel weights in the third input stream.
22254
22255 A value of 0 in the third stream pixel component means that pixel
22256 component from first stream is returned unchanged, while maximum value
22257 (eg. 255 for 8-bit videos) means that pixel component from second
22258 stream is returned unchanged. Intermediate values define the amount of
22259 merging between both input stream's pixel components.
22260
22261 This filter accepts the following options:
22262
22263 planes
22264 Set which planes will be processed as bitmap, unprocessed planes
22265 will be copied from first stream. By default value 0xf, all planes
22266 will be processed.
22267
22268 Commands
22269
22270 This filter supports the all above options as commands.
22271
22272 maskedmin
22273 Merge the second and third input stream into output stream using
22274 absolute differences between second input stream and first input stream
22275 and absolute difference between third input stream and first input
22276 stream. The picked value will be from second input stream if second
22277 absolute difference is less than first one or from third input stream
22278 otherwise.
22279
22280 This filter accepts the following options:
22281
22282 planes
22283 Set which planes will be processed as bitmap, unprocessed planes
22284 will be copied from first stream. By default value 0xf, all planes
22285 will be processed.
22286
22287 Commands
22288
22289 This filter supports the all above options as commands.
22290
22291 maskedthreshold
22292 Pick pixels comparing absolute difference of two video streams with
22293 fixed threshold.
22294
22295 If absolute difference between pixel component of first and second
22296 video stream is equal or lower than user supplied threshold than pixel
22297 component from first video stream is picked, otherwise pixel component
22298 from second video stream is picked.
22299
22300 This filter accepts the following options:
22301
22302 threshold
22303 Set threshold used when picking pixels from absolute difference
22304 from two input video streams.
22305
22306 planes
22307 Set which planes will be processed as bitmap, unprocessed planes
22308 will be copied from second stream. By default value 0xf, all
22309 planes will be processed.
22310
22311 Commands
22312
22313 This filter supports the all above options as commands.
22314
22315 maskfun
22316 Create mask from input video.
22317
22318 For example it is useful to create motion masks after "tblend" filter.
22319
22320 This filter accepts the following options:
22321
22322 low Set low threshold. Any pixel component lower or exact than this
22323 value will be set to 0.
22324
22325 high
22326 Set high threshold. Any pixel component higher than this value will
22327 be set to max value allowed for current pixel format.
22328
22329 planes
22330 Set planes to filter, by default all available planes are filtered.
22331
22332 fill
22333 Fill all frame pixels with this value.
22334
22335 sum Set max average pixel value for frame. If sum of all pixel
22336 components is higher that this average, output frame will be
22337 completely filled with value set by fill option. Typically useful
22338 for scene changes when used in combination with "tblend" filter.
22339
22340 Commands
22341
22342 This filter supports the all above options as commands.
22343
22344 mcdeint
22345 Apply motion-compensation deinterlacing.
22346
22347 It needs one field per frame as input and must thus be used together
22348 with yadif=1/3 or equivalent.
22349
22350 This filter is only available in ffmpeg version 4.4 or earlier.
22351
22352 This filter accepts the following options:
22353
22354 mode
22355 Set the deinterlacing mode.
22356
22357 It accepts one of the following values:
22358
22359 fast
22360 medium
22361 slow
22362 use iterative motion estimation
22363
22364 extra_slow
22365 like slow, but use multiple reference frames.
22366
22367 Default value is fast.
22368
22369 parity
22370 Set the picture field parity assumed for the input video. It must
22371 be one of the following values:
22372
22373 0, tff
22374 assume top field first
22375
22376 1, bff
22377 assume bottom field first
22378
22379 Default value is bff.
22380
22381 qp Set per-block quantization parameter (QP) used by the internal
22382 encoder.
22383
22384 Higher values should result in a smoother motion vector field but
22385 less optimal individual vectors. Default value is 1.
22386
22387 median
22388 Pick median pixel from certain rectangle defined by radius.
22389
22390 This filter accepts the following options:
22391
22392 radius
22393 Set horizontal radius size. Default value is 1. Allowed range is
22394 integer from 1 to 127.
22395
22396 planes
22397 Set which planes to process. Default is 15, which is all available
22398 planes.
22399
22400 radiusV
22401 Set vertical radius size. Default value is 0. Allowed range is
22402 integer from 0 to 127. If it is 0, value will be picked from
22403 horizontal "radius" option.
22404
22405 percentile
22406 Set median percentile. Default value is 0.5. Default value of 0.5
22407 will pick always median values, while 0 will pick minimum values,
22408 and 1 maximum values.
22409
22410 Commands
22411
22412 This filter supports same commands as options. The command accepts the
22413 same syntax of the corresponding option.
22414
22415 If the specified expression is not valid, it is kept at its current
22416 value.
22417
22418 mergeplanes
22419 Merge color channel components from several video streams.
22420
22421 The filter accepts up to 4 input streams, and merge selected input
22422 planes to the output video.
22423
22424 This filter accepts the following options:
22425
22426 mapping
22427 Set input to output plane mapping. Default is 0.
22428
22429 The mappings is specified as a bitmap. It should be specified as a
22430 hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. 'Aa' describes the
22431 mapping for the first plane of the output stream. 'A' sets the
22432 number of the input stream to use (from 0 to 3), and 'a' the plane
22433 number of the corresponding input to use (from 0 to 3). The rest of
22434 the mappings is similar, 'Bb' describes the mapping for the output
22435 stream second plane, 'Cc' describes the mapping for the output
22436 stream third plane and 'Dd' describes the mapping for the output
22437 stream fourth plane.
22438
22439 format
22440 Set output pixel format. Default is "yuva444p".
22441
22442 Examples
22443
22444 • Merge three gray video streams of same width and height into single
22445 video stream:
22446
22447 [a0][a1][a2]mergeplanes=0x001020:yuv444p
22448
22449 • Merge 1st yuv444p stream and 2nd gray video stream into yuva444p
22450 video stream:
22451
22452 [a0][a1]mergeplanes=0x00010210:yuva444p
22453
22454 • Swap Y and A plane in yuva444p stream:
22455
22456 format=yuva444p,mergeplanes=0x03010200:yuva444p
22457
22458 • Swap U and V plane in yuv420p stream:
22459
22460 format=yuv420p,mergeplanes=0x000201:yuv420p
22461
22462 • Cast a rgb24 clip to yuv444p:
22463
22464 format=rgb24,mergeplanes=0x000102:yuv444p
22465
22466 mestimate
22467 Estimate and export motion vectors using block matching algorithms.
22468 Motion vectors are stored in frame side data to be used by other
22469 filters.
22470
22471 This filter accepts the following options:
22472
22473 method
22474 Specify the motion estimation method. Accepts one of the following
22475 values:
22476
22477 esa Exhaustive search algorithm.
22478
22479 tss Three step search algorithm.
22480
22481 tdls
22482 Two dimensional logarithmic search algorithm.
22483
22484 ntss
22485 New three step search algorithm.
22486
22487 fss Four step search algorithm.
22488
22489 ds Diamond search algorithm.
22490
22491 hexbs
22492 Hexagon-based search algorithm.
22493
22494 epzs
22495 Enhanced predictive zonal search algorithm.
22496
22497 umh Uneven multi-hexagon search algorithm.
22498
22499 Default value is esa.
22500
22501 mb_size
22502 Macroblock size. Default 16.
22503
22504 search_param
22505 Search parameter. Default 7.
22506
22507 midequalizer
22508 Apply Midway Image Equalization effect using two video streams.
22509
22510 Midway Image Equalization adjusts a pair of images to have the same
22511 histogram, while maintaining their dynamics as much as possible. It's
22512 useful for e.g. matching exposures from a pair of stereo cameras.
22513
22514 This filter has two inputs and one output, which must be of same pixel
22515 format, but may be of different sizes. The output of filter is first
22516 input adjusted with midway histogram of both inputs.
22517
22518 This filter accepts the following option:
22519
22520 planes
22521 Set which planes to process. Default is 15, which is all available
22522 planes.
22523
22524 minterpolate
22525 Convert the video to specified frame rate using motion interpolation.
22526
22527 This filter accepts the following options:
22528
22529 fps Specify the output frame rate. This can be rational e.g.
22530 "60000/1001". Frames are dropped if fps is lower than source fps.
22531 Default 60.
22532
22533 mi_mode
22534 Motion interpolation mode. Following values are accepted:
22535
22536 dup Duplicate previous or next frame for interpolating new ones.
22537
22538 blend
22539 Blend source frames. Interpolated frame is mean of previous and
22540 next frames.
22541
22542 mci Motion compensated interpolation. Following options are
22543 effective when this mode is selected:
22544
22545 mc_mode
22546 Motion compensation mode. Following values are accepted:
22547
22548 obmc
22549 Overlapped block motion compensation.
22550
22551 aobmc
22552 Adaptive overlapped block motion compensation. Window
22553 weighting coefficients are controlled adaptively
22554 according to the reliabilities of the neighboring
22555 motion vectors to reduce oversmoothing.
22556
22557 Default mode is obmc.
22558
22559 me_mode
22560 Motion estimation mode. Following values are accepted:
22561
22562 bidir
22563 Bidirectional motion estimation. Motion vectors are
22564 estimated for each source frame in both forward and
22565 backward directions.
22566
22567 bilat
22568 Bilateral motion estimation. Motion vectors are
22569 estimated directly for interpolated frame.
22570
22571 Default mode is bilat.
22572
22573 me The algorithm to be used for motion estimation. Following
22574 values are accepted:
22575
22576 esa Exhaustive search algorithm.
22577
22578 tss Three step search algorithm.
22579
22580 tdls
22581 Two dimensional logarithmic search algorithm.
22582
22583 ntss
22584 New three step search algorithm.
22585
22586 fss Four step search algorithm.
22587
22588 ds Diamond search algorithm.
22589
22590 hexbs
22591 Hexagon-based search algorithm.
22592
22593 epzs
22594 Enhanced predictive zonal search algorithm.
22595
22596 umh Uneven multi-hexagon search algorithm.
22597
22598 Default algorithm is epzs.
22599
22600 mb_size
22601 Macroblock size. Default 16.
22602
22603 search_param
22604 Motion estimation search parameter. Default 32.
22605
22606 vsbmc
22607 Enable variable-size block motion compensation. Motion
22608 estimation is applied with smaller block sizes at object
22609 boundaries in order to make the them less blur. Default is
22610 0 (disabled).
22611
22612 scd Scene change detection method. Scene change leads motion vectors to
22613 be in random direction. Scene change detection replace interpolated
22614 frames by duplicate ones. May not be needed for other modes.
22615 Following values are accepted:
22616
22617 none
22618 Disable scene change detection.
22619
22620 fdiff
22621 Frame difference. Corresponding pixel values are compared and
22622 if it satisfies scd_threshold scene change is detected.
22623
22624 Default method is fdiff.
22625
22626 scd_threshold
22627 Scene change detection threshold. Default is 10..
22628
22629 mix
22630 Mix several video input streams into one video stream.
22631
22632 A description of the accepted options follows.
22633
22634 inputs
22635 The number of inputs. If unspecified, it defaults to 2.
22636
22637 weights
22638 Specify weight of each input video stream as sequence. Each weight
22639 is separated by space. If number of weights is smaller than number
22640 of frames last specified weight will be used for all remaining
22641 unset weights.
22642
22643 scale
22644 Specify scale, if it is set it will be multiplied with sum of each
22645 weight multiplied with pixel values to give final destination pixel
22646 value. By default scale is auto scaled to sum of weights.
22647
22648 duration
22649 Specify how end of stream is determined.
22650
22651 longest
22652 The duration of the longest input. (default)
22653
22654 shortest
22655 The duration of the shortest input.
22656
22657 first
22658 The duration of the first input.
22659
22660 Commands
22661
22662 This filter supports the following commands:
22663
22664 weights
22665 scale
22666 Syntax is same as option with same name.
22667
22668 monochrome
22669 Convert video to gray using custom color filter.
22670
22671 A description of the accepted options follows.
22672
22673 cb Set the chroma blue spot. Allowed range is from -1 to 1. Default
22674 value is 0.
22675
22676 cr Set the chroma red spot. Allowed range is from -1 to 1. Default
22677 value is 0.
22678
22679 size
22680 Set the color filter size. Allowed range is from .1 to 10. Default
22681 value is 1.
22682
22683 high
22684 Set the highlights strength. Allowed range is from 0 to 1. Default
22685 value is 0.
22686
22687 Commands
22688
22689 This filter supports the all above options as commands.
22690
22691 morpho
22692 This filter allows to apply main morphological grayscale transforms,
22693 erode and dilate with arbitrary structures set in second input stream.
22694
22695 Unlike naive implementation and much slower performance in erosion and
22696 dilation filters, when speed is critical "morpho" filter should be used
22697 instead.
22698
22699 A description of accepted options follows,
22700
22701 mode
22702 Set morphological transform to apply, can be:
22703
22704 erode
22705 dilate
22706 open
22707 close
22708 gradient
22709 tophat
22710 blackhat
22711
22712 Default is "erode".
22713
22714 planes
22715 Set planes to filter, by default all planes except alpha are
22716 filtered.
22717
22718 structure
22719 Set which structure video frames will be processed from second
22720 input stream, can be first or all. Default is all.
22721
22722 The "morpho" filter also supports the framesync options.
22723
22724 Commands
22725
22726 This filter supports same commands as options.
22727
22728 mpdecimate
22729 Drop frames that do not differ greatly from the previous frame in order
22730 to reduce frame rate.
22731
22732 The main use of this filter is for very-low-bitrate encoding (e.g.
22733 streaming over dialup modem), but it could in theory be used for fixing
22734 movies that were inverse-telecined incorrectly.
22735
22736 A description of the accepted options follows.
22737
22738 max Set the maximum number of consecutive frames which can be dropped
22739 (if positive), or the minimum interval between dropped frames (if
22740 negative). If the value is 0, the frame is dropped disregarding the
22741 number of previous sequentially dropped frames.
22742
22743 Default value is 0.
22744
22745 hi
22746 lo
22747 frac
22748 Set the dropping threshold values.
22749
22750 Values for hi and lo are for 8x8 pixel blocks and represent actual
22751 pixel value differences, so a threshold of 64 corresponds to 1 unit
22752 of difference for each pixel, or the same spread out differently
22753 over the block.
22754
22755 A frame is a candidate for dropping if no 8x8 blocks differ by more
22756 than a threshold of hi, and if no more than frac blocks (1 meaning
22757 the whole image) differ by more than a threshold of lo.
22758
22759 Default value for hi is 64*12, default value for lo is 64*5, and
22760 default value for frac is 0.33.
22761
22762 msad
22763 Obtain the MSAD (Mean Sum of Absolute Differences) between two input
22764 videos.
22765
22766 This filter takes two input videos.
22767
22768 Both input videos must have the same resolution and pixel format for
22769 this filter to work correctly. Also it assumes that both inputs have
22770 the same number of frames, which are compared one by one.
22771
22772 The obtained per component, average, min and max MSAD is printed
22773 through the logging system.
22774
22775 The filter stores the calculated MSAD of each frame in frame metadata.
22776
22777 In the below example the input file main.mpg being processed is
22778 compared with the reference file ref.mpg.
22779
22780 ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
22781
22782 negate
22783 Negate (invert) the input video.
22784
22785 It accepts the following option:
22786
22787 components
22788 Set components to negate.
22789
22790 Available values for components are:
22791
22792 y
22793 u
22794 v
22795 a
22796 r
22797 g
22798 b
22799 negate_alpha
22800 With value 1, it negates the alpha component, if present. Default
22801 value is 0.
22802
22803 Commands
22804
22805 This filter supports same commands as options.
22806
22807 nlmeans
22808 Denoise frames using Non-Local Means algorithm.
22809
22810 Each pixel is adjusted by looking for other pixels with similar
22811 contexts. This context similarity is defined by comparing their
22812 surrounding patches of size pxp. Patches are searched in an area of rxr
22813 around the pixel.
22814
22815 Note that the research area defines centers for patches, which means
22816 some patches will be made of pixels outside that research area.
22817
22818 The filter accepts the following options.
22819
22820 s Set denoising strength. Default is 1.0. Must be in range [1.0,
22821 30.0].
22822
22823 p Set patch size. Default is 7. Must be odd number in range [0, 99].
22824
22825 pc Same as p but for chroma planes.
22826
22827 The default value is 0 and means automatic.
22828
22829 r Set research size. Default is 15. Must be odd number in range [0,
22830 99].
22831
22832 rc Same as r but for chroma planes.
22833
22834 The default value is 0 and means automatic.
22835
22836 nnedi
22837 Deinterlace video using neural network edge directed interpolation.
22838
22839 This filter accepts the following options:
22840
22841 weights
22842 Mandatory option, without binary file filter can not work.
22843 Currently file can be found here:
22844 https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
22845
22846 deint
22847 Set which frames to deinterlace, by default it is "all". Can be
22848 "all" or "interlaced".
22849
22850 field
22851 Set mode of operation.
22852
22853 Can be one of the following:
22854
22855 af Use frame flags, both fields.
22856
22857 a Use frame flags, single field.
22858
22859 t Use top field only.
22860
22861 b Use bottom field only.
22862
22863 tf Use both fields, top first.
22864
22865 bf Use both fields, bottom first.
22866
22867 planes
22868 Set which planes to process, by default filter process all frames.
22869
22870 nsize
22871 Set size of local neighborhood around each pixel, used by the
22872 predictor neural network.
22873
22874 Can be one of the following:
22875
22876 s8x6
22877 s16x6
22878 s32x6
22879 s48x6
22880 s8x4
22881 s16x4
22882 s32x4
22883 nns Set the number of neurons in predictor neural network. Can be one
22884 of the following:
22885
22886 n16
22887 n32
22888 n64
22889 n128
22890 n256
22891 qual
22892 Controls the number of different neural network predictions that
22893 are blended together to compute the final output value. Can be
22894 "fast", default or "slow".
22895
22896 etype
22897 Set which set of weights to use in the predictor. Can be one of
22898 the following:
22899
22900 a, abs
22901 weights trained to minimize absolute error
22902
22903 s, mse
22904 weights trained to minimize squared error
22905
22906 pscrn
22907 Controls whether or not the prescreener neural network is used to
22908 decide which pixels should be processed by the predictor neural
22909 network and which can be handled by simple cubic interpolation.
22910 The prescreener is trained to know whether cubic interpolation will
22911 be sufficient for a pixel or whether it should be predicted by the
22912 predictor nn. The computational complexity of the prescreener nn
22913 is much less than that of the predictor nn. Since most pixels can
22914 be handled by cubic interpolation, using the prescreener generally
22915 results in much faster processing. The prescreener is pretty
22916 accurate, so the difference between using it and not using it is
22917 almost always unnoticeable.
22918
22919 Can be one of the following:
22920
22921 none
22922 original
22923 new
22924 new2
22925 new3
22926
22927 Default is "new".
22928
22929 Commands
22930
22931 This filter supports same commands as options, excluding weights
22932 option.
22933
22934 noformat
22935 Force libavfilter not to use any of the specified pixel formats for the
22936 input to the next filter.
22937
22938 It accepts the following parameters:
22939
22940 pix_fmts
22941 A '|'-separated list of pixel format names, such as
22942 pix_fmts=yuv420p|monow|rgb24".
22943
22944 Examples
22945
22946 • Force libavfilter to use a format different from yuv420p for the
22947 input to the vflip filter:
22948
22949 noformat=pix_fmts=yuv420p,vflip
22950
22951 • Convert the input video to any of the formats not contained in the
22952 list:
22953
22954 noformat=yuv420p|yuv444p|yuv410p
22955
22956 noise
22957 Add noise on video input frame.
22958
22959 The filter accepts the following options:
22960
22961 all_seed
22962 c0_seed
22963 c1_seed
22964 c2_seed
22965 c3_seed
22966 Set noise seed for specific pixel component or all pixel components
22967 in case of all_seed. Default value is 123457.
22968
22969 all_strength, alls
22970 c0_strength, c0s
22971 c1_strength, c1s
22972 c2_strength, c2s
22973 c3_strength, c3s
22974 Set noise strength for specific pixel component or all pixel
22975 components in case all_strength. Default value is 0. Allowed range
22976 is [0, 100].
22977
22978 all_flags, allf
22979 c0_flags, c0f
22980 c1_flags, c1f
22981 c2_flags, c2f
22982 c3_flags, c3f
22983 Set pixel component flags or set flags for all components if
22984 all_flags. Available values for component flags are:
22985
22986 a averaged temporal noise (smoother)
22987
22988 p mix random noise with a (semi)regular pattern
22989
22990 t temporal noise (noise pattern changes between frames)
22991
22992 u uniform noise (gaussian otherwise)
22993
22994 Examples
22995
22996 Add temporal and uniform noise to input video:
22997
22998 noise=alls=20:allf=t+u
22999
23000 normalize
23001 Normalize RGB video (aka histogram stretching, contrast stretching).
23002 See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
23003
23004 For each channel of each frame, the filter computes the input range and
23005 maps it linearly to the user-specified output range. The output range
23006 defaults to the full dynamic range from pure black to pure white.
23007
23008 Temporal smoothing can be used on the input range to reduce flickering
23009 (rapid changes in brightness) caused when small dark or bright objects
23010 enter or leave the scene. This is similar to the auto-exposure
23011 (automatic gain control) on a video camera, and, like a video camera,
23012 it may cause a period of over- or under-exposure of the video.
23013
23014 The R,G,B channels can be normalized independently, which may cause
23015 some color shifting, or linked together as a single channel, which
23016 prevents color shifting. Linked normalization preserves hue.
23017 Independent normalization does not, so it can be used to remove some
23018 color casts. Independent and linked normalization can be combined in
23019 any ratio.
23020
23021 The normalize filter accepts the following options:
23022
23023 blackpt
23024 whitept
23025 Colors which define the output range. The minimum input value is
23026 mapped to the blackpt. The maximum input value is mapped to the
23027 whitept. The defaults are black and white respectively. Specifying
23028 white for blackpt and black for whitept will give color-inverted,
23029 normalized video. Shades of grey can be used to reduce the dynamic
23030 range (contrast). Specifying saturated colors here can create some
23031 interesting effects.
23032
23033 smoothing
23034 The number of previous frames to use for temporal smoothing. The
23035 input range of each channel is smoothed using a rolling average
23036 over the current frame and the smoothing previous frames. The
23037 default is 0 (no temporal smoothing).
23038
23039 independence
23040 Controls the ratio of independent (color shifting) channel
23041 normalization to linked (color preserving) normalization. 0.0 is
23042 fully linked, 1.0 is fully independent. Defaults to 1.0 (fully
23043 independent).
23044
23045 strength
23046 Overall strength of the filter. 1.0 is full strength. 0.0 is a
23047 rather expensive no-op. Defaults to 1.0 (full strength).
23048
23049 Commands
23050
23051 This filter supports same commands as options, excluding smoothing
23052 option. The command accepts the same syntax of the corresponding
23053 option.
23054
23055 If the specified expression is not valid, it is kept at its current
23056 value.
23057
23058 Examples
23059
23060 Stretch video contrast to use the full dynamic range, with no temporal
23061 smoothing; may flicker depending on the source content:
23062
23063 normalize=blackpt=black:whitept=white:smoothing=0
23064
23065 As above, but with 50 frames of temporal smoothing; flicker should be
23066 reduced, depending on the source content:
23067
23068 normalize=blackpt=black:whitept=white:smoothing=50
23069
23070 As above, but with hue-preserving linked channel normalization:
23071
23072 normalize=blackpt=black:whitept=white:smoothing=50:independence=0
23073
23074 As above, but with half strength:
23075
23076 normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
23077
23078 Map the darkest input color to red, the brightest input color to cyan:
23079
23080 normalize=blackpt=red:whitept=cyan
23081
23082 null
23083 Pass the video source unchanged to the output.
23084
23085 ocr
23086 Optical Character Recognition
23087
23088 This filter uses Tesseract for optical character recognition. To enable
23089 compilation of this filter, you need to configure FFmpeg with
23090 "--enable-libtesseract".
23091
23092 It accepts the following options:
23093
23094 datapath
23095 Set datapath to tesseract data. Default is to use whatever was set
23096 at installation.
23097
23098 language
23099 Set language, default is "eng".
23100
23101 whitelist
23102 Set character whitelist.
23103
23104 blacklist
23105 Set character blacklist.
23106
23107 The filter exports recognized text as the frame metadata
23108 "lavfi.ocr.text". The filter exports confidence of recognized words as
23109 the frame metadata "lavfi.ocr.confidence".
23110
23111 ocv
23112 Apply a video transform using libopencv.
23113
23114 To enable this filter, install the libopencv library and headers and
23115 configure FFmpeg with "--enable-libopencv".
23116
23117 It accepts the following parameters:
23118
23119 filter_name
23120 The name of the libopencv filter to apply.
23121
23122 filter_params
23123 The parameters to pass to the libopencv filter. If not specified,
23124 the default values are assumed.
23125
23126 Refer to the official libopencv documentation for more precise
23127 information:
23128 <http://docs.opencv.org/master/modules/imgproc/doc/filtering.html>
23129
23130 Several libopencv filters are supported; see the following subsections.
23131
23132 dilate
23133
23134 Dilate an image by using a specific structuring element. It
23135 corresponds to the libopencv function "cvDilate".
23136
23137 It accepts the parameters: struct_el|nb_iterations.
23138
23139 struct_el represents a structuring element, and has the syntax:
23140 colsxrows+anchor_xxanchor_y/shape
23141
23142 cols and rows represent the number of columns and rows of the
23143 structuring element, anchor_x and anchor_y the anchor point, and shape
23144 the shape for the structuring element. shape must be "rect", "cross",
23145 "ellipse", or "custom".
23146
23147 If the value for shape is "custom", it must be followed by a string of
23148 the form "=filename". The file with name filename is assumed to
23149 represent a binary image, with each printable character corresponding
23150 to a bright pixel. When a custom shape is used, cols and rows are
23151 ignored, the number or columns and rows of the read file are assumed
23152 instead.
23153
23154 The default value for struct_el is "3x3+0x0/rect".
23155
23156 nb_iterations specifies the number of times the transform is applied to
23157 the image, and defaults to 1.
23158
23159 Some examples:
23160
23161 # Use the default values
23162 ocv=dilate
23163
23164 # Dilate using a structuring element with a 5x5 cross, iterating two times
23165 ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
23166
23167 # Read the shape from the file diamond.shape, iterating two times.
23168 # The file diamond.shape may contain a pattern of characters like this
23169 # *
23170 # ***
23171 # *****
23172 # ***
23173 # *
23174 # The specified columns and rows are ignored
23175 # but the anchor point coordinates are not
23176 ocv=dilate:0x0+2x2/custom=diamond.shape|2
23177
23178 erode
23179
23180 Erode an image by using a specific structuring element. It corresponds
23181 to the libopencv function "cvErode".
23182
23183 It accepts the parameters: struct_el:nb_iterations, with the same
23184 syntax and semantics as the dilate filter.
23185
23186 smooth
23187
23188 Smooth the input video.
23189
23190 The filter takes the following parameters:
23191 type|param1|param2|param3|param4.
23192
23193 type is the type of smooth filter to apply, and must be one of the
23194 following values: "blur", "blur_no_scale", "median", "gaussian", or
23195 "bilateral". The default value is "gaussian".
23196
23197 The meaning of param1, param2, param3, and param4 depends on the smooth
23198 type. param1 and param2 accept integer positive values or 0. param3 and
23199 param4 accept floating point values.
23200
23201 The default value for param1 is 3. The default value for the other
23202 parameters is 0.
23203
23204 These parameters correspond to the parameters assigned to the libopencv
23205 function "cvSmooth".
23206
23207 oscilloscope
23208 2D Video Oscilloscope.
23209
23210 Useful to measure spatial impulse, step responses, chroma delays, etc.
23211
23212 It accepts the following parameters:
23213
23214 x Set scope center x position.
23215
23216 y Set scope center y position.
23217
23218 s Set scope size, relative to frame diagonal.
23219
23220 t Set scope tilt/rotation.
23221
23222 o Set trace opacity.
23223
23224 tx Set trace center x position.
23225
23226 ty Set trace center y position.
23227
23228 tw Set trace width, relative to width of frame.
23229
23230 th Set trace height, relative to height of frame.
23231
23232 c Set which components to trace. By default it traces first three
23233 components.
23234
23235 g Draw trace grid. By default is enabled.
23236
23237 st Draw some statistics. By default is enabled.
23238
23239 sc Draw scope. By default is enabled.
23240
23241 Commands
23242
23243 This filter supports same commands as options. The command accepts the
23244 same syntax of the corresponding option.
23245
23246 If the specified expression is not valid, it is kept at its current
23247 value.
23248
23249 Examples
23250
23251 • Inspect full first row of video frame.
23252
23253 oscilloscope=x=0.5:y=0:s=1
23254
23255 • Inspect full last row of video frame.
23256
23257 oscilloscope=x=0.5:y=1:s=1
23258
23259 • Inspect full 5th line of video frame of height 1080.
23260
23261 oscilloscope=x=0.5:y=5/1080:s=1
23262
23263 • Inspect full last column of video frame.
23264
23265 oscilloscope=x=1:y=0.5:s=1:t=1
23266
23267 overlay
23268 Overlay one video on top of another.
23269
23270 It takes two inputs and has one output. The first input is the "main"
23271 video on which the second input is overlaid.
23272
23273 It accepts the following parameters:
23274
23275 A description of the accepted options follows.
23276
23277 x
23278 y Set the expression for the x and y coordinates of the overlaid
23279 video on the main video. Default value is "0" for both expressions.
23280 In case the expression is invalid, it is set to a huge value
23281 (meaning that the overlay will not be displayed within the output
23282 visible area).
23283
23284 eof_action
23285 See framesync.
23286
23287 eval
23288 Set when the expressions for x, and y are evaluated.
23289
23290 It accepts the following values:
23291
23292 init
23293 only evaluate expressions once during the filter initialization
23294 or when a command is processed
23295
23296 frame
23297 evaluate expressions for each incoming frame
23298
23299 Default value is frame.
23300
23301 shortest
23302 See framesync.
23303
23304 format
23305 Set the format for the output video.
23306
23307 It accepts the following values:
23308
23309 yuv420
23310 force YUV420 output
23311
23312 yuv420p10
23313 force YUV420p10 output
23314
23315 yuv422
23316 force YUV422 output
23317
23318 yuv422p10
23319 force YUV422p10 output
23320
23321 yuv444
23322 force YUV444 output
23323
23324 rgb force packed RGB output
23325
23326 gbrp
23327 force planar RGB output
23328
23329 auto
23330 automatically pick format
23331
23332 Default value is yuv420.
23333
23334 repeatlast
23335 See framesync.
23336
23337 alpha
23338 Set format of alpha of the overlaid video, it can be straight or
23339 premultiplied. Default is straight.
23340
23341 The x, and y expressions can contain the following parameters.
23342
23343 main_w, W
23344 main_h, H
23345 The main input width and height.
23346
23347 overlay_w, w
23348 overlay_h, h
23349 The overlay input width and height.
23350
23351 x
23352 y The computed values for x and y. They are evaluated for each new
23353 frame.
23354
23355 hsub
23356 vsub
23357 horizontal and vertical chroma subsample values of the output
23358 format. For example for the pixel format "yuv422p" hsub is 2 and
23359 vsub is 1.
23360
23361 n the number of input frame, starting from 0
23362
23363 pos the position in the file of the input frame, NAN if unknown
23364
23365 t The timestamp, expressed in seconds. It's NAN if the input
23366 timestamp is unknown.
23367
23368 This filter also supports the framesync options.
23369
23370 Note that the n, pos, t variables are available only when evaluation is
23371 done per frame, and will evaluate to NAN when eval is set to init.
23372
23373 Be aware that frames are taken from each input video in timestamp
23374 order, hence, if their initial timestamps differ, it is a good idea to
23375 pass the two inputs through a setpts=PTS-STARTPTS filter to have them
23376 begin in the same zero timestamp, as the example for the movie filter
23377 does.
23378
23379 You can chain together more overlays but you should test the efficiency
23380 of such approach.
23381
23382 Commands
23383
23384 This filter supports the following commands:
23385
23386 x
23387 y Modify the x and y of the overlay input. The command accepts the
23388 same syntax of the corresponding option.
23389
23390 If the specified expression is not valid, it is kept at its current
23391 value.
23392
23393 Examples
23394
23395 • Draw the overlay at 10 pixels from the bottom right corner of the
23396 main video:
23397
23398 overlay=main_w-overlay_w-10:main_h-overlay_h-10
23399
23400 Using named options the example above becomes:
23401
23402 overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
23403
23404 • Insert a transparent PNG logo in the bottom left corner of the
23405 input, using the ffmpeg tool with the "-filter_complex" option:
23406
23407 ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
23408
23409 • Insert 2 different transparent PNG logos (second logo on bottom
23410 right corner) using the ffmpeg tool:
23411
23412 ffmpeg -i input -i logo1 -i logo2 -filter_complex 'overlay=x=10:y=H-h-10,overlay=x=W-w-10:y=H-h-10' output
23413
23414 • Add a transparent color layer on top of the main video; "WxH" must
23415 specify the size of the main input to the overlay filter:
23416
23417 color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
23418
23419 • Play an original video and a filtered version (here with the
23420 deshake filter) side by side using the ffplay tool:
23421
23422 ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
23423
23424 The above command is the same as:
23425
23426 ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
23427
23428 • Make a sliding overlay appearing from the left to the right top
23429 part of the screen starting since time 2:
23430
23431 overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
23432
23433 • Compose output by putting two input videos side to side:
23434
23435 ffmpeg -i left.avi -i right.avi -filter_complex "
23436 nullsrc=size=200x100 [background];
23437 [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
23438 [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
23439 [background][left] overlay=shortest=1 [background+left];
23440 [background+left][right] overlay=shortest=1:x=100 [left+right]
23441 "
23442
23443 • Mask 10-20 seconds of a video by applying the delogo filter to a
23444 section
23445
23446 ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
23447 -vf '[in]split[split_main][split_delogo];[split_delogo]trim=start=360:end=371,delogo=0:0:640:480[delogoed];[split_main][delogoed]overlay=eof_action=pass[out]'
23448 masked.avi
23449
23450 • Chain several overlays in cascade:
23451
23452 nullsrc=s=200x200 [bg];
23453 testsrc=s=100x100, split=4 [in0][in1][in2][in3];
23454 [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
23455 [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
23456 [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
23457 [in3] null, [mid2] overlay=100:100 [out0]
23458
23459 overlay_cuda
23460 Overlay one video on top of another.
23461
23462 This is the CUDA variant of the overlay filter. It only accepts CUDA
23463 frames. The underlying input pixel formats have to match.
23464
23465 It takes two inputs and has one output. The first input is the "main"
23466 video on which the second input is overlaid.
23467
23468 It accepts the following parameters:
23469
23470 x
23471 y Set expressions for the x and y coordinates of the overlaid video
23472 on the main video.
23473
23474 They can contain the following parameters:
23475
23476 main_w, W
23477 main_h, H
23478 The main input width and height.
23479
23480 overlay_w, w
23481 overlay_h, h
23482 The overlay input width and height.
23483
23484 x
23485 y The computed values for x and y. They are evaluated for each
23486 new frame.
23487
23488 n The ordinal index of the main input frame, starting from 0.
23489
23490 pos The byte offset position in the file of the main input frame,
23491 NAN if unknown.
23492
23493 t The timestamp of the main input frame, expressed in seconds,
23494 NAN if unknown.
23495
23496 Default value is "0" for both expressions.
23497
23498 eval
23499 Set when the expressions for x and y are evaluated.
23500
23501 It accepts the following values:
23502
23503 init
23504 Evaluate expressions once during filter initialization or when
23505 a command is processed.
23506
23507 frame
23508 Evaluate expressions for each incoming frame
23509
23510 Default value is frame.
23511
23512 eof_action
23513 See framesync.
23514
23515 shortest
23516 See framesync.
23517
23518 repeatlast
23519 See framesync.
23520
23521 This filter also supports the framesync options.
23522
23523 owdenoise
23524 Apply Overcomplete Wavelet denoiser.
23525
23526 The filter accepts the following options:
23527
23528 depth
23529 Set depth.
23530
23531 Larger depth values will denoise lower frequency components more,
23532 but slow down filtering.
23533
23534 Must be an int in the range 8-16, default is 8.
23535
23536 luma_strength, ls
23537 Set luma strength.
23538
23539 Must be a double value in the range 0-1000, default is 1.0.
23540
23541 chroma_strength, cs
23542 Set chroma strength.
23543
23544 Must be a double value in the range 0-1000, default is 1.0.
23545
23546 pad
23547 Add paddings to the input image, and place the original input at the
23548 provided x, y coordinates.
23549
23550 It accepts the following parameters:
23551
23552 width, w
23553 height, h
23554 Specify an expression for the size of the output image with the
23555 paddings added. If the value for width or height is 0, the
23556 corresponding input size is used for the output.
23557
23558 The width expression can reference the value set by the height
23559 expression, and vice versa.
23560
23561 The default value of width and height is 0.
23562
23563 x
23564 y Specify the offsets to place the input image at within the padded
23565 area, with respect to the top/left border of the output image.
23566
23567 The x expression can reference the value set by the y expression,
23568 and vice versa.
23569
23570 The default value of x and y is 0.
23571
23572 If x or y evaluate to a negative number, they'll be changed so the
23573 input image is centered on the padded area.
23574
23575 color
23576 Specify the color of the padded area. For the syntax of this
23577 option, check the "Color" section in the ffmpeg-utils manual.
23578
23579 The default value of color is "black".
23580
23581 eval
23582 Specify when to evaluate width, height, x and y expression.
23583
23584 It accepts the following values:
23585
23586 init
23587 Only evaluate expressions once during the filter initialization
23588 or when a command is processed.
23589
23590 frame
23591 Evaluate expressions for each incoming frame.
23592
23593 Default value is init.
23594
23595 aspect
23596 Pad to aspect instead to a resolution.
23597
23598 The value for the width, height, x, and y options are expressions
23599 containing the following constants:
23600
23601 in_w
23602 in_h
23603 The input video width and height.
23604
23605 iw
23606 ih These are the same as in_w and in_h.
23607
23608 out_w
23609 out_h
23610 The output width and height (the size of the padded area), as
23611 specified by the width and height expressions.
23612
23613 ow
23614 oh These are the same as out_w and out_h.
23615
23616 x
23617 y The x and y offsets as specified by the x and y expressions, or NAN
23618 if not yet specified.
23619
23620 a same as iw / ih
23621
23622 sar input sample aspect ratio
23623
23624 dar input display aspect ratio, it is the same as (iw / ih) * sar
23625
23626 hsub
23627 vsub
23628 The horizontal and vertical chroma subsample values. For example
23629 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
23630
23631 Examples
23632
23633 • Add paddings with the color "violet" to the input video. The output
23634 video size is 640x480, and the top-left corner of the input video
23635 is placed at column 0, row 40
23636
23637 pad=640:480:0:40:violet
23638
23639 The example above is equivalent to the following command:
23640
23641 pad=width=640:height=480:x=0:y=40:color=violet
23642
23643 • Pad the input to get an output with dimensions increased by 3/2,
23644 and put the input video at the center of the padded area:
23645
23646 pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
23647
23648 • Pad the input to get a squared output with size equal to the
23649 maximum value between the input width and height, and put the input
23650 video at the center of the padded area:
23651
23652 pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
23653
23654 • Pad the input to get a final w/h ratio of 16:9:
23655
23656 pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
23657
23658 • In case of anamorphic video, in order to set the output display
23659 aspect correctly, it is necessary to use sar in the expression,
23660 according to the relation:
23661
23662 (ih * X / ih) * sar = output_dar
23663 X = output_dar / sar
23664
23665 Thus the previous example needs to be modified to:
23666
23667 pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
23668
23669 • Double the output size and put the input video in the bottom-right
23670 corner of the output padded area:
23671
23672 pad="2*iw:2*ih:ow-iw:oh-ih"
23673
23674 palettegen
23675 Generate one palette for a whole video stream.
23676
23677 It accepts the following options:
23678
23679 max_colors
23680 Set the maximum number of colors to quantize in the palette. Note:
23681 the palette will still contain 256 colors; the unused palette
23682 entries will be black.
23683
23684 reserve_transparent
23685 Create a palette of 255 colors maximum and reserve the last one for
23686 transparency. Reserving the transparency color is useful for GIF
23687 optimization. If not set, the maximum of colors in the palette
23688 will be 256. You probably want to disable this option for a
23689 standalone image. Set by default.
23690
23691 transparency_color
23692 Set the color that will be used as background for transparency.
23693
23694 stats_mode
23695 Set statistics mode.
23696
23697 It accepts the following values:
23698
23699 full
23700 Compute full frame histograms.
23701
23702 diff
23703 Compute histograms only for the part that differs from previous
23704 frame. This might be relevant to give more importance to the
23705 moving part of your input if the background is static.
23706
23707 single
23708 Compute new histogram for each frame.
23709
23710 Default value is full.
23711
23712 use_alpha
23713 Create a palette of colors with alpha components. Setting this,
23714 will automatically disable 'reserve_transparent'.
23715
23716 The filter also exports the frame metadata "lavfi.color_quant_ratio"
23717 ("nb_color_in / nb_color_out") which you can use to evaluate the degree
23718 of color quantization of the palette. This information is also visible
23719 at info logging level.
23720
23721 Examples
23722
23723 • Generate a representative palette of a given video using ffmpeg:
23724
23725 ffmpeg -i input.mkv -vf palettegen palette.png
23726
23727 paletteuse
23728 Use a palette to downsample an input video stream.
23729
23730 The filter takes two inputs: one video stream and a palette. The
23731 palette must be a 256 pixels image.
23732
23733 It accepts the following options:
23734
23735 dither
23736 Select dithering mode. Available algorithms are:
23737
23738 bayer
23739 Ordered 8x8 bayer dithering (deterministic)
23740
23741 heckbert
23742 Dithering as defined by Paul Heckbert in 1982 (simple error
23743 diffusion). Note: this dithering is sometimes considered
23744 "wrong" and is included as a reference.
23745
23746 floyd_steinberg
23747 Floyd and Steingberg dithering (error diffusion)
23748
23749 sierra2
23750 Frankie Sierra dithering v2 (error diffusion)
23751
23752 sierra2_4a
23753 Frankie Sierra dithering v2 "Lite" (error diffusion)
23754
23755 Default is sierra2_4a.
23756
23757 bayer_scale
23758 When bayer dithering is selected, this option defines the scale of
23759 the pattern (how much the crosshatch pattern is visible). A low
23760 value means more visible pattern for less banding, and higher value
23761 means less visible pattern at the cost of more banding.
23762
23763 The option must be an integer value in the range [0,5]. Default is
23764 2.
23765
23766 diff_mode
23767 If set, define the zone to process
23768
23769 rectangle
23770 Only the changing rectangle will be reprocessed. This is
23771 similar to GIF cropping/offsetting compression mechanism. This
23772 option can be useful for speed if only a part of the image is
23773 changing, and has use cases such as limiting the scope of the
23774 error diffusal dither to the rectangle that bounds the moving
23775 scene (it leads to more deterministic output if the scene
23776 doesn't change much, and as a result less moving noise and
23777 better GIF compression).
23778
23779 Default is none.
23780
23781 new Take new palette for each output frame.
23782
23783 alpha_threshold
23784 Sets the alpha threshold for transparency. Alpha values above this
23785 threshold will be treated as completely opaque, and values below
23786 this threshold will be treated as completely transparent.
23787
23788 The option must be an integer value in the range [0,255]. Default
23789 is 128.
23790
23791 use_alpha
23792 Apply the palette by taking alpha values into account. Only useful
23793 with palettes that are containing multiple colors with alpha
23794 components. Setting this will automatically disable
23795 'alpha_treshold'.
23796
23797 Examples
23798
23799 • Use a palette (generated for example with palettegen) to encode a
23800 GIF using ffmpeg:
23801
23802 ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
23803
23804 perspective
23805 Correct perspective of video not recorded perpendicular to the screen.
23806
23807 A description of the accepted parameters follows.
23808
23809 x0
23810 y0
23811 x1
23812 y1
23813 x2
23814 y2
23815 x3
23816 y3 Set coordinates expression for top left, top right, bottom left and
23817 bottom right corners. Default values are "0:0:W:0:0:H:W:H" with
23818 which perspective will remain unchanged. If the "sense" option is
23819 set to "source", then the specified points will be sent to the
23820 corners of the destination. If the "sense" option is set to
23821 "destination", then the corners of the source will be sent to the
23822 specified coordinates.
23823
23824 The expressions can use the following variables:
23825
23826 W
23827 H the width and height of video frame.
23828
23829 in Input frame count.
23830
23831 on Output frame count.
23832
23833 interpolation
23834 Set interpolation for perspective correction.
23835
23836 It accepts the following values:
23837
23838 linear
23839 cubic
23840
23841 Default value is linear.
23842
23843 sense
23844 Set interpretation of coordinate options.
23845
23846 It accepts the following values:
23847
23848 0, source
23849 Send point in the source specified by the given coordinates to
23850 the corners of the destination.
23851
23852 1, destination
23853 Send the corners of the source to the point in the destination
23854 specified by the given coordinates.
23855
23856 Default value is source.
23857
23858 eval
23859 Set when the expressions for coordinates x0,y0,...x3,y3 are
23860 evaluated.
23861
23862 It accepts the following values:
23863
23864 init
23865 only evaluate expressions once during the filter initialization
23866 or when a command is processed
23867
23868 frame
23869 evaluate expressions for each incoming frame
23870
23871 Default value is init.
23872
23873 phase
23874 Delay interlaced video by one field time so that the field order
23875 changes.
23876
23877 The intended use is to fix PAL movies that have been captured with the
23878 opposite field order to the film-to-video transfer.
23879
23880 A description of the accepted parameters follows.
23881
23882 mode
23883 Set phase mode.
23884
23885 It accepts the following values:
23886
23887 t Capture field order top-first, transfer bottom-first. Filter
23888 will delay the bottom field.
23889
23890 b Capture field order bottom-first, transfer top-first. Filter
23891 will delay the top field.
23892
23893 p Capture and transfer with the same field order. This mode only
23894 exists for the documentation of the other options to refer to,
23895 but if you actually select it, the filter will faithfully do
23896 nothing.
23897
23898 a Capture field order determined automatically by field flags,
23899 transfer opposite. Filter selects among t and b modes on a
23900 frame by frame basis using field flags. If no field information
23901 is available, then this works just like u.
23902
23903 u Capture unknown or varying, transfer opposite. Filter selects
23904 among t and b on a frame by frame basis by analyzing the images
23905 and selecting the alternative that produces best match between
23906 the fields.
23907
23908 T Capture top-first, transfer unknown or varying. Filter selects
23909 among t and p using image analysis.
23910
23911 B Capture bottom-first, transfer unknown or varying. Filter
23912 selects among b and p using image analysis.
23913
23914 A Capture determined by field flags, transfer unknown or varying.
23915 Filter selects among t, b and p using field flags and image
23916 analysis. If no field information is available, then this works
23917 just like U. This is the default mode.
23918
23919 U Both capture and transfer unknown or varying. Filter selects
23920 among t, b and p using image analysis only.
23921
23922 Commands
23923
23924 This filter supports the all above options as commands.
23925
23926 photosensitivity
23927 Reduce various flashes in video, so to help users with epilepsy.
23928
23929 It accepts the following options:
23930
23931 frames, f
23932 Set how many frames to use when filtering. Default is 30.
23933
23934 threshold, t
23935 Set detection threshold factor. Default is 1. Lower is stricter.
23936
23937 skip
23938 Set how many pixels to skip when sampling frames. Default is 1.
23939 Allowed range is from 1 to 1024.
23940
23941 bypass
23942 Leave frames unchanged. Default is disabled.
23943
23944 pixdesctest
23945 Pixel format descriptor test filter, mainly useful for internal
23946 testing. The output video should be equal to the input video.
23947
23948 For example:
23949
23950 format=monow, pixdesctest
23951
23952 can be used to test the monowhite pixel format descriptor definition.
23953
23954 pixscope
23955 Display sample values of color channels. Mainly useful for checking
23956 color and levels. Minimum supported resolution is 640x480.
23957
23958 The filters accept the following options:
23959
23960 x Set scope X position, relative offset on X axis.
23961
23962 y Set scope Y position, relative offset on Y axis.
23963
23964 w Set scope width.
23965
23966 h Set scope height.
23967
23968 o Set window opacity. This window also holds statistics about pixel
23969 area.
23970
23971 wx Set window X position, relative offset on X axis.
23972
23973 wy Set window Y position, relative offset on Y axis.
23974
23975 Commands
23976
23977 This filter supports same commands as options.
23978
23979 pp
23980 Enable the specified chain of postprocessing subfilters using
23981 libpostproc. This library should be automatically selected with a GPL
23982 build ("--enable-gpl"). Subfilters must be separated by '/' and can be
23983 disabled by prepending a '-'. Each subfilter and some options have a
23984 short and a long name that can be used interchangeably, i.e. dr/dering
23985 are the same.
23986
23987 The filters accept the following options:
23988
23989 subfilters
23990 Set postprocessing subfilters string.
23991
23992 All subfilters share common options to determine their scope:
23993
23994 a/autoq
23995 Honor the quality commands for this subfilter.
23996
23997 c/chrom
23998 Do chrominance filtering, too (default).
23999
24000 y/nochrom
24001 Do luminance filtering only (no chrominance).
24002
24003 n/noluma
24004 Do chrominance filtering only (no luminance).
24005
24006 These options can be appended after the subfilter name, separated by a
24007 '|'.
24008
24009 Available subfilters are:
24010
24011 hb/hdeblock[|difference[|flatness]]
24012 Horizontal deblocking filter
24013
24014 difference
24015 Difference factor where higher values mean more deblocking
24016 (default: 32).
24017
24018 flatness
24019 Flatness threshold where lower values mean more deblocking
24020 (default: 39).
24021
24022 vb/vdeblock[|difference[|flatness]]
24023 Vertical deblocking filter
24024
24025 difference
24026 Difference factor where higher values mean more deblocking
24027 (default: 32).
24028
24029 flatness
24030 Flatness threshold where lower values mean more deblocking
24031 (default: 39).
24032
24033 ha/hadeblock[|difference[|flatness]]
24034 Accurate horizontal deblocking filter
24035
24036 difference
24037 Difference factor where higher values mean more deblocking
24038 (default: 32).
24039
24040 flatness
24041 Flatness threshold where lower values mean more deblocking
24042 (default: 39).
24043
24044 va/vadeblock[|difference[|flatness]]
24045 Accurate vertical deblocking filter
24046
24047 difference
24048 Difference factor where higher values mean more deblocking
24049 (default: 32).
24050
24051 flatness
24052 Flatness threshold where lower values mean more deblocking
24053 (default: 39).
24054
24055 The horizontal and vertical deblocking filters share the difference and
24056 flatness values so you cannot set different horizontal and vertical
24057 thresholds.
24058
24059 h1/x1hdeblock
24060 Experimental horizontal deblocking filter
24061
24062 v1/x1vdeblock
24063 Experimental vertical deblocking filter
24064
24065 dr/dering
24066 Deringing filter
24067
24068 tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise
24069 reducer
24070 threshold1
24071 larger -> stronger filtering
24072
24073 threshold2
24074 larger -> stronger filtering
24075
24076 threshold3
24077 larger -> stronger filtering
24078
24079 al/autolevels[:f/fullyrange], automatic brightness / contrast
24080 correction
24081 f/fullyrange
24082 Stretch luminance to "0-255".
24083
24084 lb/linblenddeint
24085 Linear blend deinterlacing filter that deinterlaces the given block
24086 by filtering all lines with a "(1 2 1)" filter.
24087
24088 li/linipoldeint
24089 Linear interpolating deinterlacing filter that deinterlaces the
24090 given block by linearly interpolating every second line.
24091
24092 ci/cubicipoldeint
24093 Cubic interpolating deinterlacing filter deinterlaces the given
24094 block by cubically interpolating every second line.
24095
24096 md/mediandeint
24097 Median deinterlacing filter that deinterlaces the given block by
24098 applying a median filter to every second line.
24099
24100 fd/ffmpegdeint
24101 FFmpeg deinterlacing filter that deinterlaces the given block by
24102 filtering every second line with a "(-1 4 2 4 -1)" filter.
24103
24104 l5/lowpass5
24105 Vertically applied FIR lowpass deinterlacing filter that
24106 deinterlaces the given block by filtering all lines with a "(-1 2 6
24107 2 -1)" filter.
24108
24109 fq/forceQuant[|quantizer]
24110 Overrides the quantizer table from the input with the constant
24111 quantizer you specify.
24112
24113 quantizer
24114 Quantizer to use
24115
24116 de/default
24117 Default pp filter combination ("hb|a,vb|a,dr|a")
24118
24119 fa/fast
24120 Fast pp filter combination ("h1|a,v1|a,dr|a")
24121
24122 ac High quality pp filter combination ("ha|a|128|7,va|a,dr|a")
24123
24124 Examples
24125
24126 • Apply horizontal and vertical deblocking, deringing and automatic
24127 brightness/contrast:
24128
24129 pp=hb/vb/dr/al
24130
24131 • Apply default filters without brightness/contrast correction:
24132
24133 pp=de/-al
24134
24135 • Apply default filters and temporal denoiser:
24136
24137 pp=default/tmpnoise|1|2|3
24138
24139 • Apply deblocking on luminance only, and switch vertical deblocking
24140 on or off automatically depending on available CPU time:
24141
24142 pp=hb|y/vb|a
24143
24144 pp7
24145 Apply Postprocessing filter 7. It is variant of the spp filter, similar
24146 to spp = 6 with 7 point DCT, where only the center sample is used after
24147 IDCT.
24148
24149 The filter accepts the following options:
24150
24151 qp Force a constant quantization parameter. It accepts an integer in
24152 range 0 to 63. If not set, the filter will use the QP from the
24153 video stream (if available).
24154
24155 mode
24156 Set thresholding mode. Available modes are:
24157
24158 hard
24159 Set hard thresholding.
24160
24161 soft
24162 Set soft thresholding (better de-ringing effect, but likely
24163 blurrier).
24164
24165 medium
24166 Set medium thresholding (good results, default).
24167
24168 premultiply
24169 Apply alpha premultiply effect to input video stream using first plane
24170 of second stream as alpha.
24171
24172 Both streams must have same dimensions and same pixel format.
24173
24174 The filter accepts the following option:
24175
24176 planes
24177 Set which planes will be processed, unprocessed planes will be
24178 copied. By default value 0xf, all planes will be processed.
24179
24180 inplace
24181 Do not require 2nd input for processing, instead use alpha plane
24182 from input stream.
24183
24184 prewitt
24185 Apply prewitt operator to input video stream.
24186
24187 The filter accepts the following option:
24188
24189 planes
24190 Set which planes will be processed, unprocessed planes will be
24191 copied. By default value 0xf, all planes will be processed.
24192
24193 scale
24194 Set value which will be multiplied with filtered result.
24195
24196 delta
24197 Set value which will be added to filtered result.
24198
24199 Commands
24200
24201 This filter supports the all above options as commands.
24202
24203 pseudocolor
24204 Alter frame colors in video with pseudocolors.
24205
24206 This filter accepts the following options:
24207
24208 c0 set pixel first component expression
24209
24210 c1 set pixel second component expression
24211
24212 c2 set pixel third component expression
24213
24214 c3 set pixel fourth component expression, corresponds to the alpha
24215 component
24216
24217 index, i
24218 set component to use as base for altering colors
24219
24220 preset, p
24221 Pick one of built-in LUTs. By default is set to none.
24222
24223 Available LUTs:
24224
24225 magma
24226 inferno
24227 plasma
24228 viridis
24229 turbo
24230 cividis
24231 range1
24232 range2
24233 shadows
24234 highlights
24235 solar
24236 nominal
24237 preferred
24238 total
24239 opacity
24240 Set opacity of output colors. Allowed range is from 0 to 1.
24241 Default value is set to 1.
24242
24243 Each of the expression options specifies the expression to use for
24244 computing the lookup table for the corresponding pixel component
24245 values.
24246
24247 The expressions can contain the following constants and functions:
24248
24249 w
24250 h The input width and height.
24251
24252 val The input value for the pixel component.
24253
24254 ymin, umin, vmin, amin
24255 The minimum allowed component value.
24256
24257 ymax, umax, vmax, amax
24258 The maximum allowed component value.
24259
24260 All expressions default to "val".
24261
24262 Commands
24263
24264 This filter supports the all above options as commands.
24265
24266 Examples
24267
24268 • Change too high luma values to gradient:
24269
24270 pseudocolor="'if(between(val,ymax,amax),lerp(ymin,ymax,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(umax,umin,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(vmin,vmax,(val-ymax)/(amax-ymax)),-1):-1'"
24271
24272 psnr
24273 Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
24274 Ratio) between two input videos.
24275
24276 This filter takes in input two input videos, the first input is
24277 considered the "main" source and is passed unchanged to the output. The
24278 second input is used as a "reference" video for computing the PSNR.
24279
24280 Both video inputs must have the same resolution and pixel format for
24281 this filter to work correctly. Also it assumes that both inputs have
24282 the same number of frames, which are compared one by one.
24283
24284 The obtained average PSNR is printed through the logging system.
24285
24286 The filter stores the accumulated MSE (mean squared error) of each
24287 frame, and at the end of the processing it is averaged across all
24288 frames equally, and the following formula is applied to obtain the
24289 PSNR:
24290
24291 PSNR = 10*log10(MAX^2/MSE)
24292
24293 Where MAX is the average of the maximum values of each component of the
24294 image.
24295
24296 The description of the accepted parameters follows.
24297
24298 stats_file, f
24299 If specified the filter will use the named file to save the PSNR of
24300 each individual frame. When filename equals "-" the data is sent to
24301 standard output.
24302
24303 stats_version
24304 Specifies which version of the stats file format to use. Details of
24305 each format are written below. Default value is 1.
24306
24307 stats_add_max
24308 Determines whether the max value is output to the stats log.
24309 Default value is 0. Requires stats_version >= 2. If this is set
24310 and stats_version < 2, the filter will return an error.
24311
24312 This filter also supports the framesync options.
24313
24314 The file printed if stats_file is selected, contains a sequence of
24315 key/value pairs of the form key:value for each compared couple of
24316 frames.
24317
24318 If a stats_version greater than 1 is specified, a header line precedes
24319 the list of per-frame-pair stats, with key value pairs following the
24320 frame format with the following parameters:
24321
24322 psnr_log_version
24323 The version of the log file format. Will match stats_version.
24324
24325 fields
24326 A comma separated list of the per-frame-pair parameters included in
24327 the log.
24328
24329 A description of each shown per-frame-pair parameter follows:
24330
24331 n sequential number of the input frame, starting from 1
24332
24333 mse_avg
24334 Mean Square Error pixel-by-pixel average difference of the compared
24335 frames, averaged over all the image components.
24336
24337 mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a
24338 Mean Square Error pixel-by-pixel average difference of the compared
24339 frames for the component specified by the suffix.
24340
24341 psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a
24342 Peak Signal to Noise ratio of the compared frames for the component
24343 specified by the suffix.
24344
24345 max_avg, max_y, max_u, max_v
24346 Maximum allowed value for each channel, and average over all
24347 channels.
24348
24349 Examples
24350
24351 • For example:
24352
24353 movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
24354 [main][ref] psnr="stats_file=stats.log" [out]
24355
24356 On this example the input file being processed is compared with the
24357 reference file ref_movie.mpg. The PSNR of each individual frame is
24358 stored in stats.log.
24359
24360 • Another example with different containers:
24361
24362 ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]psnr" -f null -
24363
24364 pullup
24365 Pulldown reversal (inverse telecine) filter, capable of handling mixed
24366 hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps
24367 progressive content.
24368
24369 The pullup filter is designed to take advantage of future context in
24370 making its decisions. This filter is stateless in the sense that it
24371 does not lock onto a pattern to follow, but it instead looks forward to
24372 the following fields in order to identify matches and rebuild
24373 progressive frames.
24374
24375 To produce content with an even framerate, insert the fps filter after
24376 pullup, use "fps=24000/1001" if the input frame rate is 29.97fps,
24377 "fps=24" for 30fps and the (rare) telecined 25fps input.
24378
24379 The filter accepts the following options:
24380
24381 jl
24382 jr
24383 jt
24384 jb These options set the amount of "junk" to ignore at the left,
24385 right, top, and bottom of the image, respectively. Left and right
24386 are in units of 8 pixels, while top and bottom are in units of 2
24387 lines. The default is 8 pixels on each side.
24388
24389 sb Set the strict breaks. Setting this option to 1 will reduce the
24390 chances of filter generating an occasional mismatched frame, but it
24391 may also cause an excessive number of frames to be dropped during
24392 high motion sequences. Conversely, setting it to -1 will make
24393 filter match fields more easily. This may help processing of video
24394 where there is slight blurring between the fields, but may also
24395 cause there to be interlaced frames in the output. Default value
24396 is 0.
24397
24398 mp Set the metric plane to use. It accepts the following values:
24399
24400 l Use luma plane.
24401
24402 u Use chroma blue plane.
24403
24404 v Use chroma red plane.
24405
24406 This option may be set to use chroma plane instead of the default
24407 luma plane for doing filter's computations. This may improve
24408 accuracy on very clean source material, but more likely will
24409 decrease accuracy, especially if there is chroma noise (rainbow
24410 effect) or any grayscale video. The main purpose of setting mp to
24411 a chroma plane is to reduce CPU load and make pullup usable in
24412 realtime on slow machines.
24413
24414 For best results (without duplicated frames in the output file) it is
24415 necessary to change the output frame rate. For example, to inverse
24416 telecine NTSC input:
24417
24418 ffmpeg -i input -vf pullup -r 24000/1001 ...
24419
24420 qp
24421 Change video quantization parameters (QP).
24422
24423 The filter accepts the following option:
24424
24425 qp Set expression for quantization parameter.
24426
24427 The expression is evaluated through the eval API and can contain, among
24428 others, the following constants:
24429
24430 known
24431 1 if index is not 129, 0 otherwise.
24432
24433 qp Sequential index starting from -129 to 128.
24434
24435 Examples
24436
24437 • Some equation like:
24438
24439 qp=2+2*sin(PI*qp)
24440
24441 random
24442 Flush video frames from internal cache of frames into a random order.
24443 No frame is discarded. Inspired by frei0r nervous filter.
24444
24445 frames
24446 Set size in number of frames of internal cache, in range from 2 to
24447 512. Default is 30.
24448
24449 seed
24450 Set seed for random number generator, must be an integer included
24451 between 0 and "UINT32_MAX". If not specified, or if explicitly set
24452 to less than 0, the filter will try to use a good random seed on a
24453 best effort basis.
24454
24455 readeia608
24456 Read closed captioning (EIA-608) information from the top lines of a
24457 video frame.
24458
24459 This filter adds frame metadata for "lavfi.readeia608.X.cc" and
24460 "lavfi.readeia608.X.line", where "X" is the number of the identified
24461 line with EIA-608 data (starting from 0). A description of each
24462 metadata value follows:
24463
24464 lavfi.readeia608.X.cc
24465 The two bytes stored as EIA-608 data (printed in hexadecimal).
24466
24467 lavfi.readeia608.X.line
24468 The number of the line on which the EIA-608 data was identified and
24469 read.
24470
24471 This filter accepts the following options:
24472
24473 scan_min
24474 Set the line to start scanning for EIA-608 data. Default is 0.
24475
24476 scan_max
24477 Set the line to end scanning for EIA-608 data. Default is 29.
24478
24479 spw Set the ratio of width reserved for sync code detection. Default
24480 is 0.27. Allowed range is "[0.1 - 0.7]".
24481
24482 chp Enable checking the parity bit. In the event of a parity error, the
24483 filter will output 0x00 for that character. Default is false.
24484
24485 lp Lowpass lines prior to further processing. Default is enabled.
24486
24487 Commands
24488
24489 This filter supports the all above options as commands.
24490
24491 Examples
24492
24493 • Output a csv with presentation time and the first two lines of
24494 identified EIA-608 captioning data.
24495
24496 ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv
24497
24498 readvitc
24499 Read vertical interval timecode (VITC) information from the top lines
24500 of a video frame.
24501
24502 The filter adds frame metadata key "lavfi.readvitc.tc_str" with the
24503 timecode value, if a valid timecode has been detected. Further metadata
24504 key "lavfi.readvitc.found" is set to 0/1 depending on whether timecode
24505 data has been found or not.
24506
24507 This filter accepts the following options:
24508
24509 scan_max
24510 Set the maximum number of lines to scan for VITC data. If the value
24511 is set to "-1" the full video frame is scanned. Default is 45.
24512
24513 thr_b
24514 Set the luma threshold for black. Accepts float numbers in the
24515 range [0.0,1.0], default value is 0.2. The value must be equal or
24516 less than "thr_w".
24517
24518 thr_w
24519 Set the luma threshold for white. Accepts float numbers in the
24520 range [0.0,1.0], default value is 0.6. The value must be equal or
24521 greater than "thr_b".
24522
24523 Examples
24524
24525 • Detect and draw VITC data onto the video frame; if no valid VITC is
24526 detected, draw "--:--:--:--" as a placeholder:
24527
24528 ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--}:x=(w-tw)/2:y=400-ascent'
24529
24530 remap
24531 Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
24532
24533 Destination pixel at position (X, Y) will be picked from source (x, y)
24534 position where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are
24535 out of range, zero value for pixel will be used for destination pixel.
24536
24537 Xmap and Ymap input video streams must be of same dimensions. Output
24538 video stream will have Xmap/Ymap video stream dimensions. Xmap and
24539 Ymap input video streams are 16bit depth, single channel.
24540
24541 format
24542 Specify pixel format of output from this filter. Can be "color" or
24543 "gray". Default is "color".
24544
24545 fill
24546 Specify the color of the unmapped pixels. For the syntax of this
24547 option, check the "Color" section in the ffmpeg-utils manual.
24548 Default color is "black".
24549
24550 removegrain
24551 The removegrain filter is a spatial denoiser for progressive video.
24552
24553 m0 Set mode for the first plane.
24554
24555 m1 Set mode for the second plane.
24556
24557 m2 Set mode for the third plane.
24558
24559 m3 Set mode for the fourth plane.
24560
24561 Range of mode is from 0 to 24. Description of each mode follows:
24562
24563 0 Leave input plane unchanged. Default.
24564
24565 1 Clips the pixel with the minimum and maximum of the 8 neighbour
24566 pixels.
24567
24568 2 Clips the pixel with the second minimum and maximum of the 8
24569 neighbour pixels.
24570
24571 3 Clips the pixel with the third minimum and maximum of the 8
24572 neighbour pixels.
24573
24574 4 Clips the pixel with the fourth minimum and maximum of the 8
24575 neighbour pixels. This is equivalent to a median filter.
24576
24577 5 Line-sensitive clipping giving the minimal change.
24578
24579 6 Line-sensitive clipping, intermediate.
24580
24581 7 Line-sensitive clipping, intermediate.
24582
24583 8 Line-sensitive clipping, intermediate.
24584
24585 9 Line-sensitive clipping on a line where the neighbours pixels are
24586 the closest.
24587
24588 10 Replaces the target pixel with the closest neighbour.
24589
24590 11 [1 2 1] horizontal and vertical kernel blur.
24591
24592 12 Same as mode 11.
24593
24594 13 Bob mode, interpolates top field from the line where the neighbours
24595 pixels are the closest.
24596
24597 14 Bob mode, interpolates bottom field from the line where the
24598 neighbours pixels are the closest.
24599
24600 15 Bob mode, interpolates top field. Same as 13 but with a more
24601 complicated interpolation formula.
24602
24603 16 Bob mode, interpolates bottom field. Same as 14 but with a more
24604 complicated interpolation formula.
24605
24606 17 Clips the pixel with the minimum and maximum of respectively the
24607 maximum and minimum of each pair of opposite neighbour pixels.
24608
24609 18 Line-sensitive clipping using opposite neighbours whose greatest
24610 distance from the current pixel is minimal.
24611
24612 19 Replaces the pixel with the average of its 8 neighbours.
24613
24614 20 Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
24615
24616 21 Clips pixels using the averages of opposite neighbour.
24617
24618 22 Same as mode 21 but simpler and faster.
24619
24620 23 Small edge and halo removal, but reputed useless.
24621
24622 24 Similar as 23.
24623
24624 removelogo
24625 Suppress a TV station logo, using an image file to determine which
24626 pixels comprise the logo. It works by filling in the pixels that
24627 comprise the logo with neighboring pixels.
24628
24629 The filter accepts the following options:
24630
24631 filename, f
24632 Set the filter bitmap file, which can be any image format supported
24633 by libavformat. The width and height of the image file must match
24634 those of the video stream being processed.
24635
24636 Pixels in the provided bitmap image with a value of zero are not
24637 considered part of the logo, non-zero pixels are considered part of the
24638 logo. If you use white (255) for the logo and black (0) for the rest,
24639 you will be safe. For making the filter bitmap, it is recommended to
24640 take a screen capture of a black frame with the logo visible, and then
24641 using a threshold filter followed by the erode filter once or twice.
24642
24643 If needed, little splotches can be fixed manually. Remember that if
24644 logo pixels are not covered, the filter quality will be much reduced.
24645 Marking too many pixels as part of the logo does not hurt as much, but
24646 it will increase the amount of blurring needed to cover over the image
24647 and will destroy more information than necessary, and extra pixels will
24648 slow things down on a large logo.
24649
24650 repeatfields
24651 This filter uses the repeat_field flag from the Video ES headers and
24652 hard repeats fields based on its value.
24653
24654 reverse
24655 Reverse a video clip.
24656
24657 Warning: This filter requires memory to buffer the entire clip, so
24658 trimming is suggested.
24659
24660 Examples
24661
24662 • Take the first 5 seconds of a clip, and reverse it.
24663
24664 trim=end=5,reverse
24665
24666 rgbashift
24667 Shift R/G/B/A pixels horizontally and/or vertically.
24668
24669 The filter accepts the following options:
24670
24671 rh Set amount to shift red horizontally.
24672
24673 rv Set amount to shift red vertically.
24674
24675 gh Set amount to shift green horizontally.
24676
24677 gv Set amount to shift green vertically.
24678
24679 bh Set amount to shift blue horizontally.
24680
24681 bv Set amount to shift blue vertically.
24682
24683 ah Set amount to shift alpha horizontally.
24684
24685 av Set amount to shift alpha vertically.
24686
24687 edge
24688 Set edge mode, can be smear, default, or warp.
24689
24690 Commands
24691
24692 This filter supports the all above options as commands.
24693
24694 roberts
24695 Apply roberts cross operator to input video stream.
24696
24697 The filter accepts the following option:
24698
24699 planes
24700 Set which planes will be processed, unprocessed planes will be
24701 copied. By default value 0xf, all planes will be processed.
24702
24703 scale
24704 Set value which will be multiplied with filtered result.
24705
24706 delta
24707 Set value which will be added to filtered result.
24708
24709 Commands
24710
24711 This filter supports the all above options as commands.
24712
24713 rotate
24714 Rotate video by an arbitrary angle expressed in radians.
24715
24716 The filter accepts the following options:
24717
24718 A description of the optional parameters follows.
24719
24720 angle, a
24721 Set an expression for the angle by which to rotate the input video
24722 clockwise, expressed as a number of radians. A negative value will
24723 result in a counter-clockwise rotation. By default it is set to
24724 "0".
24725
24726 This expression is evaluated for each frame.
24727
24728 out_w, ow
24729 Set the output width expression, default value is "iw". This
24730 expression is evaluated just once during configuration.
24731
24732 out_h, oh
24733 Set the output height expression, default value is "ih". This
24734 expression is evaluated just once during configuration.
24735
24736 bilinear
24737 Enable bilinear interpolation if set to 1, a value of 0 disables
24738 it. Default value is 1.
24739
24740 fillcolor, c
24741 Set the color used to fill the output area not covered by the
24742 rotated image. For the general syntax of this option, check the
24743 "Color" section in the ffmpeg-utils manual. If the special value
24744 "none" is selected then no background is printed (useful for
24745 example if the background is never shown).
24746
24747 Default value is "black".
24748
24749 The expressions for the angle and the output size can contain the
24750 following constants and functions:
24751
24752 n sequential number of the input frame, starting from 0. It is always
24753 NAN before the first frame is filtered.
24754
24755 t time in seconds of the input frame, it is set to 0 when the filter
24756 is configured. It is always NAN before the first frame is filtered.
24757
24758 hsub
24759 vsub
24760 horizontal and vertical chroma subsample values. For example for
24761 the pixel format "yuv422p" hsub is 2 and vsub is 1.
24762
24763 in_w, iw
24764 in_h, ih
24765 the input video width and height
24766
24767 out_w, ow
24768 out_h, oh
24769 the output width and height, that is the size of the padded area as
24770 specified by the width and height expressions
24771
24772 rotw(a)
24773 roth(a)
24774 the minimal width/height required for completely containing the
24775 input video rotated by a radians.
24776
24777 These are only available when computing the out_w and out_h
24778 expressions.
24779
24780 Examples
24781
24782 • Rotate the input by PI/6 radians clockwise:
24783
24784 rotate=PI/6
24785
24786 • Rotate the input by PI/6 radians counter-clockwise:
24787
24788 rotate=-PI/6
24789
24790 • Rotate the input by 45 degrees clockwise:
24791
24792 rotate=45*PI/180
24793
24794 • Apply a constant rotation with period T, starting from an angle of
24795 PI/3:
24796
24797 rotate=PI/3+2*PI*t/T
24798
24799 • Make the input video rotation oscillating with a period of T
24800 seconds and an amplitude of A radians:
24801
24802 rotate=A*sin(2*PI/T*t)
24803
24804 • Rotate the video, output size is chosen so that the whole rotating
24805 input video is always completely contained in the output:
24806
24807 rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
24808
24809 • Rotate the video, reduce the output size so that no background is
24810 ever shown:
24811
24812 rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
24813
24814 Commands
24815
24816 The filter supports the following commands:
24817
24818 a, angle
24819 Set the angle expression. The command accepts the same syntax of
24820 the corresponding option.
24821
24822 If the specified expression is not valid, it is kept at its current
24823 value.
24824
24825 sab
24826 Apply Shape Adaptive Blur.
24827
24828 The filter accepts the following options:
24829
24830 luma_radius, lr
24831 Set luma blur filter strength, must be a value in range 0.1-4.0,
24832 default value is 1.0. A greater value will result in a more blurred
24833 image, and in slower processing.
24834
24835 luma_pre_filter_radius, lpfr
24836 Set luma pre-filter radius, must be a value in the 0.1-2.0 range,
24837 default value is 1.0.
24838
24839 luma_strength, ls
24840 Set luma maximum difference between pixels to still be considered,
24841 must be a value in the 0.1-100.0 range, default value is 1.0.
24842
24843 chroma_radius, cr
24844 Set chroma blur filter strength, must be a value in range -0.9-4.0.
24845 A greater value will result in a more blurred image, and in slower
24846 processing.
24847
24848 chroma_pre_filter_radius, cpfr
24849 Set chroma pre-filter radius, must be a value in the -0.9-2.0
24850 range.
24851
24852 chroma_strength, cs
24853 Set chroma maximum difference between pixels to still be
24854 considered, must be a value in the -0.9-100.0 range.
24855
24856 Each chroma option value, if not explicitly specified, is set to the
24857 corresponding luma option value.
24858
24859 scale
24860 Scale (resize) the input video, using the libswscale library.
24861
24862 The scale filter forces the output display aspect ratio to be the same
24863 of the input, by changing the output sample aspect ratio.
24864
24865 If the input image format is different from the format requested by the
24866 next filter, the scale filter will convert the input to the requested
24867 format.
24868
24869 Options
24870
24871 The filter accepts the following options, or any of the options
24872 supported by the libswscale scaler.
24873
24874 See the ffmpeg-scaler manual for the complete list of scaler options.
24875
24876 width, w
24877 height, h
24878 Set the output video dimension expression. Default value is the
24879 input dimension.
24880
24881 If the width or w value is 0, the input width is used for the
24882 output. If the height or h value is 0, the input height is used for
24883 the output.
24884
24885 If one and only one of the values is -n with n >= 1, the scale
24886 filter will use a value that maintains the aspect ratio of the
24887 input image, calculated from the other specified dimension. After
24888 that it will, however, make sure that the calculated dimension is
24889 divisible by n and adjust the value if necessary.
24890
24891 If both values are -n with n >= 1, the behavior will be identical
24892 to both values being set to 0 as previously detailed.
24893
24894 See below for the list of accepted constants for use in the
24895 dimension expression.
24896
24897 eval
24898 Specify when to evaluate width and height expression. It accepts
24899 the following values:
24900
24901 init
24902 Only evaluate expressions once during the filter initialization
24903 or when a command is processed.
24904
24905 frame
24906 Evaluate expressions for each incoming frame.
24907
24908 Default value is init.
24909
24910 interl
24911 Set the interlacing mode. It accepts the following values:
24912
24913 1 Force interlaced aware scaling.
24914
24915 0 Do not apply interlaced scaling.
24916
24917 -1 Select interlaced aware scaling depending on whether the source
24918 frames are flagged as interlaced or not.
24919
24920 Default value is 0.
24921
24922 flags
24923 Set libswscale scaling flags. See the ffmpeg-scaler manual for the
24924 complete list of values. If not explicitly specified the filter
24925 applies the default flags.
24926
24927 param0, param1
24928 Set libswscale input parameters for scaling algorithms that need
24929 them. See the ffmpeg-scaler manual for the complete documentation.
24930 If not explicitly specified the filter applies empty parameters.
24931
24932 size, s
24933 Set the video size. For the syntax of this option, check the "Video
24934 size" section in the ffmpeg-utils manual.
24935
24936 in_color_matrix
24937 out_color_matrix
24938 Set in/output YCbCr color space type.
24939
24940 This allows the autodetected value to be overridden as well as
24941 allows forcing a specific value used for the output and encoder.
24942
24943 If not specified, the color space type depends on the pixel format.
24944
24945 Possible values:
24946
24947 auto
24948 Choose automatically.
24949
24950 bt709
24951 Format conforming to International Telecommunication Union
24952 (ITU) Recommendation BT.709.
24953
24954 fcc Set color space conforming to the United States Federal
24955 Communications Commission (FCC) Code of Federal Regulations
24956 (CFR) Title 47 (2003) 73.682 (a).
24957
24958 bt601
24959 bt470
24960 smpte170m
24961 Set color space conforming to:
24962
24963 • ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
24964
24965 • ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
24966
24967 • Society of Motion Picture and Television Engineers (SMPTE)
24968 ST 170:2004
24969
24970 smpte240m
24971 Set color space conforming to SMPTE ST 240:1999.
24972
24973 bt2020
24974 Set color space conforming to ITU-R BT.2020 non-constant
24975 luminance system.
24976
24977 in_range
24978 out_range
24979 Set in/output YCbCr sample range.
24980
24981 This allows the autodetected value to be overridden as well as
24982 allows forcing a specific value used for the output and encoder. If
24983 not specified, the range depends on the pixel format. Possible
24984 values:
24985
24986 auto/unknown
24987 Choose automatically.
24988
24989 jpeg/full/pc
24990 Set full range (0-255 in case of 8-bit luma).
24991
24992 mpeg/limited/tv
24993 Set "MPEG" range (16-235 in case of 8-bit luma).
24994
24995 force_original_aspect_ratio
24996 Enable decreasing or increasing output video width or height if
24997 necessary to keep the original aspect ratio. Possible values:
24998
24999 disable
25000 Scale the video as specified and disable this feature.
25001
25002 decrease
25003 The output video dimensions will automatically be decreased if
25004 needed.
25005
25006 increase
25007 The output video dimensions will automatically be increased if
25008 needed.
25009
25010 One useful instance of this option is that when you know a specific
25011 device's maximum allowed resolution, you can use this to limit the
25012 output video to that, while retaining the aspect ratio. For
25013 example, device A allows 1280x720 playback, and your video is
25014 1920x800. Using this option (set it to decrease) and specifying
25015 1280x720 to the command line makes the output 1280x533.
25016
25017 Please note that this is a different thing than specifying -1 for w
25018 or h, you still need to specify the output resolution for this
25019 option to work.
25020
25021 force_divisible_by
25022 Ensures that both the output dimensions, width and height, are
25023 divisible by the given integer when used together with
25024 force_original_aspect_ratio. This works similar to using "-n" in
25025 the w and h options.
25026
25027 This option respects the value set for force_original_aspect_ratio,
25028 increasing or decreasing the resolution accordingly. The video's
25029 aspect ratio may be slightly modified.
25030
25031 This option can be handy if you need to have a video fit within or
25032 exceed a defined resolution using force_original_aspect_ratio but
25033 also have encoder restrictions on width or height divisibility.
25034
25035 The values of the w and h options are expressions containing the
25036 following constants:
25037
25038 in_w
25039 in_h
25040 The input width and height
25041
25042 iw
25043 ih These are the same as in_w and in_h.
25044
25045 out_w
25046 out_h
25047 The output (scaled) width and height
25048
25049 ow
25050 oh These are the same as out_w and out_h
25051
25052 a The same as iw / ih
25053
25054 sar input sample aspect ratio
25055
25056 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
25057
25058 hsub
25059 vsub
25060 horizontal and vertical input chroma subsample values. For example
25061 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
25062
25063 ohsub
25064 ovsub
25065 horizontal and vertical output chroma subsample values. For example
25066 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
25067
25068 n The (sequential) number of the input frame, starting from 0. Only
25069 available with "eval=frame".
25070
25071 t The presentation timestamp of the input frame, expressed as a
25072 number of seconds. Only available with "eval=frame".
25073
25074 pos The position (byte offset) of the frame in the input stream, or NaN
25075 if this information is unavailable and/or meaningless (for example
25076 in case of synthetic video). Only available with "eval=frame".
25077
25078 Examples
25079
25080 • Scale the input video to a size of 200x100
25081
25082 scale=w=200:h=100
25083
25084 This is equivalent to:
25085
25086 scale=200:100
25087
25088 or:
25089
25090 scale=200x100
25091
25092 • Specify a size abbreviation for the output size:
25093
25094 scale=qcif
25095
25096 which can also be written as:
25097
25098 scale=size=qcif
25099
25100 • Scale the input to 2x:
25101
25102 scale=w=2*iw:h=2*ih
25103
25104 • The above is the same as:
25105
25106 scale=2*in_w:2*in_h
25107
25108 • Scale the input to 2x with forced interlaced scaling:
25109
25110 scale=2*iw:2*ih:interl=1
25111
25112 • Scale the input to half size:
25113
25114 scale=w=iw/2:h=ih/2
25115
25116 • Increase the width, and set the height to the same size:
25117
25118 scale=3/2*iw:ow
25119
25120 • Seek Greek harmony:
25121
25122 scale=iw:1/PHI*iw
25123 scale=ih*PHI:ih
25124
25125 • Increase the height, and set the width to 3/2 of the height:
25126
25127 scale=w=3/2*oh:h=3/5*ih
25128
25129 • Increase the size, making the size a multiple of the chroma
25130 subsample values:
25131
25132 scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
25133
25134 • Increase the width to a maximum of 500 pixels, keeping the same
25135 aspect ratio as the input:
25136
25137 scale=w='min(500\, iw*3/2):h=-1'
25138
25139 • Make pixels square by combining scale and setsar:
25140
25141 scale='trunc(ih*dar):ih',setsar=1/1
25142
25143 • Make pixels square by combining scale and setsar, making sure the
25144 resulting resolution is even (required by some codecs):
25145
25146 scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
25147
25148 Commands
25149
25150 This filter supports the following commands:
25151
25152 width, w
25153 height, h
25154 Set the output video dimension expression. The command accepts the
25155 same syntax of the corresponding option.
25156
25157 If the specified expression is not valid, it is kept at its current
25158 value.
25159
25160 scale_cuda
25161 Scale (resize) and convert (pixel format) the input video, using
25162 accelerated CUDA kernels. Setting the output width and height works in
25163 the same way as for the scale filter.
25164
25165 The filter accepts the following options:
25166
25167 w
25168 h Set the output video dimension expression. Default value is the
25169 input dimension.
25170
25171 Allows for the same expressions as the scale filter.
25172
25173 interp_algo
25174 Sets the algorithm used for scaling:
25175
25176 nearest
25177 Nearest neighbour
25178
25179 Used by default if input parameters match the desired output.
25180
25181 bilinear
25182 Bilinear
25183
25184 bicubic
25185 Bicubic
25186
25187 This is the default.
25188
25189 lanczos
25190 Lanczos
25191
25192 format
25193 Controls the output pixel format. By default, or if none is
25194 specified, the input pixel format is used.
25195
25196 The filter does not support converting between YUV and RGB pixel
25197 formats.
25198
25199 passthrough
25200 If set to 0, every frame is processed, even if no conversion is
25201 neccesary. This mode can be useful to use the filter as a buffer
25202 for a downstream frame-consumer that exhausts the limited decoder
25203 frame pool.
25204
25205 If set to 1, frames are passed through as-is if they match the
25206 desired output parameters. This is the default behaviour.
25207
25208 param
25209 Algorithm-Specific parameter.
25210
25211 Affects the curves of the bicubic algorithm.
25212
25213 force_original_aspect_ratio
25214 force_divisible_by
25215 Work the same as the identical scale filter options.
25216
25217 Examples
25218
25219 • Scale input to 720p, keeping aspect ratio and ensuring the output
25220 is yuv420p.
25221
25222 scale_cuda=-2:720:format=yuv420p
25223
25224 • Upscale to 4K using nearest neighbour algorithm.
25225
25226 scale_cuda=4096:2160:interp_algo=nearest
25227
25228 • Don't do any conversion or scaling, but copy all input frames into
25229 newly allocated ones. This can be useful to deal with a filter and
25230 encode chain that otherwise exhausts the decoders frame pool.
25231
25232 scale_cuda=passthrough=0
25233
25234 scale_npp
25235 Use the NVIDIA Performance Primitives (libnpp) to perform scaling
25236 and/or pixel format conversion on CUDA video frames. Setting the output
25237 width and height works in the same way as for the scale filter.
25238
25239 The following additional options are accepted:
25240
25241 format
25242 The pixel format of the output CUDA frames. If set to the string
25243 "same" (the default), the input format will be kept. Note that
25244 automatic format negotiation and conversion is not yet supported
25245 for hardware frames
25246
25247 interp_algo
25248 The interpolation algorithm used for resizing. One of the
25249 following:
25250
25251 nn Nearest neighbour.
25252
25253 linear
25254 cubic
25255 cubic2p_bspline
25256 2-parameter cubic (B=1, C=0)
25257
25258 cubic2p_catmullrom
25259 2-parameter cubic (B=0, C=1/2)
25260
25261 cubic2p_b05c03
25262 2-parameter cubic (B=1/2, C=3/10)
25263
25264 super
25265 Supersampling
25266
25267 lanczos
25268 force_original_aspect_ratio
25269 Enable decreasing or increasing output video width or height if
25270 necessary to keep the original aspect ratio. Possible values:
25271
25272 disable
25273 Scale the video as specified and disable this feature.
25274
25275 decrease
25276 The output video dimensions will automatically be decreased if
25277 needed.
25278
25279 increase
25280 The output video dimensions will automatically be increased if
25281 needed.
25282
25283 One useful instance of this option is that when you know a specific
25284 device's maximum allowed resolution, you can use this to limit the
25285 output video to that, while retaining the aspect ratio. For
25286 example, device A allows 1280x720 playback, and your video is
25287 1920x800. Using this option (set it to decrease) and specifying
25288 1280x720 to the command line makes the output 1280x533.
25289
25290 Please note that this is a different thing than specifying -1 for w
25291 or h, you still need to specify the output resolution for this
25292 option to work.
25293
25294 force_divisible_by
25295 Ensures that both the output dimensions, width and height, are
25296 divisible by the given integer when used together with
25297 force_original_aspect_ratio. This works similar to using "-n" in
25298 the w and h options.
25299
25300 This option respects the value set for force_original_aspect_ratio,
25301 increasing or decreasing the resolution accordingly. The video's
25302 aspect ratio may be slightly modified.
25303
25304 This option can be handy if you need to have a video fit within or
25305 exceed a defined resolution using force_original_aspect_ratio but
25306 also have encoder restrictions on width or height divisibility.
25307
25308 eval
25309 Specify when to evaluate width and height expression. It accepts
25310 the following values:
25311
25312 init
25313 Only evaluate expressions once during the filter initialization
25314 or when a command is processed.
25315
25316 frame
25317 Evaluate expressions for each incoming frame.
25318
25319 The values of the w and h options are expressions containing the
25320 following constants:
25321
25322 in_w
25323 in_h
25324 The input width and height
25325
25326 iw
25327 ih These are the same as in_w and in_h.
25328
25329 out_w
25330 out_h
25331 The output (scaled) width and height
25332
25333 ow
25334 oh These are the same as out_w and out_h
25335
25336 a The same as iw / ih
25337
25338 sar input sample aspect ratio
25339
25340 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
25341
25342 n The (sequential) number of the input frame, starting from 0. Only
25343 available with "eval=frame".
25344
25345 t The presentation timestamp of the input frame, expressed as a
25346 number of seconds. Only available with "eval=frame".
25347
25348 pos The position (byte offset) of the frame in the input stream, or NaN
25349 if this information is unavailable and/or meaningless (for example
25350 in case of synthetic video). Only available with "eval=frame".
25351
25352 scale2ref
25353 Scale (resize) the input video, based on a reference video.
25354
25355 See the scale filter for available options, scale2ref supports the same
25356 but uses the reference video instead of the main input as basis.
25357 scale2ref also supports the following additional constants for the w
25358 and h options:
25359
25360 main_w
25361 main_h
25362 The main input video's width and height
25363
25364 main_a
25365 The same as main_w / main_h
25366
25367 main_sar
25368 The main input video's sample aspect ratio
25369
25370 main_dar, mdar
25371 The main input video's display aspect ratio. Calculated from
25372 "(main_w / main_h) * main_sar".
25373
25374 main_hsub
25375 main_vsub
25376 The main input video's horizontal and vertical chroma subsample
25377 values. For example for the pixel format "yuv422p" hsub is 2 and
25378 vsub is 1.
25379
25380 main_n
25381 The (sequential) number of the main input frame, starting from 0.
25382 Only available with "eval=frame".
25383
25384 main_t
25385 The presentation timestamp of the main input frame, expressed as a
25386 number of seconds. Only available with "eval=frame".
25387
25388 main_pos
25389 The position (byte offset) of the frame in the main input stream,
25390 or NaN if this information is unavailable and/or meaningless (for
25391 example in case of synthetic video). Only available with
25392 "eval=frame".
25393
25394 Examples
25395
25396 • Scale a subtitle stream (b) to match the main video (a) in size
25397 before overlaying
25398
25399 'scale2ref[b][a];[a][b]overlay'
25400
25401 • Scale a logo to 1/10th the height of a video, while preserving its
25402 display aspect ratio.
25403
25404 [logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
25405
25406 Commands
25407
25408 This filter supports the following commands:
25409
25410 width, w
25411 height, h
25412 Set the output video dimension expression. The command accepts the
25413 same syntax of the corresponding option.
25414
25415 If the specified expression is not valid, it is kept at its current
25416 value.
25417
25418 scale2ref_npp
25419 Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the
25420 input video, based on a reference video.
25421
25422 See the scale_npp filter for available options, scale2ref_npp supports
25423 the same but uses the reference video instead of the main input as
25424 basis. scale2ref_npp also supports the following additional constants
25425 for the w and h options:
25426
25427 main_w
25428 main_h
25429 The main input video's width and height
25430
25431 main_a
25432 The same as main_w / main_h
25433
25434 main_sar
25435 The main input video's sample aspect ratio
25436
25437 main_dar, mdar
25438 The main input video's display aspect ratio. Calculated from
25439 "(main_w / main_h) * main_sar".
25440
25441 main_n
25442 The (sequential) number of the main input frame, starting from 0.
25443 Only available with "eval=frame".
25444
25445 main_t
25446 The presentation timestamp of the main input frame, expressed as a
25447 number of seconds. Only available with "eval=frame".
25448
25449 main_pos
25450 The position (byte offset) of the frame in the main input stream,
25451 or NaN if this information is unavailable and/or meaningless (for
25452 example in case of synthetic video). Only available with
25453 "eval=frame".
25454
25455 Examples
25456
25457 • Scale a subtitle stream (b) to match the main video (a) in size
25458 before overlaying
25459
25460 'scale2ref_npp[b][a];[a][b]overlay_cuda'
25461
25462 • Scale a logo to 1/10th the height of a video, while preserving its
25463 display aspect ratio.
25464
25465 [logo-in][video-in]scale2ref_npp=w=oh*mdar:h=ih/10[logo-out][video-out]
25466
25467 scharr
25468 Apply scharr operator to input video stream.
25469
25470 The filter accepts the following option:
25471
25472 planes
25473 Set which planes will be processed, unprocessed planes will be
25474 copied. By default value 0xf, all planes will be processed.
25475
25476 scale
25477 Set value which will be multiplied with filtered result.
25478
25479 delta
25480 Set value which will be added to filtered result.
25481
25482 Commands
25483
25484 This filter supports the all above options as commands.
25485
25486 scroll
25487 Scroll input video horizontally and/or vertically by constant speed.
25488
25489 The filter accepts the following options:
25490
25491 horizontal, h
25492 Set the horizontal scrolling speed. Default is 0. Allowed range is
25493 from -1 to 1. Negative values changes scrolling direction.
25494
25495 vertical, v
25496 Set the vertical scrolling speed. Default is 0. Allowed range is
25497 from -1 to 1. Negative values changes scrolling direction.
25498
25499 hpos
25500 Set the initial horizontal scrolling position. Default is 0.
25501 Allowed range is from 0 to 1.
25502
25503 vpos
25504 Set the initial vertical scrolling position. Default is 0. Allowed
25505 range is from 0 to 1.
25506
25507 Commands
25508
25509 This filter supports the following commands:
25510
25511 horizontal, h
25512 Set the horizontal scrolling speed.
25513
25514 vertical, v
25515 Set the vertical scrolling speed.
25516
25517 scdet
25518 Detect video scene change.
25519
25520 This filter sets frame metadata with mafd between frame, the scene
25521 score, and forward the frame to the next filter, so they can use these
25522 metadata to detect scene change or others.
25523
25524 In addition, this filter logs a message and sets frame metadata when it
25525 detects a scene change by threshold.
25526
25527 "lavfi.scd.mafd" metadata keys are set with mafd for every frame.
25528
25529 "lavfi.scd.score" metadata keys are set with scene change score for
25530 every frame to detect scene change.
25531
25532 "lavfi.scd.time" metadata keys are set with current filtered frame time
25533 which detect scene change with threshold.
25534
25535 The filter accepts the following options:
25536
25537 threshold, t
25538 Set the scene change detection threshold as a percentage of maximum
25539 change. Good values are in the "[8.0, 14.0]" range. The range for
25540 threshold is "[0., 100.]".
25541
25542 Default value is 10..
25543
25544 sc_pass, s
25545 Set the flag to pass scene change frames to the next filter.
25546 Default value is 0 You can enable it if you want to get snapshot of
25547 scene change frames only.
25548
25549 selectivecolor
25550 Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of
25551 colors (such as "reds", "yellows", "greens", "cyans", ...). The
25552 adjustment range is defined by the "purity" of the color (that is, how
25553 saturated it already is).
25554
25555 This filter is similar to the Adobe Photoshop Selective Color tool.
25556
25557 The filter accepts the following options:
25558
25559 correction_method
25560 Select color correction method.
25561
25562 Available values are:
25563
25564 absolute
25565 Specified adjustments are applied "as-is" (added/subtracted to
25566 original pixel component value).
25567
25568 relative
25569 Specified adjustments are relative to the original component
25570 value.
25571
25572 Default is "absolute".
25573
25574 reds
25575 Adjustments for red pixels (pixels where the red component is the
25576 maximum)
25577
25578 yellows
25579 Adjustments for yellow pixels (pixels where the blue component is
25580 the minimum)
25581
25582 greens
25583 Adjustments for green pixels (pixels where the green component is
25584 the maximum)
25585
25586 cyans
25587 Adjustments for cyan pixels (pixels where the red component is the
25588 minimum)
25589
25590 blues
25591 Adjustments for blue pixels (pixels where the blue component is the
25592 maximum)
25593
25594 magentas
25595 Adjustments for magenta pixels (pixels where the green component is
25596 the minimum)
25597
25598 whites
25599 Adjustments for white pixels (pixels where all components are
25600 greater than 128)
25601
25602 neutrals
25603 Adjustments for all pixels except pure black and pure white
25604
25605 blacks
25606 Adjustments for black pixels (pixels where all components are
25607 lesser than 128)
25608
25609 psfile
25610 Specify a Photoshop selective color file (".asv") to import the
25611 settings from.
25612
25613 All the adjustment settings (reds, yellows, ...) accept up to 4 space
25614 separated floating point adjustment values in the [-1,1] range,
25615 respectively to adjust the amount of cyan, magenta, yellow and black
25616 for the pixels of its range.
25617
25618 Examples
25619
25620 • Increase cyan by 50% and reduce yellow by 33% in every green areas,
25621 and increase magenta by 27% in blue areas:
25622
25623 selectivecolor=greens=.5 0 -.33 0:blues=0 .27
25624
25625 • Use a Photoshop selective color preset:
25626
25627 selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
25628
25629 separatefields
25630 The "separatefields" takes a frame-based video input and splits each
25631 frame into its components fields, producing a new half height clip with
25632 twice the frame rate and twice the frame count.
25633
25634 This filter use field-dominance information in frame to decide which of
25635 each pair of fields to place first in the output. If it gets it wrong
25636 use setfield filter before "separatefields" filter.
25637
25638 setdar, setsar
25639 The "setdar" filter sets the Display Aspect Ratio for the filter output
25640 video.
25641
25642 This is done by changing the specified Sample (aka Pixel) Aspect Ratio,
25643 according to the following equation:
25644
25645 <DAR> = <HORIZONTAL_RESOLUTION> / <VERTICAL_RESOLUTION> * <SAR>
25646
25647 Keep in mind that the "setdar" filter does not modify the pixel
25648 dimensions of the video frame. Also, the display aspect ratio set by
25649 this filter may be changed by later filters in the filterchain, e.g. in
25650 case of scaling or if another "setdar" or a "setsar" filter is applied.
25651
25652 The "setsar" filter sets the Sample (aka Pixel) Aspect Ratio for the
25653 filter output video.
25654
25655 Note that as a consequence of the application of this filter, the
25656 output display aspect ratio will change according to the equation
25657 above.
25658
25659 Keep in mind that the sample aspect ratio set by the "setsar" filter
25660 may be changed by later filters in the filterchain, e.g. if another
25661 "setsar" or a "setdar" filter is applied.
25662
25663 It accepts the following parameters:
25664
25665 r, ratio, dar ("setdar" only), sar ("setsar" only)
25666 Set the aspect ratio used by the filter.
25667
25668 The parameter can be a floating point number string, an expression,
25669 or a string of the form num:den, where num and den are the
25670 numerator and denominator of the aspect ratio. If the parameter is
25671 not specified, it is assumed the value "0". In case the form
25672 "num:den" is used, the ":" character should be escaped.
25673
25674 max Set the maximum integer value to use for expressing numerator and
25675 denominator when reducing the expressed aspect ratio to a rational.
25676 Default value is 100.
25677
25678 The parameter sar is an expression containing the following constants:
25679
25680 E, PI, PHI
25681 These are approximated values for the mathematical constants e
25682 (Euler's number), pi (Greek pi), and phi (the golden ratio).
25683
25684 w, h
25685 The input width and height.
25686
25687 a These are the same as w / h.
25688
25689 sar The input sample aspect ratio.
25690
25691 dar The input display aspect ratio. It is the same as (w / h) * sar.
25692
25693 hsub, vsub
25694 Horizontal and vertical chroma subsample values. For example, for
25695 the pixel format "yuv422p" hsub is 2 and vsub is 1.
25696
25697 Examples
25698
25699 • To change the display aspect ratio to 16:9, specify one of the
25700 following:
25701
25702 setdar=dar=1.77777
25703 setdar=dar=16/9
25704
25705 • To change the sample aspect ratio to 10:11, specify:
25706
25707 setsar=sar=10/11
25708
25709 • To set a display aspect ratio of 16:9, and specify a maximum
25710 integer value of 1000 in the aspect ratio reduction, use the
25711 command:
25712
25713 setdar=ratio=16/9:max=1000
25714
25715 setfield
25716 Force field for the output video frame.
25717
25718 The "setfield" filter marks the interlace type field for the output
25719 frames. It does not change the input frame, but only sets the
25720 corresponding property, which affects how the frame is treated by
25721 following filters (e.g. "fieldorder" or "yadif").
25722
25723 The filter accepts the following options:
25724
25725 mode
25726 Available values are:
25727
25728 auto
25729 Keep the same field property.
25730
25731 bff Mark the frame as bottom-field-first.
25732
25733 tff Mark the frame as top-field-first.
25734
25735 prog
25736 Mark the frame as progressive.
25737
25738 setparams
25739 Force frame parameter for the output video frame.
25740
25741 The "setparams" filter marks interlace and color range for the output
25742 frames. It does not change the input frame, but only sets the
25743 corresponding property, which affects how the frame is treated by
25744 filters/encoders.
25745
25746 field_mode
25747 Available values are:
25748
25749 auto
25750 Keep the same field property (default).
25751
25752 bff Mark the frame as bottom-field-first.
25753
25754 tff Mark the frame as top-field-first.
25755
25756 prog
25757 Mark the frame as progressive.
25758
25759 range
25760 Available values are:
25761
25762 auto
25763 Keep the same color range property (default).
25764
25765 unspecified, unknown
25766 Mark the frame as unspecified color range.
25767
25768 limited, tv, mpeg
25769 Mark the frame as limited range.
25770
25771 full, pc, jpeg
25772 Mark the frame as full range.
25773
25774 color_primaries
25775 Set the color primaries. Available values are:
25776
25777 auto
25778 Keep the same color primaries property (default).
25779
25780 bt709
25781 unknown
25782 bt470m
25783 bt470bg
25784 smpte170m
25785 smpte240m
25786 film
25787 bt2020
25788 smpte428
25789 smpte431
25790 smpte432
25791 jedec-p22
25792 color_trc
25793 Set the color transfer. Available values are:
25794
25795 auto
25796 Keep the same color trc property (default).
25797
25798 bt709
25799 unknown
25800 bt470m
25801 bt470bg
25802 smpte170m
25803 smpte240m
25804 linear
25805 log100
25806 log316
25807 iec61966-2-4
25808 bt1361e
25809 iec61966-2-1
25810 bt2020-10
25811 bt2020-12
25812 smpte2084
25813 smpte428
25814 arib-std-b67
25815 colorspace
25816 Set the colorspace. Available values are:
25817
25818 auto
25819 Keep the same colorspace property (default).
25820
25821 gbr
25822 bt709
25823 unknown
25824 fcc
25825 bt470bg
25826 smpte170m
25827 smpte240m
25828 ycgco
25829 bt2020nc
25830 bt2020c
25831 smpte2085
25832 chroma-derived-nc
25833 chroma-derived-c
25834 ictcp
25835
25836 sharpen_npp
25837 Use the NVIDIA Performance Primitives (libnpp) to perform image
25838 sharpening with border control.
25839
25840 The following additional options are accepted:
25841
25842 border_type
25843 Type of sampling to be used ad frame borders. One of the following:
25844
25845 replicate
25846 Replicate pixel values.
25847
25848 shear
25849 Apply shear transform to input video.
25850
25851 This filter supports the following options:
25852
25853 shx Shear factor in X-direction. Default value is 0. Allowed range is
25854 from -2 to 2.
25855
25856 shy Shear factor in Y-direction. Default value is 0. Allowed range is
25857 from -2 to 2.
25858
25859 fillcolor, c
25860 Set the color used to fill the output area not covered by the
25861 transformed video. For the general syntax of this option, check the
25862 "Color" section in the ffmpeg-utils manual. If the special value
25863 "none" is selected then no background is printed (useful for
25864 example if the background is never shown).
25865
25866 Default value is "black".
25867
25868 interp
25869 Set interpolation type. Can be "bilinear" or "nearest". Default is
25870 "bilinear".
25871
25872 Commands
25873
25874 This filter supports the all above options as commands.
25875
25876 showinfo
25877 Show a line containing various information for each input video frame.
25878 The input video is not modified.
25879
25880 This filter supports the following options:
25881
25882 checksum
25883 Calculate checksums of each plane. By default enabled.
25884
25885 The shown line contains a sequence of key/value pairs of the form
25886 key:value.
25887
25888 The following values are shown in the output:
25889
25890 n The (sequential) number of the input frame, starting from 0.
25891
25892 pts The Presentation TimeStamp of the input frame, expressed as a
25893 number of time base units. The time base unit depends on the filter
25894 input pad.
25895
25896 pts_time
25897 The Presentation TimeStamp of the input frame, expressed as a
25898 number of seconds.
25899
25900 pos The position of the frame in the input stream, or -1 if this
25901 information is unavailable and/or meaningless (for example in case
25902 of synthetic video).
25903
25904 fmt The pixel format name.
25905
25906 sar The sample aspect ratio of the input frame, expressed in the form
25907 num/den.
25908
25909 s The size of the input frame. For the syntax of this option, check
25910 the "Video size" section in the ffmpeg-utils manual.
25911
25912 i The type of interlaced mode ("P" for "progressive", "T" for top
25913 field first, "B" for bottom field first).
25914
25915 iskey
25916 This is 1 if the frame is a key frame, 0 otherwise.
25917
25918 type
25919 The picture type of the input frame ("I" for an I-frame, "P" for a
25920 P-frame, "B" for a B-frame, or "?" for an unknown type). Also
25921 refer to the documentation of the "AVPictureType" enum and of the
25922 "av_get_picture_type_char" function defined in libavutil/avutil.h.
25923
25924 checksum
25925 The Adler-32 checksum (printed in hexadecimal) of all the planes of
25926 the input frame.
25927
25928 plane_checksum
25929 The Adler-32 checksum (printed in hexadecimal) of each plane of the
25930 input frame, expressed in the form "[c0 c1 c2 c3]".
25931
25932 mean
25933 The mean value of pixels in each plane of the input frame,
25934 expressed in the form "[mean0 mean1 mean2 mean3]".
25935
25936 stdev
25937 The standard deviation of pixel values in each plane of the input
25938 frame, expressed in the form "[stdev0 stdev1 stdev2 stdev3]".
25939
25940 showpalette
25941 Displays the 256 colors palette of each frame. This filter is only
25942 relevant for pal8 pixel format frames.
25943
25944 It accepts the following option:
25945
25946 s Set the size of the box used to represent one palette color entry.
25947 Default is 30 (for a "30x30" pixel box).
25948
25949 shuffleframes
25950 Reorder and/or duplicate and/or drop video frames.
25951
25952 It accepts the following parameters:
25953
25954 mapping
25955 Set the destination indexes of input frames. This is space or '|'
25956 separated list of indexes that maps input frames to output frames.
25957 Number of indexes also sets maximal value that each index may have.
25958 '-1' index have special meaning and that is to drop frame.
25959
25960 The first frame has the index 0. The default is to keep the input
25961 unchanged.
25962
25963 Examples
25964
25965 • Swap second and third frame of every three frames of the input:
25966
25967 ffmpeg -i INPUT -vf "shuffleframes=0 2 1" OUTPUT
25968
25969 • Swap 10th and 1st frame of every ten frames of the input:
25970
25971 ffmpeg -i INPUT -vf "shuffleframes=9 1 2 3 4 5 6 7 8 0" OUTPUT
25972
25973 shufflepixels
25974 Reorder pixels in video frames.
25975
25976 This filter accepts the following options:
25977
25978 direction, d
25979 Set shuffle direction. Can be forward or inverse direction.
25980 Default direction is forward.
25981
25982 mode, m
25983 Set shuffle mode. Can be horizontal, vertical or block mode.
25984
25985 width, w
25986 height, h
25987 Set shuffle block_size. In case of horizontal shuffle mode only
25988 width part of size is used, and in case of vertical shuffle mode
25989 only height part of size is used.
25990
25991 seed, s
25992 Set random seed used with shuffling pixels. Mainly useful to set to
25993 be able to reverse filtering process to get original input. For
25994 example, to reverse forward shuffle you need to use same parameters
25995 and exact same seed and to set direction to inverse.
25996
25997 shuffleplanes
25998 Reorder and/or duplicate video planes.
25999
26000 It accepts the following parameters:
26001
26002 map0
26003 The index of the input plane to be used as the first output plane.
26004
26005 map1
26006 The index of the input plane to be used as the second output plane.
26007
26008 map2
26009 The index of the input plane to be used as the third output plane.
26010
26011 map3
26012 The index of the input plane to be used as the fourth output plane.
26013
26014 The first plane has the index 0. The default is to keep the input
26015 unchanged.
26016
26017 Examples
26018
26019 • Swap the second and third planes of the input:
26020
26021 ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
26022
26023 signalstats
26024 Evaluate various visual metrics that assist in determining issues
26025 associated with the digitization of analog video media.
26026
26027 By default the filter will log these metadata values:
26028
26029 YMIN
26030 Display the minimal Y value contained within the input frame.
26031 Expressed in range of [0-255].
26032
26033 YLOW
26034 Display the Y value at the 10% percentile within the input frame.
26035 Expressed in range of [0-255].
26036
26037 YAVG
26038 Display the average Y value within the input frame. Expressed in
26039 range of [0-255].
26040
26041 YHIGH
26042 Display the Y value at the 90% percentile within the input frame.
26043 Expressed in range of [0-255].
26044
26045 YMAX
26046 Display the maximum Y value contained within the input frame.
26047 Expressed in range of [0-255].
26048
26049 UMIN
26050 Display the minimal U value contained within the input frame.
26051 Expressed in range of [0-255].
26052
26053 ULOW
26054 Display the U value at the 10% percentile within the input frame.
26055 Expressed in range of [0-255].
26056
26057 UAVG
26058 Display the average U value within the input frame. Expressed in
26059 range of [0-255].
26060
26061 UHIGH
26062 Display the U value at the 90% percentile within the input frame.
26063 Expressed in range of [0-255].
26064
26065 UMAX
26066 Display the maximum U value contained within the input frame.
26067 Expressed in range of [0-255].
26068
26069 VMIN
26070 Display the minimal V value contained within the input frame.
26071 Expressed in range of [0-255].
26072
26073 VLOW
26074 Display the V value at the 10% percentile within the input frame.
26075 Expressed in range of [0-255].
26076
26077 VAVG
26078 Display the average V value within the input frame. Expressed in
26079 range of [0-255].
26080
26081 VHIGH
26082 Display the V value at the 90% percentile within the input frame.
26083 Expressed in range of [0-255].
26084
26085 VMAX
26086 Display the maximum V value contained within the input frame.
26087 Expressed in range of [0-255].
26088
26089 SATMIN
26090 Display the minimal saturation value contained within the input
26091 frame. Expressed in range of [0-~181.02].
26092
26093 SATLOW
26094 Display the saturation value at the 10% percentile within the input
26095 frame. Expressed in range of [0-~181.02].
26096
26097 SATAVG
26098 Display the average saturation value within the input frame.
26099 Expressed in range of [0-~181.02].
26100
26101 SATHIGH
26102 Display the saturation value at the 90% percentile within the input
26103 frame. Expressed in range of [0-~181.02].
26104
26105 SATMAX
26106 Display the maximum saturation value contained within the input
26107 frame. Expressed in range of [0-~181.02].
26108
26109 HUEMED
26110 Display the median value for hue within the input frame. Expressed
26111 in range of [0-360].
26112
26113 HUEAVG
26114 Display the average value for hue within the input frame. Expressed
26115 in range of [0-360].
26116
26117 YDIF
26118 Display the average of sample value difference between all values
26119 of the Y plane in the current frame and corresponding values of the
26120 previous input frame. Expressed in range of [0-255].
26121
26122 UDIF
26123 Display the average of sample value difference between all values
26124 of the U plane in the current frame and corresponding values of the
26125 previous input frame. Expressed in range of [0-255].
26126
26127 VDIF
26128 Display the average of sample value difference between all values
26129 of the V plane in the current frame and corresponding values of the
26130 previous input frame. Expressed in range of [0-255].
26131
26132 YBITDEPTH
26133 Display bit depth of Y plane in current frame. Expressed in range
26134 of [0-16].
26135
26136 UBITDEPTH
26137 Display bit depth of U plane in current frame. Expressed in range
26138 of [0-16].
26139
26140 VBITDEPTH
26141 Display bit depth of V plane in current frame. Expressed in range
26142 of [0-16].
26143
26144 The filter accepts the following options:
26145
26146 stat
26147 out stat specify an additional form of image analysis. out output
26148 video with the specified type of pixel highlighted.
26149
26150 Both options accept the following values:
26151
26152 tout
26153 Identify temporal outliers pixels. A temporal outlier is a
26154 pixel unlike the neighboring pixels of the same field. Examples
26155 of temporal outliers include the results of video dropouts,
26156 head clogs, or tape tracking issues.
26157
26158 vrep
26159 Identify vertical line repetition. Vertical line repetition
26160 includes similar rows of pixels within a frame. In born-digital
26161 video vertical line repetition is common, but this pattern is
26162 uncommon in video digitized from an analog source. When it
26163 occurs in video that results from the digitization of an analog
26164 source it can indicate concealment from a dropout compensator.
26165
26166 brng
26167 Identify pixels that fall outside of legal broadcast range.
26168
26169 color, c
26170 Set the highlight color for the out option. The default color is
26171 yellow.
26172
26173 Examples
26174
26175 • Output data of various video metrics:
26176
26177 ffprobe -f lavfi movie=example.mov,signalstats="stat=tout+vrep+brng" -show_frames
26178
26179 • Output specific data about the minimum and maximum values of the Y
26180 plane per frame:
26181
26182 ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
26183
26184 • Playback video while highlighting pixels that are outside of
26185 broadcast range in red.
26186
26187 ffplay example.mov -vf signalstats="out=brng:color=red"
26188
26189 • Playback video with signalstats metadata drawn over the frame.
26190
26191 ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
26192
26193 The contents of signalstat_drawtext.txt used in the command are:
26194
26195 time %{pts:hms}
26196 Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
26197 U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
26198 V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
26199 saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
26200
26201 signature
26202 Calculates the MPEG-7 Video Signature. The filter can handle more than
26203 one input. In this case the matching between the inputs can be
26204 calculated additionally. The filter always passes through the first
26205 input. The signature of each stream can be written into a file.
26206
26207 It accepts the following options:
26208
26209 detectmode
26210 Enable or disable the matching process.
26211
26212 Available values are:
26213
26214 off Disable the calculation of a matching (default).
26215
26216 full
26217 Calculate the matching for the whole video and output whether
26218 the whole video matches or only parts.
26219
26220 fast
26221 Calculate only until a matching is found or the video ends.
26222 Should be faster in some cases.
26223
26224 nb_inputs
26225 Set the number of inputs. The option value must be a non negative
26226 integer. Default value is 1.
26227
26228 filename
26229 Set the path to which the output is written. If there is more than
26230 one input, the path must be a prototype, i.e. must contain %d or
26231 %0nd (where n is a positive integer), that will be replaced with
26232 the input number. If no filename is specified, no output will be
26233 written. This is the default.
26234
26235 format
26236 Choose the output format.
26237
26238 Available values are:
26239
26240 binary
26241 Use the specified binary representation (default).
26242
26243 xml Use the specified xml representation.
26244
26245 th_d
26246 Set threshold to detect one word as similar. The option value must
26247 be an integer greater than zero. The default value is 9000.
26248
26249 th_dc
26250 Set threshold to detect all words as similar. The option value must
26251 be an integer greater than zero. The default value is 60000.
26252
26253 th_xh
26254 Set threshold to detect frames as similar. The option value must be
26255 an integer greater than zero. The default value is 116.
26256
26257 th_di
26258 Set the minimum length of a sequence in frames to recognize it as
26259 matching sequence. The option value must be a non negative integer
26260 value. The default value is 0.
26261
26262 th_it
26263 Set the minimum relation, that matching frames to all frames must
26264 have. The option value must be a double value between 0 and 1. The
26265 default value is 0.5.
26266
26267 Examples
26268
26269 • To calculate the signature of an input video and store it in
26270 signature.bin:
26271
26272 ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
26273
26274 • To detect whether two videos match and store the signatures in XML
26275 format in signature0.xml and signature1.xml:
26276
26277 ffmpeg -i input1.mkv -i input2.mkv -filter_complex "[0:v][1:v] signature=nb_inputs=2:detectmode=full:format=xml:filename=signature%d.xml" -map :v -f null -
26278
26279 smartblur
26280 Blur the input video without impacting the outlines.
26281
26282 It accepts the following options:
26283
26284 luma_radius, lr
26285 Set the luma radius. The option value must be a float number in the
26286 range [0.1,5.0] that specifies the variance of the gaussian filter
26287 used to blur the image (slower if larger). Default value is 1.0.
26288
26289 luma_strength, ls
26290 Set the luma strength. The option value must be a float number in
26291 the range [-1.0,1.0] that configures the blurring. A value included
26292 in [0.0,1.0] will blur the image whereas a value included in
26293 [-1.0,0.0] will sharpen the image. Default value is 1.0.
26294
26295 luma_threshold, lt
26296 Set the luma threshold used as a coefficient to determine whether a
26297 pixel should be blurred or not. The option value must be an integer
26298 in the range [-30,30]. A value of 0 will filter all the image, a
26299 value included in [0,30] will filter flat areas and a value
26300 included in [-30,0] will filter edges. Default value is 0.
26301
26302 chroma_radius, cr
26303 Set the chroma radius. The option value must be a float number in
26304 the range [0.1,5.0] that specifies the variance of the gaussian
26305 filter used to blur the image (slower if larger). Default value is
26306 luma_radius.
26307
26308 chroma_strength, cs
26309 Set the chroma strength. The option value must be a float number in
26310 the range [-1.0,1.0] that configures the blurring. A value included
26311 in [0.0,1.0] will blur the image whereas a value included in
26312 [-1.0,0.0] will sharpen the image. Default value is luma_strength.
26313
26314 chroma_threshold, ct
26315 Set the chroma threshold used as a coefficient to determine whether
26316 a pixel should be blurred or not. The option value must be an
26317 integer in the range [-30,30]. A value of 0 will filter all the
26318 image, a value included in [0,30] will filter flat areas and a
26319 value included in [-30,0] will filter edges. Default value is
26320 luma_threshold.
26321
26322 If a chroma option is not explicitly set, the corresponding luma value
26323 is set.
26324
26325 sobel
26326 Apply sobel operator to input video stream.
26327
26328 The filter accepts the following option:
26329
26330 planes
26331 Set which planes will be processed, unprocessed planes will be
26332 copied. By default value 0xf, all planes will be processed.
26333
26334 scale
26335 Set value which will be multiplied with filtered result.
26336
26337 delta
26338 Set value which will be added to filtered result.
26339
26340 Commands
26341
26342 This filter supports the all above options as commands.
26343
26344 spp
26345 Apply a simple postprocessing filter that compresses and decompresses
26346 the image at several (or - in the case of quality level 6 - all) shifts
26347 and average the results.
26348
26349 The filter accepts the following options:
26350
26351 quality
26352 Set quality. This option defines the number of levels for
26353 averaging. It accepts an integer in the range 0-6. If set to 0, the
26354 filter will have no effect. A value of 6 means the higher quality.
26355 For each increment of that value the speed drops by a factor of
26356 approximately 2. Default value is 3.
26357
26358 qp Force a constant quantization parameter. If not set, the filter
26359 will use the QP from the video stream (if available).
26360
26361 mode
26362 Set thresholding mode. Available modes are:
26363
26364 hard
26365 Set hard thresholding (default).
26366
26367 soft
26368 Set soft thresholding (better de-ringing effect, but likely
26369 blurrier).
26370
26371 use_bframe_qp
26372 Enable the use of the QP from the B-Frames if set to 1. Using this
26373 option may cause flicker since the B-Frames have often larger QP.
26374 Default is 0 (not enabled).
26375
26376 Commands
26377
26378 This filter supports the following commands:
26379
26380 quality, level
26381 Set quality level. The value "max" can be used to set the maximum
26382 level, currently 6.
26383
26384 sr
26385 Scale the input by applying one of the super-resolution methods based
26386 on convolutional neural networks. Supported models:
26387
26388 • Super-Resolution Convolutional Neural Network model (SRCNN). See
26389 <https://arxiv.org/abs/1501.00092>.
26390
26391 • Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
26392 See <https://arxiv.org/abs/1609.05158>.
26393
26394 Training scripts as well as scripts for model file (.pb) saving can be
26395 found at <https://github.com/XueweiMeng/sr/tree/sr_dnn_native>.
26396 Original repository is at
26397 <https://github.com/HighVoltageRocknRoll/sr.git>.
26398
26399 Native model files (.model) can be generated from TensorFlow model
26400 files (.pb) by using tools/python/convert.py
26401
26402 The filter accepts the following options:
26403
26404 dnn_backend
26405 Specify which DNN backend to use for model loading and execution.
26406 This option accepts the following values:
26407
26408 native
26409 Native implementation of DNN loading and execution.
26410
26411 tensorflow
26412 TensorFlow backend. To enable this backend you need to install
26413 the TensorFlow for C library (see
26414 <https://www.tensorflow.org/install/lang_c>) and configure
26415 FFmpeg with "--enable-libtensorflow"
26416
26417 Default value is native.
26418
26419 model
26420 Set path to model file specifying network architecture and its
26421 parameters. Note that different backends use different file
26422 formats. TensorFlow backend can load files for both formats, while
26423 native backend can load files for only its format.
26424
26425 scale_factor
26426 Set scale factor for SRCNN model. Allowed values are 2, 3 and 4.
26427 Default value is 2. Scale factor is necessary for SRCNN model,
26428 because it accepts input upscaled using bicubic upscaling with
26429 proper scale factor.
26430
26431 To get full functionality (such as async execution), please use the
26432 dnn_processing filter.
26433
26434 ssim
26435 Obtain the SSIM (Structural SImilarity Metric) between two input
26436 videos.
26437
26438 This filter takes in input two input videos, the first input is
26439 considered the "main" source and is passed unchanged to the output. The
26440 second input is used as a "reference" video for computing the SSIM.
26441
26442 Both video inputs must have the same resolution and pixel format for
26443 this filter to work correctly. Also it assumes that both inputs have
26444 the same number of frames, which are compared one by one.
26445
26446 The filter stores the calculated SSIM of each frame.
26447
26448 The description of the accepted parameters follows.
26449
26450 stats_file, f
26451 If specified the filter will use the named file to save the SSIM of
26452 each individual frame. When filename equals "-" the data is sent to
26453 standard output.
26454
26455 The file printed if stats_file is selected, contains a sequence of
26456 key/value pairs of the form key:value for each compared couple of
26457 frames.
26458
26459 A description of each shown parameter follows:
26460
26461 n sequential number of the input frame, starting from 1
26462
26463 Y, U, V, R, G, B
26464 SSIM of the compared frames for the component specified by the
26465 suffix.
26466
26467 All SSIM of the compared frames for the whole frame.
26468
26469 dB Same as above but in dB representation.
26470
26471 This filter also supports the framesync options.
26472
26473 Examples
26474
26475 • For example:
26476
26477 movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
26478 [main][ref] ssim="stats_file=stats.log" [out]
26479
26480 On this example the input file being processed is compared with the
26481 reference file ref_movie.mpg. The SSIM of each individual frame is
26482 stored in stats.log.
26483
26484 • Another example with both psnr and ssim at same time:
26485
26486 ffmpeg -i main.mpg -i ref.mpg -lavfi "ssim;[0:v][1:v]psnr" -f null -
26487
26488 • Another example with different containers:
26489
26490 ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]ssim" -f null -
26491
26492 stereo3d
26493 Convert between different stereoscopic image formats.
26494
26495 The filters accept the following options:
26496
26497 in Set stereoscopic image format of input.
26498
26499 Available values for input image formats are:
26500
26501 sbsl
26502 side by side parallel (left eye left, right eye right)
26503
26504 sbsr
26505 side by side crosseye (right eye left, left eye right)
26506
26507 sbs2l
26508 side by side parallel with half width resolution (left eye
26509 left, right eye right)
26510
26511 sbs2r
26512 side by side crosseye with half width resolution (right eye
26513 left, left eye right)
26514
26515 abl
26516 tbl above-below (left eye above, right eye below)
26517
26518 abr
26519 tbr above-below (right eye above, left eye below)
26520
26521 ab2l
26522 tb2l
26523 above-below with half height resolution (left eye above, right
26524 eye below)
26525
26526 ab2r
26527 tb2r
26528 above-below with half height resolution (right eye above, left
26529 eye below)
26530
26531 al alternating frames (left eye first, right eye second)
26532
26533 ar alternating frames (right eye first, left eye second)
26534
26535 irl interleaved rows (left eye has top row, right eye starts on
26536 next row)
26537
26538 irr interleaved rows (right eye has top row, left eye starts on
26539 next row)
26540
26541 icl interleaved columns, left eye first
26542
26543 icr interleaved columns, right eye first
26544
26545 Default value is sbsl.
26546
26547 out Set stereoscopic image format of output.
26548
26549 sbsl
26550 side by side parallel (left eye left, right eye right)
26551
26552 sbsr
26553 side by side crosseye (right eye left, left eye right)
26554
26555 sbs2l
26556 side by side parallel with half width resolution (left eye
26557 left, right eye right)
26558
26559 sbs2r
26560 side by side crosseye with half width resolution (right eye
26561 left, left eye right)
26562
26563 abl
26564 tbl above-below (left eye above, right eye below)
26565
26566 abr
26567 tbr above-below (right eye above, left eye below)
26568
26569 ab2l
26570 tb2l
26571 above-below with half height resolution (left eye above, right
26572 eye below)
26573
26574 ab2r
26575 tb2r
26576 above-below with half height resolution (right eye above, left
26577 eye below)
26578
26579 al alternating frames (left eye first, right eye second)
26580
26581 ar alternating frames (right eye first, left eye second)
26582
26583 irl interleaved rows (left eye has top row, right eye starts on
26584 next row)
26585
26586 irr interleaved rows (right eye has top row, left eye starts on
26587 next row)
26588
26589 arbg
26590 anaglyph red/blue gray (red filter on left eye, blue filter on
26591 right eye)
26592
26593 argg
26594 anaglyph red/green gray (red filter on left eye, green filter
26595 on right eye)
26596
26597 arcg
26598 anaglyph red/cyan gray (red filter on left eye, cyan filter on
26599 right eye)
26600
26601 arch
26602 anaglyph red/cyan half colored (red filter on left eye, cyan
26603 filter on right eye)
26604
26605 arcc
26606 anaglyph red/cyan color (red filter on left eye, cyan filter on
26607 right eye)
26608
26609 arcd
26610 anaglyph red/cyan color optimized with the least squares
26611 projection of dubois (red filter on left eye, cyan filter on
26612 right eye)
26613
26614 agmg
26615 anaglyph green/magenta gray (green filter on left eye, magenta
26616 filter on right eye)
26617
26618 agmh
26619 anaglyph green/magenta half colored (green filter on left eye,
26620 magenta filter on right eye)
26621
26622 agmc
26623 anaglyph green/magenta colored (green filter on left eye,
26624 magenta filter on right eye)
26625
26626 agmd
26627 anaglyph green/magenta color optimized with the least squares
26628 projection of dubois (green filter on left eye, magenta filter
26629 on right eye)
26630
26631 aybg
26632 anaglyph yellow/blue gray (yellow filter on left eye, blue
26633 filter on right eye)
26634
26635 aybh
26636 anaglyph yellow/blue half colored (yellow filter on left eye,
26637 blue filter on right eye)
26638
26639 aybc
26640 anaglyph yellow/blue colored (yellow filter on left eye, blue
26641 filter on right eye)
26642
26643 aybd
26644 anaglyph yellow/blue color optimized with the least squares
26645 projection of dubois (yellow filter on left eye, blue filter on
26646 right eye)
26647
26648 ml mono output (left eye only)
26649
26650 mr mono output (right eye only)
26651
26652 chl checkerboard, left eye first
26653
26654 chr checkerboard, right eye first
26655
26656 icl interleaved columns, left eye first
26657
26658 icr interleaved columns, right eye first
26659
26660 hdmi
26661 HDMI frame pack
26662
26663 Default value is arcd.
26664
26665 Examples
26666
26667 • Convert input video from side by side parallel to anaglyph
26668 yellow/blue dubois:
26669
26670 stereo3d=sbsl:aybd
26671
26672 • Convert input video from above below (left eye above, right eye
26673 below) to side by side crosseye.
26674
26675 stereo3d=abl:sbsr
26676
26677 streamselect, astreamselect
26678 Select video or audio streams.
26679
26680 The filter accepts the following options:
26681
26682 inputs
26683 Set number of inputs. Default is 2.
26684
26685 map Set input indexes to remap to outputs.
26686
26687 Commands
26688
26689 The "streamselect" and "astreamselect" filter supports the following
26690 commands:
26691
26692 map Set input indexes to remap to outputs.
26693
26694 Examples
26695
26696 • Select first 5 seconds 1st stream and rest of time 2nd stream:
26697
26698 sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
26699
26700 • Same as above, but for audio:
26701
26702 asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
26703
26704 subtitles
26705 Draw subtitles on top of input video using the libass library.
26706
26707 To enable compilation of this filter you need to configure FFmpeg with
26708 "--enable-libass". This filter also requires a build with libavcodec
26709 and libavformat to convert the passed subtitles file to ASS (Advanced
26710 Substation Alpha) subtitles format.
26711
26712 The filter accepts the following options:
26713
26714 filename, f
26715 Set the filename of the subtitle file to read. It must be
26716 specified.
26717
26718 original_size
26719 Specify the size of the original video, the video for which the ASS
26720 file was composed. For the syntax of this option, check the "Video
26721 size" section in the ffmpeg-utils manual. Due to a misdesign in
26722 ASS aspect ratio arithmetic, this is necessary to correctly scale
26723 the fonts if the aspect ratio has been changed.
26724
26725 fontsdir
26726 Set a directory path containing fonts that can be used by the
26727 filter. These fonts will be used in addition to whatever the font
26728 provider uses.
26729
26730 alpha
26731 Process alpha channel, by default alpha channel is untouched.
26732
26733 charenc
26734 Set subtitles input character encoding. "subtitles" filter only.
26735 Only useful if not UTF-8.
26736
26737 stream_index, si
26738 Set subtitles stream index. "subtitles" filter only.
26739
26740 force_style
26741 Override default style or script info parameters of the subtitles.
26742 It accepts a string containing ASS style format "KEY=VALUE" couples
26743 separated by ",".
26744
26745 If the first key is not specified, it is assumed that the first value
26746 specifies the filename.
26747
26748 For example, to render the file sub.srt on top of the input video, use
26749 the command:
26750
26751 subtitles=sub.srt
26752
26753 which is equivalent to:
26754
26755 subtitles=filename=sub.srt
26756
26757 To render the default subtitles stream from file video.mkv, use:
26758
26759 subtitles=video.mkv
26760
26761 To render the second subtitles stream from that file, use:
26762
26763 subtitles=video.mkv:si=1
26764
26765 To make the subtitles stream from sub.srt appear in 80% transparent
26766 blue "DejaVu Serif", use:
26767
26768 subtitles=sub.srt:force_style='Fontname=DejaVu Serif,PrimaryColour=&HCCFF0000'
26769
26770 super2xsai
26771 Scale the input by 2x and smooth using the Super2xSaI (Scale and
26772 Interpolate) pixel art scaling algorithm.
26773
26774 Useful for enlarging pixel art images without reducing sharpness.
26775
26776 swaprect
26777 Swap two rectangular objects in video.
26778
26779 This filter accepts the following options:
26780
26781 w Set object width.
26782
26783 h Set object height.
26784
26785 x1 Set 1st rect x coordinate.
26786
26787 y1 Set 1st rect y coordinate.
26788
26789 x2 Set 2nd rect x coordinate.
26790
26791 y2 Set 2nd rect y coordinate.
26792
26793 All expressions are evaluated once for each frame.
26794
26795 The all options are expressions containing the following constants:
26796
26797 w
26798 h The input width and height.
26799
26800 a same as w / h
26801
26802 sar input sample aspect ratio
26803
26804 dar input display aspect ratio, it is the same as (w / h) * sar
26805
26806 n The number of the input frame, starting from 0.
26807
26808 t The timestamp expressed in seconds. It's NAN if the input timestamp
26809 is unknown.
26810
26811 pos the position in the file of the input frame, NAN if unknown
26812
26813 Commands
26814
26815 This filter supports the all above options as commands.
26816
26817 swapuv
26818 Swap U & V plane.
26819
26820 tblend
26821 Blend successive video frames.
26822
26823 See blend
26824
26825 telecine
26826 Apply telecine process to the video.
26827
26828 This filter accepts the following options:
26829
26830 first_field
26831 top, t
26832 top field first
26833
26834 bottom, b
26835 bottom field first The default value is "top".
26836
26837 pattern
26838 A string of numbers representing the pulldown pattern you wish to
26839 apply. The default value is 23.
26840
26841 Some typical patterns:
26842
26843 NTSC output (30i):
26844 27.5p: 32222
26845 24p: 23 (classic)
26846 24p: 2332 (preferred)
26847 20p: 33
26848 18p: 334
26849 16p: 3444
26850
26851 PAL output (25i):
26852 27.5p: 12222
26853 24p: 222222222223 ("Euro pulldown")
26854 16.67p: 33
26855 16p: 33333334
26856
26857 thistogram
26858 Compute and draw a color distribution histogram for the input video
26859 across time.
26860
26861 Unlike histogram video filter which only shows histogram of single
26862 input frame at certain time, this filter shows also past histograms of
26863 number of frames defined by "width" option.
26864
26865 The computed histogram is a representation of the color component
26866 distribution in an image.
26867
26868 The filter accepts the following options:
26869
26870 width, w
26871 Set width of single color component output. Default value is 0.
26872 Value of 0 means width will be picked from input video. This also
26873 set number of passed histograms to keep. Allowed range is [0,
26874 8192].
26875
26876 display_mode, d
26877 Set display mode. It accepts the following values:
26878
26879 stack
26880 Per color component graphs are placed below each other.
26881
26882 parade
26883 Per color component graphs are placed side by side.
26884
26885 overlay
26886 Presents information identical to that in the "parade", except
26887 that the graphs representing color components are superimposed
26888 directly over one another.
26889
26890 Default is "stack".
26891
26892 levels_mode, m
26893 Set mode. Can be either "linear", or "logarithmic". Default is
26894 "linear".
26895
26896 components, c
26897 Set what color components to display. Default is 7.
26898
26899 bgopacity, b
26900 Set background opacity. Default is 0.9.
26901
26902 envelope, e
26903 Show envelope. Default is disabled.
26904
26905 ecolor, ec
26906 Set envelope color. Default is "gold".
26907
26908 slide
26909 Set slide mode.
26910
26911 Available values for slide is:
26912
26913 frame
26914 Draw new frame when right border is reached.
26915
26916 replace
26917 Replace old columns with new ones.
26918
26919 scroll
26920 Scroll from right to left.
26921
26922 rscroll
26923 Scroll from left to right.
26924
26925 picture
26926 Draw single picture.
26927
26928 Default is "replace".
26929
26930 threshold
26931 Apply threshold effect to video stream.
26932
26933 This filter needs four video streams to perform thresholding. First
26934 stream is stream we are filtering. Second stream is holding threshold
26935 values, third stream is holding min values, and last, fourth stream is
26936 holding max values.
26937
26938 The filter accepts the following option:
26939
26940 planes
26941 Set which planes will be processed, unprocessed planes will be
26942 copied. By default value 0xf, all planes will be processed.
26943
26944 For example if first stream pixel's component value is less then
26945 threshold value of pixel component from 2nd threshold stream, third
26946 stream value will picked, otherwise fourth stream pixel component value
26947 will be picked.
26948
26949 Using color source filter one can perform various types of
26950 thresholding:
26951
26952 Commands
26953
26954 This filter supports the all options as commands.
26955
26956 Examples
26957
26958 • Binary threshold, using gray color as threshold:
26959
26960 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi
26961
26962 • Inverted binary threshold, using gray color as threshold:
26963
26964 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi
26965
26966 • Truncate binary threshold, using gray color as threshold:
26967
26968 ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
26969
26970 • Threshold to zero, using gray color as threshold:
26971
26972 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
26973
26974 • Inverted threshold to zero, using gray color as threshold:
26975
26976 ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
26977
26978 thumbnail
26979 Select the most representative frame in a given sequence of consecutive
26980 frames.
26981
26982 The filter accepts the following options:
26983
26984 n Set the frames batch size to analyze; in a set of n frames, the
26985 filter will pick one of them, and then handle the next batch of n
26986 frames until the end. Default is 100.
26987
26988 Since the filter keeps track of the whole frames sequence, a bigger n
26989 value will result in a higher memory usage, so a high value is not
26990 recommended.
26991
26992 Examples
26993
26994 • Extract one picture each 50 frames:
26995
26996 thumbnail=50
26997
26998 • Complete example of a thumbnail creation with ffmpeg:
26999
27000 ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
27001
27002 tile
27003 Tile several successive frames together.
27004
27005 The untile filter can do the reverse.
27006
27007 The filter accepts the following options:
27008
27009 layout
27010 Set the grid size (i.e. the number of lines and columns). For the
27011 syntax of this option, check the "Video size" section in the
27012 ffmpeg-utils manual.
27013
27014 nb_frames
27015 Set the maximum number of frames to render in the given area. It
27016 must be less than or equal to wxh. The default value is 0, meaning
27017 all the area will be used.
27018
27019 margin
27020 Set the outer border margin in pixels.
27021
27022 padding
27023 Set the inner border thickness (i.e. the number of pixels between
27024 frames). For more advanced padding options (such as having
27025 different values for the edges), refer to the pad video filter.
27026
27027 color
27028 Specify the color of the unused area. For the syntax of this
27029 option, check the "Color" section in the ffmpeg-utils manual. The
27030 default value of color is "black".
27031
27032 overlap
27033 Set the number of frames to overlap when tiling several successive
27034 frames together. The value must be between 0 and nb_frames - 1.
27035
27036 init_padding
27037 Set the number of frames to initially be empty before displaying
27038 first output frame. This controls how soon will one get first
27039 output frame. The value must be between 0 and nb_frames - 1.
27040
27041 Examples
27042
27043 • Produce 8x8 PNG tiles of all keyframes (-skip_frame nokey) in a
27044 movie:
27045
27046 ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
27047
27048 The -vsync 0 is necessary to prevent ffmpeg from duplicating each
27049 output frame to accommodate the originally detected frame rate.
27050
27051 • Display 5 pictures in an area of "3x2" frames, with 7 pixels
27052 between them, and 2 pixels of initial margin, using mixed flat and
27053 named options:
27054
27055 tile=3x2:nb_frames=5:padding=7:margin=2
27056
27057 tinterlace
27058 Perform various types of temporal field interlacing.
27059
27060 Frames are counted starting from 1, so the first input frame is
27061 considered odd.
27062
27063 The filter accepts the following options:
27064
27065 mode
27066 Specify the mode of the interlacing. This option can also be
27067 specified as a value alone. See below for a list of values for this
27068 option.
27069
27070 Available values are:
27071
27072 merge, 0
27073 Move odd frames into the upper field, even into the lower
27074 field, generating a double height frame at half frame rate.
27075
27076 ------> time
27077 Input:
27078 Frame 1 Frame 2 Frame 3 Frame 4
27079
27080 11111 22222 33333 44444
27081 11111 22222 33333 44444
27082 11111 22222 33333 44444
27083 11111 22222 33333 44444
27084
27085 Output:
27086 11111 33333
27087 22222 44444
27088 11111 33333
27089 22222 44444
27090 11111 33333
27091 22222 44444
27092 11111 33333
27093 22222 44444
27094
27095 drop_even, 1
27096 Only output odd frames, even frames are dropped, generating a
27097 frame with unchanged height at half frame rate.
27098
27099 ------> time
27100 Input:
27101 Frame 1 Frame 2 Frame 3 Frame 4
27102
27103 11111 22222 33333 44444
27104 11111 22222 33333 44444
27105 11111 22222 33333 44444
27106 11111 22222 33333 44444
27107
27108 Output:
27109 11111 33333
27110 11111 33333
27111 11111 33333
27112 11111 33333
27113
27114 drop_odd, 2
27115 Only output even frames, odd frames are dropped, generating a
27116 frame with unchanged height at half frame rate.
27117
27118 ------> time
27119 Input:
27120 Frame 1 Frame 2 Frame 3 Frame 4
27121
27122 11111 22222 33333 44444
27123 11111 22222 33333 44444
27124 11111 22222 33333 44444
27125 11111 22222 33333 44444
27126
27127 Output:
27128 22222 44444
27129 22222 44444
27130 22222 44444
27131 22222 44444
27132
27133 pad, 3
27134 Expand each frame to full height, but pad alternate lines with
27135 black, generating a frame with double height at the same input
27136 frame rate.
27137
27138 ------> time
27139 Input:
27140 Frame 1 Frame 2 Frame 3 Frame 4
27141
27142 11111 22222 33333 44444
27143 11111 22222 33333 44444
27144 11111 22222 33333 44444
27145 11111 22222 33333 44444
27146
27147 Output:
27148 11111 ..... 33333 .....
27149 ..... 22222 ..... 44444
27150 11111 ..... 33333 .....
27151 ..... 22222 ..... 44444
27152 11111 ..... 33333 .....
27153 ..... 22222 ..... 44444
27154 11111 ..... 33333 .....
27155 ..... 22222 ..... 44444
27156
27157 interleave_top, 4
27158 Interleave the upper field from odd frames with the lower field
27159 from even frames, generating a frame with unchanged height at
27160 half frame rate.
27161
27162 ------> time
27163 Input:
27164 Frame 1 Frame 2 Frame 3 Frame 4
27165
27166 11111<- 22222 33333<- 44444
27167 11111 22222<- 33333 44444<-
27168 11111<- 22222 33333<- 44444
27169 11111 22222<- 33333 44444<-
27170
27171 Output:
27172 11111 33333
27173 22222 44444
27174 11111 33333
27175 22222 44444
27176
27177 interleave_bottom, 5
27178 Interleave the lower field from odd frames with the upper field
27179 from even frames, generating a frame with unchanged height at
27180 half frame rate.
27181
27182 ------> time
27183 Input:
27184 Frame 1 Frame 2 Frame 3 Frame 4
27185
27186 11111 22222<- 33333 44444<-
27187 11111<- 22222 33333<- 44444
27188 11111 22222<- 33333 44444<-
27189 11111<- 22222 33333<- 44444
27190
27191 Output:
27192 22222 44444
27193 11111 33333
27194 22222 44444
27195 11111 33333
27196
27197 interlacex2, 6
27198 Double frame rate with unchanged height. Frames are inserted
27199 each containing the second temporal field from the previous
27200 input frame and the first temporal field from the next input
27201 frame. This mode relies on the top_field_first flag. Useful for
27202 interlaced video displays with no field synchronisation.
27203
27204 ------> time
27205 Input:
27206 Frame 1 Frame 2 Frame 3 Frame 4
27207
27208 11111 22222 33333 44444
27209 11111 22222 33333 44444
27210 11111 22222 33333 44444
27211 11111 22222 33333 44444
27212
27213 Output:
27214 11111 22222 22222 33333 33333 44444 44444
27215 11111 11111 22222 22222 33333 33333 44444
27216 11111 22222 22222 33333 33333 44444 44444
27217 11111 11111 22222 22222 33333 33333 44444
27218
27219 mergex2, 7
27220 Move odd frames into the upper field, even into the lower
27221 field, generating a double height frame at same frame rate.
27222
27223 ------> time
27224 Input:
27225 Frame 1 Frame 2 Frame 3 Frame 4
27226
27227 11111 22222 33333 44444
27228 11111 22222 33333 44444
27229 11111 22222 33333 44444
27230 11111 22222 33333 44444
27231
27232 Output:
27233 11111 33333 33333 55555
27234 22222 22222 44444 44444
27235 11111 33333 33333 55555
27236 22222 22222 44444 44444
27237 11111 33333 33333 55555
27238 22222 22222 44444 44444
27239 11111 33333 33333 55555
27240 22222 22222 44444 44444
27241
27242 Numeric values are deprecated but are accepted for backward
27243 compatibility reasons.
27244
27245 Default mode is "merge".
27246
27247 flags
27248 Specify flags influencing the filter process.
27249
27250 Available value for flags is:
27251
27252 low_pass_filter, vlpf
27253 Enable linear vertical low-pass filtering in the filter.
27254 Vertical low-pass filtering is required when creating an
27255 interlaced destination from a progressive source which contains
27256 high-frequency vertical detail. Filtering will reduce interlace
27257 'twitter' and Moire patterning.
27258
27259 complex_filter, cvlpf
27260 Enable complex vertical low-pass filtering. This will slightly
27261 less reduce interlace 'twitter' and Moire patterning but better
27262 retain detail and subjective sharpness impression.
27263
27264 bypass_il
27265 Bypass already interlaced frames, only adjust the frame rate.
27266
27267 Vertical low-pass filtering and bypassing already interlaced frames
27268 can only be enabled for mode interleave_top and interleave_bottom.
27269
27270 tmedian
27271 Pick median pixels from several successive input video frames.
27272
27273 The filter accepts the following options:
27274
27275 radius
27276 Set radius of median filter. Default is 1. Allowed range is from 1
27277 to 127.
27278
27279 planes
27280 Set which planes to filter. Default value is 15, by which all
27281 planes are processed.
27282
27283 percentile
27284 Set median percentile. Default value is 0.5. Default value of 0.5
27285 will pick always median values, while 0 will pick minimum values,
27286 and 1 maximum values.
27287
27288 Commands
27289
27290 This filter supports all above options as commands, excluding option
27291 "radius".
27292
27293 tmidequalizer
27294 Apply Temporal Midway Video Equalization effect.
27295
27296 Midway Video Equalization adjusts a sequence of video frames to have
27297 the same histograms, while maintaining their dynamics as much as
27298 possible. It's useful for e.g. matching exposures from a video frames
27299 sequence.
27300
27301 This filter accepts the following option:
27302
27303 radius
27304 Set filtering radius. Default is 5. Allowed range is from 1 to 127.
27305
27306 sigma
27307 Set filtering sigma. Default is 0.5. This controls strength of
27308 filtering. Setting this option to 0 effectively does nothing.
27309
27310 planes
27311 Set which planes to process. Default is 15, which is all available
27312 planes.
27313
27314 tmix
27315 Mix successive video frames.
27316
27317 A description of the accepted options follows.
27318
27319 frames
27320 The number of successive frames to mix. If unspecified, it defaults
27321 to 3.
27322
27323 weights
27324 Specify weight of each input video frame. Each weight is separated
27325 by space. If number of weights is smaller than number of frames
27326 last specified weight will be used for all remaining unset weights.
27327
27328 scale
27329 Specify scale, if it is set it will be multiplied with sum of each
27330 weight multiplied with pixel values to give final destination pixel
27331 value. By default scale is auto scaled to sum of weights.
27332
27333 Examples
27334
27335 • Average 7 successive frames:
27336
27337 tmix=frames=7:weights="1 1 1 1 1 1 1"
27338
27339 • Apply simple temporal convolution:
27340
27341 tmix=frames=3:weights="-1 3 -1"
27342
27343 • Similar as above but only showing temporal differences:
27344
27345 tmix=frames=3:weights="-1 2 -1":scale=1
27346
27347 Commands
27348
27349 This filter supports the following commands:
27350
27351 weights
27352 scale
27353 Syntax is same as option with same name.
27354
27355 tonemap
27356 Tone map colors from different dynamic ranges.
27357
27358 This filter expects data in single precision floating point, as it
27359 needs to operate on (and can output) out-of-range values. Another
27360 filter, such as zscale, is needed to convert the resulting frame to a
27361 usable format.
27362
27363 The tonemapping algorithms implemented only work on linear light, so
27364 input data should be linearized beforehand (and possibly correctly
27365 tagged).
27366
27367 ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
27368
27369 Options
27370
27371 The filter accepts the following options.
27372
27373 tonemap
27374 Set the tone map algorithm to use.
27375
27376 Possible values are:
27377
27378 none
27379 Do not apply any tone map, only desaturate overbright pixels.
27380
27381 clip
27382 Hard-clip any out-of-range values. Use it for perfect color
27383 accuracy for in-range values, while distorting out-of-range
27384 values.
27385
27386 linear
27387 Stretch the entire reference gamut to a linear multiple of the
27388 display.
27389
27390 gamma
27391 Fit a logarithmic transfer between the tone curves.
27392
27393 reinhard
27394 Preserve overall image brightness with a simple curve, using
27395 nonlinear contrast, which results in flattening details and
27396 degrading color accuracy.
27397
27398 hable
27399 Preserve both dark and bright details better than reinhard, at
27400 the cost of slightly darkening everything. Use it when detail
27401 preservation is more important than color and brightness
27402 accuracy.
27403
27404 mobius
27405 Smoothly map out-of-range values, while retaining contrast and
27406 colors for in-range material as much as possible. Use it when
27407 color accuracy is more important than detail preservation.
27408
27409 Default is none.
27410
27411 param
27412 Tune the tone mapping algorithm.
27413
27414 This affects the following algorithms:
27415
27416 none
27417 Ignored.
27418
27419 linear
27420 Specifies the scale factor to use while stretching. Default to
27421 1.0.
27422
27423 gamma
27424 Specifies the exponent of the function. Default to 1.8.
27425
27426 clip
27427 Specify an extra linear coefficient to multiply into the signal
27428 before clipping. Default to 1.0.
27429
27430 reinhard
27431 Specify the local contrast coefficient at the display peak.
27432 Default to 0.5, which means that in-gamut values will be about
27433 half as bright as when clipping.
27434
27435 hable
27436 Ignored.
27437
27438 mobius
27439 Specify the transition point from linear to mobius transform.
27440 Every value below this point is guaranteed to be mapped 1:1.
27441 The higher the value, the more accurate the result will be, at
27442 the cost of losing bright details. Default to 0.3, which due
27443 to the steep initial slope still preserves in-range colors
27444 fairly accurately.
27445
27446 desat
27447 Apply desaturation for highlights that exceed this level of
27448 brightness. The higher the parameter, the more color information
27449 will be preserved. This setting helps prevent unnaturally blown-out
27450 colors for super-highlights, by (smoothly) turning into white
27451 instead. This makes images feel more natural, at the cost of
27452 reducing information about out-of-range colors.
27453
27454 The default of 2.0 is somewhat conservative and will mostly just
27455 apply to skies or directly sunlit surfaces. A setting of 0.0
27456 disables this option.
27457
27458 This option works only if the input frame has a supported color
27459 tag.
27460
27461 peak
27462 Override signal/nominal/reference peak with this value. Useful when
27463 the embedded peak information in display metadata is not reliable
27464 or when tone mapping from a lower range to a higher range.
27465
27466 tpad
27467 Temporarily pad video frames.
27468
27469 The filter accepts the following options:
27470
27471 start
27472 Specify number of delay frames before input video stream. Default
27473 is 0.
27474
27475 stop
27476 Specify number of padding frames after input video stream. Set to
27477 -1 to pad indefinitely. Default is 0.
27478
27479 start_mode
27480 Set kind of frames added to beginning of stream. Can be either add
27481 or clone. With add frames of solid-color are added. With clone
27482 frames are clones of first frame. Default is add.
27483
27484 stop_mode
27485 Set kind of frames added to end of stream. Can be either add or
27486 clone. With add frames of solid-color are added. With clone
27487 frames are clones of last frame. Default is add.
27488
27489 start_duration, stop_duration
27490 Specify the duration of the start/stop delay. See the Time duration
27491 section in the ffmpeg-utils(1) manual for the accepted syntax.
27492 These options override start and stop. Default is 0.
27493
27494 color
27495 Specify the color of the padded area. For the syntax of this
27496 option, check the "Color" section in the ffmpeg-utils manual.
27497
27498 The default value of color is "black".
27499
27500 transpose
27501 Transpose rows with columns in the input video and optionally flip it.
27502
27503 It accepts the following parameters:
27504
27505 dir Specify the transposition direction.
27506
27507 Can assume the following values:
27508
27509 0, 4, cclock_flip
27510 Rotate by 90 degrees counterclockwise and vertically flip
27511 (default), that is:
27512
27513 L.R L.l
27514 . . -> . .
27515 l.r R.r
27516
27517 1, 5, clock
27518 Rotate by 90 degrees clockwise, that is:
27519
27520 L.R l.L
27521 . . -> . .
27522 l.r r.R
27523
27524 2, 6, cclock
27525 Rotate by 90 degrees counterclockwise, that is:
27526
27527 L.R R.r
27528 . . -> . .
27529 l.r L.l
27530
27531 3, 7, clock_flip
27532 Rotate by 90 degrees clockwise and vertically flip, that is:
27533
27534 L.R r.R
27535 . . -> . .
27536 l.r l.L
27537
27538 For values between 4-7, the transposition is only done if the input
27539 video geometry is portrait and not landscape. These values are
27540 deprecated, the "passthrough" option should be used instead.
27541
27542 Numerical values are deprecated, and should be dropped in favor of
27543 symbolic constants.
27544
27545 passthrough
27546 Do not apply the transposition if the input geometry matches the
27547 one specified by the specified value. It accepts the following
27548 values:
27549
27550 none
27551 Always apply transposition.
27552
27553 portrait
27554 Preserve portrait geometry (when height >= width).
27555
27556 landscape
27557 Preserve landscape geometry (when width >= height).
27558
27559 Default value is "none".
27560
27561 For example to rotate by 90 degrees clockwise and preserve portrait
27562 layout:
27563
27564 transpose=dir=1:passthrough=portrait
27565
27566 The command above can also be specified as:
27567
27568 transpose=1:portrait
27569
27570 transpose_npp
27571 Transpose rows with columns in the input video and optionally flip it.
27572 For more in depth examples see the transpose video filter, which shares
27573 mostly the same options.
27574
27575 It accepts the following parameters:
27576
27577 dir Specify the transposition direction.
27578
27579 Can assume the following values:
27580
27581 cclock_flip
27582 Rotate by 90 degrees counterclockwise and vertically flip.
27583 (default)
27584
27585 clock
27586 Rotate by 90 degrees clockwise.
27587
27588 cclock
27589 Rotate by 90 degrees counterclockwise.
27590
27591 clock_flip
27592 Rotate by 90 degrees clockwise and vertically flip.
27593
27594 passthrough
27595 Do not apply the transposition if the input geometry matches the
27596 one specified by the specified value. It accepts the following
27597 values:
27598
27599 none
27600 Always apply transposition. (default)
27601
27602 portrait
27603 Preserve portrait geometry (when height >= width).
27604
27605 landscape
27606 Preserve landscape geometry (when width >= height).
27607
27608 trim
27609 Trim the input so that the output contains one continuous subpart of
27610 the input.
27611
27612 It accepts the following parameters:
27613
27614 start
27615 Specify the time of the start of the kept section, i.e. the frame
27616 with the timestamp start will be the first frame in the output.
27617
27618 end Specify the time of the first frame that will be dropped, i.e. the
27619 frame immediately preceding the one with the timestamp end will be
27620 the last frame in the output.
27621
27622 start_pts
27623 This is the same as start, except this option sets the start
27624 timestamp in timebase units instead of seconds.
27625
27626 end_pts
27627 This is the same as end, except this option sets the end timestamp
27628 in timebase units instead of seconds.
27629
27630 duration
27631 The maximum duration of the output in seconds.
27632
27633 start_frame
27634 The number of the first frame that should be passed to the output.
27635
27636 end_frame
27637 The number of the first frame that should be dropped.
27638
27639 start, end, and duration are expressed as time duration specifications;
27640 see the Time duration section in the ffmpeg-utils(1) manual for the
27641 accepted syntax.
27642
27643 Note that the first two sets of the start/end options and the duration
27644 option look at the frame timestamp, while the _frame variants simply
27645 count the frames that pass through the filter. Also note that this
27646 filter does not modify the timestamps. If you wish for the output
27647 timestamps to start at zero, insert a setpts filter after the trim
27648 filter.
27649
27650 If multiple start or end options are set, this filter tries to be
27651 greedy and keep all the frames that match at least one of the specified
27652 constraints. To keep only the part that matches all the constraints at
27653 once, chain multiple trim filters.
27654
27655 The defaults are such that all the input is kept. So it is possible to
27656 set e.g. just the end values to keep everything before the specified
27657 time.
27658
27659 Examples:
27660
27661 • Drop everything except the second minute of input:
27662
27663 ffmpeg -i INPUT -vf trim=60:120
27664
27665 • Keep only the first second:
27666
27667 ffmpeg -i INPUT -vf trim=duration=1
27668
27669 unpremultiply
27670 Apply alpha unpremultiply effect to input video stream using first
27671 plane of second stream as alpha.
27672
27673 Both streams must have same dimensions and same pixel format.
27674
27675 The filter accepts the following option:
27676
27677 planes
27678 Set which planes will be processed, unprocessed planes will be
27679 copied. By default value 0xf, all planes will be processed.
27680
27681 If the format has 1 or 2 components, then luma is bit 0. If the
27682 format has 3 or 4 components: for RGB formats bit 0 is green, bit 1
27683 is blue and bit 2 is red; for YUV formats bit 0 is luma, bit 1 is
27684 chroma-U and bit 2 is chroma-V. If present, the alpha channel is
27685 always the last bit.
27686
27687 inplace
27688 Do not require 2nd input for processing, instead use alpha plane
27689 from input stream.
27690
27691 unsharp
27692 Sharpen or blur the input video.
27693
27694 It accepts the following parameters:
27695
27696 luma_msize_x, lx
27697 Set the luma matrix horizontal size. It must be an odd integer
27698 between 3 and 23. The default value is 5.
27699
27700 luma_msize_y, ly
27701 Set the luma matrix vertical size. It must be an odd integer
27702 between 3 and 23. The default value is 5.
27703
27704 luma_amount, la
27705 Set the luma effect strength. It must be a floating point number,
27706 reasonable values lay between -1.5 and 1.5.
27707
27708 Negative values will blur the input video, while positive values
27709 will sharpen it, a value of zero will disable the effect.
27710
27711 Default value is 1.0.
27712
27713 chroma_msize_x, cx
27714 Set the chroma matrix horizontal size. It must be an odd integer
27715 between 3 and 23. The default value is 5.
27716
27717 chroma_msize_y, cy
27718 Set the chroma matrix vertical size. It must be an odd integer
27719 between 3 and 23. The default value is 5.
27720
27721 chroma_amount, ca
27722 Set the chroma effect strength. It must be a floating point number,
27723 reasonable values lay between -1.5 and 1.5.
27724
27725 Negative values will blur the input video, while positive values
27726 will sharpen it, a value of zero will disable the effect.
27727
27728 Default value is 0.0.
27729
27730 All parameters are optional and default to the equivalent of the string
27731 '5:5:1.0:5:5:0.0'.
27732
27733 Examples
27734
27735 • Apply strong luma sharpen effect:
27736
27737 unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
27738
27739 • Apply a strong blur of both luma and chroma parameters:
27740
27741 unsharp=7:7:-2:7:7:-2
27742
27743 untile
27744 Decompose a video made of tiled images into the individual images.
27745
27746 The frame rate of the output video is the frame rate of the input video
27747 multiplied by the number of tiles.
27748
27749 This filter does the reverse of tile.
27750
27751 The filter accepts the following options:
27752
27753 layout
27754 Set the grid size (i.e. the number of lines and columns). For the
27755 syntax of this option, check the "Video size" section in the
27756 ffmpeg-utils manual.
27757
27758 Examples
27759
27760 • Produce a 1-second video from a still image file made of 25 frames
27761 stacked vertically, like an analogic film reel:
27762
27763 ffmpeg -r 1 -i image.jpg -vf untile=1x25 movie.mkv
27764
27765 uspp
27766 Apply ultra slow/simple postprocessing filter that compresses and
27767 decompresses the image at several (or - in the case of quality level 8
27768 - all) shifts and average the results.
27769
27770 The way this differs from the behavior of spp is that uspp actually
27771 encodes & decodes each case with libavcodec Snow, whereas spp uses a
27772 simplified intra only 8x8 DCT similar to MJPEG.
27773
27774 This filter is only available in ffmpeg version 4.4 or earlier.
27775
27776 The filter accepts the following options:
27777
27778 quality
27779 Set quality. This option defines the number of levels for
27780 averaging. It accepts an integer in the range 0-8. If set to 0, the
27781 filter will have no effect. A value of 8 means the higher quality.
27782 For each increment of that value the speed drops by a factor of
27783 approximately 2. Default value is 3.
27784
27785 qp Force a constant quantization parameter. If not set, the filter
27786 will use the QP from the video stream (if available).
27787
27788 v360
27789 Convert 360 videos between various formats.
27790
27791 The filter accepts the following options:
27792
27793 input
27794 output
27795 Set format of the input/output video.
27796
27797 Available formats:
27798
27799 e
27800 equirect
27801 Equirectangular projection.
27802
27803 c3x2
27804 c6x1
27805 c1x6
27806 Cubemap with 3x2/6x1/1x6 layout.
27807
27808 Format specific options:
27809
27810 in_pad
27811 out_pad
27812 Set padding proportion for the input/output cubemap. Values
27813 in decimals.
27814
27815 Example values:
27816
27817 0 No padding.
27818
27819 0.01
27820 1% of face is padding. For example, with 1920x1280
27821 resolution face size would be 640x640 and padding would
27822 be 3 pixels from each side. (640 * 0.01 = 6 pixels)
27823
27824 Default value is @samp{0}. Maximum value is @samp{0.1}.
27825
27826 fin_pad
27827 fout_pad
27828 Set fixed padding for the input/output cubemap. Values in
27829 pixels.
27830
27831 Default value is @samp{0}. If greater than zero it
27832 overrides other padding options.
27833
27834 in_forder
27835 out_forder
27836 Set order of faces for the input/output cubemap. Choose one
27837 direction for each position.
27838
27839 Designation of directions:
27840
27841 r right
27842
27843 l left
27844
27845 u up
27846
27847 d down
27848
27849 f forward
27850
27851 b back
27852
27853 Default value is @samp{rludfb}.
27854
27855 in_frot
27856 out_frot
27857 Set rotation of faces for the input/output cubemap. Choose
27858 one angle for each position.
27859
27860 Designation of angles:
27861
27862 0 0 degrees clockwise
27863
27864 1 90 degrees clockwise
27865
27866 2 180 degrees clockwise
27867
27868 3 270 degrees clockwise
27869
27870 Default value is @samp{000000}.
27871
27872 eac Equi-Angular Cubemap.
27873
27874 flat
27875 gnomonic
27876 rectilinear
27877 Regular video.
27878
27879 Format specific options:
27880
27881 h_fov
27882 v_fov
27883 d_fov
27884 Set output horizontal/vertical/diagonal field of view.
27885 Values in degrees.
27886
27887 If diagonal field of view is set it overrides horizontal
27888 and vertical field of view.
27889
27890 ih_fov
27891 iv_fov
27892 id_fov
27893 Set input horizontal/vertical/diagonal field of view.
27894 Values in degrees.
27895
27896 If diagonal field of view is set it overrides horizontal
27897 and vertical field of view.
27898
27899 dfisheye
27900 Dual fisheye.
27901
27902 Format specific options:
27903
27904 h_fov
27905 v_fov
27906 d_fov
27907 Set output horizontal/vertical/diagonal field of view.
27908 Values in degrees.
27909
27910 If diagonal field of view is set it overrides horizontal
27911 and vertical field of view.
27912
27913 ih_fov
27914 iv_fov
27915 id_fov
27916 Set input horizontal/vertical/diagonal field of view.
27917 Values in degrees.
27918
27919 If diagonal field of view is set it overrides horizontal
27920 and vertical field of view.
27921
27922 barrel
27923 fb
27924 barrelsplit
27925 Facebook's 360 formats.
27926
27927 sg Stereographic format.
27928
27929 Format specific options:
27930
27931 h_fov
27932 v_fov
27933 d_fov
27934 Set output horizontal/vertical/diagonal field of view.
27935 Values in degrees.
27936
27937 If diagonal field of view is set it overrides horizontal
27938 and vertical field of view.
27939
27940 ih_fov
27941 iv_fov
27942 id_fov
27943 Set input horizontal/vertical/diagonal field of view.
27944 Values in degrees.
27945
27946 If diagonal field of view is set it overrides horizontal
27947 and vertical field of view.
27948
27949 mercator
27950 Mercator format.
27951
27952 ball
27953 Ball format, gives significant distortion toward the back.
27954
27955 hammer
27956 Hammer-Aitoff map projection format.
27957
27958 sinusoidal
27959 Sinusoidal map projection format.
27960
27961 fisheye
27962 Fisheye projection.
27963
27964 Format specific options:
27965
27966 h_fov
27967 v_fov
27968 d_fov
27969 Set output horizontal/vertical/diagonal field of view.
27970 Values in degrees.
27971
27972 If diagonal field of view is set it overrides horizontal
27973 and vertical field of view.
27974
27975 ih_fov
27976 iv_fov
27977 id_fov
27978 Set input horizontal/vertical/diagonal field of view.
27979 Values in degrees.
27980
27981 If diagonal field of view is set it overrides horizontal
27982 and vertical field of view.
27983
27984 pannini
27985 Pannini projection.
27986
27987 Format specific options:
27988
27989 h_fov
27990 Set output pannini parameter.
27991
27992 ih_fov
27993 Set input pannini parameter.
27994
27995 cylindrical
27996 Cylindrical projection.
27997
27998 Format specific options:
27999
28000 h_fov
28001 v_fov
28002 d_fov
28003 Set output horizontal/vertical/diagonal field of view.
28004 Values in degrees.
28005
28006 If diagonal field of view is set it overrides horizontal
28007 and vertical field of view.
28008
28009 ih_fov
28010 iv_fov
28011 id_fov
28012 Set input horizontal/vertical/diagonal field of view.
28013 Values in degrees.
28014
28015 If diagonal field of view is set it overrides horizontal
28016 and vertical field of view.
28017
28018 perspective
28019 Perspective projection. (output only)
28020
28021 Format specific options:
28022
28023 v_fov
28024 Set perspective parameter.
28025
28026 tetrahedron
28027 Tetrahedron projection.
28028
28029 tsp Truncated square pyramid projection.
28030
28031 he
28032 hequirect
28033 Half equirectangular projection.
28034
28035 equisolid
28036 Equisolid format.
28037
28038 Format specific options:
28039
28040 h_fov
28041 v_fov
28042 d_fov
28043 Set output horizontal/vertical/diagonal field of view.
28044 Values in degrees.
28045
28046 If diagonal field of view is set it overrides horizontal
28047 and vertical field of view.
28048
28049 ih_fov
28050 iv_fov
28051 id_fov
28052 Set input horizontal/vertical/diagonal field of view.
28053 Values in degrees.
28054
28055 If diagonal field of view is set it overrides horizontal
28056 and vertical field of view.
28057
28058 og Orthographic format.
28059
28060 Format specific options:
28061
28062 h_fov
28063 v_fov
28064 d_fov
28065 Set output horizontal/vertical/diagonal field of view.
28066 Values in degrees.
28067
28068 If diagonal field of view is set it overrides horizontal
28069 and vertical field of view.
28070
28071 ih_fov
28072 iv_fov
28073 id_fov
28074 Set input horizontal/vertical/diagonal field of view.
28075 Values in degrees.
28076
28077 If diagonal field of view is set it overrides horizontal
28078 and vertical field of view.
28079
28080 octahedron
28081 Octahedron projection.
28082
28083 cylindricalea
28084 Cylindrical Equal Area projection.
28085
28086 interp
28087 Set interpolation method.Note: more complex interpolation methods
28088 require much more memory to run.
28089
28090 Available methods:
28091
28092 near
28093 nearest
28094 Nearest neighbour.
28095
28096 line
28097 linear
28098 Bilinear interpolation.
28099
28100 lagrange9
28101 Lagrange9 interpolation.
28102
28103 cube
28104 cubic
28105 Bicubic interpolation.
28106
28107 lanc
28108 lanczos
28109 Lanczos interpolation.
28110
28111 sp16
28112 spline16
28113 Spline16 interpolation.
28114
28115 gauss
28116 gaussian
28117 Gaussian interpolation.
28118
28119 mitchell
28120 Mitchell interpolation.
28121
28122 Default value is @samp{line}.
28123
28124 w
28125 h Set the output video resolution.
28126
28127 Default resolution depends on formats.
28128
28129 in_stereo
28130 out_stereo
28131 Set the input/output stereo format.
28132
28133 2d 2D mono
28134
28135 sbs Side by side
28136
28137 tb Top bottom
28138
28139 Default value is @samp{2d} for input and output format.
28140
28141 yaw
28142 pitch
28143 roll
28144 Set rotation for the output video. Values in degrees.
28145
28146 rorder
28147 Set rotation order for the output video. Choose one item for each
28148 position.
28149
28150 y, Y
28151 yaw
28152
28153 p, P
28154 pitch
28155
28156 r, R
28157 roll
28158
28159 Default value is @samp{ypr}.
28160
28161 h_flip
28162 v_flip
28163 d_flip
28164 Flip the output video horizontally(swaps
28165 left-right)/vertically(swaps up-down)/in-depth(swaps back-forward).
28166 Boolean values.
28167
28168 ih_flip
28169 iv_flip
28170 Set if input video is flipped horizontally/vertically. Boolean
28171 values.
28172
28173 in_trans
28174 Set if input video is transposed. Boolean value, by default
28175 disabled.
28176
28177 out_trans
28178 Set if output video needs to be transposed. Boolean value, by
28179 default disabled.
28180
28181 h_offset
28182 v_offset
28183 Set output horizontal/vertical off-axis offset. Default is set to
28184 0. Allowed range is from -1 to 1.
28185
28186 alpha_mask
28187 Build mask in alpha plane for all unmapped pixels by marking them
28188 fully transparent. Boolean value, by default disabled.
28189
28190 reset_rot
28191 Reset rotation of output video. Boolean value, by default disabled.
28192
28193 Examples
28194
28195 • Convert equirectangular video to cubemap with 3x2 layout and 1%
28196 padding using bicubic interpolation:
28197
28198 ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
28199
28200 • Extract back view of Equi-Angular Cubemap:
28201
28202 ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
28203
28204 • Convert transposed and horizontally flipped Equi-Angular Cubemap in
28205 side-by-side stereo format to equirectangular top-bottom stereo
28206 format:
28207
28208 v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
28209
28210 Commands
28211
28212 This filter supports subset of above options as commands.
28213
28214 vaguedenoiser
28215 Apply a wavelet based denoiser.
28216
28217 It transforms each frame from the video input into the wavelet domain,
28218 using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
28219 the obtained coefficients. It does an inverse wavelet transform after.
28220 Due to wavelet properties, it should give a nice smoothed result, and
28221 reduced noise, without blurring picture features.
28222
28223 This filter accepts the following options:
28224
28225 threshold
28226 The filtering strength. The higher, the more filtered the video
28227 will be. Hard thresholding can use a higher threshold than soft
28228 thresholding before the video looks overfiltered. Default value is
28229 2.
28230
28231 method
28232 The filtering method the filter will use.
28233
28234 It accepts the following values:
28235
28236 hard
28237 All values under the threshold will be zeroed.
28238
28239 soft
28240 All values under the threshold will be zeroed. All values above
28241 will be reduced by the threshold.
28242
28243 garrote
28244 Scales or nullifies coefficients - intermediary between (more)
28245 soft and (less) hard thresholding.
28246
28247 Default is garrote.
28248
28249 nsteps
28250 Number of times, the wavelet will decompose the picture. Picture
28251 can't be decomposed beyond a particular point (typically, 8 for a
28252 640x480 frame - as 2^9 = 512 > 480). Valid values are integers
28253 between 1 and 32. Default value is 6.
28254
28255 percent
28256 Partial of full denoising (limited coefficients shrinking), from 0
28257 to 100. Default value is 85.
28258
28259 planes
28260 A list of the planes to process. By default all planes are
28261 processed.
28262
28263 type
28264 The threshold type the filter will use.
28265
28266 It accepts the following values:
28267
28268 universal
28269 Threshold used is same for all decompositions.
28270
28271 bayes
28272 Threshold used depends also on each decomposition coefficients.
28273
28274 Default is universal.
28275
28276 varblur
28277 Apply variable blur filter by using 2nd video stream to set blur
28278 radius. The 2nd stream must have the same dimensions.
28279
28280 This filter accepts the following options:
28281
28282 min_r
28283 Set min allowed radius. Allowed range is from 0 to 254. Default is
28284 0.
28285
28286 max_r
28287 Set max allowed radius. Allowed range is from 1 to 255. Default is
28288 8.
28289
28290 planes
28291 Set which planes to process. By default, all are used.
28292
28293 The "varblur" filter also supports the framesync options.
28294
28295 Commands
28296
28297 This filter supports all the above options as commands.
28298
28299 vectorscope
28300 Display 2 color component values in the two dimensional graph (which is
28301 called a vectorscope).
28302
28303 This filter accepts the following options:
28304
28305 mode, m
28306 Set vectorscope mode.
28307
28308 It accepts the following values:
28309
28310 gray
28311 tint
28312 Gray values are displayed on graph, higher brightness means
28313 more pixels have same component color value on location in
28314 graph. This is the default mode.
28315
28316 color
28317 Gray values are displayed on graph. Surrounding pixels values
28318 which are not present in video frame are drawn in gradient of 2
28319 color components which are set by option "x" and "y". The 3rd
28320 color component is static.
28321
28322 color2
28323 Actual color components values present in video frame are
28324 displayed on graph.
28325
28326 color3
28327 Similar as color2 but higher frequency of same values "x" and
28328 "y" on graph increases value of another color component, which
28329 is luminance by default values of "x" and "y".
28330
28331 color4
28332 Actual colors present in video frame are displayed on graph. If
28333 two different colors map to same position on graph then color
28334 with higher value of component not present in graph is picked.
28335
28336 color5
28337 Gray values are displayed on graph. Similar to "color" but with
28338 3rd color component picked from radial gradient.
28339
28340 x Set which color component will be represented on X-axis. Default is
28341 1.
28342
28343 y Set which color component will be represented on Y-axis. Default is
28344 2.
28345
28346 intensity, i
28347 Set intensity, used by modes: gray, color, color3 and color5 for
28348 increasing brightness of color component which represents frequency
28349 of (X, Y) location in graph.
28350
28351 envelope, e
28352 none
28353 No envelope, this is default.
28354
28355 instant
28356 Instant envelope, even darkest single pixel will be clearly
28357 highlighted.
28358
28359 peak
28360 Hold maximum and minimum values presented in graph over time.
28361 This way you can still spot out of range values without
28362 constantly looking at vectorscope.
28363
28364 peak+instant
28365 Peak and instant envelope combined together.
28366
28367 graticule, g
28368 Set what kind of graticule to draw.
28369
28370 none
28371 green
28372 color
28373 invert
28374 opacity, o
28375 Set graticule opacity.
28376
28377 flags, f
28378 Set graticule flags.
28379
28380 white
28381 Draw graticule for white point.
28382
28383 black
28384 Draw graticule for black point.
28385
28386 name
28387 Draw color points short names.
28388
28389 bgopacity, b
28390 Set background opacity.
28391
28392 lthreshold, l
28393 Set low threshold for color component not represented on X or Y
28394 axis. Values lower than this value will be ignored. Default is 0.
28395 Note this value is multiplied with actual max possible value one
28396 pixel component can have. So for 8-bit input and low threshold
28397 value of 0.1 actual threshold is 0.1 * 255 = 25.
28398
28399 hthreshold, h
28400 Set high threshold for color component not represented on X or Y
28401 axis. Values higher than this value will be ignored. Default is 1.
28402 Note this value is multiplied with actual max possible value one
28403 pixel component can have. So for 8-bit input and high threshold
28404 value of 0.9 actual threshold is 0.9 * 255 = 230.
28405
28406 colorspace, c
28407 Set what kind of colorspace to use when drawing graticule.
28408
28409 auto
28410 601
28411 709
28412
28413 Default is auto.
28414
28415 tint0, t0
28416 tint1, t1
28417 Set color tint for gray/tint vectorscope mode. By default both
28418 options are zero. This means no tint, and output will remain gray.
28419
28420 vidstabdetect
28421 Analyze video stabilization/deshaking. Perform pass 1 of 2, see
28422 vidstabtransform for pass 2.
28423
28424 This filter generates a file with relative translation and rotation
28425 transform information about subsequent frames, which is then used by
28426 the vidstabtransform filter.
28427
28428 To enable compilation of this filter you need to configure FFmpeg with
28429 "--enable-libvidstab".
28430
28431 This filter accepts the following options:
28432
28433 result
28434 Set the path to the file used to write the transforms information.
28435 Default value is transforms.trf.
28436
28437 shakiness
28438 Set how shaky the video is and how quick the camera is. It accepts
28439 an integer in the range 1-10, a value of 1 means little shakiness,
28440 a value of 10 means strong shakiness. Default value is 5.
28441
28442 accuracy
28443 Set the accuracy of the detection process. It must be a value in
28444 the range 1-15. A value of 1 means low accuracy, a value of 15
28445 means high accuracy. Default value is 15.
28446
28447 stepsize
28448 Set stepsize of the search process. The region around minimum is
28449 scanned with 1 pixel resolution. Default value is 6.
28450
28451 mincontrast
28452 Set minimum contrast. Below this value a local measurement field is
28453 discarded. Must be a floating point value in the range 0-1. Default
28454 value is 0.3.
28455
28456 tripod
28457 Set reference frame number for tripod mode.
28458
28459 If enabled, the motion of the frames is compared to a reference
28460 frame in the filtered stream, identified by the specified number.
28461 The idea is to compensate all movements in a more-or-less static
28462 scene and keep the camera view absolutely still.
28463
28464 If set to 0, it is disabled. The frames are counted starting from
28465 1.
28466
28467 show
28468 Show fields and transforms in the resulting frames. It accepts an
28469 integer in the range 0-2. Default value is 0, which disables any
28470 visualization.
28471
28472 Examples
28473
28474 • Use default values:
28475
28476 vidstabdetect
28477
28478 • Analyze strongly shaky movie and put the results in file
28479 mytransforms.trf:
28480
28481 vidstabdetect=shakiness=10:accuracy=15:result="mytransforms.trf"
28482
28483 • Visualize the result of internal transformations in the resulting
28484 video:
28485
28486 vidstabdetect=show=1
28487
28488 • Analyze a video with medium shakiness using ffmpeg:
28489
28490 ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
28491
28492 vidstabtransform
28493 Video stabilization/deshaking: pass 2 of 2, see vidstabdetect for pass
28494 1.
28495
28496 Read a file with transform information for each frame and
28497 apply/compensate them. Together with the vidstabdetect filter this can
28498 be used to deshake videos. See also
28499 <http://public.hronopik.de/vid.stab>. It is important to also use the
28500 unsharp filter, see below.
28501
28502 To enable compilation of this filter you need to configure FFmpeg with
28503 "--enable-libvidstab".
28504
28505 Options
28506
28507 input
28508 Set path to the file used to read the transforms. Default value is
28509 transforms.trf.
28510
28511 smoothing
28512 Set the number of frames (value*2 + 1) used for lowpass filtering
28513 the camera movements. Default value is 10.
28514
28515 For example a number of 10 means that 21 frames are used (10 in the
28516 past and 10 in the future) to smoothen the motion in the video. A
28517 larger value leads to a smoother video, but limits the acceleration
28518 of the camera (pan/tilt movements). 0 is a special case where a
28519 static camera is simulated.
28520
28521 optalgo
28522 Set the camera path optimization algorithm.
28523
28524 Accepted values are:
28525
28526 gauss
28527 gaussian kernel low-pass filter on camera motion (default)
28528
28529 avg averaging on transformations
28530
28531 maxshift
28532 Set maximal number of pixels to translate frames. Default value is
28533 -1, meaning no limit.
28534
28535 maxangle
28536 Set maximal angle in radians (degree*PI/180) to rotate frames.
28537 Default value is -1, meaning no limit.
28538
28539 crop
28540 Specify how to deal with borders that may be visible due to
28541 movement compensation.
28542
28543 Available values are:
28544
28545 keep
28546 keep image information from previous frame (default)
28547
28548 black
28549 fill the border black
28550
28551 invert
28552 Invert transforms if set to 1. Default value is 0.
28553
28554 relative
28555 Consider transforms as relative to previous frame if set to 1,
28556 absolute if set to 0. Default value is 0.
28557
28558 zoom
28559 Set percentage to zoom. A positive value will result in a zoom-in
28560 effect, a negative value in a zoom-out effect. Default value is 0
28561 (no zoom).
28562
28563 optzoom
28564 Set optimal zooming to avoid borders.
28565
28566 Accepted values are:
28567
28568 0 disabled
28569
28570 1 optimal static zoom value is determined (only very strong
28571 movements will lead to visible borders) (default)
28572
28573 2 optimal adaptive zoom value is determined (no borders will be
28574 visible), see zoomspeed
28575
28576 Note that the value given at zoom is added to the one calculated
28577 here.
28578
28579 zoomspeed
28580 Set percent to zoom maximally each frame (enabled when optzoom is
28581 set to 2). Range is from 0 to 5, default value is 0.25.
28582
28583 interpol
28584 Specify type of interpolation.
28585
28586 Available values are:
28587
28588 no no interpolation
28589
28590 linear
28591 linear only horizontal
28592
28593 bilinear
28594 linear in both directions (default)
28595
28596 bicubic
28597 cubic in both directions (slow)
28598
28599 tripod
28600 Enable virtual tripod mode if set to 1, which is equivalent to
28601 "relative=0:smoothing=0". Default value is 0.
28602
28603 Use also "tripod" option of vidstabdetect.
28604
28605 debug
28606 Increase log verbosity if set to 1. Also the detected global
28607 motions are written to the temporary file global_motions.trf.
28608 Default value is 0.
28609
28610 Examples
28611
28612 • Use ffmpeg for a typical stabilization with default values:
28613
28614 ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
28615
28616 Note the use of the unsharp filter which is always recommended.
28617
28618 • Zoom in a bit more and load transform data from a given file:
28619
28620 vidstabtransform=zoom=5:input="mytransforms.trf"
28621
28622 • Smoothen the video even more:
28623
28624 vidstabtransform=smoothing=30
28625
28626 vflip
28627 Flip the input video vertically.
28628
28629 For example, to vertically flip a video with ffmpeg:
28630
28631 ffmpeg -i in.avi -vf "vflip" out.avi
28632
28633 vfrdet
28634 Detect variable frame rate video.
28635
28636 This filter tries to detect if the input is variable or constant frame
28637 rate.
28638
28639 At end it will output number of frames detected as having variable
28640 delta pts, and ones with constant delta pts. If there was frames with
28641 variable delta, than it will also show min, max and average delta
28642 encountered.
28643
28644 vibrance
28645 Boost or alter saturation.
28646
28647 The filter accepts the following options:
28648
28649 intensity
28650 Set strength of boost if positive value or strength of alter if
28651 negative value. Default is 0. Allowed range is from -2 to 2.
28652
28653 rbal
28654 Set the red balance. Default is 1. Allowed range is from -10 to 10.
28655
28656 gbal
28657 Set the green balance. Default is 1. Allowed range is from -10 to
28658 10.
28659
28660 bbal
28661 Set the blue balance. Default is 1. Allowed range is from -10 to
28662 10.
28663
28664 rlum
28665 Set the red luma coefficient.
28666
28667 glum
28668 Set the green luma coefficient.
28669
28670 blum
28671 Set the blue luma coefficient.
28672
28673 alternate
28674 If "intensity" is negative and this is set to 1, colors will
28675 change, otherwise colors will be less saturated, more towards gray.
28676
28677 Commands
28678
28679 This filter supports the all above options as commands.
28680
28681 vif
28682 Obtain the average VIF (Visual Information Fidelity) between two input
28683 videos.
28684
28685 This filter takes two input videos.
28686
28687 Both input videos must have the same resolution and pixel format for
28688 this filter to work correctly. Also it assumes that both inputs have
28689 the same number of frames, which are compared one by one.
28690
28691 The obtained average VIF score is printed through the logging system.
28692
28693 The filter stores the calculated VIF score of each frame.
28694
28695 In the below example the input file main.mpg being processed is
28696 compared with the reference file ref.mpg.
28697
28698 ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
28699
28700 vignette
28701 Make or reverse a natural vignetting effect.
28702
28703 The filter accepts the following options:
28704
28705 angle, a
28706 Set lens angle expression as a number of radians.
28707
28708 The value is clipped in the "[0,PI/2]" range.
28709
28710 Default value: "PI/5"
28711
28712 x0
28713 y0 Set center coordinates expressions. Respectively "w/2" and "h/2" by
28714 default.
28715
28716 mode
28717 Set forward/backward mode.
28718
28719 Available modes are:
28720
28721 forward
28722 The larger the distance from the central point, the darker the
28723 image becomes.
28724
28725 backward
28726 The larger the distance from the central point, the brighter
28727 the image becomes. This can be used to reverse a vignette
28728 effect, though there is no automatic detection to extract the
28729 lens angle and other settings (yet). It can also be used to
28730 create a burning effect.
28731
28732 Default value is forward.
28733
28734 eval
28735 Set evaluation mode for the expressions (angle, x0, y0).
28736
28737 It accepts the following values:
28738
28739 init
28740 Evaluate expressions only once during the filter
28741 initialization.
28742
28743 frame
28744 Evaluate expressions for each incoming frame. This is way
28745 slower than the init mode since it requires all the scalers to
28746 be re-computed, but it allows advanced dynamic expressions.
28747
28748 Default value is init.
28749
28750 dither
28751 Set dithering to reduce the circular banding effects. Default is 1
28752 (enabled).
28753
28754 aspect
28755 Set vignette aspect. This setting allows one to adjust the shape of
28756 the vignette. Setting this value to the SAR of the input will make
28757 a rectangular vignetting following the dimensions of the video.
28758
28759 Default is "1/1".
28760
28761 Expressions
28762
28763 The alpha, x0 and y0 expressions can contain the following parameters.
28764
28765 w
28766 h input width and height
28767
28768 n the number of input frame, starting from 0
28769
28770 pts the PTS (Presentation TimeStamp) time of the filtered video frame,
28771 expressed in TB units, NAN if undefined
28772
28773 r frame rate of the input video, NAN if the input frame rate is
28774 unknown
28775
28776 t the PTS (Presentation TimeStamp) of the filtered video frame,
28777 expressed in seconds, NAN if undefined
28778
28779 tb time base of the input video
28780
28781 Examples
28782
28783 • Apply simple strong vignetting effect:
28784
28785 vignette=PI/4
28786
28787 • Make a flickering vignetting:
28788
28789 vignette='PI/4+random(1)*PI/50':eval=frame
28790
28791 vmafmotion
28792 Obtain the average VMAF motion score of a video. It is one of the
28793 component metrics of VMAF.
28794
28795 The obtained average motion score is printed through the logging
28796 system.
28797
28798 The filter accepts the following options:
28799
28800 stats_file
28801 If specified, the filter will use the named file to save the motion
28802 score of each frame with respect to the previous frame. When
28803 filename equals "-" the data is sent to standard output.
28804
28805 Example:
28806
28807 ffmpeg -i ref.mpg -vf vmafmotion -f null -
28808
28809 vstack
28810 Stack input videos vertically.
28811
28812 All streams must be of same pixel format and of same width.
28813
28814 Note that this filter is faster than using overlay and pad filter to
28815 create same output.
28816
28817 The filter accepts the following options:
28818
28819 inputs
28820 Set number of input streams. Default is 2.
28821
28822 shortest
28823 If set to 1, force the output to terminate when the shortest input
28824 terminates. Default value is 0.
28825
28826 w3fdif
28827 Deinterlace the input video ("w3fdif" stands for "Weston 3 Field
28828 Deinterlacing Filter").
28829
28830 Based on the process described by Martin Weston for BBC R&D, and
28831 implemented based on the de-interlace algorithm written by Jim
28832 Easterbrook for BBC R&D, the Weston 3 field deinterlacing filter uses
28833 filter coefficients calculated by BBC R&D.
28834
28835 This filter uses field-dominance information in frame to decide which
28836 of each pair of fields to place first in the output. If it gets it
28837 wrong use setfield filter before "w3fdif" filter.
28838
28839 There are two sets of filter coefficients, so called "simple" and
28840 "complex". Which set of filter coefficients is used can be set by
28841 passing an optional parameter:
28842
28843 filter
28844 Set the interlacing filter coefficients. Accepts one of the
28845 following values:
28846
28847 simple
28848 Simple filter coefficient set.
28849
28850 complex
28851 More-complex filter coefficient set.
28852
28853 Default value is complex.
28854
28855 mode
28856 The interlacing mode to adopt. It accepts one of the following
28857 values:
28858
28859 frame
28860 Output one frame for each frame.
28861
28862 field
28863 Output one frame for each field.
28864
28865 The default value is "field".
28866
28867 parity
28868 The picture field parity assumed for the input interlaced video. It
28869 accepts one of the following values:
28870
28871 tff Assume the top field is first.
28872
28873 bff Assume the bottom field is first.
28874
28875 auto
28876 Enable automatic detection of field parity.
28877
28878 The default value is "auto". If the interlacing is unknown or the
28879 decoder does not export this information, top field first will be
28880 assumed.
28881
28882 deint
28883 Specify which frames to deinterlace. Accepts one of the following
28884 values:
28885
28886 all Deinterlace all frames,
28887
28888 interlaced
28889 Only deinterlace frames marked as interlaced.
28890
28891 Default value is all.
28892
28893 Commands
28894
28895 This filter supports same commands as options.
28896
28897 waveform
28898 Video waveform monitor.
28899
28900 The waveform monitor plots color component intensity. By default
28901 luminance only. Each column of the waveform corresponds to a column of
28902 pixels in the source video.
28903
28904 It accepts the following options:
28905
28906 mode, m
28907 Can be either "row", or "column". Default is "column". In row
28908 mode, the graph on the left side represents color component value 0
28909 and the right side represents value = 255. In column mode, the top
28910 side represents color component value = 0 and bottom side
28911 represents value = 255.
28912
28913 intensity, i
28914 Set intensity. Smaller values are useful to find out how many
28915 values of the same luminance are distributed across input
28916 rows/columns. Default value is 0.04. Allowed range is [0, 1].
28917
28918 mirror, r
28919 Set mirroring mode. 0 means unmirrored, 1 means mirrored. In
28920 mirrored mode, higher values will be represented on the left side
28921 for "row" mode and at the top for "column" mode. Default is 1
28922 (mirrored).
28923
28924 display, d
28925 Set display mode. It accepts the following values:
28926
28927 overlay
28928 Presents information identical to that in the "parade", except
28929 that the graphs representing color components are superimposed
28930 directly over one another.
28931
28932 This display mode makes it easier to spot relative differences
28933 or similarities in overlapping areas of the color components
28934 that are supposed to be identical, such as neutral whites,
28935 grays, or blacks.
28936
28937 stack
28938 Display separate graph for the color components side by side in
28939 "row" mode or one below the other in "column" mode.
28940
28941 parade
28942 Display separate graph for the color components side by side in
28943 "column" mode or one below the other in "row" mode.
28944
28945 Using this display mode makes it easy to spot color casts in
28946 the highlights and shadows of an image, by comparing the
28947 contours of the top and the bottom graphs of each waveform.
28948 Since whites, grays, and blacks are characterized by exactly
28949 equal amounts of red, green, and blue, neutral areas of the
28950 picture should display three waveforms of roughly equal
28951 width/height. If not, the correction is easy to perform by
28952 making level adjustments the three waveforms.
28953
28954 Default is "stack".
28955
28956 components, c
28957 Set which color components to display. Default is 1, which means
28958 only luminance or red color component if input is in RGB
28959 colorspace. If is set for example to 7 it will display all 3 (if)
28960 available color components.
28961
28962 envelope, e
28963 none
28964 No envelope, this is default.
28965
28966 instant
28967 Instant envelope, minimum and maximum values presented in graph
28968 will be easily visible even with small "step" value.
28969
28970 peak
28971 Hold minimum and maximum values presented in graph across time.
28972 This way you can still spot out of range values without
28973 constantly looking at waveforms.
28974
28975 peak+instant
28976 Peak and instant envelope combined together.
28977
28978 filter, f
28979 lowpass
28980 No filtering, this is default.
28981
28982 flat
28983 Luma and chroma combined together.
28984
28985 aflat
28986 Similar as above, but shows difference between blue and red
28987 chroma.
28988
28989 xflat
28990 Similar as above, but use different colors.
28991
28992 yflat
28993 Similar as above, but again with different colors.
28994
28995 chroma
28996 Displays only chroma.
28997
28998 color
28999 Displays actual color value on waveform.
29000
29001 acolor
29002 Similar as above, but with luma showing frequency of chroma
29003 values.
29004
29005 graticule, g
29006 Set which graticule to display.
29007
29008 none
29009 Do not display graticule.
29010
29011 green
29012 Display green graticule showing legal broadcast ranges.
29013
29014 orange
29015 Display orange graticule showing legal broadcast ranges.
29016
29017 invert
29018 Display invert graticule showing legal broadcast ranges.
29019
29020 opacity, o
29021 Set graticule opacity.
29022
29023 flags, fl
29024 Set graticule flags.
29025
29026 numbers
29027 Draw numbers above lines. By default enabled.
29028
29029 dots
29030 Draw dots instead of lines.
29031
29032 scale, s
29033 Set scale used for displaying graticule.
29034
29035 digital
29036 millivolts
29037 ire
29038
29039 Default is digital.
29040
29041 bgopacity, b
29042 Set background opacity.
29043
29044 tint0, t0
29045 tint1, t1
29046 Set tint for output. Only used with lowpass filter and when
29047 display is not overlay and input pixel formats are not RGB.
29048
29049 fitmode, fm
29050 Set sample aspect ratio of video output frames. Can be used to
29051 configure waveform so it is not streched too much in one of
29052 directions.
29053
29054 none
29055 Set sample aspect ration to 1/1.
29056
29057 size
29058 Set sample aspect ratio to match input size of video
29059
29060 Default is none.
29061
29062 weave, doubleweave
29063 The "weave" takes a field-based video input and join each two
29064 sequential fields into single frame, producing a new double height clip
29065 with half the frame rate and half the frame count.
29066
29067 The "doubleweave" works same as "weave" but without halving frame rate
29068 and frame count.
29069
29070 It accepts the following option:
29071
29072 first_field
29073 Set first field. Available values are:
29074
29075 top, t
29076 Set the frame as top-field-first.
29077
29078 bottom, b
29079 Set the frame as bottom-field-first.
29080
29081 Examples
29082
29083 • Interlace video using select and separatefields filter:
29084
29085 separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
29086
29087 xbr
29088 Apply the xBR high-quality magnification filter which is designed for
29089 pixel art. It follows a set of edge-detection rules, see
29090 <https://forums.libretro.com/t/xbr-algorithm-tutorial/123>.
29091
29092 It accepts the following option:
29093
29094 n Set the scaling dimension: 2 for "2xBR", 3 for "3xBR" and 4 for
29095 "4xBR". Default is 3.
29096
29097 xcorrelate
29098 Apply normalized cross-correlation between first and second input video
29099 stream.
29100
29101 Second input video stream dimensions must be lower than first input
29102 video stream.
29103
29104 The filter accepts the following options:
29105
29106 planes
29107 Set which planes to process.
29108
29109 secondary
29110 Set which secondary video frames will be processed from second
29111 input video stream, can be first or all. Default is all.
29112
29113 The "xcorrelate" filter also supports the framesync options.
29114
29115 xfade
29116 Apply cross fade from one input video stream to another input video
29117 stream. The cross fade is applied for specified duration.
29118
29119 Both inputs must be constant frame-rate and have the same resolution,
29120 pixel format, frame rate and timebase.
29121
29122 The filter accepts the following options:
29123
29124 transition
29125 Set one of available transition effects:
29126
29127 custom
29128 fade
29129 wipeleft
29130 wiperight
29131 wipeup
29132 wipedown
29133 slideleft
29134 slideright
29135 slideup
29136 slidedown
29137 circlecrop
29138 rectcrop
29139 distance
29140 fadeblack
29141 fadewhite
29142 radial
29143 smoothleft
29144 smoothright
29145 smoothup
29146 smoothdown
29147 circleopen
29148 circleclose
29149 vertopen
29150 vertclose
29151 horzopen
29152 horzclose
29153 dissolve
29154 pixelize
29155 diagtl
29156 diagtr
29157 diagbl
29158 diagbr
29159 hlslice
29160 hrslice
29161 vuslice
29162 vdslice
29163 hblur
29164 fadegrays
29165 wipetl
29166 wipetr
29167 wipebl
29168 wipebr
29169 squeezeh
29170 squeezev
29171 zoomin
29172
29173 Default transition effect is fade.
29174
29175 duration
29176 Set cross fade duration in seconds. Range is 0 to 60 seconds.
29177 Default duration is 1 second.
29178
29179 offset
29180 Set cross fade start relative to first input stream in seconds.
29181 Default offset is 0.
29182
29183 expr
29184 Set expression for custom transition effect.
29185
29186 The expressions can use the following variables and functions:
29187
29188 X
29189 Y The coordinates of the current sample.
29190
29191 W
29192 H The width and height of the image.
29193
29194 P Progress of transition effect.
29195
29196 PLANE
29197 Currently processed plane.
29198
29199 A Return value of first input at current location and plane.
29200
29201 B Return value of second input at current location and plane.
29202
29203 a0(x, y)
29204 a1(x, y)
29205 a2(x, y)
29206 a3(x, y)
29207 Return the value of the pixel at location (x,y) of the
29208 first/second/third/fourth component of first input.
29209
29210 b0(x, y)
29211 b1(x, y)
29212 b2(x, y)
29213 b3(x, y)
29214 Return the value of the pixel at location (x,y) of the
29215 first/second/third/fourth component of second input.
29216
29217 Examples
29218
29219 • Cross fade from one input video to another input video, with fade
29220 transition and duration of transition of 2 seconds starting at
29221 offset of 5 seconds:
29222
29223 ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
29224
29225 xmedian
29226 Pick median pixels from several input videos.
29227
29228 The filter accepts the following options:
29229
29230 inputs
29231 Set number of inputs. Default is 3. Allowed range is from 3 to
29232 255. If number of inputs is even number, than result will be mean
29233 value between two median values.
29234
29235 planes
29236 Set which planes to filter. Default value is 15, by which all
29237 planes are processed.
29238
29239 percentile
29240 Set median percentile. Default value is 0.5. Default value of 0.5
29241 will pick always median values, while 0 will pick minimum values,
29242 and 1 maximum values.
29243
29244 Commands
29245
29246 This filter supports all above options as commands, excluding option
29247 "inputs".
29248
29249 xstack
29250 Stack video inputs into custom layout.
29251
29252 All streams must be of same pixel format.
29253
29254 The filter accepts the following options:
29255
29256 inputs
29257 Set number of input streams. Default is 2.
29258
29259 layout
29260 Specify layout of inputs. This option requires the desired layout
29261 configuration to be explicitly set by the user. This sets position
29262 of each video input in output. Each input is separated by '|'. The
29263 first number represents the column, and the second number
29264 represents the row. Numbers start at 0 and are separated by '_'.
29265 Optionally one can use wX and hX, where X is video input from which
29266 to take width or height. Multiple values can be used when
29267 separated by '+'. In such case values are summed together.
29268
29269 Note that if inputs are of different sizes gaps may appear, as not
29270 all of the output video frame will be filled. Similarly, videos can
29271 overlap each other if their position doesn't leave enough space for
29272 the full frame of adjoining videos.
29273
29274 For 2 inputs, a default layout of "0_0|w0_0" is set. In all other
29275 cases, a layout must be set by the user.
29276
29277 shortest
29278 If set to 1, force the output to terminate when the shortest input
29279 terminates. Default value is 0.
29280
29281 fill
29282 If set to valid color, all unused pixels will be filled with that
29283 color. By default fill is set to none, so it is disabled.
29284
29285 Examples
29286
29287 • Display 4 inputs into 2x2 grid.
29288
29289 Layout:
29290
29291 input1(0, 0) | input3(w0, 0)
29292 input2(0, h0) | input4(w0, h0)
29293
29294
29295
29296 xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
29297
29298 Note that if inputs are of different sizes, gaps or overlaps may
29299 occur.
29300
29301 • Display 4 inputs into 1x4 grid.
29302
29303 Layout:
29304
29305 input1(0, 0)
29306 input2(0, h0)
29307 input3(0, h0+h1)
29308 input4(0, h0+h1+h2)
29309
29310
29311
29312 xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
29313
29314 Note that if inputs are of different widths, unused space will
29315 appear.
29316
29317 • Display 9 inputs into 3x3 grid.
29318
29319 Layout:
29320
29321 input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
29322 input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
29323 input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
29324
29325
29326
29327 xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_h0+h1
29328
29329 Note that if inputs are of different sizes, gaps or overlaps may
29330 occur.
29331
29332 • Display 16 inputs into 4x4 grid.
29333
29334 Layout:
29335
29336 input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
29337 input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
29338 input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
29339 input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
29340
29341
29342
29343 xstack=inputs=16:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2|w0_0|w0_h0|w0_h0+h1|w0_h0+h1+h2|w0+w4_0|
29344 w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
29345
29346 Note that if inputs are of different sizes, gaps or overlaps may
29347 occur.
29348
29349 yadif
29350 Deinterlace the input video ("yadif" means "yet another deinterlacing
29351 filter").
29352
29353 It accepts the following parameters:
29354
29355 mode
29356 The interlacing mode to adopt. It accepts one of the following
29357 values:
29358
29359 0, send_frame
29360 Output one frame for each frame.
29361
29362 1, send_field
29363 Output one frame for each field.
29364
29365 2, send_frame_nospatial
29366 Like "send_frame", but it skips the spatial interlacing check.
29367
29368 3, send_field_nospatial
29369 Like "send_field", but it skips the spatial interlacing check.
29370
29371 The default value is "send_frame".
29372
29373 parity
29374 The picture field parity assumed for the input interlaced video. It
29375 accepts one of the following values:
29376
29377 0, tff
29378 Assume the top field is first.
29379
29380 1, bff
29381 Assume the bottom field is first.
29382
29383 -1, auto
29384 Enable automatic detection of field parity.
29385
29386 The default value is "auto". If the interlacing is unknown or the
29387 decoder does not export this information, top field first will be
29388 assumed.
29389
29390 deint
29391 Specify which frames to deinterlace. Accepts one of the following
29392 values:
29393
29394 0, all
29395 Deinterlace all frames.
29396
29397 1, interlaced
29398 Only deinterlace frames marked as interlaced.
29399
29400 The default value is "all".
29401
29402 yadif_cuda
29403 Deinterlace the input video using the yadif algorithm, but implemented
29404 in CUDA so that it can work as part of a GPU accelerated pipeline with
29405 nvdec and/or nvenc.
29406
29407 It accepts the following parameters:
29408
29409 mode
29410 The interlacing mode to adopt. It accepts one of the following
29411 values:
29412
29413 0, send_frame
29414 Output one frame for each frame.
29415
29416 1, send_field
29417 Output one frame for each field.
29418
29419 2, send_frame_nospatial
29420 Like "send_frame", but it skips the spatial interlacing check.
29421
29422 3, send_field_nospatial
29423 Like "send_field", but it skips the spatial interlacing check.
29424
29425 The default value is "send_frame".
29426
29427 parity
29428 The picture field parity assumed for the input interlaced video. It
29429 accepts one of the following values:
29430
29431 0, tff
29432 Assume the top field is first.
29433
29434 1, bff
29435 Assume the bottom field is first.
29436
29437 -1, auto
29438 Enable automatic detection of field parity.
29439
29440 The default value is "auto". If the interlacing is unknown or the
29441 decoder does not export this information, top field first will be
29442 assumed.
29443
29444 deint
29445 Specify which frames to deinterlace. Accepts one of the following
29446 values:
29447
29448 0, all
29449 Deinterlace all frames.
29450
29451 1, interlaced
29452 Only deinterlace frames marked as interlaced.
29453
29454 The default value is "all".
29455
29456 yaepblur
29457 Apply blur filter while preserving edges ("yaepblur" means "yet another
29458 edge preserving blur filter"). The algorithm is described in "J. S.
29459 Lee, Digital image enhancement and noise filtering by use of local
29460 statistics, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 1980."
29461
29462 It accepts the following parameters:
29463
29464 radius, r
29465 Set the window radius. Default value is 3.
29466
29467 planes, p
29468 Set which planes to filter. Default is only the first plane.
29469
29470 sigma, s
29471 Set blur strength. Default value is 128.
29472
29473 Commands
29474
29475 This filter supports same commands as options.
29476
29477 zoompan
29478 Apply Zoom & Pan effect.
29479
29480 This filter accepts the following options:
29481
29482 zoom, z
29483 Set the zoom expression. Range is 1-10. Default is 1.
29484
29485 x
29486 y Set the x and y expression. Default is 0.
29487
29488 d Set the duration expression in number of frames. This sets for how
29489 many number of frames effect will last for single input image.
29490 Default is 90.
29491
29492 s Set the output image size, default is 'hd720'.
29493
29494 fps Set the output frame rate, default is '25'.
29495
29496 Each expression can contain the following constants:
29497
29498 in_w, iw
29499 Input width.
29500
29501 in_h, ih
29502 Input height.
29503
29504 out_w, ow
29505 Output width.
29506
29507 out_h, oh
29508 Output height.
29509
29510 in Input frame count.
29511
29512 on Output frame count.
29513
29514 in_time, it
29515 The input timestamp expressed in seconds. It's NAN if the input
29516 timestamp is unknown.
29517
29518 out_time, time, ot
29519 The output timestamp expressed in seconds.
29520
29521 x
29522 y Last calculated 'x' and 'y' position from 'x' and 'y' expression
29523 for current input frame.
29524
29525 px
29526 py 'x' and 'y' of last output frame of previous input frame or 0 when
29527 there was not yet such frame (first input frame).
29528
29529 zoom
29530 Last calculated zoom from 'z' expression for current input frame.
29531
29532 pzoom
29533 Last calculated zoom of last output frame of previous input frame.
29534
29535 duration
29536 Number of output frames for current input frame. Calculated from
29537 'd' expression for each input frame.
29538
29539 pduration
29540 number of output frames created for previous input frame
29541
29542 a Rational number: input width / input height
29543
29544 sar sample aspect ratio
29545
29546 dar display aspect ratio
29547
29548 Examples
29549
29550 • Zoom in up to 1.5x and pan at same time to some spot near center of
29551 picture:
29552
29553 zoompan=z='min(zoom+0.0015,1.5)':d=700:x='if(gte(zoom,1.5),x,x+1/a)':y='if(gte(zoom,1.5),y,y+1)':s=640x360
29554
29555 • Zoom in up to 1.5x and pan always at center of picture:
29556
29557 zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
29558
29559 • Same as above but without pausing:
29560
29561 zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
29562
29563 • Zoom in 2x into center of picture only for the first second of the
29564 input video:
29565
29566 zoompan=z='if(between(in_time,0,1),2,1)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
29567
29568 zscale
29569 Scale (resize) the input video, using the z.lib library:
29570 <https://github.com/sekrit-twc/zimg>. To enable compilation of this
29571 filter, you need to configure FFmpeg with "--enable-libzimg".
29572
29573 The zscale filter forces the output display aspect ratio to be the same
29574 as the input, by changing the output sample aspect ratio.
29575
29576 If the input image format is different from the format requested by the
29577 next filter, the zscale filter will convert the input to the requested
29578 format.
29579
29580 Options
29581
29582 The filter accepts the following options.
29583
29584 width, w
29585 height, h
29586 Set the output video dimension expression. Default value is the
29587 input dimension.
29588
29589 If the width or w value is 0, the input width is used for the
29590 output. If the height or h value is 0, the input height is used for
29591 the output.
29592
29593 If one and only one of the values is -n with n >= 1, the zscale
29594 filter will use a value that maintains the aspect ratio of the
29595 input image, calculated from the other specified dimension. After
29596 that it will, however, make sure that the calculated dimension is
29597 divisible by n and adjust the value if necessary.
29598
29599 If both values are -n with n >= 1, the behavior will be identical
29600 to both values being set to 0 as previously detailed.
29601
29602 See below for the list of accepted constants for use in the
29603 dimension expression.
29604
29605 size, s
29606 Set the video size. For the syntax of this option, check the "Video
29607 size" section in the ffmpeg-utils manual.
29608
29609 dither, d
29610 Set the dither type.
29611
29612 Possible values are:
29613
29614 none
29615 ordered
29616 random
29617 error_diffusion
29618
29619 Default is none.
29620
29621 filter, f
29622 Set the resize filter type.
29623
29624 Possible values are:
29625
29626 point
29627 bilinear
29628 bicubic
29629 spline16
29630 spline36
29631 lanczos
29632
29633 Default is bilinear.
29634
29635 range, r
29636 Set the color range.
29637
29638 Possible values are:
29639
29640 input
29641 limited
29642 full
29643
29644 Default is same as input.
29645
29646 primaries, p
29647 Set the color primaries.
29648
29649 Possible values are:
29650
29651 input
29652 709
29653 unspecified
29654 170m
29655 240m
29656 2020
29657
29658 Default is same as input.
29659
29660 transfer, t
29661 Set the transfer characteristics.
29662
29663 Possible values are:
29664
29665 input
29666 709
29667 unspecified
29668 601
29669 linear
29670 2020_10
29671 2020_12
29672 smpte2084
29673 iec61966-2-1
29674 arib-std-b67
29675
29676 Default is same as input.
29677
29678 matrix, m
29679 Set the colorspace matrix.
29680
29681 Possible value are:
29682
29683 input
29684 709
29685 unspecified
29686 470bg
29687 170m
29688 2020_ncl
29689 2020_cl
29690
29691 Default is same as input.
29692
29693 rangein, rin
29694 Set the input color range.
29695
29696 Possible values are:
29697
29698 input
29699 limited
29700 full
29701
29702 Default is same as input.
29703
29704 primariesin, pin
29705 Set the input color primaries.
29706
29707 Possible values are:
29708
29709 input
29710 709
29711 unspecified
29712 170m
29713 240m
29714 2020
29715
29716 Default is same as input.
29717
29718 transferin, tin
29719 Set the input transfer characteristics.
29720
29721 Possible values are:
29722
29723 input
29724 709
29725 unspecified
29726 601
29727 linear
29728 2020_10
29729 2020_12
29730
29731 Default is same as input.
29732
29733 matrixin, min
29734 Set the input colorspace matrix.
29735
29736 Possible value are:
29737
29738 input
29739 709
29740 unspecified
29741 470bg
29742 170m
29743 2020_ncl
29744 2020_cl
29745 chromal, c
29746 Set the output chroma location.
29747
29748 Possible values are:
29749
29750 input
29751 left
29752 center
29753 topleft
29754 top
29755 bottomleft
29756 bottom
29757 chromalin, cin
29758 Set the input chroma location.
29759
29760 Possible values are:
29761
29762 input
29763 left
29764 center
29765 topleft
29766 top
29767 bottomleft
29768 bottom
29769 npl Set the nominal peak luminance.
29770
29771 param_a
29772 Parameter A for scaling filters. Parameter "b" for bicubic, and the
29773 number of filter taps for lanczos.
29774
29775 param_b
29776 Parameter B for scaling filters. Parameter "c" for bicubic.
29777
29778 The values of the w and h options are expressions containing the
29779 following constants:
29780
29781 in_w
29782 in_h
29783 The input width and height
29784
29785 iw
29786 ih These are the same as in_w and in_h.
29787
29788 out_w
29789 out_h
29790 The output (scaled) width and height
29791
29792 ow
29793 oh These are the same as out_w and out_h
29794
29795 a The same as iw / ih
29796
29797 sar input sample aspect ratio
29798
29799 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
29800
29801 hsub
29802 vsub
29803 horizontal and vertical input chroma subsample values. For example
29804 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
29805
29806 ohsub
29807 ovsub
29808 horizontal and vertical output chroma subsample values. For example
29809 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
29810
29811 Commands
29812
29813 This filter supports the following commands:
29814
29815 width, w
29816 height, h
29817 Set the output video dimension expression. The command accepts the
29818 same syntax of the corresponding option.
29819
29820 If the specified expression is not valid, it is kept at its current
29821 value.
29822
29824 Below is a description of the currently available OpenCL video filters.
29825
29826 To enable compilation of these filters you need to configure FFmpeg
29827 with "--enable-opencl".
29828
29829 Running OpenCL filters requires you to initialize a hardware device and
29830 to pass that device to all filters in any filter graph.
29831
29832 -init_hw_device opencl[=name][:device[,key=value...]]
29833 Initialise a new hardware device of type opencl called name, using
29834 the given device parameters.
29835
29836 -filter_hw_device name
29837 Pass the hardware device called name to all filters in any filter
29838 graph.
29839
29840 For more detailed information see
29841 <https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options>
29842
29843 • Example of choosing the first device on the second platform and
29844 running avgblur_opencl filter with default parameters on it.
29845
29846 -init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf "hwupload, avgblur_opencl, hwdownload" OUTPUT
29847
29848 Since OpenCL filters are not able to access frame data in normal
29849 memory, all frame data needs to be uploaded(hwupload) to hardware
29850 surfaces connected to the appropriate device before being used and then
29851 downloaded(hwdownload) back to normal memory. Note that hwupload will
29852 upload to a surface with the same layout as the software frame, so it
29853 may be necessary to add a format filter immediately before to get the
29854 input into the right format and hwdownload does not support all formats
29855 on the output - it may be necessary to insert an additional format
29856 filter immediately following in the graph to get the output in a
29857 supported format.
29858
29859 avgblur_opencl
29860 Apply average blur filter.
29861
29862 The filter accepts the following options:
29863
29864 sizeX
29865 Set horizontal radius size. Range is "[1, 1024]" and default value
29866 is 1.
29867
29868 planes
29869 Set which planes to filter. Default value is 0xf, by which all
29870 planes are processed.
29871
29872 sizeY
29873 Set vertical radius size. Range is "[1, 1024]" and default value is
29874 0. If zero, "sizeX" value will be used.
29875
29876 Example
29877
29878 • Apply average blur filter with horizontal and vertical size of 3,
29879 setting each pixel of the output to the average value of the 7x7
29880 region centered on it in the input. For pixels on the edges of the
29881 image, the region does not extend beyond the image boundaries, and
29882 so out-of-range coordinates are not used in the calculations.
29883
29884 -i INPUT -vf "hwupload, avgblur_opencl=3, hwdownload" OUTPUT
29885
29886 boxblur_opencl
29887 Apply a boxblur algorithm to the input video.
29888
29889 It accepts the following parameters:
29890
29891 luma_radius, lr
29892 luma_power, lp
29893 chroma_radius, cr
29894 chroma_power, cp
29895 alpha_radius, ar
29896 alpha_power, ap
29897
29898 A description of the accepted options follows.
29899
29900 luma_radius, lr
29901 chroma_radius, cr
29902 alpha_radius, ar
29903 Set an expression for the box radius in pixels used for blurring
29904 the corresponding input plane.
29905
29906 The radius value must be a non-negative number, and must not be
29907 greater than the value of the expression "min(w,h)/2" for the luma
29908 and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
29909
29910 Default value for luma_radius is "2". If not specified,
29911 chroma_radius and alpha_radius default to the corresponding value
29912 set for luma_radius.
29913
29914 The expressions can contain the following constants:
29915
29916 w
29917 h The input width and height in pixels.
29918
29919 cw
29920 ch The input chroma image width and height in pixels.
29921
29922 hsub
29923 vsub
29924 The horizontal and vertical chroma subsample values. For
29925 example, for the pixel format "yuv422p", hsub is 2 and vsub is
29926 1.
29927
29928 luma_power, lp
29929 chroma_power, cp
29930 alpha_power, ap
29931 Specify how many times the boxblur filter is applied to the
29932 corresponding plane.
29933
29934 Default value for luma_power is 2. If not specified, chroma_power
29935 and alpha_power default to the corresponding value set for
29936 luma_power.
29937
29938 A value of 0 will disable the effect.
29939
29940 Examples
29941
29942 Apply boxblur filter, setting each pixel of the output to the average
29943 value of box-radiuses luma_radius, chroma_radius, alpha_radius for each
29944 plane respectively. The filter will apply luma_power, chroma_power,
29945 alpha_power times onto the corresponding plane. For pixels on the edges
29946 of the image, the radius does not extend beyond the image boundaries,
29947 and so out-of-range coordinates are not used in the calculations.
29948
29949 • Apply a boxblur filter with the luma, chroma, and alpha radius set
29950 to 2 and luma, chroma, and alpha power set to 3. The filter will
29951 run 3 times with box-radius set to 2 for every plane of the image.
29952
29953 -i INPUT -vf "hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload" OUTPUT
29954 -i INPUT -vf "hwupload, boxblur_opencl=2:3, hwdownload" OUTPUT
29955
29956 • Apply a boxblur filter with luma radius set to 2, luma_power to 1,
29957 chroma_radius to 4, chroma_power to 5, alpha_radius to 3 and
29958 alpha_power to 7.
29959
29960 For the luma plane, a 2x2 box radius will be run once.
29961
29962 For the chroma plane, a 4x4 box radius will be run 5 times.
29963
29964 For the alpha plane, a 3x3 box radius will be run 7 times.
29965
29966 -i INPUT -vf "hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload" OUTPUT
29967
29968 colorkey_opencl
29969 RGB colorspace color keying.
29970
29971 The filter accepts the following options:
29972
29973 color
29974 The color which will be replaced with transparency.
29975
29976 similarity
29977 Similarity percentage with the key color.
29978
29979 0.01 matches only the exact key color, while 1.0 matches
29980 everything.
29981
29982 blend
29983 Blend percentage.
29984
29985 0.0 makes pixels either fully transparent, or not transparent at
29986 all.
29987
29988 Higher values result in semi-transparent pixels, with a higher
29989 transparency the more similar the pixels color is to the key color.
29990
29991 Examples
29992
29993 • Make every semi-green pixel in the input transparent with some
29994 slight blending:
29995
29996 -i INPUT -vf "hwupload, colorkey_opencl=green:0.3:0.1, hwdownload" OUTPUT
29997
29998 convolution_opencl
29999 Apply convolution of 3x3, 5x5, 7x7 matrix.
30000
30001 The filter accepts the following options:
30002
30003 0m
30004 1m
30005 2m
30006 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49
30007 signed numbers. Default value for each plane is "0 0 0 0 1 0 0 0
30008 0".
30009
30010 0rdiv
30011 1rdiv
30012 2rdiv
30013 3rdiv
30014 Set multiplier for calculated value for each plane. If unset or 0,
30015 it will be sum of all matrix elements. The option value must be a
30016 float number greater or equal to 0.0. Default value is 1.0.
30017
30018 0bias
30019 1bias
30020 2bias
30021 3bias
30022 Set bias for each plane. This value is added to the result of the
30023 multiplication. Useful for making the overall image brighter or
30024 darker. The option value must be a float number greater or equal
30025 to 0.0. Default value is 0.0.
30026
30027 Examples
30028
30029 • Apply sharpen:
30030
30031 -i INPUT -vf "hwupload, convolution_opencl=0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0, hwdownload" OUTPUT
30032
30033 • Apply blur:
30034
30035 -i INPUT -vf "hwupload, convolution_opencl=1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9, hwdownload" OUTPUT
30036
30037 • Apply edge enhance:
30038
30039 -i INPUT -vf "hwupload, convolution_opencl=0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128, hwdownload" OUTPUT
30040
30041 • Apply edge detect:
30042
30043 -i INPUT -vf "hwupload, convolution_opencl=0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128, hwdownload" OUTPUT
30044
30045 • Apply laplacian edge detector which includes diagonals:
30046
30047 -i INPUT -vf "hwupload, convolution_opencl=1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0, hwdownload" OUTPUT
30048
30049 • Apply emboss:
30050
30051 -i INPUT -vf "hwupload, convolution_opencl=-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2, hwdownload" OUTPUT
30052
30053 erosion_opencl
30054 Apply erosion effect to the video.
30055
30056 This filter replaces the pixel by the local(3x3) minimum.
30057
30058 It accepts the following options:
30059
30060 threshold0
30061 threshold1
30062 threshold2
30063 threshold3
30064 Limit the maximum change for each plane. Range is "[0, 65535]" and
30065 default value is 65535. If 0, plane will remain unchanged.
30066
30067 coordinates
30068 Flag which specifies the pixel to refer to. Range is "[0, 255]"
30069 and default value is 255, i.e. all eight pixels are used.
30070
30071 Flags to local 3x3 coordinates region centered on "x":
30072
30073 1 2 3
30074
30075 4 x 5
30076
30077 6 7 8
30078
30079 Example
30080
30081 • Apply erosion filter with threshold0 set to 30, threshold1 set 40,
30082 threshold2 set to 50 and coordinates set to 231, setting each pixel
30083 of the output to the local minimum between pixels: 1, 2, 3, 6, 7, 8
30084 of the 3x3 region centered on it in the input. If the difference
30085 between input pixel and local minimum is more then threshold of the
30086 corresponding plane, output pixel will be set to input pixel -
30087 threshold of corresponding plane.
30088
30089 -i INPUT -vf "hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
30090
30091 deshake_opencl
30092 Feature-point based video stabilization filter.
30093
30094 The filter accepts the following options:
30095
30096 tripod
30097 Simulates a tripod by preventing any camera movement whatsoever
30098 from the original frame. Defaults to 0.
30099
30100 debug
30101 Whether or not additional debug info should be displayed, both in
30102 the processed output and in the console.
30103
30104 Note that in order to see console debug output you will also need
30105 to pass "-v verbose" to ffmpeg.
30106
30107 Viewing point matches in the output video is only supported for RGB
30108 input.
30109
30110 Defaults to 0.
30111
30112 adaptive_crop
30113 Whether or not to do a tiny bit of cropping at the borders to cut
30114 down on the amount of mirrored pixels.
30115
30116 Defaults to 1.
30117
30118 refine_features
30119 Whether or not feature points should be refined at a sub-pixel
30120 level.
30121
30122 This can be turned off for a slight performance gain at the cost of
30123 precision.
30124
30125 Defaults to 1.
30126
30127 smooth_strength
30128 The strength of the smoothing applied to the camera path from 0.0
30129 to 1.0.
30130
30131 1.0 is the maximum smoothing strength while values less than that
30132 result in less smoothing.
30133
30134 0.0 causes the filter to adaptively choose a smoothing strength on
30135 a per-frame basis.
30136
30137 Defaults to 0.0.
30138
30139 smooth_window_multiplier
30140 Controls the size of the smoothing window (the number of frames
30141 buffered to determine motion information from).
30142
30143 The size of the smoothing window is determined by multiplying the
30144 framerate of the video by this number.
30145
30146 Acceptable values range from 0.1 to 10.0.
30147
30148 Larger values increase the amount of motion data available for
30149 determining how to smooth the camera path, potentially improving
30150 smoothness, but also increase latency and memory usage.
30151
30152 Defaults to 2.0.
30153
30154 Examples
30155
30156 • Stabilize a video with a fixed, medium smoothing strength:
30157
30158 -i INPUT -vf "hwupload, deshake_opencl=smooth_strength=0.5, hwdownload" OUTPUT
30159
30160 • Stabilize a video with debugging (both in console and in rendered
30161 video):
30162
30163 -i INPUT -filter_complex "[0:v]format=rgba, hwupload, deshake_opencl=debug=1, hwdownload, format=rgba, format=yuv420p" -v verbose OUTPUT
30164
30165 dilation_opencl
30166 Apply dilation effect to the video.
30167
30168 This filter replaces the pixel by the local(3x3) maximum.
30169
30170 It accepts the following options:
30171
30172 threshold0
30173 threshold1
30174 threshold2
30175 threshold3
30176 Limit the maximum change for each plane. Range is "[0, 65535]" and
30177 default value is 65535. If 0, plane will remain unchanged.
30178
30179 coordinates
30180 Flag which specifies the pixel to refer to. Range is "[0, 255]"
30181 and default value is 255, i.e. all eight pixels are used.
30182
30183 Flags to local 3x3 coordinates region centered on "x":
30184
30185 1 2 3
30186
30187 4 x 5
30188
30189 6 7 8
30190
30191 Example
30192
30193 • Apply dilation filter with threshold0 set to 30, threshold1 set 40,
30194 threshold2 set to 50 and coordinates set to 231, setting each pixel
30195 of the output to the local maximum between pixels: 1, 2, 3, 6, 7, 8
30196 of the 3x3 region centered on it in the input. If the difference
30197 between input pixel and local maximum is more then threshold of the
30198 corresponding plane, output pixel will be set to input pixel +
30199 threshold of corresponding plane.
30200
30201 -i INPUT -vf "hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
30202
30203 nlmeans_opencl
30204 Non-local Means denoise filter through OpenCL, this filter accepts same
30205 options as nlmeans.
30206
30207 overlay_opencl
30208 Overlay one video on top of another.
30209
30210 It takes two inputs and has one output. The first input is the "main"
30211 video on which the second input is overlaid. This filter requires same
30212 memory layout for all the inputs. So, format conversion may be needed.
30213
30214 The filter accepts the following options:
30215
30216 x Set the x coordinate of the overlaid video on the main video.
30217 Default value is 0.
30218
30219 y Set the y coordinate of the overlaid video on the main video.
30220 Default value is 0.
30221
30222 Examples
30223
30224 • Overlay an image LOGO at the top-left corner of the INPUT video.
30225 Both inputs are yuv420p format.
30226
30227 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
30228
30229 • The inputs have same memory layout for color channels , the overlay
30230 has additional alpha plane, like INPUT is yuv420p, and the LOGO is
30231 yuva420p.
30232
30233 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
30234
30235 pad_opencl
30236 Add paddings to the input image, and place the original input at the
30237 provided x, y coordinates.
30238
30239 It accepts the following options:
30240
30241 width, w
30242 height, h
30243 Specify an expression for the size of the output image with the
30244 paddings added. If the value for width or height is 0, the
30245 corresponding input size is used for the output.
30246
30247 The width expression can reference the value set by the height
30248 expression, and vice versa.
30249
30250 The default value of width and height is 0.
30251
30252 x
30253 y Specify the offsets to place the input image at within the padded
30254 area, with respect to the top/left border of the output image.
30255
30256 The x expression can reference the value set by the y expression,
30257 and vice versa.
30258
30259 The default value of x and y is 0.
30260
30261 If x or y evaluate to a negative number, they'll be changed so the
30262 input image is centered on the padded area.
30263
30264 color
30265 Specify the color of the padded area. For the syntax of this
30266 option, check the "Color" section in the ffmpeg-utils manual.
30267
30268 aspect
30269 Pad to an aspect instead to a resolution.
30270
30271 The value for the width, height, x, and y options are expressions
30272 containing the following constants:
30273
30274 in_w
30275 in_h
30276 The input video width and height.
30277
30278 iw
30279 ih These are the same as in_w and in_h.
30280
30281 out_w
30282 out_h
30283 The output width and height (the size of the padded area), as
30284 specified by the width and height expressions.
30285
30286 ow
30287 oh These are the same as out_w and out_h.
30288
30289 x
30290 y The x and y offsets as specified by the x and y expressions, or NAN
30291 if not yet specified.
30292
30293 a same as iw / ih
30294
30295 sar input sample aspect ratio
30296
30297 dar input display aspect ratio, it is the same as (iw / ih) * sar
30298
30299 prewitt_opencl
30300 Apply the Prewitt operator
30301 (<https://en.wikipedia.org/wiki/Prewitt_operator>) to input video
30302 stream.
30303
30304 The filter accepts the following option:
30305
30306 planes
30307 Set which planes to filter. Default value is 0xf, by which all
30308 planes are processed.
30309
30310 scale
30311 Set value which will be multiplied with filtered result. Range is
30312 "[0.0, 65535]" and default value is 1.0.
30313
30314 delta
30315 Set value which will be added to filtered result. Range is
30316 "[-65535, 65535]" and default value is 0.0.
30317
30318 Example
30319
30320 • Apply the Prewitt operator with scale set to 2 and delta set to 10.
30321
30322 -i INPUT -vf "hwupload, prewitt_opencl=scale=2:delta=10, hwdownload" OUTPUT
30323
30324 program_opencl
30325 Filter video using an OpenCL program.
30326
30327 source
30328 OpenCL program source file.
30329
30330 kernel
30331 Kernel name in program.
30332
30333 inputs
30334 Number of inputs to the filter. Defaults to 1.
30335
30336 size, s
30337 Size of output frames. Defaults to the same as the first input.
30338
30339 The "program_opencl" filter also supports the framesync options.
30340
30341 The program source file must contain a kernel function with the given
30342 name, which will be run once for each plane of the output. Each run on
30343 a plane gets enqueued as a separate 2D global NDRange with one work-
30344 item for each pixel to be generated. The global ID offset for each
30345 work-item is therefore the coordinates of a pixel in the destination
30346 image.
30347
30348 The kernel function needs to take the following arguments:
30349
30350 • Destination image, __write_only image2d_t.
30351
30352 This image will become the output; the kernel should write all of
30353 it.
30354
30355 • Frame index, unsigned int.
30356
30357 This is a counter starting from zero and increasing by one for each
30358 frame.
30359
30360 • Source images, __read_only image2d_t.
30361
30362 These are the most recent images on each input. The kernel may
30363 read from them to generate the output, but they can't be written
30364 to.
30365
30366 Example programs:
30367
30368 • Copy the input to the output (output must be the same size as the
30369 input).
30370
30371 __kernel void copy(__write_only image2d_t destination,
30372 unsigned int index,
30373 __read_only image2d_t source)
30374 {
30375 const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
30376
30377 int2 location = (int2)(get_global_id(0), get_global_id(1));
30378
30379 float4 value = read_imagef(source, sampler, location);
30380
30381 write_imagef(destination, location, value);
30382 }
30383
30384 • Apply a simple transformation, rotating the input by an amount
30385 increasing with the index counter. Pixel values are linearly
30386 interpolated by the sampler, and the output need not have the same
30387 dimensions as the input.
30388
30389 __kernel void rotate_image(__write_only image2d_t dst,
30390 unsigned int index,
30391 __read_only image2d_t src)
30392 {
30393 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
30394 CLK_FILTER_LINEAR);
30395
30396 float angle = (float)index / 100.0f;
30397
30398 float2 dst_dim = convert_float2(get_image_dim(dst));
30399 float2 src_dim = convert_float2(get_image_dim(src));
30400
30401 float2 dst_cen = dst_dim / 2.0f;
30402 float2 src_cen = src_dim / 2.0f;
30403
30404 int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
30405
30406 float2 dst_pos = convert_float2(dst_loc) - dst_cen;
30407 float2 src_pos = {
30408 cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
30409 sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
30410 };
30411 src_pos = src_pos * src_dim / dst_dim;
30412
30413 float2 src_loc = src_pos + src_cen;
30414
30415 if (src_loc.x < 0.0f || src_loc.y < 0.0f ||
30416 src_loc.x > src_dim.x || src_loc.y > src_dim.y)
30417 write_imagef(dst, dst_loc, 0.5f);
30418 else
30419 write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
30420 }
30421
30422 • Blend two inputs together, with the amount of each input used
30423 varying with the index counter.
30424
30425 __kernel void blend_images(__write_only image2d_t dst,
30426 unsigned int index,
30427 __read_only image2d_t src1,
30428 __read_only image2d_t src2)
30429 {
30430 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
30431 CLK_FILTER_LINEAR);
30432
30433 float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
30434
30435 int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
30436 int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
30437 int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
30438
30439 float4 val1 = read_imagef(src1, sampler, src1_loc);
30440 float4 val2 = read_imagef(src2, sampler, src2_loc);
30441
30442 write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
30443 }
30444
30445 roberts_opencl
30446 Apply the Roberts cross operator
30447 (<https://en.wikipedia.org/wiki/Roberts_cross>) to input video stream.
30448
30449 The filter accepts the following option:
30450
30451 planes
30452 Set which planes to filter. Default value is 0xf, by which all
30453 planes are processed.
30454
30455 scale
30456 Set value which will be multiplied with filtered result. Range is
30457 "[0.0, 65535]" and default value is 1.0.
30458
30459 delta
30460 Set value which will be added to filtered result. Range is
30461 "[-65535, 65535]" and default value is 0.0.
30462
30463 Example
30464
30465 • Apply the Roberts cross operator with scale set to 2 and delta set
30466 to 10
30467
30468 -i INPUT -vf "hwupload, roberts_opencl=scale=2:delta=10, hwdownload" OUTPUT
30469
30470 sobel_opencl
30471 Apply the Sobel operator
30472 (<https://en.wikipedia.org/wiki/Sobel_operator>) to input video stream.
30473
30474 The filter accepts the following option:
30475
30476 planes
30477 Set which planes to filter. Default value is 0xf, by which all
30478 planes are processed.
30479
30480 scale
30481 Set value which will be multiplied with filtered result. Range is
30482 "[0.0, 65535]" and default value is 1.0.
30483
30484 delta
30485 Set value which will be added to filtered result. Range is
30486 "[-65535, 65535]" and default value is 0.0.
30487
30488 Example
30489
30490 • Apply sobel operator with scale set to 2 and delta set to 10
30491
30492 -i INPUT -vf "hwupload, sobel_opencl=scale=2:delta=10, hwdownload" OUTPUT
30493
30494 tonemap_opencl
30495 Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
30496
30497 It accepts the following parameters:
30498
30499 tonemap
30500 Specify the tone-mapping operator to be used. Same as tonemap
30501 option in tonemap.
30502
30503 param
30504 Tune the tone mapping algorithm. same as param option in tonemap.
30505
30506 desat
30507 Apply desaturation for highlights that exceed this level of
30508 brightness. The higher the parameter, the more color information
30509 will be preserved. This setting helps prevent unnaturally blown-out
30510 colors for super-highlights, by (smoothly) turning into white
30511 instead. This makes images feel more natural, at the cost of
30512 reducing information about out-of-range colors.
30513
30514 The default value is 0.5, and the algorithm here is a little
30515 different from the cpu version tonemap currently. A setting of 0.0
30516 disables this option.
30517
30518 threshold
30519 The tonemapping algorithm parameters is fine-tuned per each scene.
30520 And a threshold is used to detect whether the scene has changed or
30521 not. If the distance between the current frame average brightness
30522 and the current running average exceeds a threshold value, we would
30523 re-calculate scene average and peak brightness. The default value
30524 is 0.2.
30525
30526 format
30527 Specify the output pixel format.
30528
30529 Currently supported formats are:
30530
30531 p010
30532 nv12
30533 range, r
30534 Set the output color range.
30535
30536 Possible values are:
30537
30538 tv/mpeg
30539 pc/jpeg
30540
30541 Default is same as input.
30542
30543 primaries, p
30544 Set the output color primaries.
30545
30546 Possible values are:
30547
30548 bt709
30549 bt2020
30550
30551 Default is same as input.
30552
30553 transfer, t
30554 Set the output transfer characteristics.
30555
30556 Possible values are:
30557
30558 bt709
30559 bt2020
30560
30561 Default is bt709.
30562
30563 matrix, m
30564 Set the output colorspace matrix.
30565
30566 Possible value are:
30567
30568 bt709
30569 bt2020
30570
30571 Default is same as input.
30572
30573 Example
30574
30575 • Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010
30576 format using linear operator.
30577
30578 -i INPUT -vf "format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010" OUTPUT
30579
30580 unsharp_opencl
30581 Sharpen or blur the input video.
30582
30583 It accepts the following parameters:
30584
30585 luma_msize_x, lx
30586 Set the luma matrix horizontal size. Range is "[1, 23]" and
30587 default value is 5.
30588
30589 luma_msize_y, ly
30590 Set the luma matrix vertical size. Range is "[1, 23]" and default
30591 value is 5.
30592
30593 luma_amount, la
30594 Set the luma effect strength. Range is "[-10, 10]" and default
30595 value is 1.0.
30596
30597 Negative values will blur the input video, while positive values
30598 will sharpen it, a value of zero will disable the effect.
30599
30600 chroma_msize_x, cx
30601 Set the chroma matrix horizontal size. Range is "[1, 23]" and
30602 default value is 5.
30603
30604 chroma_msize_y, cy
30605 Set the chroma matrix vertical size. Range is "[1, 23]" and
30606 default value is 5.
30607
30608 chroma_amount, ca
30609 Set the chroma effect strength. Range is "[-10, 10]" and default
30610 value is 0.0.
30611
30612 Negative values will blur the input video, while positive values
30613 will sharpen it, a value of zero will disable the effect.
30614
30615 All parameters are optional and default to the equivalent of the string
30616 '5:5:1.0:5:5:0.0'.
30617
30618 Examples
30619
30620 • Apply strong luma sharpen effect:
30621
30622 -i INPUT -vf "hwupload, unsharp_opencl=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5, hwdownload" OUTPUT
30623
30624 • Apply a strong blur of both luma and chroma parameters:
30625
30626 -i INPUT -vf "hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload" OUTPUT
30627
30628 xfade_opencl
30629 Cross fade two videos with custom transition effect by using OpenCL.
30630
30631 It accepts the following options:
30632
30633 transition
30634 Set one of possible transition effects.
30635
30636 custom
30637 Select custom transition effect, the actual transition
30638 description will be picked from source and kernel options.
30639
30640 fade
30641 wipeleft
30642 wiperight
30643 wipeup
30644 wipedown
30645 slideleft
30646 slideright
30647 slideup
30648 slidedown
30649 Default transition is fade.
30650
30651 source
30652 OpenCL program source file for custom transition.
30653
30654 kernel
30655 Set name of kernel to use for custom transition from program source
30656 file.
30657
30658 duration
30659 Set duration of video transition.
30660
30661 offset
30662 Set time of start of transition relative to first video.
30663
30664 The program source file must contain a kernel function with the given
30665 name, which will be run once for each plane of the output. Each run on
30666 a plane gets enqueued as a separate 2D global NDRange with one work-
30667 item for each pixel to be generated. The global ID offset for each
30668 work-item is therefore the coordinates of a pixel in the destination
30669 image.
30670
30671 The kernel function needs to take the following arguments:
30672
30673 • Destination image, __write_only image2d_t.
30674
30675 This image will become the output; the kernel should write all of
30676 it.
30677
30678 • First Source image, __read_only image2d_t. Second Source image,
30679 __read_only image2d_t.
30680
30681 These are the most recent images on each input. The kernel may
30682 read from them to generate the output, but they can't be written
30683 to.
30684
30685 • Transition progress, float. This value is always between 0 and 1
30686 inclusive.
30687
30688 Example programs:
30689
30690 • Apply dots curtain transition effect:
30691
30692 __kernel void blend_images(__write_only image2d_t dst,
30693 __read_only image2d_t src1,
30694 __read_only image2d_t src2,
30695 float progress)
30696 {
30697 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
30698 CLK_FILTER_LINEAR);
30699 int2 p = (int2)(get_global_id(0), get_global_id(1));
30700 float2 rp = (float2)(get_global_id(0), get_global_id(1));
30701 float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
30702 rp = rp / dim;
30703
30704 float2 dots = (float2)(20.0, 20.0);
30705 float2 center = (float2)(0,0);
30706 float2 unused;
30707
30708 float4 val1 = read_imagef(src1, sampler, p);
30709 float4 val2 = read_imagef(src2, sampler, p);
30710 bool next = distance(fract(rp * dots, &unused), (float2)(0.5, 0.5)) < (progress / distance(rp, center));
30711
30712 write_imagef(dst, p, next ? val1 : val2);
30713 }
30714
30716 VAAPI Video filters are usually used with VAAPI decoder and VAAPI
30717 encoder. Below is a description of VAAPI video filters.
30718
30719 To enable compilation of these filters you need to configure FFmpeg
30720 with "--enable-vaapi".
30721
30722 To use vaapi filters, you need to setup the vaapi device correctly. For
30723 more information, please read
30724 <https://trac.ffmpeg.org/wiki/Hardware/VAAPI>
30725
30726 tonemap_vaapi
30727 Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range)
30728 conversion with tone-mapping. It maps the dynamic range of HDR10
30729 content to the SDR content. It currently only accepts HDR10 as input.
30730
30731 It accepts the following parameters:
30732
30733 format
30734 Specify the output pixel format.
30735
30736 Currently supported formats are:
30737
30738 p010
30739 nv12
30740
30741 Default is nv12.
30742
30743 primaries, p
30744 Set the output color primaries.
30745
30746 Default is same as input.
30747
30748 transfer, t
30749 Set the output transfer characteristics.
30750
30751 Default is bt709.
30752
30753 matrix, m
30754 Set the output colorspace matrix.
30755
30756 Default is same as input.
30757
30758 Example
30759
30760 • Convert HDR(HDR10) video to bt2020-transfer-characteristic p010
30761 format
30762
30763 tonemap_vaapi=format=p010:t=bt2020-10
30764
30766 Below is a description of the currently available video sources.
30767
30768 buffer
30769 Buffer video frames, and make them available to the filter chain.
30770
30771 This source is mainly intended for a programmatic use, in particular
30772 through the interface defined in libavfilter/buffersrc.h.
30773
30774 It accepts the following parameters:
30775
30776 video_size
30777 Specify the size (width and height) of the buffered video frames.
30778 For the syntax of this option, check the "Video size" section in
30779 the ffmpeg-utils manual.
30780
30781 width
30782 The input video width.
30783
30784 height
30785 The input video height.
30786
30787 pix_fmt
30788 A string representing the pixel format of the buffered video
30789 frames. It may be a number corresponding to a pixel format, or a
30790 pixel format name.
30791
30792 time_base
30793 Specify the timebase assumed by the timestamps of the buffered
30794 frames.
30795
30796 frame_rate
30797 Specify the frame rate expected for the video stream.
30798
30799 pixel_aspect, sar
30800 The sample (pixel) aspect ratio of the input video.
30801
30802 sws_param
30803 This option is deprecated and ignored. Prepend "sws_flags=flags;"
30804 to the filtergraph description to specify swscale flags for
30805 automatically inserted scalers. See Filtergraph syntax.
30806
30807 hw_frames_ctx
30808 When using a hardware pixel format, this should be a reference to
30809 an AVHWFramesContext describing input frames.
30810
30811 For example:
30812
30813 buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
30814
30815 will instruct the source to accept video frames with size 320x240 and
30816 with format "yuv410p", assuming 1/24 as the timestamps timebase and
30817 square pixels (1:1 sample aspect ratio). Since the pixel format with
30818 name "yuv410p" corresponds to the number 6 (check the enum
30819 AVPixelFormat definition in libavutil/pixfmt.h), this example
30820 corresponds to:
30821
30822 buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
30823
30824 Alternatively, the options can be specified as a flat string, but this
30825 syntax is deprecated:
30826
30827 width:height:pix_fmt:time_base.num:time_base.den:pixel_aspect.num:pixel_aspect.den
30828
30829 cellauto
30830 Create a pattern generated by an elementary cellular automaton.
30831
30832 The initial state of the cellular automaton can be defined through the
30833 filename and pattern options. If such options are not specified an
30834 initial state is created randomly.
30835
30836 At each new frame a new row in the video is filled with the result of
30837 the cellular automaton next generation. The behavior when the whole
30838 frame is filled is defined by the scroll option.
30839
30840 This source accepts the following options:
30841
30842 filename, f
30843 Read the initial cellular automaton state, i.e. the starting row,
30844 from the specified file. In the file, each non-whitespace
30845 character is considered an alive cell, a newline will terminate the
30846 row, and further characters in the file will be ignored.
30847
30848 pattern, p
30849 Read the initial cellular automaton state, i.e. the starting row,
30850 from the specified string.
30851
30852 Each non-whitespace character in the string is considered an alive
30853 cell, a newline will terminate the row, and further characters in
30854 the string will be ignored.
30855
30856 rate, r
30857 Set the video rate, that is the number of frames generated per
30858 second. Default is 25.
30859
30860 random_fill_ratio, ratio
30861 Set the random fill ratio for the initial cellular automaton row.
30862 It is a floating point number value ranging from 0 to 1, defaults
30863 to 1/PHI.
30864
30865 This option is ignored when a file or a pattern is specified.
30866
30867 random_seed, seed
30868 Set the seed for filling randomly the initial row, must be an
30869 integer included between 0 and UINT32_MAX. If not specified, or if
30870 explicitly set to -1, the filter will try to use a good random seed
30871 on a best effort basis.
30872
30873 rule
30874 Set the cellular automaton rule, it is a number ranging from 0 to
30875 255. Default value is 110.
30876
30877 size, s
30878 Set the size of the output video. For the syntax of this option,
30879 check the "Video size" section in the ffmpeg-utils manual.
30880
30881 If filename or pattern is specified, the size is set by default to
30882 the width of the specified initial state row, and the height is set
30883 to width * PHI.
30884
30885 If size is set, it must contain the width of the specified pattern
30886 string, and the specified pattern will be centered in the larger
30887 row.
30888
30889 If a filename or a pattern string is not specified, the size value
30890 defaults to "320x518" (used for a randomly generated initial
30891 state).
30892
30893 scroll
30894 If set to 1, scroll the output upward when all the rows in the
30895 output have been already filled. If set to 0, the new generated row
30896 will be written over the top row just after the bottom row is
30897 filled. Defaults to 1.
30898
30899 start_full, full
30900 If set to 1, completely fill the output with generated rows before
30901 outputting the first frame. This is the default behavior, for
30902 disabling set the value to 0.
30903
30904 stitch
30905 If set to 1, stitch the left and right row edges together. This is
30906 the default behavior, for disabling set the value to 0.
30907
30908 Examples
30909
30910 • Read the initial state from pattern, and specify an output of size
30911 200x400.
30912
30913 cellauto=f=pattern:s=200x400
30914
30915 • Generate a random initial row with a width of 200 cells, with a
30916 fill ratio of 2/3:
30917
30918 cellauto=ratio=2/3:s=200x200
30919
30920 • Create a pattern generated by rule 18 starting by a single alive
30921 cell centered on an initial row with width 100:
30922
30923 cellauto=p=@s=100x400:full=0:rule=18
30924
30925 • Specify a more elaborated initial pattern:
30926
30927 cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
30928
30929 coreimagesrc
30930 Video source generated on GPU using Apple's CoreImage API on OSX.
30931
30932 This video source is a specialized version of the coreimage video
30933 filter. Use a core image generator at the beginning of the applied
30934 filterchain to generate the content.
30935
30936 The coreimagesrc video source accepts the following options:
30937
30938 list_generators
30939 List all available generators along with all their respective
30940 options as well as possible minimum and maximum values along with
30941 the default values.
30942
30943 list_generators=true
30944
30945 size, s
30946 Specify the size of the sourced video. For the syntax of this
30947 option, check the "Video size" section in the ffmpeg-utils manual.
30948 The default value is "320x240".
30949
30950 rate, r
30951 Specify the frame rate of the sourced video, as the number of
30952 frames generated per second. It has to be a string in the format
30953 frame_rate_num/frame_rate_den, an integer number, a floating point
30954 number or a valid video frame rate abbreviation. The default value
30955 is "25".
30956
30957 sar Set the sample aspect ratio of the sourced video.
30958
30959 duration, d
30960 Set the duration of the sourced video. See the Time duration
30961 section in the ffmpeg-utils(1) manual for the accepted syntax.
30962
30963 If not specified, or the expressed duration is negative, the video
30964 is supposed to be generated forever.
30965
30966 Additionally, all options of the coreimage video filter are accepted.
30967 A complete filterchain can be used for further processing of the
30968 generated input without CPU-HOST transfer. See coreimage documentation
30969 and examples for details.
30970
30971 Examples
30972
30973 • Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
30974 given as complete and escaped command-line for Apple's standard
30975 bash shell:
30976
30977 ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
30978
30979 This example is equivalent to the QRCode example of coreimage
30980 without the need for a nullsrc video source.
30981
30982 gradients
30983 Generate several gradients.
30984
30985 size, s
30986 Set frame size. For the syntax of this option, check the "Video
30987 size" section in the ffmpeg-utils manual. Default value is
30988 "640x480".
30989
30990 rate, r
30991 Set frame rate, expressed as number of frames per second. Default
30992 value is "25".
30993
30994 c0, c1, c2, c3, c4, c5, c6, c7
30995 Set 8 colors. Default values for colors is to pick random one.
30996
30997 x0, y0, y0, y1
30998 Set gradient line source and destination points. If negative or out
30999 of range, random ones are picked.
31000
31001 nb_colors, n
31002 Set number of colors to use at once. Allowed range is from 2 to 8.
31003 Default value is 2.
31004
31005 seed
31006 Set seed for picking gradient line points.
31007
31008 duration, d
31009 Set the duration of the sourced video. See the Time duration
31010 section in the ffmpeg-utils(1) manual for the accepted syntax.
31011
31012 If not specified, or the expressed duration is negative, the video
31013 is supposed to be generated forever.
31014
31015 speed
31016 Set speed of gradients rotation.
31017
31018 mandelbrot
31019 Generate a Mandelbrot set fractal, and progressively zoom towards the
31020 point specified with start_x and start_y.
31021
31022 This source accepts the following options:
31023
31024 end_pts
31025 Set the terminal pts value. Default value is 400.
31026
31027 end_scale
31028 Set the terminal scale value. Must be a floating point value.
31029 Default value is 0.3.
31030
31031 inner
31032 Set the inner coloring mode, that is the algorithm used to draw the
31033 Mandelbrot fractal internal region.
31034
31035 It shall assume one of the following values:
31036
31037 black
31038 Set black mode.
31039
31040 convergence
31041 Show time until convergence.
31042
31043 mincol
31044 Set color based on point closest to the origin of the
31045 iterations.
31046
31047 period
31048 Set period mode.
31049
31050 Default value is mincol.
31051
31052 bailout
31053 Set the bailout value. Default value is 10.0.
31054
31055 maxiter
31056 Set the maximum of iterations performed by the rendering algorithm.
31057 Default value is 7189.
31058
31059 outer
31060 Set outer coloring mode. It shall assume one of following values:
31061
31062 iteration_count
31063 Set iteration count mode.
31064
31065 normalized_iteration_count
31066 set normalized iteration count mode.
31067
31068 Default value is normalized_iteration_count.
31069
31070 rate, r
31071 Set frame rate, expressed as number of frames per second. Default
31072 value is "25".
31073
31074 size, s
31075 Set frame size. For the syntax of this option, check the "Video
31076 size" section in the ffmpeg-utils manual. Default value is
31077 "640x480".
31078
31079 start_scale
31080 Set the initial scale value. Default value is 3.0.
31081
31082 start_x
31083 Set the initial x position. Must be a floating point value between
31084 -100 and 100. Default value is
31085 -0.743643887037158704752191506114774.
31086
31087 start_y
31088 Set the initial y position. Must be a floating point value between
31089 -100 and 100. Default value is
31090 -0.131825904205311970493132056385139.
31091
31092 mptestsrc
31093 Generate various test patterns, as generated by the MPlayer test
31094 filter.
31095
31096 The size of the generated video is fixed, and is 256x256. This source
31097 is useful in particular for testing encoding features.
31098
31099 This source accepts the following options:
31100
31101 rate, r
31102 Specify the frame rate of the sourced video, as the number of
31103 frames generated per second. It has to be a string in the format
31104 frame_rate_num/frame_rate_den, an integer number, a floating point
31105 number or a valid video frame rate abbreviation. The default value
31106 is "25".
31107
31108 duration, d
31109 Set the duration of the sourced video. See the Time duration
31110 section in the ffmpeg-utils(1) manual for the accepted syntax.
31111
31112 If not specified, or the expressed duration is negative, the video
31113 is supposed to be generated forever.
31114
31115 test, t
31116 Set the number or the name of the test to perform. Supported tests
31117 are:
31118
31119 dc_luma
31120 dc_chroma
31121 freq_luma
31122 freq_chroma
31123 amp_luma
31124 amp_chroma
31125 cbp
31126 mv
31127 ring1
31128 ring2
31129 all
31130 max_frames, m
31131 Set the maximum number of frames generated for each test,
31132 default value is 30.
31133
31134 Default value is "all", which will cycle through the list of all
31135 tests.
31136
31137 Some examples:
31138
31139 mptestsrc=t=dc_luma
31140
31141 will generate a "dc_luma" test pattern.
31142
31143 frei0r_src
31144 Provide a frei0r source.
31145
31146 To enable compilation of this filter you need to install the frei0r
31147 header and configure FFmpeg with "--enable-frei0r".
31148
31149 This source accepts the following parameters:
31150
31151 size
31152 The size of the video to generate. For the syntax of this option,
31153 check the "Video size" section in the ffmpeg-utils manual.
31154
31155 framerate
31156 The framerate of the generated video. It may be a string of the
31157 form num/den or a frame rate abbreviation.
31158
31159 filter_name
31160 The name to the frei0r source to load. For more information
31161 regarding frei0r and how to set the parameters, read the frei0r
31162 section in the video filters documentation.
31163
31164 filter_params
31165 A '|'-separated list of parameters to pass to the frei0r source.
31166
31167 For example, to generate a frei0r partik0l source with size 200x200 and
31168 frame rate 10 which is overlaid on the overlay filter main input:
31169
31170 frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
31171
31172 life
31173 Generate a life pattern.
31174
31175 This source is based on a generalization of John Conway's life game.
31176
31177 The sourced input represents a life grid, each pixel represents a cell
31178 which can be in one of two possible states, alive or dead. Every cell
31179 interacts with its eight neighbours, which are the cells that are
31180 horizontally, vertically, or diagonally adjacent.
31181
31182 At each interaction the grid evolves according to the adopted rule,
31183 which specifies the number of neighbor alive cells which will make a
31184 cell stay alive or born. The rule option allows one to specify the rule
31185 to adopt.
31186
31187 This source accepts the following options:
31188
31189 filename, f
31190 Set the file from which to read the initial grid state. In the
31191 file, each non-whitespace character is considered an alive cell,
31192 and newline is used to delimit the end of each row.
31193
31194 If this option is not specified, the initial grid is generated
31195 randomly.
31196
31197 rate, r
31198 Set the video rate, that is the number of frames generated per
31199 second. Default is 25.
31200
31201 random_fill_ratio, ratio
31202 Set the random fill ratio for the initial random grid. It is a
31203 floating point number value ranging from 0 to 1, defaults to 1/PHI.
31204 It is ignored when a file is specified.
31205
31206 random_seed, seed
31207 Set the seed for filling the initial random grid, must be an
31208 integer included between 0 and UINT32_MAX. If not specified, or if
31209 explicitly set to -1, the filter will try to use a good random seed
31210 on a best effort basis.
31211
31212 rule
31213 Set the life rule.
31214
31215 A rule can be specified with a code of the kind "SNS/BNB", where NS
31216 and NB are sequences of numbers in the range 0-8, NS specifies the
31217 number of alive neighbor cells which make a live cell stay alive,
31218 and NB the number of alive neighbor cells which make a dead cell to
31219 become alive (i.e. to "born"). "s" and "b" can be used in place of
31220 "S" and "B", respectively.
31221
31222 Alternatively a rule can be specified by an 18-bits integer. The 9
31223 high order bits are used to encode the next cell state if it is
31224 alive for each number of neighbor alive cells, the low order bits
31225 specify the rule for "borning" new cells. Higher order bits encode
31226 for an higher number of neighbor cells. For example the number
31227 6153 = "(12<<9)+9" specifies a stay alive rule of 12 and a born
31228 rule of 9, which corresponds to "S23/B03".
31229
31230 Default value is "S23/B3", which is the original Conway's game of
31231 life rule, and will keep a cell alive if it has 2 or 3 neighbor
31232 alive cells, and will born a new cell if there are three alive
31233 cells around a dead cell.
31234
31235 size, s
31236 Set the size of the output video. For the syntax of this option,
31237 check the "Video size" section in the ffmpeg-utils manual.
31238
31239 If filename is specified, the size is set by default to the same
31240 size of the input file. If size is set, it must contain the size
31241 specified in the input file, and the initial grid defined in that
31242 file is centered in the larger resulting area.
31243
31244 If a filename is not specified, the size value defaults to
31245 "320x240" (used for a randomly generated initial grid).
31246
31247 stitch
31248 If set to 1, stitch the left and right grid edges together, and the
31249 top and bottom edges also. Defaults to 1.
31250
31251 mold
31252 Set cell mold speed. If set, a dead cell will go from death_color
31253 to mold_color with a step of mold. mold can have a value from 0 to
31254 255.
31255
31256 life_color
31257 Set the color of living (or new born) cells.
31258
31259 death_color
31260 Set the color of dead cells. If mold is set, this is the first
31261 color used to represent a dead cell.
31262
31263 mold_color
31264 Set mold color, for definitely dead and moldy cells.
31265
31266 For the syntax of these 3 color options, check the "Color" section
31267 in the ffmpeg-utils manual.
31268
31269 Examples
31270
31271 • Read a grid from pattern, and center it on a grid of size 300x300
31272 pixels:
31273
31274 life=f=pattern:s=300x300
31275
31276 • Generate a random grid of size 200x200, with a fill ratio of 2/3:
31277
31278 life=ratio=2/3:s=200x200
31279
31280 • Specify a custom rule for evolving a randomly generated grid:
31281
31282 life=rule=S14/B34
31283
31284 • Full example with slow death effect (mold) using ffplay:
31285
31286 ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
31287
31288 allrgb, allyuv, color, colorspectrum, haldclutsrc, nullsrc, pal75bars,
31289 pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2,
31290 yuvtestsrc
31291 The "allrgb" source returns frames of size 4096x4096 of all rgb colors.
31292
31293 The "allyuv" source returns frames of size 4096x4096 of all yuv colors.
31294
31295 The "color" source provides an uniformly colored input.
31296
31297 The "colorspectrum" source provides a color spectrum input.
31298
31299 The "haldclutsrc" source provides an identity Hald CLUT. See also
31300 haldclut filter.
31301
31302 The "nullsrc" source returns unprocessed video frames. It is mainly
31303 useful to be employed in analysis / debugging tools, or as the source
31304 for filters which ignore the input data.
31305
31306 The "pal75bars" source generates a color bars pattern, based on EBU PAL
31307 recommendations with 75% color levels.
31308
31309 The "pal100bars" source generates a color bars pattern, based on EBU
31310 PAL recommendations with 100% color levels.
31311
31312 The "rgbtestsrc" source generates an RGB test pattern useful for
31313 detecting RGB vs BGR issues. You should see a red, green and blue
31314 stripe from top to bottom.
31315
31316 The "smptebars" source generates a color bars pattern, based on the
31317 SMPTE Engineering Guideline EG 1-1990.
31318
31319 The "smptehdbars" source generates a color bars pattern, based on the
31320 SMPTE RP 219-2002.
31321
31322 The "testsrc" source generates a test video pattern, showing a color
31323 pattern, a scrolling gradient and a timestamp. This is mainly intended
31324 for testing purposes.
31325
31326 The "testsrc2" source is similar to testsrc, but supports more pixel
31327 formats instead of just "rgb24". This allows using it as an input for
31328 other tests without requiring a format conversion.
31329
31330 The "yuvtestsrc" source generates an YUV test pattern. You should see a
31331 y, cb and cr stripe from top to bottom.
31332
31333 The sources accept the following parameters:
31334
31335 level
31336 Specify the level of the Hald CLUT, only available in the
31337 "haldclutsrc" source. A level of "N" generates a picture of "N*N*N"
31338 by "N*N*N" pixels to be used as identity matrix for 3D lookup
31339 tables. Each component is coded on a "1/(N*N)" scale.
31340
31341 color, c
31342 Specify the color of the source, only available in the "color"
31343 source. For the syntax of this option, check the "Color" section in
31344 the ffmpeg-utils manual.
31345
31346 size, s
31347 Specify the size of the sourced video. For the syntax of this
31348 option, check the "Video size" section in the ffmpeg-utils manual.
31349 The default value is "320x240".
31350
31351 This option is not available with the "allrgb", "allyuv", and
31352 "haldclutsrc" filters.
31353
31354 rate, r
31355 Specify the frame rate of the sourced video, as the number of
31356 frames generated per second. It has to be a string in the format
31357 frame_rate_num/frame_rate_den, an integer number, a floating point
31358 number or a valid video frame rate abbreviation. The default value
31359 is "25".
31360
31361 duration, d
31362 Set the duration of the sourced video. See the Time duration
31363 section in the ffmpeg-utils(1) manual for the accepted syntax.
31364
31365 If not specified, or the expressed duration is negative, the video
31366 is supposed to be generated forever.
31367
31368 Since the frame rate is used as time base, all frames including the
31369 last one will have their full duration. If the specified duration
31370 is not a multiple of the frame duration, it will be rounded up.
31371
31372 sar Set the sample aspect ratio of the sourced video.
31373
31374 alpha
31375 Specify the alpha (opacity) of the background, only available in
31376 the "testsrc2" source. The value must be between 0 (fully
31377 transparent) and 255 (fully opaque, the default).
31378
31379 decimals, n
31380 Set the number of decimals to show in the timestamp, only available
31381 in the "testsrc" source.
31382
31383 The displayed timestamp value will correspond to the original
31384 timestamp value multiplied by the power of 10 of the specified
31385 value. Default value is 0.
31386
31387 type
31388 Set the type of the color spectrum, only available in the
31389 "colorspectrum" source. Can be one of the following:
31390
31391 black
31392 white
31393 all
31394
31395 Examples
31396
31397 • Generate a video with a duration of 5.3 seconds, with size 176x144
31398 and a frame rate of 10 frames per second:
31399
31400 testsrc=duration=5.3:size=qcif:rate=10
31401
31402 • The following graph description will generate a red source with an
31403 opacity of 0.2, with size "qcif" and a frame rate of 10 frames per
31404 second:
31405
31406 color=c=red@0.2:s=qcif:r=10
31407
31408 • If the input content is to be ignored, "nullsrc" can be used. The
31409 following command generates noise in the luminance plane by
31410 employing the "geq" filter:
31411
31412 nullsrc=s=256x256, geq=random(1)*255:128:128
31413
31414 Commands
31415
31416 The "color" source supports the following commands:
31417
31418 c, color
31419 Set the color of the created image. Accepts the same syntax of the
31420 corresponding color option.
31421
31422 openclsrc
31423 Generate video using an OpenCL program.
31424
31425 source
31426 OpenCL program source file.
31427
31428 kernel
31429 Kernel name in program.
31430
31431 size, s
31432 Size of frames to generate. This must be set.
31433
31434 format
31435 Pixel format to use for the generated frames. This must be set.
31436
31437 rate, r
31438 Number of frames generated every second. Default value is '25'.
31439
31440 For details of how the program loading works, see the program_opencl
31441 filter.
31442
31443 Example programs:
31444
31445 • Generate a colour ramp by setting pixel values from the position of
31446 the pixel in the output image. (Note that this will work with all
31447 pixel formats, but the generated output will not be the same.)
31448
31449 __kernel void ramp(__write_only image2d_t dst,
31450 unsigned int index)
31451 {
31452 int2 loc = (int2)(get_global_id(0), get_global_id(1));
31453
31454 float4 val;
31455 val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
31456
31457 write_imagef(dst, loc, val);
31458 }
31459
31460 • Generate a Sierpinski carpet pattern, panning by a single pixel
31461 each frame.
31462
31463 __kernel void sierpinski_carpet(__write_only image2d_t dst,
31464 unsigned int index)
31465 {
31466 int2 loc = (int2)(get_global_id(0), get_global_id(1));
31467
31468 float4 value = 0.0f;
31469 int x = loc.x + index;
31470 int y = loc.y + index;
31471 while (x > 0 || y > 0) {
31472 if (x % 3 == 1 && y % 3 == 1) {
31473 value = 1.0f;
31474 break;
31475 }
31476 x /= 3;
31477 y /= 3;
31478 }
31479
31480 write_imagef(dst, loc, value);
31481 }
31482
31483 sierpinski
31484 Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
31485
31486 This source accepts the following options:
31487
31488 size, s
31489 Set frame size. For the syntax of this option, check the "Video
31490 size" section in the ffmpeg-utils manual. Default value is
31491 "640x480".
31492
31493 rate, r
31494 Set frame rate, expressed as number of frames per second. Default
31495 value is "25".
31496
31497 seed
31498 Set seed which is used for random panning.
31499
31500 jump
31501 Set max jump for single pan destination. Allowed range is from 1 to
31502 10000.
31503
31504 type
31505 Set fractal type, can be default "carpet" or "triangle".
31506
31508 Below is a description of the currently available video sinks.
31509
31510 buffersink
31511 Buffer video frames, and make them available to the end of the filter
31512 graph.
31513
31514 This sink is mainly intended for programmatic use, in particular
31515 through the interface defined in libavfilter/buffersink.h or the
31516 options system.
31517
31518 It accepts a pointer to an AVBufferSinkContext structure, which defines
31519 the incoming buffers' formats, to be passed as the opaque parameter to
31520 "avfilter_init_filter" for initialization.
31521
31522 nullsink
31523 Null video sink: do absolutely nothing with the input video. It is
31524 mainly useful as a template and for use in analysis / debugging tools.
31525
31527 Below is a description of the currently available multimedia filters.
31528
31529 abitscope
31530 Convert input audio to a video output, displaying the audio bit scope.
31531
31532 The filter accepts the following options:
31533
31534 rate, r
31535 Set frame rate, expressed as number of frames per second. Default
31536 value is "25".
31537
31538 size, s
31539 Specify the video size for the output. For the syntax of this
31540 option, check the "Video size" section in the ffmpeg-utils manual.
31541 Default value is "1024x256".
31542
31543 colors
31544 Specify list of colors separated by space or by '|' which will be
31545 used to draw channels. Unrecognized or missing colors will be
31546 replaced by white color.
31547
31548 adrawgraph
31549 Draw a graph using input audio metadata.
31550
31551 See drawgraph
31552
31553 agraphmonitor
31554 See graphmonitor.
31555
31556 ahistogram
31557 Convert input audio to a video output, displaying the volume histogram.
31558
31559 The filter accepts the following options:
31560
31561 dmode
31562 Specify how histogram is calculated.
31563
31564 It accepts the following values:
31565
31566 single
31567 Use single histogram for all channels.
31568
31569 separate
31570 Use separate histogram for each channel.
31571
31572 Default is "single".
31573
31574 rate, r
31575 Set frame rate, expressed as number of frames per second. Default
31576 value is "25".
31577
31578 size, s
31579 Specify the video size for the output. For the syntax of this
31580 option, check the "Video size" section in the ffmpeg-utils manual.
31581 Default value is "hd720".
31582
31583 scale
31584 Set display scale.
31585
31586 It accepts the following values:
31587
31588 log logarithmic
31589
31590 sqrt
31591 square root
31592
31593 cbrt
31594 cubic root
31595
31596 lin linear
31597
31598 rlog
31599 reverse logarithmic
31600
31601 Default is "log".
31602
31603 ascale
31604 Set amplitude scale.
31605
31606 It accepts the following values:
31607
31608 log logarithmic
31609
31610 lin linear
31611
31612 Default is "log".
31613
31614 acount
31615 Set how much frames to accumulate in histogram. Default is 1.
31616 Setting this to -1 accumulates all frames.
31617
31618 rheight
31619 Set histogram ratio of window height.
31620
31621 slide
31622 Set sonogram sliding.
31623
31624 It accepts the following values:
31625
31626 replace
31627 replace old rows with new ones.
31628
31629 scroll
31630 scroll from top to bottom.
31631
31632 Default is "replace".
31633
31634 aphasemeter
31635 Measures phase of input audio, which is exported as metadata
31636 "lavfi.aphasemeter.phase", representing mean phase of current audio
31637 frame. A video output can also be produced and is enabled by default.
31638 The audio is passed through as first output.
31639
31640 Audio will be rematrixed to stereo if it has a different channel
31641 layout. Phase value is in range "[-1, 1]" where "-1" means left and
31642 right channels are completely out of phase and 1 means channels are in
31643 phase.
31644
31645 The filter accepts the following options, all related to its video
31646 output:
31647
31648 rate, r
31649 Set the output frame rate. Default value is 25.
31650
31651 size, s
31652 Set the video size for the output. For the syntax of this option,
31653 check the "Video size" section in the ffmpeg-utils manual. Default
31654 value is "800x400".
31655
31656 rc
31657 gc
31658 bc Specify the red, green, blue contrast. Default values are 2, 7 and
31659 1. Allowed range is "[0, 255]".
31660
31661 mpc Set color which will be used for drawing median phase. If color is
31662 "none" which is default, no median phase value will be drawn.
31663
31664 video
31665 Enable video output. Default is enabled.
31666
31667 phasing detection
31668
31669 The filter also detects out of phase and mono sequences in stereo
31670 streams. It logs the sequence start, end and duration when it lasts
31671 longer or as long as the minimum set.
31672
31673 The filter accepts the following options for this detection:
31674
31675 phasing
31676 Enable mono and out of phase detection. Default is disabled.
31677
31678 tolerance, t
31679 Set phase tolerance for mono detection, in amplitude ratio. Default
31680 is 0. Allowed range is "[0, 1]".
31681
31682 angle, a
31683 Set angle threshold for out of phase detection, in degree. Default
31684 is 170. Allowed range is "[90, 180]".
31685
31686 duration, d
31687 Set mono or out of phase duration until notification, expressed in
31688 seconds. Default is 2.
31689
31690 Examples
31691
31692 • Complete example with ffmpeg to detect 1 second of mono with 0.001
31693 phase tolerance:
31694
31695 ffmpeg -i stereo.wav -af aphasemeter=video=0:phasing=1:duration=1:tolerance=0.001 -f null -
31696
31697 avectorscope
31698 Convert input audio to a video output, representing the audio vector
31699 scope.
31700
31701 The filter is used to measure the difference between channels of stereo
31702 audio stream. A monaural signal, consisting of identical left and right
31703 signal, results in straight vertical line. Any stereo separation is
31704 visible as a deviation from this line, creating a Lissajous figure. If
31705 the straight (or deviation from it) but horizontal line appears this
31706 indicates that the left and right channels are out of phase.
31707
31708 The filter accepts the following options:
31709
31710 mode, m
31711 Set the vectorscope mode.
31712
31713 Available values are:
31714
31715 lissajous
31716 Lissajous rotated by 45 degrees.
31717
31718 lissajous_xy
31719 Same as above but not rotated.
31720
31721 polar
31722 Shape resembling half of circle.
31723
31724 Default value is lissajous.
31725
31726 size, s
31727 Set the video size for the output. For the syntax of this option,
31728 check the "Video size" section in the ffmpeg-utils manual. Default
31729 value is "400x400".
31730
31731 rate, r
31732 Set the output frame rate. Default value is 25.
31733
31734 rc
31735 gc
31736 bc
31737 ac Specify the red, green, blue and alpha contrast. Default values are
31738 40, 160, 80 and 255. Allowed range is "[0, 255]".
31739
31740 rf
31741 gf
31742 bf
31743 af Specify the red, green, blue and alpha fade. Default values are 15,
31744 10, 5 and 5. Allowed range is "[0, 255]".
31745
31746 zoom
31747 Set the zoom factor. Default value is 1. Allowed range is "[0,
31748 10]". Values lower than 1 will auto adjust zoom factor to maximal
31749 possible value.
31750
31751 draw
31752 Set the vectorscope drawing mode.
31753
31754 Available values are:
31755
31756 dot Draw dot for each sample.
31757
31758 line
31759 Draw line between previous and current sample.
31760
31761 Default value is dot.
31762
31763 scale
31764 Specify amplitude scale of audio samples.
31765
31766 Available values are:
31767
31768 lin Linear.
31769
31770 sqrt
31771 Square root.
31772
31773 cbrt
31774 Cubic root.
31775
31776 log Logarithmic.
31777
31778 swap
31779 Swap left channel axis with right channel axis.
31780
31781 mirror
31782 Mirror axis.
31783
31784 none
31785 No mirror.
31786
31787 x Mirror only x axis.
31788
31789 y Mirror only y axis.
31790
31791 xy Mirror both axis.
31792
31793 Examples
31794
31795 • Complete example using ffplay:
31796
31797 ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
31798 [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
31799
31800 Commands
31801
31802 This filter supports the all above options as commands except options
31803 "size" and "rate".
31804
31805 bench, abench
31806 Benchmark part of a filtergraph.
31807
31808 The filter accepts the following options:
31809
31810 action
31811 Start or stop a timer.
31812
31813 Available values are:
31814
31815 start
31816 Get the current time, set it as frame metadata (using the key
31817 "lavfi.bench.start_time"), and forward the frame to the next
31818 filter.
31819
31820 stop
31821 Get the current time and fetch the "lavfi.bench.start_time"
31822 metadata from the input frame metadata to get the time
31823 difference. Time difference, average, maximum and minimum time
31824 (respectively "t", "avg", "max" and "min") are then printed.
31825 The timestamps are expressed in seconds.
31826
31827 Examples
31828
31829 • Benchmark selectivecolor filter:
31830
31831 bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
31832
31833 concat
31834 Concatenate audio and video streams, joining them together one after
31835 the other.
31836
31837 The filter works on segments of synchronized video and audio streams.
31838 All segments must have the same number of streams of each type, and
31839 that will also be the number of streams at output.
31840
31841 The filter accepts the following options:
31842
31843 n Set the number of segments. Default is 2.
31844
31845 v Set the number of output video streams, that is also the number of
31846 video streams in each segment. Default is 1.
31847
31848 a Set the number of output audio streams, that is also the number of
31849 audio streams in each segment. Default is 0.
31850
31851 unsafe
31852 Activate unsafe mode: do not fail if segments have a different
31853 format.
31854
31855 The filter has v+a outputs: first v video outputs, then a audio
31856 outputs.
31857
31858 There are nx(v+a) inputs: first the inputs for the first segment, in
31859 the same order as the outputs, then the inputs for the second segment,
31860 etc.
31861
31862 Related streams do not always have exactly the same duration, for
31863 various reasons including codec frame size or sloppy authoring. For
31864 that reason, related synchronized streams (e.g. a video and its audio
31865 track) should be concatenated at once. The concat filter will use the
31866 duration of the longest stream in each segment (except the last one),
31867 and if necessary pad shorter audio streams with silence.
31868
31869 For this filter to work correctly, all segments must start at timestamp
31870 0.
31871
31872 All corresponding streams must have the same parameters in all
31873 segments; the filtering system will automatically select a common pixel
31874 format for video streams, and a common sample format, sample rate and
31875 channel layout for audio streams, but other settings, such as
31876 resolution, must be converted explicitly by the user.
31877
31878 Different frame rates are acceptable but will result in variable frame
31879 rate at output; be sure to configure the output file to handle it.
31880
31881 Examples
31882
31883 • Concatenate an opening, an episode and an ending, all in bilingual
31884 version (video in stream 0, audio in streams 1 and 2):
31885
31886 ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
31887 '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
31888 concat=n=3:v=1:a=2 [v] [a1] [a2]' \
31889 -map '[v]' -map '[a1]' -map '[a2]' output.mkv
31890
31891 • Concatenate two parts, handling audio and video separately, using
31892 the (a)movie sources, and adjusting the resolution:
31893
31894 movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
31895 movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
31896 [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
31897
31898 Note that a desync will happen at the stitch if the audio and video
31899 streams do not have exactly the same duration in the first file.
31900
31901 Commands
31902
31903 This filter supports the following commands:
31904
31905 next
31906 Close the current segment and step to the next one
31907
31908 ebur128
31909 EBU R128 scanner filter. This filter takes an audio stream and analyzes
31910 its loudness level. By default, it logs a message at a frequency of
31911 10Hz with the Momentary loudness (identified by "M"), Short-term
31912 loudness ("S"), Integrated loudness ("I") and Loudness Range ("LRA").
31913
31914 The filter can only analyze streams which have sample format is double-
31915 precision floating point. The input stream will be converted to this
31916 specification, if needed. Users may need to insert aformat and/or
31917 aresample filters after this filter to obtain the original parameters.
31918
31919 The filter also has a video output (see the video option) with a real
31920 time graph to observe the loudness evolution. The graphic contains the
31921 logged message mentioned above, so it is not printed anymore when this
31922 option is set, unless the verbose logging is set. The main graphing
31923 area contains the short-term loudness (3 seconds of analysis), and the
31924 gauge on the right is for the momentary loudness (400 milliseconds),
31925 but can optionally be configured to instead display short-term loudness
31926 (see gauge).
31927
31928 The green area marks a +/- 1LU target range around the target loudness
31929 (-23LUFS by default, unless modified through target).
31930
31931 More information about the Loudness Recommendation EBU R128 on
31932 <http://tech.ebu.ch/loudness>.
31933
31934 The filter accepts the following options:
31935
31936 video
31937 Activate the video output. The audio stream is passed unchanged
31938 whether this option is set or no. The video stream will be the
31939 first output stream if activated. Default is 0.
31940
31941 size
31942 Set the video size. This option is for video only. For the syntax
31943 of this option, check the "Video size" section in the ffmpeg-utils
31944 manual. Default and minimum resolution is "640x480".
31945
31946 meter
31947 Set the EBU scale meter. Default is 9. Common values are 9 and 18,
31948 respectively for EBU scale meter +9 and EBU scale meter +18. Any
31949 other integer value between this range is allowed.
31950
31951 metadata
31952 Set metadata injection. If set to 1, the audio input will be
31953 segmented into 100ms output frames, each of them containing various
31954 loudness information in metadata. All the metadata keys are
31955 prefixed with "lavfi.r128.".
31956
31957 Default is 0.
31958
31959 framelog
31960 Force the frame logging level.
31961
31962 Available values are:
31963
31964 info
31965 information logging level
31966
31967 verbose
31968 verbose logging level
31969
31970 By default, the logging level is set to info. If the video or the
31971 metadata options are set, it switches to verbose.
31972
31973 peak
31974 Set peak mode(s).
31975
31976 Available modes can be cumulated (the option is a "flag" type).
31977 Possible values are:
31978
31979 none
31980 Disable any peak mode (default).
31981
31982 sample
31983 Enable sample-peak mode.
31984
31985 Simple peak mode looking for the higher sample value. It logs a
31986 message for sample-peak (identified by "SPK").
31987
31988 true
31989 Enable true-peak mode.
31990
31991 If enabled, the peak lookup is done on an over-sampled version
31992 of the input stream for better peak accuracy. It logs a message
31993 for true-peak. (identified by "TPK") and true-peak per frame
31994 (identified by "FTPK"). This mode requires a build with
31995 "libswresample".
31996
31997 dualmono
31998 Treat mono input files as "dual mono". If a mono file is intended
31999 for playback on a stereo system, its EBU R128 measurement will be
32000 perceptually incorrect. If set to "true", this option will
32001 compensate for this effect. Multi-channel input files are not
32002 affected by this option.
32003
32004 panlaw
32005 Set a specific pan law to be used for the measurement of dual mono
32006 files. This parameter is optional, and has a default value of
32007 -3.01dB.
32008
32009 target
32010 Set a specific target level (in LUFS) used as relative zero in the
32011 visualization. This parameter is optional and has a default value
32012 of -23LUFS as specified by EBU R128. However, material published
32013 online may prefer a level of -16LUFS (e.g. for use with podcasts or
32014 video platforms).
32015
32016 gauge
32017 Set the value displayed by the gauge. Valid values are "momentary"
32018 and s "shortterm". By default the momentary value will be used, but
32019 in certain scenarios it may be more useful to observe the short
32020 term value instead (e.g. live mixing).
32021
32022 scale
32023 Sets the display scale for the loudness. Valid parameters are
32024 "absolute" (in LUFS) or "relative" (LU) relative to the target.
32025 This only affects the video output, not the summary or continuous
32026 log output.
32027
32028 Examples
32029
32030 • Real-time graph using ffplay, with a EBU scale meter +18:
32031
32032 ffplay -f lavfi -i "amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]"
32033
32034 • Run an analysis with ffmpeg:
32035
32036 ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
32037
32038 interleave, ainterleave
32039 Temporally interleave frames from several inputs.
32040
32041 "interleave" works with video inputs, "ainterleave" with audio.
32042
32043 These filters read frames from several inputs and send the oldest
32044 queued frame to the output.
32045
32046 Input streams must have well defined, monotonically increasing frame
32047 timestamp values.
32048
32049 In order to submit one frame to output, these filters need to enqueue
32050 at least one frame for each input, so they cannot work in case one
32051 input is not yet terminated and will not receive incoming frames.
32052
32053 For example consider the case when one input is a "select" filter which
32054 always drops input frames. The "interleave" filter will keep reading
32055 from that input, but it will never be able to send new frames to output
32056 until the input sends an end-of-stream signal.
32057
32058 Also, depending on inputs synchronization, the filters will drop frames
32059 in case one input receives more frames than the other ones, and the
32060 queue is already filled.
32061
32062 These filters accept the following options:
32063
32064 nb_inputs, n
32065 Set the number of different inputs, it is 2 by default.
32066
32067 duration
32068 How to determine the end-of-stream.
32069
32070 longest
32071 The duration of the longest input. (default)
32072
32073 shortest
32074 The duration of the shortest input.
32075
32076 first
32077 The duration of the first input.
32078
32079 Examples
32080
32081 • Interleave frames belonging to different streams using ffmpeg:
32082
32083 ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex "[0:v][1:v] interleave" out.avi
32084
32085 • Add flickering blur effect:
32086
32087 select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
32088
32089 latency, alatency
32090 Measure filtering latency.
32091
32092 Report previous filter filtering latency, delay in number of audio
32093 samples for audio filters or number of video frames for video filters.
32094
32095 On end of input stream, filter will report min and max measured latency
32096 for previous running filter in filtergraph.
32097
32098 metadata, ametadata
32099 Manipulate frame metadata.
32100
32101 This filter accepts the following options:
32102
32103 mode
32104 Set mode of operation of the filter.
32105
32106 Can be one of the following:
32107
32108 select
32109 If both "value" and "key" is set, select frames which have such
32110 metadata. If only "key" is set, select every frame that has
32111 such key in metadata.
32112
32113 add Add new metadata "key" and "value". If key is already available
32114 do nothing.
32115
32116 modify
32117 Modify value of already present key.
32118
32119 delete
32120 If "value" is set, delete only keys that have such value.
32121 Otherwise, delete key. If "key" is not set, delete all metadata
32122 values in the frame.
32123
32124 print
32125 Print key and its value if metadata was found. If "key" is not
32126 set print all metadata values available in frame.
32127
32128 key Set key used with all modes. Must be set for all modes except
32129 "print" and "delete".
32130
32131 value
32132 Set metadata value which will be used. This option is mandatory for
32133 "modify" and "add" mode.
32134
32135 function
32136 Which function to use when comparing metadata value and "value".
32137
32138 Can be one of following:
32139
32140 same_str
32141 Values are interpreted as strings, returns true if metadata
32142 value is same as "value".
32143
32144 starts_with
32145 Values are interpreted as strings, returns true if metadata
32146 value starts with the "value" option string.
32147
32148 less
32149 Values are interpreted as floats, returns true if metadata
32150 value is less than "value".
32151
32152 equal
32153 Values are interpreted as floats, returns true if "value" is
32154 equal with metadata value.
32155
32156 greater
32157 Values are interpreted as floats, returns true if metadata
32158 value is greater than "value".
32159
32160 expr
32161 Values are interpreted as floats, returns true if expression
32162 from option "expr" evaluates to true.
32163
32164 ends_with
32165 Values are interpreted as strings, returns true if metadata
32166 value ends with the "value" option string.
32167
32168 expr
32169 Set expression which is used when "function" is set to "expr". The
32170 expression is evaluated through the eval API and can contain the
32171 following constants:
32172
32173 VALUE1, FRAMEVAL
32174 Float representation of "value" from metadata key.
32175
32176 VALUE2, USERVAL
32177 Float representation of "value" as supplied by user in "value"
32178 option.
32179
32180 file
32181 If specified in "print" mode, output is written to the named file.
32182 Instead of plain filename any writable url can be specified.
32183 Filename ``-'' is a shorthand for standard output. If "file" option
32184 is not set, output is written to the log with AV_LOG_INFO loglevel.
32185
32186 direct
32187 Reduces buffering in print mode when output is written to a URL set
32188 using file.
32189
32190 Examples
32191
32192 • Print all metadata values for frames with key
32193 "lavfi.signalstats.YDIF" with values between 0 and 1.
32194
32195 signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
32196
32197 • Print silencedetect output to file metadata.txt.
32198
32199 silencedetect,ametadata=mode=print:file=metadata.txt
32200
32201 • Direct all metadata to a pipe with file descriptor 4.
32202
32203 metadata=mode=print:file='pipe\:4'
32204
32205 perms, aperms
32206 Set read/write permissions for the output frames.
32207
32208 These filters are mainly aimed at developers to test direct path in the
32209 following filter in the filtergraph.
32210
32211 The filters accept the following options:
32212
32213 mode
32214 Select the permissions mode.
32215
32216 It accepts the following values:
32217
32218 none
32219 Do nothing. This is the default.
32220
32221 ro Set all the output frames read-only.
32222
32223 rw Set all the output frames directly writable.
32224
32225 toggle
32226 Make the frame read-only if writable, and writable if read-
32227 only.
32228
32229 random
32230 Set each output frame read-only or writable randomly.
32231
32232 seed
32233 Set the seed for the random mode, must be an integer included
32234 between 0 and "UINT32_MAX". If not specified, or if explicitly set
32235 to "-1", the filter will try to use a good random seed on a best
32236 effort basis.
32237
32238 Note: in case of auto-inserted filter between the permission filter and
32239 the following one, the permission might not be received as expected in
32240 that following filter. Inserting a format or aformat filter before the
32241 perms/aperms filter can avoid this problem.
32242
32243 realtime, arealtime
32244 Slow down filtering to match real time approximately.
32245
32246 These filters will pause the filtering for a variable amount of time to
32247 match the output rate with the input timestamps. They are similar to
32248 the re option to "ffmpeg".
32249
32250 They accept the following options:
32251
32252 limit
32253 Time limit for the pauses. Any pause longer than that will be
32254 considered a timestamp discontinuity and reset the timer. Default
32255 is 2 seconds.
32256
32257 speed
32258 Speed factor for processing. The value must be a float larger than
32259 zero. Values larger than 1.0 will result in faster than realtime
32260 processing, smaller will slow processing down. The limit is
32261 automatically adapted accordingly. Default is 1.0.
32262
32263 A processing speed faster than what is possible without these
32264 filters cannot be achieved.
32265
32266 segment, asegment
32267 Split single input stream into multiple streams.
32268
32269 This filter does opposite of concat filters.
32270
32271 "segment" works on video frames, "asegment" on audio samples.
32272
32273 This filter accepts the following options:
32274
32275 timestamps
32276 Timestamps of output segments separated by '|'. The first segment
32277 will run from the beginning of the input stream. The last segment
32278 will run until the end of the input stream
32279
32280 frames, samples
32281 Exact frame/sample count to split the segments.
32282
32283 In all cases, prefixing an each segment with '+' will make it relative
32284 to the previous segment.
32285
32286 Examples
32287
32288 • Split input audio stream into three output audio streams, starting
32289 at start of input audio stream and storing that in 1st output audio
32290 stream, then following at 60th second and storing than in 2nd
32291 output audio stream, and last after 150th second of input audio
32292 stream store in 3rd output audio stream:
32293
32294 asegment=timestamps="60|150"
32295
32296 select, aselect
32297 Select frames to pass in output.
32298
32299 This filter accepts the following options:
32300
32301 expr, e
32302 Set expression, which is evaluated for each input frame.
32303
32304 If the expression is evaluated to zero, the frame is discarded.
32305
32306 If the evaluation result is negative or NaN, the frame is sent to
32307 the first output; otherwise it is sent to the output with index
32308 "ceil(val)-1", assuming that the input index starts from 0.
32309
32310 For example a value of 1.2 corresponds to the output with index
32311 "ceil(1.2)-1 = 2-1 = 1", that is the second output.
32312
32313 outputs, n
32314 Set the number of outputs. The output to which to send the selected
32315 frame is based on the result of the evaluation. Default value is 1.
32316
32317 The expression can contain the following constants:
32318
32319 n The (sequential) number of the filtered frame, starting from 0.
32320
32321 selected_n
32322 The (sequential) number of the selected frame, starting from 0.
32323
32324 prev_selected_n
32325 The sequential number of the last selected frame. It's NAN if
32326 undefined.
32327
32328 TB The timebase of the input timestamps.
32329
32330 pts The PTS (Presentation TimeStamp) of the filtered frame, expressed
32331 in TB units. It's NAN if undefined.
32332
32333 t The PTS of the filtered frame, expressed in seconds. It's NAN if
32334 undefined.
32335
32336 prev_pts
32337 The PTS of the previously filtered frame. It's NAN if undefined.
32338
32339 prev_selected_pts
32340 The PTS of the last previously filtered frame. It's NAN if
32341 undefined.
32342
32343 prev_selected_t
32344 The PTS of the last previously selected frame, expressed in
32345 seconds. It's NAN if undefined.
32346
32347 start_pts
32348 The first PTS in the stream which is not NAN. It remains NAN if not
32349 found.
32350
32351 start_t
32352 The first PTS, in seconds, in the stream which is not NAN. It
32353 remains NAN if not found.
32354
32355 pict_type (video only)
32356 The type of the filtered frame. It can assume one of the following
32357 values:
32358
32359 I
32360 P
32361 B
32362 S
32363 SI
32364 SP
32365 BI
32366 interlace_type (video only)
32367 The frame interlace type. It can assume one of the following
32368 values:
32369
32370 PROGRESSIVE
32371 The frame is progressive (not interlaced).
32372
32373 TOPFIRST
32374 The frame is top-field-first.
32375
32376 BOTTOMFIRST
32377 The frame is bottom-field-first.
32378
32379 consumed_sample_n (audio only)
32380 the number of selected samples before the current frame
32381
32382 samples_n (audio only)
32383 the number of samples in the current frame
32384
32385 sample_rate (audio only)
32386 the input sample rate
32387
32388 key This is 1 if the filtered frame is a key-frame, 0 otherwise.
32389
32390 pos the position in the file of the filtered frame, -1 if the
32391 information is not available (e.g. for synthetic video)
32392
32393 scene (video only)
32394 value between 0 and 1 to indicate a new scene; a low value reflects
32395 a low probability for the current frame to introduce a new scene,
32396 while a higher value means the current frame is more likely to be
32397 one (see the example below)
32398
32399 concatdec_select
32400 The concat demuxer can select only part of a concat input file by
32401 setting an inpoint and an outpoint, but the output packets may not
32402 be entirely contained in the selected interval. By using this
32403 variable, it is possible to skip frames generated by the concat
32404 demuxer which are not exactly contained in the selected interval.
32405
32406 This works by comparing the frame pts against the
32407 lavf.concat.start_time and the lavf.concat.duration packet metadata
32408 values which are also present in the decoded frames.
32409
32410 The concatdec_select variable is -1 if the frame pts is at least
32411 start_time and either the duration metadata is missing or the frame
32412 pts is less than start_time + duration, 0 otherwise, and NaN if the
32413 start_time metadata is missing.
32414
32415 That basically means that an input frame is selected if its pts is
32416 within the interval set by the concat demuxer.
32417
32418 The default value of the select expression is "1".
32419
32420 Examples
32421
32422 • Select all frames in input:
32423
32424 select
32425
32426 The example above is the same as:
32427
32428 select=1
32429
32430 • Skip all frames:
32431
32432 select=0
32433
32434 • Select only I-frames:
32435
32436 select='eq(pict_type\,I)'
32437
32438 • Select one frame every 100:
32439
32440 select='not(mod(n\,100))'
32441
32442 • Select only frames contained in the 10-20 time interval:
32443
32444 select=between(t\,10\,20)
32445
32446 • Select only I-frames contained in the 10-20 time interval:
32447
32448 select=between(t\,10\,20)*eq(pict_type\,I)
32449
32450 • Select frames with a minimum distance of 10 seconds:
32451
32452 select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
32453
32454 • Use aselect to select only audio frames with samples number > 100:
32455
32456 aselect='gt(samples_n\,100)'
32457
32458 • Create a mosaic of the first scenes:
32459
32460 ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
32461
32462 Comparing scene against a value between 0.3 and 0.5 is generally a
32463 sane choice.
32464
32465 • Send even and odd frames to separate outputs, and compose them:
32466
32467 select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
32468
32469 • Select useful frames from an ffconcat file which is using inpoints
32470 and outpoints but where the source files are not intra frame only.
32471
32472 ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
32473
32474 sendcmd, asendcmd
32475 Send commands to filters in the filtergraph.
32476
32477 These filters read commands to be sent to other filters in the
32478 filtergraph.
32479
32480 "sendcmd" must be inserted between two video filters, "asendcmd" must
32481 be inserted between two audio filters, but apart from that they act the
32482 same way.
32483
32484 The specification of commands can be provided in the filter arguments
32485 with the commands option, or in a file specified by the filename
32486 option.
32487
32488 These filters accept the following options:
32489
32490 commands, c
32491 Set the commands to be read and sent to the other filters.
32492
32493 filename, f
32494 Set the filename of the commands to be read and sent to the other
32495 filters.
32496
32497 Commands syntax
32498
32499 A commands description consists of a sequence of interval
32500 specifications, comprising a list of commands to be executed when a
32501 particular event related to that interval occurs. The occurring event
32502 is typically the current frame time entering or leaving a given time
32503 interval.
32504
32505 An interval is specified by the following syntax:
32506
32507 <START>[-<END>] <COMMANDS>;
32508
32509 The time interval is specified by the START and END times. END is
32510 optional and defaults to the maximum time.
32511
32512 The current frame time is considered within the specified interval if
32513 it is included in the interval [START, END), that is when the time is
32514 greater or equal to START and is lesser than END.
32515
32516 COMMANDS consists of a sequence of one or more command specifications,
32517 separated by ",", relating to that interval. The syntax of a command
32518 specification is given by:
32519
32520 [<FLAGS>] <TARGET> <COMMAND> <ARG>
32521
32522 FLAGS is optional and specifies the type of events relating to the time
32523 interval which enable sending the specified command, and must be a non-
32524 null sequence of identifier flags separated by "+" or "|" and enclosed
32525 between "[" and "]".
32526
32527 The following flags are recognized:
32528
32529 enter
32530 The command is sent when the current frame timestamp enters the
32531 specified interval. In other words, the command is sent when the
32532 previous frame timestamp was not in the given interval, and the
32533 current is.
32534
32535 leave
32536 The command is sent when the current frame timestamp leaves the
32537 specified interval. In other words, the command is sent when the
32538 previous frame timestamp was in the given interval, and the current
32539 is not.
32540
32541 expr
32542 The command ARG is interpreted as expression and result of
32543 expression is passed as ARG.
32544
32545 The expression is evaluated through the eval API and can contain
32546 the following constants:
32547
32548 POS Original position in the file of the frame, or undefined if
32549 undefined for the current frame.
32550
32551 PTS The presentation timestamp in input.
32552
32553 N The count of the input frame for video or audio, starting from
32554 0.
32555
32556 T The time in seconds of the current frame.
32557
32558 TS The start time in seconds of the current command interval.
32559
32560 TE The end time in seconds of the current command interval.
32561
32562 TI The interpolated time of the current command interval, TI = (T
32563 - TS) / (TE - TS).
32564
32565 If FLAGS is not specified, a default value of "[enter]" is assumed.
32566
32567 TARGET specifies the target of the command, usually the name of the
32568 filter class or a specific filter instance name.
32569
32570 COMMAND specifies the name of the command for the target filter.
32571
32572 ARG is optional and specifies the optional list of argument for the
32573 given COMMAND.
32574
32575 Between one interval specification and another, whitespaces, or
32576 sequences of characters starting with "#" until the end of line, are
32577 ignored and can be used to annotate comments.
32578
32579 A simplified BNF description of the commands specification syntax
32580 follows:
32581
32582 <COMMAND_FLAG> ::= "enter" | "leave"
32583 <COMMAND_FLAGS> ::= <COMMAND_FLAG> [(+|"|")<COMMAND_FLAG>]
32584 <COMMAND> ::= ["[" <COMMAND_FLAGS> "]"] <TARGET> <COMMAND> [<ARG>]
32585 <COMMANDS> ::= <COMMAND> [,<COMMANDS>]
32586 <INTERVAL> ::= <START>[-<END>] <COMMANDS>
32587 <INTERVALS> ::= <INTERVAL>[;<INTERVALS>]
32588
32589 Examples
32590
32591 • Specify audio tempo change at second 4:
32592
32593 asendcmd=c='4.0 atempo tempo 1.5',atempo
32594
32595 • Target a specific filter instance:
32596
32597 asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
32598
32599 • Specify a list of drawtext and hue commands in a file.
32600
32601 # show text in the interval 5-10
32602 5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
32603 [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
32604
32605 # desaturate the image in the interval 15-20
32606 15.0-20.0 [enter] hue s 0,
32607 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
32608 [leave] hue s 1,
32609 [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
32610
32611 # apply an exponential saturation fade-out effect, starting from time 25
32612 25 [enter] hue s exp(25-t)
32613
32614 A filtergraph allowing to read and process the above command list
32615 stored in a file test.cmd, can be specified with:
32616
32617 sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
32618
32619 setpts, asetpts
32620 Change the PTS (presentation timestamp) of the input frames.
32621
32622 "setpts" works on video frames, "asetpts" on audio frames.
32623
32624 This filter accepts the following options:
32625
32626 expr
32627 The expression which is evaluated for each frame to construct its
32628 timestamp.
32629
32630 The expression is evaluated through the eval API and can contain the
32631 following constants:
32632
32633 FRAME_RATE, FR
32634 frame rate, only defined for constant frame-rate video
32635
32636 PTS The presentation timestamp in input
32637
32638 N The count of the input frame for video or the number of consumed
32639 samples, not including the current frame for audio, starting from
32640 0.
32641
32642 NB_CONSUMED_SAMPLES
32643 The number of consumed samples, not including the current frame
32644 (only audio)
32645
32646 NB_SAMPLES, S
32647 The number of samples in the current frame (only audio)
32648
32649 SAMPLE_RATE, SR
32650 The audio sample rate.
32651
32652 STARTPTS
32653 The PTS of the first frame.
32654
32655 STARTT
32656 the time in seconds of the first frame
32657
32658 INTERLACED
32659 State whether the current frame is interlaced.
32660
32661 T the time in seconds of the current frame
32662
32663 POS original position in the file of the frame, or undefined if
32664 undefined for the current frame
32665
32666 PREV_INPTS
32667 The previous input PTS.
32668
32669 PREV_INT
32670 previous input time in seconds
32671
32672 PREV_OUTPTS
32673 The previous output PTS.
32674
32675 PREV_OUTT
32676 previous output time in seconds
32677
32678 RTCTIME
32679 The wallclock (RTC) time in microseconds. This is deprecated, use
32680 time(0) instead.
32681
32682 RTCSTART
32683 The wallclock (RTC) time at the start of the movie in microseconds.
32684
32685 TB The timebase of the input timestamps.
32686
32687 Examples
32688
32689 • Start counting PTS from zero
32690
32691 setpts=PTS-STARTPTS
32692
32693 • Apply fast motion effect:
32694
32695 setpts=0.5*PTS
32696
32697 • Apply slow motion effect:
32698
32699 setpts=2.0*PTS
32700
32701 • Set fixed rate of 25 frames per second:
32702
32703 setpts=N/(25*TB)
32704
32705 • Set fixed rate 25 fps with some jitter:
32706
32707 setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
32708
32709 • Apply an offset of 10 seconds to the input PTS:
32710
32711 setpts=PTS+10/TB
32712
32713 • Generate timestamps from a "live source" and rebase onto the
32714 current timebase:
32715
32716 setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
32717
32718 • Generate timestamps by counting samples:
32719
32720 asetpts=N/SR/TB
32721
32722 setrange
32723 Force color range for the output video frame.
32724
32725 The "setrange" filter marks the color range property for the output
32726 frames. It does not change the input frame, but only sets the
32727 corresponding property, which affects how the frame is treated by
32728 following filters.
32729
32730 The filter accepts the following options:
32731
32732 range
32733 Available values are:
32734
32735 auto
32736 Keep the same color range property.
32737
32738 unspecified, unknown
32739 Set the color range as unspecified.
32740
32741 limited, tv, mpeg
32742 Set the color range as limited.
32743
32744 full, pc, jpeg
32745 Set the color range as full.
32746
32747 settb, asettb
32748 Set the timebase to use for the output frames timestamps. It is mainly
32749 useful for testing timebase configuration.
32750
32751 It accepts the following parameters:
32752
32753 expr, tb
32754 The expression which is evaluated into the output timebase.
32755
32756 The value for tb is an arithmetic expression representing a rational.
32757 The expression can contain the constants "AVTB" (the default timebase),
32758 "intb" (the input timebase) and "sr" (the sample rate, audio only).
32759 Default value is "intb".
32760
32761 Examples
32762
32763 • Set the timebase to 1/25:
32764
32765 settb=expr=1/25
32766
32767 • Set the timebase to 1/10:
32768
32769 settb=expr=0.1
32770
32771 • Set the timebase to 1001/1000:
32772
32773 settb=1+0.001
32774
32775 • Set the timebase to 2*intb:
32776
32777 settb=2*intb
32778
32779 • Set the default timebase value:
32780
32781 settb=AVTB
32782
32783 showcqt
32784 Convert input audio to a video output representing frequency spectrum
32785 logarithmically using Brown-Puckette constant Q transform algorithm
32786 with direct frequency domain coefficient calculation (but the transform
32787 itself is not really constant Q, instead the Q factor is actually
32788 variable/clamped), with musical tone scale, from E0 to D#10.
32789
32790 The filter accepts the following options:
32791
32792 size, s
32793 Specify the video size for the output. It must be even. For the
32794 syntax of this option, check the "Video size" section in the
32795 ffmpeg-utils manual. Default value is "1920x1080".
32796
32797 fps, rate, r
32798 Set the output frame rate. Default value is 25.
32799
32800 bar_h
32801 Set the bargraph height. It must be even. Default value is "-1"
32802 which computes the bargraph height automatically.
32803
32804 axis_h
32805 Set the axis height. It must be even. Default value is "-1" which
32806 computes the axis height automatically.
32807
32808 sono_h
32809 Set the sonogram height. It must be even. Default value is "-1"
32810 which computes the sonogram height automatically.
32811
32812 fullhd
32813 Set the fullhd resolution. This option is deprecated, use size, s
32814 instead. Default value is 1.
32815
32816 sono_v, volume
32817 Specify the sonogram volume expression. It can contain variables:
32818
32819 bar_v
32820 the bar_v evaluated expression
32821
32822 frequency, freq, f
32823 the frequency where it is evaluated
32824
32825 timeclamp, tc
32826 the value of timeclamp option
32827
32828 and functions:
32829
32830 a_weighting(f)
32831 A-weighting of equal loudness
32832
32833 b_weighting(f)
32834 B-weighting of equal loudness
32835
32836 c_weighting(f)
32837 C-weighting of equal loudness.
32838
32839 Default value is 16.
32840
32841 bar_v, volume2
32842 Specify the bargraph volume expression. It can contain variables:
32843
32844 sono_v
32845 the sono_v evaluated expression
32846
32847 frequency, freq, f
32848 the frequency where it is evaluated
32849
32850 timeclamp, tc
32851 the value of timeclamp option
32852
32853 and functions:
32854
32855 a_weighting(f)
32856 A-weighting of equal loudness
32857
32858 b_weighting(f)
32859 B-weighting of equal loudness
32860
32861 c_weighting(f)
32862 C-weighting of equal loudness.
32863
32864 Default value is "sono_v".
32865
32866 sono_g, gamma
32867 Specify the sonogram gamma. Lower gamma makes the spectrum more
32868 contrast, higher gamma makes the spectrum having more range.
32869 Default value is 3. Acceptable range is "[1, 7]".
32870
32871 bar_g, gamma2
32872 Specify the bargraph gamma. Default value is 1. Acceptable range is
32873 "[1, 7]".
32874
32875 bar_t
32876 Specify the bargraph transparency level. Lower value makes the
32877 bargraph sharper. Default value is 1. Acceptable range is "[0,
32878 1]".
32879
32880 timeclamp, tc
32881 Specify the transform timeclamp. At low frequency, there is trade-
32882 off between accuracy in time domain and frequency domain. If
32883 timeclamp is lower, event in time domain is represented more
32884 accurately (such as fast bass drum), otherwise event in frequency
32885 domain is represented more accurately (such as bass guitar).
32886 Acceptable range is "[0.002, 1]". Default value is 0.17.
32887
32888 attack
32889 Set attack time in seconds. The default is 0 (disabled). Otherwise,
32890 it limits future samples by applying asymmetric windowing in time
32891 domain, useful when low latency is required. Accepted range is "[0,
32892 1]".
32893
32894 basefreq
32895 Specify the transform base frequency. Default value is
32896 20.01523126408007475, which is frequency 50 cents below E0.
32897 Acceptable range is "[10, 100000]".
32898
32899 endfreq
32900 Specify the transform end frequency. Default value is
32901 20495.59681441799654, which is frequency 50 cents above D#10.
32902 Acceptable range is "[10, 100000]".
32903
32904 coeffclamp
32905 This option is deprecated and ignored.
32906
32907 tlength
32908 Specify the transform length in time domain. Use this option to
32909 control accuracy trade-off between time domain and frequency domain
32910 at every frequency sample. It can contain variables:
32911
32912 frequency, freq, f
32913 the frequency where it is evaluated
32914
32915 timeclamp, tc
32916 the value of timeclamp option.
32917
32918 Default value is "384*tc/(384+tc*f)".
32919
32920 count
32921 Specify the transform count for every video frame. Default value is
32922 6. Acceptable range is "[1, 30]".
32923
32924 fcount
32925 Specify the transform count for every single pixel. Default value
32926 is 0, which makes it computed automatically. Acceptable range is
32927 "[0, 10]".
32928
32929 fontfile
32930 Specify font file for use with freetype to draw the axis. If not
32931 specified, use embedded font. Note that drawing with font file or
32932 embedded font is not implemented with custom basefreq and endfreq,
32933 use axisfile option instead.
32934
32935 font
32936 Specify fontconfig pattern. This has lower priority than fontfile.
32937 The ":" in the pattern may be replaced by "|" to avoid unnecessary
32938 escaping.
32939
32940 fontcolor
32941 Specify font color expression. This is arithmetic expression that
32942 should return integer value 0xRRGGBB. It can contain variables:
32943
32944 frequency, freq, f
32945 the frequency where it is evaluated
32946
32947 timeclamp, tc
32948 the value of timeclamp option
32949
32950 and functions:
32951
32952 midi(f)
32953 midi number of frequency f, some midi numbers: E0(16), C1(24),
32954 C2(36), A4(69)
32955
32956 r(x), g(x), b(x)
32957 red, green, and blue value of intensity x.
32958
32959 Default value is "st(0, (midi(f)-59.5)/12); st(1,
32960 if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0)); r(1-ld(1)) +
32961 b(ld(1))".
32962
32963 axisfile
32964 Specify image file to draw the axis. This option override fontfile
32965 and fontcolor option.
32966
32967 axis, text
32968 Enable/disable drawing text to the axis. If it is set to 0, drawing
32969 to the axis is disabled, ignoring fontfile and axisfile option.
32970 Default value is 1.
32971
32972 csp Set colorspace. The accepted values are:
32973
32974 unspecified
32975 Unspecified (default)
32976
32977 bt709
32978 BT.709
32979
32980 fcc FCC
32981
32982 bt470bg
32983 BT.470BG or BT.601-6 625
32984
32985 smpte170m
32986 SMPTE-170M or BT.601-6 525
32987
32988 smpte240m
32989 SMPTE-240M
32990
32991 bt2020ncl
32992 BT.2020 with non-constant luminance
32993
32994 cscheme
32995 Set spectrogram color scheme. This is list of floating point values
32996 with format "left_r|left_g|left_b|right_r|right_g|right_b". The
32997 default is "1|0.5|0|0|0.5|1".
32998
32999 Examples
33000
33001 • Playing audio while showing the spectrum:
33002
33003 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
33004
33005 • Same as above, but with frame rate 30 fps:
33006
33007 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
33008
33009 • Playing at 1280x720:
33010
33011 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
33012
33013 • Disable sonogram display:
33014
33015 sono_h=0
33016
33017 • A1 and its harmonics: A1, A2, (near)E3, A3:
33018
33019 ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
33020 asplit[a][out1]; [a] showcqt [out0]'
33021
33022 • Same as above, but with more accuracy in frequency domain:
33023
33024 ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
33025 asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
33026
33027 • Custom volume:
33028
33029 bar_v=10:sono_v=bar_v*a_weighting(f)
33030
33031 • Custom gamma, now spectrum is linear to the amplitude.
33032
33033 bar_g=2:sono_g=2
33034
33035 • Custom tlength equation:
33036
33037 tc=0.33:tlength='st(0,0.17); 384*tc / (384 / ld(0) + tc*f /(1-ld(0))) + 384*tc / (tc*f / ld(0) + 384 /(1-ld(0)))'
33038
33039 • Custom fontcolor and fontfile, C-note is colored green, others are
33040 colored blue:
33041
33042 fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
33043
33044 • Custom font using fontconfig:
33045
33046 font='Courier New,Monospace,mono|bold'
33047
33048 • Custom frequency range with custom axis using image file:
33049
33050 axisfile=myaxis.png:basefreq=40:endfreq=10000
33051
33052 showfreqs
33053 Convert input audio to video output representing the audio power
33054 spectrum. Audio amplitude is on Y-axis while frequency is on X-axis.
33055
33056 The filter accepts the following options:
33057
33058 size, s
33059 Specify size of video. For the syntax of this option, check the
33060 "Video size" section in the ffmpeg-utils manual. Default is
33061 "1024x512".
33062
33063 mode
33064 Set display mode. This set how each frequency bin will be
33065 represented.
33066
33067 It accepts the following values:
33068
33069 line
33070 bar
33071 dot
33072
33073 Default is "bar".
33074
33075 ascale
33076 Set amplitude scale.
33077
33078 It accepts the following values:
33079
33080 lin Linear scale.
33081
33082 sqrt
33083 Square root scale.
33084
33085 cbrt
33086 Cubic root scale.
33087
33088 log Logarithmic scale.
33089
33090 Default is "log".
33091
33092 fscale
33093 Set frequency scale.
33094
33095 It accepts the following values:
33096
33097 lin Linear scale.
33098
33099 log Logarithmic scale.
33100
33101 rlog
33102 Reverse logarithmic scale.
33103
33104 Default is "lin".
33105
33106 win_size
33107 Set window size. Allowed range is from 16 to 65536.
33108
33109 Default is 2048
33110
33111 win_func
33112 Set windowing function.
33113
33114 It accepts the following values:
33115
33116 rect
33117 bartlett
33118 hanning
33119 hamming
33120 blackman
33121 welch
33122 flattop
33123 bharris
33124 bnuttall
33125 bhann
33126 sine
33127 nuttall
33128 lanczos
33129 gauss
33130 tukey
33131 dolph
33132 cauchy
33133 parzen
33134 poisson
33135 bohman
33136
33137 Default is "hanning".
33138
33139 overlap
33140 Set window overlap. In range "[0, 1]". Default is 1, which means
33141 optimal overlap for selected window function will be picked.
33142
33143 averaging
33144 Set time averaging. Setting this to 0 will display current maximal
33145 peaks. Default is 1, which means time averaging is disabled.
33146
33147 colors
33148 Specify list of colors separated by space or by '|' which will be
33149 used to draw channel frequencies. Unrecognized or missing colors
33150 will be replaced by white color.
33151
33152 cmode
33153 Set channel display mode.
33154
33155 It accepts the following values:
33156
33157 combined
33158 separate
33159
33160 Default is "combined".
33161
33162 minamp
33163 Set minimum amplitude used in "log" amplitude scaler.
33164
33165 data
33166 Set data display mode.
33167
33168 It accepts the following values:
33169
33170 magnitude
33171 phase
33172 delay
33173
33174 Default is "magnitude".
33175
33176 showspatial
33177 Convert stereo input audio to a video output, representing the spatial
33178 relationship between two channels.
33179
33180 The filter accepts the following options:
33181
33182 size, s
33183 Specify the video size for the output. For the syntax of this
33184 option, check the "Video size" section in the ffmpeg-utils manual.
33185 Default value is "512x512".
33186
33187 win_size
33188 Set window size. Allowed range is from 1024 to 65536. Default size
33189 is 4096.
33190
33191 win_func
33192 Set window function.
33193
33194 It accepts the following values:
33195
33196 rect
33197 bartlett
33198 hann
33199 hanning
33200 hamming
33201 blackman
33202 welch
33203 flattop
33204 bharris
33205 bnuttall
33206 bhann
33207 sine
33208 nuttall
33209 lanczos
33210 gauss
33211 tukey
33212 dolph
33213 cauchy
33214 parzen
33215 poisson
33216 bohman
33217
33218 Default value is "hann".
33219
33220 overlap
33221 Set ratio of overlap window. Default value is 0.5. When value is 1
33222 overlap is set to recommended size for specific window function
33223 currently used.
33224
33225 showspectrum
33226 Convert input audio to a video output, representing the audio frequency
33227 spectrum.
33228
33229 The filter accepts the following options:
33230
33231 size, s
33232 Specify the video size for the output. For the syntax of this
33233 option, check the "Video size" section in the ffmpeg-utils manual.
33234 Default value is "640x512".
33235
33236 slide
33237 Specify how the spectrum should slide along the window.
33238
33239 It accepts the following values:
33240
33241 replace
33242 the samples start again on the left when they reach the right
33243
33244 scroll
33245 the samples scroll from right to left
33246
33247 fullframe
33248 frames are only produced when the samples reach the right
33249
33250 rscroll
33251 the samples scroll from left to right
33252
33253 lreplace
33254 the samples start again on the right when they reach the left
33255
33256 Default value is "replace".
33257
33258 mode
33259 Specify display mode.
33260
33261 It accepts the following values:
33262
33263 combined
33264 all channels are displayed in the same row
33265
33266 separate
33267 all channels are displayed in separate rows
33268
33269 Default value is combined.
33270
33271 color
33272 Specify display color mode.
33273
33274 It accepts the following values:
33275
33276 channel
33277 each channel is displayed in a separate color
33278
33279 intensity
33280 each channel is displayed using the same color scheme
33281
33282 rainbow
33283 each channel is displayed using the rainbow color scheme
33284
33285 moreland
33286 each channel is displayed using the moreland color scheme
33287
33288 nebulae
33289 each channel is displayed using the nebulae color scheme
33290
33291 fire
33292 each channel is displayed using the fire color scheme
33293
33294 fiery
33295 each channel is displayed using the fiery color scheme
33296
33297 fruit
33298 each channel is displayed using the fruit color scheme
33299
33300 cool
33301 each channel is displayed using the cool color scheme
33302
33303 magma
33304 each channel is displayed using the magma color scheme
33305
33306 green
33307 each channel is displayed using the green color scheme
33308
33309 viridis
33310 each channel is displayed using the viridis color scheme
33311
33312 plasma
33313 each channel is displayed using the plasma color scheme
33314
33315 cividis
33316 each channel is displayed using the cividis color scheme
33317
33318 terrain
33319 each channel is displayed using the terrain color scheme
33320
33321 Default value is channel.
33322
33323 scale
33324 Specify scale used for calculating intensity color values.
33325
33326 It accepts the following values:
33327
33328 lin linear
33329
33330 sqrt
33331 square root, default
33332
33333 cbrt
33334 cubic root
33335
33336 log logarithmic
33337
33338 4thrt
33339 4th root
33340
33341 5thrt
33342 5th root
33343
33344 Default value is sqrt.
33345
33346 fscale
33347 Specify frequency scale.
33348
33349 It accepts the following values:
33350
33351 lin linear
33352
33353 log logarithmic
33354
33355 Default value is lin.
33356
33357 saturation
33358 Set saturation modifier for displayed colors. Negative values
33359 provide alternative color scheme. 0 is no saturation at all.
33360 Saturation must be in [-10.0, 10.0] range. Default value is 1.
33361
33362 win_func
33363 Set window function.
33364
33365 It accepts the following values:
33366
33367 rect
33368 bartlett
33369 hann
33370 hanning
33371 hamming
33372 blackman
33373 welch
33374 flattop
33375 bharris
33376 bnuttall
33377 bhann
33378 sine
33379 nuttall
33380 lanczos
33381 gauss
33382 tukey
33383 dolph
33384 cauchy
33385 parzen
33386 poisson
33387 bohman
33388
33389 Default value is "hann".
33390
33391 orientation
33392 Set orientation of time vs frequency axis. Can be "vertical" or
33393 "horizontal". Default is "vertical".
33394
33395 overlap
33396 Set ratio of overlap window. Default value is 0. When value is 1
33397 overlap is set to recommended size for specific window function
33398 currently used.
33399
33400 gain
33401 Set scale gain for calculating intensity color values. Default
33402 value is 1.
33403
33404 data
33405 Set which data to display. Can be "magnitude", default or "phase",
33406 or unwrapped phase: "uphase".
33407
33408 rotation
33409 Set color rotation, must be in [-1.0, 1.0] range. Default value is
33410 0.
33411
33412 start
33413 Set start frequency from which to display spectrogram. Default is
33414 0.
33415
33416 stop
33417 Set stop frequency to which to display spectrogram. Default is 0.
33418
33419 fps Set upper frame rate limit. Default is "auto", unlimited.
33420
33421 legend
33422 Draw time and frequency axes and legends. Default is disabled.
33423
33424 drange
33425 Set dynamic range used to calculate intensity color values. Default
33426 is 120 dBFS. Allowed range is from 10 to 200.
33427
33428 limit
33429 Set upper limit of input audio samples volume in dBFS. Default is 0
33430 dBFS. Allowed range is from -100 to 100.
33431
33432 The usage is very similar to the showwaves filter; see the examples in
33433 that section.
33434
33435 Examples
33436
33437 • Large window with logarithmic color scaling:
33438
33439 showspectrum=s=1280x480:scale=log
33440
33441 • Complete example for a colored and sliding spectrum per channel
33442 using ffplay:
33443
33444 ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
33445 [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
33446
33447 showspectrumpic
33448 Convert input audio to a single video frame, representing the audio
33449 frequency spectrum.
33450
33451 The filter accepts the following options:
33452
33453 size, s
33454 Specify the video size for the output. For the syntax of this
33455 option, check the "Video size" section in the ffmpeg-utils manual.
33456 Default value is "4096x2048".
33457
33458 mode
33459 Specify display mode.
33460
33461 It accepts the following values:
33462
33463 combined
33464 all channels are displayed in the same row
33465
33466 separate
33467 all channels are displayed in separate rows
33468
33469 Default value is combined.
33470
33471 color
33472 Specify display color mode.
33473
33474 It accepts the following values:
33475
33476 channel
33477 each channel is displayed in a separate color
33478
33479 intensity
33480 each channel is displayed using the same color scheme
33481
33482 rainbow
33483 each channel is displayed using the rainbow color scheme
33484
33485 moreland
33486 each channel is displayed using the moreland color scheme
33487
33488 nebulae
33489 each channel is displayed using the nebulae color scheme
33490
33491 fire
33492 each channel is displayed using the fire color scheme
33493
33494 fiery
33495 each channel is displayed using the fiery color scheme
33496
33497 fruit
33498 each channel is displayed using the fruit color scheme
33499
33500 cool
33501 each channel is displayed using the cool color scheme
33502
33503 magma
33504 each channel is displayed using the magma color scheme
33505
33506 green
33507 each channel is displayed using the green color scheme
33508
33509 viridis
33510 each channel is displayed using the viridis color scheme
33511
33512 plasma
33513 each channel is displayed using the plasma color scheme
33514
33515 cividis
33516 each channel is displayed using the cividis color scheme
33517
33518 terrain
33519 each channel is displayed using the terrain color scheme
33520
33521 Default value is intensity.
33522
33523 scale
33524 Specify scale used for calculating intensity color values.
33525
33526 It accepts the following values:
33527
33528 lin linear
33529
33530 sqrt
33531 square root, default
33532
33533 cbrt
33534 cubic root
33535
33536 log logarithmic
33537
33538 4thrt
33539 4th root
33540
33541 5thrt
33542 5th root
33543
33544 Default value is log.
33545
33546 fscale
33547 Specify frequency scale.
33548
33549 It accepts the following values:
33550
33551 lin linear
33552
33553 log logarithmic
33554
33555 Default value is lin.
33556
33557 saturation
33558 Set saturation modifier for displayed colors. Negative values
33559 provide alternative color scheme. 0 is no saturation at all.
33560 Saturation must be in [-10.0, 10.0] range. Default value is 1.
33561
33562 win_func
33563 Set window function.
33564
33565 It accepts the following values:
33566
33567 rect
33568 bartlett
33569 hann
33570 hanning
33571 hamming
33572 blackman
33573 welch
33574 flattop
33575 bharris
33576 bnuttall
33577 bhann
33578 sine
33579 nuttall
33580 lanczos
33581 gauss
33582 tukey
33583 dolph
33584 cauchy
33585 parzen
33586 poisson
33587 bohman
33588
33589 Default value is "hann".
33590
33591 orientation
33592 Set orientation of time vs frequency axis. Can be "vertical" or
33593 "horizontal". Default is "vertical".
33594
33595 gain
33596 Set scale gain for calculating intensity color values. Default
33597 value is 1.
33598
33599 legend
33600 Draw time and frequency axes and legends. Default is enabled.
33601
33602 rotation
33603 Set color rotation, must be in [-1.0, 1.0] range. Default value is
33604 0.
33605
33606 start
33607 Set start frequency from which to display spectrogram. Default is
33608 0.
33609
33610 stop
33611 Set stop frequency to which to display spectrogram. Default is 0.
33612
33613 drange
33614 Set dynamic range used to calculate intensity color values. Default
33615 is 120 dBFS. Allowed range is from 10 to 200.
33616
33617 limit
33618 Set upper limit of input audio samples volume in dBFS. Default is 0
33619 dBFS. Allowed range is from -100 to 100.
33620
33621 Examples
33622
33623 • Extract an audio spectrogram of a whole audio track in a 1024x1024
33624 picture using ffmpeg:
33625
33626 ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
33627
33628 showvolume
33629 Convert input audio volume to a video output.
33630
33631 The filter accepts the following options:
33632
33633 rate, r
33634 Set video rate.
33635
33636 b Set border width, allowed range is [0, 5]. Default is 1.
33637
33638 w Set channel width, allowed range is [80, 8192]. Default is 400.
33639
33640 h Set channel height, allowed range is [1, 900]. Default is 20.
33641
33642 f Set fade, allowed range is [0, 1]. Default is 0.95.
33643
33644 c Set volume color expression.
33645
33646 The expression can use the following variables:
33647
33648 VOLUME
33649 Current max volume of channel in dB.
33650
33651 PEAK
33652 Current peak.
33653
33654 CHANNEL
33655 Current channel number, starting from 0.
33656
33657 t If set, displays channel names. Default is enabled.
33658
33659 v If set, displays volume values. Default is enabled.
33660
33661 o Set orientation, can be horizontal: "h" or vertical: "v", default
33662 is "h".
33663
33664 s Set step size, allowed range is [0, 5]. Default is 0, which means
33665 step is disabled.
33666
33667 p Set background opacity, allowed range is [0, 1]. Default is 0.
33668
33669 m Set metering mode, can be peak: "p" or rms: "r", default is "p".
33670
33671 ds Set display scale, can be linear: "lin" or log: "log", default is
33672 "lin".
33673
33674 dm In second. If set to > 0., display a line for the max level in the
33675 previous seconds. default is disabled: 0.
33676
33677 dmc The color of the max line. Use when "dm" option is set to > 0.
33678 default is: "orange"
33679
33680 showwaves
33681 Convert input audio to a video output, representing the samples waves.
33682
33683 The filter accepts the following options:
33684
33685 size, s
33686 Specify the video size for the output. For the syntax of this
33687 option, check the "Video size" section in the ffmpeg-utils manual.
33688 Default value is "600x240".
33689
33690 mode
33691 Set display mode.
33692
33693 Available values are:
33694
33695 point
33696 Draw a point for each sample.
33697
33698 line
33699 Draw a vertical line for each sample.
33700
33701 p2p Draw a point for each sample and a line between them.
33702
33703 cline
33704 Draw a centered vertical line for each sample.
33705
33706 Default value is "point".
33707
33708 n Set the number of samples which are printed on the same column. A
33709 larger value will decrease the frame rate. Must be a positive
33710 integer. This option can be set only if the value for rate is not
33711 explicitly specified.
33712
33713 rate, r
33714 Set the (approximate) output frame rate. This is done by setting
33715 the option n. Default value is "25".
33716
33717 split_channels
33718 Set if channels should be drawn separately or overlap. Default
33719 value is 0.
33720
33721 colors
33722 Set colors separated by '|' which are going to be used for drawing
33723 of each channel.
33724
33725 scale
33726 Set amplitude scale.
33727
33728 Available values are:
33729
33730 lin Linear.
33731
33732 log Logarithmic.
33733
33734 sqrt
33735 Square root.
33736
33737 cbrt
33738 Cubic root.
33739
33740 Default is linear.
33741
33742 draw
33743 Set the draw mode. This is mostly useful to set for high n.
33744
33745 Available values are:
33746
33747 scale
33748 Scale pixel values for each drawn sample.
33749
33750 full
33751 Draw every sample directly.
33752
33753 Default value is "scale".
33754
33755 Examples
33756
33757 • Output the input file audio and the corresponding video
33758 representation at the same time:
33759
33760 amovie=a.mp3,asplit[out0],showwaves[out1]
33761
33762 • Create a synthetic signal and show it with showwaves, forcing a
33763 frame rate of 30 frames per second:
33764
33765 aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
33766
33767 showwavespic
33768 Convert input audio to a single video frame, representing the samples
33769 waves.
33770
33771 The filter accepts the following options:
33772
33773 size, s
33774 Specify the video size for the output. For the syntax of this
33775 option, check the "Video size" section in the ffmpeg-utils manual.
33776 Default value is "600x240".
33777
33778 split_channels
33779 Set if channels should be drawn separately or overlap. Default
33780 value is 0.
33781
33782 colors
33783 Set colors separated by '|' which are going to be used for drawing
33784 of each channel.
33785
33786 scale
33787 Set amplitude scale.
33788
33789 Available values are:
33790
33791 lin Linear.
33792
33793 log Logarithmic.
33794
33795 sqrt
33796 Square root.
33797
33798 cbrt
33799 Cubic root.
33800
33801 Default is linear.
33802
33803 draw
33804 Set the draw mode.
33805
33806 Available values are:
33807
33808 scale
33809 Scale pixel values for each drawn sample.
33810
33811 full
33812 Draw every sample directly.
33813
33814 Default value is "scale".
33815
33816 filter
33817 Set the filter mode.
33818
33819 Available values are:
33820
33821 average
33822 Use average samples values for each drawn sample.
33823
33824 peak
33825 Use peak samples values for each drawn sample.
33826
33827 Default value is "average".
33828
33829 Examples
33830
33831 • Extract a channel split representation of the wave form of a whole
33832 audio track in a 1024x800 picture using ffmpeg:
33833
33834 ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
33835
33836 sidedata, asidedata
33837 Delete frame side data, or select frames based on it.
33838
33839 This filter accepts the following options:
33840
33841 mode
33842 Set mode of operation of the filter.
33843
33844 Can be one of the following:
33845
33846 select
33847 Select every frame with side data of "type".
33848
33849 delete
33850 Delete side data of "type". If "type" is not set, delete all
33851 side data in the frame.
33852
33853 type
33854 Set side data type used with all modes. Must be set for "select"
33855 mode. For the list of frame side data types, refer to the
33856 "AVFrameSideDataType" enum in libavutil/frame.h. For example, to
33857 choose "AV_FRAME_DATA_PANSCAN" side data, you must specify
33858 "PANSCAN".
33859
33860 spectrumsynth
33861 Synthesize audio from 2 input video spectrums, first input stream
33862 represents magnitude across time and second represents phase across
33863 time. The filter will transform from frequency domain as displayed in
33864 videos back to time domain as presented in audio output.
33865
33866 This filter is primarily created for reversing processed showspectrum
33867 filter outputs, but can synthesize sound from other spectrograms too.
33868 But in such case results are going to be poor if the phase data is not
33869 available, because in such cases phase data need to be recreated,
33870 usually it's just recreated from random noise. For best results use
33871 gray only output ("channel" color mode in showspectrum filter) and
33872 "log" scale for magnitude video and "lin" scale for phase video. To
33873 produce phase, for 2nd video, use "data" option. Inputs videos should
33874 generally use "fullframe" slide mode as that saves resources needed for
33875 decoding video.
33876
33877 The filter accepts the following options:
33878
33879 sample_rate
33880 Specify sample rate of output audio, the sample rate of audio from
33881 which spectrum was generated may differ.
33882
33883 channels
33884 Set number of channels represented in input video spectrums.
33885
33886 scale
33887 Set scale which was used when generating magnitude input spectrum.
33888 Can be "lin" or "log". Default is "log".
33889
33890 slide
33891 Set slide which was used when generating inputs spectrums. Can be
33892 "replace", "scroll", "fullframe" or "rscroll". Default is
33893 "fullframe".
33894
33895 win_func
33896 Set window function used for resynthesis.
33897
33898 overlap
33899 Set window overlap. In range "[0, 1]". Default is 1, which means
33900 optimal overlap for selected window function will be picked.
33901
33902 orientation
33903 Set orientation of input videos. Can be "vertical" or "horizontal".
33904 Default is "vertical".
33905
33906 Examples
33907
33908 • First create magnitude and phase videos from audio, assuming audio
33909 is stereo with 44100 sample rate, then resynthesize videos back to
33910 audio with spectrumsynth:
33911
33912 ffmpeg -i input.flac -lavfi showspectrum=mode=separate:scale=log:overlap=0.875:color=channel:slide=fullframe:data=magnitude -an -c:v rawvideo magnitude.nut
33913 ffmpeg -i input.flac -lavfi showspectrum=mode=separate:scale=lin:overlap=0.875:color=channel:slide=fullframe:data=phase -an -c:v rawvideo phase.nut
33914 ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
33915
33916 split, asplit
33917 Split input into several identical outputs.
33918
33919 "asplit" works with audio input, "split" with video.
33920
33921 The filter accepts a single parameter which specifies the number of
33922 outputs. If unspecified, it defaults to 2.
33923
33924 Examples
33925
33926 • Create two separate outputs from the same input:
33927
33928 [in] split [out0][out1]
33929
33930 • To create 3 or more outputs, you need to specify the number of
33931 outputs, like in:
33932
33933 [in] asplit=3 [out0][out1][out2]
33934
33935 • Create two separate outputs from the same input, one cropped and
33936 one padded:
33937
33938 [in] split [splitout1][splitout2];
33939 [splitout1] crop=100:100:0:0 [cropout];
33940 [splitout2] pad=200:200:100:100 [padout];
33941
33942 • Create 5 copies of the input audio with ffmpeg:
33943
33944 ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
33945
33946 zmq, azmq
33947 Receive commands sent through a libzmq client, and forward them to
33948 filters in the filtergraph.
33949
33950 "zmq" and "azmq" work as a pass-through filters. "zmq" must be inserted
33951 between two video filters, "azmq" between two audio filters. Both are
33952 capable to send messages to any filter type.
33953
33954 To enable these filters you need to install the libzmq library and
33955 headers and configure FFmpeg with "--enable-libzmq".
33956
33957 For more information about libzmq see: <http://www.zeromq.org/>
33958
33959 The "zmq" and "azmq" filters work as a libzmq server, which receives
33960 messages sent through a network interface defined by the bind_address
33961 (or the abbreviation "b") option. Default value of this option is
33962 tcp://localhost:5555. You may want to alter this value to your needs,
33963 but do not forget to escape any ':' signs (see filtergraph escaping).
33964
33965 The received message must be in the form:
33966
33967 <TARGET> <COMMAND> [<ARG>]
33968
33969 TARGET specifies the target of the command, usually the name of the
33970 filter class or a specific filter instance name. The default filter
33971 instance name uses the pattern Parsed_<filter_name>_<index>, but you
33972 can override this by using the filter_name@id syntax (see Filtergraph
33973 syntax).
33974
33975 COMMAND specifies the name of the command for the target filter.
33976
33977 ARG is optional and specifies the optional argument list for the given
33978 COMMAND.
33979
33980 Upon reception, the message is processed and the corresponding command
33981 is injected into the filtergraph. Depending on the result, the filter
33982 will send a reply to the client, adopting the format:
33983
33984 <ERROR_CODE> <ERROR_REASON>
33985 <MESSAGE>
33986
33987 MESSAGE is optional.
33988
33989 Examples
33990
33991 Look at tools/zmqsend for an example of a zmq client which can be used
33992 to send commands processed by these filters.
33993
33994 Consider the following filtergraph generated by ffplay. In this
33995 example the last overlay filter has an instance name. All other filters
33996 will have default instance names.
33997
33998 ffplay -dumpgraph 1 -f lavfi "
33999 color=s=100x100:c=red [l];
34000 color=s=100x100:c=blue [r];
34001 nullsrc=s=200x100, zmq [bg];
34002 [bg][l] overlay [bg+l];
34003 [bg+l][r] overlay@my=x=100 "
34004
34005 To change the color of the left side of the video, the following
34006 command can be used:
34007
34008 echo Parsed_color_0 c yellow | tools/zmqsend
34009
34010 To change the right side:
34011
34012 echo Parsed_color_1 c pink | tools/zmqsend
34013
34014 To change the position of the right side:
34015
34016 echo overlay@my x 150 | tools/zmqsend
34017
34019 Below is a description of the currently available multimedia sources.
34020
34021 amovie
34022 This is the same as movie source, except it selects an audio stream by
34023 default.
34024
34025 movie
34026 Read audio and/or video stream(s) from a movie container.
34027
34028 It accepts the following parameters:
34029
34030 filename
34031 The name of the resource to read (not necessarily a file; it can
34032 also be a device or a stream accessed through some protocol).
34033
34034 format_name, f
34035 Specifies the format assumed for the movie to read, and can be
34036 either the name of a container or an input device. If not
34037 specified, the format is guessed from movie_name or by probing.
34038
34039 seek_point, sp
34040 Specifies the seek point in seconds. The frames will be output
34041 starting from this seek point. The parameter is evaluated with
34042 "av_strtod", so the numerical value may be suffixed by an IS
34043 postfix. The default value is "0".
34044
34045 streams, s
34046 Specifies the streams to read. Several streams can be specified,
34047 separated by "+". The source will then have as many outputs, in the
34048 same order. The syntax is explained in the "Stream specifiers"
34049 section in the ffmpeg manual. Two special names, "dv" and "da"
34050 specify respectively the default (best suited) video and audio
34051 stream. Default is "dv", or "da" if the filter is called as
34052 "amovie".
34053
34054 stream_index, si
34055 Specifies the index of the video stream to read. If the value is
34056 -1, the most suitable video stream will be automatically selected.
34057 The default value is "-1". Deprecated. If the filter is called
34058 "amovie", it will select audio instead of video.
34059
34060 loop
34061 Specifies how many times to read the stream in sequence. If the
34062 value is 0, the stream will be looped infinitely. Default value is
34063 "1".
34064
34065 Note that when the movie is looped the source timestamps are not
34066 changed, so it will generate non monotonically increasing
34067 timestamps.
34068
34069 discontinuity
34070 Specifies the time difference between frames above which the point
34071 is considered a timestamp discontinuity which is removed by
34072 adjusting the later timestamps.
34073
34074 dec_threads
34075 Specifies the number of threads for decoding
34076
34077 format_opts
34078 Specify format options for the opened file. Format options can be
34079 specified as a list of key=value pairs separated by ':'. The
34080 following example shows how to add protocol_whitelist and
34081 protocol_blacklist options:
34082
34083 ffplay -f lavfi
34084 "movie=filename='1.sdp':format_opts='protocol_whitelist=file,rtp,udp\:protocol_blacklist=http'"
34085
34086 It allows overlaying a second video on top of the main input of a
34087 filtergraph, as shown in this graph:
34088
34089 input -----------> deltapts0 --> overlay --> output
34090 ^
34091 |
34092 movie --> scale--> deltapts1 -------+
34093
34094 Examples
34095
34096 • Skip 3.2 seconds from the start of the AVI file in.avi, and overlay
34097 it on top of the input labelled "in":
34098
34099 movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
34100 [in] setpts=PTS-STARTPTS [main];
34101 [main][over] overlay=16:16 [out]
34102
34103 • Read from a video4linux2 device, and overlay it on top of the input
34104 labelled "in":
34105
34106 movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
34107 [in] setpts=PTS-STARTPTS [main];
34108 [main][over] overlay=16:16 [out]
34109
34110 • Read the first video stream and the audio stream with id 0x81 from
34111 dvd.vob; the video is connected to the pad named "video" and the
34112 audio is connected to the pad named "audio":
34113
34114 movie=dvd.vob:s=v:0+#0x81 [video] [audio]
34115
34116 Commands
34117
34118 Both movie and amovie support the following commands:
34119
34120 seek
34121 Perform seek using "av_seek_frame". The syntax is: seek
34122 stream_index|timestamp|flags
34123
34124 • stream_index: If stream_index is -1, a default stream is
34125 selected, and timestamp is automatically converted from
34126 AV_TIME_BASE units to the stream specific time_base.
34127
34128 • timestamp: Timestamp in AVStream.time_base units or, if no
34129 stream is specified, in AV_TIME_BASE units.
34130
34131 • flags: Flags which select direction and seeking mode.
34132
34133 get_duration
34134 Get movie duration in AV_TIME_BASE units.
34135
34137 FFmpeg can be hooked up with a number of external libraries to add
34138 support for more formats. None of them are used by default, their use
34139 has to be explicitly requested by passing the appropriate flags to
34140 ./configure.
34141
34142 Alliance for Open Media (AOM)
34143 FFmpeg can make use of the AOM library for AV1 decoding and encoding.
34144
34145 Go to <http://aomedia.org/> and follow the instructions for installing
34146 the library. Then pass "--enable-libaom" to configure to enable it.
34147
34148 AMD AMF/VCE
34149 FFmpeg can use the AMD Advanced Media Framework library for accelerated
34150 H.264 and HEVC(only windows) encoding on hardware with Video Coding
34151 Engine (VCE).
34152
34153 To enable support you must obtain the AMF framework header
34154 files(version 1.4.9+) from
34155 <https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git>.
34156
34157 Create an "AMF/" directory in the system include path. Copy the
34158 contents of "AMF/amf/public/include/" into that directory. Then
34159 configure FFmpeg with "--enable-amf".
34160
34161 Initialization of amf encoder occurs in this order: 1) trying to
34162 initialize through dx11(only windows) 2) trying to initialize through
34163 dx9(only windows) 3) trying to initialize through vulkan
34164
34165 To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and
34166 amf-amdgpu-pro package(amdgru-pro contains, but does not install
34167 automatically) are required.
34168
34169 This driver can be installed using amdgpu-pro-install script in
34170 official amd driver archive.
34171
34172 AviSynth
34173 FFmpeg can read AviSynth scripts as input. To enable support, pass
34174 "--enable-avisynth" to configure after installing the headers provided
34175 by <https://github.com/AviSynth/AviSynthPlus>. AviSynth+ can be
34176 configured to install only the headers by either passing
34177 "-DHEADERS_ONLY:bool=on" to the normal CMake-based build system, or by
34178 using the supplied "GNUmakefile".
34179
34180 For Windows, supported AviSynth variants are <http://avisynth.nl> for
34181 32-bit builds and <http://avisynth.nl/index.php/AviSynth+> for 32-bit
34182 and 64-bit builds.
34183
34184 For Linux, macOS, and BSD, the only supported AviSynth variant is
34185 <https://github.com/AviSynth/AviSynthPlus>, starting with version 3.5.
34186
34187 In 2016, AviSynth+ added support for building with GCC. However,
34188 due to the eccentricities of Windows' calling conventions, 32-bit
34189 GCC builds of AviSynth+ are not compatible with typical 32-bit
34190 builds of FFmpeg.
34191
34192 By default, FFmpeg assumes compatibility with 32-bit MSVC builds of
34193 AviSynth+ since that is the most widely-used and entrenched build
34194 configuration. Users can override this and enable support for
34195 32-bit GCC builds of AviSynth+ by passing "-DAVSC_WIN32_GCC32" to
34196 "--extra-cflags" when configuring FFmpeg.
34197
34198 64-bit builds of FFmpeg are not affected, and can use either MSVC
34199 or GCC builds of AviSynth+ without any special flags.
34200
34201 AviSynth(+) is loaded dynamically. Distributors can build FFmpeg
34202 with "--enable-avisynth", and the binaries will work regardless of
34203 the end user having AviSynth installed. If/when an end user would
34204 like to use AviSynth scripts, then they can install AviSynth(+) and
34205 FFmpeg will be able to find and use it to open scripts.
34206
34207 Chromaprint
34208 FFmpeg can make use of the Chromaprint library for generating audio
34209 fingerprints. Pass "--enable-chromaprint" to configure to enable it.
34210 See <https://acoustid.org/chromaprint>.
34211
34212 codec2
34213 FFmpeg can make use of the codec2 library for codec2 decoding and
34214 encoding. There is currently no native decoder, so libcodec2 must be
34215 used for decoding.
34216
34217 Go to <http://freedv.org/>, download "Codec 2 source archive". Build
34218 and install using CMake. Debian users can install the libcodec2-dev
34219 package instead. Once libcodec2 is installed you can pass
34220 "--enable-libcodec2" to configure to enable it.
34221
34222 The easiest way to use codec2 is with .c2 files, since they contain the
34223 mode information required for decoding. To encode such a file, use a
34224 .c2 file extension and give the libcodec2 encoder the -mode option:
34225 "ffmpeg -i input.wav -mode 700C output.c2". Playback is as simple as
34226 "ffplay output.c2". For a list of supported modes, run "ffmpeg -h
34227 encoder=libcodec2". Raw codec2 files are also supported. To make
34228 sense of them the mode in use needs to be specified as a format option:
34229 "ffmpeg -f codec2raw -mode 1300 -i input.raw output.wav".
34230
34231 dav1d
34232 FFmpeg can make use of the dav1d library for AV1 video decoding.
34233
34234 Go to <https://code.videolan.org/videolan/dav1d> and follow the
34235 instructions for installing the library. Then pass "--enable-libdav1d"
34236 to configure to enable it.
34237
34238 davs2
34239 FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video
34240 decoding.
34241
34242 Go to <https://github.com/pkuvcl/davs2> and follow the instructions for
34243 installing the library. Then pass "--enable-libdavs2" to configure to
34244 enable it.
34245
34246 libdavs2 is under the GNU Public License Version 2 or later (see
34247 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
34248 details), you must upgrade FFmpeg's license to GPL in order to use
34249 it.
34250
34251 uavs3d
34252 FFmpeg can make use of the uavs3d library for AVS3-P2/IEEE1857.10 video
34253 decoding.
34254
34255 Go to <https://github.com/uavs3/uavs3d> and follow the instructions for
34256 installing the library. Then pass "--enable-libuavs3d" to configure to
34257 enable it.
34258
34259 Game Music Emu
34260 FFmpeg can make use of the Game Music Emu library to read audio from
34261 supported video game music file formats. Pass "--enable-libgme" to
34262 configure to enable it. See
34263 <https://bitbucket.org/mpyne/game-music-emu/overview>.
34264
34265 Intel QuickSync Video
34266 FFmpeg can use Intel QuickSync Video (QSV) for accelerated decoding and
34267 encoding of multiple codecs. To use QSV, FFmpeg must be linked against
34268 the "libmfx" dispatcher, which loads the actual decoding libraries.
34269
34270 The dispatcher is open source and can be downloaded from
34271 <https://github.com/lu-zero/mfx_dispatch.git>. FFmpeg needs to be
34272 configured with the "--enable-libmfx" option and "pkg-config" needs to
34273 be able to locate the dispatcher's ".pc" files.
34274
34275 Kvazaar
34276 FFmpeg can make use of the Kvazaar library for HEVC encoding.
34277
34278 Go to <https://github.com/ultravideo/kvazaar> and follow the
34279 instructions for installing the library. Then pass
34280 "--enable-libkvazaar" to configure to enable it.
34281
34282 LAME
34283 FFmpeg can make use of the LAME library for MP3 encoding.
34284
34285 Go to <http://lame.sourceforge.net/> and follow the instructions for
34286 installing the library. Then pass "--enable-libmp3lame" to configure
34287 to enable it.
34288
34289 libilbc
34290 iLBC is a narrowband speech codec that has been made freely available
34291 by Google as part of the WebRTC project. libilbc is a packaging
34292 friendly copy of the iLBC codec. FFmpeg can make use of the libilbc
34293 library for iLBC decoding and encoding.
34294
34295 Go to <https://github.com/TimothyGu/libilbc> and follow the
34296 instructions for installing the library. Then pass "--enable-libilbc"
34297 to configure to enable it.
34298
34299 libvpx
34300 FFmpeg can make use of the libvpx library for VP8/VP9 decoding and
34301 encoding.
34302
34303 Go to <http://www.webmproject.org/> and follow the instructions for
34304 installing the library. Then pass "--enable-libvpx" to configure to
34305 enable it.
34306
34307 ModPlug
34308 FFmpeg can make use of this library, originating in Modplug-XMMS, to
34309 read from MOD-like music files. See
34310 <https://github.com/Konstanty/libmodplug>. Pass "--enable-libmodplug"
34311 to configure to enable it.
34312
34313 OpenCORE, VisualOn, and Fraunhofer libraries
34314 Spun off Google Android sources, OpenCore, VisualOn and Fraunhofer
34315 libraries provide encoders for a number of audio codecs.
34316
34317 OpenCORE and VisualOn libraries are under the Apache License 2.0
34318 (see <http://www.apache.org/licenses/LICENSE-2.0> for details),
34319 which is incompatible to the LGPL version 2.1 and GPL version 2.
34320 You have to upgrade FFmpeg's license to LGPL version 3 (or if you
34321 have enabled GPL components, GPL version 3) by passing
34322 "--enable-version3" to configure in order to use it.
34323
34324 The license of the Fraunhofer AAC library is incompatible with the
34325 GPL. Therefore, for GPL builds, you have to pass
34326 "--enable-nonfree" to configure in order to use it. To the best of
34327 our knowledge, it is compatible with the LGPL.
34328
34329 OpenCORE AMR
34330
34331 FFmpeg can make use of the OpenCORE libraries for AMR-NB
34332 decoding/encoding and AMR-WB decoding.
34333
34334 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
34335 instructions for installing the libraries. Then pass
34336 "--enable-libopencore-amrnb" and/or "--enable-libopencore-amrwb" to
34337 configure to enable them.
34338
34339 VisualOn AMR-WB encoder library
34340
34341 FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB
34342 encoding.
34343
34344 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
34345 instructions for installing the library. Then pass
34346 "--enable-libvo-amrwbenc" to configure to enable it.
34347
34348 Fraunhofer AAC library
34349
34350 FFmpeg can make use of the Fraunhofer AAC library for AAC decoding &
34351 encoding.
34352
34353 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
34354 instructions for installing the library. Then pass
34355 "--enable-libfdk-aac" to configure to enable it.
34356
34357 OpenH264
34358 FFmpeg can make use of the OpenH264 library for H.264 decoding and
34359 encoding.
34360
34361 Go to <http://www.openh264.org/> and follow the instructions for
34362 installing the library. Then pass "--enable-libopenh264" to configure
34363 to enable it.
34364
34365 For decoding, this library is much more limited than the built-in
34366 decoder in libavcodec; currently, this library lacks support for
34367 decoding B-frames and some other main/high profile features. (It
34368 currently only supports constrained baseline profile and CABAC.) Using
34369 it is mostly useful for testing and for taking advantage of Cisco's
34370 patent portfolio license
34371 (<http://www.openh264.org/BINARY_LICENSE.txt>).
34372
34373 OpenJPEG
34374 FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos.
34375 Go to <http://www.openjpeg.org/> to get the libraries and follow the
34376 installation instructions. To enable using OpenJPEG in FFmpeg, pass
34377 "--enable-libopenjpeg" to ./configure.
34378
34379 rav1e
34380 FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to
34381 encode videos. Go to <https://github.com/xiph/rav1e/> and follow the
34382 instructions to build the C library. To enable using rav1e in FFmpeg,
34383 pass "--enable-librav1e" to ./configure.
34384
34385 SVT-AV1
34386 FFmpeg can make use of the Scalable Video Technology for AV1 library
34387 for AV1 encoding.
34388
34389 Go to <https://gitlab.com/AOMediaCodec/SVT-AV1/> and follow the
34390 instructions for installing the library. Then pass "--enable-libsvtav1"
34391 to configure to enable it.
34392
34393 TwoLAME
34394 FFmpeg can make use of the TwoLAME library for MP2 encoding.
34395
34396 Go to <http://www.twolame.org/> and follow the instructions for
34397 installing the library. Then pass "--enable-libtwolame" to configure
34398 to enable it.
34399
34400 VapourSynth
34401 FFmpeg can read VapourSynth scripts as input. To enable support, pass
34402 "--enable-vapoursynth" to configure. Vapoursynth is detected via
34403 "pkg-config". Versions 42 or greater supported. See
34404 <http://www.vapoursynth.com/>.
34405
34406 Due to security concerns, Vapoursynth scripts will not be autodetected
34407 so the input format has to be forced. For ff* CLI tools, add "-f
34408 vapoursynth" before the input "-i yourscript.vpy".
34409
34410 x264
34411 FFmpeg can make use of the x264 library for H.264 encoding.
34412
34413 Go to <http://www.videolan.org/developers/x264.html> and follow the
34414 instructions for installing the library. Then pass "--enable-libx264"
34415 to configure to enable it.
34416
34417 x264 is under the GNU Public License Version 2 or later (see
34418 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
34419 details), you must upgrade FFmpeg's license to GPL in order to use
34420 it.
34421
34422 x265
34423 FFmpeg can make use of the x265 library for HEVC encoding.
34424
34425 Go to <http://x265.org/developers.html> and follow the instructions for
34426 installing the library. Then pass "--enable-libx265" to configure to
34427 enable it.
34428
34429 x265 is under the GNU Public License Version 2 or later (see
34430 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
34431 details), you must upgrade FFmpeg's license to GPL in order to use
34432 it.
34433
34434 xavs
34435 FFmpeg can make use of the xavs library for AVS encoding.
34436
34437 Go to <http://xavs.sf.net/> and follow the instructions for installing
34438 the library. Then pass "--enable-libxavs" to configure to enable it.
34439
34440 xavs2
34441 FFmpeg can make use of the xavs2 library for AVS2-P2/IEEE1857.4 video
34442 encoding.
34443
34444 Go to <https://github.com/pkuvcl/xavs2> and follow the instructions for
34445 installing the library. Then pass "--enable-libxavs2" to configure to
34446 enable it.
34447
34448 libxavs2 is under the GNU Public License Version 2 or later (see
34449 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
34450 details), you must upgrade FFmpeg's license to GPL in order to use
34451 it.
34452
34453 ZVBI
34454 ZVBI is a VBI decoding library which can be used by FFmpeg to decode
34455 DVB teletext pages and DVB teletext subtitles.
34456
34457 Go to <http://sourceforge.net/projects/zapping/> and follow the
34458 instructions for installing the library. Then pass "--enable-libzvbi"
34459 to configure to enable it.
34460
34462 You can use the "-formats" and "-codecs" options to have an exhaustive
34463 list.
34464
34465 File Formats
34466 FFmpeg supports the following file formats through the "libavformat"
34467 library:
34468
34469 Name : Encoding @tab Decoding @tab Comments
34470 3dostr : @tab X
34471 4xm : @tab X
34472 @tab 4X Technologies format, used in some games.
34473
34474 8088flex TMV : @tab X
34475 AAX : @tab X
34476 @tab Audible Enhanced Audio format, used in audiobooks.
34477
34478 AA : @tab X
34479 @tab Audible Format 2, 3, and 4, used in audiobooks.
34480
34481 ACT Voice : @tab X
34482 @tab contains G.729 audio
34483
34484 Adobe Filmstrip : X @tab X
34485 Audio IFF (AIFF) : X @tab X
34486 American Laser Games MM : @tab X
34487 @tab Multimedia format used in games like Mad Dog McCree.
34488
34489 3GPP AMR : X @tab X
34490 Amazing Studio Packed Animation File : @tab X
34491 @tab Multimedia format used in game Heart Of Darkness.
34492
34493 Apple HTTP Live Streaming : @tab X
34494 Artworx Data Format : @tab X
34495 Interplay ACM : @tab X
34496 @tab Audio only format used in some Interplay games.
34497
34498 ADP : @tab X
34499 @tab Audio format used on the Nintendo Gamecube.
34500
34501 AFC : @tab X
34502 @tab Audio format used on the Nintendo Gamecube.
34503
34504 ADS/SS2 : @tab X
34505 @tab Audio format used on the PS2.
34506
34507 APNG : X @tab X
34508 ASF : X @tab X
34509 @tab Advanced / Active Streaming Format.
34510
34511 AST : X @tab X
34512 @tab Audio format used on the Nintendo Wii.
34513
34514 AVI : X @tab X
34515 AviSynth : @tab X
34516 AVR : @tab X
34517 @tab Audio format used on Mac.
34518
34519 AVS : @tab X
34520 @tab Multimedia format used by the Creature Shock game.
34521
34522 Beam Software SIFF : @tab X
34523 @tab Audio and video format used in some games by Beam Software.
34524
34525 Bethesda Softworks VID : @tab X
34526 @tab Used in some games from Bethesda Softworks.
34527
34528 Binary text : @tab X
34529 Bink : @tab X
34530 @tab Multimedia format used by many games.
34531
34532 Bink Audio : @tab X
34533 @tab Audio only multimedia format used by some games.
34534
34535 Bitmap Brothers JV : @tab X
34536 @tab Used in Z and Z95 games.
34537
34538 BRP : @tab X
34539 @tab Argonaut Games format.
34540
34541 Brute Force & Ignorance : @tab X
34542 @tab Used in the game Flash Traffic: City of Angels.
34543
34544 BFSTM : @tab X
34545 @tab Audio format used on the Nintendo WiiU (based on BRSTM).
34546
34547 BRSTM : @tab X
34548 @tab Audio format used on the Nintendo Wii.
34549
34550 BW64 : @tab X
34551 @tab Broadcast Wave 64bit.
34552
34553 BWF : X @tab X
34554 codec2 (raw) : X @tab X
34555 @tab Must be given -mode format option to decode correctly.
34556
34557 codec2 (.c2 files) : X @tab X
34558 @tab Contains header with version and mode info, simplifying playback.
34559
34560 CRI ADX : X @tab X
34561 @tab Audio-only format used in console video games.
34562
34563 CRI AIX : @tab X
34564 CRI HCA : @tab X
34565 @tab Audio-only format used in console video games.
34566
34567 Discworld II BMV : @tab X
34568 Interplay C93 : @tab X
34569 @tab Used in the game Cyberia from Interplay.
34570
34571 Delphine Software International CIN : @tab X
34572 @tab Multimedia format used by Delphine Software games.
34573
34574 Digital Speech Standard (DSS) : @tab X
34575 CD+G : @tab X
34576 @tab Video format used by CD+G karaoke disks
34577
34578 Phantom Cine : @tab X
34579 Commodore CDXL : @tab X
34580 @tab Amiga CD video format
34581
34582 Core Audio Format : X @tab X
34583 @tab Apple Core Audio Format
34584
34585 CRC testing format : X @tab
34586 Creative Voice : X @tab X
34587 @tab Created for the Sound Blaster Pro.
34588
34589 CRYO APC : @tab X
34590 @tab Audio format used in some games by CRYO Interactive Entertainment.
34591
34592 D-Cinema audio : X @tab X
34593 Deluxe Paint Animation : @tab X
34594 DCSTR : @tab X
34595 DFA : @tab X
34596 @tab This format is used in Chronomaster game
34597
34598 DirectDraw Surface : @tab X
34599 DSD Stream File (DSF) : @tab X
34600 DV video : X @tab X
34601 DXA : @tab X
34602 @tab This format is used in the non-Windows version of the Feeble Files
34603 game and different game cutscenes repacked for use with ScummVM.
34604
34605 Electronic Arts cdata : @tab X
34606 Electronic Arts Multimedia : @tab X
34607 @tab Used in various EA games; files have extensions like WVE and UV2.
34608
34609 Ensoniq Paris Audio File : @tab X
34610 FFM (FFserver live feed) : X @tab X
34611 Flash (SWF) : X @tab X
34612 Flash 9 (AVM2) : X @tab X
34613 @tab Only embedded audio is decoded.
34614
34615 FLI/FLC/FLX animation : @tab X
34616 @tab .fli/.flc files
34617
34618 Flash Video (FLV) : X @tab X
34619 @tab Macromedia Flash video files
34620
34621 framecrc testing format : X @tab
34622 FunCom ISS : @tab X
34623 @tab Audio format used in various games from FunCom like The Longest Journey.
34624
34625 G.723.1 : X @tab X
34626 G.726 : @tab X @tab Both left- and right-
34627 justified.
34628 G.729 BIT : X @tab X
34629 G.729 raw : @tab X
34630 GENH : @tab X
34631 @tab Audio format for various games.
34632
34633 GIF Animation : X @tab X
34634 GXF : X @tab X
34635 @tab General eXchange Format SMPTE 360M, used by Thomson Grass Valley
34636 playout servers.
34637
34638 HNM : @tab X
34639 @tab Only version 4 supported, used in some games from Cryo Interactive
34640
34641 iCEDraw File : @tab X
34642 ICO : X @tab X
34643 @tab Microsoft Windows ICO
34644
34645 id Quake II CIN video : @tab X
34646 id RoQ : X @tab X
34647 @tab Used in Quake III, Jedi Knight 2 and other computer games.
34648
34649 IEC61937 encapsulation : X @tab X
34650 IFF : @tab X
34651 @tab Interchange File Format
34652
34653 IFV : @tab X
34654 @tab A format used by some old CCTV DVRs.
34655
34656 iLBC : X @tab X
34657 Interplay MVE : @tab X
34658 @tab Format used in various Interplay computer games.
34659
34660 Iterated Systems ClearVideo : @tab X
34661 @tab I-frames only
34662
34663 IV8 : @tab X
34664 @tab A format generated by IndigoVision 8000 video server.
34665
34666 IVF (On2) : X @tab X
34667 @tab A format used by libvpx
34668
34669 Internet Video Recording : @tab X
34670 IRCAM : X @tab X
34671 LATM : X @tab X
34672 LMLM4 : @tab X
34673 @tab Used by Linux Media Labs MPEG-4 PCI boards
34674
34675 LOAS : @tab X
34676 @tab contains LATM multiplexed AAC audio
34677
34678 LRC : X @tab X
34679 LVF : @tab X
34680 LXF : @tab X
34681 @tab VR native stream format, used by Leitch/Harris' video servers.
34682
34683 Magic Lantern Video (MLV) : @tab X
34684 Matroska : X @tab X
34685 Matroska audio : X @tab
34686 FFmpeg metadata : X @tab X
34687 @tab Metadata in text format.
34688
34689 MAXIS XA : @tab X
34690 @tab Used in Sim City 3000; file extension .xa.
34691
34692 MCA : @tab X
34693 @tab Used in some games from Capcom; file extension .mca.
34694
34695 MD Studio : @tab X
34696 Metal Gear Solid: The Twin Snakes : @tab X
34697 Megalux Frame : @tab X
34698 @tab Used by Megalux Ultimate Paint
34699
34700 Mobotix .mxg : @tab X
34701 Monkey's Audio : @tab X
34702 Motion Pixels MVI : @tab X
34703 MOV/QuickTime/MP4 : X @tab X
34704 @tab 3GP, 3GP2, PSP, iPod variants supported
34705
34706 MP2 : X @tab X
34707 MP3 : X @tab X
34708 MPEG-1 System : X @tab X
34709 @tab muxed audio and video, VCD format supported
34710
34711 MPEG-PS (program stream) : X @tab X
34712 @tab also known as C<VOB> file, SVCD and DVD format supported
34713
34714 MPEG-TS (transport stream) : X @tab X
34715 @tab also known as DVB Transport Stream
34716
34717 MPEG-4 : X @tab X
34718 @tab MPEG-4 is a variant of QuickTime.
34719
34720 MSF : @tab X
34721 @tab Audio format used on the PS3.
34722
34723 Mirillis FIC video : @tab X
34724 @tab No cursor rendering.
34725
34726 MIDI Sample Dump Standard : @tab X
34727 MIME multipart JPEG : X @tab
34728 MSN TCP webcam : @tab X
34729 @tab Used by MSN Messenger webcam streams.
34730
34731 MTV : @tab X
34732 Musepack : @tab X
34733 Musepack SV8 : @tab X
34734 Material eXchange Format (MXF) : X @tab X
34735 @tab SMPTE 377M, used by D-Cinema, broadcast industry.
34736
34737 Material eXchange Format (MXF), D-10 Mapping : X @tab X
34738 @tab SMPTE 386M, D-10/IMX Mapping.
34739
34740 NC camera feed : @tab X
34741 @tab NC (AVIP NC4600) camera streams
34742
34743 NIST SPeech HEader REsources : @tab X
34744 Computerized Speech Lab NSP : @tab X
34745 NTT TwinVQ (VQF) : @tab X
34746 @tab Nippon Telegraph and Telephone Corporation TwinVQ.
34747
34748 Nullsoft Streaming Video : @tab X
34749 NuppelVideo : @tab X
34750 NUT : X @tab X
34751 @tab NUT Open Container Format
34752
34753 Ogg : X @tab X
34754 Playstation Portable PMP : @tab X
34755 Portable Voice Format : @tab X
34756 TechnoTrend PVA : @tab X
34757 @tab Used by TechnoTrend DVB PCI boards.
34758
34759 QCP : @tab X
34760 raw ADTS (AAC) : X @tab X
34761 raw AC-3 : X @tab X
34762 raw AMR-NB : @tab X
34763 raw AMR-WB : @tab X
34764 raw aptX : X @tab X
34765 raw aptX HD : X @tab X
34766 raw Chinese AVS video : X @tab X
34767 raw Dirac : X @tab X
34768 raw DNxHD : X @tab X
34769 raw DTS : X @tab X
34770 raw DTS-HD : @tab X
34771 raw E-AC-3 : X @tab X
34772 raw FLAC : X @tab X
34773 raw GSM : @tab X
34774 raw H.261 : X @tab X
34775 raw H.263 : X @tab X
34776 raw H.264 : X @tab X
34777 raw HEVC : X @tab X
34778 raw Ingenient MJPEG : @tab X
34779 raw MJPEG : X @tab X
34780 raw MLP : @tab X
34781 raw MPEG : @tab X
34782 raw MPEG-1 : @tab X
34783 raw MPEG-2 : @tab X
34784 raw MPEG-4 : X @tab X
34785 raw NULL : X @tab
34786 raw video : X @tab X
34787 raw id RoQ : X @tab
34788 raw OBU : X @tab X
34789 raw SBC : X @tab X
34790 raw Shorten : @tab X
34791 raw TAK : @tab X
34792 raw TrueHD : X @tab X
34793 raw VC-1 : X @tab X
34794 raw PCM A-law : X @tab X
34795 raw PCM mu-law : X @tab X
34796 raw PCM Archimedes VIDC : X @tab X
34797 raw PCM signed 8 bit : X @tab X
34798 raw PCM signed 16 bit big-endian : X @tab X
34799 raw PCM signed 16 bit little-endian : X @tab X
34800 raw PCM signed 24 bit big-endian : X @tab X
34801 raw PCM signed 24 bit little-endian : X @tab X
34802 raw PCM signed 32 bit big-endian : X @tab X
34803 raw PCM signed 32 bit little-endian : X @tab X
34804 raw PCM signed 64 bit big-endian : X @tab X
34805 raw PCM signed 64 bit little-endian : X @tab X
34806 raw PCM unsigned 8 bit : X @tab X
34807 raw PCM unsigned 16 bit big-endian : X @tab X
34808 raw PCM unsigned 16 bit little-endian : X @tab X
34809 raw PCM unsigned 24 bit big-endian : X @tab X
34810 raw PCM unsigned 24 bit little-endian : X @tab X
34811 raw PCM unsigned 32 bit big-endian : X @tab X
34812 raw PCM unsigned 32 bit little-endian : X @tab X
34813 raw PCM 16.8 floating point little-endian : @tab X
34814 raw PCM 24.0 floating point little-endian : @tab X
34815 raw PCM floating-point 32 bit big-endian : X @tab X
34816 raw PCM floating-point 32 bit little-endian : X @tab X
34817 raw PCM floating-point 64 bit big-endian : X @tab X
34818 raw PCM floating-point 64 bit little-endian : X @tab X
34819 RDT : @tab X
34820 REDCODE R3D : @tab X
34821 @tab File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.
34822
34823 RealMedia : X @tab X
34824 Redirector : @tab X
34825 RedSpark : @tab X
34826 Renderware TeXture Dictionary : @tab X
34827 Resolume DXV : @tab X
34828 RF64 : @tab X
34829 RL2 : @tab X
34830 @tab Audio and video format used in some games by Entertainment Software Partners.
34831
34832 RPL/ARMovie : @tab X
34833 Lego Mindstorms RSO : X @tab X
34834 RSD : @tab X
34835 RTMP : X @tab X
34836 @tab Output is performed by publishing stream to RTMP server
34837
34838 RTP : X @tab X
34839 RTSP : X @tab X
34840 Sample Dump eXchange : @tab X
34841 SAP : X @tab X
34842 SBG : @tab X
34843 SDP : @tab X
34844 SER : @tab X
34845 Sega FILM/CPK : X @tab X
34846 @tab Used in many Sega Saturn console games.
34847
34848 Silicon Graphics Movie : @tab X
34849 Sierra SOL : @tab X
34850 @tab .sol files used in Sierra Online games.
34851
34852 Sierra VMD : @tab X
34853 @tab Used in Sierra CD-ROM games.
34854
34855 Smacker : @tab X
34856 @tab Multimedia format used by many games.
34857
34858 SMJPEG : X @tab X
34859 @tab Used in certain Loki game ports.
34860
34861 SMPTE 337M encapsulation : @tab X
34862 Smush : @tab X
34863 @tab Multimedia format used in some LucasArts games.
34864
34865 Sony OpenMG (OMA) : X @tab X
34866 @tab Audio format used in Sony Sonic Stage and Sony Vegas.
34867
34868 Sony PlayStation STR : @tab X
34869 Sony Wave64 (W64) : X @tab X
34870 SoX native format : X @tab X
34871 SUN AU format : X @tab X
34872 SUP raw PGS subtitles : X @tab X
34873 SVAG : @tab X
34874 @tab Audio format used in Konami PS2 games.
34875
34876 TDSC : @tab X
34877 Text files : @tab X
34878 THP : @tab X
34879 @tab Used on the Nintendo GameCube.
34880
34881 Tiertex Limited SEQ : @tab X
34882 @tab Tiertex .seq files used in the DOS CD-ROM version of the game Flashback.
34883
34884 True Audio : X @tab X
34885 VAG : @tab X
34886 @tab Audio format used in many Sony PS2 games.
34887
34888 VC-1 test bitstream : X @tab X
34889 Vidvox Hap : X @tab X
34890 Vivo : @tab X
34891 VPK : @tab X
34892 @tab Audio format used in Sony PS games.
34893
34894 WAV : X @tab X
34895 WavPack : X @tab X
34896 WebM : X @tab X
34897 Windows Televison (WTV) : X @tab X
34898 Wing Commander III movie : @tab X
34899 @tab Multimedia format used in Origin's Wing Commander III computer game.
34900
34901 Westwood Studios audio : X @tab X
34902 @tab Multimedia format used in Westwood Studios games.
34903
34904 Westwood Studios VQA : @tab X
34905 @tab Multimedia format used in Westwood Studios games.
34906
34907 Wideband Single-bit Data (WSD) : @tab X
34908 WVE : @tab X
34909 XMV : @tab X
34910 @tab Microsoft video container used in Xbox games.
34911
34912 XVAG : @tab X
34913 @tab Audio format used on the PS3.
34914
34915 xWMA : @tab X
34916 @tab Microsoft audio container used by XAudio 2.
34917
34918 eXtended BINary text (XBIN) : @tab X
34919 YUV4MPEG pipe : X @tab X
34920 Psygnosis YOP : @tab X
34921
34922 "X" means that the feature in that column (encoding / decoding) is
34923 supported.
34924
34925 Image Formats
34926 FFmpeg can read and write images for each frame of a video sequence.
34927 The following image formats are supported:
34928
34929 Name : Encoding @tab Decoding @tab Comments
34930 .Y.U.V : X @tab X
34931 @tab one raw file per component
34932
34933 Alias PIX : X @tab X
34934 @tab Alias/Wavefront PIX image format
34935
34936 animated GIF : X @tab X
34937 APNG : X @tab X
34938 @tab Animated Portable Network Graphics
34939
34940 BMP : X @tab X
34941 @tab Microsoft BMP image
34942
34943 BRender PIX : @tab X
34944 @tab Argonaut BRender 3D engine image format.
34945
34946 CRI : @tab X
34947 @tab Cintel RAW
34948
34949 DPX : X @tab X
34950 @tab Digital Picture Exchange
34951
34952 EXR : @tab X
34953 @tab OpenEXR
34954
34955 FITS : X @tab X
34956 @tab Flexible Image Transport System
34957
34958 IMG : @tab X
34959 @tab GEM Raster image
34960
34961 JPEG : X @tab X
34962 @tab Progressive JPEG is not supported.
34963
34964 JPEG 2000 : X @tab X
34965 JPEG-LS : X @tab X
34966 LJPEG : X @tab
34967 @tab Lossless JPEG
34968
34969 MSP : @tab X
34970 @tab Microsoft Paint image
34971
34972 PAM : X @tab X
34973 @tab PAM is a PNM extension with alpha support.
34974
34975 PBM : X @tab X
34976 @tab Portable BitMap image
34977
34978 PCD : @tab X
34979 @tab PhotoCD
34980
34981 PCX : X @tab X
34982 @tab PC Paintbrush
34983
34984 PFM : X @tab X
34985 @tab Portable FloatMap image
34986
34987 PGM : X @tab X
34988 @tab Portable GrayMap image
34989
34990 PGMYUV : X @tab X
34991 @tab PGM with U and V components in YUV 4:2:0
34992
34993 PGX : @tab X
34994 @tab PGX file decoder
34995
34996 PIC : @tab X
34997 @tab Pictor/PC Paint
34998
34999 PNG : X @tab X
35000 @tab Portable Network Graphics image
35001
35002 PPM : X @tab X
35003 @tab Portable PixelMap image
35004
35005 PSD : @tab X
35006 @tab Photoshop
35007
35008 PTX : @tab X
35009 @tab V.Flash PTX format
35010
35011 SGI : X @tab X
35012 @tab SGI RGB image format
35013
35014 Sun Rasterfile : X @tab X
35015 @tab Sun RAS image format
35016
35017 TIFF : X @tab X
35018 @tab YUV, JPEG and some extension is not supported yet.
35019
35020 Truevision Targa : X @tab X
35021 @tab Targa (.TGA) image format
35022
35023 WebP : E @tab X
35024 @tab WebP image format, encoding supported through external library libwebp
35025
35026 XBM : X @tab X
35027 @tab X BitMap image format
35028
35029 XFace : X @tab X
35030 @tab X-Face image format
35031
35032 XPM : @tab X
35033 @tab X PixMap image format
35034
35035 XWD : X @tab X
35036 @tab X Window Dump image format
35037
35038 "X" means that the feature in that column (encoding / decoding) is
35039 supported.
35040
35041 "E" means that support is provided through an external library.
35042
35043 Video Codecs
35044 Name : Encoding @tab Decoding @tab Comments
35045 4X Movie : @tab X
35046 @tab Used in certain computer games.
35047
35048 8088flex TMV : @tab X
35049 A64 multicolor : X @tab
35050 @tab Creates video suitable to be played on a commodore 64 (multicolor mode).
35051
35052 Amazing Studio PAF Video : @tab X
35053 American Laser Games MM : @tab X
35054 @tab Used in games like Mad Dog McCree.
35055
35056 Amuse Graphics Movie : @tab X
35057 AMV Video : X @tab X
35058 @tab Used in Chinese MP3 players.
35059
35060 ANSI/ASCII art : @tab X
35061 Apple Intermediate Codec : @tab X
35062 Apple MJPEG-B : @tab X
35063 Apple Pixlet : @tab X
35064 Apple ProRes : X @tab X
35065 @tab fourcc: apch,apcn,apcs,apco,ap4h,ap4x
35066
35067 Apple QuickDraw : @tab X
35068 @tab fourcc: qdrw
35069
35070 Argonaut Video : @tab X
35071 @tab Used in some Argonaut games.
35072
35073 Asus v1 : X @tab X
35074 @tab fourcc: ASV1
35075
35076 Asus v2 : X @tab X
35077 @tab fourcc: ASV2
35078
35079 ATI VCR1 : @tab X
35080 @tab fourcc: VCR1
35081
35082 ATI VCR2 : @tab X
35083 @tab fourcc: VCR2
35084
35085 Auravision Aura : @tab X
35086 Auravision Aura 2 : @tab X
35087 Autodesk Animator Flic video : @tab X
35088 Autodesk RLE : @tab X
35089 @tab fourcc: AASC
35090
35091 AV1 : E @tab E
35092 @tab Supported through external libraries libaom, libdav1d, librav1e and libsvtav1
35093
35094 Avid 1:1 10-bit RGB Packer : X @tab X
35095 @tab fourcc: AVrp
35096
35097 AVS (Audio Video Standard) video : @tab X
35098 @tab Video encoding used by the Creature Shock game.
35099
35100 AVS2-P2/IEEE1857.4 : E @tab E
35101 @tab Supported through external libraries libxavs2 and libdavs2
35102
35103 AVS3-P2/IEEE1857.10 : @tab E
35104 @tab Supported through external library libuavs3d
35105
35106 AYUV : X @tab X
35107 @tab Microsoft uncompressed packed 4:4:4:4
35108
35109 Beam Software VB : @tab X
35110 Bethesda VID video : @tab X
35111 @tab Used in some games from Bethesda Softworks.
35112
35113 Bink Video : @tab X
35114 BitJazz SheerVideo : @tab X
35115 Bitmap Brothers JV video : @tab X
35116 y41p Brooktree uncompressed 4:1:1 12-bit : X @tab X
35117 Brooktree ProSumer Video : @tab X
35118 @tab fourcc: BT20
35119
35120 Brute Force & Ignorance : @tab X
35121 @tab Used in the game Flash Traffic: City of Angels.
35122
35123 C93 video : @tab X
35124 @tab Codec used in Cyberia game.
35125
35126 CamStudio : @tab X
35127 @tab fourcc: CSCD
35128
35129 CD+G : @tab X
35130 @tab Video codec for CD+G karaoke disks
35131
35132 CDXL : @tab X
35133 @tab Amiga CD video codec
35134
35135 Chinese AVS video : E @tab X
35136 @tab AVS1-P2, JiZhun profile, encoding through external library libxavs
35137
35138 Delphine Software International CIN video : @tab X
35139 @tab Codec used in Delphine Software International games.
35140
35141 Discworld II BMV Video : @tab X
35142 CineForm HD : X @tab X
35143 Canopus HQ : @tab X
35144 Canopus HQA : @tab X
35145 Canopus HQX : @tab X
35146 Canopus Lossless Codec : @tab X
35147 CDToons : @tab X
35148 @tab Codec used in various Broderbund games.
35149
35150 Cinepak : @tab X
35151 Cirrus Logic AccuPak : X @tab X
35152 @tab fourcc: CLJR
35153
35154 CPiA Video Format : @tab X
35155 Creative YUV (CYUV) : @tab X
35156 DFA : @tab X
35157 @tab Codec used in Chronomaster game.
35158
35159 Dirac : E @tab X
35160 @tab supported though the native vc2 (Dirac Pro) encoder
35161
35162 Deluxe Paint Animation : @tab X
35163 DNxHD : X @tab X
35164 @tab aka SMPTE VC3
35165
35166 Duck TrueMotion 1.0 : @tab X
35167 @tab fourcc: DUCK
35168
35169 Duck TrueMotion 2.0 : @tab X
35170 @tab fourcc: TM20
35171
35172 Duck TrueMotion 2.0 RT : @tab X
35173 @tab fourcc: TR20
35174
35175 DV (Digital Video) : X @tab X
35176 Dxtory capture format : @tab X
35177 Feeble Files/ScummVM DXA : @tab X
35178 @tab Codec originally used in Feeble Files game.
35179
35180 Electronic Arts CMV video : @tab X
35181 @tab Used in NHL 95 game.
35182
35183 Electronic Arts Madcow video : @tab X
35184 Electronic Arts TGV video : @tab X
35185 Electronic Arts TGQ video : @tab X
35186 Electronic Arts TQI video : @tab X
35187 Escape 124 : @tab X
35188 Escape 130 : @tab X
35189 FFmpeg video codec #1 : X @tab X
35190 @tab lossless codec (fourcc: FFV1)
35191
35192 Flash Screen Video v1 : X @tab X
35193 @tab fourcc: FSV1
35194
35195 Flash Screen Video v2 : X @tab X
35196 Flash Video (FLV) : X @tab X
35197 @tab Sorenson H.263 used in Flash
35198
35199 FM Screen Capture Codec : @tab X
35200 Forward Uncompressed : @tab X
35201 Fraps : @tab X
35202 Go2Meeting : @tab X
35203 @tab fourcc: G2M2, G2M3
35204
35205 Go2Webinar : @tab X
35206 @tab fourcc: G2M4
35207
35208 Gremlin Digital Video : @tab X
35209 H.261 : X @tab X
35210 H.263 / H.263-1996 : X @tab X
35211 H.263+ / H.263-1998 / H.263 version 2 : X @tab X
35212 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 : E @tab X
35213 @tab encoding supported through external library libx264 and OpenH264
35214
35215 HEVC : X @tab X
35216 @tab encoding supported through external library libx265 and libkvazaar
35217
35218 HNM version 4 : @tab X
35219 HuffYUV : X @tab X
35220 HuffYUV FFmpeg variant : X @tab X
35221 IBM Ultimotion : @tab X
35222 @tab fourcc: ULTI
35223
35224 id Cinematic video : @tab X
35225 @tab Used in Quake II.
35226
35227 id RoQ video : X @tab X
35228 @tab Used in Quake III, Jedi Knight 2, other computer games.
35229
35230 IFF ILBM : @tab X
35231 @tab IFF interleaved bitmap
35232
35233 IFF ByteRun1 : @tab X
35234 @tab IFF run length encoded bitmap
35235
35236 Infinity IMM4 : @tab X
35237 Intel H.263 : @tab X
35238 Intel Indeo 2 : @tab X
35239 Intel Indeo 3 : @tab X
35240 Intel Indeo 4 : @tab X
35241 Intel Indeo 5 : @tab X
35242 Interplay C93 : @tab X
35243 @tab Used in the game Cyberia from Interplay.
35244
35245 Interplay MVE video : @tab X
35246 @tab Used in Interplay .MVE files.
35247
35248 J2K : X @tab X
35249 Karl Morton's video codec : @tab X
35250 @tab Codec used in Worms games.
35251
35252 Kega Game Video (KGV1) : @tab X
35253 @tab Kega emulator screen capture codec.
35254
35255 Lagarith : @tab X
35256 LCL (LossLess Codec Library) MSZH : @tab X
35257 LCL (LossLess Codec Library) ZLIB : E @tab E
35258 LOCO : @tab X
35259 LucasArts SANM/Smush : @tab X
35260 @tab Used in LucasArts games / SMUSH animations.
35261
35262 lossless MJPEG : X @tab X
35263 MagicYUV Video : X @tab X
35264 Mandsoft Screen Capture Codec : @tab X
35265 Microsoft ATC Screen : @tab X
35266 @tab Also known as Microsoft Screen 3.
35267
35268 Microsoft Expression Encoder Screen : @tab X
35269 @tab Also known as Microsoft Titanium Screen 2.
35270
35271 Microsoft RLE : @tab X
35272 Microsoft Screen 1 : @tab X
35273 @tab Also known as Windows Media Video V7 Screen.
35274
35275 Microsoft Screen 2 : @tab X
35276 @tab Also known as Windows Media Video V9 Screen.
35277
35278 Microsoft Video 1 : @tab X
35279 Mimic : @tab X
35280 @tab Used in MSN Messenger Webcam streams.
35281
35282 Miro VideoXL : @tab X
35283 @tab fourcc: VIXL
35284
35285 MJPEG (Motion JPEG) : X @tab X
35286 Mobotix MxPEG video : @tab X
35287 Motion Pixels video : @tab X
35288 MPEG-1 video : X @tab X
35289 MPEG-2 video : X @tab X
35290 MPEG-4 part 2 : X @tab X
35291 @tab libxvidcore can be used alternatively for encoding.
35292
35293 MPEG-4 part 2 Microsoft variant version 1 : @tab X
35294 MPEG-4 part 2 Microsoft variant version 2 : X @tab X
35295 MPEG-4 part 2 Microsoft variant version 3 : X @tab X
35296 Newtek SpeedHQ : X @tab X
35297 Nintendo Gamecube THP video : @tab X
35298 NotchLC : @tab X
35299 NuppelVideo/RTjpeg : @tab X
35300 @tab Video encoding used in NuppelVideo files.
35301
35302 On2 VP3 : @tab X
35303 @tab still experimental
35304
35305 On2 VP4 : @tab X
35306 @tab fourcc: VP40
35307
35308 On2 VP5 : @tab X
35309 @tab fourcc: VP50
35310
35311 On2 VP6 : @tab X
35312 @tab fourcc: VP60,VP61,VP62
35313
35314 On2 VP7 : @tab X
35315 @tab fourcc: VP70,VP71
35316
35317 VP8 : E @tab X
35318 @tab fourcc: VP80, encoding supported through external library libvpx
35319
35320 VP9 : E @tab X
35321 @tab encoding supported through external library libvpx
35322
35323 Pinnacle TARGA CineWave YUV16 : @tab X
35324 @tab fourcc: Y216
35325
35326 Q-team QPEG : @tab X
35327 @tab fourccs: QPEG, Q1.0, Q1.1
35328
35329 QuickTime 8BPS video : @tab X
35330 QuickTime Animation (RLE) video : X @tab X
35331 @tab fourcc: 'rle '
35332
35333 QuickTime Graphics (SMC) : X @tab X
35334 @tab fourcc: 'smc '
35335
35336 QuickTime video (RPZA) : X @tab X
35337 @tab fourcc: rpza
35338
35339 R10K AJA Kona 10-bit RGB Codec : X @tab X
35340 R210 Quicktime Uncompressed RGB 10-bit : X @tab X
35341 Raw Video : X @tab X
35342 RealVideo 1.0 : X @tab X
35343 RealVideo 2.0 : X @tab X
35344 RealVideo 3.0 : @tab X
35345 @tab still far from ideal
35346
35347 RealVideo 4.0 : @tab X
35348 Renderware TXD (TeXture Dictionary) : @tab X
35349 @tab Texture dictionaries used by the Renderware Engine.
35350
35351 RL2 video : @tab X
35352 @tab used in some games by Entertainment Software Partners
35353
35354 ScreenPressor : @tab X
35355 Screenpresso : @tab X
35356 Screen Recorder Gold Codec : @tab X
35357 Sierra VMD video : @tab X
35358 @tab Used in Sierra VMD files.
35359
35360 Silicon Graphics Motion Video Compressor 1 (MVC1) : @tab X
35361 Silicon Graphics Motion Video Compressor 2 (MVC2) : @tab X
35362 Silicon Graphics RLE 8-bit video : @tab X
35363 Smacker video : @tab X
35364 @tab Video encoding used in Smacker.
35365
35366 SMPTE VC-1 : @tab X
35367 Snow : X @tab X
35368 @tab experimental wavelet codec (fourcc: SNOW)
35369
35370 Sony PlayStation MDEC (Motion DECoder) : @tab X
35371 Sorenson Vector Quantizer 1 : X @tab X
35372 @tab fourcc: SVQ1
35373
35374 Sorenson Vector Quantizer 3 : @tab X
35375 @tab fourcc: SVQ3
35376
35377 Sunplus JPEG (SP5X) : @tab X
35378 @tab fourcc: SP5X
35379
35380 TechSmith Screen Capture Codec : @tab X
35381 @tab fourcc: TSCC
35382
35383 TechSmith Screen Capture Codec 2 : @tab X
35384 @tab fourcc: TSC2
35385
35386 Theora : E @tab X
35387 @tab encoding supported through external library libtheora
35388
35389 Tiertex Limited SEQ video : @tab X
35390 @tab Codec used in DOS CD-ROM FlashBack game.
35391
35392 Ut Video : X @tab X
35393 v210 QuickTime uncompressed 4:2:2 10-bit : X @tab X
35394 v308 QuickTime uncompressed 4:4:4 : X @tab X
35395 v408 QuickTime uncompressed 4:4:4:4 : X @tab X
35396 v410 QuickTime uncompressed 4:4:4 10-bit : X @tab X
35397 VBLE Lossless Codec : @tab X
35398 VMware Screen Codec / VMware Video : @tab X
35399 @tab Codec used in videos captured by VMware.
35400
35401 Westwood Studios VQA (Vector Quantized Animation) video : @tab
35402 X
35403 Windows Media Image : @tab X
35404 Windows Media Video 7 : X @tab X
35405 Windows Media Video 8 : X @tab X
35406 Windows Media Video 9 : @tab X
35407 @tab not completely working
35408
35409 Wing Commander III / Xan : @tab X
35410 @tab Used in Wing Commander III .MVE files.
35411
35412 Wing Commander IV / Xan : @tab X
35413 @tab Used in Wing Commander IV.
35414
35415 Winnov WNV1 : @tab X
35416 WMV7 : X @tab X
35417 YAMAHA SMAF : X @tab X
35418 Psygnosis YOP Video : @tab X
35419 yuv4 : X @tab X
35420 @tab libquicktime uncompressed packed 4:2:0
35421
35422 ZeroCodec Lossless Video : @tab X
35423 ZLIB : X @tab X
35424 @tab part of LCL, encoder experimental
35425
35426 Zip Motion Blocks Video : X @tab X
35427 @tab Encoder works only in PAL8.
35428
35429 "X" means that the feature in that column (encoding / decoding) is
35430 supported.
35431
35432 "E" means that support is provided through an external library.
35433
35434 Audio Codecs
35435 Name : Encoding @tab Decoding @tab Comments
35436 8SVX exponential : @tab X
35437 8SVX fibonacci : @tab X
35438 AAC : EX @tab X
35439 @tab encoding supported through internal encoder and external library libfdk-aac
35440
35441 AAC+ : E @tab IX
35442 @tab encoding supported through external library libfdk-aac
35443
35444 AC-3 : IX @tab IX
35445 ACELP.KELVIN : @tab X
35446 ADPCM 4X Movie : @tab X
35447 ADPCM Yamaha AICA : @tab X
35448 ADPCM AmuseGraphics Movie : @tab X
35449 ADPCM Argonaut Games : X @tab X
35450 ADPCM CDROM XA : @tab X
35451 ADPCM Creative Technology : @tab X
35452 @tab 16 -E<gt> 4, 8 -E<gt> 4, 8 -E<gt> 3, 8 -E<gt> 2
35453
35454 ADPCM Electronic Arts : @tab X
35455 @tab Used in various EA titles.
35456
35457 ADPCM Electronic Arts Maxis CDROM XS : @tab X
35458 @tab Used in Sim City 3000.
35459
35460 ADPCM Electronic Arts R1 : @tab X
35461 ADPCM Electronic Arts R2 : @tab X
35462 ADPCM Electronic Arts R3 : @tab X
35463 ADPCM Electronic Arts XAS : @tab X
35464 ADPCM G.722 : X @tab X
35465 ADPCM G.726 : X @tab X
35466 ADPCM IMA Acorn Replay : @tab X
35467 ADPCM IMA AMV : X @tab X
35468 @tab Used in AMV files
35469
35470 ADPCM IMA Cunning Developments : @tab X
35471 ADPCM IMA Electronic Arts EACS : @tab X
35472 ADPCM IMA Electronic Arts SEAD : @tab X
35473 ADPCM IMA Funcom : @tab X
35474 ADPCM IMA High Voltage Software ALP : X @tab X
35475 ADPCM IMA QuickTime : X @tab X
35476 ADPCM IMA Simon & Schuster Interactive : X @tab X
35477 ADPCM IMA Ubisoft APM : X @tab X
35478 ADPCM IMA Loki SDL MJPEG : @tab X
35479 ADPCM IMA WAV : X @tab X
35480 ADPCM IMA Westwood : @tab X
35481 ADPCM ISS IMA : @tab X
35482 @tab Used in FunCom games.
35483
35484 ADPCM IMA Dialogic : @tab X
35485 ADPCM IMA Duck DK3 : @tab X
35486 @tab Used in some Sega Saturn console games.
35487
35488 ADPCM IMA Duck DK4 : @tab X
35489 @tab Used in some Sega Saturn console games.
35490
35491 ADPCM IMA Radical : @tab X
35492 ADPCM Microsoft : X @tab X
35493 ADPCM MS IMA : X @tab X
35494 ADPCM Nintendo Gamecube AFC : @tab X
35495 ADPCM Nintendo Gamecube DTK : @tab X
35496 ADPCM Nintendo THP : @tab X
35497 ADPCM Playstation : @tab X
35498 ADPCM QT IMA : X @tab X
35499 ADPCM SEGA CRI ADX : X @tab X
35500 @tab Used in Sega Dreamcast games.
35501
35502 ADPCM Shockwave Flash : X @tab X
35503 ADPCM Sound Blaster Pro 2-bit : @tab X
35504 ADPCM Sound Blaster Pro 2.6-bit : @tab X
35505 ADPCM Sound Blaster Pro 4-bit : @tab X
35506 ADPCM VIMA : @tab X
35507 @tab Used in LucasArts SMUSH animations.
35508
35509 ADPCM Westwood Studios IMA : X @tab X
35510 @tab Used in Westwood Studios games like Command and Conquer.
35511
35512 ADPCM Yamaha : X @tab X
35513 ADPCM Zork : @tab X
35514 AMR-NB : E @tab X
35515 @tab encoding supported through external library libopencore-amrnb
35516
35517 AMR-WB : E @tab X
35518 @tab encoding supported through external library libvo-amrwbenc
35519
35520 Amazing Studio PAF Audio : @tab X
35521 Apple lossless audio : X @tab X
35522 @tab QuickTime fourcc 'alac'
35523
35524 aptX : X @tab X
35525 @tab Used in Bluetooth A2DP
35526
35527 aptX HD : X @tab X
35528 @tab Used in Bluetooth A2DP
35529
35530 ATRAC1 : @tab X
35531 ATRAC3 : @tab X
35532 ATRAC3+ : @tab X
35533 ATRAC9 : @tab X
35534 Bink Audio : @tab X
35535 @tab Used in Bink and Smacker files in many games.
35536
35537 CELT : @tab E
35538 @tab decoding supported through external library libcelt
35539
35540 codec2 : E @tab E
35541 @tab en/decoding supported through external library libcodec2
35542
35543 CRI HCA : @tab X
35544 Delphine Software International CIN audio : @tab X
35545 @tab Codec used in Delphine Software International games.
35546
35547 Digital Speech Standard - Standard Play mode (DSS SP) : @tab X
35548 Discworld II BMV Audio : @tab X
35549 COOK : @tab X
35550 @tab All versions except 5.1 are supported.
35551
35552 DCA (DTS Coherent Acoustics) : X @tab X
35553 @tab supported extensions: XCh, XXCH, X96, XBR, XLL, LBR (partially)
35554
35555 Dolby E : @tab X
35556 DPCM Gremlin : @tab X
35557 DPCM id RoQ : X @tab X
35558 @tab Used in Quake III, Jedi Knight 2 and other computer games.
35559
35560 DPCM Interplay : @tab X
35561 @tab Used in various Interplay computer games.
35562
35563 DPCM Squareroot-Delta-Exact : @tab X
35564 @tab Used in various games.
35565
35566 DPCM Sierra Online : @tab X
35567 @tab Used in Sierra Online game audio files.
35568
35569 DPCM Sol : @tab X
35570 DPCM Xan : @tab X
35571 @tab Used in Origin's Wing Commander IV AVI files.
35572
35573 DPCM Xilam DERF : @tab X
35574 DSD (Direct Stream Digital), least significant bit first : @tab X
35575 DSD (Direct Stream Digital), most significant bit first : @tab X
35576 DSD (Direct Stream Digital), least significant bit first, planar :
35577 @tab X
35578 DSD (Direct Stream Digital), most significant bit first, planar :
35579 @tab X
35580 DSP Group TrueSpeech : @tab X
35581 DST (Direct Stream Transfer) : @tab X
35582 DV audio : @tab X
35583 Enhanced AC-3 : X @tab X
35584 EVRC (Enhanced Variable Rate Codec) : @tab X
35585 FLAC (Free Lossless Audio Codec) : X @tab IX
35586 G.723.1 : X @tab X
35587 G.729 : @tab X
35588 GSM : E @tab X
35589 @tab encoding supported through external library libgsm
35590
35591 GSM Microsoft variant : E @tab X
35592 @tab encoding supported through external library libgsm
35593
35594 IAC (Indeo Audio Coder) : @tab X
35595 iLBC (Internet Low Bitrate Codec) : E @tab EX
35596 @tab encoding and decoding supported through external library libilbc
35597
35598 IMC (Intel Music Coder) : @tab X
35599 Interplay ACM : @tab X
35600 MACE (Macintosh Audio Compression/Expansion) 3:1 : @tab X
35601 MACE (Macintosh Audio Compression/Expansion) 6:1 : @tab X
35602 MLP (Meridian Lossless Packing) : X @tab X
35603 @tab Used in DVD-Audio discs.
35604
35605 Monkey's Audio : @tab X
35606 MP1 (MPEG audio layer 1) : @tab IX
35607 MP2 (MPEG audio layer 2) : IX @tab IX
35608 @tab encoding supported also through external library TwoLAME
35609
35610 MP3 (MPEG audio layer 3) : E @tab IX
35611 @tab encoding supported through external library LAME, ADU MP3 and MP3onMP4 also supported
35612
35613 MPEG-4 Audio Lossless Coding (ALS) : @tab X
35614 Musepack SV7 : @tab X
35615 Musepack SV8 : @tab X
35616 Nellymoser Asao : X @tab X
35617 On2 AVC (Audio for Video Codec) : @tab X
35618 Opus : E @tab X
35619 @tab encoding supported through external library libopus
35620
35621 PCM A-law : X @tab X
35622 PCM mu-law : X @tab X
35623 PCM Archimedes VIDC : X @tab X
35624 PCM signed 8-bit planar : X @tab X
35625 PCM signed 16-bit big-endian planar : X @tab X
35626 PCM signed 16-bit little-endian planar : X @tab X
35627 PCM signed 24-bit little-endian planar : X @tab X
35628 PCM signed 32-bit little-endian planar : X @tab X
35629 PCM 32-bit floating point big-endian : X @tab X
35630 PCM 32-bit floating point little-endian : X @tab X
35631 PCM 64-bit floating point big-endian : X @tab X
35632 PCM 64-bit floating point little-endian : X @tab X
35633 PCM D-Cinema audio signed 24-bit : X @tab X
35634 PCM signed 8-bit : X @tab X
35635 PCM signed 16-bit big-endian : X @tab X
35636 PCM signed 16-bit little-endian : X @tab X
35637 PCM signed 24-bit big-endian : X @tab X
35638 PCM signed 24-bit little-endian : X @tab X
35639 PCM signed 32-bit big-endian : X @tab X
35640 PCM signed 32-bit little-endian : X @tab X
35641 PCM signed 16/20/24-bit big-endian in MPEG-TS : @tab X
35642 PCM unsigned 8-bit : X @tab X
35643 PCM unsigned 16-bit big-endian : X @tab X
35644 PCM unsigned 16-bit little-endian : X @tab X
35645 PCM unsigned 24-bit big-endian : X @tab X
35646 PCM unsigned 24-bit little-endian : X @tab X
35647 PCM unsigned 32-bit big-endian : X @tab X
35648 PCM unsigned 32-bit little-endian : X @tab X
35649 QCELP / PureVoice : @tab X
35650 QDesign Music Codec 1 : @tab X
35651 QDesign Music Codec 2 : @tab X
35652 @tab There are still some distortions.
35653
35654 RealAudio 1.0 (14.4K) : X @tab X
35655 @tab Real 14400 bit/s codec
35656
35657 RealAudio 2.0 (28.8K) : @tab X
35658 @tab Real 28800 bit/s codec
35659
35660 RealAudio 3.0 (dnet) : IX @tab X
35661 @tab Real low bitrate AC-3 codec
35662
35663 RealAudio Lossless : @tab X
35664 RealAudio SIPR / ACELP.NET : @tab X
35665 SBC (low-complexity subband codec) : X @tab X
35666 @tab Used in Bluetooth A2DP
35667
35668 Shorten : @tab X
35669 Sierra VMD audio : @tab X
35670 @tab Used in Sierra VMD files.
35671
35672 Smacker audio : @tab X
35673 SMPTE 302M AES3 audio : X @tab X
35674 Sonic : X @tab X
35675 @tab experimental codec
35676
35677 Sonic lossless : X @tab X
35678 @tab experimental codec
35679
35680 Speex : E @tab EX
35681 @tab supported through external library libspeex
35682
35683 TAK (Tom's lossless Audio Kompressor) : @tab X
35684 True Audio (TTA) : X @tab X
35685 TrueHD : X @tab X
35686 @tab Used in HD-DVD and Blu-Ray discs.
35687
35688 TwinVQ (VQF flavor) : @tab X
35689 VIMA : @tab X
35690 @tab Used in LucasArts SMUSH animations.
35691
35692 Vorbis : E @tab X
35693 @tab A native but very primitive encoder exists.
35694
35695 Voxware MetaSound : @tab X
35696 WavPack : X @tab X
35697 Westwood Audio (SND1) : @tab X
35698 Windows Media Audio 1 : X @tab X
35699 Windows Media Audio 2 : X @tab X
35700 Windows Media Audio Lossless : @tab X
35701 Windows Media Audio Pro : @tab X
35702 Windows Media Audio Voice : @tab X
35703 Xbox Media Audio 1 : @tab X
35704 Xbox Media Audio 2 : @tab X
35705
35706 "X" means that the feature in that column (encoding / decoding) is
35707 supported.
35708
35709 "E" means that support is provided through an external library.
35710
35711 "I" means that an integer-only version is available, too (ensures high
35712 performance on systems without hardware floating point support).
35713
35714 Subtitle Formats
35715 Name : Muxing @tab Demuxing @tab Encoding @tab Decoding
35716 3GPP Timed Text : @tab @tab X @tab X
35717 AQTitle : @tab X @tab @tab X
35718 DVB : X @tab X @tab X @tab X
35719 DVB teletext : @tab X @tab @tab E
35720 DVD : X @tab X @tab X @tab X
35721 JACOsub : X @tab X @tab @tab X
35722 MicroDVD : X @tab X @tab @tab X
35723 MPL2 : @tab X @tab @tab X
35724 MPsub (MPlayer) : @tab X @tab @tab X
35725 PGS : @tab @tab @tab X
35726 PJS (Phoenix) : @tab X @tab @tab X
35727 RealText : @tab X @tab @tab X
35728 SAMI : @tab X @tab @tab X
35729 Spruce format (STL) : @tab X @tab @tab X
35730 SSA/ASS : X @tab X @tab X @tab X
35731 SubRip (SRT) : X @tab X @tab X @tab X
35732 SubViewer v1 : @tab X @tab @tab X
35733 SubViewer : @tab X @tab @tab X
35734 TED Talks captions : @tab X @tab @tab X
35735 TTML : X @tab @tab X @tab
35736 VobSub (IDX+SUB) : @tab X @tab @tab X
35737 VPlayer : @tab X @tab @tab X
35738 WebVTT : X @tab X @tab X @tab X
35739 XSUB : @tab @tab X @tab X
35740
35741 "X" means that the feature is supported.
35742
35743 "E" means that support is provided through an external library.
35744
35745 Network Protocols
35746 Name : Support
35747 AMQP : E
35748 file : X
35749 FTP : X
35750 Gopher : X
35751 Gophers : X
35752 HLS : X
35753 HTTP : X
35754 HTTPS : X
35755 Icecast : X
35756 MMSH : X
35757 MMST : X
35758 pipe : X
35759 Pro-MPEG FEC : X
35760 RTMP : X
35761 RTMPE : X
35762 RTMPS : X
35763 RTMPT : X
35764 RTMPTE : X
35765 RTMPTS : X
35766 RTP : X
35767 SAMBA : E
35768 SCTP : X
35769 SFTP : E
35770 TCP : X
35771 TLS : X
35772 UDP : X
35773 ZMQ : E
35774
35775 "X" means that the protocol is supported.
35776
35777 "E" means that support is provided through an external library.
35778
35779 Input/Output Devices
35780 Name : Input @tab Output
35781 ALSA : X @tab X
35782 BKTR : X @tab
35783 caca : @tab X
35784 DV1394 : X @tab
35785 Lavfi virtual device : X @tab
35786 Linux framebuffer : X @tab X
35787 JACK : X @tab
35788 LIBCDIO : X
35789 LIBDC1394 : X @tab
35790 OpenAL : X
35791 OpenGL : @tab X
35792 OSS : X @tab X
35793 PulseAudio : X @tab X
35794 SDL : @tab X
35795 Video4Linux2 : X @tab X
35796 VfW capture : X @tab
35797 X11 grabbing : X @tab
35798 Win32 grabbing : X @tab
35799
35800 "X" means that input/output is supported.
35801
35802 Timecode
35803 Codec/format : Read @tab Write
35804 AVI : X @tab X
35805 DV : X @tab X
35806 GXF : X @tab X
35807 MOV : X @tab X
35808 MPEG1/2 : X @tab X
35809 MXF : X @tab X
35810
35812 ffplay(1), ffmpeg(1), ffprobe(1), ffmpeg-utils(1), ffmpeg-scaler(1),
35813 ffmpeg-resampler(1), ffmpeg-codecs(1), ffmpeg-bitstream-filters(1),
35814 ffmpeg-formats(1), ffmpeg-devices(1), ffmpeg-protocols(1),
35815 ffmpeg-filters(1)
35816
35818 The FFmpeg developers.
35819
35820 For details about the authorship, see the Git history of the project
35821 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
35822 the FFmpeg source directory, or browsing the online repository at
35823 <http://source.ffmpeg.org>.
35824
35825 Maintainers for the specific components are listed in the file
35826 MAINTAINERS in the source code tree.
35827
35828
35829
35830 FFPLAY-ALL(1)