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 -fs Start in fullscreen mode.
433
434 -an Disable audio.
435
436 -vn Disable video.
437
438 -sn Disable subtitles.
439
440 -ss pos
441 Seek to pos. Note that in most formats it is not possible to seek
442 exactly, so ffplay will seek to the nearest seek point to pos.
443
444 pos must be a time duration specification, see the Time duration
445 section in the ffmpeg-utils(1) manual.
446
447 -t duration
448 Play duration seconds of audio/video.
449
450 duration must be a time duration specification, see the Time
451 duration section in the ffmpeg-utils(1) manual.
452
453 -bytes
454 Seek by bytes.
455
456 -seek_interval
457 Set custom interval, in seconds, for seeking using left/right keys.
458 Default is 10 seconds.
459
460 -nodisp
461 Disable graphical display.
462
463 -noborder
464 Borderless window.
465
466 -alwaysontop
467 Window always on top. Available on: X11 with SDL >= 2.0.5, Windows
468 SDL >= 2.0.6.
469
470 -volume
471 Set the startup volume. 0 means silence, 100 means no volume
472 reduction or amplification. Negative values are treated as 0,
473 values above 100 are treated as 100.
474
475 -f fmt
476 Force format.
477
478 -window_title title
479 Set window title (default is the input filename).
480
481 -left title
482 Set the x position for the left of the window (default is a
483 centered window).
484
485 -top title
486 Set the y position for the top of the window (default is a centered
487 window).
488
489 -loop number
490 Loops movie playback <number> times. 0 means forever.
491
492 -showmode mode
493 Set the show mode to use. Available values for mode are:
494
495 0, video
496 show video
497
498 1, waves
499 show audio waves
500
501 2, rdft
502 show audio frequency band using RDFT ((Inverse) Real Discrete
503 Fourier Transform)
504
505 Default value is "video", if video is not present or cannot be
506 played "rdft" is automatically selected.
507
508 You can interactively cycle through the available show modes by
509 pressing the key w.
510
511 -vf filtergraph
512 Create the filtergraph specified by filtergraph and use it to
513 filter the video stream.
514
515 filtergraph is a description of the filtergraph to apply to the
516 stream, and must have a single video input and a single video
517 output. In the filtergraph, the input is associated to the label
518 "in", and the output to the label "out". See the ffmpeg-filters
519 manual for more information about the filtergraph syntax.
520
521 You can specify this parameter multiple times and cycle through the
522 specified filtergraphs along with the show modes by pressing the
523 key w.
524
525 -af filtergraph
526 filtergraph is a description of the filtergraph to apply to the
527 input audio. Use the option "-filters" to show all the available
528 filters (including sources and sinks).
529
530 -i input_url
531 Read input_url.
532
533 Advanced options
534 -stats
535 Print several playback statistics, in particular show the stream
536 duration, the codec parameters, the current position in the stream
537 and the audio/video synchronisation drift. It is shown by default,
538 unless the log level is lower than "info". Its display can be
539 forced by manually specifying this option. To disable it, you need
540 to specify "-nostats".
541
542 -fast
543 Non-spec-compliant optimizations.
544
545 -genpts
546 Generate pts.
547
548 -sync type
549 Set the master clock to audio ("type=audio"), video ("type=video")
550 or external ("type=ext"). Default is audio. The master clock is
551 used to control audio-video synchronization. Most media players use
552 audio as master clock, but in some cases (streaming or high quality
553 broadcast) it is necessary to change that. This option is mainly
554 used for debugging purposes.
555
556 -ast audio_stream_specifier
557 Select the desired audio stream using the given stream specifier.
558 The stream specifiers are described in the Stream specifiers
559 chapter. If this option is not specified, the "best" audio stream
560 is selected in the program of the already selected video stream.
561
562 -vst video_stream_specifier
563 Select the desired video stream using the given stream specifier.
564 The stream specifiers are described in the Stream specifiers
565 chapter. If this option is not specified, the "best" video stream
566 is selected.
567
568 -sst subtitle_stream_specifier
569 Select the desired subtitle stream using the given stream
570 specifier. The stream specifiers are described in the Stream
571 specifiers chapter. If this option is not specified, the "best"
572 subtitle stream is selected in the program of the already selected
573 video or audio stream.
574
575 -autoexit
576 Exit when video is done playing.
577
578 -exitonkeydown
579 Exit if any key is pressed.
580
581 -exitonmousedown
582 Exit if any mouse button is pressed.
583
584 -codec:media_specifier codec_name
585 Force a specific decoder implementation for the stream identified
586 by media_specifier, which can assume the values "a" (audio), "v"
587 (video), and "s" subtitle.
588
589 -acodec codec_name
590 Force a specific audio decoder.
591
592 -vcodec codec_name
593 Force a specific video decoder.
594
595 -scodec codec_name
596 Force a specific subtitle decoder.
597
598 -autorotate
599 Automatically rotate the video according to file metadata. Enabled
600 by default, use -noautorotate to disable it.
601
602 -framedrop
603 Drop video frames if video is out of sync. Enabled by default if
604 the master clock is not set to video. Use this option to enable
605 frame dropping for all master clock sources, use -noframedrop to
606 disable it.
607
608 -infbuf
609 Do not limit the input buffer size, read as much data as possible
610 from the input as soon as possible. Enabled by default for realtime
611 streams, where data may be dropped if not read in time. Use this
612 option to enable infinite buffers for all inputs, use -noinfbuf to
613 disable it.
614
615 -filter_threads nb_threads
616 Defines how many threads are used to process a filter pipeline.
617 Each pipeline will produce a thread pool with this many threads
618 available for parallel processing. The default is 0 which means
619 that the thread count will be determined by the number of available
620 CPUs.
621
622 While playing
623 q, ESC
624 Quit.
625
626 f Toggle full screen.
627
628 p, SPC
629 Pause.
630
631 m Toggle mute.
632
633 9, 0
634 /, *
635 Decrease and increase volume respectively.
636
637 a Cycle audio channel in the current program.
638
639 v Cycle video channel.
640
641 t Cycle subtitle channel in the current program.
642
643 c Cycle program.
644
645 w Cycle video filters or show modes.
646
647 s Step to the next frame.
648
649 Pause if the stream is not already paused, step to the next video
650 frame, and pause.
651
652 left/right
653 Seek backward/forward 10 seconds.
654
655 down/up
656 Seek backward/forward 1 minute.
657
658 page down/page up
659 Seek to the previous/next chapter. or if there are no chapters
660 Seek backward/forward 10 minutes.
661
662 right mouse click
663 Seek to percentage in file corresponding to fraction of width.
664
665 left mouse double-click
666 Toggle full screen.
667
669 This section documents the syntax and formats employed by the FFmpeg
670 libraries and tools.
671
672 Quoting and escaping
673 FFmpeg adopts the following quoting and escaping mechanism, unless
674 explicitly specified. The following rules are applied:
675
676 • ' and \ are special characters (respectively used for quoting and
677 escaping). In addition to them, there might be other special
678 characters depending on the specific syntax where the escaping and
679 quoting are employed.
680
681 • A special character is escaped by prefixing it with a \.
682
683 • All characters enclosed between '' are included literally in the
684 parsed string. The quote character ' itself cannot be quoted, so
685 you may need to close the quote and escape it.
686
687 • Leading and trailing whitespaces, unless escaped or quoted, are
688 removed from the parsed string.
689
690 Note that you may need to add a second level of escaping when using the
691 command line or a script, which depends on the syntax of the adopted
692 shell language.
693
694 The function "av_get_token" defined in libavutil/avstring.h can be used
695 to parse a token quoted or escaped according to the rules defined
696 above.
697
698 The tool tools/ffescape in the FFmpeg source tree can be used to
699 automatically quote or escape a string in a script.
700
701 Examples
702
703 • Escape the string "Crime d'Amour" containing the "'" special
704 character:
705
706 Crime d\'Amour
707
708 • The string above contains a quote, so the "'" needs to be escaped
709 when quoting it:
710
711 'Crime d'\''Amour'
712
713 • Include leading or trailing whitespaces using quoting:
714
715 ' this string starts and ends with whitespaces '
716
717 • Escaping and quoting can be mixed together:
718
719 ' The string '\'string\'' is a string '
720
721 • To include a literal \ you can use either escaping or quoting:
722
723 'c:\foo' can be written as c:\\foo
724
725 Date
726 The accepted syntax is:
727
728 [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
729 now
730
731 If the value is "now" it takes the current time.
732
733 Time is local time unless Z is appended, in which case it is
734 interpreted as UTC. If the year-month-day part is not specified it
735 takes the current year-month-day.
736
737 Time duration
738 There are two accepted syntaxes for expressing time duration.
739
740 [-][<HH>:]<MM>:<SS>[.<m>...]
741
742 HH expresses the number of hours, MM the number of minutes for a
743 maximum of 2 digits, and SS the number of seconds for a maximum of 2
744 digits. The m at the end expresses decimal value for SS.
745
746 or
747
748 [-]<S>+[.<m>...][s|ms|us]
749
750 S expresses the number of seconds, with the optional decimal part m.
751 The optional literal suffixes s, ms or us indicate to interpret the
752 value as seconds, milliseconds or microseconds, respectively.
753
754 In both expressions, the optional - indicates negative duration.
755
756 Examples
757
758 The following examples are all valid time duration:
759
760 55 55 seconds
761
762 0.2 0.2 seconds
763
764 200ms
765 200 milliseconds, that's 0.2s
766
767 200000us
768 200000 microseconds, that's 0.2s
769
770 12:03:45
771 12 hours, 03 minutes and 45 seconds
772
773 23.189
774 23.189 seconds
775
776 Video size
777 Specify the size of the sourced video, it may be a string of the form
778 widthxheight, or the name of a size abbreviation.
779
780 The following abbreviations are recognized:
781
782 ntsc
783 720x480
784
785 pal 720x576
786
787 qntsc
788 352x240
789
790 qpal
791 352x288
792
793 sntsc
794 640x480
795
796 spal
797 768x576
798
799 film
800 352x240
801
802 ntsc-film
803 352x240
804
805 sqcif
806 128x96
807
808 qcif
809 176x144
810
811 cif 352x288
812
813 4cif
814 704x576
815
816 16cif
817 1408x1152
818
819 qqvga
820 160x120
821
822 qvga
823 320x240
824
825 vga 640x480
826
827 svga
828 800x600
829
830 xga 1024x768
831
832 uxga
833 1600x1200
834
835 qxga
836 2048x1536
837
838 sxga
839 1280x1024
840
841 qsxga
842 2560x2048
843
844 hsxga
845 5120x4096
846
847 wvga
848 852x480
849
850 wxga
851 1366x768
852
853 wsxga
854 1600x1024
855
856 wuxga
857 1920x1200
858
859 woxga
860 2560x1600
861
862 wqsxga
863 3200x2048
864
865 wquxga
866 3840x2400
867
868 whsxga
869 6400x4096
870
871 whuxga
872 7680x4800
873
874 cga 320x200
875
876 ega 640x350
877
878 hd480
879 852x480
880
881 hd720
882 1280x720
883
884 hd1080
885 1920x1080
886
887 2k 2048x1080
888
889 2kflat
890 1998x1080
891
892 2kscope
893 2048x858
894
895 4k 4096x2160
896
897 4kflat
898 3996x2160
899
900 4kscope
901 4096x1716
902
903 nhd 640x360
904
905 hqvga
906 240x160
907
908 wqvga
909 400x240
910
911 fwqvga
912 432x240
913
914 hvga
915 480x320
916
917 qhd 960x540
918
919 2kdci
920 2048x1080
921
922 4kdci
923 4096x2160
924
925 uhd2160
926 3840x2160
927
928 uhd4320
929 7680x4320
930
931 Video rate
932 Specify the frame rate of a video, expressed as the number of frames
933 generated per second. It has to be a string in the format
934 frame_rate_num/frame_rate_den, an integer number, a float number or a
935 valid video frame rate abbreviation.
936
937 The following abbreviations are recognized:
938
939 ntsc
940 30000/1001
941
942 pal 25/1
943
944 qntsc
945 30000/1001
946
947 qpal
948 25/1
949
950 sntsc
951 30000/1001
952
953 spal
954 25/1
955
956 film
957 24/1
958
959 ntsc-film
960 24000/1001
961
962 Ratio
963 A ratio can be expressed as an expression, or in the form
964 numerator:denominator.
965
966 Note that a ratio with infinite (1/0) or negative value is considered
967 valid, so you should check on the returned value if you want to exclude
968 those values.
969
970 The undefined value can be expressed using the "0:0" string.
971
972 Color
973 It can be the name of a color as defined below (case insensitive match)
974 or a "[0x|#]RRGGBB[AA]" sequence, possibly followed by @ and a string
975 representing the alpha component.
976
977 The alpha component may be a string composed by "0x" followed by an
978 hexadecimal number or a decimal number between 0.0 and 1.0, which
979 represents the opacity value (0x00 or 0.0 means completely transparent,
980 0xff or 1.0 completely opaque). If the alpha component is not specified
981 then 0xff is assumed.
982
983 The string random will result in a random color.
984
985 The following names of colors are recognized:
986
987 AliceBlue
988 0xF0F8FF
989
990 AntiqueWhite
991 0xFAEBD7
992
993 Aqua
994 0x00FFFF
995
996 Aquamarine
997 0x7FFFD4
998
999 Azure
1000 0xF0FFFF
1001
1002 Beige
1003 0xF5F5DC
1004
1005 Bisque
1006 0xFFE4C4
1007
1008 Black
1009 0x000000
1010
1011 BlanchedAlmond
1012 0xFFEBCD
1013
1014 Blue
1015 0x0000FF
1016
1017 BlueViolet
1018 0x8A2BE2
1019
1020 Brown
1021 0xA52A2A
1022
1023 BurlyWood
1024 0xDEB887
1025
1026 CadetBlue
1027 0x5F9EA0
1028
1029 Chartreuse
1030 0x7FFF00
1031
1032 Chocolate
1033 0xD2691E
1034
1035 Coral
1036 0xFF7F50
1037
1038 CornflowerBlue
1039 0x6495ED
1040
1041 Cornsilk
1042 0xFFF8DC
1043
1044 Crimson
1045 0xDC143C
1046
1047 Cyan
1048 0x00FFFF
1049
1050 DarkBlue
1051 0x00008B
1052
1053 DarkCyan
1054 0x008B8B
1055
1056 DarkGoldenRod
1057 0xB8860B
1058
1059 DarkGray
1060 0xA9A9A9
1061
1062 DarkGreen
1063 0x006400
1064
1065 DarkKhaki
1066 0xBDB76B
1067
1068 DarkMagenta
1069 0x8B008B
1070
1071 DarkOliveGreen
1072 0x556B2F
1073
1074 Darkorange
1075 0xFF8C00
1076
1077 DarkOrchid
1078 0x9932CC
1079
1080 DarkRed
1081 0x8B0000
1082
1083 DarkSalmon
1084 0xE9967A
1085
1086 DarkSeaGreen
1087 0x8FBC8F
1088
1089 DarkSlateBlue
1090 0x483D8B
1091
1092 DarkSlateGray
1093 0x2F4F4F
1094
1095 DarkTurquoise
1096 0x00CED1
1097
1098 DarkViolet
1099 0x9400D3
1100
1101 DeepPink
1102 0xFF1493
1103
1104 DeepSkyBlue
1105 0x00BFFF
1106
1107 DimGray
1108 0x696969
1109
1110 DodgerBlue
1111 0x1E90FF
1112
1113 FireBrick
1114 0xB22222
1115
1116 FloralWhite
1117 0xFFFAF0
1118
1119 ForestGreen
1120 0x228B22
1121
1122 Fuchsia
1123 0xFF00FF
1124
1125 Gainsboro
1126 0xDCDCDC
1127
1128 GhostWhite
1129 0xF8F8FF
1130
1131 Gold
1132 0xFFD700
1133
1134 GoldenRod
1135 0xDAA520
1136
1137 Gray
1138 0x808080
1139
1140 Green
1141 0x008000
1142
1143 GreenYellow
1144 0xADFF2F
1145
1146 HoneyDew
1147 0xF0FFF0
1148
1149 HotPink
1150 0xFF69B4
1151
1152 IndianRed
1153 0xCD5C5C
1154
1155 Indigo
1156 0x4B0082
1157
1158 Ivory
1159 0xFFFFF0
1160
1161 Khaki
1162 0xF0E68C
1163
1164 Lavender
1165 0xE6E6FA
1166
1167 LavenderBlush
1168 0xFFF0F5
1169
1170 LawnGreen
1171 0x7CFC00
1172
1173 LemonChiffon
1174 0xFFFACD
1175
1176 LightBlue
1177 0xADD8E6
1178
1179 LightCoral
1180 0xF08080
1181
1182 LightCyan
1183 0xE0FFFF
1184
1185 LightGoldenRodYellow
1186 0xFAFAD2
1187
1188 LightGreen
1189 0x90EE90
1190
1191 LightGrey
1192 0xD3D3D3
1193
1194 LightPink
1195 0xFFB6C1
1196
1197 LightSalmon
1198 0xFFA07A
1199
1200 LightSeaGreen
1201 0x20B2AA
1202
1203 LightSkyBlue
1204 0x87CEFA
1205
1206 LightSlateGray
1207 0x778899
1208
1209 LightSteelBlue
1210 0xB0C4DE
1211
1212 LightYellow
1213 0xFFFFE0
1214
1215 Lime
1216 0x00FF00
1217
1218 LimeGreen
1219 0x32CD32
1220
1221 Linen
1222 0xFAF0E6
1223
1224 Magenta
1225 0xFF00FF
1226
1227 Maroon
1228 0x800000
1229
1230 MediumAquaMarine
1231 0x66CDAA
1232
1233 MediumBlue
1234 0x0000CD
1235
1236 MediumOrchid
1237 0xBA55D3
1238
1239 MediumPurple
1240 0x9370D8
1241
1242 MediumSeaGreen
1243 0x3CB371
1244
1245 MediumSlateBlue
1246 0x7B68EE
1247
1248 MediumSpringGreen
1249 0x00FA9A
1250
1251 MediumTurquoise
1252 0x48D1CC
1253
1254 MediumVioletRed
1255 0xC71585
1256
1257 MidnightBlue
1258 0x191970
1259
1260 MintCream
1261 0xF5FFFA
1262
1263 MistyRose
1264 0xFFE4E1
1265
1266 Moccasin
1267 0xFFE4B5
1268
1269 NavajoWhite
1270 0xFFDEAD
1271
1272 Navy
1273 0x000080
1274
1275 OldLace
1276 0xFDF5E6
1277
1278 Olive
1279 0x808000
1280
1281 OliveDrab
1282 0x6B8E23
1283
1284 Orange
1285 0xFFA500
1286
1287 OrangeRed
1288 0xFF4500
1289
1290 Orchid
1291 0xDA70D6
1292
1293 PaleGoldenRod
1294 0xEEE8AA
1295
1296 PaleGreen
1297 0x98FB98
1298
1299 PaleTurquoise
1300 0xAFEEEE
1301
1302 PaleVioletRed
1303 0xD87093
1304
1305 PapayaWhip
1306 0xFFEFD5
1307
1308 PeachPuff
1309 0xFFDAB9
1310
1311 Peru
1312 0xCD853F
1313
1314 Pink
1315 0xFFC0CB
1316
1317 Plum
1318 0xDDA0DD
1319
1320 PowderBlue
1321 0xB0E0E6
1322
1323 Purple
1324 0x800080
1325
1326 Red 0xFF0000
1327
1328 RosyBrown
1329 0xBC8F8F
1330
1331 RoyalBlue
1332 0x4169E1
1333
1334 SaddleBrown
1335 0x8B4513
1336
1337 Salmon
1338 0xFA8072
1339
1340 SandyBrown
1341 0xF4A460
1342
1343 SeaGreen
1344 0x2E8B57
1345
1346 SeaShell
1347 0xFFF5EE
1348
1349 Sienna
1350 0xA0522D
1351
1352 Silver
1353 0xC0C0C0
1354
1355 SkyBlue
1356 0x87CEEB
1357
1358 SlateBlue
1359 0x6A5ACD
1360
1361 SlateGray
1362 0x708090
1363
1364 Snow
1365 0xFFFAFA
1366
1367 SpringGreen
1368 0x00FF7F
1369
1370 SteelBlue
1371 0x4682B4
1372
1373 Tan 0xD2B48C
1374
1375 Teal
1376 0x008080
1377
1378 Thistle
1379 0xD8BFD8
1380
1381 Tomato
1382 0xFF6347
1383
1384 Turquoise
1385 0x40E0D0
1386
1387 Violet
1388 0xEE82EE
1389
1390 Wheat
1391 0xF5DEB3
1392
1393 White
1394 0xFFFFFF
1395
1396 WhiteSmoke
1397 0xF5F5F5
1398
1399 Yellow
1400 0xFFFF00
1401
1402 YellowGreen
1403 0x9ACD32
1404
1405 Channel Layout
1406 A channel layout specifies the spatial disposition of the channels in a
1407 multi-channel audio stream. To specify a channel layout, FFmpeg makes
1408 use of a special syntax.
1409
1410 Individual channels are identified by an id, as given by the table
1411 below:
1412
1413 FL front left
1414
1415 FR front right
1416
1417 FC front center
1418
1419 LFE low frequency
1420
1421 BL back left
1422
1423 BR back right
1424
1425 FLC front left-of-center
1426
1427 FRC front right-of-center
1428
1429 BC back center
1430
1431 SL side left
1432
1433 SR side right
1434
1435 TC top center
1436
1437 TFL top front left
1438
1439 TFC top front center
1440
1441 TFR top front right
1442
1443 TBL top back left
1444
1445 TBC top back center
1446
1447 TBR top back right
1448
1449 DL downmix left
1450
1451 DR downmix right
1452
1453 WL wide left
1454
1455 WR wide right
1456
1457 SDL surround direct left
1458
1459 SDR surround direct right
1460
1461 LFE2
1462 low frequency 2
1463
1464 Standard channel layout compositions can be specified by using the
1465 following identifiers:
1466
1467 mono
1468 FC
1469
1470 stereo
1471 FL+FR
1472
1473 2.1 FL+FR+LFE
1474
1475 3.0 FL+FR+FC
1476
1477 3.0(back)
1478 FL+FR+BC
1479
1480 4.0 FL+FR+FC+BC
1481
1482 quad
1483 FL+FR+BL+BR
1484
1485 quad(side)
1486 FL+FR+SL+SR
1487
1488 3.1 FL+FR+FC+LFE
1489
1490 5.0 FL+FR+FC+BL+BR
1491
1492 5.0(side)
1493 FL+FR+FC+SL+SR
1494
1495 4.1 FL+FR+FC+LFE+BC
1496
1497 5.1 FL+FR+FC+LFE+BL+BR
1498
1499 5.1(side)
1500 FL+FR+FC+LFE+SL+SR
1501
1502 6.0 FL+FR+FC+BC+SL+SR
1503
1504 6.0(front)
1505 FL+FR+FLC+FRC+SL+SR
1506
1507 hexagonal
1508 FL+FR+FC+BL+BR+BC
1509
1510 6.1 FL+FR+FC+LFE+BC+SL+SR
1511
1512 6.1 FL+FR+FC+LFE+BL+BR+BC
1513
1514 6.1(front)
1515 FL+FR+LFE+FLC+FRC+SL+SR
1516
1517 7.0 FL+FR+FC+BL+BR+SL+SR
1518
1519 7.0(front)
1520 FL+FR+FC+FLC+FRC+SL+SR
1521
1522 7.1 FL+FR+FC+LFE+BL+BR+SL+SR
1523
1524 7.1(wide)
1525 FL+FR+FC+LFE+BL+BR+FLC+FRC
1526
1527 7.1(wide-side)
1528 FL+FR+FC+LFE+FLC+FRC+SL+SR
1529
1530 7.1(top)
1531 FL+FR+FC+LFE+BL+BR+TFL+TFR
1532
1533 octagonal
1534 FL+FR+FC+BL+BR+BC+SL+SR
1535
1536 cube
1537 FL+FR+BL+BR+TFL+TFR+TBL+TBR
1538
1539 hexadecagonal
1540 FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
1541
1542 downmix
1543 DL+DR
1544
1545 22.2
1546 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
1547
1548 A custom channel layout can be specified as a sequence of terms,
1549 separated by '+'. Each term can be:
1550
1551 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.), each
1552 optionally containing a custom name after a '@', (e.g. FL@Left,
1553 FR@Right, FC@Center, LFE@Low_Frequency, etc.)
1554
1555 A standard channel layout can be specified by the following:
1556
1557 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.)
1558
1559 • the name of a standard channel layout (e.g. mono, stereo, 4.0,
1560 quad, 5.0, etc.)
1561
1562 • a number of channels, in decimal, followed by 'c', yielding the
1563 default channel layout for that number of channels (see the
1564 function "av_channel_layout_default"). Note that not all channel
1565 counts have a default layout.
1566
1567 • a number of channels, in decimal, followed by 'C', yielding an
1568 unknown channel layout with the specified number of channels. Note
1569 that not all channel layout specification strings support unknown
1570 channel layouts.
1571
1572 • a channel layout mask, in hexadecimal starting with "0x" (see the
1573 "AV_CH_*" macros in libavutil/channel_layout.h.
1574
1575 Before libavutil version 53 the trailing character "c" to specify a
1576 number of channels was optional, but now it is required, while a
1577 channel layout mask can also be specified as a decimal number (if and
1578 only if not followed by "c" or "C").
1579
1580 See also the function "av_channel_layout_from_string" defined in
1581 libavutil/channel_layout.h.
1582
1584 When evaluating an arithmetic expression, FFmpeg uses an internal
1585 formula evaluator, implemented through the libavutil/eval.h interface.
1586
1587 An expression may contain unary, binary operators, constants, and
1588 functions.
1589
1590 Two expressions expr1 and expr2 can be combined to form another
1591 expression "expr1;expr2". expr1 and expr2 are evaluated in turn, and
1592 the new expression evaluates to the value of expr2.
1593
1594 The following binary operators are available: "+", "-", "*", "/", "^".
1595
1596 The following unary operators are available: "+", "-".
1597
1598 The following functions are available:
1599
1600 abs(x)
1601 Compute absolute value of x.
1602
1603 acos(x)
1604 Compute arccosine of x.
1605
1606 asin(x)
1607 Compute arcsine of x.
1608
1609 atan(x)
1610 Compute arctangent of x.
1611
1612 atan2(x, y)
1613 Compute principal value of the arc tangent of y/x.
1614
1615 between(x, min, max)
1616 Return 1 if x is greater than or equal to min and lesser than or
1617 equal to max, 0 otherwise.
1618
1619 bitand(x, y)
1620 bitor(x, y)
1621 Compute bitwise and/or operation on x and y.
1622
1623 The results of the evaluation of x and y are converted to integers
1624 before executing the bitwise operation.
1625
1626 Note that both the conversion to integer and the conversion back to
1627 floating point can lose precision. Beware of unexpected results for
1628 large numbers (usually 2^53 and larger).
1629
1630 ceil(expr)
1631 Round the value of expression expr upwards to the nearest integer.
1632 For example, "ceil(1.5)" is "2.0".
1633
1634 clip(x, min, max)
1635 Return the value of x clipped between min and max.
1636
1637 cos(x)
1638 Compute cosine of x.
1639
1640 cosh(x)
1641 Compute hyperbolic cosine of x.
1642
1643 eq(x, y)
1644 Return 1 if x and y are equivalent, 0 otherwise.
1645
1646 exp(x)
1647 Compute exponential of x (with base "e", the Euler's number).
1648
1649 floor(expr)
1650 Round the value of expression expr downwards to the nearest
1651 integer. For example, "floor(-1.5)" is "-2.0".
1652
1653 gauss(x)
1654 Compute Gauss function of x, corresponding to "exp(-x*x/2) /
1655 sqrt(2*PI)".
1656
1657 gcd(x, y)
1658 Return the greatest common divisor of x and y. If both x and y are
1659 0 or either or both are less than zero then behavior is undefined.
1660
1661 gt(x, y)
1662 Return 1 if x is greater than y, 0 otherwise.
1663
1664 gte(x, y)
1665 Return 1 if x is greater than or equal to y, 0 otherwise.
1666
1667 hypot(x, y)
1668 This function is similar to the C function with the same name; it
1669 returns "sqrt(x*x + y*y)", the length of the hypotenuse of a right
1670 triangle with sides of length x and y, or the distance of the point
1671 (x, y) from the origin.
1672
1673 if(x, y)
1674 Evaluate x, and if the result is non-zero return the result of the
1675 evaluation of y, return 0 otherwise.
1676
1677 if(x, y, z)
1678 Evaluate x, and if the result is non-zero return the evaluation
1679 result of y, otherwise the evaluation result of z.
1680
1681 ifnot(x, y)
1682 Evaluate x, and if the result is zero return the result of the
1683 evaluation of y, return 0 otherwise.
1684
1685 ifnot(x, y, z)
1686 Evaluate x, and if the result is zero return the evaluation result
1687 of y, otherwise the evaluation result of z.
1688
1689 isinf(x)
1690 Return 1.0 if x is +/-INFINITY, 0.0 otherwise.
1691
1692 isnan(x)
1693 Return 1.0 if x is NAN, 0.0 otherwise.
1694
1695 ld(var)
1696 Load the value of the internal variable with number var, which was
1697 previously stored with st(var, expr). The function returns the
1698 loaded value.
1699
1700 lerp(x, y, z)
1701 Return linear interpolation between x and y by amount of z.
1702
1703 log(x)
1704 Compute natural logarithm of x.
1705
1706 lt(x, y)
1707 Return 1 if x is lesser than y, 0 otherwise.
1708
1709 lte(x, y)
1710 Return 1 if x is lesser than or equal to y, 0 otherwise.
1711
1712 max(x, y)
1713 Return the maximum between x and y.
1714
1715 min(x, y)
1716 Return the minimum between x and y.
1717
1718 mod(x, y)
1719 Compute the remainder of division of x by y.
1720
1721 not(expr)
1722 Return 1.0 if expr is zero, 0.0 otherwise.
1723
1724 pow(x, y)
1725 Compute the power of x elevated y, it is equivalent to "(x)^(y)".
1726
1727 print(t)
1728 print(t, l)
1729 Print the value of expression t with loglevel l. If l is not
1730 specified then a default log level is used. Returns the value of
1731 the expression printed.
1732
1733 Prints t with loglevel l
1734
1735 random(x)
1736 Return a pseudo random value between 0.0 and 1.0. x is the index of
1737 the internal variable which will be used to save the seed/state.
1738
1739 root(expr, max)
1740 Find an input value for which the function represented by expr with
1741 argument ld(0) is 0 in the interval 0..max.
1742
1743 The expression in expr must denote a continuous function or the
1744 result is undefined.
1745
1746 ld(0) is used to represent the function input value, which means
1747 that the given expression will be evaluated multiple times with
1748 various input values that the expression can access through ld(0).
1749 When the expression evaluates to 0 then the corresponding input
1750 value will be returned.
1751
1752 round(expr)
1753 Round the value of expression expr to the nearest integer. For
1754 example, "round(1.5)" is "2.0".
1755
1756 sgn(x)
1757 Compute sign of x.
1758
1759 sin(x)
1760 Compute sine of x.
1761
1762 sinh(x)
1763 Compute hyperbolic sine of x.
1764
1765 sqrt(expr)
1766 Compute the square root of expr. This is equivalent to "(expr)^.5".
1767
1768 squish(x)
1769 Compute expression "1/(1 + exp(4*x))".
1770
1771 st(var, expr)
1772 Store the value of the expression expr in an internal variable. var
1773 specifies the number of the variable where to store the value, and
1774 it is a value ranging from 0 to 9. The function returns the value
1775 stored in the internal variable. Note, Variables are currently not
1776 shared between expressions.
1777
1778 tan(x)
1779 Compute tangent of x.
1780
1781 tanh(x)
1782 Compute hyperbolic tangent of x.
1783
1784 taylor(expr, x)
1785 taylor(expr, x, id)
1786 Evaluate a Taylor series at x, given an expression representing the
1787 ld(id)-th derivative of a function at 0.
1788
1789 When the series does not converge the result is undefined.
1790
1791 ld(id) is used to represent the derivative order in expr, which
1792 means that the given expression will be evaluated multiple times
1793 with various input values that the expression can access through
1794 ld(id). If id is not specified then 0 is assumed.
1795
1796 Note, when you have the derivatives at y instead of 0,
1797 "taylor(expr, x-y)" can be used.
1798
1799 time(0)
1800 Return the current (wallclock) time in seconds.
1801
1802 trunc(expr)
1803 Round the value of expression expr towards zero to the nearest
1804 integer. For example, "trunc(-1.5)" is "-1.0".
1805
1806 while(cond, expr)
1807 Evaluate expression expr while the expression cond is non-zero, and
1808 returns the value of the last expr evaluation, or NAN if cond was
1809 always false.
1810
1811 The following constants are available:
1812
1813 PI area of the unit disc, approximately 3.14
1814
1815 E exp(1) (Euler's number), approximately 2.718
1816
1817 PHI golden ratio (1+sqrt(5))/2, approximately 1.618
1818
1819 Assuming that an expression is considered "true" if it has a non-zero
1820 value, note that:
1821
1822 "*" works like AND
1823
1824 "+" works like OR
1825
1826 For example the construct:
1827
1828 if (A AND B) then C
1829
1830 is equivalent to:
1831
1832 if(A*B, C)
1833
1834 In your C code, you can extend the list of unary and binary functions,
1835 and define recognized constants, so that they are available for your
1836 expressions.
1837
1838 The evaluator also recognizes the International System unit prefixes.
1839 If 'i' is appended after the prefix, binary prefixes are used, which
1840 are based on powers of 1024 instead of powers of 1000. The 'B' postfix
1841 multiplies the value by 8, and can be appended after a unit prefix or
1842 used alone. This allows using for example 'KB', 'MiB', 'G' and 'B' as
1843 number postfix.
1844
1845 The list of available International System prefixes follows, with
1846 indication of the corresponding powers of 10 and of 2.
1847
1848 y 10^-24 / 2^-80
1849
1850 z 10^-21 / 2^-70
1851
1852 a 10^-18 / 2^-60
1853
1854 f 10^-15 / 2^-50
1855
1856 p 10^-12 / 2^-40
1857
1858 n 10^-9 / 2^-30
1859
1860 u 10^-6 / 2^-20
1861
1862 m 10^-3 / 2^-10
1863
1864 c 10^-2
1865
1866 d 10^-1
1867
1868 h 10^2
1869
1870 k 10^3 / 2^10
1871
1872 K 10^3 / 2^10
1873
1874 M 10^6 / 2^20
1875
1876 G 10^9 / 2^30
1877
1878 T 10^12 / 2^40
1879
1880 P 10^15 / 2^50
1881
1882 E 10^18 / 2^60
1883
1884 Z 10^21 / 2^70
1885
1886 Y 10^24 / 2^80
1887
1889 libavcodec provides some generic global options, which can be set on
1890 all the encoders and decoders. In addition each codec may support so-
1891 called private options, which are specific for a given codec.
1892
1893 Sometimes, a global option may only affect a specific kind of codec,
1894 and may be nonsensical or ignored by another, so you need to be aware
1895 of the meaning of the specified options. Also some options are meant
1896 only for decoding or encoding.
1897
1898 Options may be set by specifying -option value in the FFmpeg tools, or
1899 by setting the value explicitly in the "AVCodecContext" options or
1900 using the libavutil/opt.h API for programmatic use.
1901
1902 The list of supported options follow:
1903
1904 b integer (encoding,audio,video)
1905 Set bitrate in bits/s. Default value is 200K.
1906
1907 ab integer (encoding,audio)
1908 Set audio bitrate (in bits/s). Default value is 128K.
1909
1910 bt integer (encoding,video)
1911 Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
1912 tolerance specifies how far ratecontrol is willing to deviate from
1913 the target average bitrate value. This is not related to min/max
1914 bitrate. Lowering tolerance too much has an adverse effect on
1915 quality.
1916
1917 flags flags (decoding/encoding,audio,video,subtitles)
1918 Set generic flags.
1919
1920 Possible values:
1921
1922 mv4 Use four motion vector by macroblock (mpeg4).
1923
1924 qpel
1925 Use 1/4 pel motion compensation.
1926
1927 loop
1928 Use loop filter.
1929
1930 qscale
1931 Use fixed qscale.
1932
1933 pass1
1934 Use internal 2pass ratecontrol in first pass mode.
1935
1936 pass2
1937 Use internal 2pass ratecontrol in second pass mode.
1938
1939 gray
1940 Only decode/encode grayscale.
1941
1942 psnr
1943 Set error[?] variables during encoding.
1944
1945 truncated
1946 Input bitstream might be randomly truncated.
1947
1948 drop_changed
1949 Don't output frames whose parameters differ from first decoded
1950 frame in stream. Error AVERROR_INPUT_CHANGED is returned when
1951 a frame is dropped.
1952
1953 ildct
1954 Use interlaced DCT.
1955
1956 low_delay
1957 Force low delay.
1958
1959 global_header
1960 Place global headers in extradata instead of every keyframe.
1961
1962 bitexact
1963 Only write platform-, build- and time-independent data. (except
1964 (I)DCT). This ensures that file and data checksums are
1965 reproducible and match between platforms. Its primary use is
1966 for regression testing.
1967
1968 aic Apply H263 advanced intra coding / mpeg4 ac prediction.
1969
1970 ilme
1971 Apply interlaced motion estimation.
1972
1973 cgop
1974 Use closed gop.
1975
1976 output_corrupt
1977 Output even potentially corrupted frames.
1978
1979 time_base rational number
1980 Set codec time base.
1981
1982 It is the fundamental unit of time (in seconds) in terms of which
1983 frame timestamps are represented. For fixed-fps content, timebase
1984 should be "1 / frame_rate" and timestamp increments should be
1985 identically 1.
1986
1987 g integer (encoding,video)
1988 Set the group of picture (GOP) size. Default value is 12.
1989
1990 ar integer (decoding/encoding,audio)
1991 Set audio sampling rate (in Hz).
1992
1993 ac integer (decoding/encoding,audio)
1994 Set number of audio channels.
1995
1996 cutoff integer (encoding,audio)
1997 Set cutoff bandwidth. (Supported only by selected encoders, see
1998 their respective documentation sections.)
1999
2000 frame_size integer (encoding,audio)
2001 Set audio frame size.
2002
2003 Each submitted frame except the last must contain exactly
2004 frame_size samples per channel. May be 0 when the codec has
2005 CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is
2006 not restricted. It is set by some decoders to indicate constant
2007 frame size.
2008
2009 frame_number integer
2010 Set the frame number.
2011
2012 delay integer
2013 qcomp float (encoding,video)
2014 Set video quantizer scale compression (VBR). It is used as a
2015 constant in the ratecontrol equation. Recommended range for default
2016 rc_eq: 0.0-1.0.
2017
2018 qblur float (encoding,video)
2019 Set video quantizer scale blur (VBR).
2020
2021 qmin integer (encoding,video)
2022 Set min video quantizer scale (VBR). Must be included between -1
2023 and 69, default value is 2.
2024
2025 qmax integer (encoding,video)
2026 Set max video quantizer scale (VBR). Must be included between -1
2027 and 1024, default value is 31.
2028
2029 qdiff integer (encoding,video)
2030 Set max difference between the quantizer scale (VBR).
2031
2032 bf integer (encoding,video)
2033 Set max number of B frames between non-B-frames.
2034
2035 Must be an integer between -1 and 16. 0 means that B-frames are
2036 disabled. If a value of -1 is used, it will choose an automatic
2037 value depending on the encoder.
2038
2039 Default value is 0.
2040
2041 b_qfactor float (encoding,video)
2042 Set qp factor between P and B frames.
2043
2044 codec_tag integer
2045 bug flags (decoding,video)
2046 Workaround not auto detected encoder bugs.
2047
2048 Possible values:
2049
2050 autodetect
2051 xvid_ilace
2052 Xvid interlacing bug (autodetected if fourcc==XVIX)
2053
2054 ump4
2055 (autodetected if fourcc==UMP4)
2056
2057 no_padding
2058 padding bug (autodetected)
2059
2060 amv
2061 qpel_chroma
2062 std_qpel
2063 old standard qpel (autodetected per fourcc/version)
2064
2065 qpel_chroma2
2066 direct_blocksize
2067 direct-qpel-blocksize bug (autodetected per fourcc/version)
2068
2069 edge
2070 edge padding bug (autodetected per fourcc/version)
2071
2072 hpel_chroma
2073 dc_clip
2074 ms Workaround various bugs in microsoft broken decoders.
2075
2076 trunc
2077 trancated frames
2078
2079 strict integer (decoding/encoding,audio,video)
2080 Specify how strictly to follow the standards.
2081
2082 Possible values:
2083
2084 very
2085 strictly conform to an older more strict version of the spec or
2086 reference software
2087
2088 strict
2089 strictly conform to all the things in the spec no matter what
2090 consequences
2091
2092 normal
2093 unofficial
2094 allow unofficial extensions
2095
2096 experimental
2097 allow non standardized experimental things, experimental
2098 (unfinished/work in progress/not well tested) decoders and
2099 encoders. Note: experimental decoders can pose a security
2100 risk, do not use this for decoding untrusted input.
2101
2102 b_qoffset float (encoding,video)
2103 Set QP offset between P and B frames.
2104
2105 err_detect flags (decoding,audio,video)
2106 Set error detection flags.
2107
2108 Possible values:
2109
2110 crccheck
2111 verify embedded CRCs
2112
2113 bitstream
2114 detect bitstream specification deviations
2115
2116 buffer
2117 detect improper bitstream length
2118
2119 explode
2120 abort decoding on minor error detection
2121
2122 ignore_err
2123 ignore decoding errors, and continue decoding. This is useful
2124 if you want to analyze the content of a video and thus want
2125 everything to be decoded no matter what. This option will not
2126 result in a video that is pleasing to watch in case of errors.
2127
2128 careful
2129 consider things that violate the spec and have not been seen in
2130 the wild as errors
2131
2132 compliant
2133 consider all spec non compliancies as errors
2134
2135 aggressive
2136 consider things that a sane encoder should not do as an error
2137
2138 has_b_frames integer
2139 block_align integer
2140 rc_override_count integer
2141 maxrate integer (encoding,audio,video)
2142 Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
2143
2144 minrate integer (encoding,audio,video)
2145 Set min bitrate tolerance (in bits/s). Most useful in setting up a
2146 CBR encode. It is of little use elsewise.
2147
2148 bufsize integer (encoding,audio,video)
2149 Set ratecontrol buffer size (in bits).
2150
2151 i_qfactor float (encoding,video)
2152 Set QP factor between P and I frames.
2153
2154 i_qoffset float (encoding,video)
2155 Set QP offset between P and I frames.
2156
2157 dct integer (encoding,video)
2158 Set DCT algorithm.
2159
2160 Possible values:
2161
2162 auto
2163 autoselect a good one (default)
2164
2165 fastint
2166 fast integer
2167
2168 int accurate integer
2169
2170 mmx
2171 altivec
2172 faan
2173 floating point AAN DCT
2174
2175 lumi_mask float (encoding,video)
2176 Compress bright areas stronger than medium ones.
2177
2178 tcplx_mask float (encoding,video)
2179 Set temporal complexity masking.
2180
2181 scplx_mask float (encoding,video)
2182 Set spatial complexity masking.
2183
2184 p_mask float (encoding,video)
2185 Set inter masking.
2186
2187 dark_mask float (encoding,video)
2188 Compress dark areas stronger than medium ones.
2189
2190 idct integer (decoding/encoding,video)
2191 Select IDCT implementation.
2192
2193 Possible values:
2194
2195 auto
2196 int
2197 simple
2198 simplemmx
2199 simpleauto
2200 Automatically pick a IDCT compatible with the simple one
2201
2202 arm
2203 altivec
2204 sh4
2205 simplearm
2206 simplearmv5te
2207 simplearmv6
2208 simpleneon
2209 xvid
2210 faani
2211 floating point AAN IDCT
2212
2213 slice_count integer
2214 ec flags (decoding,video)
2215 Set error concealment strategy.
2216
2217 Possible values:
2218
2219 guess_mvs
2220 iterative motion vector (MV) search (slow)
2221
2222 deblock
2223 use strong deblock filter for damaged MBs
2224
2225 favor_inter
2226 favor predicting from the previous frame instead of the current
2227
2228 bits_per_coded_sample integer
2229 aspect rational number (encoding,video)
2230 Set sample aspect ratio.
2231
2232 sar rational number (encoding,video)
2233 Set sample aspect ratio. Alias to aspect.
2234
2235 debug flags (decoding/encoding,audio,video,subtitles)
2236 Print specific debug info.
2237
2238 Possible values:
2239
2240 pict
2241 picture info
2242
2243 rc rate control
2244
2245 bitstream
2246 mb_type
2247 macroblock (MB) type
2248
2249 qp per-block quantization parameter (QP)
2250
2251 dct_coeff
2252 green_metadata
2253 display complexity metadata for the upcoming frame, GoP or for
2254 a given duration.
2255
2256 skip
2257 startcode
2258 er error recognition
2259
2260 mmco
2261 memory management control operations (H.264)
2262
2263 bugs
2264 buffers
2265 picture buffer allocations
2266
2267 thread_ops
2268 threading operations
2269
2270 nomc
2271 skip motion compensation
2272
2273 cmp integer (encoding,video)
2274 Set full pel me compare function.
2275
2276 Possible values:
2277
2278 sad sum of absolute differences, fast (default)
2279
2280 sse sum of squared errors
2281
2282 satd
2283 sum of absolute Hadamard transformed differences
2284
2285 dct sum of absolute DCT transformed differences
2286
2287 psnr
2288 sum of squared quantization errors (avoid, low quality)
2289
2290 bit number of bits needed for the block
2291
2292 rd rate distortion optimal, slow
2293
2294 zero
2295 0
2296
2297 vsad
2298 sum of absolute vertical differences
2299
2300 vsse
2301 sum of squared vertical differences
2302
2303 nsse
2304 noise preserving sum of squared differences
2305
2306 w53 5/3 wavelet, only used in snow
2307
2308 w97 9/7 wavelet, only used in snow
2309
2310 dctmax
2311 chroma
2312 subcmp integer (encoding,video)
2313 Set sub pel me compare function.
2314
2315 Possible values:
2316
2317 sad sum of absolute differences, fast (default)
2318
2319 sse sum of squared errors
2320
2321 satd
2322 sum of absolute Hadamard transformed differences
2323
2324 dct sum of absolute DCT transformed differences
2325
2326 psnr
2327 sum of squared quantization errors (avoid, low quality)
2328
2329 bit number of bits needed for the block
2330
2331 rd rate distortion optimal, slow
2332
2333 zero
2334 0
2335
2336 vsad
2337 sum of absolute vertical differences
2338
2339 vsse
2340 sum of squared vertical differences
2341
2342 nsse
2343 noise preserving sum of squared differences
2344
2345 w53 5/3 wavelet, only used in snow
2346
2347 w97 9/7 wavelet, only used in snow
2348
2349 dctmax
2350 chroma
2351 mbcmp integer (encoding,video)
2352 Set macroblock compare function.
2353
2354 Possible values:
2355
2356 sad sum of absolute differences, fast (default)
2357
2358 sse sum of squared errors
2359
2360 satd
2361 sum of absolute Hadamard transformed differences
2362
2363 dct sum of absolute DCT transformed differences
2364
2365 psnr
2366 sum of squared quantization errors (avoid, low quality)
2367
2368 bit number of bits needed for the block
2369
2370 rd rate distortion optimal, slow
2371
2372 zero
2373 0
2374
2375 vsad
2376 sum of absolute vertical differences
2377
2378 vsse
2379 sum of squared vertical differences
2380
2381 nsse
2382 noise preserving sum of squared differences
2383
2384 w53 5/3 wavelet, only used in snow
2385
2386 w97 9/7 wavelet, only used in snow
2387
2388 dctmax
2389 chroma
2390 ildctcmp integer (encoding,video)
2391 Set interlaced dct compare function.
2392
2393 Possible values:
2394
2395 sad sum of absolute differences, fast (default)
2396
2397 sse sum of squared errors
2398
2399 satd
2400 sum of absolute Hadamard transformed differences
2401
2402 dct sum of absolute DCT transformed differences
2403
2404 psnr
2405 sum of squared quantization errors (avoid, low quality)
2406
2407 bit number of bits needed for the block
2408
2409 rd rate distortion optimal, slow
2410
2411 zero
2412 0
2413
2414 vsad
2415 sum of absolute vertical differences
2416
2417 vsse
2418 sum of squared vertical differences
2419
2420 nsse
2421 noise preserving sum of squared differences
2422
2423 w53 5/3 wavelet, only used in snow
2424
2425 w97 9/7 wavelet, only used in snow
2426
2427 dctmax
2428 chroma
2429 dia_size integer (encoding,video)
2430 Set diamond type & size for motion estimation.
2431
2432 (1024, INT_MAX)
2433 full motion estimation(slowest)
2434
2435 (768, 1024]
2436 umh motion estimation
2437
2438 (512, 768]
2439 hex motion estimation
2440
2441 (256, 512]
2442 l2s diamond motion estimation
2443
2444 [2,256]
2445 var diamond motion estimation
2446
2447 (-1, 2)
2448 small diamond motion estimation
2449
2450 -1 funny diamond motion estimation
2451
2452 (INT_MIN, -1)
2453 sab diamond motion estimation
2454
2455 last_pred integer (encoding,video)
2456 Set amount of motion predictors from the previous frame.
2457
2458 precmp integer (encoding,video)
2459 Set pre motion estimation compare function.
2460
2461 Possible values:
2462
2463 sad sum of absolute differences, fast (default)
2464
2465 sse sum of squared errors
2466
2467 satd
2468 sum of absolute Hadamard transformed differences
2469
2470 dct sum of absolute DCT transformed differences
2471
2472 psnr
2473 sum of squared quantization errors (avoid, low quality)
2474
2475 bit number of bits needed for the block
2476
2477 rd rate distortion optimal, slow
2478
2479 zero
2480 0
2481
2482 vsad
2483 sum of absolute vertical differences
2484
2485 vsse
2486 sum of squared vertical differences
2487
2488 nsse
2489 noise preserving sum of squared differences
2490
2491 w53 5/3 wavelet, only used in snow
2492
2493 w97 9/7 wavelet, only used in snow
2494
2495 dctmax
2496 chroma
2497 pre_dia_size integer (encoding,video)
2498 Set diamond type & size for motion estimation pre-pass.
2499
2500 subq integer (encoding,video)
2501 Set sub pel motion estimation quality.
2502
2503 me_range integer (encoding,video)
2504 Set limit motion vectors range (1023 for DivX player).
2505
2506 global_quality integer (encoding,audio,video)
2507 slice_flags integer
2508 mbd integer (encoding,video)
2509 Set macroblock decision algorithm (high quality mode).
2510
2511 Possible values:
2512
2513 simple
2514 use mbcmp (default)
2515
2516 bits
2517 use fewest bits
2518
2519 rd use best rate distortion
2520
2521 rc_init_occupancy integer (encoding,video)
2522 Set number of bits which should be loaded into the rc buffer before
2523 decoding starts.
2524
2525 flags2 flags (decoding/encoding,audio,video,subtitles)
2526 Possible values:
2527
2528 fast
2529 Allow non spec compliant speedup tricks.
2530
2531 noout
2532 Skip bitstream encoding.
2533
2534 ignorecrop
2535 Ignore cropping information from sps.
2536
2537 local_header
2538 Place global headers at every keyframe instead of in extradata.
2539
2540 chunks
2541 Frame data might be split into multiple chunks.
2542
2543 showall
2544 Show all frames before the first keyframe.
2545
2546 export_mvs
2547 Export motion vectors into frame side-data (see
2548 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
2549 also doc/examples/export_mvs.c.
2550
2551 skip_manual
2552 Do not skip samples and export skip information as frame side
2553 data.
2554
2555 ass_ro_flush_noop
2556 Do not reset ASS ReadOrder field on flush.
2557
2558 icc_profiles
2559 Generate/parse embedded ICC profiles from/to colorimetry tags.
2560
2561 export_side_data flags (decoding/encoding,audio,video,subtitles)
2562 Possible values:
2563
2564 mvs Export motion vectors into frame side-data (see
2565 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
2566 also doc/examples/export_mvs.c.
2567
2568 prft
2569 Export encoder Producer Reference Time into packet side-data
2570 (see "AV_PKT_DATA_PRFT") for codecs that support it.
2571
2572 venc_params
2573 Export video encoding parameters through frame side data (see
2574 "AV_FRAME_DATA_VIDEO_ENC_PARAMS") for codecs that support it.
2575 At present, those are H.264 and VP9.
2576
2577 film_grain
2578 Export film grain parameters through frame side data (see
2579 "AV_FRAME_DATA_FILM_GRAIN_PARAMS"). Supported at present by
2580 AV1 decoders.
2581
2582 threads integer (decoding/encoding,video)
2583 Set the number of threads to be used, in case the selected codec
2584 implementation supports multi-threading.
2585
2586 Possible values:
2587
2588 auto, 0
2589 automatically select the number of threads to set
2590
2591 Default value is auto.
2592
2593 dc integer (encoding,video)
2594 Set intra_dc_precision.
2595
2596 nssew integer (encoding,video)
2597 Set nsse weight.
2598
2599 skip_top integer (decoding,video)
2600 Set number of macroblock rows at the top which are skipped.
2601
2602 skip_bottom integer (decoding,video)
2603 Set number of macroblock rows at the bottom which are skipped.
2604
2605 profile integer (encoding,audio,video)
2606 Set encoder codec profile. Default value is unknown. Encoder
2607 specific profiles are documented in the relevant encoder
2608 documentation.
2609
2610 level integer (encoding,audio,video)
2611 Possible values:
2612
2613 unknown
2614 lowres integer (decoding,audio,video)
2615 Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
2616
2617 mblmin integer (encoding,video)
2618 Set min macroblock lagrange factor (VBR).
2619
2620 mblmax integer (encoding,video)
2621 Set max macroblock lagrange factor (VBR).
2622
2623 skip_loop_filter integer (decoding,video)
2624 skip_idct integer (decoding,video)
2625 skip_frame integer (decoding,video)
2626 Make decoder discard processing depending on the frame type
2627 selected by the option value.
2628
2629 skip_loop_filter skips frame loop filtering, skip_idct skips frame
2630 IDCT/dequantization, skip_frame skips decoding.
2631
2632 Possible values:
2633
2634 none
2635 Discard no frame.
2636
2637 default
2638 Discard useless frames like 0-sized frames.
2639
2640 noref
2641 Discard all non-reference frames.
2642
2643 bidir
2644 Discard all bidirectional frames.
2645
2646 nokey
2647 Discard all frames excepts keyframes.
2648
2649 nointra
2650 Discard all frames except I frames.
2651
2652 all Discard all frames.
2653
2654 Default value is default.
2655
2656 bidir_refine integer (encoding,video)
2657 Refine the two motion vectors used in bidirectional macroblocks.
2658
2659 keyint_min integer (encoding,video)
2660 Set minimum interval between IDR-frames.
2661
2662 refs integer (encoding,video)
2663 Set reference frames to consider for motion compensation.
2664
2665 trellis integer (encoding,audio,video)
2666 Set rate-distortion optimal quantization.
2667
2668 mv0_threshold integer (encoding,video)
2669 compression_level integer (encoding,audio,video)
2670 bits_per_raw_sample integer
2671 channel_layout integer (decoding/encoding,audio)
2672 Possible values:
2673
2674 request_channel_layout integer (decoding,audio)
2675 Possible values:
2676
2677 rc_max_vbv_use float (encoding,video)
2678 rc_min_vbv_use float (encoding,video)
2679 ticks_per_frame integer (decoding/encoding,audio,video)
2680 color_primaries integer (decoding/encoding,video)
2681 Possible values:
2682
2683 bt709
2684 BT.709
2685
2686 bt470m
2687 BT.470 M
2688
2689 bt470bg
2690 BT.470 BG
2691
2692 smpte170m
2693 SMPTE 170 M
2694
2695 smpte240m
2696 SMPTE 240 M
2697
2698 film
2699 Film
2700
2701 bt2020
2702 BT.2020
2703
2704 smpte428
2705 smpte428_1
2706 SMPTE ST 428-1
2707
2708 smpte431
2709 SMPTE 431-2
2710
2711 smpte432
2712 SMPTE 432-1
2713
2714 jedec-p22
2715 JEDEC P22
2716
2717 color_trc integer (decoding/encoding,video)
2718 Possible values:
2719
2720 bt709
2721 BT.709
2722
2723 gamma22
2724 BT.470 M
2725
2726 gamma28
2727 BT.470 BG
2728
2729 smpte170m
2730 SMPTE 170 M
2731
2732 smpte240m
2733 SMPTE 240 M
2734
2735 linear
2736 Linear
2737
2738 log
2739 log100
2740 Log
2741
2742 log_sqrt
2743 log316
2744 Log square root
2745
2746 iec61966_2_4
2747 iec61966-2-4
2748 IEC 61966-2-4
2749
2750 bt1361
2751 bt1361e
2752 BT.1361
2753
2754 iec61966_2_1
2755 iec61966-2-1
2756 IEC 61966-2-1
2757
2758 bt2020_10
2759 bt2020_10bit
2760 BT.2020 - 10 bit
2761
2762 bt2020_12
2763 bt2020_12bit
2764 BT.2020 - 12 bit
2765
2766 smpte2084
2767 SMPTE ST 2084
2768
2769 smpte428
2770 smpte428_1
2771 SMPTE ST 428-1
2772
2773 arib-std-b67
2774 ARIB STD-B67
2775
2776 colorspace integer (decoding/encoding,video)
2777 Possible values:
2778
2779 rgb RGB
2780
2781 bt709
2782 BT.709
2783
2784 fcc FCC
2785
2786 bt470bg
2787 BT.470 BG
2788
2789 smpte170m
2790 SMPTE 170 M
2791
2792 smpte240m
2793 SMPTE 240 M
2794
2795 ycocg
2796 YCOCG
2797
2798 bt2020nc
2799 bt2020_ncl
2800 BT.2020 NCL
2801
2802 bt2020c
2803 bt2020_cl
2804 BT.2020 CL
2805
2806 smpte2085
2807 SMPTE 2085
2808
2809 chroma-derived-nc
2810 Chroma-derived NCL
2811
2812 chroma-derived-c
2813 Chroma-derived CL
2814
2815 ictcp
2816 ICtCp
2817
2818 color_range integer (decoding/encoding,video)
2819 If used as input parameter, it serves as a hint to the decoder,
2820 which color_range the input has. Possible values:
2821
2822 tv
2823 mpeg
2824 MPEG (219*2^(n-8))
2825
2826 pc
2827 jpeg
2828 JPEG (2^n-1)
2829
2830 chroma_sample_location integer (decoding/encoding,video)
2831 Possible values:
2832
2833 left
2834 center
2835 topleft
2836 top
2837 bottomleft
2838 bottom
2839 log_level_offset integer
2840 Set the log level offset.
2841
2842 slices integer (encoding,video)
2843 Number of slices, used in parallelized encoding.
2844
2845 thread_type flags (decoding/encoding,video)
2846 Select which multithreading methods to use.
2847
2848 Use of frame will increase decoding delay by one frame per thread,
2849 so clients which cannot provide future frames should not use it.
2850
2851 Possible values:
2852
2853 slice
2854 Decode more than one part of a single frame at once.
2855
2856 Multithreading using slices works only when the video was
2857 encoded with slices.
2858
2859 frame
2860 Decode more than one frame at once.
2861
2862 Default value is slice+frame.
2863
2864 audio_service_type integer (encoding,audio)
2865 Set audio service type.
2866
2867 Possible values:
2868
2869 ma Main Audio Service
2870
2871 ef Effects
2872
2873 vi Visually Impaired
2874
2875 hi Hearing Impaired
2876
2877 di Dialogue
2878
2879 co Commentary
2880
2881 em Emergency
2882
2883 vo Voice Over
2884
2885 ka Karaoke
2886
2887 request_sample_fmt sample_fmt (decoding,audio)
2888 Set sample format audio decoders should prefer. Default value is
2889 "none".
2890
2891 pkt_timebase rational number
2892 sub_charenc encoding (decoding,subtitles)
2893 Set the input subtitles character encoding.
2894
2895 field_order field_order (video)
2896 Set/override the field order of the video. Possible values:
2897
2898 progressive
2899 Progressive video
2900
2901 tt Interlaced video, top field coded and displayed first
2902
2903 bb Interlaced video, bottom field coded and displayed first
2904
2905 tb Interlaced video, top coded first, bottom displayed first
2906
2907 bt Interlaced video, bottom coded first, top displayed first
2908
2909 skip_alpha bool (decoding,video)
2910 Set to 1 to disable processing alpha (transparency). This works
2911 like the gray flag in the flags option which skips chroma
2912 information instead of alpha. Default is 0.
2913
2914 codec_whitelist list (input)
2915 "," separated list of allowed decoders. By default all are allowed.
2916
2917 dump_separator string (input)
2918 Separator used to separate the fields printed on the command line
2919 about the Stream parameters. For example, to separate the fields
2920 with newlines and indentation:
2921
2922 ffprobe -dump_separator "
2923 " -i ~/videos/matrixbench_mpeg2.mpg
2924
2925 max_pixels integer (decoding/encoding,video)
2926 Maximum number of pixels per image. This value can be used to avoid
2927 out of memory failures due to large images.
2928
2929 apply_cropping bool (decoding,video)
2930 Enable cropping if cropping parameters are multiples of the
2931 required alignment for the left and top parameters. If the
2932 alignment is not met the cropping will be partially applied to
2933 maintain alignment. Default is 1 (enabled). Note: The required
2934 alignment depends on if "AV_CODEC_FLAG_UNALIGNED" is set and the
2935 CPU. "AV_CODEC_FLAG_UNALIGNED" cannot be changed from the command
2936 line. Also hardware decoders will not apply left/top Cropping.
2937
2939 Decoders are configured elements in FFmpeg which allow the decoding of
2940 multimedia streams.
2941
2942 When you configure your FFmpeg build, all the supported native decoders
2943 are enabled by default. Decoders requiring an external library must be
2944 enabled manually via the corresponding "--enable-lib" option. You can
2945 list all available decoders using the configure option
2946 "--list-decoders".
2947
2948 You can disable all the decoders with the configure option
2949 "--disable-decoders" and selectively enable / disable single decoders
2950 with the options "--enable-decoder=DECODER" /
2951 "--disable-decoder=DECODER".
2952
2953 The option "-decoders" of the ff* tools will display the list of
2954 enabled decoders.
2955
2957 A description of some of the currently available video decoders
2958 follows.
2959
2960 av1
2961 AOMedia Video 1 (AV1) decoder.
2962
2963 Options
2964
2965 operating_point
2966 Select an operating point of a scalable AV1 bitstream (0 - 31).
2967 Default is 0.
2968
2969 rawvideo
2970 Raw video decoder.
2971
2972 This decoder decodes rawvideo streams.
2973
2974 Options
2975
2976 top top_field_first
2977 Specify the assumed field type of the input video.
2978
2979 -1 the video is assumed to be progressive (default)
2980
2981 0 bottom-field-first is assumed
2982
2983 1 top-field-first is assumed
2984
2985 libdav1d
2986 dav1d AV1 decoder.
2987
2988 libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
2989 Requires the presence of the libdav1d headers and library during
2990 configuration. You need to explicitly configure the build with
2991 "--enable-libdav1d".
2992
2993 Options
2994
2995 The following options are supported by the libdav1d wrapper.
2996
2997 framethreads
2998 Set amount of frame threads to use during decoding. The default
2999 value is 0 (autodetect). This option is deprecated for libdav1d >=
3000 1.0 and will be removed in the future. Use the option
3001 "max_frame_delay" and the global option "threads" instead.
3002
3003 tilethreads
3004 Set amount of tile threads to use during decoding. The default
3005 value is 0 (autodetect). This option is deprecated for libdav1d >=
3006 1.0 and will be removed in the future. Use the global option
3007 "threads" instead.
3008
3009 max_frame_delay
3010 Set max amount of frames the decoder may buffer internally. The
3011 default value is 0 (autodetect).
3012
3013 filmgrain
3014 Apply film grain to the decoded video if present in the bitstream.
3015 Defaults to the internal default of the library. This option is
3016 deprecated and will be removed in the future. See the global option
3017 "export_side_data" to export Film Grain parameters instead of
3018 applying it.
3019
3020 oppoint
3021 Select an operating point of a scalable AV1 bitstream (0 - 31).
3022 Defaults to the internal default of the library.
3023
3024 alllayers
3025 Output all spatial layers of a scalable AV1 bitstream. The default
3026 value is false.
3027
3028 libdavs2
3029 AVS2-P2/IEEE1857.4 video decoder wrapper.
3030
3031 This decoder allows libavcodec to decode AVS2 streams with davs2
3032 library.
3033
3034 libuavs3d
3035 AVS3-P2/IEEE1857.10 video decoder.
3036
3037 libuavs3d allows libavcodec to decode AVS3 streams. Requires the
3038 presence of the libuavs3d headers and library during configuration.
3039 You need to explicitly configure the build with "--enable-libuavs3d".
3040
3041 Options
3042
3043 The following option is supported by the libuavs3d wrapper.
3044
3045 frame_threads
3046 Set amount of frame threads to use during decoding. The default
3047 value is 0 (autodetect).
3048
3049 QSV Decoders
3050 The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC,
3051 JPEG/MJPEG, VP8, VP9, AV1).
3052
3053 Common Options
3054
3055 The following options are supported by all qsv decoders.
3056
3057 async_depth
3058 Internal parallelization depth, the higher the value the higher the
3059 latency.
3060
3061 gpu_copy
3062 A GPU-accelerated copy between video and system memory
3063
3064 default
3065 on
3066 off
3067
3068 HEVC Options
3069
3070 Extra options for hevc_qsv.
3071
3072 load_plugin
3073 A user plugin to load in an internal session
3074
3075 none
3076 hevc_sw
3077 hevc_hw
3078 load_plugins
3079 A :-separate list of hexadecimal plugin UIDs to load in an internal
3080 session
3081
3082 v210
3083 Uncompressed 4:2:2 10-bit decoder.
3084
3085 Options
3086
3087 custom_stride
3088 Set the line size of the v210 data in bytes. The default value is 0
3089 (autodetect). You can use the special -1 value for a strideless
3090 v210 as seen in BOXX files.
3091
3093 A description of some of the currently available audio decoders
3094 follows.
3095
3096 ac3
3097 AC-3 audio decoder.
3098
3099 This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as
3100 well as the undocumented RealAudio 3 (a.k.a. dnet).
3101
3102 AC-3 Decoder Options
3103
3104 -drc_scale value
3105 Dynamic Range Scale Factor. The factor to apply to dynamic range
3106 values from the AC-3 stream. This factor is applied exponentially.
3107 The default value is 1. There are 3 notable scale factor ranges:
3108
3109 drc_scale == 0
3110 DRC disabled. Produces full range audio.
3111
3112 0 < drc_scale <= 1
3113 DRC enabled. Applies a fraction of the stream DRC value.
3114 Audio reproduction is between full range and full compression.
3115
3116 drc_scale > 1
3117 DRC enabled. Applies drc_scale asymmetrically. Loud sounds are
3118 fully compressed. Soft sounds are enhanced.
3119
3120 flac
3121 FLAC audio decoder.
3122
3123 This decoder aims to implement the complete FLAC specification from
3124 Xiph.
3125
3126 FLAC Decoder options
3127
3128 -use_buggy_lpc
3129 The lavc FLAC encoder used to produce buggy streams with high lpc
3130 values (like the default value). This option makes it possible to
3131 decode such streams correctly by using lavc's old buggy lpc logic
3132 for decoding.
3133
3134 ffwavesynth
3135 Internal wave synthesizer.
3136
3137 This decoder generates wave patterns according to predefined sequences.
3138 Its use is purely internal and the format of the data it accepts is not
3139 publicly documented.
3140
3141 libcelt
3142 libcelt decoder wrapper.
3143
3144 libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio
3145 codec. Requires the presence of the libcelt headers and library during
3146 configuration. You need to explicitly configure the build with
3147 "--enable-libcelt".
3148
3149 libgsm
3150 libgsm decoder wrapper.
3151
3152 libgsm allows libavcodec to decode the GSM full rate audio codec.
3153 Requires the presence of the libgsm headers and library during
3154 configuration. You need to explicitly configure the build with
3155 "--enable-libgsm".
3156
3157 This decoder supports both the ordinary GSM and the Microsoft variant.
3158
3159 libilbc
3160 libilbc decoder wrapper.
3161
3162 libilbc allows libavcodec to decode the Internet Low Bitrate Codec
3163 (iLBC) audio codec. Requires the presence of the libilbc headers and
3164 library during configuration. You need to explicitly configure the
3165 build with "--enable-libilbc".
3166
3167 Options
3168
3169 The following option is supported by the libilbc wrapper.
3170
3171 enhance
3172 Enable the enhancement of the decoded audio when set to 1. The
3173 default value is 0 (disabled).
3174
3175 libopencore-amrnb
3176 libopencore-amrnb decoder wrapper.
3177
3178 libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
3179 Narrowband audio codec. Using it requires the presence of the
3180 libopencore-amrnb headers and library during configuration. You need to
3181 explicitly configure the build with "--enable-libopencore-amrnb".
3182
3183 An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
3184 without this library.
3185
3186 libopencore-amrwb
3187 libopencore-amrwb decoder wrapper.
3188
3189 libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
3190 Wideband audio codec. Using it requires the presence of the
3191 libopencore-amrwb headers and library during configuration. You need to
3192 explicitly configure the build with "--enable-libopencore-amrwb".
3193
3194 An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
3195 without this library.
3196
3197 libopus
3198 libopus decoder wrapper.
3199
3200 libopus allows libavcodec to decode the Opus Interactive Audio Codec.
3201 Requires the presence of the libopus headers and library during
3202 configuration. You need to explicitly configure the build with
3203 "--enable-libopus".
3204
3205 An FFmpeg native decoder for Opus exists, so users can decode Opus
3206 without this library.
3207
3209 libaribb24
3210 ARIB STD-B24 caption decoder.
3211
3212 Implements profiles A and C of the ARIB STD-B24 standard.
3213
3214 libaribb24 Decoder Options
3215
3216 -aribb24-base-path path
3217 Sets the base path for the libaribb24 library. This is utilized for
3218 reading of configuration files (for custom unicode conversions),
3219 and for dumping of non-text symbols as images under that location.
3220
3221 Unset by default.
3222
3223 -aribb24-skip-ruby-text boolean
3224 Tells the decoder wrapper to skip text blocks that contain half-
3225 height ruby text.
3226
3227 Enabled by default.
3228
3229 dvbsub
3230 Options
3231
3232 compute_clut
3233 -2 Compute clut once if no matching CLUT is in the stream.
3234
3235 -1 Compute clut if no matching CLUT is in the stream.
3236
3237 0 Never compute CLUT
3238
3239 1 Always compute CLUT and override the one provided in the
3240 stream.
3241
3242 dvb_substream
3243 Selects the dvb substream, or all substreams if -1 which is
3244 default.
3245
3246 dvdsub
3247 This codec decodes the bitmap subtitles used in DVDs; the same
3248 subtitles can also be found in VobSub file pairs and in some Matroska
3249 files.
3250
3251 Options
3252
3253 palette
3254 Specify the global palette used by the bitmaps. When stored in
3255 VobSub, the palette is normally specified in the index file; in
3256 Matroska, the palette is stored in the codec extra-data in the same
3257 format as in VobSub. In DVDs, the palette is stored in the IFO
3258 file, and therefore not available when reading from dumped VOB
3259 files.
3260
3261 The format for this option is a string containing 16 24-bits
3262 hexadecimal numbers (without 0x prefix) separated by commas, for
3263 example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
3264 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
3265 7c127b".
3266
3267 ifo_palette
3268 Specify the IFO file from which the global palette is obtained.
3269 (experimental)
3270
3271 forced_subs_only
3272 Only decode subtitle entries marked as forced. Some titles have
3273 forced and non-forced subtitles in the same track. Setting this
3274 flag to 1 will only keep the forced subtitles. Default value is 0.
3275
3276 libzvbi-teletext
3277 Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
3278 subtitles. Requires the presence of the libzvbi headers and library
3279 during configuration. You need to explicitly configure the build with
3280 "--enable-libzvbi".
3281
3282 Options
3283
3284 txt_page
3285 List of teletext page numbers to decode. Pages that do not match
3286 the specified list are dropped. You may use the special "*" string
3287 to match all pages, or "subtitle" to match all subtitle pages.
3288 Default value is *.
3289
3290 txt_default_region
3291 Set default character set used for decoding, a value between 0 and
3292 87 (see ETS 300 706, Section 15, Table 32). Default value is -1,
3293 which does not override the libzvbi default. This option is needed
3294 for some legacy level 1.0 transmissions which cannot signal the
3295 proper charset.
3296
3297 txt_chop_top
3298 Discards the top teletext line. Default value is 1.
3299
3300 txt_format
3301 Specifies the format of the decoded subtitles.
3302
3303 bitmap
3304 The default format, you should use this for teletext pages,
3305 because certain graphics and colors cannot be expressed in
3306 simple text or even ASS.
3307
3308 text
3309 Simple text based output without formatting.
3310
3311 ass Formatted ASS output, subtitle pages and teletext pages are
3312 returned in different styles, subtitle pages are stripped down
3313 to text, but an effort is made to keep the text alignment and
3314 the formatting.
3315
3316 txt_left
3317 X offset of generated bitmaps, default is 0.
3318
3319 txt_top
3320 Y offset of generated bitmaps, default is 0.
3321
3322 txt_chop_spaces
3323 Chops leading and trailing spaces and removes empty lines from the
3324 generated text. This option is useful for teletext based subtitles
3325 where empty spaces may be present at the start or at the end of the
3326 lines or empty lines may be present between the subtitle lines
3327 because of double-sized teletext characters. Default value is 1.
3328
3329 txt_duration
3330 Sets the display duration of the decoded teletext pages or
3331 subtitles in milliseconds. Default value is -1 which means infinity
3332 or until the next subtitle event comes.
3333
3334 txt_transparent
3335 Force transparent background of the generated teletext bitmaps.
3336 Default value is 0 which means an opaque background.
3337
3338 txt_opacity
3339 Sets the opacity (0-255) of the teletext background. If
3340 txt_transparent is not set, it only affects characters between a
3341 start box and an end box, typically subtitles. Default value is 0
3342 if txt_transparent is set, 255 otherwise.
3343
3345 When you configure your FFmpeg build, all the supported bitstream
3346 filters are enabled by default. You can list all available ones using
3347 the configure option "--list-bsfs".
3348
3349 You can disable all the bitstream filters using the configure option
3350 "--disable-bsfs", and selectively enable any bitstream filter using the
3351 option "--enable-bsf=BSF", or you can disable a particular bitstream
3352 filter using the option "--disable-bsf=BSF".
3353
3354 The option "-bsfs" of the ff* tools will display the list of all the
3355 supported bitstream filters included in your build.
3356
3357 The ff* tools have a -bsf option applied per stream, taking a comma-
3358 separated list of filters, whose parameters follow the filter name
3359 after a '='.
3360
3361 ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
3362
3363 Below is a description of the currently available bitstream filters,
3364 with their parameters, if any.
3365
3366 aac_adtstoasc
3367 Convert MPEG-2/4 AAC ADTS to an MPEG-4 Audio Specific Configuration
3368 bitstream.
3369
3370 This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4 ADTS
3371 header and removes the ADTS header.
3372
3373 This filter is required for example when copying an AAC stream from a
3374 raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
3375 to MOV/MP4 files and related formats such as 3GP or M4A. Please note
3376 that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
3377
3378 av1_metadata
3379 Modify metadata embedded in an AV1 stream.
3380
3381 td Insert or remove temporal delimiter OBUs in all temporal units of
3382 the stream.
3383
3384 insert
3385 Insert a TD at the beginning of every TU which does not already
3386 have one.
3387
3388 remove
3389 Remove the TD from the beginning of every TU which has one.
3390
3391 color_primaries
3392 transfer_characteristics
3393 matrix_coefficients
3394 Set the color description fields in the stream (see AV1 section
3395 6.4.2).
3396
3397 color_range
3398 Set the color range in the stream (see AV1 section 6.4.2; note that
3399 this cannot be set for streams using BT.709 primaries, sRGB
3400 transfer characteristic and identity (RGB) matrix coefficients).
3401
3402 tv Limited range.
3403
3404 pc Full range.
3405
3406 chroma_sample_position
3407 Set the chroma sample location in the stream (see AV1 section
3408 6.4.2). This can only be set for 4:2:0 streams.
3409
3410 vertical
3411 Left position (matching the default in MPEG-2 and H.264).
3412
3413 colocated
3414 Top-left position.
3415
3416 tick_rate
3417 Set the tick rate (time_scale / num_units_in_display_tick) in the
3418 timing info in the sequence header.
3419
3420 num_ticks_per_picture
3421 Set the number of ticks in each picture, to indicate that the
3422 stream has a fixed framerate. Ignored if tick_rate is not also
3423 set.
3424
3425 delete_padding
3426 Deletes Padding OBUs.
3427
3428 chomp
3429 Remove zero padding at the end of a packet.
3430
3431 dca_core
3432 Extract the core from a DCA/DTS stream, dropping extensions such as
3433 DTS-HD.
3434
3435 dump_extra
3436 Add extradata to the beginning of the filtered packets except when said
3437 packets already exactly begin with the extradata that is intended to be
3438 added.
3439
3440 freq
3441 The additional argument specifies which packets should be filtered.
3442 It accepts the values:
3443
3444 k
3445 keyframe
3446 add extradata to all key packets
3447
3448 e
3449 all add extradata to all packets
3450
3451 If not specified it is assumed k.
3452
3453 For example the following ffmpeg command forces a global header (thus
3454 disabling individual packet headers) in the H.264 packets generated by
3455 the "libx264" encoder, but corrects them by adding the header stored in
3456 extradata to the key packets:
3457
3458 ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
3459
3460 dv_error_marker
3461 Blocks in DV which are marked as damaged are replaced by blocks of the
3462 specified color.
3463
3464 color
3465 The color to replace damaged blocks by
3466
3467 sta A 16 bit mask which specifies which of the 16 possible error status
3468 values are to be replaced by colored blocks. 0xFFFE is the default
3469 which replaces all non 0 error status values.
3470
3471 ok No error, no concealment
3472
3473 err Error, No concealment
3474
3475 res Reserved
3476
3477 notok
3478 Error or concealment
3479
3480 notres
3481 Not reserved
3482
3483 Aa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru
3484 The specific error status code
3485
3486 see page 44-46 or section 5.5 of
3487 <http://web.archive.org/web/20060927044735/http://www.smpte.org/smpte_store/standards/pdf/s314m.pdf>
3488
3489 eac3_core
3490 Extract the core from a E-AC-3 stream, dropping extra channels.
3491
3492 extract_extradata
3493 Extract the in-band extradata.
3494
3495 Certain codecs allow the long-term headers (e.g. MPEG-2 sequence
3496 headers, or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either "in-
3497 band" (i.e. as a part of the bitstream containing the coded frames) or
3498 "out of band" (e.g. on the container level). This latter form is called
3499 "extradata" in FFmpeg terminology.
3500
3501 This bitstream filter detects the in-band headers and makes them
3502 available as extradata.
3503
3504 remove
3505 When this option is enabled, the long-term headers are removed from
3506 the bitstream after extraction.
3507
3508 filter_units
3509 Remove units with types in or not in a given set from the stream.
3510
3511 pass_types
3512 List of unit types or ranges of unit types to pass through while
3513 removing all others. This is specified as a '|'-separated list of
3514 unit type values or ranges of values with '-'.
3515
3516 remove_types
3517 Identical to pass_types, except the units in the given set removed
3518 and all others passed through.
3519
3520 Extradata is unchanged by this transformation, but note that if the
3521 stream contains inline parameter sets then the output may be unusable
3522 if they are removed.
3523
3524 For example, to remove all non-VCL NAL units from an H.264 stream:
3525
3526 ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
3527
3528 To remove all AUDs, SEI and filler from an H.265 stream:
3529
3530 ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
3531
3532 hapqa_extract
3533 Extract Rgb or Alpha part of an HAPQA file, without recompression, in
3534 order to create an HAPQ or an HAPAlphaOnly file.
3535
3536 texture
3537 Specifies the texture to keep.
3538
3539 color
3540 alpha
3541
3542 Convert HAPQA to HAPQ
3543
3544 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
3545
3546 Convert HAPQA to HAPAlphaOnly
3547
3548 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
3549
3550 h264_metadata
3551 Modify metadata embedded in an H.264 stream.
3552
3553 aud Insert or remove AUD NAL units in all access units of the stream.
3554
3555 pass
3556 insert
3557 remove
3558
3559 Default is pass.
3560
3561 sample_aspect_ratio
3562 Set the sample aspect ratio of the stream in the VUI parameters.
3563 See H.264 table E-1.
3564
3565 overscan_appropriate_flag
3566 Set whether the stream is suitable for display using overscan or
3567 not (see H.264 section E.2.1).
3568
3569 video_format
3570 video_full_range_flag
3571 Set the video format in the stream (see H.264 section E.2.1 and
3572 table E-2).
3573
3574 colour_primaries
3575 transfer_characteristics
3576 matrix_coefficients
3577 Set the colour description in the stream (see H.264 section E.2.1
3578 and tables E-3, E-4 and E-5).
3579
3580 chroma_sample_loc_type
3581 Set the chroma sample location in the stream (see H.264 section
3582 E.2.1 and figure E-1).
3583
3584 tick_rate
3585 Set the tick rate (time_scale / num_units_in_tick) in the VUI
3586 parameters. This is the smallest time unit representable in the
3587 stream, and in many cases represents the field rate of the stream
3588 (double the frame rate).
3589
3590 fixed_frame_rate_flag
3591 Set whether the stream has fixed framerate - typically this
3592 indicates that the framerate is exactly half the tick rate, but the
3593 exact meaning is dependent on interlacing and the picture structure
3594 (see H.264 section E.2.1 and table E-6).
3595
3596 zero_new_constraint_set_flags
3597 Zero constraint_set4_flag and constraint_set5_flag in the SPS.
3598 These bits were reserved in a previous version of the H.264 spec,
3599 and thus some hardware decoders require these to be zero. The
3600 result of zeroing this is still a valid bitstream.
3601
3602 crop_left
3603 crop_right
3604 crop_top
3605 crop_bottom
3606 Set the frame cropping offsets in the SPS. These values will
3607 replace the current ones if the stream is already cropped.
3608
3609 These fields are set in pixels. Note that some sizes may not be
3610 representable if the chroma is subsampled or the stream is
3611 interlaced (see H.264 section 7.4.2.1.1).
3612
3613 sei_user_data
3614 Insert a string as SEI unregistered user data. The argument must
3615 be of the form UUID+string, where the UUID is as hex digits
3616 possibly separated by hyphens, and the string can be anything.
3617
3618 For example, 086f3693-b7b3-4f2c-9653-21492feee5b8+hello will insert
3619 the string ``hello'' associated with the given UUID.
3620
3621 delete_filler
3622 Deletes both filler NAL units and filler SEI messages.
3623
3624 display_orientation
3625 Insert, extract or remove Display orientation SEI messages. See
3626 H.264 section D.1.27 and D.2.27 for syntax and semantics.
3627
3628 pass
3629 insert
3630 remove
3631 extract
3632
3633 Default is pass.
3634
3635 Insert mode works in conjunction with "rotate" and "flip" options.
3636 Any pre-existing Display orientation messages will be removed in
3637 insert or remove mode. Extract mode attaches the display matrix to
3638 the packet as side data.
3639
3640 rotate
3641 Set rotation in display orientation SEI (anticlockwise angle in
3642 degrees). Range is -360 to +360. Default is NaN.
3643
3644 flip
3645 Set flip in display orientation SEI.
3646
3647 horizontal
3648 vertical
3649
3650 Default is unset.
3651
3652 level
3653 Set the level in the SPS. Refer to H.264 section A.3 and tables
3654 A-1 to A-5.
3655
3656 The argument must be the name of a level (for example, 4.2), a
3657 level_idc value (for example, 42), or the special name auto
3658 indicating that the filter should attempt to guess the level from
3659 the input stream properties.
3660
3661 h264_mp4toannexb
3662 Convert an H.264 bitstream from length prefixed mode to start code
3663 prefixed mode (as defined in the Annex B of the ITU-T H.264
3664 specification).
3665
3666 This is required by some streaming formats, typically the MPEG-2
3667 transport stream format (muxer "mpegts").
3668
3669 For example to remux an MP4 file containing an H.264 stream to mpegts
3670 format with ffmpeg, you can use the command:
3671
3672 ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
3673
3674 Please note that this filter is auto-inserted for MPEG-TS (muxer
3675 "mpegts") and raw H.264 (muxer "h264") output formats.
3676
3677 h264_redundant_pps
3678 This applies a specific fixup to some Blu-ray streams which contain
3679 redundant PPSs modifying irrelevant parameters of the stream which
3680 confuse other transformations which require correct extradata.
3681
3682 hevc_metadata
3683 Modify metadata embedded in an HEVC stream.
3684
3685 aud Insert or remove AUD NAL units in all access units of the stream.
3686
3687 insert
3688 remove
3689 sample_aspect_ratio
3690 Set the sample aspect ratio in the stream in the VUI parameters.
3691
3692 video_format
3693 video_full_range_flag
3694 Set the video format in the stream (see H.265 section E.3.1 and
3695 table E.2).
3696
3697 colour_primaries
3698 transfer_characteristics
3699 matrix_coefficients
3700 Set the colour description in the stream (see H.265 section E.3.1
3701 and tables E.3, E.4 and E.5).
3702
3703 chroma_sample_loc_type
3704 Set the chroma sample location in the stream (see H.265 section
3705 E.3.1 and figure E.1).
3706
3707 tick_rate
3708 Set the tick rate in the VPS and VUI parameters (time_scale /
3709 num_units_in_tick). Combined with num_ticks_poc_diff_one, this can
3710 set a constant framerate in the stream. Note that it is likely to
3711 be overridden by container parameters when the stream is in a
3712 container.
3713
3714 num_ticks_poc_diff_one
3715 Set poc_proportional_to_timing_flag in VPS and VUI and use this
3716 value to set num_ticks_poc_diff_one_minus1 (see H.265 sections
3717 7.4.3.1 and E.3.1). Ignored if tick_rate is not also set.
3718
3719 crop_left
3720 crop_right
3721 crop_top
3722 crop_bottom
3723 Set the conformance window cropping offsets in the SPS. These
3724 values will replace the current ones if the stream is already
3725 cropped.
3726
3727 These fields are set in pixels. Note that some sizes may not be
3728 representable if the chroma is subsampled (H.265 section
3729 7.4.3.2.1).
3730
3731 level
3732 Set the level in the VPS and SPS. See H.265 section A.4 and tables
3733 A.6 and A.7.
3734
3735 The argument must be the name of a level (for example, 5.1), a
3736 general_level_idc value (for example, 153 for level 5.1), or the
3737 special name auto indicating that the filter should attempt to
3738 guess the level from the input stream properties.
3739
3740 hevc_mp4toannexb
3741 Convert an HEVC/H.265 bitstream from length prefixed mode to start code
3742 prefixed mode (as defined in the Annex B of the ITU-T H.265
3743 specification).
3744
3745 This is required by some streaming formats, typically the MPEG-2
3746 transport stream format (muxer "mpegts").
3747
3748 For example to remux an MP4 file containing an HEVC stream to mpegts
3749 format with ffmpeg, you can use the command:
3750
3751 ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
3752
3753 Please note that this filter is auto-inserted for MPEG-TS (muxer
3754 "mpegts") and raw HEVC/H.265 (muxer "h265" or "hevc") output formats.
3755
3756 imxdump
3757 Modifies the bitstream to fit in MOV and to be usable by the Final Cut
3758 Pro decoder. This filter only applies to the mpeg2video codec, and is
3759 likely not needed for Final Cut Pro 7 and newer with the appropriate
3760 -tag:v.
3761
3762 For example, to remux 30 MB/sec NTSC IMX to MOV:
3763
3764 ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
3765
3766 mjpeg2jpeg
3767 Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
3768
3769 MJPEG is a video codec wherein each video frame is essentially a JPEG
3770 image. The individual frames can be extracted without loss, e.g. by
3771
3772 ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
3773
3774 Unfortunately, these chunks are incomplete JPEG images, because they
3775 lack the DHT segment required for decoding. Quoting from
3776 <http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml>:
3777
3778 Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
3779 commented that "MJPEG, or at least the MJPEG in AVIs having the MJPG
3780 fourcc, is restricted JPEG with a fixed -- and *omitted* -- Huffman
3781 table. The JPEG must be YCbCr colorspace, it must be 4:2:2, and it must
3782 use basic Huffman encoding, not arithmetic or progressive. . . . You
3783 can indeed extract the MJPEG frames and decode them with a regular JPEG
3784 decoder, but you have to prepend the DHT segment to them, or else the
3785 decoder won't have any idea how to decompress the data. The exact table
3786 necessary is given in the OpenDML spec."
3787
3788 This bitstream filter patches the header of frames extracted from an
3789 MJPEG stream (carrying the AVI1 header ID and lacking a DHT segment) to
3790 produce fully qualified JPEG images.
3791
3792 ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
3793 exiftran -i -9 frame*.jpg
3794 ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
3795
3796 mjpegadump
3797 Add an MJPEG A header to the bitstream, to enable decoding by
3798 Quicktime.
3799
3800 mov2textsub
3801 Extract a representable text file from MOV subtitles, stripping the
3802 metadata header from each subtitle packet.
3803
3804 See also the text2movsub filter.
3805
3806 mp3decomp
3807 Decompress non-standard compressed MP3 audio headers.
3808
3809 mpeg2_metadata
3810 Modify metadata embedded in an MPEG-2 stream.
3811
3812 display_aspect_ratio
3813 Set the display aspect ratio in the stream.
3814
3815 The following fixed values are supported:
3816
3817 4/3
3818 16/9
3819 221/100
3820
3821 Any other value will result in square pixels being signalled
3822 instead (see H.262 section 6.3.3 and table 6-3).
3823
3824 frame_rate
3825 Set the frame rate in the stream. This is constructed from a table
3826 of known values combined with a small multiplier and divisor - if
3827 the supplied value is not exactly representable, the nearest
3828 representable value will be used instead (see H.262 section 6.3.3
3829 and table 6-4).
3830
3831 video_format
3832 Set the video format in the stream (see H.262 section 6.3.6 and
3833 table 6-6).
3834
3835 colour_primaries
3836 transfer_characteristics
3837 matrix_coefficients
3838 Set the colour description in the stream (see H.262 section 6.3.6
3839 and tables 6-7, 6-8 and 6-9).
3840
3841 mpeg4_unpack_bframes
3842 Unpack DivX-style packed B-frames.
3843
3844 DivX-style packed B-frames are not valid MPEG-4 and were only a
3845 workaround for the broken Video for Windows subsystem. They use more
3846 space, can cause minor AV sync issues, require more CPU power to decode
3847 (unless the player has some decoded picture queue to compensate the
3848 2,0,2,0 frame per packet style) and cause trouble if copied into a
3849 standard container like mp4 or mpeg-ps/ts, because MPEG-4 decoders may
3850 not be able to decode them, since they are not valid MPEG-4.
3851
3852 For example to fix an AVI file containing an MPEG-4 stream with DivX-
3853 style packed B-frames using ffmpeg, you can use the command:
3854
3855 ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
3856
3857 noise
3858 Damages the contents of packets or simply drops them without damaging
3859 the container. Can be used for fuzzing or testing error
3860 resilience/concealment.
3861
3862 Parameters:
3863
3864 amount
3865 Accepts an expression whose evaluation per-packet determines how
3866 often bytes in that packet will be modified. A value below 0 will
3867 result in a variable frequency. Default is 0 which results in no
3868 modification. However, if neither amount nor drop is specified,
3869 amount will be set to -1. See below for accepted variables.
3870
3871 drop
3872 Accepts an expression evaluated per-packet whose value determines
3873 whether that packet is dropped. Evaluation to a positive value
3874 results in the packet being dropped. Evaluation to a negative value
3875 results in a variable chance of it being dropped, roughly inverse
3876 in proportion to the magnitude of the value. Default is 0 which
3877 results in no drops. See below for accepted variables.
3878
3879 dropamount
3880 Accepts a non-negative integer, which assigns a variable chance of
3881 it being dropped, roughly inverse in proportion to the value.
3882 Default is 0 which results in no drops. This option is kept for
3883 backwards compatibility and is equivalent to setting drop to a
3884 negative value with the same magnitude i.e. "dropamount=4" is the
3885 same as "drop=-4". Ignored if drop is also specified.
3886
3887 Both "amount" and "drop" accept expressions containing the following
3888 variables:
3889
3890 n The index of the packet, starting from zero.
3891
3892 tb The timebase for packet timestamps.
3893
3894 pts Packet presentation timestamp.
3895
3896 dts Packet decoding timestamp.
3897
3898 nopts
3899 Constant representing AV_NOPTS_VALUE.
3900
3901 startpts
3902 First non-AV_NOPTS_VALUE PTS seen in the stream.
3903
3904 startdts
3905 First non-AV_NOPTS_VALUE DTS seen in the stream.
3906
3907 duration
3908 d Packet duration, in timebase units.
3909
3910 pos Packet position in input; may be -1 when unknown or not set.
3911
3912 size
3913 Packet size, in bytes.
3914
3915 key Whether packet is marked as a keyframe.
3916
3917 state
3918 A pseudo random integer, primarily derived from the content of
3919 packet payload.
3920
3921 Examples
3922
3923 Apply modification to every byte but don't drop any packets.
3924
3925 ffmpeg -i INPUT -c copy -bsf noise=1 output.mkv
3926
3927 Drop every video packet not marked as a keyframe after timestamp 30s
3928 but do not modify any of the remaining packets.
3929
3930 ffmpeg -i INPUT -c copy -bsf:v noise=drop='gt(t\,30)*not(key)' output.mkv
3931
3932 Drop one second of audio every 10 seconds and add some random noise to
3933 the rest.
3934
3935 ffmpeg -i INPUT -c copy -bsf:a noise=amount=-1:drop='between(mod(t\,10)\,9\,10)' output.mkv
3936
3937 null
3938 This bitstream filter passes the packets through unchanged.
3939
3940 pcm_rechunk
3941 Repacketize PCM audio to a fixed number of samples per packet or a
3942 fixed packet rate per second. This is similar to the asetnsamples audio
3943 filter but works on audio packets instead of audio frames.
3944
3945 nb_out_samples, n
3946 Set the number of samples per each output audio packet. The number
3947 is intended as the number of samples per each channel. Default
3948 value is 1024.
3949
3950 pad, p
3951 If set to 1, the filter will pad the last audio packet with
3952 silence, so that it will contain the same number of samples (or
3953 roughly the same number of samples, see frame_rate) as the previous
3954 ones. Default value is 1.
3955
3956 frame_rate, r
3957 This option makes the filter output a fixed number of packets per
3958 second instead of a fixed number of samples per packet. If the
3959 audio sample rate is not divisible by the frame rate then the
3960 number of samples will not be constant but will vary slightly so
3961 that each packet will start as close to the frame boundary as
3962 possible. Using this option has precedence over nb_out_samples.
3963
3964 You can generate the well known 1602-1601-1602-1601-1602 pattern of
3965 48kHz audio for NTSC frame rate using the frame_rate option.
3966
3967 ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
3968
3969 pgs_frame_merge
3970 Merge a sequence of PGS Subtitle segments ending with an "end of
3971 display set" segment into a single packet.
3972
3973 This is required by some containers that support PGS subtitles (muxer
3974 "matroska").
3975
3976 prores_metadata
3977 Modify color property metadata embedded in prores stream.
3978
3979 color_primaries
3980 Set the color primaries. Available values are:
3981
3982 auto
3983 Keep the same color primaries property (default).
3984
3985 unknown
3986 bt709
3987 bt470bg
3988 BT601 625
3989
3990 smpte170m
3991 BT601 525
3992
3993 bt2020
3994 smpte431
3995 DCI P3
3996
3997 smpte432
3998 P3 D65
3999
4000 transfer_characteristics
4001 Set the color transfer. Available values are:
4002
4003 auto
4004 Keep the same transfer characteristics property (default).
4005
4006 unknown
4007 bt709
4008 BT 601, BT 709, BT 2020
4009
4010 smpte2084
4011 SMPTE ST 2084
4012
4013 arib-std-b67
4014 ARIB STD-B67
4015
4016 matrix_coefficients
4017 Set the matrix coefficient. Available values are:
4018
4019 auto
4020 Keep the same colorspace property (default).
4021
4022 unknown
4023 bt709
4024 smpte170m
4025 BT 601
4026
4027 bt2020nc
4028
4029 Set Rec709 colorspace for each frame of the file
4030
4031 ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
4032
4033 Set Hybrid Log-Gamma parameters for each frame of the file
4034
4035 ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov
4036
4037 remove_extra
4038 Remove extradata from packets.
4039
4040 It accepts the following parameter:
4041
4042 freq
4043 Set which frame types to remove extradata from.
4044
4045 k Remove extradata from non-keyframes only.
4046
4047 keyframe
4048 Remove extradata from keyframes only.
4049
4050 e, all
4051 Remove extradata from all frames.
4052
4053 setts
4054 Set PTS and DTS in packets.
4055
4056 It accepts the following parameters:
4057
4058 ts
4059 pts
4060 dts Set expressions for PTS, DTS or both.
4061
4062 duration
4063 Set expression for duration.
4064
4065 time_base
4066 Set output time base.
4067
4068 The expressions are evaluated through the eval API and can contain the
4069 following constants:
4070
4071 N The count of the input packet. Starting from 0.
4072
4073 TS The demux timestamp in input in case of "ts" or "dts" option or
4074 presentation timestamp in case of "pts" option.
4075
4076 POS The original position in the file of the packet, or undefined if
4077 undefined for the current packet
4078
4079 DTS The demux timestamp in input.
4080
4081 PTS The presentation timestamp in input.
4082
4083 DURATION
4084 The duration in input.
4085
4086 STARTDTS
4087 The DTS of the first packet.
4088
4089 STARTPTS
4090 The PTS of the first packet.
4091
4092 PREV_INDTS
4093 The previous input DTS.
4094
4095 PREV_INPTS
4096 The previous input PTS.
4097
4098 PREV_INDURATION
4099 The previous input duration.
4100
4101 PREV_OUTDTS
4102 The previous output DTS.
4103
4104 PREV_OUTPTS
4105 The previous output PTS.
4106
4107 PREV_OUTDURATION
4108 The previous output duration.
4109
4110 NEXT_DTS
4111 The next input DTS.
4112
4113 NEXT_PTS
4114 The next input PTS.
4115
4116 NEXT_DURATION
4117 The next input duration.
4118
4119 TB The timebase of stream packet belongs.
4120
4121 TB_OUT
4122 The output timebase.
4123
4124 SR The sample rate of stream packet belongs.
4125
4126 NOPTS
4127 The AV_NOPTS_VALUE constant.
4128
4129 text2movsub
4130 Convert text subtitles to MOV subtitles (as used by the "mov_text"
4131 codec) with metadata headers.
4132
4133 See also the mov2textsub filter.
4134
4135 trace_headers
4136 Log trace output containing all syntax elements in the coded stream
4137 headers (everything above the level of individual coded blocks). This
4138 can be useful for debugging low-level stream issues.
4139
4140 Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending on
4141 the build only a subset of these may be available.
4142
4143 truehd_core
4144 Extract the core from a TrueHD stream, dropping ATMOS data.
4145
4146 vp9_metadata
4147 Modify metadata embedded in a VP9 stream.
4148
4149 color_space
4150 Set the color space value in the frame header. Note that any frame
4151 set to RGB will be implicitly set to PC range and that RGB is
4152 incompatible with profiles 0 and 2.
4153
4154 unknown
4155 bt601
4156 bt709
4157 smpte170
4158 smpte240
4159 bt2020
4160 rgb
4161 color_range
4162 Set the color range value in the frame header. Note that any value
4163 imposed by the color space will take precedence over this value.
4164
4165 tv
4166 pc
4167
4168 vp9_superframe
4169 Merge VP9 invisible (alt-ref) frames back into VP9 superframes. This
4170 fixes merging of split/segmented VP9 streams where the alt-ref frame
4171 was split from its visible counterpart.
4172
4173 vp9_superframe_split
4174 Split VP9 superframes into single frames.
4175
4176 vp9_raw_reorder
4177 Given a VP9 stream with correct timestamps but possibly out of order,
4178 insert additional show-existing-frame packets to correct the ordering.
4179
4181 The libavformat library provides some generic global options, which can
4182 be set on all the muxers and demuxers. In addition each muxer or
4183 demuxer may support so-called private options, which are specific for
4184 that component.
4185
4186 Options may be set by specifying -option value in the FFmpeg tools, or
4187 by setting the value explicitly in the "AVFormatContext" options or
4188 using the libavutil/opt.h API for programmatic use.
4189
4190 The list of supported options follows:
4191
4192 avioflags flags (input/output)
4193 Possible values:
4194
4195 direct
4196 Reduce buffering.
4197
4198 probesize integer (input)
4199 Set probing size in bytes, i.e. the size of the data to analyze to
4200 get stream information. A higher value will enable detecting more
4201 information in case it is dispersed into the stream, but will
4202 increase latency. Must be an integer not lesser than 32. It is
4203 5000000 by default.
4204
4205 max_probe_packets integer (input)
4206 Set the maximum number of buffered packets when probing a codec.
4207 Default is 2500 packets.
4208
4209 packetsize integer (output)
4210 Set packet size.
4211
4212 fflags flags
4213 Set format flags. Some are implemented for a limited number of
4214 formats.
4215
4216 Possible values for input files:
4217
4218 discardcorrupt
4219 Discard corrupted packets.
4220
4221 fastseek
4222 Enable fast, but inaccurate seeks for some formats.
4223
4224 genpts
4225 Generate missing PTS if DTS is present.
4226
4227 igndts
4228 Ignore DTS if PTS is set. Inert when nofillin is set.
4229
4230 ignidx
4231 Ignore index.
4232
4233 nobuffer
4234 Reduce the latency introduced by buffering during initial input
4235 streams analysis.
4236
4237 nofillin
4238 Do not fill in missing values in packet fields that can be
4239 exactly calculated.
4240
4241 noparse
4242 Disable AVParsers, this needs "+nofillin" too.
4243
4244 sortdts
4245 Try to interleave output packets by DTS. At present, available
4246 only for AVIs with an index.
4247
4248 Possible values for output files:
4249
4250 autobsf
4251 Automatically apply bitstream filters as required by the output
4252 format. Enabled by default.
4253
4254 bitexact
4255 Only write platform-, build- and time-independent data. This
4256 ensures that file and data checksums are reproducible and match
4257 between platforms. Its primary use is for regression testing.
4258
4259 flush_packets
4260 Write out packets immediately.
4261
4262 shortest
4263 Stop muxing at the end of the shortest stream. It may be
4264 needed to increase max_interleave_delta to avoid flushing the
4265 longer streams before EOF.
4266
4267 seek2any integer (input)
4268 Allow seeking to non-keyframes on demuxer level when supported if
4269 set to 1. Default is 0.
4270
4271 analyzeduration integer (input)
4272 Specify how many microseconds are analyzed to probe the input. A
4273 higher value will enable detecting more accurate information, but
4274 will increase latency. It defaults to 5,000,000 microseconds = 5
4275 seconds.
4276
4277 cryptokey hexadecimal string (input)
4278 Set decryption key.
4279
4280 indexmem integer (input)
4281 Set max memory used for timestamp index (per stream).
4282
4283 rtbufsize integer (input)
4284 Set max memory used for buffering real-time frames.
4285
4286 fdebug flags (input/output)
4287 Print specific debug info.
4288
4289 Possible values:
4290
4291 ts
4292 max_delay integer (input/output)
4293 Set maximum muxing or demuxing delay in microseconds.
4294
4295 fpsprobesize integer (input)
4296 Set number of frames used to probe fps.
4297
4298 audio_preload integer (output)
4299 Set microseconds by which audio packets should be interleaved
4300 earlier.
4301
4302 chunk_duration integer (output)
4303 Set microseconds for each chunk.
4304
4305 chunk_size integer (output)
4306 Set size in bytes for each chunk.
4307
4308 err_detect, f_err_detect flags (input)
4309 Set error detection flags. "f_err_detect" is deprecated and should
4310 be used only via the ffmpeg tool.
4311
4312 Possible values:
4313
4314 crccheck
4315 Verify embedded CRCs.
4316
4317 bitstream
4318 Detect bitstream specification deviations.
4319
4320 buffer
4321 Detect improper bitstream length.
4322
4323 explode
4324 Abort decoding on minor error detection.
4325
4326 careful
4327 Consider things that violate the spec and have not been seen in
4328 the wild as errors.
4329
4330 compliant
4331 Consider all spec non compliancies as errors.
4332
4333 aggressive
4334 Consider things that a sane encoder should not do as an error.
4335
4336 max_interleave_delta integer (output)
4337 Set maximum buffering duration for interleaving. The duration is
4338 expressed in microseconds, and defaults to 10000000 (10 seconds).
4339
4340 To ensure all the streams are interleaved correctly, libavformat
4341 will wait until it has at least one packet for each stream before
4342 actually writing any packets to the output file. When some streams
4343 are "sparse" (i.e. there are large gaps between successive
4344 packets), this can result in excessive buffering.
4345
4346 This field specifies the maximum difference between the timestamps
4347 of the first and the last packet in the muxing queue, above which
4348 libavformat will output a packet regardless of whether it has
4349 queued a packet for all the streams.
4350
4351 If set to 0, libavformat will continue buffering packets until it
4352 has a packet for each stream, regardless of the maximum timestamp
4353 difference between the buffered packets.
4354
4355 use_wallclock_as_timestamps integer (input)
4356 Use wallclock as timestamps if set to 1. Default is 0.
4357
4358 avoid_negative_ts integer (output)
4359 Possible values:
4360
4361 make_non_negative
4362 Shift timestamps to make them non-negative. Also note that
4363 this affects only leading negative timestamps, and not non-
4364 monotonic negative timestamps.
4365
4366 make_zero
4367 Shift timestamps so that the first timestamp is 0.
4368
4369 auto (default)
4370 Enables shifting when required by the target format.
4371
4372 disabled
4373 Disables shifting of timestamp.
4374
4375 When shifting is enabled, all output timestamps are shifted by the
4376 same amount. Audio, video, and subtitles desynching and relative
4377 timestamp differences are preserved compared to how they would have
4378 been without shifting.
4379
4380 skip_initial_bytes integer (input)
4381 Set number of bytes to skip before reading header and frames if set
4382 to 1. Default is 0.
4383
4384 correct_ts_overflow integer (input)
4385 Correct single timestamp overflows if set to 1. Default is 1.
4386
4387 flush_packets integer (output)
4388 Flush the underlying I/O stream after each packet. Default is -1
4389 (auto), which means that the underlying protocol will decide, 1
4390 enables it, and has the effect of reducing the latency, 0 disables
4391 it and may increase IO throughput in some cases.
4392
4393 output_ts_offset offset (output)
4394 Set the output time offset.
4395
4396 offset must be a time duration specification, see the Time duration
4397 section in the ffmpeg-utils(1) manual.
4398
4399 The offset is added by the muxer to the output timestamps.
4400
4401 Specifying a positive offset means that the corresponding streams
4402 are delayed bt the time duration specified in offset. Default value
4403 is 0 (meaning that no offset is applied).
4404
4405 format_whitelist list (input)
4406 "," separated list of allowed demuxers. By default all are allowed.
4407
4408 dump_separator string (input)
4409 Separator used to separate the fields printed on the command line
4410 about the Stream parameters. For example, to separate the fields
4411 with newlines and indentation:
4412
4413 ffprobe -dump_separator "
4414 " -i ~/videos/matrixbench_mpeg2.mpg
4415
4416 max_streams integer (input)
4417 Specifies the maximum number of streams. This can be used to reject
4418 files that would require too many resources due to a large number
4419 of streams.
4420
4421 skip_estimate_duration_from_pts bool (input)
4422 Skip estimation of input duration when calculated using PTS. At
4423 present, applicable for MPEG-PS and MPEG-TS.
4424
4425 strict, f_strict integer (input/output)
4426 Specify how strictly to follow the standards. "f_strict" is
4427 deprecated and should be used only via the ffmpeg tool.
4428
4429 Possible values:
4430
4431 very
4432 strictly conform to an older more strict version of the spec or
4433 reference software
4434
4435 strict
4436 strictly conform to all the things in the spec no matter what
4437 consequences
4438
4439 normal
4440 unofficial
4441 allow unofficial extensions
4442
4443 experimental
4444 allow non standardized experimental things, experimental
4445 (unfinished/work in progress/not well tested) decoders and
4446 encoders. Note: experimental decoders can pose a security
4447 risk, do not use this for decoding untrusted input.
4448
4449 Format stream specifiers
4450 Format stream specifiers allow selection of one or more streams that
4451 match specific properties.
4452
4453 The exact semantics of stream specifiers is defined by the
4454 avformat_match_stream_specifier() function declared in the
4455 libavformat/avformat.h header and documented in the Stream specifiers
4456 section in the ffmpeg(1) manual.
4457
4459 Demuxers are configured elements in FFmpeg that can read the multimedia
4460 streams from a particular type of file.
4461
4462 When you configure your FFmpeg build, all the supported demuxers are
4463 enabled by default. You can list all available ones using the configure
4464 option "--list-demuxers".
4465
4466 You can disable all the demuxers using the configure option
4467 "--disable-demuxers", and selectively enable a single demuxer with the
4468 option "--enable-demuxer=DEMUXER", or disable it with the option
4469 "--disable-demuxer=DEMUXER".
4470
4471 The option "-demuxers" of the ff* tools will display the list of
4472 enabled demuxers. Use "-formats" to view a combined list of enabled
4473 demuxers and muxers.
4474
4475 The description of some of the currently available demuxers follows.
4476
4477 aa
4478 Audible Format 2, 3, and 4 demuxer.
4479
4480 This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files.
4481
4482 aac
4483 Raw Audio Data Transport Stream AAC demuxer.
4484
4485 This demuxer is used to demux an ADTS input containing a single AAC
4486 stream alongwith any ID3v1/2 or APE tags in it.
4487
4488 apng
4489 Animated Portable Network Graphics demuxer.
4490
4491 This demuxer is used to demux APNG files. All headers, but the PNG
4492 signature, up to (but not including) the first fcTL chunk are
4493 transmitted as extradata. Frames are then split as being all the
4494 chunks between two fcTL ones, or between the last fcTL and IEND chunks.
4495
4496 -ignore_loop bool
4497 Ignore the loop variable in the file if set. Default is enabled.
4498
4499 -max_fps int
4500 Maximum framerate in frames per second. Default of 0 imposes no
4501 limit.
4502
4503 -default_fps int
4504 Default framerate in frames per second when none is specified in
4505 the file (0 meaning as fast as possible). Default is 15.
4506
4507 asf
4508 Advanced Systems Format demuxer.
4509
4510 This demuxer is used to demux ASF files and MMS network streams.
4511
4512 -no_resync_search bool
4513 Do not try to resynchronize by looking for a certain optional start
4514 code.
4515
4516 concat
4517 Virtual concatenation script demuxer.
4518
4519 This demuxer reads a list of files and other directives from a text
4520 file and demuxes them one after the other, as if all their packets had
4521 been muxed together.
4522
4523 The timestamps in the files are adjusted so that the first file starts
4524 at 0 and each next file starts where the previous one finishes. Note
4525 that it is done globally and may cause gaps if all streams do not have
4526 exactly the same length.
4527
4528 All files must have the same streams (same codecs, same time base,
4529 etc.).
4530
4531 The duration of each file is used to adjust the timestamps of the next
4532 file: if the duration is incorrect (because it was computed using the
4533 bit-rate or because the file is truncated, for example), it can cause
4534 artifacts. The "duration" directive can be used to override the
4535 duration stored in each file.
4536
4537 Syntax
4538
4539 The script is a text file in extended-ASCII, with one directive per
4540 line. Empty lines, leading spaces and lines starting with '#' are
4541 ignored. The following directive is recognized:
4542
4543 "file path"
4544 Path to a file to read; special characters and spaces must be
4545 escaped with backslash or single quotes.
4546
4547 All subsequent file-related directives apply to that file.
4548
4549 "ffconcat version 1.0"
4550 Identify the script type and version.
4551
4552 To make FFmpeg recognize the format automatically, this directive
4553 must appear exactly as is (no extra space or byte-order-mark) on
4554 the very first line of the script.
4555
4556 "duration dur"
4557 Duration of the file. This information can be specified from the
4558 file; specifying it here may be more efficient or help if the
4559 information from the file is not available or accurate.
4560
4561 If the duration is set for all files, then it is possible to seek
4562 in the whole concatenated video.
4563
4564 "inpoint timestamp"
4565 In point of the file. When the demuxer opens the file it instantly
4566 seeks to the specified timestamp. Seeking is done so that all
4567 streams can be presented successfully at In point.
4568
4569 This directive works best with intra frame codecs, because for non-
4570 intra frame ones you will usually get extra packets before the
4571 actual In point and the decoded content will most likely contain
4572 frames before In point too.
4573
4574 For each file, packets before the file In point will have
4575 timestamps less than the calculated start timestamp of the file
4576 (negative in case of the first file), and the duration of the files
4577 (if not specified by the "duration" directive) will be reduced
4578 based on their specified In point.
4579
4580 Because of potential packets before the specified In point, packet
4581 timestamps may overlap between two concatenated files.
4582
4583 "outpoint timestamp"
4584 Out point of the file. When the demuxer reaches the specified
4585 decoding timestamp in any of the streams, it handles it as an end
4586 of file condition and skips the current and all the remaining
4587 packets from all streams.
4588
4589 Out point is exclusive, which means that the demuxer will not
4590 output packets with a decoding timestamp greater or equal to Out
4591 point.
4592
4593 This directive works best with intra frame codecs and formats where
4594 all streams are tightly interleaved. For non-intra frame codecs you
4595 will usually get additional packets with presentation timestamp
4596 after Out point therefore the decoded content will most likely
4597 contain frames after Out point too. If your streams are not tightly
4598 interleaved you may not get all the packets from all streams before
4599 Out point and you may only will be able to decode the earliest
4600 stream until Out point.
4601
4602 The duration of the files (if not specified by the "duration"
4603 directive) will be reduced based on their specified Out point.
4604
4605 "file_packet_metadata key=value"
4606 Metadata of the packets of the file. The specified metadata will be
4607 set for each file packet. You can specify this directive multiple
4608 times to add multiple metadata entries. This directive is
4609 deprecated, use "file_packet_meta" instead.
4610
4611 "file_packet_meta key value"
4612 Metadata of the packets of the file. The specified metadata will be
4613 set for each file packet. You can specify this directive multiple
4614 times to add multiple metadata entries.
4615
4616 "option key value"
4617 Option to access, open and probe the file. Can be present multiple
4618 times.
4619
4620 "stream"
4621 Introduce a stream in the virtual file. All subsequent stream-
4622 related directives apply to the last introduced stream. Some
4623 streams properties must be set in order to allow identifying the
4624 matching streams in the subfiles. If no streams are defined in the
4625 script, the streams from the first file are copied.
4626
4627 "exact_stream_id id"
4628 Set the id of the stream. If this directive is given, the string
4629 with the corresponding id in the subfiles will be used. This is
4630 especially useful for MPEG-PS (VOB) files, where the order of the
4631 streams is not reliable.
4632
4633 "stream_meta key value"
4634 Metadata for the stream. Can be present multiple times.
4635
4636 "stream_codec value"
4637 Codec for the stream.
4638
4639 "stream_extradata hex_string"
4640 Extradata for the string, encoded in hexadecimal.
4641
4642 "chapter id start end"
4643 Add a chapter. id is an unique identifier, possibly small and
4644 consecutive.
4645
4646 Options
4647
4648 This demuxer accepts the following option:
4649
4650 safe
4651 If set to 1, reject unsafe file paths and directives. A file path
4652 is considered safe if it does not contain a protocol specification
4653 and is relative and all components only contain characters from the
4654 portable character set (letters, digits, period, underscore and
4655 hyphen) and have no period at the beginning of a component.
4656
4657 If set to 0, any file name is accepted.
4658
4659 The default is 1.
4660
4661 auto_convert
4662 If set to 1, try to perform automatic conversions on packet data to
4663 make the streams concatenable. The default is 1.
4664
4665 Currently, the only conversion is adding the h264_mp4toannexb
4666 bitstream filter to H.264 streams in MP4 format. This is necessary
4667 in particular if there are resolution changes.
4668
4669 segment_time_metadata
4670 If set to 1, every packet will contain the lavf.concat.start_time
4671 and the lavf.concat.duration packet metadata values which are the
4672 start_time and the duration of the respective file segments in the
4673 concatenated output expressed in microseconds. The duration
4674 metadata is only set if it is known based on the concat file. The
4675 default is 0.
4676
4677 Examples
4678
4679 • Use absolute filenames and include some comments:
4680
4681 # my first filename
4682 file /mnt/share/file-1.wav
4683 # my second filename including whitespace
4684 file '/mnt/share/file 2.wav'
4685 # my third filename including whitespace plus single quote
4686 file '/mnt/share/file 3'\''.wav'
4687
4688 • Allow for input format auto-probing, use safe filenames and set the
4689 duration of the first file:
4690
4691 ffconcat version 1.0
4692
4693 file file-1.wav
4694 duration 20.0
4695
4696 file subdir/file-2.wav
4697
4698 dash
4699 Dynamic Adaptive Streaming over HTTP demuxer.
4700
4701 This demuxer presents all AVStreams found in the manifest. By setting
4702 the discard flags on AVStreams the caller can decide which streams to
4703 actually receive. Each stream mirrors the "id" and "bandwidth"
4704 properties from the "<Representation>" as metadata keys named "id" and
4705 "variant_bitrate" respectively.
4706
4707 Options
4708
4709 This demuxer accepts the following option:
4710
4711 cenc_decryption_key
4712 16-byte key, in hex, to decrypt files encrypted using ISO Common
4713 Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
4714
4715 ea
4716 Electronic Arts Multimedia format demuxer.
4717
4718 This format is used by various Electronic Arts games.
4719
4720 Options
4721
4722 merge_alpha bool
4723 Normally the VP6 alpha channel (if exists) is returned as a
4724 secondary video stream, by setting this option you can make the
4725 demuxer return a single video stream which contains the alpha
4726 channel in addition to the ordinary video.
4727
4728 imf
4729 Interoperable Master Format demuxer.
4730
4731 This demuxer presents audio and video streams found in an IMF
4732 Composition.
4733
4734 flv, live_flv, kux
4735 Adobe Flash Video Format demuxer.
4736
4737 This demuxer is used to demux FLV files and RTMP network streams. In
4738 case of live network streams, if you force format, you may use live_flv
4739 option instead of flv to survive timestamp discontinuities. KUX is a
4740 flv variant used on the Youku platform.
4741
4742 ffmpeg -f flv -i myfile.flv ...
4743 ffmpeg -f live_flv -i rtmp://<any.server>/anything/key ....
4744
4745 -flv_metadata bool
4746 Allocate the streams according to the onMetaData array content.
4747
4748 -flv_ignore_prevtag bool
4749 Ignore the size of previous tag value.
4750
4751 -flv_full_metadata bool
4752 Output all context of the onMetadata.
4753
4754 gif
4755 Animated GIF demuxer.
4756
4757 It accepts the following options:
4758
4759 min_delay
4760 Set the minimum valid delay between frames in hundredths of
4761 seconds. Range is 0 to 6000. Default value is 2.
4762
4763 max_gif_delay
4764 Set the maximum valid delay between frames in hundredth of seconds.
4765 Range is 0 to 65535. Default value is 65535 (nearly eleven
4766 minutes), the maximum value allowed by the specification.
4767
4768 default_delay
4769 Set the default delay between frames in hundredths of seconds.
4770 Range is 0 to 6000. Default value is 10.
4771
4772 ignore_loop
4773 GIF files can contain information to loop a certain number of times
4774 (or infinitely). If ignore_loop is set to 1, then the loop setting
4775 from the input will be ignored and looping will not occur. If set
4776 to 0, then looping will occur and will cycle the number of times
4777 according to the GIF. Default value is 1.
4778
4779 For example, with the overlay filter, place an infinitely looping GIF
4780 over another video:
4781
4782 ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv
4783
4784 Note that in the above example the shortest option for overlay filter
4785 is used to end the output video at the length of the shortest input
4786 file, which in this case is input.mp4 as the GIF in this example loops
4787 infinitely.
4788
4789 hls
4790 HLS demuxer
4791
4792 Apple HTTP Live Streaming demuxer.
4793
4794 This demuxer presents all AVStreams from all variant streams. The id
4795 field is set to the bitrate variant index number. By setting the
4796 discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), the
4797 caller can decide which variant streams to actually receive. The total
4798 bitrate of the variant that the stream belongs to is available in a
4799 metadata key named "variant_bitrate".
4800
4801 It accepts the following options:
4802
4803 live_start_index
4804 segment index to start live streams at (negative values are from
4805 the end).
4806
4807 prefer_x_start
4808 prefer to use #EXT-X-START if it's in playlist instead of
4809 live_start_index.
4810
4811 allowed_extensions
4812 ',' separated list of file extensions that hls is allowed to
4813 access.
4814
4815 max_reload
4816 Maximum number of times a insufficient list is attempted to be
4817 reloaded. Default value is 1000.
4818
4819 m3u8_hold_counters
4820 The maximum number of times to load m3u8 when it refreshes without
4821 new segments. Default value is 1000.
4822
4823 http_persistent
4824 Use persistent HTTP connections. Applicable only for HTTP streams.
4825 Enabled by default.
4826
4827 http_multiple
4828 Use multiple HTTP connections for downloading HTTP segments.
4829 Enabled by default for HTTP/1.1 servers.
4830
4831 http_seekable
4832 Use HTTP partial requests for downloading HTTP segments. 0 =
4833 disable, 1 = enable, -1 = auto, Default is auto.
4834
4835 seg_format_options
4836 Set options for the demuxer of media segments using a list of
4837 key=value pairs separated by ":".
4838
4839 seg_max_retry
4840 Maximum number of times to reload a segment on error, useful when
4841 segment skip on network error is not desired. Default value is 0.
4842
4843 image2
4844 Image file demuxer.
4845
4846 This demuxer reads from a list of image files specified by a pattern.
4847 The syntax and meaning of the pattern is specified by the option
4848 pattern_type.
4849
4850 The pattern may contain a suffix which is used to automatically
4851 determine the format of the images contained in the files.
4852
4853 The size, the pixel format, and the format of each image must be the
4854 same for all the files in the sequence.
4855
4856 This demuxer accepts the following options:
4857
4858 framerate
4859 Set the frame rate for the video stream. It defaults to 25.
4860
4861 loop
4862 If set to 1, loop over the input. Default value is 0.
4863
4864 pattern_type
4865 Select the pattern type used to interpret the provided filename.
4866
4867 pattern_type accepts one of the following values.
4868
4869 none
4870 Disable pattern matching, therefore the video will only contain
4871 the specified image. You should use this option if you do not
4872 want to create sequences from multiple images and your
4873 filenames may contain special pattern characters.
4874
4875 sequence
4876 Select a sequence pattern type, used to specify a sequence of
4877 files indexed by sequential numbers.
4878
4879 A sequence pattern may contain the string "%d" or "%0Nd", which
4880 specifies the position of the characters representing a
4881 sequential number in each filename matched by the pattern. If
4882 the form "%d0Nd" is used, the string representing the number in
4883 each filename is 0-padded and N is the total number of 0-padded
4884 digits representing the number. The literal character '%' can
4885 be specified in the pattern with the string "%%".
4886
4887 If the sequence pattern contains "%d" or "%0Nd", the first
4888 filename of the file list specified by the pattern must contain
4889 a number inclusively contained between start_number and
4890 start_number+start_number_range-1, and all the following
4891 numbers must be sequential.
4892
4893 For example the pattern "img-%03d.bmp" will match a sequence of
4894 filenames of the form img-001.bmp, img-002.bmp, ...,
4895 img-010.bmp, etc.; the pattern "i%%m%%g-%d.jpg" will match a
4896 sequence of filenames of the form i%m%g-1.jpg, i%m%g-2.jpg,
4897 ..., i%m%g-10.jpg, etc.
4898
4899 Note that the pattern must not necessarily contain "%d" or
4900 "%0Nd", for example to convert a single image file img.jpeg you
4901 can employ the command:
4902
4903 ffmpeg -i img.jpeg img.png
4904
4905 glob
4906 Select a glob wildcard pattern type.
4907
4908 The pattern is interpreted like a glob() pattern. This is only
4909 selectable if libavformat was compiled with globbing support.
4910
4911 glob_sequence (deprecated, will be removed)
4912 Select a mixed glob wildcard/sequence pattern.
4913
4914 If your version of libavformat was compiled with globbing
4915 support, and the provided pattern contains at least one glob
4916 meta character among "%*?[]{}" that is preceded by an unescaped
4917 "%", the pattern is interpreted like a glob() pattern,
4918 otherwise it is interpreted like a sequence pattern.
4919
4920 All glob special characters "%*?[]{}" must be prefixed with
4921 "%". To escape a literal "%" you shall use "%%".
4922
4923 For example the pattern "foo-%*.jpeg" will match all the
4924 filenames prefixed by "foo-" and terminating with ".jpeg", and
4925 "foo-%?%?%?.jpeg" will match all the filenames prefixed with
4926 "foo-", followed by a sequence of three characters, and
4927 terminating with ".jpeg".
4928
4929 This pattern type is deprecated in favor of glob and sequence.
4930
4931 Default value is glob_sequence.
4932
4933 pixel_format
4934 Set the pixel format of the images to read. If not specified the
4935 pixel format is guessed from the first image file in the sequence.
4936
4937 start_number
4938 Set the index of the file matched by the image file pattern to
4939 start to read from. Default value is 0.
4940
4941 start_number_range
4942 Set the index interval range to check when looking for the first
4943 image file in the sequence, starting from start_number. Default
4944 value is 5.
4945
4946 ts_from_file
4947 If set to 1, will set frame timestamp to modification time of image
4948 file. Note that monotonity of timestamps is not provided: images go
4949 in the same order as without this option. Default value is 0. If
4950 set to 2, will set frame timestamp to the modification time of the
4951 image file in nanosecond precision.
4952
4953 video_size
4954 Set the video size of the images to read. If not specified the
4955 video size is guessed from the first image file in the sequence.
4956
4957 export_path_metadata
4958 If set to 1, will add two extra fields to the metadata found in
4959 input, making them also available for other filters (see drawtext
4960 filter for examples). Default value is 0. The extra fields are
4961 described below:
4962
4963 lavf.image2dec.source_path
4964 Corresponds to the full path to the input file being read.
4965
4966 lavf.image2dec.source_basename
4967 Corresponds to the name of the file being read.
4968
4969 Examples
4970
4971 • Use ffmpeg for creating a video from the images in the file
4972 sequence img-001.jpeg, img-002.jpeg, ..., assuming an input frame
4973 rate of 10 frames per second:
4974
4975 ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
4976
4977 • As above, but start by reading from a file with index 100 in the
4978 sequence:
4979
4980 ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
4981
4982 • Read images matching the "*.png" glob pattern , that is all the
4983 files terminating with the ".png" suffix:
4984
4985 ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv
4986
4987 libgme
4988 The Game Music Emu library is a collection of video game music file
4989 emulators.
4990
4991 See <https://bitbucket.org/mpyne/game-music-emu/overview> for more
4992 information.
4993
4994 It accepts the following options:
4995
4996 track_index
4997 Set the index of which track to demux. The demuxer can only export
4998 one track. Track indexes start at 0. Default is to pick the first
4999 track. Number of tracks is exported as tracks metadata entry.
5000
5001 sample_rate
5002 Set the sampling rate of the exported track. Range is 1000 to
5003 999999. Default is 44100.
5004
5005 max_size (bytes)
5006 The demuxer buffers the entire file into memory. Adjust this value
5007 to set the maximum buffer size, which in turn, acts as a ceiling
5008 for the size of files that can be read. Default is 50 MiB.
5009
5010 libmodplug
5011 ModPlug based module demuxer
5012
5013 See <https://github.com/Konstanty/libmodplug>
5014
5015 It will export one 2-channel 16-bit 44.1 kHz audio stream. Optionally,
5016 a "pal8" 16-color video stream can be exported with or without printed
5017 metadata.
5018
5019 It accepts the following options:
5020
5021 noise_reduction
5022 Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default
5023 is 0.
5024
5025 reverb_depth
5026 Set amount of reverb. Range 0-100. Default is 0.
5027
5028 reverb_delay
5029 Set delay in ms, clamped to 40-250 ms. Default is 0.
5030
5031 bass_amount
5032 Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet)
5033 to 100 (loud). Default is 0.
5034
5035 bass_range
5036 Set cutoff i.e. upper-bound for bass frequencies. Range is 10-100
5037 Hz. Default is 0.
5038
5039 surround_depth
5040 Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100
5041 (heavy). Default is 0.
5042
5043 surround_delay
5044 Set surround delay in ms, clamped to 5-40 ms. Default is 0.
5045
5046 max_size
5047 The demuxer buffers the entire file into memory. Adjust this value
5048 to set the maximum buffer size, which in turn, acts as a ceiling
5049 for the size of files that can be read. Range is 0 to 100 MiB. 0
5050 removes buffer size limit (not recommended). Default is 5 MiB.
5051
5052 video_stream_expr
5053 String which is evaluated using the eval API to assign colors to
5054 the generated video stream. Variables which can be used are "x",
5055 "y", "w", "h", "t", "speed", "tempo", "order", "pattern" and "row".
5056
5057 video_stream
5058 Generate video stream. Can be 1 (on) or 0 (off). Default is 0.
5059
5060 video_stream_w
5061 Set video frame width in 'chars' where one char indicates 8 pixels.
5062 Range is 20-512. Default is 30.
5063
5064 video_stream_h
5065 Set video frame height in 'chars' where one char indicates 8
5066 pixels. Range is 20-512. Default is 30.
5067
5068 video_stream_ptxt
5069 Print metadata on video stream. Includes "speed", "tempo", "order",
5070 "pattern", "row" and "ts" (time in ms). Can be 1 (on) or 0 (off).
5071 Default is 1.
5072
5073 libopenmpt
5074 libopenmpt based module demuxer
5075
5076 See <https://lib.openmpt.org/libopenmpt/> for more information.
5077
5078 Some files have multiple subsongs (tracks) this can be set with the
5079 subsong option.
5080
5081 It accepts the following options:
5082
5083 subsong
5084 Set the subsong index. This can be either 'all', 'auto', or the
5085 index of the subsong. Subsong indexes start at 0. The default is
5086 'auto'.
5087
5088 The default value is to let libopenmpt choose.
5089
5090 layout
5091 Set the channel layout. Valid values are 1, 2, and 4 channel
5092 layouts. The default value is STEREO.
5093
5094 sample_rate
5095 Set the sample rate for libopenmpt to output. Range is from 1000
5096 to INT_MAX. The value default is 48000.
5097
5098 mov/mp4/3gp
5099 Demuxer for Quicktime File Format & ISO/IEC Base Media File Format
5100 (ISO/IEC 14496-12 or MPEG-4 Part 12, ISO/IEC 15444-12 or JPEG 2000 Part
5101 12).
5102
5103 Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism,
5104 ismv, isma, f4v
5105
5106 Options
5107
5108 This demuxer accepts the following options:
5109
5110 enable_drefs
5111 Enable loading of external tracks, disabled by default. Enabling
5112 this can theoretically leak information in some use cases.
5113
5114 use_absolute_path
5115 Allows loading of external tracks via absolute paths, disabled by
5116 default. Enabling this poses a security risk. It should only be
5117 enabled if the source is known to be non-malicious.
5118
5119 seek_streams_individually
5120 When seeking, identify the closest point in each stream
5121 individually and demux packets in that stream from identified
5122 point. This can lead to a different sequence of packets compared to
5123 demuxing linearly from the beginning. Default is true.
5124
5125 ignore_editlist
5126 Ignore any edit list atoms. The demuxer, by default, modifies the
5127 stream index to reflect the timeline described by the edit list.
5128 Default is false.
5129
5130 advanced_editlist
5131 Modify the stream index to reflect the timeline described by the
5132 edit list. "ignore_editlist" must be set to false for this option
5133 to be effective. If both "ignore_editlist" and this option are set
5134 to false, then only the start of the stream index is modified to
5135 reflect initial dwell time or starting timestamp described by the
5136 edit list. Default is true.
5137
5138 ignore_chapters
5139 Don't parse chapters. This includes GoPro 'HiLight' tags/moments.
5140 Note that chapters are only parsed when input is seekable. Default
5141 is false.
5142
5143 use_mfra_for
5144 For seekable fragmented input, set fragment's starting timestamp
5145 from media fragment random access box, if present.
5146
5147 Following options are available:
5148
5149 auto
5150 Auto-detect whether to set mfra timestamps as PTS or DTS
5151 (default)
5152
5153 dts Set mfra timestamps as DTS
5154
5155 pts Set mfra timestamps as PTS
5156
5157 0 Don't use mfra box to set timestamps
5158
5159 use_tfdt
5160 For fragmented input, set fragment's starting timestamp to
5161 "baseMediaDecodeTime" from the "tfdt" box. Default is enabled,
5162 which will prefer to use the "tfdt" box to set DTS. Disable to use
5163 the "earliest_presentation_time" from the "sidx" box. In either
5164 case, the timestamp from the "mfra" box will be used if it's
5165 available and "use_mfra_for" is set to pts or dts.
5166
5167 export_all
5168 Export unrecognized boxes within the udta box as metadata entries.
5169 The first four characters of the box type are set as the key.
5170 Default is false.
5171
5172 export_xmp
5173 Export entire contents of XMP_ box and uuid box as a string with
5174 key "xmp". Note that if "export_all" is set and this option isn't,
5175 the contents of XMP_ box are still exported but with key "XMP_".
5176 Default is false.
5177
5178 activation_bytes
5179 4-byte key required to decrypt Audible AAX and AAX+ files. See
5180 Audible AAX subsection below.
5181
5182 audible_fixed_key
5183 Fixed key used for handling Audible AAX/AAX+ files. It has been
5184 pre-set so should not be necessary to specify.
5185
5186 decryption_key
5187 16-byte key, in hex, to decrypt files encrypted using ISO Common
5188 Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
5189
5190 max_stts_delta
5191 Very high sample deltas written in a trak's stts box may
5192 occasionally be intended but usually they are written in error or
5193 used to store a negative value for dts correction when treated as
5194 signed 32-bit integers. This option lets the user set an upper
5195 limit, beyond which the delta is clamped to 1. Values greater than
5196 the limit if negative when cast to int32 are used to adjust onward
5197 dts.
5198
5199 Unit is the track time scale. Range is 0 to UINT_MAX. Default is
5200 "UINT_MAX - 48000*10" which allows upto a 10 second dts correction
5201 for 48 kHz audio streams while accommodating 99.9% of "uint32"
5202 range.
5203
5204 Audible AAX
5205
5206 Audible AAX files are encrypted M4B files, and they can be decrypted by
5207 specifying a 4 byte activation secret.
5208
5209 ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
5210
5211 mpegts
5212 MPEG-2 transport stream demuxer.
5213
5214 This demuxer accepts the following options:
5215
5216 resync_size
5217 Set size limit for looking up a new synchronization. Default value
5218 is 65536.
5219
5220 skip_unknown_pmt
5221 Skip PMTs for programs not defined in the PAT. Default value is 0.
5222
5223 fix_teletext_pts
5224 Override teletext packet PTS and DTS values with the timestamps
5225 calculated from the PCR of the first program which the teletext
5226 stream is part of and is not discarded. Default value is 1, set
5227 this option to 0 if you want your teletext packet PTS and DTS
5228 values untouched.
5229
5230 ts_packetsize
5231 Output option carrying the raw packet size in bytes. Show the
5232 detected raw packet size, cannot be set by the user.
5233
5234 scan_all_pmts
5235 Scan and combine all PMTs. The value is an integer with value from
5236 -1 to 1 (-1 means automatic setting, 1 means enabled, 0 means
5237 disabled). Default value is -1.
5238
5239 merge_pmt_versions
5240 Re-use existing streams when a PMT's version is updated and
5241 elementary streams move to different PIDs. Default value is 0.
5242
5243 max_packet_size
5244 Set maximum size, in bytes, of packet emitted by the demuxer.
5245 Payloads above this size are split across multiple packets. Range
5246 is 1 to INT_MAX/2. Default is 204800 bytes.
5247
5248 mpjpeg
5249 MJPEG encapsulated in multi-part MIME demuxer.
5250
5251 This demuxer allows reading of MJPEG, where each frame is represented
5252 as a part of multipart/x-mixed-replace stream.
5253
5254 strict_mime_boundary
5255 Default implementation applies a relaxed standard to multi-part
5256 MIME boundary detection, to prevent regression with numerous
5257 existing endpoints not generating a proper MIME MJPEG stream.
5258 Turning this option on by setting it to 1 will result in a stricter
5259 check of the boundary value.
5260
5261 rawvideo
5262 Raw video demuxer.
5263
5264 This demuxer allows one to read raw video data. Since there is no
5265 header specifying the assumed video parameters, the user must specify
5266 them in order to be able to decode the data correctly.
5267
5268 This demuxer accepts the following options:
5269
5270 framerate
5271 Set input video frame rate. Default value is 25.
5272
5273 pixel_format
5274 Set the input video pixel format. Default value is "yuv420p".
5275
5276 video_size
5277 Set the input video size. This value must be specified explicitly.
5278
5279 For example to read a rawvideo file input.raw with ffplay, assuming a
5280 pixel format of "rgb24", a video size of "320x240", and a frame rate of
5281 10 images per second, use the command:
5282
5283 ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw
5284
5285 sbg
5286 SBaGen script demuxer.
5287
5288 This demuxer reads the script language used by SBaGen
5289 <http://uazu.net/sbagen/> to generate binaural beats sessions. A SBG
5290 script looks like that:
5291
5292 -SE
5293 a: 300-2.5/3 440+4.5/0
5294 b: 300-2.5/0 440+4.5/3
5295 off: -
5296 NOW == a
5297 +0:07:00 == b
5298 +0:14:00 == a
5299 +0:21:00 == b
5300 +0:30:00 off
5301
5302 A SBG script can mix absolute and relative timestamps. If the script
5303 uses either only absolute timestamps (including the script start time)
5304 or only relative ones, then its layout is fixed, and the conversion is
5305 straightforward. On the other hand, if the script mixes both kind of
5306 timestamps, then the NOW reference for relative timestamps will be
5307 taken from the current time of day at the time the script is read, and
5308 the script layout will be frozen according to that reference. That
5309 means that if the script is directly played, the actual times will
5310 match the absolute timestamps up to the sound controller's clock
5311 accuracy, but if the user somehow pauses the playback or seeks, all
5312 times will be shifted accordingly.
5313
5314 tedcaptions
5315 JSON captions used for <http://www.ted.com/>.
5316
5317 TED does not provide links to the captions, but they can be guessed
5318 from the page. The file tools/bookmarklets.html from the FFmpeg source
5319 tree contains a bookmarklet to expose them.
5320
5321 This demuxer accepts the following option:
5322
5323 start_time
5324 Set the start time of the TED talk, in milliseconds. The default is
5325 15000 (15s). It is used to sync the captions with the downloadable
5326 videos, because they include a 15s intro.
5327
5328 Example: convert the captions to a format most players understand:
5329
5330 ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
5331
5332 vapoursynth
5333 Vapoursynth wrapper.
5334
5335 Due to security concerns, Vapoursynth scripts will not be autodetected
5336 so the input format has to be forced. For ff* CLI tools, add "-f
5337 vapoursynth" before the input "-i yourscript.vpy".
5338
5339 This demuxer accepts the following option:
5340
5341 max_script_size
5342 The demuxer buffers the entire script into memory. Adjust this
5343 value to set the maximum buffer size, which in turn, acts as a
5344 ceiling for the size of scripts that can be read. Default is 1
5345 MiB.
5346
5348 FFmpeg is able to dump metadata from media files into a simple
5349 UTF-8-encoded INI-like text file and then load it back using the
5350 metadata muxer/demuxer.
5351
5352 The file format is as follows:
5353
5354 1. A file consists of a header and a number of metadata tags divided
5355 into sections, each on its own line.
5356
5357 2. The header is a ;FFMETADATA string, followed by a version number
5358 (now 1).
5359
5360 3. Metadata tags are of the form key=value
5361
5362 4. Immediately after header follows global metadata
5363
5364 5. After global metadata there may be sections with
5365 per-stream/per-chapter metadata.
5366
5367 6. A section starts with the section name in uppercase (i.e. STREAM or
5368 CHAPTER) in brackets ([, ]) and ends with next section or end of
5369 file.
5370
5371 7. At the beginning of a chapter section there may be an optional
5372 timebase to be used for start/end values. It must be in form
5373 TIMEBASE=num/den, where num and den are integers. If the timebase
5374 is missing then start/end times are assumed to be in nanoseconds.
5375
5376 Next a chapter section must contain chapter start and end times in
5377 form START=num, END=num, where num is a positive integer.
5378
5379 8. Empty lines and lines starting with ; or # are ignored.
5380
5381 9. Metadata keys or values containing special characters (=, ;, #, \
5382 and a newline) must be escaped with a backslash \.
5383
5384 10. Note that whitespace in metadata (e.g. foo = bar) is considered to
5385 be a part of the tag (in the example above key is foo , value is
5386 bar).
5387
5388 A ffmetadata file might look like this:
5389
5390 ;FFMETADATA1
5391 title=bike\\shed
5392 ;this is a comment
5393 artist=FFmpeg troll team
5394
5395 [CHAPTER]
5396 TIMEBASE=1/1000
5397 START=0
5398 #chapter ends at 0:01:00
5399 END=60000
5400 title=chapter \#1
5401 [STREAM]
5402 title=multi\
5403 line
5404
5405 By using the ffmetadata muxer and demuxer it is possible to extract
5406 metadata from an input file to an ffmetadata file, and then transcode
5407 the file into an output file with the edited ffmetadata file.
5408
5409 Extracting an ffmetadata file with ffmpeg goes as follows:
5410
5411 ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
5412
5413 Reinserting edited metadata information from the FFMETADATAFILE file
5414 can be done as:
5415
5416 ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
5417
5419 The libavformat library provides some generic global options, which can
5420 be set on all the protocols. In addition each protocol may support so-
5421 called private options, which are specific for that component.
5422
5423 Options may be set by specifying -option value in the FFmpeg tools, or
5424 by setting the value explicitly in the "AVFormatContext" options or
5425 using the libavutil/opt.h API for programmatic use.
5426
5427 The list of supported options follows:
5428
5429 protocol_whitelist list (input)
5430 Set a ","-separated list of allowed protocols. "ALL" matches all
5431 protocols. Protocols prefixed by "-" are disabled. All protocols
5432 are allowed by default but protocols used by an another protocol
5433 (nested protocols) are restricted to a per protocol subset.
5434
5436 Protocols are configured elements in FFmpeg that enable access to
5437 resources that require specific protocols.
5438
5439 When you configure your FFmpeg build, all the supported protocols are
5440 enabled by default. You can list all available ones using the configure
5441 option "--list-protocols".
5442
5443 You can disable all the protocols using the configure option
5444 "--disable-protocols", and selectively enable a protocol using the
5445 option "--enable-protocol=PROTOCOL", or you can disable a particular
5446 protocol using the option "--disable-protocol=PROTOCOL".
5447
5448 The option "-protocols" of the ff* tools will display the list of
5449 supported protocols.
5450
5451 All protocols accept the following options:
5452
5453 rw_timeout
5454 Maximum time to wait for (network) read/write operations to
5455 complete, in microseconds.
5456
5457 A description of the currently available protocols follows.
5458
5459 amqp
5460 Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker
5461 based publish-subscribe communication protocol.
5462
5463 FFmpeg must be compiled with --enable-librabbitmq to support AMQP. A
5464 separate AMQP broker must also be run. An example open-source AMQP
5465 broker is RabbitMQ.
5466
5467 After starting the broker, an FFmpeg client may stream data to the
5468 broker using the command:
5469
5470 ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]
5471
5472 Where hostname and port (default is 5672) is the address of the broker.
5473 The client may also set a user/password for authentication. The default
5474 for both fields is "guest". Name of virtual host on broker can be set
5475 with vhost. The default value is "/".
5476
5477 Muliple subscribers may stream from the broker using the command:
5478
5479 ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]
5480
5481 In RabbitMQ all data published to the broker flows through a specific
5482 exchange, and each subscribing client has an assigned queue/buffer.
5483 When a packet arrives at an exchange, it may be copied to a client's
5484 queue depending on the exchange and routing_key fields.
5485
5486 The following options are supported:
5487
5488 exchange
5489 Sets the exchange to use on the broker. RabbitMQ has several
5490 predefined exchanges: "amq.direct" is the default exchange, where
5491 the publisher and subscriber must have a matching routing_key;
5492 "amq.fanout" is the same as a broadcast operation (i.e. the data is
5493 forwarded to all queues on the fanout exchange independent of the
5494 routing_key); and "amq.topic" is similar to "amq.direct", but
5495 allows for more complex pattern matching (refer to the RabbitMQ
5496 documentation).
5497
5498 routing_key
5499 Sets the routing key. The default value is "amqp". The routing key
5500 is used on the "amq.direct" and "amq.topic" exchanges to decide
5501 whether packets are written to the queue of a subscriber.
5502
5503 pkt_size
5504 Maximum size of each packet sent/received to the broker. Default is
5505 131072. Minimum is 4096 and max is any large value (representable
5506 by an int). When receiving packets, this sets an internal buffer
5507 size in FFmpeg. It should be equal to or greater than the size of
5508 the published packets to the broker. Otherwise the received message
5509 may be truncated causing decoding errors.
5510
5511 connection_timeout
5512 The timeout in seconds during the initial connection to the broker.
5513 The default value is rw_timeout, or 5 seconds if rw_timeout is not
5514 set.
5515
5516 delivery_mode mode
5517 Sets the delivery mode of each message sent to broker. The
5518 following values are accepted:
5519
5520 persistent
5521 Delivery mode set to "persistent" (2). This is the default
5522 value. Messages may be written to the broker's disk depending
5523 on its setup.
5524
5525 non-persistent
5526 Delivery mode set to "non-persistent" (1). Messages will stay
5527 in broker's memory unless the broker is under memory pressure.
5528
5529 async
5530 Asynchronous data filling wrapper for input stream.
5531
5532 Fill data in a background thread, to decouple I/O operation from demux
5533 thread.
5534
5535 async:<URL>
5536 async:http://host/resource
5537 async:cache:http://host/resource
5538
5539 bluray
5540 Read BluRay playlist.
5541
5542 The accepted options are:
5543
5544 angle
5545 BluRay angle
5546
5547 chapter
5548 Start chapter (1...N)
5549
5550 playlist
5551 Playlist to read (BDMV/PLAYLIST/?????.mpls)
5552
5553 Examples:
5554
5555 Read longest playlist from BluRay mounted to /mnt/bluray:
5556
5557 bluray:/mnt/bluray
5558
5559 Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start
5560 from chapter 2:
5561
5562 -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
5563
5564 cache
5565 Caching wrapper for input stream.
5566
5567 Cache the input stream to temporary file. It brings seeking capability
5568 to live streams.
5569
5570 The accepted options are:
5571
5572 read_ahead_limit
5573 Amount in bytes that may be read ahead when seeking isn't
5574 supported. Range is -1 to INT_MAX. -1 for unlimited. Default is
5575 65536.
5576
5577 URL Syntax is
5578
5579 cache:<URL>
5580
5581 concat
5582 Physical concatenation protocol.
5583
5584 Read and seek from many resources in sequence as if they were a unique
5585 resource.
5586
5587 A URL accepted by this protocol has the syntax:
5588
5589 concat:<URL1>|<URL2>|...|<URLN>
5590
5591 where URL1, URL2, ..., URLN are the urls of the resource to be
5592 concatenated, each one possibly specifying a distinct protocol.
5593
5594 For example to read a sequence of files split1.mpeg, split2.mpeg,
5595 split3.mpeg with ffplay use the command:
5596
5597 ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
5598
5599 Note that you may need to escape the character "|" which is special for
5600 many shells.
5601
5602 concatf
5603 Physical concatenation protocol using a line break delimited list of
5604 resources.
5605
5606 Read and seek from many resources in sequence as if they were a unique
5607 resource.
5608
5609 A URL accepted by this protocol has the syntax:
5610
5611 concatf:<URL>
5612
5613 where URL is the url containing a line break delimited list of
5614 resources to be concatenated, each one possibly specifying a distinct
5615 protocol. Special characters must be escaped with backslash or single
5616 quotes. See the "Quoting and escaping" section in the ffmpeg-utils(1)
5617 manual.
5618
5619 For example to read a sequence of files split1.mpeg, split2.mpeg,
5620 split3.mpeg listed in separate lines within a file split.txt with
5621 ffplay use the command:
5622
5623 ffplay concatf:split.txt
5624
5625 Where split.txt contains the lines:
5626
5627 split1.mpeg
5628 split2.mpeg
5629 split3.mpeg
5630
5631 crypto
5632 AES-encrypted stream reading protocol.
5633
5634 The accepted options are:
5635
5636 key Set the AES decryption key binary block from given hexadecimal
5637 representation.
5638
5639 iv Set the AES decryption initialization vector binary block from
5640 given hexadecimal representation.
5641
5642 Accepted URL formats:
5643
5644 crypto:<URL>
5645 crypto+<URL>
5646
5647 data
5648 Data in-line in the URI. See
5649 <http://en.wikipedia.org/wiki/Data_URI_scheme>.
5650
5651 For example, to convert a GIF file given inline with ffmpeg:
5652
5653 ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
5654
5655 fd
5656 File descriptor access protocol.
5657
5658 The accepted syntax is:
5659
5660 fd: -fd <file_descriptor>
5661
5662 If fd is not specified, by default the stdout file descriptor will be
5663 used for writing, stdin for reading. Unlike the pipe protocol, fd
5664 protocol has seek support if it corresponding to a regular file. fd
5665 protocol doesn't support pass file descriptor via URL for security.
5666
5667 This protocol accepts the following options:
5668
5669 blocksize
5670 Set I/O operation maximum block size, in bytes. Default value is
5671 "INT_MAX", which results in not limiting the requested block size.
5672 Setting this value reasonably low improves user termination request
5673 reaction time, which is valuable if data transmission is slow.
5674
5675 fd Set file descriptor.
5676
5677 file
5678 File access protocol.
5679
5680 Read from or write to a file.
5681
5682 A file URL can have the form:
5683
5684 file:<filename>
5685
5686 where filename is the path of the file to read.
5687
5688 An URL that does not have a protocol prefix will be assumed to be a
5689 file URL. Depending on the build, an URL that looks like a Windows path
5690 with the drive letter at the beginning will also be assumed to be a
5691 file URL (usually not the case in builds for unix-like systems).
5692
5693 For example to read from a file input.mpeg with ffmpeg use the command:
5694
5695 ffmpeg -i file:input.mpeg output.mpeg
5696
5697 This protocol accepts the following options:
5698
5699 truncate
5700 Truncate existing files on write, if set to 1. A value of 0
5701 prevents truncating. Default value is 1.
5702
5703 blocksize
5704 Set I/O operation maximum block size, in bytes. Default value is
5705 "INT_MAX", which results in not limiting the requested block size.
5706 Setting this value reasonably low improves user termination request
5707 reaction time, which is valuable for files on slow medium.
5708
5709 follow
5710 If set to 1, the protocol will retry reading at the end of the
5711 file, allowing reading files that still are being written. In order
5712 for this to terminate, you either need to use the rw_timeout
5713 option, or use the interrupt callback (for API users).
5714
5715 seekable
5716 Controls if seekability is advertised on the file. 0 means non-
5717 seekable, -1 means auto (seekable for normal files, non-seekable
5718 for named pipes).
5719
5720 Many demuxers handle seekable and non-seekable resources
5721 differently, overriding this might speed up opening certain files
5722 at the cost of losing some features (e.g. accurate seeking).
5723
5724 ftp
5725 FTP (File Transfer Protocol).
5726
5727 Read from or write to remote resources using FTP protocol.
5728
5729 Following syntax is required.
5730
5731 ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
5732
5733 This protocol accepts the following options.
5734
5735 timeout
5736 Set timeout in microseconds of socket I/O operations used by the
5737 underlying low level operation. By default it is set to -1, which
5738 means that the timeout is not specified.
5739
5740 ftp-user
5741 Set a user to be used for authenticating to the FTP server. This is
5742 overridden by the user in the FTP URL.
5743
5744 ftp-password
5745 Set a password to be used for authenticating to the FTP server.
5746 This is overridden by the password in the FTP URL, or by ftp-
5747 anonymous-password if no user is set.
5748
5749 ftp-anonymous-password
5750 Password used when login as anonymous user. Typically an e-mail
5751 address should be used.
5752
5753 ftp-write-seekable
5754 Control seekability of connection during encoding. If set to 1 the
5755 resource is supposed to be seekable, if set to 0 it is assumed not
5756 to be seekable. Default value is 0.
5757
5758 NOTE: Protocol can be used as output, but it is recommended to not do
5759 it, unless special care is taken (tests, customized server
5760 configuration etc.). Different FTP servers behave in different way
5761 during seek operation. ff* tools may produce incomplete content due to
5762 server limitations.
5763
5764 gopher
5765 Gopher protocol.
5766
5767 gophers
5768 Gophers protocol.
5769
5770 The Gopher protocol with TLS encapsulation.
5771
5772 hls
5773 Read Apple HTTP Live Streaming compliant segmented stream as a uniform
5774 one. The M3U8 playlists describing the segments can be remote HTTP
5775 resources or local files, accessed using the standard file protocol.
5776 The nested protocol is declared by specifying "+proto" after the hls
5777 URI scheme name, where proto is either "file" or "http".
5778
5779 hls+http://host/path/to/remote/resource.m3u8
5780 hls+file://path/to/local/resource.m3u8
5781
5782 Using this protocol is discouraged - the hls demuxer should work just
5783 as well (if not, please report the issues) and is more complete. To
5784 use the hls demuxer instead, simply use the direct URLs to the m3u8
5785 files.
5786
5787 http
5788 HTTP (Hyper Text Transfer Protocol).
5789
5790 This protocol accepts the following options:
5791
5792 seekable
5793 Control seekability of connection. If set to 1 the resource is
5794 supposed to be seekable, if set to 0 it is assumed not to be
5795 seekable, if set to -1 it will try to autodetect if it is seekable.
5796 Default value is -1.
5797
5798 chunked_post
5799 If set to 1 use chunked Transfer-Encoding for posts, default is 1.
5800
5801 content_type
5802 Set a specific content type for the POST messages or for listen
5803 mode.
5804
5805 http_proxy
5806 set HTTP proxy to tunnel through e.g. http://example.com:1234
5807
5808 headers
5809 Set custom HTTP headers, can override built in default headers. The
5810 value must be a string encoding the headers.
5811
5812 multiple_requests
5813 Use persistent connections if set to 1, default is 0.
5814
5815 post_data
5816 Set custom HTTP post data.
5817
5818 referer
5819 Set the Referer header. Include 'Referer: URL' header in HTTP
5820 request.
5821
5822 user_agent
5823 Override the User-Agent header. If not specified the protocol will
5824 use a string describing the libavformat build. ("Lavf/<version>")
5825
5826 reconnect_at_eof
5827 If set then eof is treated like an error and causes reconnection,
5828 this is useful for live / endless streams.
5829
5830 reconnect_streamed
5831 If set then even streamed/non seekable streams will be reconnected
5832 on errors.
5833
5834 reconnect_on_network_error
5835 Reconnect automatically in case of TCP/TLS errors during connect.
5836
5837 reconnect_on_http_error
5838 A comma separated list of HTTP status codes to reconnect on. The
5839 list can include specific status codes (e.g. '503') or the strings
5840 '4xx' / '5xx'.
5841
5842 reconnect_delay_max
5843 Sets the maximum delay in seconds after which to give up
5844 reconnecting
5845
5846 mime_type
5847 Export the MIME type.
5848
5849 http_version
5850 Exports the HTTP response version number. Usually "1.0" or "1.1".
5851
5852 icy If set to 1 request ICY (SHOUTcast) metadata from the server. If
5853 the server supports this, the metadata has to be retrieved by the
5854 application by reading the icy_metadata_headers and
5855 icy_metadata_packet options. The default is 1.
5856
5857 icy_metadata_headers
5858 If the server supports ICY metadata, this contains the ICY-specific
5859 HTTP reply headers, separated by newline characters.
5860
5861 icy_metadata_packet
5862 If the server supports ICY metadata, and icy was set to 1, this
5863 contains the last non-empty metadata packet sent by the server. It
5864 should be polled in regular intervals by applications interested in
5865 mid-stream metadata updates.
5866
5867 cookies
5868 Set the cookies to be sent in future requests. The format of each
5869 cookie is the same as the value of a Set-Cookie HTTP response
5870 field. Multiple cookies can be delimited by a newline character.
5871
5872 offset
5873 Set initial byte offset.
5874
5875 end_offset
5876 Try to limit the request to bytes preceding this offset.
5877
5878 method
5879 When used as a client option it sets the HTTP method for the
5880 request.
5881
5882 When used as a server option it sets the HTTP method that is going
5883 to be expected from the client(s). If the expected and the
5884 received HTTP method do not match the client will be given a Bad
5885 Request response. When unset the HTTP method is not checked for
5886 now. This will be replaced by autodetection in the future.
5887
5888 listen
5889 If set to 1 enables experimental HTTP server. This can be used to
5890 send data when used as an output option, or read data from a client
5891 with HTTP POST when used as an input option. If set to 2 enables
5892 experimental multi-client HTTP server. This is not yet implemented
5893 in ffmpeg.c and thus must not be used as a command line option.
5894
5895 # Server side (sending):
5896 ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<server>:<port>
5897
5898 # Client side (receiving):
5899 ffmpeg -i http://<server>:<port> -c copy somefile.ogg
5900
5901 # Client can also be done with wget:
5902 wget http://<server>:<port> -O somefile.ogg
5903
5904 # Server side (receiving):
5905 ffmpeg -listen 1 -i http://<server>:<port> -c copy somefile.ogg
5906
5907 # Client side (sending):
5908 ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<server>:<port>
5909
5910 # Client can also be done with wget:
5911 wget --post-file=somefile.ogg http://<server>:<port>
5912
5913 send_expect_100
5914 Send an Expect: 100-continue header for POST. If set to 1 it will
5915 send, if set to 0 it won't, if set to -1 it will try to send if it
5916 is applicable. Default value is -1.
5917
5918 auth_type
5919 Set HTTP authentication type. No option for Digest, since this
5920 method requires getting nonce parameters from the server first and
5921 can't be used straight away like Basic.
5922
5923 none
5924 Choose the HTTP authentication type automatically. This is the
5925 default.
5926
5927 basic
5928 Choose the HTTP basic authentication.
5929
5930 Basic authentication sends a Base64-encoded string that
5931 contains a user name and password for the client. Base64 is not
5932 a form of encryption and should be considered the same as
5933 sending the user name and password in clear text (Base64 is a
5934 reversible encoding). If a resource needs to be protected,
5935 strongly consider using an authentication scheme other than
5936 basic authentication. HTTPS/TLS should be used with basic
5937 authentication. Without these additional security
5938 enhancements, basic authentication should not be used to
5939 protect sensitive or valuable information.
5940
5941 HTTP Cookies
5942
5943 Some HTTP requests will be denied unless cookie values are passed in
5944 with the request. The cookies option allows these cookies to be
5945 specified. At the very least, each cookie must specify a value along
5946 with a path and domain. HTTP requests that match both the domain and
5947 path will automatically include the cookie value in the HTTP Cookie
5948 header field. Multiple cookies can be delimited by a newline.
5949
5950 The required syntax to play a stream specifying a cookie is:
5951
5952 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
5953
5954 Icecast
5955 Icecast protocol (stream to Icecast servers)
5956
5957 This protocol accepts the following options:
5958
5959 ice_genre
5960 Set the stream genre.
5961
5962 ice_name
5963 Set the stream name.
5964
5965 ice_description
5966 Set the stream description.
5967
5968 ice_url
5969 Set the stream website URL.
5970
5971 ice_public
5972 Set if the stream should be public. The default is 0 (not public).
5973
5974 user_agent
5975 Override the User-Agent header. If not specified a string of the
5976 form "Lavf/<version>" will be used.
5977
5978 password
5979 Set the Icecast mountpoint password.
5980
5981 content_type
5982 Set the stream content type. This must be set if it is different
5983 from audio/mpeg.
5984
5985 legacy_icecast
5986 This enables support for Icecast versions < 2.4.0, that do not
5987 support the HTTP PUT method but the SOURCE method.
5988
5989 tls Establish a TLS (HTTPS) connection to Icecast.
5990
5991 icecast://[<username>[:<password>]@]<server>:<port>/<mountpoint>
5992
5993 ipfs
5994 InterPlanetary File System (IPFS) protocol support. One can access
5995 files stored on the IPFS network through so-called gateways. These are
5996 http(s) endpoints. This protocol wraps the IPFS native protocols
5997 (ipfs:// and ipns://) to be sent to such a gateway. Users can (and
5998 should) host their own node which means this protocol will use one's
5999 local gateway to access files on the IPFS network.
6000
6001 This protocol accepts the following options:
6002
6003 gateway
6004 Defines the gateway to use. When not set, the protocol will first
6005 try locating the local gateway by looking at $IPFS_GATEWAY,
6006 $IPFS_PATH and "$HOME/.ipfs/", in that order.
6007
6008 One can use this protocol in 2 ways. Using IPFS:
6009
6010 ffplay ipfs://<hash>
6011
6012 Or the IPNS protocol (IPNS is mutable IPFS):
6013
6014 ffplay ipns://<hash>
6015
6016 mmst
6017 MMS (Microsoft Media Server) protocol over TCP.
6018
6019 mmsh
6020 MMS (Microsoft Media Server) protocol over HTTP.
6021
6022 The required syntax is:
6023
6024 mmsh://<server>[:<port>][/<app>][/<playpath>]
6025
6026 md5
6027 MD5 output protocol.
6028
6029 Computes the MD5 hash of the data to be written, and on close writes
6030 this to the designated output or stdout if none is specified. It can be
6031 used to test muxers without writing an actual file.
6032
6033 Some examples follow.
6034
6035 # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
6036 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
6037
6038 # Write the MD5 hash of the encoded AVI file to stdout.
6039 ffmpeg -i input.flv -f avi -y md5:
6040
6041 Note that some formats (typically MOV) require the output protocol to
6042 be seekable, so they will fail with the MD5 output protocol.
6043
6044 pipe
6045 UNIX pipe access protocol.
6046
6047 Read and write from UNIX pipes.
6048
6049 The accepted syntax is:
6050
6051 pipe:[<number>]
6052
6053 If fd isn't specified, number is the number corresponding to the file
6054 descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).
6055 If number is not specified, by default the stdout file descriptor will
6056 be used for writing, stdin for reading.
6057
6058 For example to read from stdin with ffmpeg:
6059
6060 cat test.wav | ffmpeg -i pipe:0
6061 # ...this is the same as...
6062 cat test.wav | ffmpeg -i pipe:
6063
6064 For writing to stdout with ffmpeg:
6065
6066 ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
6067 # ...this is the same as...
6068 ffmpeg -i test.wav -f avi pipe: | cat > test.avi
6069
6070 This protocol accepts the following options:
6071
6072 blocksize
6073 Set I/O operation maximum block size, in bytes. Default value is
6074 "INT_MAX", which results in not limiting the requested block size.
6075 Setting this value reasonably low improves user termination request
6076 reaction time, which is valuable if data transmission is slow.
6077
6078 fd Set file descriptor.
6079
6080 Note that some formats (typically MOV), require the output protocol to
6081 be seekable, so they will fail with the pipe output protocol.
6082
6083 prompeg
6084 Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
6085
6086 The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction
6087 mechanism for MPEG-2 Transport Streams sent over RTP.
6088
6089 This protocol must be used in conjunction with the "rtp_mpegts" muxer
6090 and the "rtp" protocol.
6091
6092 The required syntax is:
6093
6094 -f rtp_mpegts -fec prompeg=<option>=<val>... rtp://<hostname>:<port>
6095
6096 The destination UDP ports are "port + 2" for the column FEC stream and
6097 "port + 4" for the row FEC stream.
6098
6099 This protocol accepts the following options:
6100
6101 l=n The number of columns (4-20, LxD <= 100)
6102
6103 d=n The number of rows (4-20, LxD <= 100)
6104
6105 Example usage:
6106
6107 -f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<hostname>:<port>
6108
6109 rist
6110 Reliable Internet Streaming Transport protocol
6111
6112 The accepted options are:
6113
6114 rist_profile
6115 Supported values:
6116
6117 simple
6118 main
6119 This one is default.
6120
6121 advanced
6122 buffer_size
6123 Set internal RIST buffer size in milliseconds for retransmission of
6124 data. Default value is 0 which means the librist default (1 sec).
6125 Maximum value is 30 seconds.
6126
6127 fifo_size
6128 Size of the librist receiver output fifo in number of packets. This
6129 must be a power of 2. Defaults to 8192 (vs the librist default of
6130 1024).
6131
6132 overrun_nonfatal=1|0
6133 Survive in case of librist fifo buffer overrun. Default value is 0.
6134
6135 pkt_size
6136 Set maximum packet size for sending data. 1316 by default.
6137
6138 log_level
6139 Set loglevel for RIST logging messages. You only need to set this
6140 if you explicitly want to enable debug level messages or packet
6141 loss simulation, otherwise the regular loglevel is respected.
6142
6143 secret
6144 Set override of encryption secret, by default is unset.
6145
6146 encryption
6147 Set encryption type, by default is disabled. Acceptable values are
6148 128 and 256.
6149
6150 rtmp
6151 Real-Time Messaging Protocol.
6152
6153 The Real-Time Messaging Protocol (RTMP) is used for streaming
6154 multimedia content across a TCP/IP network.
6155
6156 The required syntax is:
6157
6158 rtmp://[<username>:<password>@]<server>[:<port>][/<app>][/<instance>][/<playpath>]
6159
6160 The accepted parameters are:
6161
6162 username
6163 An optional username (mostly for publishing).
6164
6165 password
6166 An optional password (mostly for publishing).
6167
6168 server
6169 The address of the RTMP server.
6170
6171 port
6172 The number of the TCP port to use (by default is 1935).
6173
6174 app It is the name of the application to access. It usually corresponds
6175 to the path where the application is installed on the RTMP server
6176 (e.g. /ondemand/, /flash/live/, etc.). You can override the value
6177 parsed from the URI through the "rtmp_app" option, too.
6178
6179 playpath
6180 It is the path or name of the resource to play with reference to
6181 the application specified in app, may be prefixed by "mp4:". You
6182 can override the value parsed from the URI through the
6183 "rtmp_playpath" option, too.
6184
6185 listen
6186 Act as a server, listening for an incoming connection.
6187
6188 timeout
6189 Maximum time to wait for the incoming connection. Implies listen.
6190
6191 Additionally, the following parameters can be set via command line
6192 options (or in code via "AVOption"s):
6193
6194 rtmp_app
6195 Name of application to connect on the RTMP server. This option
6196 overrides the parameter specified in the URI.
6197
6198 rtmp_buffer
6199 Set the client buffer time in milliseconds. The default is 3000.
6200
6201 rtmp_conn
6202 Extra arbitrary AMF connection parameters, parsed from a string,
6203 e.g. like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0". Each
6204 value is prefixed by a single character denoting the type, B for
6205 Boolean, N for number, S for string, O for object, or Z for null,
6206 followed by a colon. For Booleans the data must be either 0 or 1
6207 for FALSE or TRUE, respectively. Likewise for Objects the data
6208 must be 0 or 1 to end or begin an object, respectively. Data items
6209 in subobjects may be named, by prefixing the type with 'N' and
6210 specifying the name before the value (i.e. "NB:myFlag:1"). This
6211 option may be used multiple times to construct arbitrary AMF
6212 sequences.
6213
6214 rtmp_flashver
6215 Version of the Flash plugin used to run the SWF player. The default
6216 is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0
6217 (compatible; <libavformat version>).)
6218
6219 rtmp_flush_interval
6220 Number of packets flushed in the same request (RTMPT only). The
6221 default is 10.
6222
6223 rtmp_live
6224 Specify that the media is a live stream. No resuming or seeking in
6225 live streams is possible. The default value is "any", which means
6226 the subscriber first tries to play the live stream specified in the
6227 playpath. If a live stream of that name is not found, it plays the
6228 recorded stream. The other possible values are "live" and
6229 "recorded".
6230
6231 rtmp_pageurl
6232 URL of the web page in which the media was embedded. By default no
6233 value will be sent.
6234
6235 rtmp_playpath
6236 Stream identifier to play or to publish. This option overrides the
6237 parameter specified in the URI.
6238
6239 rtmp_subscribe
6240 Name of live stream to subscribe to. By default no value will be
6241 sent. It is only sent if the option is specified or if rtmp_live
6242 is set to live.
6243
6244 rtmp_swfhash
6245 SHA256 hash of the decompressed SWF file (32 bytes).
6246
6247 rtmp_swfsize
6248 Size of the decompressed SWF file, required for SWFVerification.
6249
6250 rtmp_swfurl
6251 URL of the SWF player for the media. By default no value will be
6252 sent.
6253
6254 rtmp_swfverify
6255 URL to player swf file, compute hash/size automatically.
6256
6257 rtmp_tcurl
6258 URL of the target stream. Defaults to proto://host[:port]/app.
6259
6260 tcp_nodelay=1|0
6261 Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
6262
6263 Remark: Writing to the socket is currently not optimized to
6264 minimize system calls and reduces the efficiency / effect of
6265 TCP_NODELAY.
6266
6267 For example to read with ffplay a multimedia resource named "sample"
6268 from the application "vod" from an RTMP server "myserver":
6269
6270 ffplay rtmp://myserver/vod/sample
6271
6272 To publish to a password protected server, passing the playpath and app
6273 names separately:
6274
6275 ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
6276
6277 rtmpe
6278 Encrypted Real-Time Messaging Protocol.
6279
6280 The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
6281 streaming multimedia content within standard cryptographic primitives,
6282 consisting of Diffie-Hellman key exchange and HMACSHA256, generating a
6283 pair of RC4 keys.
6284
6285 rtmps
6286 Real-Time Messaging Protocol over a secure SSL connection.
6287
6288 The Real-Time Messaging Protocol (RTMPS) is used for streaming
6289 multimedia content across an encrypted connection.
6290
6291 rtmpt
6292 Real-Time Messaging Protocol tunneled through HTTP.
6293
6294 The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
6295 for streaming multimedia content within HTTP requests to traverse
6296 firewalls.
6297
6298 rtmpte
6299 Encrypted Real-Time Messaging Protocol tunneled through HTTP.
6300
6301 The Encrypted Real-Time Messaging Protocol tunneled through HTTP
6302 (RTMPTE) is used for streaming multimedia content within HTTP requests
6303 to traverse firewalls.
6304
6305 rtmpts
6306 Real-Time Messaging Protocol tunneled through HTTPS.
6307
6308 The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is
6309 used for streaming multimedia content within HTTPS requests to traverse
6310 firewalls.
6311
6312 libsmbclient
6313 libsmbclient permits one to manipulate CIFS/SMB network resources.
6314
6315 Following syntax is required.
6316
6317 smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
6318
6319 This protocol accepts the following options.
6320
6321 timeout
6322 Set timeout in milliseconds of socket I/O operations used by the
6323 underlying low level operation. By default it is set to -1, which
6324 means that the timeout is not specified.
6325
6326 truncate
6327 Truncate existing files on write, if set to 1. A value of 0
6328 prevents truncating. Default value is 1.
6329
6330 workgroup
6331 Set the workgroup used for making connections. By default workgroup
6332 is not specified.
6333
6334 For more information see: <http://www.samba.org/>.
6335
6336 libssh
6337 Secure File Transfer Protocol via libssh
6338
6339 Read from or write to remote resources using SFTP protocol.
6340
6341 Following syntax is required.
6342
6343 sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
6344
6345 This protocol accepts the following options.
6346
6347 timeout
6348 Set timeout of socket I/O operations used by the underlying low
6349 level operation. By default it is set to -1, which means that the
6350 timeout is not specified.
6351
6352 truncate
6353 Truncate existing files on write, if set to 1. A value of 0
6354 prevents truncating. Default value is 1.
6355
6356 private_key
6357 Specify the path of the file containing private key to use during
6358 authorization. By default libssh searches for keys in the ~/.ssh/
6359 directory.
6360
6361 Example: Play a file stored on remote server.
6362
6363 ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
6364
6365 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
6366 Real-Time Messaging Protocol and its variants supported through
6367 librtmp.
6368
6369 Requires the presence of the librtmp headers and library during
6370 configuration. You need to explicitly configure the build with
6371 "--enable-librtmp". If enabled this will replace the native RTMP
6372 protocol.
6373
6374 This protocol provides most client functions and a few server functions
6375 needed to support RTMP, RTMP tunneled in HTTP (RTMPT), encrypted RTMP
6376 (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled variants of these
6377 encrypted types (RTMPTE, RTMPTS).
6378
6379 The required syntax is:
6380
6381 <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
6382
6383 where rtmp_proto is one of the strings "rtmp", "rtmpt", "rtmpe",
6384 "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
6385 server, port, app and playpath have the same meaning as specified for
6386 the RTMP native protocol. options contains a list of space-separated
6387 options of the form key=val.
6388
6389 See the librtmp manual page (man 3 librtmp) for more information.
6390
6391 For example, to stream a file in real-time to an RTMP server using
6392 ffmpeg:
6393
6394 ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
6395
6396 To play the same stream using ffplay:
6397
6398 ffplay "rtmp://myserver/live/mystream live=1"
6399
6400 rtp
6401 Real-time Transport Protocol.
6402
6403 The required syntax for an RTP URL is:
6404 rtp://hostname[:port][?option=val...]
6405
6406 port specifies the RTP port to use.
6407
6408 The following URL options are supported:
6409
6410 ttl=n
6411 Set the TTL (Time-To-Live) value (for multicast only).
6412
6413 rtcpport=n
6414 Set the remote RTCP port to n.
6415
6416 localrtpport=n
6417 Set the local RTP port to n.
6418
6419 localrtcpport=n'
6420 Set the local RTCP port to n.
6421
6422 pkt_size=n
6423 Set max packet size (in bytes) to n.
6424
6425 buffer_size=size
6426 Set the maximum UDP socket buffer size in bytes.
6427
6428 connect=0|1
6429 Do a connect() on the UDP socket (if set to 1) or not (if set to
6430 0).
6431
6432 sources=ip[,ip]
6433 List allowed source IP addresses.
6434
6435 block=ip[,ip]
6436 List disallowed (blocked) source IP addresses.
6437
6438 write_to_source=0|1
6439 Send packets to the source address of the latest received packet
6440 (if set to 1) or to a default remote address (if set to 0).
6441
6442 localport=n
6443 Set the local RTP port to n.
6444
6445 localaddr=addr
6446 Local IP address of a network interface used for sending packets or
6447 joining multicast groups.
6448
6449 timeout=n
6450 Set timeout (in microseconds) of socket I/O operations to n.
6451
6452 This is a deprecated option. Instead, localrtpport should be used.
6453
6454 Important notes:
6455
6456 1. If rtcpport is not set the RTCP port will be set to the RTP port
6457 value plus 1.
6458
6459 2. If localrtpport (the local RTP port) is not set any available port
6460 will be used for the local RTP and RTCP ports.
6461
6462 3. If localrtcpport (the local RTCP port) is not set it will be set to
6463 the local RTP port value plus 1.
6464
6465 rtsp
6466 Real-Time Streaming Protocol.
6467
6468 RTSP is not technically a protocol handler in libavformat, it is a
6469 demuxer and muxer. The demuxer supports both normal RTSP (with data
6470 transferred over RTP; this is used by e.g. Apple and Microsoft) and
6471 Real-RTSP (with data transferred over RDT).
6472
6473 The muxer can be used to send a stream using RTSP ANNOUNCE to a server
6474 supporting it (currently Darwin Streaming Server and Mischa
6475 Spiegelmock's <https://github.com/revmischa/rtsp-server>).
6476
6477 The required syntax for a RTSP url is:
6478
6479 rtsp://<hostname>[:<port>]/<path>
6480
6481 Options can be set on the ffmpeg/ffplay command line, or set in code
6482 via "AVOption"s or in "avformat_open_input".
6483
6484 Muxer
6485
6486 The following options are supported.
6487
6488 rtsp_transport
6489 Set RTSP transport protocols.
6490
6491 It accepts the following values:
6492
6493 udp Use UDP as lower transport protocol.
6494
6495 tcp Use TCP (interleaving within the RTSP control channel) as lower
6496 transport protocol.
6497
6498 Default value is 0.
6499
6500 rtsp_flags
6501 Set RTSP flags.
6502
6503 The following values are accepted:
6504
6505 latm
6506 Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC.
6507
6508 rfc2190
6509 Use RFC 2190 packetization instead of RFC 4629 for H.263.
6510
6511 skip_rtcp
6512 Don't send RTCP sender reports.
6513
6514 h264_mode0
6515 Use mode 0 for H.264 in RTP.
6516
6517 send_bye
6518 Send RTCP BYE packets when finishing.
6519
6520 Default value is 0.
6521
6522 min_port
6523 Set minimum local UDP port. Default value is 5000.
6524
6525 max_port
6526 Set maximum local UDP port. Default value is 65000.
6527
6528 buffer_size
6529 Set the maximum socket buffer size in bytes.
6530
6531 pkt_size
6532 Set max send packet size (in bytes). Default value is 1472.
6533
6534 Demuxer
6535
6536 The following options are supported.
6537
6538 initial_pause
6539 Do not start playing the stream immediately if set to 1. Default
6540 value is 0.
6541
6542 rtsp_transport
6543 Set RTSP transport protocols.
6544
6545 It accepts the following values:
6546
6547 udp Use UDP as lower transport protocol.
6548
6549 tcp Use TCP (interleaving within the RTSP control channel) as lower
6550 transport protocol.
6551
6552 udp_multicast
6553 Use UDP multicast as lower transport protocol.
6554
6555 http
6556 Use HTTP tunneling as lower transport protocol, which is useful
6557 for passing proxies.
6558
6559 https
6560 Use HTTPs tunneling as lower transport protocol, which is
6561 useful for passing proxies and widely used for security
6562 consideration.
6563
6564 Multiple lower transport protocols may be specified, in that case
6565 they are tried one at a time (if the setup of one fails, the next
6566 one is tried). For the muxer, only the tcp and udp options are
6567 supported.
6568
6569 rtsp_flags
6570 Set RTSP flags.
6571
6572 The following values are accepted:
6573
6574 filter_src
6575 Accept packets only from negotiated peer address and port.
6576
6577 listen
6578 Act as a server, listening for an incoming connection.
6579
6580 prefer_tcp
6581 Try TCP for RTP transport first, if TCP is available as RTSP
6582 RTP transport.
6583
6584 satip_raw
6585 Export raw MPEG-TS stream instead of demuxing. The flag will
6586 simply write out the raw stream, with the original PAT/PMT/PIDs
6587 intact.
6588
6589 Default value is none.
6590
6591 allowed_media_types
6592 Set media types to accept from the server.
6593
6594 The following flags are accepted:
6595
6596 video
6597 audio
6598 data
6599 subtitle
6600
6601 By default it accepts all media types.
6602
6603 min_port
6604 Set minimum local UDP port. Default value is 5000.
6605
6606 max_port
6607 Set maximum local UDP port. Default value is 65000.
6608
6609 listen_timeout
6610 Set maximum timeout (in seconds) to establish an initial
6611 connection. Setting listen_timeout > 0 sets rtsp_flags to listen.
6612 Default is -1 which means an infinite timeout when listen mode is
6613 set.
6614
6615 reorder_queue_size
6616 Set number of packets to buffer for handling of reordered packets.
6617
6618 timeout
6619 Set socket TCP I/O timeout in microseconds.
6620
6621 user_agent
6622 Override User-Agent header. If not specified, it defaults to the
6623 libavformat identifier string.
6624
6625 buffer_size
6626 Set the maximum socket buffer size in bytes.
6627
6628 When receiving data over UDP, the demuxer tries to reorder received
6629 packets (since they may arrive out of order, or packets may get lost
6630 totally). This can be disabled by setting the maximum demuxing delay to
6631 zero (via the "max_delay" field of AVFormatContext).
6632
6633 When watching multi-bitrate Real-RTSP streams with ffplay, the streams
6634 to display can be chosen with "-vst" n and "-ast" n for video and audio
6635 respectively, and can be switched on the fly by pressing "v" and "a".
6636
6637 Examples
6638
6639 The following examples all make use of the ffplay and ffmpeg tools.
6640
6641 • Watch a stream over UDP, with a max reordering delay of 0.5
6642 seconds:
6643
6644 ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
6645
6646 • Watch a stream tunneled over HTTP:
6647
6648 ffplay -rtsp_transport http rtsp://server/video.mp4
6649
6650 • Send a stream in realtime to a RTSP server, for others to watch:
6651
6652 ffmpeg -re -i <input> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
6653
6654 • Receive a stream in realtime:
6655
6656 ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <output>
6657
6658 sap
6659 Session Announcement Protocol (RFC 2974). This is not technically a
6660 protocol handler in libavformat, it is a muxer and demuxer. It is used
6661 for signalling of RTP streams, by announcing the SDP for the streams
6662 regularly on a separate port.
6663
6664 Muxer
6665
6666 The syntax for a SAP url given to the muxer is:
6667
6668 sap://<destination>[:<port>][?<options>]
6669
6670 The RTP packets are sent to destination on port port, or to port 5004
6671 if no port is specified. options is a "&"-separated list. The
6672 following options are supported:
6673
6674 announce_addr=address
6675 Specify the destination IP address for sending the announcements
6676 to. If omitted, the announcements are sent to the commonly used
6677 SAP announcement multicast address 224.2.127.254 (sap.mcast.net),
6678 or ff0e::2:7ffe if destination is an IPv6 address.
6679
6680 announce_port=port
6681 Specify the port to send the announcements on, defaults to 9875 if
6682 not specified.
6683
6684 ttl=ttl
6685 Specify the time to live value for the announcements and RTP
6686 packets, defaults to 255.
6687
6688 same_port=0|1
6689 If set to 1, send all RTP streams on the same port pair. If zero
6690 (the default), all streams are sent on unique ports, with each
6691 stream on a port 2 numbers higher than the previous. VLC/Live555
6692 requires this to be set to 1, to be able to receive the stream.
6693 The RTP stack in libavformat for receiving requires all streams to
6694 be sent on unique ports.
6695
6696 Example command lines follow.
6697
6698 To broadcast a stream on the local subnet, for watching in VLC:
6699
6700 ffmpeg -re -i <input> -f sap sap://224.0.0.255?same_port=1
6701
6702 Similarly, for watching in ffplay:
6703
6704 ffmpeg -re -i <input> -f sap sap://224.0.0.255
6705
6706 And for watching in ffplay, over IPv6:
6707
6708 ffmpeg -re -i <input> -f sap sap://[ff0e::1:2:3:4]
6709
6710 Demuxer
6711
6712 The syntax for a SAP url given to the demuxer is:
6713
6714 sap://[<address>][:<port>]
6715
6716 address is the multicast address to listen for announcements on, if
6717 omitted, the default 224.2.127.254 (sap.mcast.net) is used. port is the
6718 port that is listened on, 9875 if omitted.
6719
6720 The demuxers listens for announcements on the given address and port.
6721 Once an announcement is received, it tries to receive that particular
6722 stream.
6723
6724 Example command lines follow.
6725
6726 To play back the first stream announced on the normal SAP multicast
6727 address:
6728
6729 ffplay sap://
6730
6731 To play back the first stream announced on one the default IPv6 SAP
6732 multicast address:
6733
6734 ffplay sap://[ff0e::2:7ffe]
6735
6736 sctp
6737 Stream Control Transmission Protocol.
6738
6739 The accepted URL syntax is:
6740
6741 sctp://<host>:<port>[?<options>]
6742
6743 The protocol accepts the following options:
6744
6745 listen
6746 If set to any value, listen for an incoming connection. Outgoing
6747 connection is done by default.
6748
6749 max_streams
6750 Set the maximum number of streams. By default no limit is set.
6751
6752 srt
6753 Haivision Secure Reliable Transport Protocol via libsrt.
6754
6755 The supported syntax for a SRT URL is:
6756
6757 srt://<hostname>:<port>[?<options>]
6758
6759 options contains a list of &-separated options of the form key=val.
6760
6761 or
6762
6763 <options> srt://<hostname>:<port>
6764
6765 options contains a list of '-key val' options.
6766
6767 This protocol accepts the following options.
6768
6769 connect_timeout=milliseconds
6770 Connection timeout; SRT cannot connect for RTT > 1500 msec (2
6771 handshake exchanges) with the default connect timeout of 3 seconds.
6772 This option applies to the caller and rendezvous connection modes.
6773 The connect timeout is 10 times the value set for the rendezvous
6774 mode (which can be used as a workaround for this connection problem
6775 with earlier versions).
6776
6777 ffs=bytes
6778 Flight Flag Size (Window Size), in bytes. FFS is actually an
6779 internal parameter and you should set it to not less than
6780 recv_buffer_size and mss. The default value is relatively large,
6781 therefore unless you set a very large receiver buffer, you do not
6782 need to change this option. Default value is 25600.
6783
6784 inputbw=bytes/seconds
6785 Sender nominal input rate, in bytes per seconds. Used along with
6786 oheadbw, when maxbw is set to relative (0), to calculate maximum
6787 sending rate when recovery packets are sent along with the main
6788 media stream: inputbw * (100 + oheadbw) / 100 if inputbw is not set
6789 while maxbw is set to relative (0), the actual input rate is
6790 evaluated inside the library. Default value is 0.
6791
6792 iptos=tos
6793 IP Type of Service. Applies to sender only. Default value is 0xB8.
6794
6795 ipttl=ttl
6796 IP Time To Live. Applies to sender only. Default value is 64.
6797
6798 latency=microseconds
6799 Timestamp-based Packet Delivery Delay. Used to absorb bursts of
6800 missed packet retransmissions. This flag sets both rcvlatency and
6801 peerlatency to the same value. Note that prior to version 1.3.0
6802 this is the only flag to set the latency, however this is
6803 effectively equivalent to setting peerlatency, when side is sender
6804 and rcvlatency when side is receiver, and the bidirectional stream
6805 sending is not supported.
6806
6807 listen_timeout=microseconds
6808 Set socket listen timeout.
6809
6810 maxbw=bytes/seconds
6811 Maximum sending bandwidth, in bytes per seconds. -1 infinite
6812 (CSRTCC limit is 30mbps) 0 relative to input rate (see inputbw) >0
6813 absolute limit value Default value is 0 (relative)
6814
6815 mode=caller|listener|rendezvous
6816 Connection mode. caller opens client connection. listener starts
6817 server to listen for incoming connections. rendezvous use Rendez-
6818 Vous connection mode. Default value is caller.
6819
6820 mss=bytes
6821 Maximum Segment Size, in bytes. Used for buffer allocation and rate
6822 calculation using a packet counter assuming fully filled packets.
6823 The smallest MSS between the peers is used. This is 1500 by default
6824 in the overall internet. This is the maximum size of the UDP
6825 packet and can be only decreased, unless you have some unusual
6826 dedicated network settings. Default value is 1500.
6827
6828 nakreport=1|0
6829 If set to 1, Receiver will send `UMSG_LOSSREPORT` messages
6830 periodically until a lost packet is retransmitted or intentionally
6831 dropped. Default value is 1.
6832
6833 oheadbw=percents
6834 Recovery bandwidth overhead above input rate, in percents. See
6835 inputbw. Default value is 25%.
6836
6837 passphrase=string
6838 HaiCrypt Encryption/Decryption Passphrase string, length from 10 to
6839 79 characters. The passphrase is the shared secret between the
6840 sender and the receiver. It is used to generate the Key Encrypting
6841 Key using PBKDF2 (Password-Based Key Derivation Function). It is
6842 used only if pbkeylen is non-zero. It is used on the receiver only
6843 if the received data is encrypted. The configured passphrase
6844 cannot be recovered (write-only).
6845
6846 enforced_encryption=1|0
6847 If true, both connection parties must have the same password set
6848 (including empty, that is, with no encryption). If the password
6849 doesn't match or only one side is unencrypted, the connection is
6850 rejected. Default is true.
6851
6852 kmrefreshrate=packets
6853 The number of packets to be transmitted after which the encryption
6854 key is switched to a new key. Default is -1. -1 means auto
6855 (0x1000000 in srt library). The range for this option is integers
6856 in the 0 - "INT_MAX".
6857
6858 kmpreannounce=packets
6859 The interval between when a new encryption key is sent and when
6860 switchover occurs. This value also applies to the subsequent
6861 interval between when switchover occurs and when the old encryption
6862 key is decommissioned. Default is -1. -1 means auto (0x1000 in srt
6863 library). The range for this option is integers in the 0 -
6864 "INT_MAX".
6865
6866 snddropdelay=microseconds
6867 The sender's extra delay before dropping packets. This delay is
6868 added to the default drop delay time interval value.
6869
6870 Special value -1: Do not drop packets on the sender at all.
6871
6872 payload_size=bytes
6873 Sets the maximum declared size of a packet transferred during the
6874 single call to the sending function in Live mode. Use 0 if this
6875 value isn't used (which is default in file mode). Default is -1
6876 (automatic), which typically means MPEG-TS; if you are going to use
6877 SRT to send any different kind of payload, such as, for example,
6878 wrapping a live stream in very small frames, then you can use a
6879 bigger maximum frame size, though not greater than 1456 bytes.
6880
6881 pkt_size=bytes
6882 Alias for payload_size.
6883
6884 peerlatency=microseconds
6885 The latency value (as described in rcvlatency) that is set by the
6886 sender side as a minimum value for the receiver.
6887
6888 pbkeylen=bytes
6889 Sender encryption key length, in bytes. Only can be set to 0, 16,
6890 24 and 32. Enable sender encryption if not 0. Not required on
6891 receiver (set to 0), key size obtained from sender in HaiCrypt
6892 handshake. Default value is 0.
6893
6894 rcvlatency=microseconds
6895 The time that should elapse since the moment when the packet was
6896 sent and the moment when it's delivered to the receiver application
6897 in the receiving function. This time should be a buffer time large
6898 enough to cover the time spent for sending, unexpectedly extended
6899 RTT time, and the time needed to retransmit the lost UDP packet.
6900 The effective latency value will be the maximum of this options'
6901 value and the value of peerlatency set by the peer side. Before
6902 version 1.3.0 this option is only available as latency.
6903
6904 recv_buffer_size=bytes
6905 Set UDP receive buffer size, expressed in bytes.
6906
6907 send_buffer_size=bytes
6908 Set UDP send buffer size, expressed in bytes.
6909
6910 timeout=microseconds
6911 Set raise error timeouts for read, write and connect operations.
6912 Note that the SRT library has internal timeouts which can be
6913 controlled separately, the value set here is only a cap on those.
6914
6915 tlpktdrop=1|0
6916 Too-late Packet Drop. When enabled on receiver, it skips missing
6917 packets that have not been delivered in time and delivers the
6918 following packets to the application when their time-to-play has
6919 come. It also sends a fake ACK to the sender. When enabled on
6920 sender and enabled on the receiving peer, the sender drops the
6921 older packets that have no chance of being delivered in time. It
6922 was automatically enabled in the sender if the receiver supports
6923 it.
6924
6925 sndbuf=bytes
6926 Set send buffer size, expressed in bytes.
6927
6928 rcvbuf=bytes
6929 Set receive buffer size, expressed in bytes.
6930
6931 Receive buffer must not be greater than ffs.
6932
6933 lossmaxttl=packets
6934 The value up to which the Reorder Tolerance may grow. When Reorder
6935 Tolerance is > 0, then packet loss report is delayed until that
6936 number of packets come in. Reorder Tolerance increases every time a
6937 "belated" packet has come, but it wasn't due to retransmission
6938 (that is, when UDP packets tend to come out of order), with the
6939 difference between the latest sequence and this packet's sequence,
6940 and not more than the value of this option. By default it's 0,
6941 which means that this mechanism is turned off, and the loss report
6942 is always sent immediately upon experiencing a "gap" in sequences.
6943
6944 minversion
6945 The minimum SRT version that is required from the peer. A
6946 connection to a peer that does not satisfy the minimum version
6947 requirement will be rejected.
6948
6949 The version format in hex is 0xXXYYZZ for x.y.z in human readable
6950 form.
6951
6952 streamid=string
6953 A string limited to 512 characters that can be set on the socket
6954 prior to connecting. This stream ID will be able to be retrieved by
6955 the listener side from the socket that is returned from srt_accept
6956 and was connected by a socket with that set stream ID. SRT does not
6957 enforce any special interpretation of the contents of this string.
6958 This option doesn’t make sense in Rendezvous connection; the result
6959 might be that simply one side will override the value from the
6960 other side and it’s the matter of luck which one would win
6961
6962 srt_streamid=string
6963 Alias for streamid to avoid conflict with ffmpeg command line
6964 option.
6965
6966 smoother=live|file
6967 The type of Smoother used for the transmission for that socket,
6968 which is responsible for the transmission and congestion control.
6969 The Smoother type must be exactly the same on both connecting
6970 parties, otherwise the connection is rejected.
6971
6972 messageapi=1|0
6973 When set, this socket uses the Message API, otherwise it uses
6974 Buffer API. Note that in live mode (see transtype) there’s only
6975 message API available. In File mode you can chose to use one of two
6976 modes:
6977
6978 Stream API (default, when this option is false). In this mode you
6979 may send as many data as you wish with one sending instruction, or
6980 even use dedicated functions that read directly from a file. The
6981 internal facility will take care of any speed and congestion
6982 control. When receiving, you can also receive as many data as
6983 desired, the data not extracted will be waiting for the next call.
6984 There is no boundary between data portions in the Stream mode.
6985
6986 Message API. In this mode your single sending instruction passes
6987 exactly one piece of data that has boundaries (a message). Contrary
6988 to Live mode, this message may span across multiple UDP packets and
6989 the only size limitation is that it shall fit as a whole in the
6990 sending buffer. The receiver shall use as large buffer as necessary
6991 to receive the message, otherwise the message will not be given up.
6992 When the message is not complete (not all packets received or there
6993 was a packet loss) it will not be given up.
6994
6995 transtype=live|file
6996 Sets the transmission type for the socket, in particular, setting
6997 this option sets multiple other parameters to their default values
6998 as required for a particular transmission type.
6999
7000 live: Set options as for live transmission. In this mode, you
7001 should send by one sending instruction only so many data that fit
7002 in one UDP packet, and limited to the value defined first in
7003 payload_size (1316 is default in this mode). There is no speed
7004 control in this mode, only the bandwidth control, if configured, in
7005 order to not exceed the bandwidth with the overhead transmission
7006 (retransmitted and control packets).
7007
7008 file: Set options as for non-live transmission. See messageapi for
7009 further explanations
7010
7011 linger=seconds
7012 The number of seconds that the socket waits for unsent data when
7013 closing. Default is -1. -1 means auto (off with 0 seconds in live
7014 mode, on with 180 seconds in file mode). The range for this option
7015 is integers in the 0 - "INT_MAX".
7016
7017 tsbpd=1|0
7018 When true, use Timestamp-based Packet Delivery mode. The default
7019 behavior depends on the transmission type: enabled in live mode,
7020 disabled in file mode.
7021
7022 For more information see: <https://github.com/Haivision/srt>.
7023
7024 srtp
7025 Secure Real-time Transport Protocol.
7026
7027 The accepted options are:
7028
7029 srtp_in_suite
7030 srtp_out_suite
7031 Select input and output encoding suites.
7032
7033 Supported values:
7034
7035 AES_CM_128_HMAC_SHA1_80
7036 SRTP_AES128_CM_HMAC_SHA1_80
7037 AES_CM_128_HMAC_SHA1_32
7038 SRTP_AES128_CM_HMAC_SHA1_32
7039 srtp_in_params
7040 srtp_out_params
7041 Set input and output encoding parameters, which are expressed by a
7042 base64-encoded representation of a binary block. The first 16 bytes
7043 of this binary block are used as master key, the following 14 bytes
7044 are used as master salt.
7045
7046 subfile
7047 Virtually extract a segment of a file or another stream. The
7048 underlying stream must be seekable.
7049
7050 Accepted options:
7051
7052 start
7053 Start offset of the extracted segment, in bytes.
7054
7055 end End offset of the extracted segment, in bytes. If set to 0,
7056 extract till end of file.
7057
7058 Examples:
7059
7060 Extract a chapter from a DVD VOB file (start and end sectors obtained
7061 externally and multiplied by 2048):
7062
7063 subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
7064
7065 Play an AVI file directly from a TAR archive:
7066
7067 subfile,,start,183241728,end,366490624,,:archive.tar
7068
7069 Play a MPEG-TS file from start offset till end:
7070
7071 subfile,,start,32815239,end,0,,:video.ts
7072
7073 tee
7074 Writes the output to multiple protocols. The individual outputs are
7075 separated by |
7076
7077 tee:file://path/to/local/this.avi|file://path/to/local/that.avi
7078
7079 tcp
7080 Transmission Control Protocol.
7081
7082 The required syntax for a TCP url is:
7083
7084 tcp://<hostname>:<port>[?<options>]
7085
7086 options contains a list of &-separated options of the form key=val.
7087
7088 The list of supported options follows.
7089
7090 listen=2|1|0
7091 Listen for an incoming connection. 0 disables listen, 1 enables
7092 listen in single client mode, 2 enables listen in multi-client
7093 mode. Default value is 0.
7094
7095 timeout=microseconds
7096 Set raise error timeout, expressed in microseconds.
7097
7098 This option is only relevant in read mode: if no data arrived in
7099 more than this time interval, raise error.
7100
7101 listen_timeout=milliseconds
7102 Set listen timeout, expressed in milliseconds.
7103
7104 recv_buffer_size=bytes
7105 Set receive buffer size, expressed bytes.
7106
7107 send_buffer_size=bytes
7108 Set send buffer size, expressed bytes.
7109
7110 tcp_nodelay=1|0
7111 Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
7112
7113 Remark: Writing to the socket is currently not optimized to
7114 minimize system calls and reduces the efficiency / effect of
7115 TCP_NODELAY.
7116
7117 tcp_mss=bytes
7118 Set maximum segment size for outgoing TCP packets, expressed in
7119 bytes.
7120
7121 The following example shows how to setup a listening TCP connection
7122 with ffmpeg, which is then accessed with ffplay:
7123
7124 ffmpeg -i <input> -f <format> tcp://<hostname>:<port>?listen
7125 ffplay tcp://<hostname>:<port>
7126
7127 tls
7128 Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
7129
7130 The required syntax for a TLS/SSL url is:
7131
7132 tls://<hostname>:<port>[?<options>]
7133
7134 The following parameters can be set via command line options (or in
7135 code via "AVOption"s):
7136
7137 ca_file, cafile=filename
7138 A file containing certificate authority (CA) root certificates to
7139 treat as trusted. If the linked TLS library contains a default this
7140 might not need to be specified for verification to work, but not
7141 all libraries and setups have defaults built in. The file must be
7142 in OpenSSL PEM format.
7143
7144 tls_verify=1|0
7145 If enabled, try to verify the peer that we are communicating with.
7146 Note, if using OpenSSL, this currently only makes sure that the
7147 peer certificate is signed by one of the root certificates in the
7148 CA database, but it does not validate that the certificate actually
7149 matches the host name we are trying to connect to. (With other
7150 backends, the host name is validated as well.)
7151
7152 This is disabled by default since it requires a CA database to be
7153 provided by the caller in many cases.
7154
7155 cert_file, cert=filename
7156 A file containing a certificate to use in the handshake with the
7157 peer. (When operating as server, in listen mode, this is more
7158 often required by the peer, while client certificates only are
7159 mandated in certain setups.)
7160
7161 key_file, key=filename
7162 A file containing the private key for the certificate.
7163
7164 listen=1|0
7165 If enabled, listen for connections on the provided port, and assume
7166 the server role in the handshake instead of the client role.
7167
7168 http_proxy
7169 The HTTP proxy to tunnel through, e.g. "http://example.com:1234".
7170 The proxy must support the CONNECT method.
7171
7172 Example command lines:
7173
7174 To create a TLS/SSL server that serves an input stream.
7175
7176 ffmpeg -i <input> -f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
7177
7178 To play back a stream from the TLS/SSL server using ffplay:
7179
7180 ffplay tls://<hostname>:<port>
7181
7182 udp
7183 User Datagram Protocol.
7184
7185 The required syntax for an UDP URL is:
7186
7187 udp://<hostname>:<port>[?<options>]
7188
7189 options contains a list of &-separated options of the form key=val.
7190
7191 In case threading is enabled on the system, a circular buffer is used
7192 to store the incoming data, which allows one to reduce loss of data due
7193 to UDP socket buffer overruns. The fifo_size and overrun_nonfatal
7194 options are related to this buffer.
7195
7196 The list of supported options follows.
7197
7198 buffer_size=size
7199 Set the UDP maximum socket buffer size in bytes. This is used to
7200 set either the receive or send buffer size, depending on what the
7201 socket is used for. Default is 32 KB for output, 384 KB for input.
7202 See also fifo_size.
7203
7204 bitrate=bitrate
7205 If set to nonzero, the output will have the specified constant
7206 bitrate if the input has enough packets to sustain it.
7207
7208 burst_bits=bits
7209 When using bitrate this specifies the maximum number of bits in
7210 packet bursts.
7211
7212 localport=port
7213 Override the local UDP port to bind with.
7214
7215 localaddr=addr
7216 Local IP address of a network interface used for sending packets or
7217 joining multicast groups.
7218
7219 pkt_size=size
7220 Set the size in bytes of UDP packets.
7221
7222 reuse=1|0
7223 Explicitly allow or disallow reusing UDP sockets.
7224
7225 ttl=ttl
7226 Set the time to live value (for multicast only).
7227
7228 connect=1|0
7229 Initialize the UDP socket with connect(). In this case, the
7230 destination address can't be changed with ff_udp_set_remote_url
7231 later. If the destination address isn't known at the start, this
7232 option can be specified in ff_udp_set_remote_url, too. This allows
7233 finding out the source address for the packets with getsockname,
7234 and makes writes return with AVERROR(ECONNREFUSED) if "destination
7235 unreachable" is received. For receiving, this gives the benefit of
7236 only receiving packets from the specified peer address/port.
7237
7238 sources=address[,address]
7239 Only receive packets sent from the specified addresses. In case of
7240 multicast, also subscribe to multicast traffic coming from these
7241 addresses only.
7242
7243 block=address[,address]
7244 Ignore packets sent from the specified addresses. In case of
7245 multicast, also exclude the source addresses in the multicast
7246 subscription.
7247
7248 fifo_size=units
7249 Set the UDP receiving circular buffer size, expressed as a number
7250 of packets with size of 188 bytes. If not specified defaults to
7251 7*4096.
7252
7253 overrun_nonfatal=1|0
7254 Survive in case of UDP receiving circular buffer overrun. Default
7255 value is 0.
7256
7257 timeout=microseconds
7258 Set raise error timeout, expressed in microseconds.
7259
7260 This option is only relevant in read mode: if no data arrived in
7261 more than this time interval, raise error.
7262
7263 broadcast=1|0
7264 Explicitly allow or disallow UDP broadcasting.
7265
7266 Note that broadcasting may not work properly on networks having a
7267 broadcast storm protection.
7268
7269 Examples
7270
7271 • Use ffmpeg to stream over UDP to a remote endpoint:
7272
7273 ffmpeg -i <input> -f <format> udp://<hostname>:<port>
7274
7275 • Use ffmpeg to stream in mpegts format over UDP using 188 sized UDP
7276 packets, using a large input buffer:
7277
7278 ffmpeg -i <input> -f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
7279
7280 • Use ffmpeg to receive over UDP from a remote endpoint:
7281
7282 ffmpeg -i udp://[<multicast-address>]:<port> ...
7283
7284 unix
7285 Unix local socket
7286
7287 The required syntax for a Unix socket URL is:
7288
7289 unix://<filepath>
7290
7291 The following parameters can be set via command line options (or in
7292 code via "AVOption"s):
7293
7294 timeout
7295 Timeout in ms.
7296
7297 listen
7298 Create the Unix socket in listening mode.
7299
7300 zmq
7301 ZeroMQ asynchronous messaging using the libzmq library.
7302
7303 This library supports unicast streaming to multiple clients without
7304 relying on an external server.
7305
7306 The required syntax for streaming or connecting to a stream is:
7307
7308 zmq:tcp://ip-address:port
7309
7310 Example: Create a localhost stream on port 5555:
7311
7312 ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
7313
7314 Multiple clients may connect to the stream using:
7315
7316 ffplay zmq:tcp://127.0.0.1:5555
7317
7318 Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub
7319 pattern. The server side binds to a port and publishes data. Clients
7320 connect to the server (via IP address/port) and subscribe to the
7321 stream. The order in which the server and client start generally does
7322 not matter.
7323
7324 ffmpeg must be compiled with the --enable-libzmq option to support this
7325 protocol.
7326
7327 Options can be set on the ffmpeg/ffplay command line. The following
7328 options are supported:
7329
7330 pkt_size
7331 Forces the maximum packet size for sending/receiving data. The
7332 default value is 131,072 bytes. On the server side, this sets the
7333 maximum size of sent packets via ZeroMQ. On the clients, it sets an
7334 internal buffer size for receiving packets. Note that pkt_size on
7335 the clients should be equal to or greater than pkt_size on the
7336 server. Otherwise the received message may be truncated causing
7337 decoding errors.
7338
7340 The libavdevice library provides the same interface as libavformat.
7341 Namely, an input device is considered like a demuxer, and an output
7342 device like a muxer, and the interface and generic device options are
7343 the same provided by libavformat (see the ffmpeg-formats manual).
7344
7345 In addition each input or output device may support so-called private
7346 options, which are specific for that component.
7347
7348 Options may be set by specifying -option value in the FFmpeg tools, or
7349 by setting the value explicitly in the device "AVFormatContext" options
7350 or using the libavutil/opt.h API for programmatic use.
7351
7353 Input devices are configured elements in FFmpeg which enable accessing
7354 the data coming from a multimedia device attached to your system.
7355
7356 When you configure your FFmpeg build, all the supported input devices
7357 are enabled by default. You can list all available ones using the
7358 configure option "--list-indevs".
7359
7360 You can disable all the input devices using the configure option
7361 "--disable-indevs", and selectively enable an input device using the
7362 option "--enable-indev=INDEV", or you can disable a particular input
7363 device using the option "--disable-indev=INDEV".
7364
7365 The option "-devices" of the ff* tools will display the list of
7366 supported input devices.
7367
7368 A description of the currently available input devices follows.
7369
7370 alsa
7371 ALSA (Advanced Linux Sound Architecture) input device.
7372
7373 To enable this input device during configuration you need libasound
7374 installed on your system.
7375
7376 This device allows capturing from an ALSA device. The name of the
7377 device to capture has to be an ALSA card identifier.
7378
7379 An ALSA identifier has the syntax:
7380
7381 hw:<CARD>[,<DEV>[,<SUBDEV>]]
7382
7383 where the DEV and SUBDEV components are optional.
7384
7385 The three arguments (in order: CARD,DEV,SUBDEV) specify card number or
7386 identifier, device number and subdevice number (-1 means any).
7387
7388 To see the list of cards currently recognized by your system check the
7389 files /proc/asound/cards and /proc/asound/devices.
7390
7391 For example to capture with ffmpeg from an ALSA device with card id 0,
7392 you may run the command:
7393
7394 ffmpeg -f alsa -i hw:0 alsaout.wav
7395
7396 For more information see:
7397 <http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html>
7398
7399 Options
7400
7401 sample_rate
7402 Set the sample rate in Hz. Default is 48000.
7403
7404 channels
7405 Set the number of channels. Default is 2.
7406
7407 android_camera
7408 Android camera input device.
7409
7410 This input devices uses the Android Camera2 NDK API which is available
7411 on devices with API level 24+. The availability of android_camera is
7412 autodetected during configuration.
7413
7414 This device allows capturing from all cameras on an Android device,
7415 which are integrated into the Camera2 NDK API.
7416
7417 The available cameras are enumerated internally and can be selected
7418 with the camera_index parameter. The input file string is discarded.
7419
7420 Generally the back facing camera has index 0 while the front facing
7421 camera has index 1.
7422
7423 Options
7424
7425 video_size
7426 Set the video size given as a string such as 640x480 or hd720.
7427 Falls back to the first available configuration reported by Android
7428 if requested video size is not available or by default.
7429
7430 framerate
7431 Set the video framerate. Falls back to the first available
7432 configuration reported by Android if requested framerate is not
7433 available or by default (-1).
7434
7435 camera_index
7436 Set the index of the camera to use. Default is 0.
7437
7438 input_queue_size
7439 Set the maximum number of frames to buffer. Default is 5.
7440
7441 avfoundation
7442 AVFoundation input device.
7443
7444 AVFoundation is the currently recommended framework by Apple for
7445 streamgrabbing on OSX >= 10.7 as well as on iOS.
7446
7447 The input filename has to be given in the following syntax:
7448
7449 -i "[[VIDEO]:[AUDIO]]"
7450
7451 The first entry selects the video input while the latter selects the
7452 audio input. The stream has to be specified by the device name or the
7453 device index as shown by the device list. Alternatively, the video
7454 and/or audio input device can be chosen by index using the
7455
7456 B<-video_device_index E<lt>INDEXE<gt>>
7457
7458 and/or
7459
7460 B<-audio_device_index E<lt>INDEXE<gt>>
7461
7462 , overriding any device name or index given in the input filename.
7463
7464 All available devices can be enumerated by using -list_devices true,
7465 listing all device names and corresponding indices.
7466
7467 There are two device name aliases:
7468
7469 "default"
7470 Select the AVFoundation default device of the corresponding type.
7471
7472 "none"
7473 Do not record the corresponding media type. This is equivalent to
7474 specifying an empty device name or index.
7475
7476 Options
7477
7478 AVFoundation supports the following options:
7479
7480 -list_devices <TRUE|FALSE>
7481 If set to true, a list of all available input devices is given
7482 showing all device names and indices.
7483
7484 -video_device_index <INDEX>
7485 Specify the video device by its index. Overrides anything given in
7486 the input filename.
7487
7488 -audio_device_index <INDEX>
7489 Specify the audio device by its index. Overrides anything given in
7490 the input filename.
7491
7492 -pixel_format <FORMAT>
7493 Request the video device to use a specific pixel format. If the
7494 specified format is not supported, a list of available formats is
7495 given and the first one in this list is used instead. Available
7496 pixel formats are: "monob, rgb555be, rgb555le, rgb565be, rgb565le,
7497 rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
7498 bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16,
7499 yuv422p10, yuv444p10,
7500 yuv420p, nv12, yuyv422, gray"
7501
7502 -framerate
7503 Set the grabbing frame rate. Default is "ntsc", corresponding to a
7504 frame rate of "30000/1001".
7505
7506 -video_size
7507 Set the video frame size.
7508
7509 -capture_cursor
7510 Capture the mouse pointer. Default is 0.
7511
7512 -capture_mouse_clicks
7513 Capture the screen mouse clicks. Default is 0.
7514
7515 -capture_raw_data
7516 Capture the raw device data. Default is 0. Using this option may
7517 result in receiving the underlying data delivered to the
7518 AVFoundation framework. E.g. for muxed devices that sends raw DV
7519 data to the framework (like tape-based camcorders), setting this
7520 option to false results in extracted video frames captured in the
7521 designated pixel format only. Setting this option to true results
7522 in receiving the raw DV stream untouched.
7523
7524 Examples
7525
7526 • Print the list of AVFoundation supported devices and exit:
7527
7528 $ ffmpeg -f avfoundation -list_devices true -i ""
7529
7530 • Record video from video device 0 and audio from audio device 0 into
7531 out.avi:
7532
7533 $ ffmpeg -f avfoundation -i "0:0" out.avi
7534
7535 • Record video from video device 2 and audio from audio device 1 into
7536 out.avi:
7537
7538 $ ffmpeg -f avfoundation -video_device_index 2 -i ":1" out.avi
7539
7540 • Record video from the system default video device using the pixel
7541 format bgr0 and do not record any audio into out.avi:
7542
7543 $ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi
7544
7545 • Record raw DV data from a suitable input device and write the
7546 output into out.dv:
7547
7548 $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv
7549
7550 bktr
7551 BSD video input device.
7552
7553 Options
7554
7555 framerate
7556 Set the frame rate.
7557
7558 video_size
7559 Set the video frame size. Default is "vga".
7560
7561 standard
7562 Available values are:
7563
7564 pal
7565 ntsc
7566 secam
7567 paln
7568 palm
7569 ntscj
7570
7571 decklink
7572 The decklink input device provides capture capabilities for Blackmagic
7573 DeckLink devices.
7574
7575 To enable this input device, you need the Blackmagic DeckLink SDK and
7576 you need to configure with the appropriate "--extra-cflags" and
7577 "--extra-ldflags". On Windows, you need to run the IDL files through
7578 widl.
7579
7580 DeckLink is very picky about the formats it supports. Pixel format of
7581 the input can be set with raw_format. Framerate and video size must be
7582 determined for your device with -list_formats 1. Audio sample rate is
7583 always 48 kHz and the number of channels can be 2, 8 or 16. Note that
7584 all audio channels are bundled in one single audio track.
7585
7586 Options
7587
7588 list_devices
7589 If set to true, print a list of devices and exit. Defaults to
7590 false. This option is deprecated, please use the "-sources" option
7591 of ffmpeg to list the available input devices.
7592
7593 list_formats
7594 If set to true, print a list of supported formats and exit.
7595 Defaults to false.
7596
7597 format_code <FourCC>
7598 This sets the input video format to the format given by the FourCC.
7599 To see the supported values of your device(s) use list_formats.
7600 Note that there is a FourCC 'pal ' that can also be used as pal (3
7601 letters). Default behavior is autodetection of the input video
7602 format, if the hardware supports it.
7603
7604 raw_format
7605 Set the pixel format of the captured video. Available values are:
7606
7607 auto
7608 This is the default which means 8-bit YUV 422 or 8-bit ARGB if
7609 format autodetection is used, 8-bit YUV 422 otherwise.
7610
7611 uyvy422
7612 8-bit YUV 422.
7613
7614 yuv422p10
7615 10-bit YUV 422.
7616
7617 argb
7618 8-bit RGB.
7619
7620 bgra
7621 8-bit RGB.
7622
7623 rgb10
7624 10-bit RGB.
7625
7626 teletext_lines
7627 If set to nonzero, an additional teletext stream will be captured
7628 from the vertical ancillary data. Both SD PAL (576i) and HD (1080i
7629 or 1080p) sources are supported. In case of HD sources, OP47
7630 packets are decoded.
7631
7632 This option is a bitmask of the SD PAL VBI lines captured,
7633 specifically lines 6 to 22, and lines 318 to 335. Line 6 is the LSB
7634 in the mask. Selected lines which do not contain teletext
7635 information will be ignored. You can use the special all constant
7636 to select all possible lines, or standard to skip lines 6, 318 and
7637 319, which are not compatible with all receivers.
7638
7639 For SD sources, ffmpeg needs to be compiled with
7640 "--enable-libzvbi". For HD sources, on older (pre-4K) DeckLink card
7641 models you have to capture in 10 bit mode.
7642
7643 channels
7644 Defines number of audio channels to capture. Must be 2, 8 or 16.
7645 Defaults to 2.
7646
7647 duplex_mode
7648 Sets the decklink device duplex/profile mode. Must be unset, half,
7649 full, one_sub_device_full, one_sub_device_half,
7650 two_sub_device_full, four_sub_device_half Defaults to unset.
7651
7652 Note: DeckLink SDK 11.0 have replaced the duplex property by a
7653 profile property. For the DeckLink Duo 2 and DeckLink Quad 2, a
7654 profile is shared between any 2 sub-devices that utilize the same
7655 connectors. For the DeckLink 8K Pro, a profile is shared between
7656 all 4 sub-devices. So DeckLink 8K Pro support four profiles.
7657
7658 Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
7659 one_sub_device_full, one_sub_device_half, two_sub_device_full,
7660 four_sub_device_half
7661
7662 Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: half,
7663 full
7664
7665 timecode_format
7666 Timecode type to include in the frame and video stream metadata.
7667 Must be none, rp188vitc, rp188vitc2, rp188ltc, rp188hfr, rp188any,
7668 vitc, vitc2, or serial. Defaults to none (not included).
7669
7670 In order to properly support 50/60 fps timecodes, the ordering of
7671 the queried timecode types for rp188any is HFR, VITC1, VITC2 and
7672 LTC for >30 fps content. Note that this is slightly different to
7673 the ordering used by the DeckLink API, which is HFR, VITC1, LTC,
7674 VITC2.
7675
7676 video_input
7677 Sets the video input source. Must be unset, sdi, hdmi, optical_sdi,
7678 component, composite or s_video. Defaults to unset.
7679
7680 audio_input
7681 Sets the audio input source. Must be unset, embedded, aes_ebu,
7682 analog, analog_xlr, analog_rca or microphone. Defaults to unset.
7683
7684 video_pts
7685 Sets the video packet timestamp source. Must be video, audio,
7686 reference, wallclock or abs_wallclock. Defaults to video.
7687
7688 audio_pts
7689 Sets the audio packet timestamp source. Must be video, audio,
7690 reference, wallclock or abs_wallclock. Defaults to audio.
7691
7692 draw_bars
7693 If set to true, color bars are drawn in the event of a signal loss.
7694 Defaults to true.
7695
7696 queue_size
7697 Sets maximum input buffer size in bytes. If the buffering reaches
7698 this value, incoming frames will be dropped. Defaults to
7699 1073741824.
7700
7701 audio_depth
7702 Sets the audio sample bit depth. Must be 16 or 32. Defaults to 16.
7703
7704 decklink_copyts
7705 If set to true, timestamps are forwarded as they are without
7706 removing the initial offset. Defaults to false.
7707
7708 timestamp_align
7709 Capture start time alignment in seconds. If set to nonzero, input
7710 frames are dropped till the system timestamp aligns with configured
7711 value. Alignment difference of up to one frame duration is
7712 tolerated. This is useful for maintaining input synchronization
7713 across N different hardware devices deployed for 'N-way'
7714 redundancy. The system time of different hardware devices should be
7715 synchronized with protocols such as NTP or PTP, before using this
7716 option. Note that this method is not foolproof. In some border
7717 cases input synchronization may not happen due to thread scheduling
7718 jitters in the OS. Either sync could go wrong by 1 frame or in a
7719 rarer case timestamp_align seconds. Defaults to 0.
7720
7721 wait_for_tc (bool)
7722 Drop frames till a frame with timecode is received. Sometimes
7723 serial timecode isn't received with the first input frame. If that
7724 happens, the stored stream timecode will be inaccurate. If this
7725 option is set to true, input frames are dropped till a frame with
7726 timecode is received. Option timecode_format must be specified.
7727 Defaults to false.
7728
7729 enable_klv(bool)
7730 If set to true, extracts KLV data from VANC and outputs KLV
7731 packets. KLV VANC packets are joined based on MID and PSC fields
7732 and aggregated into one KLV packet. Defaults to false.
7733
7734 Examples
7735
7736 • List input devices:
7737
7738 ffmpeg -sources decklink
7739
7740 • List supported formats:
7741
7742 ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
7743
7744 • Capture video clip at 1080i50:
7745
7746 ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
7747
7748 • Capture video clip at 1080i50 10 bit:
7749
7750 ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
7751
7752 • Capture video clip at 1080i50 with 16 audio channels:
7753
7754 ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
7755
7756 dshow
7757 Windows DirectShow input device.
7758
7759 DirectShow support is enabled when FFmpeg is built with the mingw-w64
7760 project. Currently only audio and video devices are supported.
7761
7762 Multiple devices may be opened as separate inputs, but they may also be
7763 opened on the same input, which should improve synchronism between
7764 them.
7765
7766 The input name should be in the format:
7767
7768 <TYPE>=<NAME>[:<TYPE>=<NAME>]
7769
7770 where TYPE can be either audio or video, and NAME is the device's name
7771 or alternative name..
7772
7773 Options
7774
7775 If no options are specified, the device's defaults are used. If the
7776 device does not support the requested options, it will fail to open.
7777
7778 video_size
7779 Set the video size in the captured video.
7780
7781 framerate
7782 Set the frame rate in the captured video.
7783
7784 sample_rate
7785 Set the sample rate (in Hz) of the captured audio.
7786
7787 sample_size
7788 Set the sample size (in bits) of the captured audio.
7789
7790 channels
7791 Set the number of channels in the captured audio.
7792
7793 list_devices
7794 If set to true, print a list of devices and exit.
7795
7796 list_options
7797 If set to true, print a list of selected device's options and exit.
7798
7799 video_device_number
7800 Set video device number for devices with the same name (starts at
7801 0, defaults to 0).
7802
7803 audio_device_number
7804 Set audio device number for devices with the same name (starts at
7805 0, defaults to 0).
7806
7807 pixel_format
7808 Select pixel format to be used by DirectShow. This may only be set
7809 when the video codec is not set or set to rawvideo.
7810
7811 audio_buffer_size
7812 Set audio device buffer size in milliseconds (which can directly
7813 impact latency, depending on the device). Defaults to using the
7814 audio device's default buffer size (typically some multiple of
7815 500ms). Setting this value too low can degrade performance. See
7816 also
7817 <http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx>
7818
7819 video_pin_name
7820 Select video capture pin to use by name or alternative name.
7821
7822 audio_pin_name
7823 Select audio capture pin to use by name or alternative name.
7824
7825 crossbar_video_input_pin_number
7826 Select video input pin number for crossbar device. This will be
7827 routed to the crossbar device's Video Decoder output pin. Note
7828 that changing this value can affect future invocations (sets a new
7829 default) until system reboot occurs.
7830
7831 crossbar_audio_input_pin_number
7832 Select audio input pin number for crossbar device. This will be
7833 routed to the crossbar device's Audio Decoder output pin. Note
7834 that changing this value can affect future invocations (sets a new
7835 default) until system reboot occurs.
7836
7837 show_video_device_dialog
7838 If set to true, before capture starts, popup a display dialog to
7839 the end user, allowing them to change video filter properties and
7840 configurations manually. Note that for crossbar devices, adjusting
7841 values in this dialog may be needed at times to toggle between PAL
7842 (25 fps) and NTSC (29.97) input frame rates, sizes, interlacing,
7843 etc. Changing these values can enable different scan rates/frame
7844 rates and avoiding green bars at the bottom, flickering scan lines,
7845 etc. Note that with some devices, changing these properties can
7846 also affect future invocations (sets new defaults) until system
7847 reboot occurs.
7848
7849 show_audio_device_dialog
7850 If set to true, before capture starts, popup a display dialog to
7851 the end user, allowing them to change audio filter properties and
7852 configurations manually.
7853
7854 show_video_crossbar_connection_dialog
7855 If set to true, before capture starts, popup a display dialog to
7856 the end user, allowing them to manually modify crossbar pin
7857 routings, when it opens a video device.
7858
7859 show_audio_crossbar_connection_dialog
7860 If set to true, before capture starts, popup a display dialog to
7861 the end user, allowing them to manually modify crossbar pin
7862 routings, when it opens an audio device.
7863
7864 show_analog_tv_tuner_dialog
7865 If set to true, before capture starts, popup a display dialog to
7866 the end user, allowing them to manually modify TV channels and
7867 frequencies.
7868
7869 show_analog_tv_tuner_audio_dialog
7870 If set to true, before capture starts, popup a display dialog to
7871 the end user, allowing them to manually modify TV audio (like mono
7872 vs. stereo, Language A,B or C).
7873
7874 audio_device_load
7875 Load an audio capture filter device from file instead of searching
7876 it by name. It may load additional parameters too, if the filter
7877 supports the serialization of its properties to. To use this an
7878 audio capture source has to be specified, but it can be anything
7879 even fake one.
7880
7881 audio_device_save
7882 Save the currently used audio capture filter device and its
7883 parameters (if the filter supports it) to a file. If a file with
7884 the same name exists it will be overwritten.
7885
7886 video_device_load
7887 Load a video capture filter device from file instead of searching
7888 it by name. It may load additional parameters too, if the filter
7889 supports the serialization of its properties to. To use this a
7890 video capture source has to be specified, but it can be anything
7891 even fake one.
7892
7893 video_device_save
7894 Save the currently used video capture filter device and its
7895 parameters (if the filter supports it) to a file. If a file with
7896 the same name exists it will be overwritten.
7897
7898 use_video_device_timestamps
7899 If set to false, the timestamp for video frames will be derived
7900 from the wallclock instead of the timestamp provided by the capture
7901 device. This allows working around devices that provide unreliable
7902 timestamps.
7903
7904 Examples
7905
7906 • Print the list of DirectShow supported devices and exit:
7907
7908 $ ffmpeg -list_devices true -f dshow -i dummy
7909
7910 • Open video device Camera:
7911
7912 $ ffmpeg -f dshow -i video="Camera"
7913
7914 • Open second video device with name Camera:
7915
7916 $ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
7917
7918 • Open video device Camera and audio device Microphone:
7919
7920 $ ffmpeg -f dshow -i video="Camera":audio="Microphone"
7921
7922 • Print the list of supported options in selected device and exit:
7923
7924 $ ffmpeg -list_options true -f dshow -i video="Camera"
7925
7926 • Specify pin names to capture by name or alternative name, specify
7927 alternative device name:
7928
7929 $ 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"
7930
7931 • Configure a crossbar device, specifying crossbar pins, allow user
7932 to adjust video capture properties at startup:
7933
7934 $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
7935 -crossbar_audio_input_pin_number 3 -i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture"
7936
7937 fbdev
7938 Linux framebuffer input device.
7939
7940 The Linux framebuffer is a graphic hardware-independent abstraction
7941 layer to show graphics on a computer monitor, typically on the console.
7942 It is accessed through a file device node, usually /dev/fb0.
7943
7944 For more detailed information read the file
7945 Documentation/fb/framebuffer.txt included in the Linux source tree.
7946
7947 See also <http://linux-fbdev.sourceforge.net/>, and fbset(1).
7948
7949 To record from the framebuffer device /dev/fb0 with ffmpeg:
7950
7951 ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
7952
7953 You can take a single screenshot image with the command:
7954
7955 ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
7956
7957 Options
7958
7959 framerate
7960 Set the frame rate. Default is 25.
7961
7962 gdigrab
7963 Win32 GDI-based screen capture device.
7964
7965 This device allows you to capture a region of the display on Windows.
7966
7967 There are two options for the input filename:
7968
7969 desktop
7970
7971 or
7972
7973 title=<window_title>
7974
7975 The first option will capture the entire desktop, or a fixed region of
7976 the desktop. The second option will instead capture the contents of a
7977 single window, regardless of its position on the screen.
7978
7979 For example, to grab the entire desktop using ffmpeg:
7980
7981 ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
7982
7983 Grab a 640x480 region at position "10,20":
7984
7985 ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
7986
7987 Grab the contents of the window named "Calculator"
7988
7989 ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
7990
7991 Options
7992
7993 draw_mouse
7994 Specify whether to draw the mouse pointer. Use the value 0 to not
7995 draw the pointer. Default value is 1.
7996
7997 framerate
7998 Set the grabbing frame rate. Default value is "ntsc", corresponding
7999 to a frame rate of "30000/1001".
8000
8001 show_region
8002 Show grabbed region on screen.
8003
8004 If show_region is specified with 1, then the grabbing region will
8005 be indicated on screen. With this option, it is easy to know what
8006 is being grabbed if only a portion of the screen is grabbed.
8007
8008 Note that show_region is incompatible with grabbing the contents of
8009 a single window.
8010
8011 For example:
8012
8013 ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
8014
8015 video_size
8016 Set the video frame size. The default is to capture the full screen
8017 if desktop is selected, or the full window size if
8018 title=window_title is selected.
8019
8020 offset_x
8021 When capturing a region with video_size, set the distance from the
8022 left edge of the screen or desktop.
8023
8024 Note that the offset calculation is from the top left corner of the
8025 primary monitor on Windows. If you have a monitor positioned to the
8026 left of your primary monitor, you will need to use a negative
8027 offset_x value to move the region to that monitor.
8028
8029 offset_y
8030 When capturing a region with video_size, set the distance from the
8031 top edge of the screen or desktop.
8032
8033 Note that the offset calculation is from the top left corner of the
8034 primary monitor on Windows. If you have a monitor positioned above
8035 your primary monitor, you will need to use a negative offset_y
8036 value to move the region to that monitor.
8037
8038 iec61883
8039 FireWire DV/HDV input device using libiec61883.
8040
8041 To enable this input device, you need libiec61883, libraw1394 and
8042 libavc1394 installed on your system. Use the configure option
8043 "--enable-libiec61883" to compile with the device enabled.
8044
8045 The iec61883 capture device supports capturing from a video device
8046 connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
8047 FireWire stack (juju). This is the default DV/HDV input method in Linux
8048 Kernel 2.6.37 and later, since the old FireWire stack was removed.
8049
8050 Specify the FireWire port to be used as input file, or "auto" to choose
8051 the first port connected.
8052
8053 Options
8054
8055 dvtype
8056 Override autodetection of DV/HDV. This should only be used if auto
8057 detection does not work, or if usage of a different device type
8058 should be prohibited. Treating a DV device as HDV (or vice versa)
8059 will not work and result in undefined behavior. The values auto,
8060 dv and hdv are supported.
8061
8062 dvbuffer
8063 Set maximum size of buffer for incoming data, in frames. For DV,
8064 this is an exact value. For HDV, it is not frame exact, since HDV
8065 does not have a fixed frame size.
8066
8067 dvguid
8068 Select the capture device by specifying its GUID. Capturing will
8069 only be performed from the specified device and fails if no device
8070 with the given GUID is found. This is useful to select the input if
8071 multiple devices are connected at the same time. Look at
8072 /sys/bus/firewire/devices to find out the GUIDs.
8073
8074 Examples
8075
8076 • Grab and show the input of a FireWire DV/HDV device.
8077
8078 ffplay -f iec61883 -i auto
8079
8080 • Grab and record the input of a FireWire DV/HDV device, using a
8081 packet buffer of 100000 packets if the source is HDV.
8082
8083 ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
8084
8085 jack
8086 JACK input device.
8087
8088 To enable this input device during configuration you need libjack
8089 installed on your system.
8090
8091 A JACK input device creates one or more JACK writable clients, one for
8092 each audio channel, with name client_name:input_N, where client_name is
8093 the name provided by the application, and N is a number which
8094 identifies the channel. Each writable client will send the acquired
8095 data to the FFmpeg input device.
8096
8097 Once you have created one or more JACK readable clients, you need to
8098 connect them to one or more JACK writable clients.
8099
8100 To connect or disconnect JACK clients you can use the jack_connect and
8101 jack_disconnect programs, or do it through a graphical interface, for
8102 example with qjackctl.
8103
8104 To list the JACK clients and their properties you can invoke the
8105 command jack_lsp.
8106
8107 Follows an example which shows how to capture a JACK readable client
8108 with ffmpeg.
8109
8110 # Create a JACK writable client with name "ffmpeg".
8111 $ ffmpeg -f jack -i ffmpeg -y out.wav
8112
8113 # Start the sample jack_metro readable client.
8114 $ jack_metro -b 120 -d 0.2 -f 4000
8115
8116 # List the current JACK clients.
8117 $ jack_lsp -c
8118 system:capture_1
8119 system:capture_2
8120 system:playback_1
8121 system:playback_2
8122 ffmpeg:input_1
8123 metro:120_bpm
8124
8125 # Connect metro to the ffmpeg writable client.
8126 $ jack_connect metro:120_bpm ffmpeg:input_1
8127
8128 For more information read: <http://jackaudio.org/>
8129
8130 Options
8131
8132 channels
8133 Set the number of channels. Default is 2.
8134
8135 kmsgrab
8136 KMS video input device.
8137
8138 Captures the KMS scanout framebuffer associated with a specified CRTC
8139 or plane as a DRM object that can be passed to other hardware
8140 functions.
8141
8142 Requires either DRM master or CAP_SYS_ADMIN to run.
8143
8144 If you don't understand what all of that means, you probably don't want
8145 this. Look at x11grab instead.
8146
8147 Options
8148
8149 device
8150 DRM device to capture on. Defaults to /dev/dri/card0.
8151
8152 format
8153 Pixel format of the framebuffer. This can be autodetected if you
8154 are running Linux 5.7 or later, but needs to be provided for
8155 earlier versions. Defaults to bgr0, which is the most common
8156 format used by the Linux console and Xorg X server.
8157
8158 format_modifier
8159 Format modifier to signal on output frames. This is necessary to
8160 import correctly into some APIs. It can be autodetected if you are
8161 running Linux 5.7 or later, but will need to be provided explicitly
8162 when needed in earlier versions. See the libdrm documentation for
8163 possible values.
8164
8165 crtc_id
8166 KMS CRTC ID to define the capture source. The first active plane
8167 on the given CRTC will be used.
8168
8169 plane_id
8170 KMS plane ID to define the capture source. Defaults to the first
8171 active plane found if neither crtc_id nor plane_id are specified.
8172
8173 framerate
8174 Framerate to capture at. This is not synchronised to any page
8175 flipping or framebuffer changes - it just defines the interval at
8176 which the framebuffer is sampled. Sampling faster than the
8177 framebuffer update rate will generate independent frames with the
8178 same content. Defaults to 30.
8179
8180 Examples
8181
8182 • Capture from the first active plane, download the result to normal
8183 frames and encode. This will only work if the framebuffer is both
8184 linear and mappable - if not, the result may be scrambled or fail
8185 to download.
8186
8187 ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
8188
8189 • Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert
8190 to NV12 and encode as H.264.
8191
8192 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
8193
8194 • To capture only part of a plane the output can be cropped - this
8195 can be used to capture a single window, as long as it has a known
8196 absolute position and size. For example, to capture and encode the
8197 middle quarter of a 1920x1080 plane:
8198
8199 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
8200
8201 lavfi
8202 Libavfilter input virtual device.
8203
8204 This input device reads data from the open output pads of a libavfilter
8205 filtergraph.
8206
8207 For each filtergraph open output, the input device will create a
8208 corresponding stream which is mapped to the generated output. Currently
8209 only video data is supported. The filtergraph is specified through the
8210 option graph.
8211
8212 Options
8213
8214 graph
8215 Specify the filtergraph to use as input. Each video open output
8216 must be labelled by a unique string of the form "outN", where N is
8217 a number starting from 0 corresponding to the mapped input stream
8218 generated by the device. The first unlabelled output is
8219 automatically assigned to the "out0" label, but all the others need
8220 to be specified explicitly.
8221
8222 The suffix "+subcc" can be appended to the output label to create
8223 an extra stream with the closed captions packets attached to that
8224 output (experimental; only for EIA-608 / CEA-708 for now). The
8225 subcc streams are created after all the normal streams, in the
8226 order of the corresponding stream. For example, if there is
8227 "out19+subcc", "out7+subcc" and up to "out42", the stream #43 is
8228 subcc for stream #7 and stream #44 is subcc for stream #19.
8229
8230 If not specified defaults to the filename specified for the input
8231 device.
8232
8233 graph_file
8234 Set the filename of the filtergraph to be read and sent to the
8235 other filters. Syntax of the filtergraph is the same as the one
8236 specified by the option graph.
8237
8238 dumpgraph
8239 Dump graph to stderr.
8240
8241 Examples
8242
8243 • Create a color video stream and play it back with ffplay:
8244
8245 ffplay -f lavfi -graph "color=c=pink [out0]" dummy
8246
8247 • As the previous example, but use filename for specifying the graph
8248 description, and omit the "out0" label:
8249
8250 ffplay -f lavfi color=c=pink
8251
8252 • Create three different video test filtered sources and play them:
8253
8254 ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
8255
8256 • Read an audio stream from a file using the amovie source and play
8257 it back with ffplay:
8258
8259 ffplay -f lavfi "amovie=test.wav"
8260
8261 • Read an audio stream and a video stream and play it back with
8262 ffplay:
8263
8264 ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
8265
8266 • Dump decoded frames to images and closed captions to a file
8267 (experimental):
8268
8269 ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
8270
8271 libcdio
8272 Audio-CD input device based on libcdio.
8273
8274 To enable this input device during configuration you need libcdio
8275 installed on your system. It requires the configure option
8276 "--enable-libcdio".
8277
8278 This device allows playing and grabbing from an Audio-CD.
8279
8280 For example to copy with ffmpeg the entire Audio-CD in /dev/sr0, you
8281 may run the command:
8282
8283 ffmpeg -f libcdio -i /dev/sr0 cd.wav
8284
8285 Options
8286
8287 speed
8288 Set drive reading speed. Default value is 0.
8289
8290 The speed is specified CD-ROM speed units. The speed is set through
8291 the libcdio "cdio_cddap_speed_set" function. On many CD-ROM drives,
8292 specifying a value too large will result in using the fastest
8293 speed.
8294
8295 paranoia_mode
8296 Set paranoia recovery mode flags. It accepts one of the following
8297 values:
8298
8299 disable
8300 verify
8301 overlap
8302 neverskip
8303 full
8304
8305 Default value is disable.
8306
8307 For more information about the available recovery modes, consult
8308 the paranoia project documentation.
8309
8310 libdc1394
8311 IIDC1394 input device, based on libdc1394 and libraw1394.
8312
8313 Requires the configure option "--enable-libdc1394".
8314
8315 Options
8316
8317 framerate
8318 Set the frame rate. Default is "ntsc", corresponding to a frame
8319 rate of "30000/1001".
8320
8321 pixel_format
8322 Select the pixel format. Default is "uyvy422".
8323
8324 video_size
8325 Set the video size given as a string such as "640x480" or "hd720".
8326 Default is "qvga".
8327
8328 openal
8329 The OpenAL input device provides audio capture on all systems with a
8330 working OpenAL 1.1 implementation.
8331
8332 To enable this input device during configuration, you need OpenAL
8333 headers and libraries installed on your system, and need to configure
8334 FFmpeg with "--enable-openal".
8335
8336 OpenAL headers and libraries should be provided as part of your OpenAL
8337 implementation, or as an additional download (an SDK). Depending on
8338 your installation you may need to specify additional flags via the
8339 "--extra-cflags" and "--extra-ldflags" for allowing the build system to
8340 locate the OpenAL headers and libraries.
8341
8342 An incomplete list of OpenAL implementations follows:
8343
8344 Creative
8345 The official Windows implementation, providing hardware
8346 acceleration with supported devices and software fallback. See
8347 <http://openal.org/>.
8348
8349 OpenAL Soft
8350 Portable, open source (LGPL) software implementation. Includes
8351 backends for the most common sound APIs on the Windows, Linux,
8352 Solaris, and BSD operating systems. See
8353 <http://kcat.strangesoft.net/openal.html>.
8354
8355 Apple
8356 OpenAL is part of Core Audio, the official Mac OS X Audio
8357 interface. See
8358 <http://developer.apple.com/technologies/mac/audio-and-video.html>
8359
8360 This device allows one to capture from an audio input device handled
8361 through OpenAL.
8362
8363 You need to specify the name of the device to capture in the provided
8364 filename. If the empty string is provided, the device will
8365 automatically select the default device. You can get the list of the
8366 supported devices by using the option list_devices.
8367
8368 Options
8369
8370 channels
8371 Set the number of channels in the captured audio. Only the values 1
8372 (monaural) and 2 (stereo) are currently supported. Defaults to 2.
8373
8374 sample_size
8375 Set the sample size (in bits) of the captured audio. Only the
8376 values 8 and 16 are currently supported. Defaults to 16.
8377
8378 sample_rate
8379 Set the sample rate (in Hz) of the captured audio. Defaults to
8380 44.1k.
8381
8382 list_devices
8383 If set to true, print a list of devices and exit. Defaults to
8384 false.
8385
8386 Examples
8387
8388 Print the list of OpenAL supported devices and exit:
8389
8390 $ ffmpeg -list_devices true -f openal -i dummy out.ogg
8391
8392 Capture from the OpenAL device DR-BT101 via PulseAudio:
8393
8394 $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
8395
8396 Capture from the default device (note the empty string '' as filename):
8397
8398 $ ffmpeg -f openal -i '' out.ogg
8399
8400 Capture from two devices simultaneously, writing to two different
8401 files, within the same ffmpeg command:
8402
8403 $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
8404
8405 Note: not all OpenAL implementations support multiple simultaneous
8406 capture - try the latest OpenAL Soft if the above does not work.
8407
8408 oss
8409 Open Sound System input device.
8410
8411 The filename to provide to the input device is the device node
8412 representing the OSS input device, and is usually set to /dev/dsp.
8413
8414 For example to grab from /dev/dsp using ffmpeg use the command:
8415
8416 ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
8417
8418 For more information about OSS see:
8419 <http://manuals.opensound.com/usersguide/dsp.html>
8420
8421 Options
8422
8423 sample_rate
8424 Set the sample rate in Hz. Default is 48000.
8425
8426 channels
8427 Set the number of channels. Default is 2.
8428
8429 pulse
8430 PulseAudio input device.
8431
8432 To enable this output device you need to configure FFmpeg with
8433 "--enable-libpulse".
8434
8435 The filename to provide to the input device is a source device or the
8436 string "default"
8437
8438 To list the PulseAudio source devices and their properties you can
8439 invoke the command pactl list sources.
8440
8441 More information about PulseAudio can be found on
8442 <http://www.pulseaudio.org>.
8443
8444 Options
8445
8446 server
8447 Connect to a specific PulseAudio server, specified by an IP
8448 address. Default server is used when not provided.
8449
8450 name
8451 Specify the application name PulseAudio will use when showing
8452 active clients, by default it is the "LIBAVFORMAT_IDENT" string.
8453
8454 stream_name
8455 Specify the stream name PulseAudio will use when showing active
8456 streams, by default it is "record".
8457
8458 sample_rate
8459 Specify the samplerate in Hz, by default 48kHz is used.
8460
8461 channels
8462 Specify the channels in use, by default 2 (stereo) is set.
8463
8464 frame_size
8465 This option does nothing and is deprecated.
8466
8467 fragment_size
8468 Specify the size in bytes of the minimal buffering fragment in
8469 PulseAudio, it will affect the audio latency. By default it is set
8470 to 50 ms amount of data.
8471
8472 wallclock
8473 Set the initial PTS using the current time. Default is 1.
8474
8475 Examples
8476
8477 Record a stream from default device:
8478
8479 ffmpeg -f pulse -i default /tmp/pulse.wav
8480
8481 sndio
8482 sndio input device.
8483
8484 To enable this input device during configuration you need libsndio
8485 installed on your system.
8486
8487 The filename to provide to the input device is the device node
8488 representing the sndio input device, and is usually set to /dev/audio0.
8489
8490 For example to grab from /dev/audio0 using ffmpeg use the command:
8491
8492 ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
8493
8494 Options
8495
8496 sample_rate
8497 Set the sample rate in Hz. Default is 48000.
8498
8499 channels
8500 Set the number of channels. Default is 2.
8501
8502 video4linux2, v4l2
8503 Video4Linux2 input video device.
8504
8505 "v4l2" can be used as alias for "video4linux2".
8506
8507 If FFmpeg is built with v4l-utils support (by using the
8508 "--enable-libv4l2" configure option), it is possible to use it with the
8509 "-use_libv4l2" input device option.
8510
8511 The name of the device to grab is a file device node, usually Linux
8512 systems tend to automatically create such nodes when the device (e.g.
8513 an USB webcam) is plugged into the system, and has a name of the kind
8514 /dev/videoN, where N is a number associated to the device.
8515
8516 Video4Linux2 devices usually support a limited set of widthxheight
8517 sizes and frame rates. You can check which are supported using
8518 -list_formats all for Video4Linux2 devices. Some devices, like TV
8519 cards, support one or more standards. It is possible to list all the
8520 supported standards using -list_standards all.
8521
8522 The time base for the timestamps is 1 microsecond. Depending on the
8523 kernel version and configuration, the timestamps may be derived from
8524 the real time clock (origin at the Unix Epoch) or the monotonic clock
8525 (origin usually at boot time, unaffected by NTP or manual changes to
8526 the clock). The -timestamps abs or -ts abs option can be used to force
8527 conversion into the real time clock.
8528
8529 Some usage examples of the video4linux2 device with ffmpeg and ffplay:
8530
8531 • List supported formats for a video4linux2 device:
8532
8533 ffplay -f video4linux2 -list_formats all /dev/video0
8534
8535 • Grab and show the input of a video4linux2 device:
8536
8537 ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
8538
8539 • Grab and record the input of a video4linux2 device, leave the frame
8540 rate and size as previously set:
8541
8542 ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
8543
8544 For more information about Video4Linux, check <http://linuxtv.org/>.
8545
8546 Options
8547
8548 standard
8549 Set the standard. Must be the name of a supported standard. To get
8550 a list of the supported standards, use the list_standards option.
8551
8552 channel
8553 Set the input channel number. Default to -1, which means using the
8554 previously selected channel.
8555
8556 video_size
8557 Set the video frame size. The argument must be a string in the form
8558 WIDTHxHEIGHT or a valid size abbreviation.
8559
8560 pixel_format
8561 Select the pixel format (only valid for raw video input).
8562
8563 input_format
8564 Set the preferred pixel format (for raw video) or a codec name.
8565 This option allows one to select the input format, when several are
8566 available.
8567
8568 framerate
8569 Set the preferred video frame rate.
8570
8571 list_formats
8572 List available formats (supported pixel formats, codecs, and frame
8573 sizes) and exit.
8574
8575 Available values are:
8576
8577 all Show all available (compressed and non-compressed) formats.
8578
8579 raw Show only raw video (non-compressed) formats.
8580
8581 compressed
8582 Show only compressed formats.
8583
8584 list_standards
8585 List supported standards and exit.
8586
8587 Available values are:
8588
8589 all Show all supported standards.
8590
8591 timestamps, ts
8592 Set type of timestamps for grabbed frames.
8593
8594 Available values are:
8595
8596 default
8597 Use timestamps from the kernel.
8598
8599 abs Use absolute timestamps (wall clock).
8600
8601 mono2abs
8602 Force conversion from monotonic to absolute timestamps.
8603
8604 Default value is "default".
8605
8606 use_libv4l2
8607 Use libv4l2 (v4l-utils) conversion functions. Default is 0.
8608
8609 vfwcap
8610 VfW (Video for Windows) capture input device.
8611
8612 The filename passed as input is the capture driver number, ranging from
8613 0 to 9. You may use "list" as filename to print a list of drivers. Any
8614 other filename will be interpreted as device number 0.
8615
8616 Options
8617
8618 video_size
8619 Set the video frame size.
8620
8621 framerate
8622 Set the grabbing frame rate. Default value is "ntsc", corresponding
8623 to a frame rate of "30000/1001".
8624
8625 x11grab
8626 X11 video input device.
8627
8628 To enable this input device during configuration you need libxcb
8629 installed on your system. It will be automatically detected during
8630 configuration.
8631
8632 This device allows one to capture a region of an X11 display.
8633
8634 The filename passed as input has the syntax:
8635
8636 [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
8637
8638 hostname:display_number.screen_number specifies the X11 display name of
8639 the screen to grab from. hostname can be omitted, and defaults to
8640 "localhost". The environment variable DISPLAY contains the default
8641 display name.
8642
8643 x_offset and y_offset specify the offsets of the grabbed area with
8644 respect to the top-left border of the X11 screen. They default to 0.
8645
8646 Check the X11 documentation (e.g. man X) for more detailed information.
8647
8648 Use the xdpyinfo program for getting basic information about the
8649 properties of your X11 display (e.g. grep for "name" or "dimensions").
8650
8651 For example to grab from :0.0 using ffmpeg:
8652
8653 ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
8654
8655 Grab at position "10,20":
8656
8657 ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
8658
8659 Options
8660
8661 select_region
8662 Specify whether to select the grabbing area graphically using the
8663 pointer. A value of 1 prompts the user to select the grabbing area
8664 graphically by clicking and dragging. A single click with no
8665 dragging will select the whole screen. A region with zero width or
8666 height will also select the whole screen. This option overwrites
8667 the video_size, grab_x, and grab_y options. Default value is 0.
8668
8669 draw_mouse
8670 Specify whether to draw the mouse pointer. A value of 0 specifies
8671 not to draw the pointer. Default value is 1.
8672
8673 follow_mouse
8674 Make the grabbed area follow the mouse. The argument can be
8675 "centered" or a number of pixels PIXELS.
8676
8677 When it is specified with "centered", the grabbing region follows
8678 the mouse pointer and keeps the pointer at the center of region;
8679 otherwise, the region follows only when the mouse pointer reaches
8680 within PIXELS (greater than zero) to the edge of region.
8681
8682 For example:
8683
8684 ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
8685
8686 To follow only when the mouse pointer reaches within 100 pixels to
8687 edge:
8688
8689 ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
8690
8691 framerate
8692 Set the grabbing frame rate. Default value is "ntsc", corresponding
8693 to a frame rate of "30000/1001".
8694
8695 show_region
8696 Show grabbed region on screen.
8697
8698 If show_region is specified with 1, then the grabbing region will
8699 be indicated on screen. With this option, it is easy to know what
8700 is being grabbed if only a portion of the screen is grabbed.
8701
8702 region_border
8703 Set the region border thickness if -show_region 1 is used. Range
8704 is 1 to 128 and default is 3 (XCB-based x11grab only).
8705
8706 For example:
8707
8708 ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
8709
8710 With follow_mouse:
8711
8712 ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
8713
8714 window_id
8715 Grab this window, instead of the whole screen. Default value is 0,
8716 which maps to the whole screen (root window).
8717
8718 The id of a window can be found using the xwininfo program,
8719 possibly with options -tree and -root.
8720
8721 If the window is later enlarged, the new area is not recorded.
8722 Video ends when the window is closed, unmapped (i.e., iconified) or
8723 shrunk beyond the video size (which defaults to the initial window
8724 size).
8725
8726 This option disables options follow_mouse and select_region.
8727
8728 video_size
8729 Set the video frame size. Default is the full desktop or window.
8730
8731 grab_x
8732 grab_y
8733 Set the grabbing region coordinates. They are expressed as offset
8734 from the top left corner of the X11 window and correspond to the
8735 x_offset and y_offset parameters in the device name. The default
8736 value for both options is 0.
8737
8739 The audio resampler supports the following named options.
8740
8741 Options may be set by specifying -option value in the FFmpeg tools,
8742 option=value for the aresample filter, by setting the value explicitly
8743 in the "SwrContext" options or using the libavutil/opt.h API for
8744 programmatic use.
8745
8746 uchl, used_chlayout
8747 Set used input channel layout. Default is unset. This option is
8748 only used for special remapping.
8749
8750 isr, in_sample_rate
8751 Set the input sample rate. Default value is 0.
8752
8753 osr, out_sample_rate
8754 Set the output sample rate. Default value is 0.
8755
8756 isf, in_sample_fmt
8757 Specify the input sample format. It is set by default to "none".
8758
8759 osf, out_sample_fmt
8760 Specify the output sample format. It is set by default to "none".
8761
8762 tsf, internal_sample_fmt
8763 Set the internal sample format. Default value is "none". This will
8764 automatically be chosen when it is not explicitly set.
8765
8766 ichl, in_chlayout
8767 ochl, out_chlayout
8768 Set the input/output channel layout.
8769
8770 See the Channel Layout section in the ffmpeg-utils(1) manual for
8771 the required syntax.
8772
8773 clev, center_mix_level
8774 Set the center mix level. It is a value expressed in deciBel, and
8775 must be in the interval [-32,32].
8776
8777 slev, surround_mix_level
8778 Set the surround mix level. It is a value expressed in deciBel, and
8779 must be in the interval [-32,32].
8780
8781 lfe_mix_level
8782 Set LFE mix into non LFE level. It is used when there is a LFE
8783 input but no LFE output. It is a value expressed in deciBel, and
8784 must be in the interval [-32,32].
8785
8786 rmvol, rematrix_volume
8787 Set rematrix volume. Default value is 1.0.
8788
8789 rematrix_maxval
8790 Set maximum output value for rematrixing. This can be used to
8791 prevent clipping vs. preventing volume reduction. A value of 1.0
8792 prevents clipping.
8793
8794 flags, swr_flags
8795 Set flags used by the converter. Default value is 0.
8796
8797 It supports the following individual flags:
8798
8799 res force resampling, this flag forces resampling to be used even
8800 when the input and output sample rates match.
8801
8802 dither_scale
8803 Set the dither scale. Default value is 1.
8804
8805 dither_method
8806 Set dither method. Default value is 0.
8807
8808 Supported values:
8809
8810 rectangular
8811 select rectangular dither
8812
8813 triangular
8814 select triangular dither
8815
8816 triangular_hp
8817 select triangular dither with high pass
8818
8819 lipshitz
8820 select Lipshitz noise shaping dither.
8821
8822 shibata
8823 select Shibata noise shaping dither.
8824
8825 low_shibata
8826 select low Shibata noise shaping dither.
8827
8828 high_shibata
8829 select high Shibata noise shaping dither.
8830
8831 f_weighted
8832 select f-weighted noise shaping dither
8833
8834 modified_e_weighted
8835 select modified-e-weighted noise shaping dither
8836
8837 improved_e_weighted
8838 select improved-e-weighted noise shaping dither
8839
8840 resampler
8841 Set resampling engine. Default value is swr.
8842
8843 Supported values:
8844
8845 swr select the native SW Resampler; filter options precision and
8846 cheby are not applicable in this case.
8847
8848 soxr
8849 select the SoX Resampler (where available); compensation, and
8850 filter options filter_size, phase_shift, exact_rational,
8851 filter_type & kaiser_beta, are not applicable in this case.
8852
8853 filter_size
8854 For swr only, set resampling filter size, default value is 32.
8855
8856 phase_shift
8857 For swr only, set resampling phase shift, default value is 10, and
8858 must be in the interval [0,30].
8859
8860 linear_interp
8861 Use linear interpolation when enabled (the default). Disable it if
8862 you want to preserve speed instead of quality when exact_rational
8863 fails.
8864
8865 exact_rational
8866 For swr only, when enabled, try to use exact phase_count based on
8867 input and output sample rate. However, if it is larger than "1 <<
8868 phase_shift", the phase_count will be "1 << phase_shift" as
8869 fallback. Default is enabled.
8870
8871 cutoff
8872 Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must
8873 be a float value between 0 and 1. Default value is 0.97 with swr,
8874 and 0.91 with soxr (which, with a sample-rate of 44100, preserves
8875 the entire audio band to 20kHz).
8876
8877 precision
8878 For soxr only, the precision in bits to which the resampled signal
8879 will be calculated. The default value of 20 (which, with suitable
8880 dithering, is appropriate for a destination bit-depth of 16) gives
8881 SoX's 'High Quality'; a value of 28 gives SoX's 'Very High
8882 Quality'.
8883
8884 cheby
8885 For soxr only, selects passband rolloff none (Chebyshev) & higher-
8886 precision approximation for 'irrational' ratios. Default value is
8887 0.
8888
8889 async
8890 For swr only, simple 1 parameter audio sync to timestamps using
8891 stretching, squeezing, filling and trimming. Setting this to 1 will
8892 enable filling and trimming, larger values represent the maximum
8893 amount in samples that the data may be stretched or squeezed for
8894 each second. Default value is 0, thus no compensation is applied
8895 to make the samples match the audio timestamps.
8896
8897 first_pts
8898 For swr only, assume the first pts should be this value. The time
8899 unit is 1 / sample rate. This allows for padding/trimming at the
8900 start of stream. By default, no assumption is made about the first
8901 frame's expected pts, so no padding or trimming is done. For
8902 example, this could be set to 0 to pad the beginning with silence
8903 if an audio stream starts after the video stream or to trim any
8904 samples with a negative pts due to encoder delay.
8905
8906 min_comp
8907 For swr only, set the minimum difference between timestamps and
8908 audio data (in seconds) to trigger stretching/squeezing/filling or
8909 trimming of the data to make it match the timestamps. The default
8910 is that stretching/squeezing/filling and trimming is disabled
8911 (min_comp = "FLT_MAX").
8912
8913 min_hard_comp
8914 For swr only, set the minimum difference between timestamps and
8915 audio data (in seconds) to trigger adding/dropping samples to make
8916 it match the timestamps. This option effectively is a threshold to
8917 select between hard (trim/fill) and soft (squeeze/stretch)
8918 compensation. Note that all compensation is by default disabled
8919 through min_comp. The default is 0.1.
8920
8921 comp_duration
8922 For swr only, set duration (in seconds) over which data is
8923 stretched/squeezed to make it match the timestamps. Must be a non-
8924 negative double float value, default value is 1.0.
8925
8926 max_soft_comp
8927 For swr only, set maximum factor by which data is
8928 stretched/squeezed to make it match the timestamps. Must be a non-
8929 negative double float value, default value is 0.
8930
8931 matrix_encoding
8932 Select matrixed stereo encoding.
8933
8934 It accepts the following values:
8935
8936 none
8937 select none
8938
8939 dolby
8940 select Dolby
8941
8942 dplii
8943 select Dolby Pro Logic II
8944
8945 Default value is "none".
8946
8947 filter_type
8948 For swr only, select resampling filter type. This only affects
8949 resampling operations.
8950
8951 It accepts the following values:
8952
8953 cubic
8954 select cubic
8955
8956 blackman_nuttall
8957 select Blackman Nuttall windowed sinc
8958
8959 kaiser
8960 select Kaiser windowed sinc
8961
8962 kaiser_beta
8963 For swr only, set Kaiser window beta value. Must be a double float
8964 value in the interval [2,16], default value is 9.
8965
8966 output_sample_bits
8967 For swr only, set number of used output sample bits for dithering.
8968 Must be an integer in the interval [0,64], default value is 0,
8969 which means it's not used.
8970
8972 The video scaler supports the following named options.
8973
8974 Options may be set by specifying -option value in the FFmpeg tools,
8975 with a few API-only exceptions noted below. For programmatic use, they
8976 can be set explicitly in the "SwsContext" options or through the
8977 libavutil/opt.h API.
8978
8979 sws_flags
8980 Set the scaler flags. This is also used to set the scaling
8981 algorithm. Only a single algorithm should be selected. Default
8982 value is bicubic.
8983
8984 It accepts the following values:
8985
8986 fast_bilinear
8987 Select fast bilinear scaling algorithm.
8988
8989 bilinear
8990 Select bilinear scaling algorithm.
8991
8992 bicubic
8993 Select bicubic scaling algorithm.
8994
8995 experimental
8996 Select experimental scaling algorithm.
8997
8998 neighbor
8999 Select nearest neighbor rescaling algorithm.
9000
9001 area
9002 Select averaging area rescaling algorithm.
9003
9004 bicublin
9005 Select bicubic scaling algorithm for the luma component,
9006 bilinear for chroma components.
9007
9008 gauss
9009 Select Gaussian rescaling algorithm.
9010
9011 sinc
9012 Select sinc rescaling algorithm.
9013
9014 lanczos
9015 Select Lanczos rescaling algorithm. The default width (alpha)
9016 is 3 and can be changed by setting "param0".
9017
9018 spline
9019 Select natural bicubic spline rescaling algorithm.
9020
9021 print_info
9022 Enable printing/debug logging.
9023
9024 accurate_rnd
9025 Enable accurate rounding.
9026
9027 full_chroma_int
9028 Enable full chroma interpolation.
9029
9030 full_chroma_inp
9031 Select full chroma input.
9032
9033 bitexact
9034 Enable bitexact output.
9035
9036 srcw (API only)
9037 Set source width.
9038
9039 srch (API only)
9040 Set source height.
9041
9042 dstw (API only)
9043 Set destination width.
9044
9045 dsth (API only)
9046 Set destination height.
9047
9048 src_format (API only)
9049 Set source pixel format (must be expressed as an integer).
9050
9051 dst_format (API only)
9052 Set destination pixel format (must be expressed as an integer).
9053
9054 src_range (boolean)
9055 If value is set to 1, indicates source is full range. Default value
9056 is 0, which indicates source is limited range.
9057
9058 dst_range (boolean)
9059 If value is set to 1, enable full range for destination. Default
9060 value is 0, which enables limited range.
9061
9062 param0, param1
9063 Set scaling algorithm parameters. The specified values are specific
9064 of some scaling algorithms and ignored by others. The specified
9065 values are floating point number values.
9066
9067 sws_dither
9068 Set the dithering algorithm. Accepts one of the following values.
9069 Default value is auto.
9070
9071 auto
9072 automatic choice
9073
9074 none
9075 no dithering
9076
9077 bayer
9078 bayer dither
9079
9080 ed error diffusion dither
9081
9082 a_dither
9083 arithmetic dither, based using addition
9084
9085 x_dither
9086 arithmetic dither, based using xor (more random/less apparent
9087 patterning that a_dither).
9088
9089 alphablend
9090 Set the alpha blending to use when the input has alpha but the
9091 output does not. Default value is none.
9092
9093 uniform_color
9094 Blend onto a uniform background color
9095
9096 checkerboard
9097 Blend onto a checkerboard
9098
9099 none
9100 No blending
9101
9103 Filtering in FFmpeg is enabled through the libavfilter library.
9104
9105 In libavfilter, a filter can have multiple inputs and multiple outputs.
9106 To illustrate the sorts of things that are possible, we consider the
9107 following filtergraph.
9108
9109 [main]
9110 input --> split ---------------------> overlay --> output
9111 | ^
9112 |[tmp] [flip]|
9113 +-----> crop --> vflip -------+
9114
9115 This filtergraph splits the input stream in two streams, then sends one
9116 stream through the crop filter and the vflip filter, before merging it
9117 back with the other stream by overlaying it on top. You can use the
9118 following command to achieve this:
9119
9120 ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
9121
9122 The result will be that the top half of the video is mirrored onto the
9123 bottom half of the output video.
9124
9125 Filters in the same linear chain are separated by commas, and distinct
9126 linear chains of filters are separated by semicolons. In our example,
9127 crop,vflip are in one linear chain, split and overlay are separately in
9128 another. The points where the linear chains join are labelled by names
9129 enclosed in square brackets. In the example, the split filter generates
9130 two outputs that are associated to the labels [main] and [tmp].
9131
9132 The stream sent to the second output of split, labelled as [tmp], is
9133 processed through the crop filter, which crops away the lower half part
9134 of the video, and then vertically flipped. The overlay filter takes in
9135 input the first unchanged output of the split filter (which was
9136 labelled as [main]), and overlay on its lower half the output generated
9137 by the crop,vflip filterchain.
9138
9139 Some filters take in input a list of parameters: they are specified
9140 after the filter name and an equal sign, and are separated from each
9141 other by a colon.
9142
9143 There exist so-called source filters that do not have an audio/video
9144 input, and sink filters that will not have audio/video output.
9145
9147 The graph2dot program included in the FFmpeg tools directory can be
9148 used to parse a filtergraph description and issue a corresponding
9149 textual representation in the dot language.
9150
9151 Invoke the command:
9152
9153 graph2dot -h
9154
9155 to see how to use graph2dot.
9156
9157 You can then pass the dot description to the dot program (from the
9158 graphviz suite of programs) and obtain a graphical representation of
9159 the filtergraph.
9160
9161 For example the sequence of commands:
9162
9163 echo <GRAPH_DESCRIPTION> | \
9164 tools/graph2dot -o graph.tmp && \
9165 dot -Tpng graph.tmp -o graph.png && \
9166 display graph.png
9167
9168 can be used to create and display an image representing the graph
9169 described by the GRAPH_DESCRIPTION string. Note that this string must
9170 be a complete self-contained graph, with its inputs and outputs
9171 explicitly defined. For example if your command line is of the form:
9172
9173 ffmpeg -i infile -vf scale=640:360 outfile
9174
9175 your GRAPH_DESCRIPTION string will need to be of the form:
9176
9177 nullsrc,scale=640:360,nullsink
9178
9179 you may also need to set the nullsrc parameters and add a format filter
9180 in order to simulate a specific input file.
9181
9183 A filtergraph is a directed graph of connected filters. It can contain
9184 cycles, and there can be multiple links between a pair of filters. Each
9185 link has one input pad on one side connecting it to one filter from
9186 which it takes its input, and one output pad on the other side
9187 connecting it to one filter accepting its output.
9188
9189 Each filter in a filtergraph is an instance of a filter class
9190 registered in the application, which defines the features and the
9191 number of input and output pads of the filter.
9192
9193 A filter with no input pads is called a "source", and a filter with no
9194 output pads is called a "sink".
9195
9196 Filtergraph syntax
9197 A filtergraph has a textual representation, which is recognized by the
9198 -filter/-vf/-af and -filter_complex options in ffmpeg and -vf/-af in
9199 ffplay, and by the avfilter_graph_parse_ptr() function defined in
9200 libavfilter/avfilter.h.
9201
9202 A filterchain consists of a sequence of connected filters, each one
9203 connected to the previous one in the sequence. A filterchain is
9204 represented by a list of ","-separated filter descriptions.
9205
9206 A filtergraph consists of a sequence of filterchains. A sequence of
9207 filterchains is represented by a list of ";"-separated filterchain
9208 descriptions.
9209
9210 A filter is represented by a string of the form:
9211 [in_link_1]...[in_link_N]filter_name@id=arguments[out_link_1]...[out_link_M]
9212
9213 filter_name is the name of the filter class of which the described
9214 filter is an instance of, and has to be the name of one of the filter
9215 classes registered in the program optionally followed by "@id". The
9216 name of the filter class is optionally followed by a string
9217 "=arguments".
9218
9219 arguments is a string which contains the parameters used to initialize
9220 the filter instance. It may have one of two forms:
9221
9222 • A ':'-separated list of key=value pairs.
9223
9224 • A ':'-separated list of value. In this case, the keys are assumed
9225 to be the option names in the order they are declared. E.g. the
9226 "fade" filter declares three options in this order -- type,
9227 start_frame and nb_frames. Then the parameter list in:0:30 means
9228 that the value in is assigned to the option type, 0 to start_frame
9229 and 30 to nb_frames.
9230
9231 • A ':'-separated list of mixed direct value and long key=value
9232 pairs. The direct value must precede the key=value pairs, and
9233 follow the same constraints order of the previous point. The
9234 following key=value pairs can be set in any preferred order.
9235
9236 If the option value itself is a list of items (e.g. the "format" filter
9237 takes a list of pixel formats), the items in the list are usually
9238 separated by |.
9239
9240 The list of arguments can be quoted using the character ' as initial
9241 and ending mark, and the character \ for escaping the characters within
9242 the quoted text; otherwise the argument string is considered terminated
9243 when the next special character (belonging to the set []=;,) is
9244 encountered.
9245
9246 A special syntax implemented in the ffmpeg CLI tool allows loading
9247 option values from files. This is done be prepending a slash '/' to the
9248 option name, then the supplied value is interpreted as a path from
9249 which the actual value is loaded. E.g.
9250
9251 ffmpeg -i <INPUT> -vf drawtext=/text=/tmp/some_text <OUTPUT>
9252
9253 will load the text to be drawn from /tmp/some_text. API users wishing
9254 to implement a similar feature should use the
9255 "avfilter_graph_segment_*()" functions together with custom IO code.
9256
9257 The name and arguments of the filter are optionally preceded and
9258 followed by a list of link labels. A link label allows one to name a
9259 link and associate it to a filter output or input pad. The preceding
9260 labels in_link_1 ... in_link_N, are associated to the filter input
9261 pads, the following labels out_link_1 ... out_link_M, are associated to
9262 the output pads.
9263
9264 When two link labels with the same name are found in the filtergraph, a
9265 link between the corresponding input and output pad is created.
9266
9267 If an output pad is not labelled, it is linked by default to the first
9268 unlabelled input pad of the next filter in the filterchain. For
9269 example in the filterchain
9270
9271 nullsrc, split[L1], [L2]overlay, nullsink
9272
9273 the split filter instance has two output pads, and the overlay filter
9274 instance two input pads. The first output pad of split is labelled
9275 "L1", the first input pad of overlay is labelled "L2", and the second
9276 output pad of split is linked to the second input pad of overlay, which
9277 are both unlabelled.
9278
9279 In a filter description, if the input label of the first filter is not
9280 specified, "in" is assumed; if the output label of the last filter is
9281 not specified, "out" is assumed.
9282
9283 In a complete filterchain all the unlabelled filter input and output
9284 pads must be connected. A filtergraph is considered valid if all the
9285 filter input and output pads of all the filterchains are connected.
9286
9287 Libavfilter will automatically insert scale filters where format
9288 conversion is required. It is possible to specify swscale flags for
9289 those automatically inserted scalers by prepending "sws_flags=flags;"
9290 to the filtergraph description.
9291
9292 Here is a BNF description of the filtergraph syntax:
9293
9294 <NAME> ::= sequence of alphanumeric characters and '_'
9295 <FILTER_NAME> ::= <NAME>["@"<NAME>]
9296 <LINKLABEL> ::= "[" <NAME> "]"
9297 <LINKLABELS> ::= <LINKLABEL> [<LINKLABELS>]
9298 <FILTER_ARGUMENTS> ::= sequence of chars (possibly quoted)
9299 <FILTER> ::= [<LINKLABELS>] <FILTER_NAME> ["=" <FILTER_ARGUMENTS>] [<LINKLABELS>]
9300 <FILTERCHAIN> ::= <FILTER> [,<FILTERCHAIN>]
9301 <FILTERGRAPH> ::= [sws_flags=<flags>;] <FILTERCHAIN> [;<FILTERGRAPH>]
9302
9303 Notes on filtergraph escaping
9304 Filtergraph description composition entails several levels of escaping.
9305 See the "Quoting and escaping" section in the ffmpeg-utils(1) manual
9306 for more information about the employed escaping procedure.
9307
9308 A first level escaping affects the content of each filter option value,
9309 which may contain the special character ":" used to separate values, or
9310 one of the escaping characters "\'".
9311
9312 A second level escaping affects the whole filter description, which may
9313 contain the escaping characters "\'" or the special characters "[],;"
9314 used by the filtergraph description.
9315
9316 Finally, when you specify a filtergraph on a shell commandline, you
9317 need to perform a third level escaping for the shell special characters
9318 contained within it.
9319
9320 For example, consider the following string to be embedded in the
9321 drawtext filter description text value:
9322
9323 this is a 'string': may contain one, or more, special characters
9324
9325 This string contains the "'" special escaping character, and the ":"
9326 special character, so it needs to be escaped in this way:
9327
9328 text=this is a \'string\'\: may contain one, or more, special characters
9329
9330 A second level of escaping is required when embedding the filter
9331 description in a filtergraph description, in order to escape all the
9332 filtergraph special characters. Thus the example above becomes:
9333
9334 drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
9335
9336 (note that in addition to the "\'" escaping special characters, also
9337 "," needs to be escaped).
9338
9339 Finally an additional level of escaping is needed when writing the
9340 filtergraph description in a shell command, which depends on the
9341 escaping rules of the adopted shell. For example, assuming that "\" is
9342 special and needs to be escaped with another "\", the previous string
9343 will finally result in:
9344
9345 -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters"
9346
9348 Some filters support a generic enable option. For the filters
9349 supporting timeline editing, this option can be set to an expression
9350 which is evaluated before sending a frame to the filter. If the
9351 evaluation is non-zero, the filter will be enabled, otherwise the frame
9352 will be sent unchanged to the next filter in the filtergraph.
9353
9354 The expression accepts the following values:
9355
9356 t timestamp expressed in seconds, NAN if the input timestamp is
9357 unknown
9358
9359 n sequential number of the input frame, starting from 0
9360
9361 pos the position in the file of the input frame, NAN if unknown
9362
9363 w
9364 h width and height of the input frame if video
9365
9366 Additionally, these filters support an enable command that can be used
9367 to re-define the expression.
9368
9369 Like any other filtering option, the enable option follows the same
9370 rules.
9371
9372 For example, to enable a blur filter (smartblur) from 10 seconds to 3
9373 minutes, and a curves filter starting at 3 seconds:
9374
9375 smartblur = enable='between(t,10,3*60)',
9376 curves = enable='gte(t,3)' : preset=cross_process
9377
9378 See "ffmpeg -filters" to view which filters have timeline support.
9379
9381 Some options can be changed during the operation of the filter using a
9382 command. These options are marked 'T' on the output of ffmpeg -h
9383 filter=<name of filter>. The name of the command is the name of the
9384 option and the argument is the new value.
9385
9387 Some filters with several inputs support a common set of options.
9388 These options can only be set by name, not with the short notation.
9389
9390 eof_action
9391 The action to take when EOF is encountered on the secondary input;
9392 it accepts one of the following values:
9393
9394 repeat
9395 Repeat the last frame (the default).
9396
9397 endall
9398 End both streams.
9399
9400 pass
9401 Pass the main input through.
9402
9403 shortest
9404 If set to 1, force the output to terminate when the shortest input
9405 terminates. Default value is 0.
9406
9407 repeatlast
9408 If set to 1, force the filter to extend the last frame of secondary
9409 streams until the end of the primary stream. A value of 0 disables
9410 this behavior. Default value is 1.
9411
9412 ts_sync_mode
9413 How strictly to sync streams based on secondary input timestamps;
9414 it accepts one of the following values:
9415
9416 default
9417 Frame from secondary input with the nearest lower or equal
9418 timestamp to the primary input frame.
9419
9420 nearest
9421 Frame from secondary input with the absolute nearest timestamp
9422 to the primary input frame.
9423
9425 When you configure your FFmpeg build, you can disable any of the
9426 existing filters using "--disable-filters". The configure output will
9427 show the audio filters included in your build.
9428
9429 Below is a description of the currently available audio filters.
9430
9431 acompressor
9432 A compressor is mainly used to reduce the dynamic range of a signal.
9433 Especially modern music is mostly compressed at a high ratio to improve
9434 the overall loudness. It's done to get the highest attention of a
9435 listener, "fatten" the sound and bring more "power" to the track. If a
9436 signal is compressed too much it may sound dull or "dead" afterwards or
9437 it may start to "pump" (which could be a powerful effect but can also
9438 destroy a track completely). The right compression is the key to reach
9439 a professional sound and is the high art of mixing and mastering.
9440 Because of its complex settings it may take a long time to get the
9441 right feeling for this kind of effect.
9442
9443 Compression is done by detecting the volume above a chosen level
9444 "threshold" and dividing it by the factor set with "ratio". So if you
9445 set the threshold to -12dB and your signal reaches -6dB a ratio of 2:1
9446 will result in a signal at -9dB. Because an exact manipulation of the
9447 signal would cause distortion of the waveform the reduction can be
9448 levelled over the time. This is done by setting "Attack" and "Release".
9449 "attack" determines how long the signal has to rise above the threshold
9450 before any reduction will occur and "release" sets the time the signal
9451 has to fall below the threshold to reduce the reduction again. Shorter
9452 signals than the chosen attack time will be left untouched. The
9453 overall reduction of the signal can be made up afterwards with the
9454 "makeup" setting. So compressing the peaks of a signal about 6dB and
9455 raising the makeup to this level results in a signal twice as loud than
9456 the source. To gain a softer entry in the compression the "knee"
9457 flattens the hard edge at the threshold in the range of the chosen
9458 decibels.
9459
9460 The filter accepts the following options:
9461
9462 level_in
9463 Set input gain. Default is 1. Range is between 0.015625 and 64.
9464
9465 mode
9466 Set mode of compressor operation. Can be "upward" or "downward".
9467 Default is "downward".
9468
9469 threshold
9470 If a signal of stream rises above this level it will affect the
9471 gain reduction. By default it is 0.125. Range is between
9472 0.00097563 and 1.
9473
9474 ratio
9475 Set a ratio by which the signal is reduced. 1:2 means that if the
9476 level rose 4dB above the threshold, it will be only 2dB above after
9477 the reduction. Default is 2. Range is between 1 and 20.
9478
9479 attack
9480 Amount of milliseconds the signal has to rise above the threshold
9481 before gain reduction starts. Default is 20. Range is between 0.01
9482 and 2000.
9483
9484 release
9485 Amount of milliseconds the signal has to fall below the threshold
9486 before reduction is decreased again. Default is 250. Range is
9487 between 0.01 and 9000.
9488
9489 makeup
9490 Set the amount by how much signal will be amplified after
9491 processing. Default is 1. Range is from 1 to 64.
9492
9493 knee
9494 Curve the sharp knee around the threshold to enter gain reduction
9495 more softly. Default is 2.82843. Range is between 1 and 8.
9496
9497 link
9498 Choose if the "average" level between all channels of input stream
9499 or the louder("maximum") channel of input stream affects the
9500 reduction. Default is "average".
9501
9502 detection
9503 Should the exact signal be taken in case of "peak" or an RMS one in
9504 case of "rms". Default is "rms" which is mostly smoother.
9505
9506 mix How much to use compressed signal in output. Default is 1. Range
9507 is between 0 and 1.
9508
9509 Commands
9510
9511 This filter supports the all above options as commands.
9512
9513 acontrast
9514 Simple audio dynamic range compression/expansion filter.
9515
9516 The filter accepts the following options:
9517
9518 contrast
9519 Set contrast. Default is 33. Allowed range is between 0 and 100.
9520
9521 acopy
9522 Copy the input audio source unchanged to the output. This is mainly
9523 useful for testing purposes.
9524
9525 acrossfade
9526 Apply cross fade from one input audio stream to another input audio
9527 stream. The cross fade is applied for specified duration near the end
9528 of first stream.
9529
9530 The filter accepts the following options:
9531
9532 nb_samples, ns
9533 Specify the number of samples for which the cross fade effect has
9534 to last. At the end of the cross fade effect the first input audio
9535 will be completely silent. Default is 44100.
9536
9537 duration, d
9538 Specify the duration of the cross fade effect. See the Time
9539 duration section in the ffmpeg-utils(1) manual for the accepted
9540 syntax. By default the duration is determined by nb_samples. If
9541 set this option is used instead of nb_samples.
9542
9543 overlap, o
9544 Should first stream end overlap with second stream start. Default
9545 is enabled.
9546
9547 curve1
9548 Set curve for cross fade transition for first stream.
9549
9550 curve2
9551 Set curve for cross fade transition for second stream.
9552
9553 For description of available curve types see afade filter
9554 description.
9555
9556 Examples
9557
9558 • Cross fade from one input to another:
9559
9560 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
9561
9562 • Cross fade from one input to another but without overlapping:
9563
9564 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
9565
9566 acrossover
9567 Split audio stream into several bands.
9568
9569 This filter splits audio stream into two or more frequency ranges.
9570 Summing all streams back will give flat output.
9571
9572 The filter accepts the following options:
9573
9574 split
9575 Set split frequencies. Those must be positive and increasing.
9576
9577 order
9578 Set filter order for each band split. This controls filter roll-off
9579 or steepness of filter transfer function. Available values are:
9580
9581 2nd 12 dB per octave.
9582
9583 4th 24 dB per octave.
9584
9585 6th 36 dB per octave.
9586
9587 8th 48 dB per octave.
9588
9589 10th
9590 60 dB per octave.
9591
9592 12th
9593 72 dB per octave.
9594
9595 14th
9596 84 dB per octave.
9597
9598 16th
9599 96 dB per octave.
9600
9601 18th
9602 108 dB per octave.
9603
9604 20th
9605 120 dB per octave.
9606
9607 Default is 4th.
9608
9609 level
9610 Set input gain level. Allowed range is from 0 to 1. Default value
9611 is 1.
9612
9613 gains
9614 Set output gain for each band. Default value is 1 for all bands.
9615
9616 precision
9617 Set which precision to use when processing samples.
9618
9619 auto
9620 Auto pick internal sample format depending on other filters.
9621
9622 float
9623 Always use single-floating point precision sample format.
9624
9625 double
9626 Always use double-floating point precision sample format.
9627
9628 Default value is "auto".
9629
9630 Examples
9631
9632 • Split input audio stream into two bands (low and high) with split
9633 frequency of 1500 Hz, each band will be in separate stream:
9634
9635 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
9636
9637 • Same as above, but with higher filter order:
9638
9639 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
9640
9641 • Same as above, but also with additional middle band (frequencies
9642 between 1500 and 8000):
9643
9644 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
9645
9646 acrusher
9647 Reduce audio bit resolution.
9648
9649 This filter is bit crusher with enhanced functionality. A bit crusher
9650 is used to audibly reduce number of bits an audio signal is sampled
9651 with. This doesn't change the bit depth at all, it just produces the
9652 effect. Material reduced in bit depth sounds more harsh and "digital".
9653 This filter is able to even round to continuous values instead of
9654 discrete bit depths. Additionally it has a D/C offset which results in
9655 different crushing of the lower and the upper half of the signal. An
9656 Anti-Aliasing setting is able to produce "softer" crushing sounds.
9657
9658 Another feature of this filter is the logarithmic mode. This setting
9659 switches from linear distances between bits to logarithmic ones. The
9660 result is a much more "natural" sounding crusher which doesn't gate low
9661 signals for example. The human ear has a logarithmic perception, so
9662 this kind of crushing is much more pleasant. Logarithmic crushing is
9663 also able to get anti-aliased.
9664
9665 The filter accepts the following options:
9666
9667 level_in
9668 Set level in.
9669
9670 level_out
9671 Set level out.
9672
9673 bits
9674 Set bit reduction.
9675
9676 mix Set mixing amount.
9677
9678 mode
9679 Can be linear: "lin" or logarithmic: "log".
9680
9681 dc Set DC.
9682
9683 aa Set anti-aliasing.
9684
9685 samples
9686 Set sample reduction.
9687
9688 lfo Enable LFO. By default disabled.
9689
9690 lforange
9691 Set LFO range.
9692
9693 lforate
9694 Set LFO rate.
9695
9696 Commands
9697
9698 This filter supports the all above options as commands.
9699
9700 acue
9701 Delay audio filtering until a given wallclock timestamp. See the cue
9702 filter.
9703
9704 adeclick
9705 Remove impulsive noise from input audio.
9706
9707 Samples detected as impulsive noise are replaced by interpolated
9708 samples using autoregressive modelling.
9709
9710 window, w
9711 Set window size, in milliseconds. Allowed range is from 10 to 100.
9712 Default value is 55 milliseconds. This sets size of window which
9713 will be processed at once.
9714
9715 overlap, o
9716 Set window overlap, in percentage of window size. Allowed range is
9717 from 50 to 95. Default value is 75 percent. Setting this to a very
9718 high value increases impulsive noise removal but makes whole
9719 process much slower.
9720
9721 arorder, a
9722 Set autoregression order, in percentage of window size. Allowed
9723 range is from 0 to 25. Default value is 2 percent. This option also
9724 controls quality of interpolated samples using neighbour good
9725 samples.
9726
9727 threshold, t
9728 Set threshold value. Allowed range is from 1 to 100. Default value
9729 is 2. This controls the strength of impulsive noise which is going
9730 to be removed. The lower value, the more samples will be detected
9731 as impulsive noise.
9732
9733 burst, b
9734 Set burst fusion, in percentage of window size. Allowed range is 0
9735 to 10. Default value is 2. If any two samples detected as noise
9736 are spaced less than this value then any sample between those two
9737 samples will be also detected as noise.
9738
9739 method, m
9740 Set overlap method.
9741
9742 It accepts the following values:
9743
9744 add, a
9745 Select overlap-add method. Even not interpolated samples are
9746 slightly changed with this method.
9747
9748 save, s
9749 Select overlap-save method. Not interpolated samples remain
9750 unchanged.
9751
9752 Default value is "a".
9753
9754 adeclip
9755 Remove clipped samples from input audio.
9756
9757 Samples detected as clipped are replaced by interpolated samples using
9758 autoregressive modelling.
9759
9760 window, w
9761 Set window size, in milliseconds. Allowed range is from 10 to 100.
9762 Default value is 55 milliseconds. This sets size of window which
9763 will be processed at once.
9764
9765 overlap, o
9766 Set window overlap, in percentage of window size. Allowed range is
9767 from 50 to 95. Default value is 75 percent.
9768
9769 arorder, a
9770 Set autoregression order, in percentage of window size. Allowed
9771 range is from 0 to 25. Default value is 8 percent. This option also
9772 controls quality of interpolated samples using neighbour good
9773 samples.
9774
9775 threshold, t
9776 Set threshold value. Allowed range is from 1 to 100. Default value
9777 is 10. Higher values make clip detection less aggressive.
9778
9779 hsize, n
9780 Set size of histogram used to detect clips. Allowed range is from
9781 100 to 9999. Default value is 1000. Higher values make clip
9782 detection less aggressive.
9783
9784 method, m
9785 Set overlap method.
9786
9787 It accepts the following values:
9788
9789 add, a
9790 Select overlap-add method. Even not interpolated samples are
9791 slightly changed with this method.
9792
9793 save, s
9794 Select overlap-save method. Not interpolated samples remain
9795 unchanged.
9796
9797 Default value is "a".
9798
9799 adecorrelate
9800 Apply decorrelation to input audio stream.
9801
9802 The filter accepts the following options:
9803
9804 stages
9805 Set decorrelation stages of filtering. Allowed range is from 1 to
9806 16. Default value is 6.
9807
9808 seed
9809 Set random seed used for setting delay in samples across channels.
9810
9811 adelay
9812 Delay one or more audio channels.
9813
9814 Samples in delayed channel are filled with silence.
9815
9816 The filter accepts the following option:
9817
9818 delays
9819 Set list of delays in milliseconds for each channel separated by
9820 '|'. Unused delays will be silently ignored. If number of given
9821 delays is smaller than number of channels all remaining channels
9822 will not be delayed. If you want to delay exact number of samples,
9823 append 'S' to number. If you want instead to delay in seconds,
9824 append 's' to number.
9825
9826 all Use last set delay for all remaining channels. By default is
9827 disabled. This option if enabled changes how option "delays" is
9828 interpreted.
9829
9830 Examples
9831
9832 • Delay first channel by 1.5 seconds, the third channel by 0.5
9833 seconds and leave the second channel (and any other channels that
9834 may be present) unchanged.
9835
9836 adelay=1500|0|500
9837
9838 • Delay second channel by 500 samples, the third channel by 700
9839 samples and leave the first channel (and any other channels that
9840 may be present) unchanged.
9841
9842 adelay=0|500S|700S
9843
9844 • Delay all channels by same number of samples:
9845
9846 adelay=delays=64S:all=1
9847
9848 adenorm
9849 Remedy denormals in audio by adding extremely low-level noise.
9850
9851 This filter shall be placed before any filter that can produce
9852 denormals.
9853
9854 A description of the accepted parameters follows.
9855
9856 level
9857 Set level of added noise in dB. Default is -351. Allowed range is
9858 from -451 to -90.
9859
9860 type
9861 Set type of added noise.
9862
9863 dc Add DC signal.
9864
9865 ac Add AC signal.
9866
9867 square
9868 Add square signal.
9869
9870 pulse
9871 Add pulse signal.
9872
9873 Default is "dc".
9874
9875 Commands
9876
9877 This filter supports the all above options as commands.
9878
9879 aderivative, aintegral
9880 Compute derivative/integral of audio stream.
9881
9882 Applying both filters one after another produces original audio.
9883
9884 adrc
9885 Apply spectral dynamic range controller filter to input audio stream.
9886
9887 A description of the accepted options follows.
9888
9889 transfer
9890 Set the transfer expression.
9891
9892 The expression can contain the following constants:
9893
9894 ch current channel number
9895
9896 sn current sample number
9897
9898 nb_channels
9899 number of channels
9900
9901 t timestamp expressed in seconds
9902
9903 sr sample rate
9904
9905 p current frequency power value, in dB
9906
9907 f current frequency in Hz
9908
9909 Default value is "p".
9910
9911 attack
9912 Set the attack in milliseconds. Default is 50 milliseconds.
9913 Allowed range is from 1 to 1000 milliseconds.
9914
9915 release
9916 Set the release in milliseconds. Default is 100 milliseconds.
9917 Allowed range is from 5 to 2000 milliseconds.
9918
9919 channels
9920 Set which channels to filter, by default "all" channels in audio
9921 stream are filtered.
9922
9923 Commands
9924
9925 This filter supports the all above options as commands.
9926
9927 Examples
9928
9929 • Apply spectral compression to all frequencies with threshold of -50
9930 dB and 1:6 ratio:
9931
9932 adrc=transfer='if(gt(p,-50),-50+(p-(-50))/6,p)':attack=50:release=100
9933
9934 • Similar to above but with 1:2 ratio and filtering only front center
9935 channel:
9936
9937 adrc=transfer='if(gt(p,-50),-50+(p-(-50))/2,p)':attack=50:release=100:channels=FC
9938
9939 • Apply spectral noise gate to all frequencies with threshold of -85
9940 dB and with short attack time and short release time:
9941
9942 adrc=transfer='if(lte(p,-85),p-800,p)':attack=1:release=5
9943
9944 • Apply spectral expansion to all frequencies with threshold of -10
9945 dB and 1:2 ratio:
9946
9947 adrc=transfer='if(lt(p,-10),-10+(p-(-10))*2,p)':attack=50:release=100
9948
9949 • Apply limiter to max -60 dB to all frequencies, with attack of 2 ms
9950 and release of 10 ms:
9951
9952 adrc=transfer='min(p,-60)':attack=2:release=10
9953
9954 adynamicequalizer
9955 Apply dynamic equalization to input audio stream.
9956
9957 A description of the accepted options follows.
9958
9959 threshold
9960 Set the detection threshold used to trigger equalization.
9961 Threshold detection is using bandpass filter. Default value is 0.
9962 Allowed range is from 0 to 100.
9963
9964 dfrequency
9965 Set the detection frequency in Hz used for bandpass filter used to
9966 trigger equalization. Default value is 1000 Hz. Allowed range is
9967 between 2 and 1000000 Hz.
9968
9969 dqfactor
9970 Set the detection resonance factor for bandpass filter used to
9971 trigger equalization. Default value is 1. Allowed range is from
9972 0.001 to 1000.
9973
9974 tfrequency
9975 Set the target frequency of equalization filter. Default value is
9976 1000 Hz. Allowed range is between 2 and 1000000 Hz.
9977
9978 tqfactor
9979 Set the target resonance factor for target equalization filter.
9980 Default value is 1. Allowed range is from 0.001 to 1000.
9981
9982 attack
9983 Set the amount of milliseconds the signal from detection has to
9984 rise above the detection threshold before equalization starts.
9985 Default is 20. Allowed range is between 1 and 2000.
9986
9987 release
9988 Set the amount of milliseconds the signal from detection has to
9989 fall below the detection threshold before equalization ends.
9990 Default is 200. Allowed range is between 1 and 2000.
9991
9992 ratio
9993 Set the ratio by which the equalization gain is raised. Default is
9994 1. Allowed range is between 0 and 30.
9995
9996 makeup
9997 Set the makeup offset by which the equalization gain is raised.
9998 Default is 0. Allowed range is between 0 and 100.
9999
10000 range
10001 Set the max allowed cut/boost amount. Default is 50. Allowed range
10002 is from 1 to 200.
10003
10004 mode
10005 Set the mode of filter operation, can be one of the following:
10006
10007 listen
10008 Output only isolated bandpass signal.
10009
10010 cut Cut frequencies above detection threshold.
10011
10012 boost
10013 Boost frequencies bellow detection threshold.
10014
10015 Default mode is cut.
10016
10017 tftype
10018 Set the type of target filter, can be one of the following:
10019
10020 bell
10021 lowshelf
10022 highshelf
10023
10024 Default type is bell.
10025
10026 direction
10027 Set processing direction relative to threshold.
10028
10029 downward
10030 Boost/Cut if threshold is higher/lower than detected volume.
10031
10032 upward
10033 Boost/Cut if threshold is lower/higher than detected volume.
10034
10035 Default direction is downward.
10036
10037 auto
10038 Automatically gather threshold from detection filter. By default is
10039 disabled. This option is useful to detect threshold in certain
10040 time frame of input audio stream, in such case option value is
10041 changed at runtime.
10042
10043 Available values are:
10044
10045 disabled
10046 Disable using automatically gathered threshold value.
10047
10048 off Stop picking threshold value.
10049
10050 on Start picking threshold value.
10051
10052 Commands
10053
10054 This filter supports the all above options as commands.
10055
10056 adynamicsmooth
10057 Apply dynamic smoothing to input audio stream.
10058
10059 A description of the accepted options follows.
10060
10061 sensitivity
10062 Set an amount of sensitivity to frequency fluctations. Default is
10063 2. Allowed range is from 0 to 1e+06.
10064
10065 basefreq
10066 Set a base frequency for smoothing. Default value is 22050.
10067 Allowed range is from 2 to 1e+06.
10068
10069 Commands
10070
10071 This filter supports the all above options as commands.
10072
10073 aecho
10074 Apply echoing to the input audio.
10075
10076 Echoes are reflected sound and can occur naturally amongst mountains
10077 (and sometimes large buildings) when talking or shouting; digital echo
10078 effects emulate this behaviour and are often used to help fill out the
10079 sound of a single instrument or vocal. The time difference between the
10080 original signal and the reflection is the "delay", and the loudness of
10081 the reflected signal is the "decay". Multiple echoes can have
10082 different delays and decays.
10083
10084 A description of the accepted parameters follows.
10085
10086 in_gain
10087 Set input gain of reflected signal. Default is 0.6.
10088
10089 out_gain
10090 Set output gain of reflected signal. Default is 0.3.
10091
10092 delays
10093 Set list of time intervals in milliseconds between original signal
10094 and reflections separated by '|'. Allowed range for each "delay" is
10095 "(0 - 90000.0]". Default is 1000.
10096
10097 decays
10098 Set list of loudness of reflected signals separated by '|'.
10099 Allowed range for each "decay" is "(0 - 1.0]". Default is 0.5.
10100
10101 Examples
10102
10103 • Make it sound as if there are twice as many instruments as are
10104 actually playing:
10105
10106 aecho=0.8:0.88:60:0.4
10107
10108 • If delay is very short, then it sounds like a (metallic) robot
10109 playing music:
10110
10111 aecho=0.8:0.88:6:0.4
10112
10113 • A longer delay will sound like an open air concert in the
10114 mountains:
10115
10116 aecho=0.8:0.9:1000:0.3
10117
10118 • Same as above but with one more mountain:
10119
10120 aecho=0.8:0.9:1000|1800:0.3|0.25
10121
10122 aemphasis
10123 Audio emphasis filter creates or restores material directly taken from
10124 LPs or emphased CDs with different filter curves. E.g. to store music
10125 on vinyl the signal has to be altered by a filter first to even out the
10126 disadvantages of this recording medium. Once the material is played
10127 back the inverse filter has to be applied to restore the distortion of
10128 the frequency response.
10129
10130 The filter accepts the following options:
10131
10132 level_in
10133 Set input gain.
10134
10135 level_out
10136 Set output gain.
10137
10138 mode
10139 Set filter mode. For restoring material use "reproduction" mode,
10140 otherwise use "production" mode. Default is "reproduction" mode.
10141
10142 type
10143 Set filter type. Selects medium. Can be one of the following:
10144
10145 col select Columbia.
10146
10147 emi select EMI.
10148
10149 bsi select BSI (78RPM).
10150
10151 riaa
10152 select RIAA.
10153
10154 cd select Compact Disc (CD).
10155
10156 50fm
10157 select 50µs (FM).
10158
10159 75fm
10160 select 75µs (FM).
10161
10162 50kf
10163 select 50µs (FM-KF).
10164
10165 75kf
10166 select 75µs (FM-KF).
10167
10168 Commands
10169
10170 This filter supports the all above options as commands.
10171
10172 aeval
10173 Modify an audio signal according to the specified expressions.
10174
10175 This filter accepts one or more expressions (one for each channel),
10176 which are evaluated and used to modify a corresponding audio signal.
10177
10178 It accepts the following parameters:
10179
10180 exprs
10181 Set the '|'-separated expressions list for each separate channel.
10182 If the number of input channels is greater than the number of
10183 expressions, the last specified expression is used for the
10184 remaining output channels.
10185
10186 channel_layout, c
10187 Set output channel layout. If not specified, the channel layout is
10188 specified by the number of expressions. If set to same, it will use
10189 by default the same input channel layout.
10190
10191 Each expression in exprs can contain the following constants and
10192 functions:
10193
10194 ch channel number of the current expression
10195
10196 n number of the evaluated sample, starting from 0
10197
10198 s sample rate
10199
10200 t time of the evaluated sample expressed in seconds
10201
10202 nb_in_channels
10203 nb_out_channels
10204 input and output number of channels
10205
10206 val(CH)
10207 the value of input channel with number CH
10208
10209 Note: this filter is slow. For faster processing you should use a
10210 dedicated filter.
10211
10212 Examples
10213
10214 • Half volume:
10215
10216 aeval=val(ch)/2:c=same
10217
10218 • Invert phase of the second channel:
10219
10220 aeval=val(0)|-val(1)
10221
10222 aexciter
10223 An exciter is used to produce high sound that is not present in the
10224 original signal. This is done by creating harmonic distortions of the
10225 signal which are restricted in range and added to the original signal.
10226 An Exciter raises the upper end of an audio signal without simply
10227 raising the higher frequencies like an equalizer would do to create a
10228 more "crisp" or "brilliant" sound.
10229
10230 The filter accepts the following options:
10231
10232 level_in
10233 Set input level prior processing of signal. Allowed range is from
10234 0 to 64. Default value is 1.
10235
10236 level_out
10237 Set output level after processing of signal. Allowed range is from
10238 0 to 64. Default value is 1.
10239
10240 amount
10241 Set the amount of harmonics added to original signal. Allowed
10242 range is from 0 to 64. Default value is 1.
10243
10244 drive
10245 Set the amount of newly created harmonics. Allowed range is from
10246 0.1 to 10. Default value is 8.5.
10247
10248 blend
10249 Set the octave of newly created harmonics. Allowed range is from
10250 -10 to 10. Default value is 0.
10251
10252 freq
10253 Set the lower frequency limit of producing harmonics in Hz.
10254 Allowed range is from 2000 to 12000 Hz. Default is 7500 Hz.
10255
10256 ceil
10257 Set the upper frequency limit of producing harmonics. Allowed
10258 range is from 9999 to 20000 Hz. If value is lower than 10000 Hz no
10259 limit is applied.
10260
10261 listen
10262 Mute the original signal and output only added harmonics. By
10263 default is disabled.
10264
10265 Commands
10266
10267 This filter supports the all above options as commands.
10268
10269 afade
10270 Apply fade-in/out effect to input audio.
10271
10272 A description of the accepted parameters follows.
10273
10274 type, t
10275 Specify the effect type, can be either "in" for fade-in, or "out"
10276 for a fade-out effect. Default is "in".
10277
10278 start_sample, ss
10279 Specify the number of the start sample for starting to apply the
10280 fade effect. Default is 0.
10281
10282 nb_samples, ns
10283 Specify the number of samples for which the fade effect has to
10284 last. At the end of the fade-in effect the output audio will have
10285 the same volume as the input audio, at the end of the fade-out
10286 transition the output audio will be silence. Default is 44100.
10287
10288 start_time, st
10289 Specify the start time of the fade effect. Default is 0. The value
10290 must be specified as a time duration; see the Time duration section
10291 in the ffmpeg-utils(1) manual for the accepted syntax. If set this
10292 option is used instead of start_sample.
10293
10294 duration, d
10295 Specify the duration of the fade effect. See the Time duration
10296 section in the ffmpeg-utils(1) manual for the accepted syntax. At
10297 the end of the fade-in effect the output audio will have the same
10298 volume as the input audio, at the end of the fade-out transition
10299 the output audio will be silence. By default the duration is
10300 determined by nb_samples. If set this option is used instead of
10301 nb_samples.
10302
10303 curve
10304 Set curve for fade transition.
10305
10306 It accepts the following values:
10307
10308 tri select triangular, linear slope (default)
10309
10310 qsin
10311 select quarter of sine wave
10312
10313 hsin
10314 select half of sine wave
10315
10316 esin
10317 select exponential sine wave
10318
10319 log select logarithmic
10320
10321 ipar
10322 select inverted parabola
10323
10324 qua select quadratic
10325
10326 cub select cubic
10327
10328 squ select square root
10329
10330 cbr select cubic root
10331
10332 par select parabola
10333
10334 exp select exponential
10335
10336 iqsin
10337 select inverted quarter of sine wave
10338
10339 ihsin
10340 select inverted half of sine wave
10341
10342 dese
10343 select double-exponential seat
10344
10345 desi
10346 select double-exponential sigmoid
10347
10348 losi
10349 select logistic sigmoid
10350
10351 sinc
10352 select sine cardinal function
10353
10354 isinc
10355 select inverted sine cardinal function
10356
10357 nofade
10358 no fade applied
10359
10360 silence
10361 Set the initial gain for fade-in or final gain for fade-out.
10362 Default value is 0.0.
10363
10364 unity
10365 Set the initial gain for fade-out or final gain for fade-in.
10366 Default value is 1.0.
10367
10368 Commands
10369
10370 This filter supports the all above options as commands.
10371
10372 Examples
10373
10374 • Fade in first 15 seconds of audio:
10375
10376 afade=t=in:ss=0:d=15
10377
10378 • Fade out last 25 seconds of a 900 seconds audio:
10379
10380 afade=t=out:st=875:d=25
10381
10382 afftdn
10383 Denoise audio samples with FFT.
10384
10385 A description of the accepted parameters follows.
10386
10387 noise_reduction, nr
10388 Set the noise reduction in dB, allowed range is 0.01 to 97.
10389 Default value is 12 dB.
10390
10391 noise_floor, nf
10392 Set the noise floor in dB, allowed range is -80 to -20. Default
10393 value is -50 dB.
10394
10395 noise_type, nt
10396 Set the noise type.
10397
10398 It accepts the following values:
10399
10400 white, w
10401 Select white noise.
10402
10403 vinyl, v
10404 Select vinyl noise.
10405
10406 shellac, s
10407 Select shellac noise.
10408
10409 custom, c
10410 Select custom noise, defined in "bn" option.
10411
10412 Default value is white noise.
10413
10414 band_noise, bn
10415 Set custom band noise profile for every one of 15 bands. Bands are
10416 separated by ' ' or '|'.
10417
10418 residual_floor, rf
10419 Set the residual floor in dB, allowed range is -80 to -20. Default
10420 value is -38 dB.
10421
10422 track_noise, tn
10423 Enable noise floor tracking. By default is disabled. With this
10424 enabled, noise floor is automatically adjusted.
10425
10426 track_residual, tr
10427 Enable residual tracking. By default is disabled.
10428
10429 output_mode, om
10430 Set the output mode.
10431
10432 It accepts the following values:
10433
10434 input, i
10435 Pass input unchanged.
10436
10437 output, o
10438 Pass noise filtered out.
10439
10440 noise, n
10441 Pass only noise.
10442
10443 Default value is output.
10444
10445 adaptivity, ad
10446 Set the adaptivity factor, used how fast to adapt gains adjustments
10447 per each frequency bin. Value 0 enables instant adaptation, while
10448 higher values react much slower. Allowed range is from 0 to 1.
10449 Default value is 0.5.
10450
10451 floor_offset, fo
10452 Set the noise floor offset factor. This option is used to adjust
10453 offset applied to measured noise floor. It is only effective when
10454 noise floor tracking is enabled. Allowed range is from -2.0 to
10455 2.0. Default value is 1.0.
10456
10457 noise_link, nl
10458 Set the noise link used for multichannel audio.
10459
10460 It accepts the following values:
10461
10462 none
10463 Use unchanged channel's noise floor.
10464
10465 min Use measured min noise floor of all channels.
10466
10467 max Use measured max noise floor of all channels.
10468
10469 average
10470 Use measured average noise floor of all channels.
10471
10472 Default value is min.
10473
10474 band_multiplier, bm
10475 Set the band multiplier factor, used how much to spread bands
10476 across frequency bins. Allowed range is from 0.2 to 5. Default
10477 value is 1.25.
10478
10479 sample_noise, sn
10480 Toggle capturing and measurement of noise profile from input audio.
10481
10482 It accepts the following values:
10483
10484 start, begin
10485 Start sample noise capture.
10486
10487 stop, end
10488 Stop sample noise capture and measure new noise band profile.
10489
10490 Default value is "none".
10491
10492 gain_smooth, gs
10493 Set gain smooth spatial radius, used to smooth gains applied to
10494 each frequency bin. Useful to reduce random music noise artefacts.
10495 Higher values increases smoothing of gains. Allowed range is from
10496 0 to 50. Default value is 0.
10497
10498 Commands
10499
10500 This filter supports the some above mentioned options as commands.
10501
10502 Examples
10503
10504 • Reduce white noise by 10dB, and use previously measured noise floor
10505 of -40dB:
10506
10507 afftdn=nr=10:nf=-40
10508
10509 • Reduce white noise by 10dB, also set initial noise floor to -80dB
10510 and enable automatic tracking of noise floor so noise floor will
10511 gradually change during processing:
10512
10513 afftdn=nr=10:nf=-80:tn=1
10514
10515 • Reduce noise by 20dB, using noise floor of -40dB and using commands
10516 to take noise profile of first 0.4 seconds of input audio:
10517
10518 asendcmd=0.0 afftdn sn start,asendcmd=0.4 afftdn sn stop,afftdn=nr=20:nf=-40
10519
10520 afftfilt
10521 Apply arbitrary expressions to samples in frequency domain.
10522
10523 real
10524 Set frequency domain real expression for each separate channel
10525 separated by '|'. Default is "re". If the number of input channels
10526 is greater than the number of expressions, the last specified
10527 expression is used for the remaining output channels.
10528
10529 imag
10530 Set frequency domain imaginary expression for each separate channel
10531 separated by '|'. Default is "im".
10532
10533 Each expression in real and imag can contain the following
10534 constants and functions:
10535
10536 sr sample rate
10537
10538 b current frequency bin number
10539
10540 nb number of available bins
10541
10542 ch channel number of the current expression
10543
10544 chs number of channels
10545
10546 pts current frame pts
10547
10548 re current real part of frequency bin of current channel
10549
10550 im current imaginary part of frequency bin of current channel
10551
10552 real(b, ch)
10553 Return the value of real part of frequency bin at location
10554 (bin,channel)
10555
10556 imag(b, ch)
10557 Return the value of imaginary part of frequency bin at location
10558 (bin,channel)
10559
10560 win_size
10561 Set window size. Allowed range is from 16 to 131072. Default is
10562 4096
10563
10564 win_func
10565 Set window function.
10566
10567 It accepts the following values:
10568
10569 rect
10570 bartlett
10571 hann, hanning
10572 hamming
10573 blackman
10574 welch
10575 flattop
10576 bharris
10577 bnuttall
10578 bhann
10579 sine
10580 nuttall
10581 lanczos
10582 gauss
10583 tukey
10584 dolph
10585 cauchy
10586 parzen
10587 poisson
10588 bohman
10589 kaiser
10590
10591 Default is "hann".
10592
10593 overlap
10594 Set window overlap. If set to 1, the recommended overlap for
10595 selected window function will be picked. Default is 0.75.
10596
10597 Examples
10598
10599 • Leave almost only low frequencies in audio:
10600
10601 afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'"
10602
10603 • Apply robotize effect:
10604
10605 afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75"
10606
10607 • Apply whisper effect:
10608
10609 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"
10610
10611 • Apply phase shift:
10612
10613 afftfilt="real=re*cos(1)-im*sin(1):imag=re*sin(1)+im*cos(1)"
10614
10615 afir
10616 Apply an arbitrary Finite Impulse Response filter.
10617
10618 This filter is designed for applying long FIR filters, up to 60 seconds
10619 long.
10620
10621 It can be used as component for digital crossover filters, room
10622 equalization, cross talk cancellation, wavefield synthesis,
10623 auralization, ambiophonics, ambisonics and spatialization.
10624
10625 This filter uses the streams higher than first one as FIR coefficients.
10626 If the non-first stream holds a single channel, it will be used for all
10627 input channels in the first stream, otherwise the number of channels in
10628 the non-first stream must be same as the number of channels in the
10629 first stream.
10630
10631 It accepts the following parameters:
10632
10633 dry Set dry gain. This sets input gain.
10634
10635 wet Set wet gain. This sets final output gain.
10636
10637 length
10638 Set Impulse Response filter length. Default is 1, which means whole
10639 IR is processed.
10640
10641 gtype
10642 Enable applying gain measured from power of IR.
10643
10644 Set which approach to use for auto gain measurement.
10645
10646 none
10647 Do not apply any gain.
10648
10649 peak
10650 select peak gain, very conservative approach. This is default
10651 value.
10652
10653 dc select DC gain, limited application.
10654
10655 gn select gain to noise approach, this is most popular one.
10656
10657 ac select AC gain.
10658
10659 rms select RMS gain.
10660
10661 irgain
10662 Set gain to be applied to IR coefficients before filtering.
10663 Allowed range is 0 to 1. This gain is applied after any gain
10664 applied with gtype option.
10665
10666 irfmt
10667 Set format of IR stream. Can be "mono" or "input". Default is
10668 "input".
10669
10670 maxir
10671 Set max allowed Impulse Response filter duration in seconds.
10672 Default is 30 seconds. Allowed range is 0.1 to 60 seconds.
10673
10674 response
10675 Show IR frequency response, magnitude(magenta), phase(green) and
10676 group delay(yellow) in additional video stream. By default it is
10677 disabled.
10678
10679 channel
10680 Set for which IR channel to display frequency response. By default
10681 is first channel displayed. This option is used only when response
10682 is enabled.
10683
10684 size
10685 Set video stream size. This option is used only when response is
10686 enabled.
10687
10688 rate
10689 Set video stream frame rate. This option is used only when response
10690 is enabled.
10691
10692 minp
10693 Set minimal partition size used for convolution. Default is 8192.
10694 Allowed range is from 1 to 65536. Lower values decreases latency
10695 at cost of higher CPU usage.
10696
10697 maxp
10698 Set maximal partition size used for convolution. Default is 8192.
10699 Allowed range is from 8 to 65536. Lower values may increase CPU
10700 usage.
10701
10702 nbirs
10703 Set number of input impulse responses streams which will be
10704 switchable at runtime. Allowed range is from 1 to 32. Default is
10705 1.
10706
10707 ir Set IR stream which will be used for convolution, starting from 0,
10708 should always be lower than supplied value by "nbirs" option.
10709 Default is 0. This option can be changed at runtime via commands.
10710
10711 precision
10712 Set which precision to use when processing samples.
10713
10714 auto
10715 Auto pick internal sample format depending on other filters.
10716
10717 float
10718 Always use single-floating point precision sample format.
10719
10720 double
10721 Always use double-floating point precision sample format.
10722
10723 Default value is auto.
10724
10725 Examples
10726
10727 • Apply reverb to stream using mono IR file as second input, complete
10728 command using ffmpeg:
10729
10730 ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
10731
10732 • Apply true stereo processing given input stereo stream, and two
10733 stereo impulse responses for left and right channel, the impulse
10734 response files are files with names l_ir.wav and r_ir.wav:
10735
10736 "pan=4C|c0=FL|c1=FL|c2=FR|c3=FR[a];amovie=l_ir.wav[LIR];amovie=r_ir.wav[RIR];[LIR][RIR]amerge[ir];[a][ir]afir=irfmt=input:gtype=gn:irgain=-5dB,pan=stereo|FL<c0+c2|FR<c1+c3"
10737
10738 aformat
10739 Set output format constraints for the input audio. The framework will
10740 negotiate the most appropriate format to minimize conversions.
10741
10742 It accepts the following parameters:
10743
10744 sample_fmts, f
10745 A '|'-separated list of requested sample formats.
10746
10747 sample_rates, r
10748 A '|'-separated list of requested sample rates.
10749
10750 channel_layouts, cl
10751 A '|'-separated list of requested channel layouts.
10752
10753 See the Channel Layout section in the ffmpeg-utils(1) manual for
10754 the required syntax.
10755
10756 If a parameter is omitted, all values are allowed.
10757
10758 Force the output to either unsigned 8-bit or signed 16-bit stereo
10759
10760 aformat=sample_fmts=u8|s16:channel_layouts=stereo
10761
10762 afreqshift
10763 Apply frequency shift to input audio samples.
10764
10765 The filter accepts the following options:
10766
10767 shift
10768 Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
10769 Default value is 0.0.
10770
10771 level
10772 Set output gain applied to final output. Allowed range is from 0.0
10773 to 1.0. Default value is 1.0.
10774
10775 order
10776 Set filter order used for filtering. Allowed range is from 1 to 16.
10777 Default value is 8.
10778
10779 Commands
10780
10781 This filter supports the all above options as commands.
10782
10783 afwtdn
10784 Reduce broadband noise from input samples using Wavelets.
10785
10786 A description of the accepted options follows.
10787
10788 sigma
10789 Set the noise sigma, allowed range is from 0 to 1. Default value
10790 is 0. This option controls strength of denoising applied to input
10791 samples. Most useful way to set this option is via decibels, eg.
10792 -45dB.
10793
10794 levels
10795 Set the number of wavelet levels of decomposition. Allowed range
10796 is from 1 to 12. Default value is 10. Setting this too low make
10797 denoising performance very poor.
10798
10799 wavet
10800 Set wavelet type for decomposition of input frame. They are sorted
10801 by number of coefficients, from lowest to highest. More
10802 coefficients means worse filtering speed, but overall better
10803 quality. Available wavelets are:
10804
10805 sym2
10806 sym4
10807 rbior68
10808 deb10
10809 sym10
10810 coif5
10811 bl3
10812 percent
10813 Set percent of full denoising. Allowed range is from 0 to 100
10814 percent. Default value is 85 percent or partial denoising.
10815
10816 profile
10817 If enabled, first input frame will be used as noise profile. If
10818 first frame samples contain non-noise performance will be very
10819 poor.
10820
10821 adaptive
10822 If enabled, input frames are analyzed for presence of noise. If
10823 noise is detected with high possibility then input frame profile
10824 will be used for processing following frames, until new noise frame
10825 is detected.
10826
10827 samples
10828 Set size of single frame in number of samples. Allowed range is
10829 from 512 to 65536. Default frame size is 8192 samples.
10830
10831 softness
10832 Set softness applied inside thresholding function. Allowed range is
10833 from 0 to 10. Default softness is 1.
10834
10835 Commands
10836
10837 This filter supports the all above options as commands.
10838
10839 agate
10840 A gate is mainly used to reduce lower parts of a signal. This kind of
10841 signal processing reduces disturbing noise between useful signals.
10842
10843 Gating is done by detecting the volume below a chosen level threshold
10844 and dividing it by the factor set with ratio. The bottom of the noise
10845 floor is set via range. Because an exact manipulation of the signal
10846 would cause distortion of the waveform the reduction can be levelled
10847 over time. This is done by setting attack and release.
10848
10849 attack determines how long the signal has to fall below the threshold
10850 before any reduction will occur and release sets the time the signal
10851 has to rise above the threshold to reduce the reduction again. Shorter
10852 signals than the chosen attack time will be left untouched.
10853
10854 level_in
10855 Set input level before filtering. Default is 1. Allowed range is
10856 from 0.015625 to 64.
10857
10858 mode
10859 Set the mode of operation. Can be "upward" or "downward". Default
10860 is "downward". If set to "upward" mode, higher parts of signal will
10861 be amplified, expanding dynamic range in upward direction.
10862 Otherwise, in case of "downward" lower parts of signal will be
10863 reduced.
10864
10865 range
10866 Set the level of gain reduction when the signal is below the
10867 threshold. Default is 0.06125. Allowed range is from 0 to 1.
10868 Setting this to 0 disables reduction and then filter behaves like
10869 expander.
10870
10871 threshold
10872 If a signal rises above this level the gain reduction is released.
10873 Default is 0.125. Allowed range is from 0 to 1.
10874
10875 ratio
10876 Set a ratio by which the signal is reduced. Default is 2. Allowed
10877 range is from 1 to 9000.
10878
10879 attack
10880 Amount of milliseconds the signal has to rise above the threshold
10881 before gain reduction stops. Default is 20 milliseconds. Allowed
10882 range is from 0.01 to 9000.
10883
10884 release
10885 Amount of milliseconds the signal has to fall below the threshold
10886 before the reduction is increased again. Default is 250
10887 milliseconds. Allowed range is from 0.01 to 9000.
10888
10889 makeup
10890 Set amount of amplification of signal after processing. Default is
10891 1. Allowed range is from 1 to 64.
10892
10893 knee
10894 Curve the sharp knee around the threshold to enter gain reduction
10895 more softly. Default is 2.828427125. Allowed range is from 1 to 8.
10896
10897 detection
10898 Choose if exact signal should be taken for detection or an RMS like
10899 one. Default is "rms". Can be "peak" or "rms".
10900
10901 link
10902 Choose if the average level between all channels or the louder
10903 channel affects the reduction. Default is "average". Can be
10904 "average" or "maximum".
10905
10906 Commands
10907
10908 This filter supports the all above options as commands.
10909
10910 aiir
10911 Apply an arbitrary Infinite Impulse Response filter.
10912
10913 It accepts the following parameters:
10914
10915 zeros, z
10916 Set B/numerator/zeros/reflection coefficients.
10917
10918 poles, p
10919 Set A/denominator/poles/ladder coefficients.
10920
10921 gains, k
10922 Set channels gains.
10923
10924 dry_gain
10925 Set input gain.
10926
10927 wet_gain
10928 Set output gain.
10929
10930 format, f
10931 Set coefficients format.
10932
10933 ll lattice-ladder function
10934
10935 sf analog transfer function
10936
10937 tf digital transfer function
10938
10939 zp Z-plane zeros/poles, cartesian (default)
10940
10941 pr Z-plane zeros/poles, polar radians
10942
10943 pd Z-plane zeros/poles, polar degrees
10944
10945 sp S-plane zeros/poles
10946
10947 process, r
10948 Set type of processing.
10949
10950 d direct processing
10951
10952 s serial processing
10953
10954 p parallel processing
10955
10956 precision, e
10957 Set filtering precision.
10958
10959 dbl double-precision floating-point (default)
10960
10961 flt single-precision floating-point
10962
10963 i32 32-bit integers
10964
10965 i16 16-bit integers
10966
10967 normalize, n
10968 Normalize filter coefficients, by default is enabled. Enabling it
10969 will normalize magnitude response at DC to 0dB.
10970
10971 mix How much to use filtered signal in output. Default is 1. Range is
10972 between 0 and 1.
10973
10974 response
10975 Show IR frequency response, magnitude(magenta), phase(green) and
10976 group delay(yellow) in additional video stream. By default it is
10977 disabled.
10978
10979 channel
10980 Set for which IR channel to display frequency response. By default
10981 is first channel displayed. This option is used only when response
10982 is enabled.
10983
10984 size
10985 Set video stream size. This option is used only when response is
10986 enabled.
10987
10988 Coefficients in "tf" and "sf" format are separated by spaces and are in
10989 ascending order.
10990
10991 Coefficients in "zp" format are separated by spaces and order of
10992 coefficients doesn't matter. Coefficients in "zp" format are complex
10993 numbers with i imaginary unit.
10994
10995 Different coefficients and gains can be provided for every channel, in
10996 such case use '|' to separate coefficients or gains. Last provided
10997 coefficients will be used for all remaining channels.
10998
10999 Examples
11000
11001 • Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample
11002 rate:
11003
11004 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
11005
11006 • Same as above but in "zp" format:
11007
11008 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
11009
11010 • Apply 3-rd order analog normalized Butterworth low-pass filter,
11011 using analog transfer function format:
11012
11013 aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
11014
11015 alimiter
11016 The limiter prevents an input signal from rising over a desired
11017 threshold. This limiter uses lookahead technology to prevent your
11018 signal from distorting. It means that there is a small delay after the
11019 signal is processed. Keep in mind that the delay it produces is the
11020 attack time you set.
11021
11022 The filter accepts the following options:
11023
11024 level_in
11025 Set input gain. Default is 1.
11026
11027 level_out
11028 Set output gain. Default is 1.
11029
11030 limit
11031 Don't let signals above this level pass the limiter. Default is 1.
11032
11033 attack
11034 The limiter will reach its attenuation level in this amount of time
11035 in milliseconds. Default is 5 milliseconds.
11036
11037 release
11038 Come back from limiting to attenuation 1.0 in this amount of
11039 milliseconds. Default is 50 milliseconds.
11040
11041 asc When gain reduction is always needed ASC takes care of releasing to
11042 an average reduction level rather than reaching a reduction of 0 in
11043 the release time.
11044
11045 asc_level
11046 Select how much the release time is affected by ASC, 0 means nearly
11047 no changes in release time while 1 produces higher release times.
11048
11049 level
11050 Auto level output signal. Default is enabled. This normalizes
11051 audio back to 0dB if enabled.
11052
11053 latency
11054 Compensate the delay introduced by using the lookahead buffer set
11055 with attack parameter. Also flush the valid audio data in the
11056 lookahead buffer when the stream hits EOF.
11057
11058 Depending on picked setting it is recommended to upsample input 2x or
11059 4x times with aresample before applying this filter.
11060
11061 allpass
11062 Apply a two-pole all-pass filter with central frequency (in Hz)
11063 frequency, and filter-width width. An all-pass filter changes the
11064 audio's frequency to phase relationship without changing its frequency
11065 to amplitude relationship.
11066
11067 The filter accepts the following options:
11068
11069 frequency, f
11070 Set frequency in Hz.
11071
11072 width_type, t
11073 Set method to specify band-width of filter.
11074
11075 h Hz
11076
11077 q Q-Factor
11078
11079 o octave
11080
11081 s slope
11082
11083 k kHz
11084
11085 width, w
11086 Specify the band-width of a filter in width_type units.
11087
11088 mix, m
11089 How much to use filtered signal in output. Default is 1. Range is
11090 between 0 and 1.
11091
11092 channels, c
11093 Specify which channels to filter, by default all available are
11094 filtered.
11095
11096 normalize, n
11097 Normalize biquad coefficients, by default is disabled. Enabling it
11098 will normalize magnitude response at DC to 0dB.
11099
11100 order, o
11101 Set the filter order, can be 1 or 2. Default is 2.
11102
11103 transform, a
11104 Set transform type of IIR filter.
11105
11106 di
11107 dii
11108 tdi
11109 tdii
11110 latt
11111 svf
11112 zdf
11113 precision, r
11114 Set precison of filtering.
11115
11116 auto
11117 Pick automatic sample format depending on surround filters.
11118
11119 s16 Always use signed 16-bit.
11120
11121 s32 Always use signed 32-bit.
11122
11123 f32 Always use float 32-bit.
11124
11125 f64 Always use float 64-bit.
11126
11127 Commands
11128
11129 This filter supports the following commands:
11130
11131 frequency, f
11132 Change allpass frequency. Syntax for the command is : "frequency"
11133
11134 width_type, t
11135 Change allpass width_type. Syntax for the command is :
11136 "width_type"
11137
11138 width, w
11139 Change allpass width. Syntax for the command is : "width"
11140
11141 mix, m
11142 Change allpass mix. Syntax for the command is : "mix"
11143
11144 aloop
11145 Loop audio samples.
11146
11147 The filter accepts the following options:
11148
11149 loop
11150 Set the number of loops. Setting this value to -1 will result in
11151 infinite loops. Default is 0.
11152
11153 size
11154 Set maximal number of samples. Default is 0.
11155
11156 start
11157 Set first sample of loop. Default is 0.
11158
11159 amerge
11160 Merge two or more audio streams into a single multi-channel stream.
11161
11162 The filter accepts the following options:
11163
11164 inputs
11165 Set the number of inputs. Default is 2.
11166
11167 If the channel layouts of the inputs are disjoint, and therefore
11168 compatible, the channel layout of the output will be set accordingly
11169 and the channels will be reordered as necessary. If the channel layouts
11170 of the inputs are not disjoint, the output will have all the channels
11171 of the first input then all the channels of the second input, in that
11172 order, and the channel layout of the output will be the default value
11173 corresponding to the total number of channels.
11174
11175 For example, if the first input is in 2.1 (FL+FR+LF) and the second
11176 input is FC+BL+BR, then the output will be in 5.1, with the channels in
11177 the following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of
11178 the first input, b1 is the first channel of the second input).
11179
11180 On the other hand, if both input are in stereo, the output channels
11181 will be in the default order: a1, a2, b1, b2, and the channel layout
11182 will be arbitrarily set to 4.0, which may or may not be the expected
11183 value.
11184
11185 All inputs must have the same sample rate, and format.
11186
11187 If inputs do not have the same duration, the output will stop with the
11188 shortest.
11189
11190 Examples
11191
11192 • Merge two mono files into a stereo stream:
11193
11194 amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
11195
11196 • Multiple merges assuming 1 video stream and 6 audio streams in
11197 input.mkv:
11198
11199 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
11200
11201 amix
11202 Mixes multiple audio inputs into a single output.
11203
11204 Note that this filter only supports float samples (the amerge and pan
11205 audio filters support many formats). If the amix input has integer
11206 samples then aresample will be automatically inserted to perform the
11207 conversion to float samples.
11208
11209 It accepts the following parameters:
11210
11211 inputs
11212 The number of inputs. If unspecified, it defaults to 2.
11213
11214 duration
11215 How to determine the end-of-stream.
11216
11217 longest
11218 The duration of the longest input. (default)
11219
11220 shortest
11221 The duration of the shortest input.
11222
11223 first
11224 The duration of the first input.
11225
11226 dropout_transition
11227 The transition time, in seconds, for volume renormalization when an
11228 input stream ends. The default value is 2 seconds.
11229
11230 weights
11231 Specify weight of each input audio stream as a sequence of numbers
11232 separated by a space. If fewer weights are specified compared to
11233 number of inputs, the last weight is assigned to the remaining
11234 inputs. Default weight for each input is 1.
11235
11236 normalize
11237 Always scale inputs instead of only doing summation of samples.
11238 Beware of heavy clipping if inputs are not normalized prior or
11239 after filtering by this filter if this option is disabled. By
11240 default is enabled.
11241
11242 Examples
11243
11244 • This will mix 3 input audio streams to a single output with the
11245 same duration as the first input and a dropout transition time of 3
11246 seconds:
11247
11248 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
11249
11250 • This will mix one vocal and one music input audio stream to a
11251 single output with the same duration as the longest input. The
11252 music will have quarter the weight as the vocals, and the inputs
11253 are not normalized:
11254
11255 ffmpeg -i VOCALS -i MUSIC -filter_complex amix=inputs=2:duration=longest:dropout_transition=0:weights="1 0.25":normalize=0 OUTPUT
11256
11257 Commands
11258
11259 This filter supports the following commands:
11260
11261 weights
11262 normalize
11263 Syntax is same as option with same name.
11264
11265 amultiply
11266 Multiply first audio stream with second audio stream and store result
11267 in output audio stream. Multiplication is done by multiplying each
11268 sample from first stream with sample at same position from second
11269 stream.
11270
11271 With this element-wise multiplication one can create amplitude fades
11272 and amplitude modulations.
11273
11274 anequalizer
11275 High-order parametric multiband equalizer for each channel.
11276
11277 It accepts the following parameters:
11278
11279 params
11280 This option string is in format: "cchn f=cf w=w g=g t=f | ..."
11281 Each equalizer band is separated by '|'.
11282
11283 chn Set channel number to which equalization will be applied. If
11284 input doesn't have that channel the entry is ignored.
11285
11286 f Set central frequency for band. If input doesn't have that
11287 frequency the entry is ignored.
11288
11289 w Set band width in Hertz.
11290
11291 g Set band gain in dB.
11292
11293 t Set filter type for band, optional, can be:
11294
11295 0 Butterworth, this is default.
11296
11297 1 Chebyshev type 1.
11298
11299 2 Chebyshev type 2.
11300
11301 curves
11302 With this option activated frequency response of anequalizer is
11303 displayed in video stream.
11304
11305 size
11306 Set video stream size. Only useful if curves option is activated.
11307
11308 mgain
11309 Set max gain that will be displayed. Only useful if curves option
11310 is activated. Setting this to a reasonable value makes it possible
11311 to display gain which is derived from neighbour bands which are too
11312 close to each other and thus produce higher gain when both are
11313 activated.
11314
11315 fscale
11316 Set frequency scale used to draw frequency response in video
11317 output. Can be linear or logarithmic. Default is logarithmic.
11318
11319 colors
11320 Set color for each channel curve which is going to be displayed in
11321 video stream. This is list of color names separated by space or by
11322 '|'. Unrecognised or missing colors will be replaced by white
11323 color.
11324
11325 Examples
11326
11327 • Lower gain by 10 of central frequency 200Hz and width 100 Hz for
11328 first 2 channels using Chebyshev type 1 filter:
11329
11330 anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
11331
11332 Commands
11333
11334 This filter supports the following commands:
11335
11336 change
11337 Alter existing filter parameters. Syntax for the commands is :
11338 "fN|f=freq|w=width|g=gain"
11339
11340 fN is existing filter number, starting from 0, if no such filter is
11341 available error is returned. freq set new frequency parameter.
11342 width set new width parameter in Hertz. gain set new gain
11343 parameter in dB.
11344
11345 Full filter invocation with asendcmd may look like this:
11346 asendcmd=c='4.0 anequalizer change
11347 0|f=200|w=50|g=1',anequalizer=...
11348
11349 anlmdn
11350 Reduce broadband noise in audio samples using Non-Local Means
11351 algorithm.
11352
11353 Each sample is adjusted by looking for other samples with similar
11354 contexts. This context similarity is defined by comparing their
11355 surrounding patches of size p. Patches are searched in an area of r
11356 around the sample.
11357
11358 The filter accepts the following options:
11359
11360 strength, s
11361 Set denoising strength. Allowed range is from 0.00001 to 10000.
11362 Default value is 0.00001.
11363
11364 patch, p
11365 Set patch radius duration. Allowed range is from 1 to 100
11366 milliseconds. Default value is 2 milliseconds.
11367
11368 research, r
11369 Set research radius duration. Allowed range is from 2 to 300
11370 milliseconds. Default value is 6 milliseconds.
11371
11372 output, o
11373 Set the output mode.
11374
11375 It accepts the following values:
11376
11377 i Pass input unchanged.
11378
11379 o Pass noise filtered out.
11380
11381 n Pass only noise.
11382
11383 Default value is o.
11384
11385 smooth, m
11386 Set smooth factor. Default value is 11. Allowed range is from 1 to
11387 1000.
11388
11389 Commands
11390
11391 This filter supports the all above options as commands.
11392
11393 anlmf, anlms
11394 Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first
11395 audio stream using the second audio stream.
11396
11397 This adaptive filter is used to mimic a desired filter by finding the
11398 filter coefficients that relate to producing the least mean square of
11399 the error signal (difference between the desired, 2nd input audio
11400 stream and the actual signal, the 1st input audio stream).
11401
11402 A description of the accepted options follows.
11403
11404 order
11405 Set filter order.
11406
11407 mu Set filter mu.
11408
11409 eps Set the filter eps.
11410
11411 leakage
11412 Set the filter leakage.
11413
11414 out_mode
11415 It accepts the following values:
11416
11417 i Pass the 1st input.
11418
11419 d Pass the 2nd input.
11420
11421 o Pass filtered samples.
11422
11423 n Pass difference between desired and filtered samples.
11424
11425 Default value is o.
11426
11427 Examples
11428
11429 • One of many usages of this filter is noise reduction, input audio
11430 is filtered with same samples that are delayed by fixed amount, one
11431 such example for stereo audio is:
11432
11433 asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
11434
11435 Commands
11436
11437 This filter supports the same commands as options, excluding option
11438 "order".
11439
11440 anull
11441 Pass the audio source unchanged to the output.
11442
11443 apad
11444 Pad the end of an audio stream with silence.
11445
11446 This can be used together with ffmpeg -shortest to extend audio streams
11447 to the same length as the video stream.
11448
11449 A description of the accepted options follows.
11450
11451 packet_size
11452 Set silence packet size. Default value is 4096.
11453
11454 pad_len
11455 Set the number of samples of silence to add to the end. After the
11456 value is reached, the stream is terminated. This option is mutually
11457 exclusive with whole_len.
11458
11459 whole_len
11460 Set the minimum total number of samples in the output audio stream.
11461 If the value is longer than the input audio length, silence is
11462 added to the end, until the value is reached. This option is
11463 mutually exclusive with pad_len.
11464
11465 pad_dur
11466 Specify the duration of samples of silence to add. See the Time
11467 duration section in the ffmpeg-utils(1) manual for the accepted
11468 syntax. Used only if set to non-negative value.
11469
11470 whole_dur
11471 Specify the minimum total duration in the output audio stream. See
11472 the Time duration section in the ffmpeg-utils(1) manual for the
11473 accepted syntax. Used only if set to non-negative value. If the
11474 value is longer than the input audio length, silence is added to
11475 the end, until the value is reached. This option is mutually
11476 exclusive with pad_dur
11477
11478 If neither the pad_len nor the whole_len nor pad_dur nor whole_dur
11479 option is set, the filter will add silence to the end of the input
11480 stream indefinitely.
11481
11482 Note that for ffmpeg 4.4 and earlier a zero pad_dur or whole_dur also
11483 caused the filter to add silence indefinitely.
11484
11485 Examples
11486
11487 • Add 1024 samples of silence to the end of the input:
11488
11489 apad=pad_len=1024
11490
11491 • Make sure the audio output will contain at least 10000 samples, pad
11492 the input with silence if required:
11493
11494 apad=whole_len=10000
11495
11496 • Use ffmpeg to pad the audio input with silence, so that the video
11497 stream will always result the shortest and will be converted until
11498 the end in the output file when using the shortest option:
11499
11500 ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT
11501
11502 aphaser
11503 Add a phasing effect to the input audio.
11504
11505 A phaser filter creates series of peaks and troughs in the frequency
11506 spectrum. The position of the peaks and troughs are modulated so that
11507 they vary over time, creating a sweeping effect.
11508
11509 A description of the accepted parameters follows.
11510
11511 in_gain
11512 Set input gain. Default is 0.4.
11513
11514 out_gain
11515 Set output gain. Default is 0.74
11516
11517 delay
11518 Set delay in milliseconds. Default is 3.0.
11519
11520 decay
11521 Set decay. Default is 0.4.
11522
11523 speed
11524 Set modulation speed in Hz. Default is 0.5.
11525
11526 type
11527 Set modulation type. Default is triangular.
11528
11529 It accepts the following values:
11530
11531 triangular, t
11532 sinusoidal, s
11533
11534 aphaseshift
11535 Apply phase shift to input audio samples.
11536
11537 The filter accepts the following options:
11538
11539 shift
11540 Specify phase shift. Allowed range is from -1.0 to 1.0. Default
11541 value is 0.0.
11542
11543 level
11544 Set output gain applied to final output. Allowed range is from 0.0
11545 to 1.0. Default value is 1.0.
11546
11547 order
11548 Set filter order used for filtering. Allowed range is from 1 to 16.
11549 Default value is 8.
11550
11551 Commands
11552
11553 This filter supports the all above options as commands.
11554
11555 apsyclip
11556 Apply Psychoacoustic clipper to input audio stream.
11557
11558 The filter accepts the following options:
11559
11560 level_in
11561 Set input gain. By default it is 1. Range is [0.015625 - 64].
11562
11563 level_out
11564 Set output gain. By default it is 1. Range is [0.015625 - 64].
11565
11566 clip
11567 Set the clipping start value. Default value is 0dBFS or 1.
11568
11569 diff
11570 Output only difference samples, useful to hear introduced
11571 distortions. By default is disabled.
11572
11573 adaptive
11574 Set strength of adaptive distortion applied. Default value is 0.5.
11575 Allowed range is from 0 to 1.
11576
11577 iterations
11578 Set number of iterations of psychoacoustic clipper. Allowed range
11579 is from 1 to 20. Default value is 10.
11580
11581 level
11582 Auto level output signal. Default is disabled. This normalizes
11583 audio back to 0dBFS if enabled.
11584
11585 Commands
11586
11587 This filter supports the all above options as commands.
11588
11589 apulsator
11590 Audio pulsator is something between an autopanner and a tremolo. But
11591 it can produce funny stereo effects as well. Pulsator changes the
11592 volume of the left and right channel based on a LFO (low frequency
11593 oscillator) with different waveforms and shifted phases. This filter
11594 have the ability to define an offset between left and right channel. An
11595 offset of 0 means that both LFO shapes match each other. The left and
11596 right channel are altered equally - a conventional tremolo. An offset
11597 of 50% means that the shape of the right channel is exactly shifted in
11598 phase (or moved backwards about half of the frequency) - pulsator acts
11599 as an autopanner. At 1 both curves match again. Every setting in
11600 between moves the phase shift gapless between all stages and produces
11601 some "bypassing" sounds with sine and triangle waveforms. The more you
11602 set the offset near 1 (starting from the 0.5) the faster the signal
11603 passes from the left to the right speaker.
11604
11605 The filter accepts the following options:
11606
11607 level_in
11608 Set input gain. By default it is 1. Range is [0.015625 - 64].
11609
11610 level_out
11611 Set output gain. By default it is 1. Range is [0.015625 - 64].
11612
11613 mode
11614 Set waveform shape the LFO will use. Can be one of: sine, triangle,
11615 square, sawup or sawdown. Default is sine.
11616
11617 amount
11618 Set modulation. Define how much of original signal is affected by
11619 the LFO.
11620
11621 offset_l
11622 Set left channel offset. Default is 0. Allowed range is [0 - 1].
11623
11624 offset_r
11625 Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
11626
11627 width
11628 Set pulse width. Default is 1. Allowed range is [0 - 2].
11629
11630 timing
11631 Set possible timing mode. Can be one of: bpm, ms or hz. Default is
11632 hz.
11633
11634 bpm Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if
11635 timing is set to bpm.
11636
11637 ms Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if
11638 timing is set to ms.
11639
11640 hz Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100].
11641 Only used if timing is set to hz.
11642
11643 aresample
11644 Resample the input audio to the specified parameters, using the
11645 libswresample library. If none are specified then the filter will
11646 automatically convert between its input and output.
11647
11648 This filter is also able to stretch/squeeze the audio data to make it
11649 match the timestamps or to inject silence / cut out audio to make it
11650 match the timestamps, do a combination of both or do neither.
11651
11652 The filter accepts the syntax [sample_rate:]resampler_options, where
11653 sample_rate expresses a sample rate and resampler_options is a list of
11654 key=value pairs, separated by ":". See the "Resampler Options" section
11655 in the ffmpeg-resampler(1) manual for the complete list of supported
11656 options.
11657
11658 Examples
11659
11660 • Resample the input audio to 44100Hz:
11661
11662 aresample=44100
11663
11664 • Stretch/squeeze samples to the given timestamps, with a maximum of
11665 1000 samples per second compensation:
11666
11667 aresample=async=1000
11668
11669 areverse
11670 Reverse an audio clip.
11671
11672 Warning: This filter requires memory to buffer the entire clip, so
11673 trimming is suggested.
11674
11675 Examples
11676
11677 • Take the first 5 seconds of a clip, and reverse it.
11678
11679 atrim=end=5,areverse
11680
11681 arnndn
11682 Reduce noise from speech using Recurrent Neural Networks.
11683
11684 This filter accepts the following options:
11685
11686 model, m
11687 Set train model file to load. This option is always required.
11688
11689 mix Set how much to mix filtered samples into final output. Allowed
11690 range is from -1 to 1. Default value is 1. Negative values are
11691 special, they set how much to keep filtered noise in the final
11692 filter output. Set this option to -1 to hear actual noise removed
11693 from input signal.
11694
11695 Commands
11696
11697 This filter supports the all above options as commands.
11698
11699 asdr
11700 Measure Audio Signal-to-Distortion Ratio.
11701
11702 This filter takes two audio streams for input, and outputs first audio
11703 stream. Results are in dB per channel at end of either input.
11704
11705 asetnsamples
11706 Set the number of samples per each output audio frame.
11707
11708 The last output packet may contain a different number of samples, as
11709 the filter will flush all the remaining samples when the input audio
11710 signals its end.
11711
11712 The filter accepts the following options:
11713
11714 nb_out_samples, n
11715 Set the number of frames per each output audio frame. The number is
11716 intended as the number of samples per each channel. Default value
11717 is 1024.
11718
11719 pad, p
11720 If set to 1, the filter will pad the last audio frame with zeroes,
11721 so that the last frame will contain the same number of samples as
11722 the previous ones. Default value is 1.
11723
11724 For example, to set the number of per-frame samples to 1234 and disable
11725 padding for the last frame, use:
11726
11727 asetnsamples=n=1234:p=0
11728
11729 asetrate
11730 Set the sample rate without altering the PCM data. This will result in
11731 a change of speed and pitch.
11732
11733 The filter accepts the following options:
11734
11735 sample_rate, r
11736 Set the output sample rate. Default is 44100 Hz.
11737
11738 ashowinfo
11739 Show a line containing various information for each input audio frame.
11740 The input audio is not modified.
11741
11742 The shown line contains a sequence of key/value pairs of the form
11743 key:value.
11744
11745 The following values are shown in the output:
11746
11747 n The (sequential) number of the input frame, starting from 0.
11748
11749 pts The presentation timestamp of the input frame, in time base units;
11750 the time base depends on the filter input pad, and is usually
11751 1/sample_rate.
11752
11753 pts_time
11754 The presentation timestamp of the input frame in seconds.
11755
11756 pos position of the frame in the input stream, -1 if this information
11757 in unavailable and/or meaningless (for example in case of synthetic
11758 audio)
11759
11760 fmt The sample format.
11761
11762 chlayout
11763 The channel layout.
11764
11765 rate
11766 The sample rate for the audio frame.
11767
11768 nb_samples
11769 The number of samples (per channel) in the frame.
11770
11771 checksum
11772 The Adler-32 checksum (printed in hexadecimal) of the audio data.
11773 For planar audio, the data is treated as if all the planes were
11774 concatenated.
11775
11776 plane_checksums
11777 A list of Adler-32 checksums for each data plane.
11778
11779 asoftclip
11780 Apply audio soft clipping.
11781
11782 Soft clipping is a type of distortion effect where the amplitude of a
11783 signal is saturated along a smooth curve, rather than the abrupt shape
11784 of hard-clipping.
11785
11786 This filter accepts the following options:
11787
11788 type
11789 Set type of soft-clipping.
11790
11791 It accepts the following values:
11792
11793 hard
11794 tanh
11795 atan
11796 cubic
11797 exp
11798 alg
11799 quintic
11800 sin
11801 erf
11802 threshold
11803 Set threshold from where to start clipping. Default value is 0dB or
11804 1.
11805
11806 output
11807 Set gain applied to output. Default value is 0dB or 1.
11808
11809 param
11810 Set additional parameter which controls sigmoid function.
11811
11812 oversample
11813 Set oversampling factor.
11814
11815 Commands
11816
11817 This filter supports the all above options as commands.
11818
11819 aspectralstats
11820 Display frequency domain statistical information about the audio
11821 channels. Statistics are calculated and stored as metadata for each
11822 audio channel and for each audio frame.
11823
11824 It accepts the following option:
11825
11826 win_size
11827 Set the window length in samples. Default value is 2048. Allowed
11828 range is from 32 to 65536.
11829
11830 win_func
11831 Set window function.
11832
11833 It accepts the following values:
11834
11835 rect
11836 bartlett
11837 hann, hanning
11838 hamming
11839 blackman
11840 welch
11841 flattop
11842 bharris
11843 bnuttall
11844 bhann
11845 sine
11846 nuttall
11847 lanczos
11848 gauss
11849 tukey
11850 dolph
11851 cauchy
11852 parzen
11853 poisson
11854 bohman
11855 kaiser
11856
11857 Default is "hann".
11858
11859 overlap
11860 Set window overlap. Allowed range is from 0 to 1. Default value is
11861 0.5.
11862
11863 measure
11864 Select the parameters which are measured. The metadata keys can be
11865 used as flags, default is all which measures everything. none
11866 disables all measurement.
11867
11868 A list of each metadata key follows:
11869
11870 mean
11871 variance
11872 centroid
11873 spread
11874 skewness
11875 kurtosis
11876 entropy
11877 flatness
11878 crest
11879 flux
11880 slope
11881 decrease
11882 rolloff
11883
11884 asr
11885 Automatic Speech Recognition
11886
11887 This filter uses PocketSphinx for speech recognition. To enable
11888 compilation of this filter, you need to configure FFmpeg with
11889 "--enable-pocketsphinx".
11890
11891 It accepts the following options:
11892
11893 rate
11894 Set sampling rate of input audio. Defaults is 16000. This need to
11895 match speech models, otherwise one will get poor results.
11896
11897 hmm Set dictionary containing acoustic model files.
11898
11899 dict
11900 Set pronunciation dictionary.
11901
11902 lm Set language model file.
11903
11904 lmctl
11905 Set language model set.
11906
11907 lmname
11908 Set which language model to use.
11909
11910 logfn
11911 Set output for log messages.
11912
11913 The filter exports recognized speech as the frame metadata
11914 "lavfi.asr.text".
11915
11916 astats
11917 Display time domain statistical information about the audio channels.
11918 Statistics are calculated and displayed for each audio channel and,
11919 where applicable, an overall figure is also given.
11920
11921 It accepts the following option:
11922
11923 length
11924 Short window length in seconds, used for peak and trough RMS
11925 measurement. Default is 0.05 (50 milliseconds). Allowed range is
11926 "[0 - 10]".
11927
11928 metadata
11929 Set metadata injection. All the metadata keys are prefixed with
11930 "lavfi.astats.X", where "X" is channel number starting from 1 or
11931 string "Overall". Default is disabled.
11932
11933 Available keys for each channel are: Bit_depth Crest_factor
11934 DC_offset Dynamic_range Entropy Flat_factor Max_difference
11935 Max_level Mean_difference Min_difference Min_level Noise_floor
11936 Noise_floor_count Number_of_Infs Number_of_NaNs Number_of_denormals
11937 Peak_count Peak_level RMS_difference RMS_peak RMS_trough
11938 Zero_crossings Zero_crossings_rate
11939
11940 and for "Overall": Bit_depth DC_offset Entropy Flat_factor
11941 Max_difference Max_level Mean_difference Min_difference Min_level
11942 Noise_floor Noise_floor_count Number_of_Infs Number_of_NaNs
11943 Number_of_denormals Number_of_samples Peak_count Peak_level
11944 RMS_difference RMS_level RMS_peak RMS_trough
11945
11946 For example, a full key looks like "lavfi.astats.1.DC_offset" or
11947 "lavfi.astats.Overall.Peak_count".
11948
11949 Read below for the description of the keys.
11950
11951 reset
11952 Set the number of frames over which cumulative stats are calculated
11953 before being reset. Default is disabled.
11954
11955 measure_perchannel
11956 Select the parameters which are measured per channel. The metadata
11957 keys can be used as flags, default is all which measures
11958 everything. none disables all per channel measurement.
11959
11960 measure_overall
11961 Select the parameters which are measured overall. The metadata keys
11962 can be used as flags, default is all which measures everything.
11963 none disables all overall measurement.
11964
11965 A description of the measure keys follow:
11966
11967 none
11968 no measures
11969
11970 all all measures
11971
11972 Bit_depth
11973 overall bit depth of audio, i.e. number of bits used for each
11974 sample
11975
11976 Crest_factor
11977 standard ratio of peak to RMS level (note: not in dB)
11978
11979 DC_offset
11980 mean amplitude displacement from zero
11981
11982 Dynamic_range
11983 measured dynamic range of audio in dB
11984
11985 Entropy
11986 entropy measured across whole audio, entropy of value near 1.0 is
11987 typically measured for white noise
11988
11989 Flat_factor
11990 flatness (i.e. consecutive samples with the same value) of the
11991 signal at its peak levels (i.e. either Min_level or Max_level)
11992
11993 Max_difference
11994 maximal difference between two consecutive samples
11995
11996 Max_level
11997 maximal sample level
11998
11999 Mean_difference
12000 mean difference between two consecutive samples, i.e. the average
12001 of each difference between two consecutive samples
12002
12003 Min_difference
12004 minimal difference between two consecutive samples
12005
12006 Min_level
12007 minimal sample level
12008
12009 Noise_floor
12010 minimum local peak measured in dBFS over a short window
12011
12012 Noise_floor_count
12013 number of occasions (not the number of samples) that the signal
12014 attained Noise floor
12015
12016 Number_of_Infs
12017 number of samples with an infinite value
12018
12019 Number_of_NaNs
12020 number of samples with a NaN (not a number) value
12021
12022 Number_of_denormals
12023 number of samples with a subnormal value
12024
12025 Number_of_samples
12026 number of samples
12027
12028 Peak_count
12029 number of occasions (not the number of samples) that the signal
12030 attained either Min_level or Max_level
12031
12032 Peak_level
12033 standard peak level measured in dBFS
12034
12035 RMS_difference
12036 Root Mean Square difference between two consecutive samples
12037
12038 RMS_level
12039 standard RMS level measured in dBFS
12040
12041 RMS_peak
12042 RMS_trough
12043 peak and trough values for RMS level measured over a short window,
12044 measured in dBFS.
12045
12046 Zero crossings
12047 number of points where the waveform crosses the zero level axis
12048
12049 Zero crossings rate
12050 rate of Zero crossings and number of audio samples
12051
12052 asubboost
12053 Boost subwoofer frequencies.
12054
12055 The filter accepts the following options:
12056
12057 dry Set dry gain, how much of original signal is kept. Allowed range is
12058 from 0 to 1. Default value is 1.0.
12059
12060 wet Set wet gain, how much of filtered signal is kept. Allowed range is
12061 from 0 to 1. Default value is 1.0.
12062
12063 boost
12064 Set max boost factor. Allowed range is from 1 to 12. Default value
12065 is 2.
12066
12067 decay
12068 Set delay line decay gain value. Allowed range is from 0 to 1.
12069 Default value is 0.0.
12070
12071 feedback
12072 Set delay line feedback gain value. Allowed range is from 0 to 1.
12073 Default value is 0.9.
12074
12075 cutoff
12076 Set cutoff frequency in Hertz. Allowed range is 50 to 900. Default
12077 value is 100.
12078
12079 slope
12080 Set slope amount for cutoff frequency. Allowed range is 0.0001 to
12081 1. Default value is 0.5.
12082
12083 delay
12084 Set delay. Allowed range is from 1 to 100. Default value is 20.
12085
12086 channels
12087 Set the channels to process. Default value is all available.
12088
12089 Commands
12090
12091 This filter supports the all above options as commands.
12092
12093 asubcut
12094 Cut subwoofer frequencies.
12095
12096 This filter allows to set custom, steeper roll off than highpass
12097 filter, and thus is able to more attenuate frequency content in stop-
12098 band.
12099
12100 The filter accepts the following options:
12101
12102 cutoff
12103 Set cutoff frequency in Hertz. Allowed range is 2 to 200. Default
12104 value is 20.
12105
12106 order
12107 Set filter order. Available values are from 3 to 20. Default value
12108 is 10.
12109
12110 level
12111 Set input gain level. Allowed range is from 0 to 1. Default value
12112 is 1.
12113
12114 Commands
12115
12116 This filter supports the all above options as commands.
12117
12118 asupercut
12119 Cut super frequencies.
12120
12121 The filter accepts the following options:
12122
12123 cutoff
12124 Set cutoff frequency in Hertz. Allowed range is 20000 to 192000.
12125 Default value is 20000.
12126
12127 order
12128 Set filter order. Available values are from 3 to 20. Default value
12129 is 10.
12130
12131 level
12132 Set input gain level. Allowed range is from 0 to 1. Default value
12133 is 1.
12134
12135 Commands
12136
12137 This filter supports the all above options as commands.
12138
12139 asuperpass
12140 Apply high order Butterworth band-pass filter.
12141
12142 The filter accepts the following options:
12143
12144 centerf
12145 Set center frequency in Hertz. Allowed range is 2 to 999999.
12146 Default value is 1000.
12147
12148 order
12149 Set filter order. Available values are from 4 to 20. Default value
12150 is 4.
12151
12152 qfactor
12153 Set Q-factor. Allowed range is from 0.01 to 100. Default value is
12154 1.
12155
12156 level
12157 Set input gain level. Allowed range is from 0 to 2. Default value
12158 is 1.
12159
12160 Commands
12161
12162 This filter supports the all above options as commands.
12163
12164 asuperstop
12165 Apply high order Butterworth band-stop filter.
12166
12167 The filter accepts the following options:
12168
12169 centerf
12170 Set center frequency in Hertz. Allowed range is 2 to 999999.
12171 Default value is 1000.
12172
12173 order
12174 Set filter order. Available values are from 4 to 20. Default value
12175 is 4.
12176
12177 qfactor
12178 Set Q-factor. Allowed range is from 0.01 to 100. Default value is
12179 1.
12180
12181 level
12182 Set input gain level. Allowed range is from 0 to 2. Default value
12183 is 1.
12184
12185 Commands
12186
12187 This filter supports the all above options as commands.
12188
12189 atempo
12190 Adjust audio tempo.
12191
12192 The filter accepts exactly one parameter, the audio tempo. If not
12193 specified then the filter will assume nominal 1.0 tempo. Tempo must be
12194 in the [0.5, 100.0] range.
12195
12196 Note that tempo greater than 2 will skip some samples rather than blend
12197 them in. If for any reason this is a concern it is always possible to
12198 daisy-chain several instances of atempo to achieve the desired product
12199 tempo.
12200
12201 Examples
12202
12203 • Slow down audio to 80% tempo:
12204
12205 atempo=0.8
12206
12207 • To speed up audio to 300% tempo:
12208
12209 atempo=3
12210
12211 • To speed up audio to 300% tempo by daisy-chaining two atempo
12212 instances:
12213
12214 atempo=sqrt(3),atempo=sqrt(3)
12215
12216 Commands
12217
12218 This filter supports the following commands:
12219
12220 tempo
12221 Change filter tempo scale factor. Syntax for the command is :
12222 "tempo"
12223
12224 atilt
12225 Apply spectral tilt filter to audio stream.
12226
12227 This filter apply any spectral roll-off slope over any specified
12228 frequency band.
12229
12230 The filter accepts the following options:
12231
12232 freq
12233 Set central frequency of tilt in Hz. Default is 10000 Hz.
12234
12235 slope
12236 Set slope direction of tilt. Default is 0. Allowed range is from -1
12237 to 1.
12238
12239 width
12240 Set width of tilt. Default is 1000. Allowed range is from 100 to
12241 10000.
12242
12243 order
12244 Set order of tilt filter.
12245
12246 level
12247 Set input volume level. Allowed range is from 0 to 4. Defalt is 1.
12248
12249 Commands
12250
12251 This filter supports the all above options as commands.
12252
12253 atrim
12254 Trim the input so that the output contains one continuous subpart of
12255 the input.
12256
12257 It accepts the following parameters:
12258
12259 start
12260 Timestamp (in seconds) of the start of the section to keep. I.e.
12261 the audio sample with the timestamp start will be the first sample
12262 in the output.
12263
12264 end Specify time of the first audio sample that will be dropped, i.e.
12265 the audio sample immediately preceding the one with the timestamp
12266 end will be the last sample in the output.
12267
12268 start_pts
12269 Same as start, except this option sets the start timestamp in
12270 samples instead of seconds.
12271
12272 end_pts
12273 Same as end, except this option sets the end timestamp in samples
12274 instead of seconds.
12275
12276 duration
12277 The maximum duration of the output in seconds.
12278
12279 start_sample
12280 The number of the first sample that should be output.
12281
12282 end_sample
12283 The number of the first sample that should be dropped.
12284
12285 start, end, and duration are expressed as time duration specifications;
12286 see the Time duration section in the ffmpeg-utils(1) manual.
12287
12288 Note that the first two sets of the start/end options and the duration
12289 option look at the frame timestamp, while the _sample options simply
12290 count the samples that pass through the filter. So start/end_pts and
12291 start/end_sample will give different results when the timestamps are
12292 wrong, inexact or do not start at zero. Also note that this filter does
12293 not modify the timestamps. If you wish to have the output timestamps
12294 start at zero, insert the asetpts filter after the atrim filter.
12295
12296 If multiple start or end options are set, this filter tries to be
12297 greedy and keep all samples that match at least one of the specified
12298 constraints. To keep only the part that matches all the constraints at
12299 once, chain multiple atrim filters.
12300
12301 The defaults are such that all the input is kept. So it is possible to
12302 set e.g. just the end values to keep everything before the specified
12303 time.
12304
12305 Examples:
12306
12307 • Drop everything except the second minute of input:
12308
12309 ffmpeg -i INPUT -af atrim=60:120
12310
12311 • Keep only the first 1000 samples:
12312
12313 ffmpeg -i INPUT -af atrim=end_sample=1000
12314
12315 axcorrelate
12316 Calculate normalized windowed cross-correlation between two input audio
12317 streams.
12318
12319 Resulted samples are always between -1 and 1 inclusive. If result is 1
12320 it means two input samples are highly correlated in that selected
12321 segment. Result 0 means they are not correlated at all. If result is
12322 -1 it means two input samples are out of phase, which means they cancel
12323 each other.
12324
12325 The filter accepts the following options:
12326
12327 size
12328 Set size of segment over which cross-correlation is calculated.
12329 Default is 256. Allowed range is from 2 to 131072.
12330
12331 algo
12332 Set algorithm for cross-correlation. Can be "slow" or "fast".
12333 Default is "slow". Fast algorithm assumes mean values over any
12334 given segment are always zero and thus need much less calculations
12335 to make. This is generally not true, but is valid for typical
12336 audio streams.
12337
12338 Examples
12339
12340 • Calculate correlation between channels in stereo audio stream:
12341
12342 ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
12343
12344 bandpass
12345 Apply a two-pole Butterworth band-pass filter with central frequency
12346 frequency, and (3dB-point) band-width width. The csg option selects a
12347 constant skirt gain (peak gain = Q) instead of the default: constant
12348 0dB peak gain. The filter roll off at 6dB per octave (20dB per
12349 decade).
12350
12351 The filter accepts the following options:
12352
12353 frequency, f
12354 Set the filter's central frequency. Default is 3000.
12355
12356 csg Constant skirt gain if set to 1. Defaults to 0.
12357
12358 width_type, t
12359 Set method to specify band-width of filter.
12360
12361 h Hz
12362
12363 q Q-Factor
12364
12365 o octave
12366
12367 s slope
12368
12369 k kHz
12370
12371 width, w
12372 Specify the band-width of a filter in width_type units.
12373
12374 mix, m
12375 How much to use filtered signal in output. Default is 1. Range is
12376 between 0 and 1.
12377
12378 channels, c
12379 Specify which channels to filter, by default all available are
12380 filtered.
12381
12382 normalize, n
12383 Normalize biquad coefficients, by default is disabled. Enabling it
12384 will normalize magnitude response at DC to 0dB.
12385
12386 transform, a
12387 Set transform type of IIR filter.
12388
12389 di
12390 dii
12391 tdi
12392 tdii
12393 latt
12394 svf
12395 zdf
12396 precision, r
12397 Set precison of filtering.
12398
12399 auto
12400 Pick automatic sample format depending on surround filters.
12401
12402 s16 Always use signed 16-bit.
12403
12404 s32 Always use signed 32-bit.
12405
12406 f32 Always use float 32-bit.
12407
12408 f64 Always use float 64-bit.
12409
12410 block_size, b
12411 Set block size used for reverse IIR processing. If this value is
12412 set to high enough value (higher than impulse response length
12413 truncated when reaches near zero values) filtering will become
12414 linear phase otherwise if not big enough it will just produce nasty
12415 artifacts.
12416
12417 Note that filter delay will be exactly this many samples when set
12418 to non-zero value.
12419
12420 Commands
12421
12422 This filter supports the following commands:
12423
12424 frequency, f
12425 Change bandpass frequency. Syntax for the command is : "frequency"
12426
12427 width_type, t
12428 Change bandpass width_type. Syntax for the command is :
12429 "width_type"
12430
12431 width, w
12432 Change bandpass width. Syntax for the command is : "width"
12433
12434 mix, m
12435 Change bandpass mix. Syntax for the command is : "mix"
12436
12437 bandreject
12438 Apply a two-pole Butterworth band-reject filter with central frequency
12439 frequency, and (3dB-point) band-width width. The filter roll off at
12440 6dB per octave (20dB per decade).
12441
12442 The filter accepts the following options:
12443
12444 frequency, f
12445 Set the filter's central frequency. Default is 3000.
12446
12447 width_type, t
12448 Set method to specify band-width of filter.
12449
12450 h Hz
12451
12452 q Q-Factor
12453
12454 o octave
12455
12456 s slope
12457
12458 k kHz
12459
12460 width, w
12461 Specify the band-width of a filter in width_type units.
12462
12463 mix, m
12464 How much to use filtered signal in output. Default is 1. Range is
12465 between 0 and 1.
12466
12467 channels, c
12468 Specify which channels to filter, by default all available are
12469 filtered.
12470
12471 normalize, n
12472 Normalize biquad coefficients, by default is disabled. Enabling it
12473 will normalize magnitude response at DC to 0dB.
12474
12475 transform, a
12476 Set transform type of IIR filter.
12477
12478 di
12479 dii
12480 tdi
12481 tdii
12482 latt
12483 svf
12484 zdf
12485 precision, r
12486 Set precison of filtering.
12487
12488 auto
12489 Pick automatic sample format depending on surround filters.
12490
12491 s16 Always use signed 16-bit.
12492
12493 s32 Always use signed 32-bit.
12494
12495 f32 Always use float 32-bit.
12496
12497 f64 Always use float 64-bit.
12498
12499 block_size, b
12500 Set block size used for reverse IIR processing. If this value is
12501 set to high enough value (higher than impulse response length
12502 truncated when reaches near zero values) filtering will become
12503 linear phase otherwise if not big enough it will just produce nasty
12504 artifacts.
12505
12506 Note that filter delay will be exactly this many samples when set
12507 to non-zero value.
12508
12509 Commands
12510
12511 This filter supports the following commands:
12512
12513 frequency, f
12514 Change bandreject frequency. Syntax for the command is :
12515 "frequency"
12516
12517 width_type, t
12518 Change bandreject width_type. Syntax for the command is :
12519 "width_type"
12520
12521 width, w
12522 Change bandreject width. Syntax for the command is : "width"
12523
12524 mix, m
12525 Change bandreject mix. Syntax for the command is : "mix"
12526
12527 bass, lowshelf
12528 Boost or cut the bass (lower) frequencies of the audio using a two-pole
12529 shelving filter with a response similar to that of a standard hi-fi's
12530 tone-controls. This is also known as shelving equalisation (EQ).
12531
12532 The filter accepts the following options:
12533
12534 gain, g
12535 Give the gain at 0 Hz. Its useful range is about -20 (for a large
12536 cut) to +20 (for a large boost). Beware of clipping when using a
12537 positive gain.
12538
12539 frequency, f
12540 Set the filter's central frequency and so can be used to extend or
12541 reduce the frequency range to be boosted or cut. The default value
12542 is 100 Hz.
12543
12544 width_type, t
12545 Set method to specify band-width of filter.
12546
12547 h Hz
12548
12549 q Q-Factor
12550
12551 o octave
12552
12553 s slope
12554
12555 k kHz
12556
12557 width, w
12558 Determine how steep is the filter's shelf transition.
12559
12560 poles, p
12561 Set number of poles. Default is 2.
12562
12563 mix, m
12564 How much to use filtered signal in output. Default is 1. Range is
12565 between 0 and 1.
12566
12567 channels, c
12568 Specify which channels to filter, by default all available are
12569 filtered.
12570
12571 normalize, n
12572 Normalize biquad coefficients, by default is disabled. Enabling it
12573 will normalize magnitude response at DC to 0dB.
12574
12575 transform, a
12576 Set transform type of IIR filter.
12577
12578 di
12579 dii
12580 tdi
12581 tdii
12582 latt
12583 svf
12584 zdf
12585 precision, r
12586 Set precison of filtering.
12587
12588 auto
12589 Pick automatic sample format depending on surround filters.
12590
12591 s16 Always use signed 16-bit.
12592
12593 s32 Always use signed 32-bit.
12594
12595 f32 Always use float 32-bit.
12596
12597 f64 Always use float 64-bit.
12598
12599 block_size, b
12600 Set block size used for reverse IIR processing. If this value is
12601 set to high enough value (higher than impulse response length
12602 truncated when reaches near zero values) filtering will become
12603 linear phase otherwise if not big enough it will just produce nasty
12604 artifacts.
12605
12606 Note that filter delay will be exactly this many samples when set
12607 to non-zero value.
12608
12609 Commands
12610
12611 This filter supports the following commands:
12612
12613 frequency, f
12614 Change bass frequency. Syntax for the command is : "frequency"
12615
12616 width_type, t
12617 Change bass width_type. Syntax for the command is : "width_type"
12618
12619 width, w
12620 Change bass width. Syntax for the command is : "width"
12621
12622 gain, g
12623 Change bass gain. Syntax for the command is : "gain"
12624
12625 mix, m
12626 Change bass mix. Syntax for the command is : "mix"
12627
12628 biquad
12629 Apply a biquad IIR filter with the given coefficients. Where b0, b1,
12630 b2 and a0, a1, a2 are the numerator and denominator coefficients
12631 respectively. and channels, c specify which channels to filter, by
12632 default all available are filtered.
12633
12634 Commands
12635
12636 This filter supports the following commands:
12637
12638 a0
12639 a1
12640 a2
12641 b0
12642 b1
12643 b2 Change biquad parameter. Syntax for the command is : "value"
12644
12645 mix, m
12646 How much to use filtered signal in output. Default is 1. Range is
12647 between 0 and 1.
12648
12649 channels, c
12650 Specify which channels to filter, by default all available are
12651 filtered.
12652
12653 normalize, n
12654 Normalize biquad coefficients, by default is disabled. Enabling it
12655 will normalize magnitude response at DC to 0dB.
12656
12657 transform, a
12658 Set transform type of IIR filter.
12659
12660 di
12661 dii
12662 tdi
12663 tdii
12664 latt
12665 svf
12666 zdf
12667 precision, r
12668 Set precison of filtering.
12669
12670 auto
12671 Pick automatic sample format depending on surround filters.
12672
12673 s16 Always use signed 16-bit.
12674
12675 s32 Always use signed 32-bit.
12676
12677 f32 Always use float 32-bit.
12678
12679 f64 Always use float 64-bit.
12680
12681 block_size, b
12682 Set block size used for reverse IIR processing. If this value is
12683 set to high enough value (higher than impulse response length
12684 truncated when reaches near zero values) filtering will become
12685 linear phase otherwise if not big enough it will just produce nasty
12686 artifacts.
12687
12688 Note that filter delay will be exactly this many samples when set
12689 to non-zero value.
12690
12691 bs2b
12692 Bauer stereo to binaural transformation, which improves headphone
12693 listening of stereo audio records.
12694
12695 To enable compilation of this filter you need to configure FFmpeg with
12696 "--enable-libbs2b".
12697
12698 It accepts the following parameters:
12699
12700 profile
12701 Pre-defined crossfeed level.
12702
12703 default
12704 Default level (fcut=700, feed=50).
12705
12706 cmoy
12707 Chu Moy circuit (fcut=700, feed=60).
12708
12709 jmeier
12710 Jan Meier circuit (fcut=650, feed=95).
12711
12712 fcut
12713 Cut frequency (in Hz).
12714
12715 feed
12716 Feed level (in Hz).
12717
12718 channelmap
12719 Remap input channels to new locations.
12720
12721 It accepts the following parameters:
12722
12723 map Map channels from input to output. The argument is a '|'-separated
12724 list of mappings, each in the "in_channel-out_channel" or
12725 in_channel form. in_channel can be either the name of the input
12726 channel (e.g. FL for front left) or its index in the input channel
12727 layout. out_channel is the name of the output channel or its index
12728 in the output channel layout. If out_channel is not given then it
12729 is implicitly an index, starting with zero and increasing by one
12730 for each mapping.
12731
12732 channel_layout
12733 The channel layout of the output stream.
12734
12735 If no mapping is present, the filter will implicitly map input channels
12736 to output channels, preserving indices.
12737
12738 Examples
12739
12740 • For example, assuming a 5.1+downmix input MOV file,
12741
12742 ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
12743
12744 will create an output WAV file tagged as stereo from the downmix
12745 channels of the input.
12746
12747 • To fix a 5.1 WAV improperly encoded in AAC's native channel order
12748
12749 ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
12750
12751 channelsplit
12752 Split each channel from an input audio stream into a separate output
12753 stream.
12754
12755 It accepts the following parameters:
12756
12757 channel_layout
12758 The channel layout of the input stream. The default is "stereo".
12759
12760 channels
12761 A channel layout describing the channels to be extracted as
12762 separate output streams or "all" to extract each input channel as a
12763 separate stream. The default is "all".
12764
12765 Choosing channels not present in channel layout in the input will
12766 result in an error.
12767
12768 Examples
12769
12770 • For example, assuming a stereo input MP3 file,
12771
12772 ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
12773
12774 will create an output Matroska file with two audio streams, one
12775 containing only the left channel and the other the right channel.
12776
12777 • Split a 5.1 WAV file into per-channel files:
12778
12779 ffmpeg -i in.wav -filter_complex
12780 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
12781 -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
12782 front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
12783 side_right.wav
12784
12785 • Extract only LFE from a 5.1 WAV file:
12786
12787 ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
12788 -map '[LFE]' lfe.wav
12789
12790 chorus
12791 Add a chorus effect to the audio.
12792
12793 Can make a single vocal sound like a chorus, but can also be applied to
12794 instrumentation.
12795
12796 Chorus resembles an echo effect with a short delay, but whereas with
12797 echo the delay is constant, with chorus, it is varied using using
12798 sinusoidal or triangular modulation. The modulation depth defines the
12799 range the modulated delay is played before or after the delay. Hence
12800 the delayed sound will sound slower or faster, that is the delayed
12801 sound tuned around the original one, like in a chorus where some vocals
12802 are slightly off key.
12803
12804 It accepts the following parameters:
12805
12806 in_gain
12807 Set input gain. Default is 0.4.
12808
12809 out_gain
12810 Set output gain. Default is 0.4.
12811
12812 delays
12813 Set delays. A typical delay is around 40ms to 60ms.
12814
12815 decays
12816 Set decays.
12817
12818 speeds
12819 Set speeds.
12820
12821 depths
12822 Set depths.
12823
12824 Examples
12825
12826 • A single delay:
12827
12828 chorus=0.7:0.9:55:0.4:0.25:2
12829
12830 • Two delays:
12831
12832 chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
12833
12834 • Fuller sounding chorus with three delays:
12835
12836 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
12837
12838 compand
12839 Compress or expand the audio's dynamic range.
12840
12841 It accepts the following parameters:
12842
12843 attacks
12844 decays
12845 A list of times in seconds for each channel over which the
12846 instantaneous level of the input signal is averaged to determine
12847 its volume. attacks refers to increase of volume and decays refers
12848 to decrease of volume. For most situations, the attack time
12849 (response to the audio getting louder) should be shorter than the
12850 decay time, because the human ear is more sensitive to sudden loud
12851 audio than sudden soft audio. A typical value for attack is 0.3
12852 seconds and a typical value for decay is 0.8 seconds. If specified
12853 number of attacks & decays is lower than number of channels, the
12854 last set attack/decay will be used for all remaining channels.
12855
12856 points
12857 A list of points for the transfer function, specified in dB
12858 relative to the maximum possible signal amplitude. Each key points
12859 list must be defined using the following syntax:
12860 "x0/y0|x1/y1|x2/y2|...." or "x0/y0 x1/y1 x2/y2 ...."
12861
12862 The input values must be in strictly increasing order but the
12863 transfer function does not have to be monotonically rising. The
12864 point "0/0" is assumed but may be overridden (by "0/out-dBn").
12865 Typical values for the transfer function are "-70/-70|-60/-20|1/0".
12866
12867 soft-knee
12868 Set the curve radius in dB for all joints. It defaults to 0.01.
12869
12870 gain
12871 Set the additional gain in dB to be applied at all points on the
12872 transfer function. This allows for easy adjustment of the overall
12873 gain. It defaults to 0.
12874
12875 volume
12876 Set an initial volume, in dB, to be assumed for each channel when
12877 filtering starts. This permits the user to supply a nominal level
12878 initially, so that, for example, a very large gain is not applied
12879 to initial signal levels before the companding has begun to
12880 operate. A typical value for audio which is initially quiet is -90
12881 dB. It defaults to 0.
12882
12883 delay
12884 Set a delay, in seconds. The input audio is analyzed immediately,
12885 but audio is delayed before being fed to the volume adjuster.
12886 Specifying a delay approximately equal to the attack/decay times
12887 allows the filter to effectively operate in predictive rather than
12888 reactive mode. It defaults to 0.
12889
12890 Examples
12891
12892 • Make music with both quiet and loud passages suitable for listening
12893 to in a noisy environment:
12894
12895 compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
12896
12897 Another example for audio with whisper and explosion parts:
12898
12899 compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
12900
12901 • A noise gate for when the noise is at a lower level than the
12902 signal:
12903
12904 compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
12905
12906 • Here is another noise gate, this time for when the noise is at a
12907 higher level than the signal (making it, in some ways, similar to
12908 squelch):
12909
12910 compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
12911
12912 • 2:1 compression starting at -6dB:
12913
12914 compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
12915
12916 • 2:1 compression starting at -9dB:
12917
12918 compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
12919
12920 • 2:1 compression starting at -12dB:
12921
12922 compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
12923
12924 • 2:1 compression starting at -18dB:
12925
12926 compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
12927
12928 • 3:1 compression starting at -15dB:
12929
12930 compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
12931
12932 • Compressor/Gate:
12933
12934 compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
12935
12936 • Expander:
12937
12938 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
12939
12940 • Hard limiter at -6dB:
12941
12942 compand=attacks=0:points=-80/-80|-6/-6|20/-6
12943
12944 • Hard limiter at -12dB:
12945
12946 compand=attacks=0:points=-80/-80|-12/-12|20/-12
12947
12948 • Hard noise gate at -35 dB:
12949
12950 compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
12951
12952 • Soft limiter:
12953
12954 compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
12955
12956 compensationdelay
12957 Compensation Delay Line is a metric based delay to compensate differing
12958 positions of microphones or speakers.
12959
12960 For example, you have recorded guitar with two microphones placed in
12961 different locations. Because the front of sound wave has fixed speed in
12962 normal conditions, the phasing of microphones can vary and depends on
12963 their location and interposition. The best sound mix can be achieved
12964 when these microphones are in phase (synchronized). Note that a
12965 distance of ~30 cm between microphones makes one microphone capture the
12966 signal in antiphase to the other microphone. That makes the final mix
12967 sound moody. This filter helps to solve phasing problems by adding
12968 different delays to each microphone track and make them synchronized.
12969
12970 The best result can be reached when you take one track as base and
12971 synchronize other tracks one by one with it. Remember that
12972 synchronization/delay tolerance depends on sample rate, too. Higher
12973 sample rates will give more tolerance.
12974
12975 The filter accepts the following parameters:
12976
12977 mm Set millimeters distance. This is compensation distance for fine
12978 tuning. Default is 0.
12979
12980 cm Set cm distance. This is compensation distance for tightening
12981 distance setup. Default is 0.
12982
12983 m Set meters distance. This is compensation distance for hard
12984 distance setup. Default is 0.
12985
12986 dry Set dry amount. Amount of unprocessed (dry) signal. Default is 0.
12987
12988 wet Set wet amount. Amount of processed (wet) signal. Default is 1.
12989
12990 temp
12991 Set temperature in degrees Celsius. This is the temperature of the
12992 environment. Default is 20.
12993
12994 Commands
12995
12996 This filter supports the all above options as commands.
12997
12998 crossfeed
12999 Apply headphone crossfeed filter.
13000
13001 Crossfeed is the process of blending the left and right channels of
13002 stereo audio recording. It is mainly used to reduce extreme stereo
13003 separation of low frequencies.
13004
13005 The intent is to produce more speaker like sound to the listener.
13006
13007 The filter accepts the following options:
13008
13009 strength
13010 Set strength of crossfeed. Default is 0.2. Allowed range is from 0
13011 to 1. This sets gain of low shelf filter for side part of stereo
13012 image. Default is -6dB. Max allowed is -30db when strength is set
13013 to 1.
13014
13015 range
13016 Set soundstage wideness. Default is 0.5. Allowed range is from 0 to
13017 1. This sets cut off frequency of low shelf filter. Default is cut
13018 off near 1550 Hz. With range set to 1 cut off frequency is set to
13019 2100 Hz.
13020
13021 slope
13022 Set curve slope of low shelf filter. Default is 0.5. Allowed range
13023 is from 0.01 to 1.
13024
13025 level_in
13026 Set input gain. Default is 0.9.
13027
13028 level_out
13029 Set output gain. Default is 1.
13030
13031 block_size
13032 Set block size used for reverse IIR processing. If this value is
13033 set to high enough value (higher than impulse response length
13034 truncated when reaches near zero values) filtering will become
13035 linear phase otherwise if not big enough it will just produce nasty
13036 artifacts.
13037
13038 Note that filter delay will be exactly this many samples when set
13039 to non-zero value.
13040
13041 Commands
13042
13043 This filter supports the all above options as commands.
13044
13045 crystalizer
13046 Simple algorithm for audio noise sharpening.
13047
13048 This filter linearly increases differences betweeen each audio sample.
13049
13050 The filter accepts the following options:
13051
13052 i Sets the intensity of effect (default: 2.0). Must be in range
13053 between -10.0 to 0 (unchanged sound) to 10.0 (maximum effect). To
13054 inverse filtering use negative value.
13055
13056 c Enable clipping. By default is enabled.
13057
13058 Commands
13059
13060 This filter supports the all above options as commands.
13061
13062 dcshift
13063 Apply a DC shift to the audio.
13064
13065 This can be useful to remove a DC offset (caused perhaps by a hardware
13066 problem in the recording chain) from the audio. The effect of a DC
13067 offset is reduced headroom and hence volume. The astats filter can be
13068 used to determine if a signal has a DC offset.
13069
13070 shift
13071 Set the DC shift, allowed range is [-1, 1]. It indicates the amount
13072 to shift the audio.
13073
13074 limitergain
13075 Optional. It should have a value much less than 1 (e.g. 0.05 or
13076 0.02) and is used to prevent clipping.
13077
13078 deesser
13079 Apply de-essing to the audio samples.
13080
13081 i Set intensity for triggering de-essing. Allowed range is from 0 to
13082 1. Default is 0.
13083
13084 m Set amount of ducking on treble part of sound. Allowed range is
13085 from 0 to 1. Default is 0.5.
13086
13087 f How much of original frequency content to keep when de-essing.
13088 Allowed range is from 0 to 1. Default is 0.5.
13089
13090 s Set the output mode.
13091
13092 It accepts the following values:
13093
13094 i Pass input unchanged.
13095
13096 o Pass ess filtered out.
13097
13098 e Pass only ess.
13099
13100 Default value is o.
13101
13102 dialoguenhance
13103 Enhance dialogue in stereo audio.
13104
13105 This filter accepts stereo input and produce surround (3.0) channels
13106 output. The newly produced front center channel have enhanced speech
13107 dialogue originally available in both stereo channels. This filter
13108 outputs front left and front right channels same as available in stereo
13109 input.
13110
13111 The filter accepts the following options:
13112
13113 original
13114 Set the original center factor to keep in front center channel
13115 output. Allowed range is from 0 to 1. Default value is 1.
13116
13117 enhance
13118 Set the dialogue enhance factor to put in front center channel
13119 output. Allowed range is from 0 to 3. Default value is 1.
13120
13121 voice
13122 Set the voice detection factor. Allowed range is from 2 to 32.
13123 Default value is 2.
13124
13125 Commands
13126
13127 This filter supports the all above options as commands.
13128
13129 drmeter
13130 Measure audio dynamic range.
13131
13132 DR values of 14 and higher is found in very dynamic material. DR of 8
13133 to 13 is found in transition material. And anything less that 8 have
13134 very poor dynamics and is very compressed.
13135
13136 The filter accepts the following options:
13137
13138 length
13139 Set window length in seconds used to split audio into segments of
13140 equal length. Default is 3 seconds.
13141
13142 dynaudnorm
13143 Dynamic Audio Normalizer.
13144
13145 This filter applies a certain amount of gain to the input audio in
13146 order to bring its peak magnitude to a target level (e.g. 0 dBFS).
13147 However, in contrast to more "simple" normalization algorithms, the
13148 Dynamic Audio Normalizer *dynamically* re-adjusts the gain factor to
13149 the input audio. This allows for applying extra gain to the "quiet"
13150 sections of the audio while avoiding distortions or clipping the "loud"
13151 sections. In other words: The Dynamic Audio Normalizer will "even out"
13152 the volume of quiet and loud sections, in the sense that the volume of
13153 each section is brought to the same target level. Note, however, that
13154 the Dynamic Audio Normalizer achieves this goal *without* applying
13155 "dynamic range compressing". It will retain 100% of the dynamic range
13156 *within* each section of the audio file.
13157
13158 framelen, f
13159 Set the frame length in milliseconds. In range from 10 to 8000
13160 milliseconds. Default is 500 milliseconds. The Dynamic Audio
13161 Normalizer processes the input audio in small chunks, referred to
13162 as frames. This is required, because a peak magnitude has no
13163 meaning for just a single sample value. Instead, we need to
13164 determine the peak magnitude for a contiguous sequence of sample
13165 values. While a "standard" normalizer would simply use the peak
13166 magnitude of the complete file, the Dynamic Audio Normalizer
13167 determines the peak magnitude individually for each frame. The
13168 length of a frame is specified in milliseconds. By default, the
13169 Dynamic Audio Normalizer uses a frame length of 500 milliseconds,
13170 which has been found to give good results with most files. Note
13171 that the exact frame length, in number of samples, will be
13172 determined automatically, based on the sampling rate of the
13173 individual input audio file.
13174
13175 gausssize, g
13176 Set the Gaussian filter window size. In range from 3 to 301, must
13177 be odd number. Default is 31. Probably the most important
13178 parameter of the Dynamic Audio Normalizer is the "window size" of
13179 the Gaussian smoothing filter. The filter's window size is
13180 specified in frames, centered around the current frame. For the
13181 sake of simplicity, this must be an odd number. Consequently, the
13182 default value of 31 takes into account the current frame, as well
13183 as the 15 preceding frames and the 15 subsequent frames. Using a
13184 larger window results in a stronger smoothing effect and thus in
13185 less gain variation, i.e. slower gain adaptation. Conversely, using
13186 a smaller window results in a weaker smoothing effect and thus in
13187 more gain variation, i.e. faster gain adaptation. In other words,
13188 the more you increase this value, the more the Dynamic Audio
13189 Normalizer will behave like a "traditional" normalization filter.
13190 On the contrary, the more you decrease this value, the more the
13191 Dynamic Audio Normalizer will behave like a dynamic range
13192 compressor.
13193
13194 peak, p
13195 Set the target peak value. This specifies the highest permissible
13196 magnitude level for the normalized audio input. This filter will
13197 try to approach the target peak magnitude as closely as possible,
13198 but at the same time it also makes sure that the normalized signal
13199 will never exceed the peak magnitude. A frame's maximum local gain
13200 factor is imposed directly by the target peak magnitude. The
13201 default value is 0.95 and thus leaves a headroom of 5%*. It is not
13202 recommended to go above this value.
13203
13204 maxgain, m
13205 Set the maximum gain factor. In range from 1.0 to 100.0. Default is
13206 10.0. The Dynamic Audio Normalizer determines the maximum possible
13207 (local) gain factor for each input frame, i.e. the maximum gain
13208 factor that does not result in clipping or distortion. The maximum
13209 gain factor is determined by the frame's highest magnitude sample.
13210 However, the Dynamic Audio Normalizer additionally bounds the
13211 frame's maximum gain factor by a predetermined (global) maximum
13212 gain factor. This is done in order to avoid excessive gain factors
13213 in "silent" or almost silent frames. By default, the maximum gain
13214 factor is 10.0, For most inputs the default value should be
13215 sufficient and it usually is not recommended to increase this
13216 value. Though, for input with an extremely low overall volume
13217 level, it may be necessary to allow even higher gain factors. Note,
13218 however, that the Dynamic Audio Normalizer does not simply apply a
13219 "hard" threshold (i.e. cut off values above the threshold).
13220 Instead, a "sigmoid" threshold function will be applied. This way,
13221 the gain factors will smoothly approach the threshold value, but
13222 never exceed that value.
13223
13224 targetrms, r
13225 Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 -
13226 disabled. By default, the Dynamic Audio Normalizer performs "peak"
13227 normalization. This means that the maximum local gain factor for
13228 each frame is defined (only) by the frame's highest magnitude
13229 sample. This way, the samples can be amplified as much as possible
13230 without exceeding the maximum signal level, i.e. without clipping.
13231 Optionally, however, the Dynamic Audio Normalizer can also take
13232 into account the frame's root mean square, abbreviated RMS. In
13233 electrical engineering, the RMS is commonly used to determine the
13234 power of a time-varying signal. It is therefore considered that the
13235 RMS is a better approximation of the "perceived loudness" than just
13236 looking at the signal's peak magnitude. Consequently, by adjusting
13237 all frames to a constant RMS value, a uniform "perceived loudness"
13238 can be established. If a target RMS value has been specified, a
13239 frame's local gain factor is defined as the factor that would
13240 result in exactly that RMS value. Note, however, that the maximum
13241 local gain factor is still restricted by the frame's highest
13242 magnitude sample, in order to prevent clipping.
13243
13244 coupling, n
13245 Enable channels coupling. By default is enabled. By default, the
13246 Dynamic Audio Normalizer will amplify all channels by the same
13247 amount. This means the same gain factor will be applied to all
13248 channels, i.e. the maximum possible gain factor is determined by
13249 the "loudest" channel. However, in some recordings, it may happen
13250 that the volume of the different channels is uneven, e.g. one
13251 channel may be "quieter" than the other one(s). In this case, this
13252 option can be used to disable the channel coupling. This way, the
13253 gain factor will be determined independently for each channel,
13254 depending only on the individual channel's highest magnitude
13255 sample. This allows for harmonizing the volume of the different
13256 channels.
13257
13258 correctdc, c
13259 Enable DC bias correction. By default is disabled. An audio signal
13260 (in the time domain) is a sequence of sample values. In the
13261 Dynamic Audio Normalizer these sample values are represented in the
13262 -1.0 to 1.0 range, regardless of the original input format.
13263 Normally, the audio signal, or "waveform", should be centered
13264 around the zero point. That means if we calculate the mean value
13265 of all samples in a file, or in a single frame, then the result
13266 should be 0.0 or at least very close to that value. If, however,
13267 there is a significant deviation of the mean value from 0.0, in
13268 either positive or negative direction, this is referred to as a DC
13269 bias or DC offset. Since a DC bias is clearly undesirable, the
13270 Dynamic Audio Normalizer provides optional DC bias correction.
13271 With DC bias correction enabled, the Dynamic Audio Normalizer will
13272 determine the mean value, or "DC correction" offset, of each input
13273 frame and subtract that value from all of the frame's sample values
13274 which ensures those samples are centered around 0.0 again. Also, in
13275 order to avoid "gaps" at the frame boundaries, the DC correction
13276 offset values will be interpolated smoothly between neighbouring
13277 frames.
13278
13279 altboundary, b
13280 Enable alternative boundary mode. By default is disabled. The
13281 Dynamic Audio Normalizer takes into account a certain neighbourhood
13282 around each frame. This includes the preceding frames as well as
13283 the subsequent frames. However, for the "boundary" frames, located
13284 at the very beginning and at the very end of the audio file, not
13285 all neighbouring frames are available. In particular, for the first
13286 few frames in the audio file, the preceding frames are not known.
13287 And, similarly, for the last few frames in the audio file, the
13288 subsequent frames are not known. Thus, the question arises which
13289 gain factors should be assumed for the missing frames in the
13290 "boundary" region. The Dynamic Audio Normalizer implements two
13291 modes to deal with this situation. The default boundary mode
13292 assumes a gain factor of exactly 1.0 for the missing frames,
13293 resulting in a smooth "fade in" and "fade out" at the beginning and
13294 at the end of the input, respectively.
13295
13296 compress, s
13297 Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
13298 By default, the Dynamic Audio Normalizer does not apply
13299 "traditional" compression. This means that signal peaks will not be
13300 pruned and thus the full dynamic range will be retained within each
13301 local neighbourhood. However, in some cases it may be desirable to
13302 combine the Dynamic Audio Normalizer's normalization algorithm with
13303 a more "traditional" compression. For this purpose, the Dynamic
13304 Audio Normalizer provides an optional compression (thresholding)
13305 function. If (and only if) the compression feature is enabled, all
13306 input frames will be processed by a soft knee thresholding function
13307 prior to the actual normalization process. Put simply, the
13308 thresholding function is going to prune all samples whose magnitude
13309 exceeds a certain threshold value. However, the Dynamic Audio
13310 Normalizer does not simply apply a fixed threshold value. Instead,
13311 the threshold value will be adjusted for each individual frame. In
13312 general, smaller parameters result in stronger compression, and
13313 vice versa. Values below 3.0 are not recommended, because audible
13314 distortion may appear.
13315
13316 threshold, t
13317 Set the target threshold value. This specifies the lowest
13318 permissible magnitude level for the audio input which will be
13319 normalized. If input frame volume is above this value frame will
13320 be normalized. Otherwise frame may not be normalized at all. The
13321 default value is set to 0, which means all input frames will be
13322 normalized. This option is mostly useful if digital noise is not
13323 wanted to be amplified.
13324
13325 channels, h
13326 Specify which channels to filter, by default all available channels
13327 are filtered.
13328
13329 overlap, o
13330 Specify overlap for frames. If set to 0 (default) no frame
13331 overlapping is done. Using >0 and <1 values will make less
13332 conservative gain adjustments, like when framelen option is set to
13333 smaller value, if framelen option value is compensated for non-zero
13334 overlap then gain adjustments will be smoother across time compared
13335 to zero overlap case.
13336
13337 curve, v
13338 Specify the peak mapping curve expression which is going to be used
13339 when calculating gain applied to frames. The max output frame gain
13340 will still be limited by other options mentioned previously for
13341 this filter.
13342
13343 The expression can contain the following constants:
13344
13345 ch current channel number
13346
13347 sn current sample number
13348
13349 nb_channels
13350 number of channels
13351
13352 t timestamp expressed in seconds
13353
13354 sr sample rate
13355
13356 p current frame peak value
13357
13358 Commands
13359
13360 This filter supports the all above options as commands.
13361
13362 earwax
13363 Make audio easier to listen to on headphones.
13364
13365 This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio
13366 so that when listened to on headphones the stereo image is moved from
13367 inside your head (standard for headphones) to outside and in front of
13368 the listener (standard for speakers).
13369
13370 Ported from SoX.
13371
13372 equalizer
13373 Apply a two-pole peaking equalisation (EQ) filter. With this filter,
13374 the signal-level at and around a selected frequency can be increased or
13375 decreased, whilst (unlike bandpass and bandreject filters) that at all
13376 other frequencies is unchanged.
13377
13378 In order to produce complex equalisation curves, this filter can be
13379 given several times, each with a different central frequency.
13380
13381 The filter accepts the following options:
13382
13383 frequency, f
13384 Set the filter's central frequency in Hz.
13385
13386 width_type, t
13387 Set method to specify band-width of filter.
13388
13389 h Hz
13390
13391 q Q-Factor
13392
13393 o octave
13394
13395 s slope
13396
13397 k kHz
13398
13399 width, w
13400 Specify the band-width of a filter in width_type units.
13401
13402 gain, g
13403 Set the required gain or attenuation in dB. Beware of clipping
13404 when using a positive gain.
13405
13406 mix, m
13407 How much to use filtered signal in output. Default is 1. Range is
13408 between 0 and 1.
13409
13410 channels, c
13411 Specify which channels to filter, by default all available are
13412 filtered.
13413
13414 normalize, n
13415 Normalize biquad coefficients, by default is disabled. Enabling it
13416 will normalize magnitude response at DC to 0dB.
13417
13418 transform, a
13419 Set transform type of IIR filter.
13420
13421 di
13422 dii
13423 tdi
13424 tdii
13425 latt
13426 svf
13427 zdf
13428 precision, r
13429 Set precison of filtering.
13430
13431 auto
13432 Pick automatic sample format depending on surround filters.
13433
13434 s16 Always use signed 16-bit.
13435
13436 s32 Always use signed 32-bit.
13437
13438 f32 Always use float 32-bit.
13439
13440 f64 Always use float 64-bit.
13441
13442 block_size, b
13443 Set block size used for reverse IIR processing. If this value is
13444 set to high enough value (higher than impulse response length
13445 truncated when reaches near zero values) filtering will become
13446 linear phase otherwise if not big enough it will just produce nasty
13447 artifacts.
13448
13449 Note that filter delay will be exactly this many samples when set
13450 to non-zero value.
13451
13452 Examples
13453
13454 • Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
13455
13456 equalizer=f=1000:t=h:width=200:g=-10
13457
13458 • Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz
13459 with Q 2:
13460
13461 equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
13462
13463 Commands
13464
13465 This filter supports the following commands:
13466
13467 frequency, f
13468 Change equalizer frequency. Syntax for the command is :
13469 "frequency"
13470
13471 width_type, t
13472 Change equalizer width_type. Syntax for the command is :
13473 "width_type"
13474
13475 width, w
13476 Change equalizer width. Syntax for the command is : "width"
13477
13478 gain, g
13479 Change equalizer gain. Syntax for the command is : "gain"
13480
13481 mix, m
13482 Change equalizer mix. Syntax for the command is : "mix"
13483
13484 extrastereo
13485 Linearly increases the difference between left and right channels which
13486 adds some sort of "live" effect to playback.
13487
13488 The filter accepts the following options:
13489
13490 m Sets the difference coefficient (default: 2.5). 0.0 means mono
13491 sound (average of both channels), with 1.0 sound will be unchanged,
13492 with -1.0 left and right channels will be swapped.
13493
13494 c Enable clipping. By default is enabled.
13495
13496 Commands
13497
13498 This filter supports the all above options as commands.
13499
13500 firequalizer
13501 Apply FIR Equalization using arbitrary frequency response.
13502
13503 The filter accepts the following option:
13504
13505 gain
13506 Set gain curve equation (in dB). The expression can contain
13507 variables:
13508
13509 f the evaluated frequency
13510
13511 sr sample rate
13512
13513 ch channel number, set to 0 when multichannels evaluation is
13514 disabled
13515
13516 chid
13517 channel id, see libavutil/channel_layout.h, set to the first
13518 channel id when multichannels evaluation is disabled
13519
13520 chs number of channels
13521
13522 chlayout
13523 channel_layout, see libavutil/channel_layout.h
13524
13525 and functions:
13526
13527 gain_interpolate(f)
13528 interpolate gain on frequency f based on gain_entry
13529
13530 cubic_interpolate(f)
13531 same as gain_interpolate, but smoother
13532
13533 This option is also available as command. Default is
13534 gain_interpolate(f).
13535
13536 gain_entry
13537 Set gain entry for gain_interpolate function. The expression can
13538 contain functions:
13539
13540 entry(f, g)
13541 store gain entry at frequency f with value g
13542
13543 This option is also available as command.
13544
13545 delay
13546 Set filter delay in seconds. Higher value means more accurate.
13547 Default is 0.01.
13548
13549 accuracy
13550 Set filter accuracy in Hz. Lower value means more accurate.
13551 Default is 5.
13552
13553 wfunc
13554 Set window function. Acceptable values are:
13555
13556 rectangular
13557 rectangular window, useful when gain curve is already smooth
13558
13559 hann
13560 hann window (default)
13561
13562 hamming
13563 hamming window
13564
13565 blackman
13566 blackman window
13567
13568 nuttall3
13569 3-terms continuous 1st derivative nuttall window
13570
13571 mnuttall3
13572 minimum 3-terms discontinuous nuttall window
13573
13574 nuttall
13575 4-terms continuous 1st derivative nuttall window
13576
13577 bnuttall
13578 minimum 4-terms discontinuous nuttall (blackman-nuttall) window
13579
13580 bharris
13581 blackman-harris window
13582
13583 tukey
13584 tukey window
13585
13586 fixed
13587 If enabled, use fixed number of audio samples. This improves speed
13588 when filtering with large delay. Default is disabled.
13589
13590 multi
13591 Enable multichannels evaluation on gain. Default is disabled.
13592
13593 zero_phase
13594 Enable zero phase mode by subtracting timestamp to compensate
13595 delay. Default is disabled.
13596
13597 scale
13598 Set scale used by gain. Acceptable values are:
13599
13600 linlin
13601 linear frequency, linear gain
13602
13603 linlog
13604 linear frequency, logarithmic (in dB) gain (default)
13605
13606 loglin
13607 logarithmic (in octave scale where 20 Hz is 0) frequency,
13608 linear gain
13609
13610 loglog
13611 logarithmic frequency, logarithmic gain
13612
13613 dumpfile
13614 Set file for dumping, suitable for gnuplot.
13615
13616 dumpscale
13617 Set scale for dumpfile. Acceptable values are same with scale
13618 option. Default is linlog.
13619
13620 fft2
13621 Enable 2-channel convolution using complex FFT. This improves speed
13622 significantly. Default is disabled.
13623
13624 min_phase
13625 Enable minimum phase impulse response. Default is disabled.
13626
13627 Examples
13628
13629 • lowpass at 1000 Hz:
13630
13631 firequalizer=gain='if(lt(f,1000), 0, -INF)'
13632
13633 • lowpass at 1000 Hz with gain_entry:
13634
13635 firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
13636
13637 • custom equalization:
13638
13639 firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
13640
13641 • higher delay with zero phase to compensate delay:
13642
13643 firequalizer=delay=0.1:fixed=on:zero_phase=on
13644
13645 • lowpass on left channel, highpass on right channel:
13646
13647 firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
13648 :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
13649
13650 flanger
13651 Apply a flanging effect to the audio.
13652
13653 The filter accepts the following options:
13654
13655 delay
13656 Set base delay in milliseconds. Range from 0 to 30. Default value
13657 is 0.
13658
13659 depth
13660 Set added sweep delay in milliseconds. Range from 0 to 10. Default
13661 value is 2.
13662
13663 regen
13664 Set percentage regeneration (delayed signal feedback). Range from
13665 -95 to 95. Default value is 0.
13666
13667 width
13668 Set percentage of delayed signal mixed with original. Range from 0
13669 to 100. Default value is 71.
13670
13671 speed
13672 Set sweeps per second (Hz). Range from 0.1 to 10. Default value is
13673 0.5.
13674
13675 shape
13676 Set swept wave shape, can be triangular or sinusoidal. Default
13677 value is sinusoidal.
13678
13679 phase
13680 Set swept wave percentage-shift for multi channel. Range from 0 to
13681 100. Default value is 25.
13682
13683 interp
13684 Set delay-line interpolation, linear or quadratic. Default is
13685 linear.
13686
13687 haas
13688 Apply Haas effect to audio.
13689
13690 Note that this makes most sense to apply on mono signals. With this
13691 filter applied to mono signals it give some directionality and
13692 stretches its stereo image.
13693
13694 The filter accepts the following options:
13695
13696 level_in
13697 Set input level. By default is 1, or 0dB
13698
13699 level_out
13700 Set output level. By default is 1, or 0dB.
13701
13702 side_gain
13703 Set gain applied to side part of signal. By default is 1.
13704
13705 middle_source
13706 Set kind of middle source. Can be one of the following:
13707
13708 left
13709 Pick left channel.
13710
13711 right
13712 Pick right channel.
13713
13714 mid Pick middle part signal of stereo image.
13715
13716 side
13717 Pick side part signal of stereo image.
13718
13719 middle_phase
13720 Change middle phase. By default is disabled.
13721
13722 left_delay
13723 Set left channel delay. By default is 2.05 milliseconds.
13724
13725 left_balance
13726 Set left channel balance. By default is -1.
13727
13728 left_gain
13729 Set left channel gain. By default is 1.
13730
13731 left_phase
13732 Change left phase. By default is disabled.
13733
13734 right_delay
13735 Set right channel delay. By defaults is 2.12 milliseconds.
13736
13737 right_balance
13738 Set right channel balance. By default is 1.
13739
13740 right_gain
13741 Set right channel gain. By default is 1.
13742
13743 right_phase
13744 Change right phase. By default is enabled.
13745
13746 hdcd
13747 Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM
13748 stream with embedded HDCD codes is expanded into a 20-bit PCM stream.
13749
13750 The filter supports the Peak Extend and Low-level Gain Adjustment
13751 features of HDCD, and detects the Transient Filter flag.
13752
13753 ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
13754
13755 When using the filter with wav, note the default encoding for wav is
13756 16-bit, so the resulting 20-bit stream will be truncated back to
13757 16-bit. Use something like -acodec pcm_s24le after the filter to get
13758 24-bit PCM output.
13759
13760 ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
13761 ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
13762
13763 The filter accepts the following options:
13764
13765 disable_autoconvert
13766 Disable any automatic format conversion or resampling in the filter
13767 graph.
13768
13769 process_stereo
13770 Process the stereo channels together. If target_gain does not match
13771 between channels, consider it invalid and use the last valid
13772 target_gain.
13773
13774 cdt_ms
13775 Set the code detect timer period in ms.
13776
13777 force_pe
13778 Always extend peaks above -3dBFS even if PE isn't signaled.
13779
13780 analyze_mode
13781 Replace audio with a solid tone and adjust the amplitude to signal
13782 some specific aspect of the decoding process. The output file can
13783 be loaded in an audio editor alongside the original to aid
13784 analysis.
13785
13786 "analyze_mode=pe:force_pe=true" can be used to see all samples
13787 above the PE level.
13788
13789 Modes are:
13790
13791 0, off
13792 Disabled
13793
13794 1, lle
13795 Gain adjustment level at each sample
13796
13797 2, pe
13798 Samples where peak extend occurs
13799
13800 3, cdt
13801 Samples where the code detect timer is active
13802
13803 4, tgm
13804 Samples where the target gain does not match between channels
13805
13806 headphone
13807 Apply head-related transfer functions (HRTFs) to create virtual
13808 loudspeakers around the user for binaural listening via headphones.
13809 The HRIRs are provided via additional streams, for each channel one
13810 stereo input stream is needed.
13811
13812 The filter accepts the following options:
13813
13814 map Set mapping of input streams for convolution. The argument is a
13815 '|'-separated list of channel names in order as they are given as
13816 additional stream inputs for filter. This also specify number of
13817 input streams. Number of input streams must be not less than number
13818 of channels in first stream plus one.
13819
13820 gain
13821 Set gain applied to audio. Value is in dB. Default is 0.
13822
13823 type
13824 Set processing type. Can be time or freq. time is processing audio
13825 in time domain which is slow. freq is processing audio in
13826 frequency domain which is fast. Default is freq.
13827
13828 lfe Set custom gain for LFE channels. Value is in dB. Default is 0.
13829
13830 size
13831 Set size of frame in number of samples which will be processed at
13832 once. Default value is 1024. Allowed range is from 1024 to 96000.
13833
13834 hrir
13835 Set format of hrir stream. Default value is stereo. Alternative
13836 value is multich. If value is set to stereo, number of additional
13837 streams should be greater or equal to number of input channels in
13838 first input stream. Also each additional stream should have stereo
13839 number of channels. If value is set to multich, number of
13840 additional streams should be exactly one. Also number of input
13841 channels of additional stream should be equal or greater than twice
13842 number of channels of first input stream.
13843
13844 Examples
13845
13846 • Full example using wav files as coefficients with amovie filters
13847 for 7.1 downmix, each amovie filter use stereo file with IR
13848 coefficients as input. The files give coefficients for each
13849 position of virtual loudspeaker:
13850
13851 ffmpeg -i input.wav
13852 -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"
13853 output.wav
13854
13855 • Full example using wav files as coefficients with amovie filters
13856 for 7.1 downmix, but now in multich hrir format.
13857
13858 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"
13859 output.wav
13860
13861 highpass
13862 Apply a high-pass filter with 3dB point frequency. The filter can be
13863 either single-pole, or double-pole (the default). The filter roll off
13864 at 6dB per pole per octave (20dB per pole per decade).
13865
13866 The filter accepts the following options:
13867
13868 frequency, f
13869 Set frequency in Hz. Default is 3000.
13870
13871 poles, p
13872 Set number of poles. Default is 2.
13873
13874 width_type, t
13875 Set method to specify band-width of filter.
13876
13877 h Hz
13878
13879 q Q-Factor
13880
13881 o octave
13882
13883 s slope
13884
13885 k kHz
13886
13887 width, w
13888 Specify the band-width of a filter in width_type units. Applies
13889 only to double-pole filter. The default is 0.707q and gives a
13890 Butterworth response.
13891
13892 mix, m
13893 How much to use filtered signal in output. Default is 1. Range is
13894 between 0 and 1.
13895
13896 channels, c
13897 Specify which channels to filter, by default all available are
13898 filtered.
13899
13900 normalize, n
13901 Normalize biquad coefficients, by default is disabled. Enabling it
13902 will normalize magnitude response at DC to 0dB.
13903
13904 transform, a
13905 Set transform type of IIR filter.
13906
13907 di
13908 dii
13909 tdi
13910 tdii
13911 latt
13912 svf
13913 zdf
13914 precision, r
13915 Set precison of filtering.
13916
13917 auto
13918 Pick automatic sample format depending on surround filters.
13919
13920 s16 Always use signed 16-bit.
13921
13922 s32 Always use signed 32-bit.
13923
13924 f32 Always use float 32-bit.
13925
13926 f64 Always use float 64-bit.
13927
13928 block_size, b
13929 Set block size used for reverse IIR processing. If this value is
13930 set to high enough value (higher than impulse response length
13931 truncated when reaches near zero values) filtering will become
13932 linear phase otherwise if not big enough it will just produce nasty
13933 artifacts.
13934
13935 Note that filter delay will be exactly this many samples when set
13936 to non-zero value.
13937
13938 Commands
13939
13940 This filter supports the following commands:
13941
13942 frequency, f
13943 Change highpass frequency. Syntax for the command is : "frequency"
13944
13945 width_type, t
13946 Change highpass width_type. Syntax for the command is :
13947 "width_type"
13948
13949 width, w
13950 Change highpass width. Syntax for the command is : "width"
13951
13952 mix, m
13953 Change highpass mix. Syntax for the command is : "mix"
13954
13955 join
13956 Join multiple input streams into one multi-channel stream.
13957
13958 It accepts the following parameters:
13959
13960 inputs
13961 The number of input streams. It defaults to 2.
13962
13963 channel_layout
13964 The desired output channel layout. It defaults to stereo.
13965
13966 map Map channels from inputs to output. The argument is a '|'-separated
13967 list of mappings, each in the "input_idx.in_channel-out_channel"
13968 form. input_idx is the 0-based index of the input stream.
13969 in_channel can be either the name of the input channel (e.g. FL for
13970 front left) or its index in the specified input stream. out_channel
13971 is the name of the output channel.
13972
13973 The filter will attempt to guess the mappings when they are not
13974 specified explicitly. It does so by first trying to find an unused
13975 matching input channel and if that fails it picks the first unused
13976 input channel.
13977
13978 Join 3 inputs (with properly set channel layouts):
13979
13980 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
13981
13982 Build a 5.1 output from 6 single-channel streams:
13983
13984 ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
13985 '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'
13986 out
13987
13988 ladspa
13989 Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin.
13990
13991 To enable compilation of this filter you need to configure FFmpeg with
13992 "--enable-ladspa".
13993
13994 file, f
13995 Specifies the name of LADSPA plugin library to load. If the
13996 environment variable LADSPA_PATH is defined, the LADSPA plugin is
13997 searched in each one of the directories specified by the colon
13998 separated list in LADSPA_PATH, otherwise in the standard LADSPA
13999 paths, which are in this order: HOME/.ladspa/lib/,
14000 /usr/local/lib/ladspa/, /usr/lib/ladspa/.
14001
14002 plugin, p
14003 Specifies the plugin within the library. Some libraries contain
14004 only one plugin, but others contain many of them. If this is not
14005 set filter will list all available plugins within the specified
14006 library.
14007
14008 controls, c
14009 Set the '|' separated list of controls which are zero or more
14010 floating point values that determine the behavior of the loaded
14011 plugin (for example delay, threshold or gain). Controls need to be
14012 defined using the following syntax:
14013 c0=value0|c1=value1|c2=value2|..., where valuei is the value set on
14014 the i-th control. Alternatively they can be also defined using the
14015 following syntax: value0|value1|value2|..., where valuei is the
14016 value set on the i-th control. If controls is set to "help", all
14017 available controls and their valid ranges are printed.
14018
14019 sample_rate, s
14020 Specify the sample rate, default to 44100. Only used if plugin have
14021 zero inputs.
14022
14023 nb_samples, n
14024 Set the number of samples per channel per each output frame,
14025 default is 1024. Only used if plugin have zero inputs.
14026
14027 duration, d
14028 Set the minimum duration of the sourced audio. See the Time
14029 duration section in the ffmpeg-utils(1) manual for the accepted
14030 syntax. Note that the resulting duration may be greater than the
14031 specified duration, as the generated audio is always cut at the end
14032 of a complete frame. If not specified, or the expressed duration
14033 is negative, the audio is supposed to be generated forever. Only
14034 used if plugin have zero inputs.
14035
14036 latency, l
14037 Enable latency compensation, by default is disabled. Only used if
14038 plugin have inputs.
14039
14040 Examples
14041
14042 • List all available plugins within amp (LADSPA example plugin)
14043 library:
14044
14045 ladspa=file=amp
14046
14047 • List all available controls and their valid ranges for "vcf_notch"
14048 plugin from "VCF" library:
14049
14050 ladspa=f=vcf:p=vcf_notch:c=help
14051
14052 • Simulate low quality audio equipment using "Computer Music Toolkit"
14053 (CMT) plugin library:
14054
14055 ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
14056
14057 • Add reverberation to the audio using TAP-plugins (Tom's Audio
14058 Processing plugins):
14059
14060 ladspa=file=tap_reverb:tap_reverb
14061
14062 • Generate white noise, with 0.2 amplitude:
14063
14064 ladspa=file=cmt:noise_source_white:c=c0=.2
14065
14066 • Generate 20 bpm clicks using plugin "C* Click - Metronome" from the
14067 "C* Audio Plugin Suite" (CAPS) library:
14068
14069 ladspa=file=caps:Click:c=c1=20'
14070
14071 • Apply "C* Eq10X2 - Stereo 10-band equaliser" effect:
14072
14073 ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
14074
14075 • Increase volume by 20dB using fast lookahead limiter from Steve
14076 Harris "SWH Plugins" collection:
14077
14078 ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
14079
14080 • Attenuate low frequencies using Multiband EQ from Steve Harris "SWH
14081 Plugins" collection:
14082
14083 ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
14084
14085 • Reduce stereo image using "Narrower" from the "C* Audio Plugin
14086 Suite" (CAPS) library:
14087
14088 ladspa=caps:Narrower
14089
14090 • Another white noise, now using "C* Audio Plugin Suite" (CAPS)
14091 library:
14092
14093 ladspa=caps:White:.2
14094
14095 • Some fractal noise, using "C* Audio Plugin Suite" (CAPS) library:
14096
14097 ladspa=caps:Fractal:c=c1=1
14098
14099 • Dynamic volume normalization using "VLevel" plugin:
14100
14101 ladspa=vlevel-ladspa:vlevel_mono
14102
14103 Commands
14104
14105 This filter supports the following commands:
14106
14107 cN Modify the N-th control value.
14108
14109 If the specified value is not valid, it is ignored and prior one is
14110 kept.
14111
14112 loudnorm
14113 EBU R128 loudness normalization. Includes both dynamic and linear
14114 normalization modes. Support for both single pass (livestreams, files)
14115 and double pass (files) modes. This algorithm can target IL, LRA, and
14116 maximum true peak. In dynamic mode, to accurately detect true peaks,
14117 the audio stream will be upsampled to 192 kHz. Use the "-ar" option or
14118 "aresample" filter to explicitly set an output sample rate.
14119
14120 The filter accepts the following options:
14121
14122 I, i
14123 Set integrated loudness target. Range is -70.0 - -5.0. Default
14124 value is -24.0.
14125
14126 LRA, lra
14127 Set loudness range target. Range is 1.0 - 50.0. Default value is
14128 7.0.
14129
14130 TP, tp
14131 Set maximum true peak. Range is -9.0 - +0.0. Default value is
14132 -2.0.
14133
14134 measured_I, measured_i
14135 Measured IL of input file. Range is -99.0 - +0.0.
14136
14137 measured_LRA, measured_lra
14138 Measured LRA of input file. Range is 0.0 - 99.0.
14139
14140 measured_TP, measured_tp
14141 Measured true peak of input file. Range is -99.0 - +99.0.
14142
14143 measured_thresh
14144 Measured threshold of input file. Range is -99.0 - +0.0.
14145
14146 offset
14147 Set offset gain. Gain is applied before the true-peak limiter.
14148 Range is -99.0 - +99.0. Default is +0.0.
14149
14150 linear
14151 Normalize by linearly scaling the source audio. "measured_I",
14152 "measured_LRA", "measured_TP", and "measured_thresh" must all be
14153 specified. Target LRA shouldn't be lower than source LRA and the
14154 change in integrated loudness shouldn't result in a true peak which
14155 exceeds the target TP. If any of these conditions aren't met,
14156 normalization mode will revert to dynamic. Options are "true" or
14157 "false". Default is "true".
14158
14159 dual_mono
14160 Treat mono input files as "dual-mono". If a mono file is intended
14161 for playback on a stereo system, its EBU R128 measurement will be
14162 perceptually incorrect. If set to "true", this option will
14163 compensate for this effect. Multi-channel input files are not
14164 affected by this option. Options are true or false. Default is
14165 false.
14166
14167 print_format
14168 Set print format for stats. Options are summary, json, or none.
14169 Default value is none.
14170
14171 lowpass
14172 Apply a low-pass filter with 3dB point frequency. The filter can be
14173 either single-pole or double-pole (the default). The filter roll off
14174 at 6dB per pole per octave (20dB per pole per decade).
14175
14176 The filter accepts the following options:
14177
14178 frequency, f
14179 Set frequency in Hz. Default is 500.
14180
14181 poles, p
14182 Set number of poles. Default is 2.
14183
14184 width_type, t
14185 Set method to specify band-width of filter.
14186
14187 h Hz
14188
14189 q Q-Factor
14190
14191 o octave
14192
14193 s slope
14194
14195 k kHz
14196
14197 width, w
14198 Specify the band-width of a filter in width_type units. Applies
14199 only to double-pole filter. The default is 0.707q and gives a
14200 Butterworth response.
14201
14202 mix, m
14203 How much to use filtered signal in output. Default is 1. Range is
14204 between 0 and 1.
14205
14206 channels, c
14207 Specify which channels to filter, by default all available are
14208 filtered.
14209
14210 normalize, n
14211 Normalize biquad coefficients, by default is disabled. Enabling it
14212 will normalize magnitude response at DC to 0dB.
14213
14214 transform, a
14215 Set transform type of IIR filter.
14216
14217 di
14218 dii
14219 tdi
14220 tdii
14221 latt
14222 svf
14223 zdf
14224 precision, r
14225 Set precison of filtering.
14226
14227 auto
14228 Pick automatic sample format depending on surround filters.
14229
14230 s16 Always use signed 16-bit.
14231
14232 s32 Always use signed 32-bit.
14233
14234 f32 Always use float 32-bit.
14235
14236 f64 Always use float 64-bit.
14237
14238 block_size, b
14239 Set block size used for reverse IIR processing. If this value is
14240 set to high enough value (higher than impulse response length
14241 truncated when reaches near zero values) filtering will become
14242 linear phase otherwise if not big enough it will just produce nasty
14243 artifacts.
14244
14245 Note that filter delay will be exactly this many samples when set
14246 to non-zero value.
14247
14248 Examples
14249
14250 • Lowpass only LFE channel, it LFE is not present it does nothing:
14251
14252 lowpass=c=LFE
14253
14254 Commands
14255
14256 This filter supports the following commands:
14257
14258 frequency, f
14259 Change lowpass frequency. Syntax for the command is : "frequency"
14260
14261 width_type, t
14262 Change lowpass width_type. Syntax for the command is :
14263 "width_type"
14264
14265 width, w
14266 Change lowpass width. Syntax for the command is : "width"
14267
14268 mix, m
14269 Change lowpass mix. Syntax for the command is : "mix"
14270
14271 lv2
14272 Load a LV2 (LADSPA Version 2) plugin.
14273
14274 To enable compilation of this filter you need to configure FFmpeg with
14275 "--enable-lv2".
14276
14277 plugin, p
14278 Specifies the plugin URI. You may need to escape ':'.
14279
14280 controls, c
14281 Set the '|' separated list of controls which are zero or more
14282 floating point values that determine the behavior of the loaded
14283 plugin (for example delay, threshold or gain). If controls is set
14284 to "help", all available controls and their valid ranges are
14285 printed.
14286
14287 sample_rate, s
14288 Specify the sample rate, default to 44100. Only used if plugin have
14289 zero inputs.
14290
14291 nb_samples, n
14292 Set the number of samples per channel per each output frame,
14293 default is 1024. Only used if plugin have zero inputs.
14294
14295 duration, d
14296 Set the minimum duration of the sourced audio. See the Time
14297 duration section in the ffmpeg-utils(1) manual for the accepted
14298 syntax. Note that the resulting duration may be greater than the
14299 specified duration, as the generated audio is always cut at the end
14300 of a complete frame. If not specified, or the expressed duration
14301 is negative, the audio is supposed to be generated forever. Only
14302 used if plugin have zero inputs.
14303
14304 Examples
14305
14306 • Apply bass enhancer plugin from Calf:
14307
14308 lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
14309
14310 • Apply vinyl plugin from Calf:
14311
14312 lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
14313
14314 • Apply bit crusher plugin from ArtyFX:
14315
14316 lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
14317
14318 Commands
14319
14320 This filter supports all options that are exported by plugin as
14321 commands.
14322
14323 mcompand
14324 Multiband Compress or expand the audio's dynamic range.
14325
14326 The input audio is divided into bands using 4th order Linkwitz-Riley
14327 IIRs. This is akin to the crossover of a loudspeaker, and results in
14328 flat frequency response when absent compander action.
14329
14330 It accepts the following parameters:
14331
14332 args
14333 This option syntax is: attack,decay,[attack,decay..] soft-knee
14334 points crossover_frequency [delay [initial_volume [gain]]] |
14335 attack,decay ... For explanation of each item refer to compand
14336 filter documentation.
14337
14338 pan
14339 Mix channels with specific gain levels. The filter accepts the output
14340 channel layout followed by a set of channels definitions.
14341
14342 This filter is also designed to efficiently remap the channels of an
14343 audio stream.
14344
14345 The filter accepts parameters of the form: "l|outdef|outdef|..."
14346
14347 l output channel layout or number of channels
14348
14349 outdef
14350 output channel specification, of the form:
14351 "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
14352
14353 out_name
14354 output channel to define, either a channel name (FL, FR, etc.) or a
14355 channel number (c0, c1, etc.)
14356
14357 gain
14358 multiplicative coefficient for the channel, 1 leaving the volume
14359 unchanged
14360
14361 in_name
14362 input channel to use, see out_name for details; it is not possible
14363 to mix named and numbered input channels
14364
14365 If the `=' in a channel specification is replaced by `<', then the
14366 gains for that specification will be renormalized so that the total is
14367 1, thus avoiding clipping noise.
14368
14369 Mixing examples
14370
14371 For example, if you want to down-mix from stereo to mono, but with a
14372 bigger factor for the left channel:
14373
14374 pan=1c|c0=0.9*c0+0.1*c1
14375
14376 A customized down-mix to stereo that works automatically for 3-, 4-, 5-
14377 and 7-channels surround:
14378
14379 pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR
14380
14381 Note that ffmpeg integrates a default down-mix (and up-mix) system that
14382 should be preferred (see "-ac" option) unless you have very specific
14383 needs.
14384
14385 Remapping examples
14386
14387 The channel remapping will be effective if, and only if:
14388
14389 *<gain coefficients are zeroes or ones,>
14390 *<only one input per channel output,>
14391
14392 If all these conditions are satisfied, the filter will notify the user
14393 ("Pure channel mapping detected"), and use an optimized and lossless
14394 method to do the remapping.
14395
14396 For example, if you have a 5.1 source and want a stereo audio stream by
14397 dropping the extra channels:
14398
14399 pan="stereo| c0=FL | c1=FR"
14400
14401 Given the same source, you can also switch front left and front right
14402 channels and keep the input channel layout:
14403
14404 pan="5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5"
14405
14406 If the input is a stereo audio stream, you can mute the front left
14407 channel (and still keep the stereo channel layout) with:
14408
14409 pan="stereo|c1=c1"
14410
14411 Still with a stereo audio stream input, you can copy the right channel
14412 in both front left and right:
14413
14414 pan="stereo| c0=FR | c1=FR"
14415
14416 replaygain
14417 ReplayGain scanner filter. This filter takes an audio stream as an
14418 input and outputs it unchanged. At end of filtering it displays
14419 "track_gain" and "track_peak".
14420
14421 resample
14422 Convert the audio sample format, sample rate and channel layout. It is
14423 not meant to be used directly.
14424
14425 rubberband
14426 Apply time-stretching and pitch-shifting with librubberband.
14427
14428 To enable compilation of this filter, you need to configure FFmpeg with
14429 "--enable-librubberband".
14430
14431 The filter accepts the following options:
14432
14433 tempo
14434 Set tempo scale factor.
14435
14436 pitch
14437 Set pitch scale factor.
14438
14439 transients
14440 Set transients detector. Possible values are:
14441
14442 crisp
14443 mixed
14444 smooth
14445 detector
14446 Set detector. Possible values are:
14447
14448 compound
14449 percussive
14450 soft
14451 phase
14452 Set phase. Possible values are:
14453
14454 laminar
14455 independent
14456 window
14457 Set processing window size. Possible values are:
14458
14459 standard
14460 short
14461 long
14462 smoothing
14463 Set smoothing. Possible values are:
14464
14465 off
14466 on
14467 formant
14468 Enable formant preservation when shift pitching. Possible values
14469 are:
14470
14471 shifted
14472 preserved
14473 pitchq
14474 Set pitch quality. Possible values are:
14475
14476 quality
14477 speed
14478 consistency
14479 channels
14480 Set channels. Possible values are:
14481
14482 apart
14483 together
14484
14485 Commands
14486
14487 This filter supports the following commands:
14488
14489 tempo
14490 Change filter tempo scale factor. Syntax for the command is :
14491 "tempo"
14492
14493 pitch
14494 Change filter pitch scale factor. Syntax for the command is :
14495 "pitch"
14496
14497 sidechaincompress
14498 This filter acts like normal compressor but has the ability to compress
14499 detected signal using second input signal. It needs two input streams
14500 and returns one output stream. First input stream will be processed
14501 depending on second stream signal. The filtered signal then can be
14502 filtered with other filters in later stages of processing. See pan and
14503 amerge filter.
14504
14505 The filter accepts the following options:
14506
14507 level_in
14508 Set input gain. Default is 1. Range is between 0.015625 and 64.
14509
14510 mode
14511 Set mode of compressor operation. Can be "upward" or "downward".
14512 Default is "downward".
14513
14514 threshold
14515 If a signal of second stream raises above this level it will affect
14516 the gain reduction of first stream. By default is 0.125. Range is
14517 between 0.00097563 and 1.
14518
14519 ratio
14520 Set a ratio about which the signal is reduced. 1:2 means that if
14521 the level raised 4dB above the threshold, it will be only 2dB above
14522 after the reduction. Default is 2. Range is between 1 and 20.
14523
14524 attack
14525 Amount of milliseconds the signal has to rise above the threshold
14526 before gain reduction starts. Default is 20. Range is between 0.01
14527 and 2000.
14528
14529 release
14530 Amount of milliseconds the signal has to fall below the threshold
14531 before reduction is decreased again. Default is 250. Range is
14532 between 0.01 and 9000.
14533
14534 makeup
14535 Set the amount by how much signal will be amplified after
14536 processing. Default is 1. Range is from 1 to 64.
14537
14538 knee
14539 Curve the sharp knee around the threshold to enter gain reduction
14540 more softly. Default is 2.82843. Range is between 1 and 8.
14541
14542 link
14543 Choose if the "average" level between all channels of side-chain
14544 stream or the louder("maximum") channel of side-chain stream
14545 affects the reduction. Default is "average".
14546
14547 detection
14548 Should the exact signal be taken in case of "peak" or an RMS one in
14549 case of "rms". Default is "rms" which is mainly smoother.
14550
14551 level_sc
14552 Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
14553
14554 mix How much to use compressed signal in output. Default is 1. Range
14555 is between 0 and 1.
14556
14557 Commands
14558
14559 This filter supports the all above options as commands.
14560
14561 Examples
14562
14563 • Full ffmpeg example taking 2 audio inputs, 1st input to be
14564 compressed depending on the signal of 2nd input and later
14565 compressed signal to be merged with 2nd input:
14566
14567 ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
14568
14569 sidechaingate
14570 A sidechain gate acts like a normal (wideband) gate but has the ability
14571 to filter the detected signal before sending it to the gain reduction
14572 stage. Normally a gate uses the full range signal to detect a level
14573 above the threshold. For example: If you cut all lower frequencies
14574 from your sidechain signal the gate will decrease the volume of your
14575 track only if not enough highs appear. With this technique you are able
14576 to reduce the resonation of a natural drum or remove "rumbling" of
14577 muted strokes from a heavily distorted guitar. It needs two input
14578 streams and returns one output stream. First input stream will be
14579 processed depending on second stream signal.
14580
14581 The filter accepts the following options:
14582
14583 level_in
14584 Set input level before filtering. Default is 1. Allowed range is
14585 from 0.015625 to 64.
14586
14587 mode
14588 Set the mode of operation. Can be "upward" or "downward". Default
14589 is "downward". If set to "upward" mode, higher parts of signal will
14590 be amplified, expanding dynamic range in upward direction.
14591 Otherwise, in case of "downward" lower parts of signal will be
14592 reduced.
14593
14594 range
14595 Set the level of gain reduction when the signal is below the
14596 threshold. Default is 0.06125. Allowed range is from 0 to 1.
14597 Setting this to 0 disables reduction and then filter behaves like
14598 expander.
14599
14600 threshold
14601 If a signal rises above this level the gain reduction is released.
14602 Default is 0.125. Allowed range is from 0 to 1.
14603
14604 ratio
14605 Set a ratio about which the signal is reduced. Default is 2.
14606 Allowed range is from 1 to 9000.
14607
14608 attack
14609 Amount of milliseconds the signal has to rise above the threshold
14610 before gain reduction stops. Default is 20 milliseconds. Allowed
14611 range is from 0.01 to 9000.
14612
14613 release
14614 Amount of milliseconds the signal has to fall below the threshold
14615 before the reduction is increased again. Default is 250
14616 milliseconds. Allowed range is from 0.01 to 9000.
14617
14618 makeup
14619 Set amount of amplification of signal after processing. Default is
14620 1. Allowed range is from 1 to 64.
14621
14622 knee
14623 Curve the sharp knee around the threshold to enter gain reduction
14624 more softly. Default is 2.828427125. Allowed range is from 1 to 8.
14625
14626 detection
14627 Choose if exact signal should be taken for detection or an RMS like
14628 one. Default is rms. Can be peak or rms.
14629
14630 link
14631 Choose if the average level between all channels or the louder
14632 channel affects the reduction. Default is average. Can be average
14633 or maximum.
14634
14635 level_sc
14636 Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
14637
14638 Commands
14639
14640 This filter supports the all above options as commands.
14641
14642 silencedetect
14643 Detect silence in an audio stream.
14644
14645 This filter logs a message when it detects that the input audio volume
14646 is less or equal to a noise tolerance value for a duration greater or
14647 equal to the minimum detected noise duration.
14648
14649 The printed times and duration are expressed in seconds. The
14650 "lavfi.silence_start" or "lavfi.silence_start.X" metadata key is set on
14651 the first frame whose timestamp equals or exceeds the detection
14652 duration and it contains the timestamp of the first frame of the
14653 silence.
14654
14655 The "lavfi.silence_duration" or "lavfi.silence_duration.X" and
14656 "lavfi.silence_end" or "lavfi.silence_end.X" metadata keys are set on
14657 the first frame after the silence. If mono is enabled, and each channel
14658 is evaluated separately, the ".X" suffixed keys are used, and "X"
14659 corresponds to the channel number.
14660
14661 The filter accepts the following options:
14662
14663 noise, n
14664 Set noise tolerance. Can be specified in dB (in case "dB" is
14665 appended to the specified value) or amplitude ratio. Default is
14666 -60dB, or 0.001.
14667
14668 duration, d
14669 Set silence duration until notification (default is 2 seconds). See
14670 the Time duration section in the ffmpeg-utils(1) manual for the
14671 accepted syntax.
14672
14673 mono, m
14674 Process each channel separately, instead of combined. By default is
14675 disabled.
14676
14677 Examples
14678
14679 • Detect 5 seconds of silence with -50dB noise tolerance:
14680
14681 silencedetect=n=-50dB:d=5
14682
14683 • Complete example with ffmpeg to detect silence with 0.0001 noise
14684 tolerance in silence.mp3:
14685
14686 ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
14687
14688 silenceremove
14689 Remove silence from the beginning, middle or end of the audio.
14690
14691 The filter accepts the following options:
14692
14693 start_periods
14694 This value is used to indicate if audio should be trimmed at
14695 beginning of the audio. A value of zero indicates no silence should
14696 be trimmed from the beginning. When specifying a non-zero value, it
14697 trims audio up until it finds non-silence. Normally, when trimming
14698 silence from beginning of audio the start_periods will be 1 but it
14699 can be increased to higher values to trim all audio up to specific
14700 count of non-silence periods. Default value is 0.
14701
14702 start_duration
14703 Specify the amount of time that non-silence must be detected before
14704 it stops trimming audio. By increasing the duration, bursts of
14705 noises can be treated as silence and trimmed off. Default value is
14706 0.
14707
14708 start_threshold
14709 This indicates what sample value should be treated as silence. For
14710 digital audio, a value of 0 may be fine but for audio recorded from
14711 analog, you may wish to increase the value to account for
14712 background noise. Can be specified in dB (in case "dB" is appended
14713 to the specified value) or amplitude ratio. Default value is 0.
14714
14715 start_silence
14716 Specify max duration of silence at beginning that will be kept
14717 after trimming. Default is 0, which is equal to trimming all
14718 samples detected as silence.
14719
14720 start_mode
14721 Specify mode of detection of silence end in start of multi-channel
14722 audio. Can be any or all. Default is any. With any, any sample
14723 that is detected as non-silence will cause stopped trimming of
14724 silence. With all, only if all channels are detected as non-
14725 silence will cause stopped trimming of silence.
14726
14727 stop_periods
14728 Set the count for trimming silence from the end of audio. To
14729 remove silence from the middle of a file, specify a stop_periods
14730 that is negative. This value is then treated as a positive value
14731 and is used to indicate the effect should restart processing as
14732 specified by start_periods, making it suitable for removing periods
14733 of silence in the middle of the audio. Default value is 0.
14734
14735 stop_duration
14736 Specify a duration of silence that must exist before audio is not
14737 copied any more. By specifying a higher duration, silence that is
14738 wanted can be left in the audio. Default value is 0.
14739
14740 stop_threshold
14741 This is the same as start_threshold but for trimming silence from
14742 the end of audio. Can be specified in dB (in case "dB" is appended
14743 to the specified value) or amplitude ratio. Default value is 0.
14744
14745 stop_silence
14746 Specify max duration of silence at end that will be kept after
14747 trimming. Default is 0, which is equal to trimming all samples
14748 detected as silence.
14749
14750 stop_mode
14751 Specify mode of detection of silence start in end of multi-channel
14752 audio. Can be any or all. Default is any. With any, any sample
14753 that is detected as non-silence will cause stopped trimming of
14754 silence. With all, only if all channels are detected as non-
14755 silence will cause stopped trimming of silence.
14756
14757 detection
14758 Set how is silence detected. Can be "rms" or "peak". Second is
14759 faster and works better with digital silence which is exactly 0.
14760 Default value is "rms".
14761
14762 window
14763 Set duration in number of seconds used to calculate size of window
14764 in number of samples for detecting silence. Default value is 0.02.
14765 Allowed range is from 0 to 10.
14766
14767 Examples
14768
14769 • The following example shows how this filter can be used to start a
14770 recording that does not contain the delay at the start which
14771 usually occurs between pressing the record button and the start of
14772 the performance:
14773
14774 silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
14775
14776 • Trim all silence encountered from beginning to end where there is
14777 more than 1 second of silence in audio:
14778
14779 silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
14780
14781 • Trim all digital silence samples, using peak detection, from
14782 beginning to end where there is more than 0 samples of digital
14783 silence in audio and digital silence is detected in all channels at
14784 same positions in stream:
14785
14786 silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
14787
14788 sofalizer
14789 SOFAlizer uses head-related transfer functions (HRTFs) to create
14790 virtual loudspeakers around the user for binaural listening via
14791 headphones (audio formats up to 9 channels supported). The HRTFs are
14792 stored in SOFA files (see <http://www.sofacoustics.org/> for a
14793 database). SOFAlizer is developed at the Acoustics Research Institute
14794 (ARI) of the Austrian Academy of Sciences.
14795
14796 To enable compilation of this filter you need to configure FFmpeg with
14797 "--enable-libmysofa".
14798
14799 The filter accepts the following options:
14800
14801 sofa
14802 Set the SOFA file used for rendering.
14803
14804 gain
14805 Set gain applied to audio. Value is in dB. Default is 0.
14806
14807 rotation
14808 Set rotation of virtual loudspeakers in deg. Default is 0.
14809
14810 elevation
14811 Set elevation of virtual speakers in deg. Default is 0.
14812
14813 radius
14814 Set distance in meters between loudspeakers and the listener with
14815 near-field HRTFs. Default is 1.
14816
14817 type
14818 Set processing type. Can be time or freq. time is processing audio
14819 in time domain which is slow. freq is processing audio in
14820 frequency domain which is fast. Default is freq.
14821
14822 speakers
14823 Set custom positions of virtual loudspeakers. Syntax for this
14824 option is: <CH> <AZIM> <ELEV>[|<CH> <AZIM> <ELEV>|...]. Each
14825 virtual loudspeaker is described with short channel name following
14826 with azimuth and elevation in degrees. Each virtual loudspeaker
14827 description is separated by '|'. For example to override front
14828 left and front right channel positions use: 'speakers=FL 45 15|FR
14829 345 15'. Descriptions with unrecognised channel names are ignored.
14830
14831 lfegain
14832 Set custom gain for LFE channels. Value is in dB. Default is 0.
14833
14834 framesize
14835 Set custom frame size in number of samples. Default is 1024.
14836 Allowed range is from 1024 to 96000. Only used if option type is
14837 set to freq.
14838
14839 normalize
14840 Should all IRs be normalized upon importing SOFA file. By default
14841 is enabled.
14842
14843 interpolate
14844 Should nearest IRs be interpolated with neighbor IRs if exact
14845 position does not match. By default is disabled.
14846
14847 minphase
14848 Minphase all IRs upon loading of SOFA file. By default is disabled.
14849
14850 anglestep
14851 Set neighbor search angle step. Only used if option interpolate is
14852 enabled.
14853
14854 radstep
14855 Set neighbor search radius step. Only used if option interpolate is
14856 enabled.
14857
14858 Examples
14859
14860 • Using ClubFritz6 sofa file:
14861
14862 sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
14863
14864 • Using ClubFritz12 sofa file and bigger radius with small rotation:
14865
14866 sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
14867
14868 • Similar as above but with custom speaker positions for front left,
14869 front right, back left and back right and also with custom gain:
14870
14871 "sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28"
14872
14873 speechnorm
14874 Speech Normalizer.
14875
14876 This filter expands or compresses each half-cycle of audio samples
14877 (local set of samples all above or all below zero and between two
14878 nearest zero crossings) depending on threshold value, so audio reaches
14879 target peak value under conditions controlled by below options.
14880
14881 The filter accepts the following options:
14882
14883 peak, p
14884 Set the expansion target peak value. This specifies the highest
14885 allowed absolute amplitude level for the normalized audio input.
14886 Default value is 0.95. Allowed range is from 0.0 to 1.0.
14887
14888 expansion, e
14889 Set the maximum expansion factor. Allowed range is from 1.0 to
14890 50.0. Default value is 2.0. This option controls maximum local
14891 half-cycle of samples expansion. The maximum expansion would be
14892 such that local peak value reaches target peak value but never to
14893 surpass it and that ratio between new and previous peak value does
14894 not surpass this option value.
14895
14896 compression, c
14897 Set the maximum compression factor. Allowed range is from 1.0 to
14898 50.0. Default value is 2.0. This option controls maximum local
14899 half-cycle of samples compression. This option is used only if
14900 threshold option is set to value greater than 0.0, then in such
14901 cases when local peak is lower or same as value set by threshold
14902 all samples belonging to that peak's half-cycle will be compressed
14903 by current compression factor.
14904
14905 threshold, t
14906 Set the threshold value. Default value is 0.0. Allowed range is
14907 from 0.0 to 1.0. This option specifies which half-cycles of
14908 samples will be compressed and which will be expanded. Any half-
14909 cycle samples with their local peak value below or same as this
14910 option value will be compressed by current compression factor,
14911 otherwise, if greater than threshold value they will be expanded
14912 with expansion factor so that it could reach peak target value but
14913 never surpass it.
14914
14915 raise, r
14916 Set the expansion raising amount per each half-cycle of samples.
14917 Default value is 0.001. Allowed range is from 0.0 to 1.0. This
14918 controls how fast expansion factor is raised per each new half-
14919 cycle until it reaches expansion value. Setting this options too
14920 high may lead to distortions.
14921
14922 fall, f
14923 Set the compression raising amount per each half-cycle of samples.
14924 Default value is 0.001. Allowed range is from 0.0 to 1.0. This
14925 controls how fast compression factor is raised per each new half-
14926 cycle until it reaches compression value.
14927
14928 channels, h
14929 Specify which channels to filter, by default all available channels
14930 are filtered.
14931
14932 invert, i
14933 Enable inverted filtering, by default is disabled. This inverts
14934 interpretation of threshold option. When enabled any half-cycle of
14935 samples with their local peak value below or same as threshold
14936 option will be expanded otherwise it will be compressed.
14937
14938 link, l
14939 Link channels when calculating gain applied to each filtered
14940 channel sample, by default is disabled. When disabled each
14941 filtered channel gain calculation is independent, otherwise when
14942 this option is enabled the minimum of all possible gains for each
14943 filtered channel is used.
14944
14945 rms, m
14946 Set the expansion target RMS value. This specifies the highest
14947 allowed RMS level for the normalized audio input. Default value is
14948 0.0, thus disabled. Allowed range is from 0.0 to 1.0.
14949
14950 Commands
14951
14952 This filter supports the all above options as commands.
14953
14954 Examples
14955
14956 • Weak and slow amplification:
14957
14958 speechnorm=e=3:r=0.00001:l=1
14959
14960 • Moderate and slow amplification:
14961
14962 speechnorm=e=6.25:r=0.00001:l=1
14963
14964 • Strong and fast amplification:
14965
14966 speechnorm=e=12.5:r=0.0001:l=1
14967
14968 • Very strong and fast amplification:
14969
14970 speechnorm=e=25:r=0.0001:l=1
14971
14972 • Extreme and fast amplification:
14973
14974 speechnorm=e=50:r=0.0001:l=1
14975
14976 stereotools
14977 This filter has some handy utilities to manage stereo signals, for
14978 converting M/S stereo recordings to L/R signal while having control
14979 over the parameters or spreading the stereo image of master track.
14980
14981 The filter accepts the following options:
14982
14983 level_in
14984 Set input level before filtering for both channels. Defaults is 1.
14985 Allowed range is from 0.015625 to 64.
14986
14987 level_out
14988 Set output level after filtering for both channels. Defaults is 1.
14989 Allowed range is from 0.015625 to 64.
14990
14991 balance_in
14992 Set input balance between both channels. Default is 0. Allowed
14993 range is from -1 to 1.
14994
14995 balance_out
14996 Set output balance between both channels. Default is 0. Allowed
14997 range is from -1 to 1.
14998
14999 softclip
15000 Enable softclipping. Results in analog distortion instead of harsh
15001 digital 0dB clipping. Disabled by default.
15002
15003 mutel
15004 Mute the left channel. Disabled by default.
15005
15006 muter
15007 Mute the right channel. Disabled by default.
15008
15009 phasel
15010 Change the phase of the left channel. Disabled by default.
15011
15012 phaser
15013 Change the phase of the right channel. Disabled by default.
15014
15015 mode
15016 Set stereo mode. Available values are:
15017
15018 lr>lr
15019 Left/Right to Left/Right, this is default.
15020
15021 lr>ms
15022 Left/Right to Mid/Side.
15023
15024 ms>lr
15025 Mid/Side to Left/Right.
15026
15027 lr>ll
15028 Left/Right to Left/Left.
15029
15030 lr>rr
15031 Left/Right to Right/Right.
15032
15033 lr>l+r
15034 Left/Right to Left + Right.
15035
15036 lr>rl
15037 Left/Right to Right/Left.
15038
15039 ms>ll
15040 Mid/Side to Left/Left.
15041
15042 ms>rr
15043 Mid/Side to Right/Right.
15044
15045 ms>rl
15046 Mid/Side to Right/Left.
15047
15048 lr>l-r
15049 Left/Right to Left - Right.
15050
15051 slev
15052 Set level of side signal. Default is 1. Allowed range is from
15053 0.015625 to 64.
15054
15055 sbal
15056 Set balance of side signal. Default is 0. Allowed range is from -1
15057 to 1.
15058
15059 mlev
15060 Set level of the middle signal. Default is 1. Allowed range is
15061 from 0.015625 to 64.
15062
15063 mpan
15064 Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
15065
15066 base
15067 Set stereo base between mono and inversed channels. Default is 0.
15068 Allowed range is from -1 to 1.
15069
15070 delay
15071 Set delay in milliseconds how much to delay left from right channel
15072 and vice versa. Default is 0. Allowed range is from -20 to 20.
15073
15074 sclevel
15075 Set S/C level. Default is 1. Allowed range is from 1 to 100.
15076
15077 phase
15078 Set the stereo phase in degrees. Default is 0. Allowed range is
15079 from 0 to 360.
15080
15081 bmode_in, bmode_out
15082 Set balance mode for balance_in/balance_out option.
15083
15084 Can be one of the following:
15085
15086 balance
15087 Classic balance mode. Attenuate one channel at time. Gain is
15088 raised up to 1.
15089
15090 amplitude
15091 Similar as classic mode above but gain is raised up to 2.
15092
15093 power
15094 Equal power distribution, from -6dB to +6dB range.
15095
15096 Commands
15097
15098 This filter supports the all above options as commands.
15099
15100 Examples
15101
15102 • Apply karaoke like effect:
15103
15104 stereotools=mlev=0.015625
15105
15106 • Convert M/S signal to L/R:
15107
15108 "stereotools=mode=ms>lr"
15109
15110 stereowiden
15111 This filter enhance the stereo effect by suppressing signal common to
15112 both channels and by delaying the signal of left into right and vice
15113 versa, thereby widening the stereo effect.
15114
15115 The filter accepts the following options:
15116
15117 delay
15118 Time in milliseconds of the delay of left signal into right and
15119 vice versa. Default is 20 milliseconds.
15120
15121 feedback
15122 Amount of gain in delayed signal into right and vice versa. Gives a
15123 delay effect of left signal in right output and vice versa which
15124 gives widening effect. Default is 0.3.
15125
15126 crossfeed
15127 Cross feed of left into right with inverted phase. This helps in
15128 suppressing the mono. If the value is 1 it will cancel all the
15129 signal common to both channels. Default is 0.3.
15130
15131 drymix
15132 Set level of input signal of original channel. Default is 0.8.
15133
15134 Commands
15135
15136 This filter supports the all above options except "delay" as commands.
15137
15138 superequalizer
15139 Apply 18 band equalizer.
15140
15141 The filter accepts the following options:
15142
15143 1b Set 65Hz band gain.
15144
15145 2b Set 92Hz band gain.
15146
15147 3b Set 131Hz band gain.
15148
15149 4b Set 185Hz band gain.
15150
15151 5b Set 262Hz band gain.
15152
15153 6b Set 370Hz band gain.
15154
15155 7b Set 523Hz band gain.
15156
15157 8b Set 740Hz band gain.
15158
15159 9b Set 1047Hz band gain.
15160
15161 10b Set 1480Hz band gain.
15162
15163 11b Set 2093Hz band gain.
15164
15165 12b Set 2960Hz band gain.
15166
15167 13b Set 4186Hz band gain.
15168
15169 14b Set 5920Hz band gain.
15170
15171 15b Set 8372Hz band gain.
15172
15173 16b Set 11840Hz band gain.
15174
15175 17b Set 16744Hz band gain.
15176
15177 18b Set 20000Hz band gain.
15178
15179 surround
15180 Apply audio surround upmix filter.
15181
15182 This filter allows to produce multichannel output from audio stream.
15183
15184 The filter accepts the following options:
15185
15186 chl_out
15187 Set output channel layout. By default, this is 5.1.
15188
15189 See the Channel Layout section in the ffmpeg-utils(1) manual for
15190 the required syntax.
15191
15192 chl_in
15193 Set input channel layout. By default, this is stereo.
15194
15195 See the Channel Layout section in the ffmpeg-utils(1) manual for
15196 the required syntax.
15197
15198 level_in
15199 Set input volume level. By default, this is 1.
15200
15201 level_out
15202 Set output volume level. By default, this is 1.
15203
15204 lfe Enable LFE channel output if output channel layout has it. By
15205 default, this is enabled.
15206
15207 lfe_low
15208 Set LFE low cut off frequency. By default, this is 128 Hz.
15209
15210 lfe_high
15211 Set LFE high cut off frequency. By default, this is 256 Hz.
15212
15213 lfe_mode
15214 Set LFE mode, can be add or sub. Default is add. In add mode, LFE
15215 channel is created from input audio and added to output. In sub
15216 mode, LFE channel is created from input audio and added to output
15217 but also all non-LFE output channels are subtracted with output LFE
15218 channel.
15219
15220 smooth
15221 Set temporal smoothness strength, used to gradually change factors
15222 when transforming stereo sound in time. Allowed range is from 0.0
15223 to 1.0. Useful to improve output quality with focus option values
15224 greater than 0.0. Default is 0.0. Only values inside this range
15225 and without edges are effective.
15226
15227 angle
15228 Set angle of stereo surround transform, Allowed range is from 0 to
15229 360. Default is 90.
15230
15231 focus
15232 Set focus of stereo surround transform, Allowed range is from -1 to
15233 1. Default is 0.
15234
15235 fc_in
15236 Set front center input volume. By default, this is 1.
15237
15238 fc_out
15239 Set front center output volume. By default, this is 1.
15240
15241 fl_in
15242 Set front left input volume. By default, this is 1.
15243
15244 fl_out
15245 Set front left output volume. By default, this is 1.
15246
15247 fr_in
15248 Set front right input volume. By default, this is 1.
15249
15250 fr_out
15251 Set front right output volume. By default, this is 1.
15252
15253 sl_in
15254 Set side left input volume. By default, this is 1.
15255
15256 sl_out
15257 Set side left output volume. By default, this is 1.
15258
15259 sr_in
15260 Set side right input volume. By default, this is 1.
15261
15262 sr_out
15263 Set side right output volume. By default, this is 1.
15264
15265 bl_in
15266 Set back left input volume. By default, this is 1.
15267
15268 bl_out
15269 Set back left output volume. By default, this is 1.
15270
15271 br_in
15272 Set back right input volume. By default, this is 1.
15273
15274 br_out
15275 Set back right output volume. By default, this is 1.
15276
15277 bc_in
15278 Set back center input volume. By default, this is 1.
15279
15280 bc_out
15281 Set back center output volume. By default, this is 1.
15282
15283 lfe_in
15284 Set LFE input volume. By default, this is 1.
15285
15286 lfe_out
15287 Set LFE output volume. By default, this is 1.
15288
15289 allx
15290 Set spread usage of stereo image across X axis for all channels.
15291 Allowed range is from -1 to 15. By default this value is negative
15292 -1, and thus unused.
15293
15294 ally
15295 Set spread usage of stereo image across Y axis for all channels.
15296 Allowed range is from -1 to 15. By default this value is negative
15297 -1, and thus unused.
15298
15299 fcx, flx, frx, blx, brx, slx, srx, bcx
15300 Set spread usage of stereo image across X axis for each channel.
15301 Allowed range is from 0.06 to 15. By default this value is 0.5.
15302
15303 fcy, fly, fry, bly, bry, sly, sry, bcy
15304 Set spread usage of stereo image across Y axis for each channel.
15305 Allowed range is from 0.06 to 15. By default this value is 0.5.
15306
15307 win_size
15308 Set window size. Allowed range is from 1024 to 65536. Default size
15309 is 4096.
15310
15311 win_func
15312 Set window function.
15313
15314 It accepts the following values:
15315
15316 rect
15317 bartlett
15318 hann, hanning
15319 hamming
15320 blackman
15321 welch
15322 flattop
15323 bharris
15324 bnuttall
15325 bhann
15326 sine
15327 nuttall
15328 lanczos
15329 gauss
15330 tukey
15331 dolph
15332 cauchy
15333 parzen
15334 poisson
15335 bohman
15336 kaiser
15337
15338 Default is "hann".
15339
15340 overlap
15341 Set window overlap. If set to 1, the recommended overlap for
15342 selected window function will be picked. Default is 0.5.
15343
15344 tiltshelf
15345 Boost or cut the lower frequencies and cut or boost higher frequencies
15346 of the audio using a two-pole shelving filter with a response similar
15347 to that of a standard hi-fi's tone-controls. This is also known as
15348 shelving equalisation (EQ).
15349
15350 The filter accepts the following options:
15351
15352 gain, g
15353 Give the gain at 0 Hz. Its useful range is about -20 (for a large
15354 cut) to +20 (for a large boost). Beware of clipping when using a
15355 positive gain.
15356
15357 frequency, f
15358 Set the filter's central frequency and so can be used to extend or
15359 reduce the frequency range to be boosted or cut. The default value
15360 is 3000 Hz.
15361
15362 width_type, t
15363 Set method to specify band-width of filter.
15364
15365 h Hz
15366
15367 q Q-Factor
15368
15369 o octave
15370
15371 s slope
15372
15373 k kHz
15374
15375 width, w
15376 Determine how steep is the filter's shelf transition.
15377
15378 poles, p
15379 Set number of poles. Default is 2.
15380
15381 mix, m
15382 How much to use filtered signal in output. Default is 1. Range is
15383 between 0 and 1.
15384
15385 channels, c
15386 Specify which channels to filter, by default all available are
15387 filtered.
15388
15389 normalize, n
15390 Normalize biquad coefficients, by default is disabled. Enabling it
15391 will normalize magnitude response at DC to 0dB.
15392
15393 transform, a
15394 Set transform type of IIR filter.
15395
15396 di
15397 dii
15398 tdi
15399 tdii
15400 latt
15401 svf
15402 zdf
15403 precision, r
15404 Set precison of filtering.
15405
15406 auto
15407 Pick automatic sample format depending on surround filters.
15408
15409 s16 Always use signed 16-bit.
15410
15411 s32 Always use signed 32-bit.
15412
15413 f32 Always use float 32-bit.
15414
15415 f64 Always use float 64-bit.
15416
15417 block_size, b
15418 Set block size used for reverse IIR processing. If this value is
15419 set to high enough value (higher than impulse response length
15420 truncated when reaches near zero values) filtering will become
15421 linear phase otherwise if not big enough it will just produce nasty
15422 artifacts.
15423
15424 Note that filter delay will be exactly this many samples when set
15425 to non-zero value.
15426
15427 Commands
15428
15429 This filter supports some options as commands.
15430
15431 treble, highshelf
15432 Boost or cut treble (upper) frequencies of the audio using a two-pole
15433 shelving filter with a response similar to that of a standard hi-fi's
15434 tone-controls. This is also known as shelving equalisation (EQ).
15435
15436 The filter accepts the following options:
15437
15438 gain, g
15439 Give the gain at whichever is the lower of ~22 kHz and the Nyquist
15440 frequency. Its useful range is about -20 (for a large cut) to +20
15441 (for a large boost). Beware of clipping when using a positive gain.
15442
15443 frequency, f
15444 Set the filter's central frequency and so can be used to extend or
15445 reduce the frequency range to be boosted or cut. The default value
15446 is 3000 Hz.
15447
15448 width_type, t
15449 Set method to specify band-width of filter.
15450
15451 h Hz
15452
15453 q Q-Factor
15454
15455 o octave
15456
15457 s slope
15458
15459 k kHz
15460
15461 width, w
15462 Determine how steep is the filter's shelf transition.
15463
15464 poles, p
15465 Set number of poles. Default is 2.
15466
15467 mix, m
15468 How much to use filtered signal in output. Default is 1. Range is
15469 between 0 and 1.
15470
15471 channels, c
15472 Specify which channels to filter, by default all available are
15473 filtered.
15474
15475 normalize, n
15476 Normalize biquad coefficients, by default is disabled. Enabling it
15477 will normalize magnitude response at DC to 0dB.
15478
15479 transform, a
15480 Set transform type of IIR filter.
15481
15482 di
15483 dii
15484 tdi
15485 tdii
15486 latt
15487 svf
15488 zdf
15489 precision, r
15490 Set precison of filtering.
15491
15492 auto
15493 Pick automatic sample format depending on surround filters.
15494
15495 s16 Always use signed 16-bit.
15496
15497 s32 Always use signed 32-bit.
15498
15499 f32 Always use float 32-bit.
15500
15501 f64 Always use float 64-bit.
15502
15503 block_size, b
15504 Set block size used for reverse IIR processing. If this value is
15505 set to high enough value (higher than impulse response length
15506 truncated when reaches near zero values) filtering will become
15507 linear phase otherwise if not big enough it will just produce nasty
15508 artifacts.
15509
15510 Note that filter delay will be exactly this many samples when set
15511 to non-zero value.
15512
15513 Commands
15514
15515 This filter supports the following commands:
15516
15517 frequency, f
15518 Change treble frequency. Syntax for the command is : "frequency"
15519
15520 width_type, t
15521 Change treble width_type. Syntax for the command is : "width_type"
15522
15523 width, w
15524 Change treble width. Syntax for the command is : "width"
15525
15526 gain, g
15527 Change treble gain. Syntax for the command is : "gain"
15528
15529 mix, m
15530 Change treble mix. Syntax for the command is : "mix"
15531
15532 tremolo
15533 Sinusoidal amplitude modulation.
15534
15535 The filter accepts the following options:
15536
15537 f Modulation frequency in Hertz. Modulation frequencies in the
15538 subharmonic range (20 Hz or lower) will result in a tremolo effect.
15539 This filter may also be used as a ring modulator by specifying a
15540 modulation frequency higher than 20 Hz. Range is 0.1 - 20000.0.
15541 Default value is 5.0 Hz.
15542
15543 d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default
15544 value is 0.5.
15545
15546 vibrato
15547 Sinusoidal phase modulation.
15548
15549 The filter accepts the following options:
15550
15551 f Modulation frequency in Hertz. Range is 0.1 - 20000.0. Default
15552 value is 5.0 Hz.
15553
15554 d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default
15555 value is 0.5.
15556
15557 virtualbass
15558 Apply audio Virtual Bass filter.
15559
15560 This filter accepts stereo input and produce stereo with LFE (2.1)
15561 channels output. The newly produced LFE channel have enhanced virtual
15562 bass originally obtained from both stereo channels. This filter
15563 outputs front left and front right channels unchanged as available in
15564 stereo input.
15565
15566 The filter accepts the following options:
15567
15568 cutoff
15569 Set the virtual bass cutoff frequency. Default value is 250 Hz.
15570 Allowed range is from 100 to 500 Hz.
15571
15572 strength
15573 Set the virtual bass strength. Allowed range is from 0.5 to 3.
15574 Default value is 3.
15575
15576 volume
15577 Adjust the input audio volume.
15578
15579 It accepts the following parameters:
15580
15581 volume
15582 Set audio volume expression.
15583
15584 Output values are clipped to the maximum value.
15585
15586 The output audio volume is given by the relation:
15587
15588 <output_volume> = <volume> * <input_volume>
15589
15590 The default value for volume is "1.0".
15591
15592 precision
15593 This parameter represents the mathematical precision.
15594
15595 It determines which input sample formats will be allowed, which
15596 affects the precision of the volume scaling.
15597
15598 fixed
15599 8-bit fixed-point; this limits input sample format to U8, S16,
15600 and S32.
15601
15602 float
15603 32-bit floating-point; this limits input sample format to FLT.
15604 (default)
15605
15606 double
15607 64-bit floating-point; this limits input sample format to DBL.
15608
15609 replaygain
15610 Choose the behaviour on encountering ReplayGain side data in input
15611 frames.
15612
15613 drop
15614 Remove ReplayGain side data, ignoring its contents (the
15615 default).
15616
15617 ignore
15618 Ignore ReplayGain side data, but leave it in the frame.
15619
15620 track
15621 Prefer the track gain, if present.
15622
15623 album
15624 Prefer the album gain, if present.
15625
15626 replaygain_preamp
15627 Pre-amplification gain in dB to apply to the selected replaygain
15628 gain.
15629
15630 Default value for replaygain_preamp is 0.0.
15631
15632 replaygain_noclip
15633 Prevent clipping by limiting the gain applied.
15634
15635 Default value for replaygain_noclip is 1.
15636
15637 eval
15638 Set when the volume expression is evaluated.
15639
15640 It accepts the following values:
15641
15642 once
15643 only evaluate expression once during the filter initialization,
15644 or when the volume command is sent
15645
15646 frame
15647 evaluate expression for each incoming frame
15648
15649 Default value is once.
15650
15651 The volume expression can contain the following parameters.
15652
15653 n frame number (starting at zero)
15654
15655 nb_channels
15656 number of channels
15657
15658 nb_consumed_samples
15659 number of samples consumed by the filter
15660
15661 nb_samples
15662 number of samples in the current frame
15663
15664 pos original frame position in the file
15665
15666 pts frame PTS
15667
15668 sample_rate
15669 sample rate
15670
15671 startpts
15672 PTS at start of stream
15673
15674 startt
15675 time at start of stream
15676
15677 t frame time
15678
15679 tb timestamp timebase
15680
15681 volume
15682 last set volume value
15683
15684 Note that when eval is set to once only the sample_rate and tb
15685 variables are available, all other variables will evaluate to NAN.
15686
15687 Commands
15688
15689 This filter supports the following commands:
15690
15691 volume
15692 Modify the volume expression. The command accepts the same syntax
15693 of the corresponding option.
15694
15695 If the specified expression is not valid, it is kept at its current
15696 value.
15697
15698 Examples
15699
15700 • Halve the input audio volume:
15701
15702 volume=volume=0.5
15703 volume=volume=1/2
15704 volume=volume=-6.0206dB
15705
15706 In all the above example the named key for volume can be omitted,
15707 for example like in:
15708
15709 volume=0.5
15710
15711 • Increase input audio power by 6 decibels using fixed-point
15712 precision:
15713
15714 volume=volume=6dB:precision=fixed
15715
15716 • Fade volume after time 10 with an annihilation period of 5 seconds:
15717
15718 volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
15719
15720 volumedetect
15721 Detect the volume of the input video.
15722
15723 The filter has no parameters. It supports only 16-bit signed integer
15724 samples, so the input will be converted when needed. Statistics about
15725 the volume will be printed in the log when the input stream end is
15726 reached.
15727
15728 In particular it will show the mean volume (root mean square), maximum
15729 volume (on a per-sample basis), and the beginning of a histogram of the
15730 registered volume values (from the maximum value to a cumulated 1/1000
15731 of the samples).
15732
15733 All volumes are in decibels relative to the maximum PCM value.
15734
15735 Examples
15736
15737 Here is an excerpt of the output:
15738
15739 [Parsed_volumedetect_0 0xa23120] mean_volume: -27 dB
15740 [Parsed_volumedetect_0 0xa23120] max_volume: -4 dB
15741 [Parsed_volumedetect_0 0xa23120] histogram_4db: 6
15742 [Parsed_volumedetect_0 0xa23120] histogram_5db: 62
15743 [Parsed_volumedetect_0 0xa23120] histogram_6db: 286
15744 [Parsed_volumedetect_0 0xa23120] histogram_7db: 1042
15745 [Parsed_volumedetect_0 0xa23120] histogram_8db: 2551
15746 [Parsed_volumedetect_0 0xa23120] histogram_9db: 4609
15747 [Parsed_volumedetect_0 0xa23120] histogram_10db: 8409
15748
15749 It means that:
15750
15751 • The mean square energy is approximately -27 dB, or 10^-2.7.
15752
15753 • The largest sample is at -4 dB, or more precisely between -4 dB and
15754 -5 dB.
15755
15756 • There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
15757
15758 In other words, raising the volume by +4 dB does not cause any
15759 clipping, raising it by +5 dB causes clipping for 6 samples, etc.
15760
15762 Below is a description of the currently available audio sources.
15763
15764 abuffer
15765 Buffer audio frames, and make them available to the filter chain.
15766
15767 This source is mainly intended for a programmatic use, in particular
15768 through the interface defined in libavfilter/buffersrc.h.
15769
15770 It accepts the following parameters:
15771
15772 time_base
15773 The timebase which will be used for timestamps of submitted frames.
15774 It must be either a floating-point number or in
15775 numerator/denominator form.
15776
15777 sample_rate
15778 The sample rate of the incoming audio buffers.
15779
15780 sample_fmt
15781 The sample format of the incoming audio buffers. Either a sample
15782 format name or its corresponding integer representation from the
15783 enum AVSampleFormat in libavutil/samplefmt.h
15784
15785 channel_layout
15786 The channel layout of the incoming audio buffers. Either a channel
15787 layout name from channel_layout_map in libavutil/channel_layout.c
15788 or its corresponding integer representation from the AV_CH_LAYOUT_*
15789 macros in libavutil/channel_layout.h
15790
15791 channels
15792 The number of channels of the incoming audio buffers. If both
15793 channels and channel_layout are specified, then they must be
15794 consistent.
15795
15796 Examples
15797
15798 abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
15799
15800 will instruct the source to accept planar 16bit signed stereo at
15801 44100Hz. Since the sample format with name "s16p" corresponds to the
15802 number 6 and the "stereo" channel layout corresponds to the value 0x3,
15803 this is equivalent to:
15804
15805 abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
15806
15807 aevalsrc
15808 Generate an audio signal specified by an expression.
15809
15810 This source accepts in input one or more expressions (one for each
15811 channel), which are evaluated and used to generate a corresponding
15812 audio signal.
15813
15814 This source accepts the following options:
15815
15816 exprs
15817 Set the '|'-separated expressions list for each separate channel.
15818 In case the channel_layout option is not specified, the selected
15819 channel layout depends on the number of provided expressions.
15820 Otherwise the last specified expression is applied to the remaining
15821 output channels.
15822
15823 channel_layout, c
15824 Set the channel layout. The number of channels in the specified
15825 layout must be equal to the number of specified expressions.
15826
15827 duration, d
15828 Set the minimum duration of the sourced audio. See the Time
15829 duration section in the ffmpeg-utils(1) manual for the accepted
15830 syntax. Note that the resulting duration may be greater than the
15831 specified duration, as the generated audio is always cut at the end
15832 of a complete frame.
15833
15834 If not specified, or the expressed duration is negative, the audio
15835 is supposed to be generated forever.
15836
15837 nb_samples, n
15838 Set the number of samples per channel per each output frame,
15839 default to 1024.
15840
15841 sample_rate, s
15842 Specify the sample rate, default to 44100.
15843
15844 Each expression in exprs can contain the following constants:
15845
15846 n number of the evaluated sample, starting from 0
15847
15848 t time of the evaluated sample expressed in seconds, starting from 0
15849
15850 s sample rate
15851
15852 Examples
15853
15854 • Generate silence:
15855
15856 aevalsrc=0
15857
15858 • Generate a sin signal with frequency of 440 Hz, set sample rate to
15859 8000 Hz:
15860
15861 aevalsrc="sin(440*2*PI*t):s=8000"
15862
15863 • Generate a two channels signal, specify the channel layout (Front
15864 Center + Back Center) explicitly:
15865
15866 aevalsrc="sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC"
15867
15868 • Generate white noise:
15869
15870 aevalsrc="-2+random(0)"
15871
15872 • Generate an amplitude modulated signal:
15873
15874 aevalsrc="sin(10*2*PI*t)*sin(880*2*PI*t)"
15875
15876 • Generate 2.5 Hz binaural beats on a 360 Hz carrier:
15877
15878 aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)"
15879
15880 afdelaysrc
15881 Generate a fractional delay FIR coefficients.
15882
15883 The resulting stream can be used with afir filter for filtering the
15884 audio signal.
15885
15886 The filter accepts the following options:
15887
15888 delay, d
15889 Set the fractional delay. Default is 0.
15890
15891 sample_rate, r
15892 Set the sample rate, default is 44100.
15893
15894 nb_samples, n
15895 Set the number of samples per each frame. Default is 1024.
15896
15897 taps, t
15898 Set the number of filter coefficents in output audio stream.
15899 Default value is 0.
15900
15901 channel_layout, c
15902 Specifies the channel layout, and can be a string representing a
15903 channel layout. The default value of channel_layout is "stereo".
15904
15905 afirsrc
15906 Generate a FIR coefficients using frequency sampling method.
15907
15908 The resulting stream can be used with afir filter for filtering the
15909 audio signal.
15910
15911 The filter accepts the following options:
15912
15913 taps, t
15914 Set number of filter coefficents in output audio stream. Default
15915 value is 1025.
15916
15917 frequency, f
15918 Set frequency points from where magnitude and phase are set. This
15919 must be in non decreasing order, and first element must be 0, while
15920 last element must be 1. Elements are separated by white spaces.
15921
15922 magnitude, m
15923 Set magnitude value for every frequency point set by frequency.
15924 Number of values must be same as number of frequency points.
15925 Values are separated by white spaces.
15926
15927 phase, p
15928 Set phase value for every frequency point set by frequency. Number
15929 of values must be same as number of frequency points. Values are
15930 separated by white spaces.
15931
15932 sample_rate, r
15933 Set sample rate, default is 44100.
15934
15935 nb_samples, n
15936 Set number of samples per each frame. Default is 1024.
15937
15938 win_func, w
15939 Set window function. Default is blackman.
15940
15941 anullsrc
15942 The null audio source, return unprocessed audio frames. It is mainly
15943 useful as a template and to be employed in analysis / debugging tools,
15944 or as the source for filters which ignore the input data (for example
15945 the sox synth filter).
15946
15947 This source accepts the following options:
15948
15949 channel_layout, cl
15950 Specifies the channel layout, and can be either an integer or a
15951 string representing a channel layout. The default value of
15952 channel_layout is "stereo".
15953
15954 Check the channel_layout_map definition in
15955 libavutil/channel_layout.c for the mapping between strings and
15956 channel layout values.
15957
15958 sample_rate, r
15959 Specifies the sample rate, and defaults to 44100.
15960
15961 nb_samples, n
15962 Set the number of samples per requested frames.
15963
15964 duration, d
15965 Set the duration of the sourced audio. See the Time duration
15966 section in the ffmpeg-utils(1) manual for the accepted syntax.
15967
15968 If not specified, or the expressed duration is negative, the audio
15969 is supposed to be generated forever.
15970
15971 Examples
15972
15973 • Set the sample rate to 48000 Hz and the channel layout to
15974 AV_CH_LAYOUT_MONO.
15975
15976 anullsrc=r=48000:cl=4
15977
15978 • Do the same operation with a more obvious syntax:
15979
15980 anullsrc=r=48000:cl=mono
15981
15982 All the parameters need to be explicitly defined.
15983
15984 flite
15985 Synthesize a voice utterance using the libflite library.
15986
15987 To enable compilation of this filter you need to configure FFmpeg with
15988 "--enable-libflite".
15989
15990 Note that versions of the flite library prior to 2.0 are not thread-
15991 safe.
15992
15993 The filter accepts the following options:
15994
15995 list_voices
15996 If set to 1, list the names of the available voices and exit
15997 immediately. Default value is 0.
15998
15999 nb_samples, n
16000 Set the maximum number of samples per frame. Default value is 512.
16001
16002 textfile
16003 Set the filename containing the text to speak.
16004
16005 text
16006 Set the text to speak.
16007
16008 voice, v
16009 Set the voice to use for the speech synthesis. Default value is
16010 "kal". See also the list_voices option.
16011
16012 Examples
16013
16014 • Read from file speech.txt, and synthesize the text using the
16015 standard flite voice:
16016
16017 flite=textfile=speech.txt
16018
16019 • Read the specified text selecting the "slt" voice:
16020
16021 flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
16022
16023 • Input text to ffmpeg:
16024
16025 ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
16026
16027 • Make ffplay speak the specified text, using "flite" and the "lavfi"
16028 device:
16029
16030 ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
16031
16032 For more information about libflite, check:
16033 <http://www.festvox.org/flite/>
16034
16035 anoisesrc
16036 Generate a noise audio signal.
16037
16038 The filter accepts the following options:
16039
16040 sample_rate, r
16041 Specify the sample rate. Default value is 48000 Hz.
16042
16043 amplitude, a
16044 Specify the amplitude (0.0 - 1.0) of the generated audio stream.
16045 Default value is 1.0.
16046
16047 duration, d
16048 Specify the duration of the generated audio stream. Not specifying
16049 this option results in noise with an infinite length.
16050
16051 color, colour, c
16052 Specify the color of noise. Available noise colors are white, pink,
16053 brown, blue, violet and velvet. Default color is white.
16054
16055 seed, s
16056 Specify a value used to seed the PRNG.
16057
16058 nb_samples, n
16059 Set the number of samples per each output frame, default is 1024.
16060
16061 Examples
16062
16063 • Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate
16064 and an amplitude of 0.5:
16065
16066 anoisesrc=d=60:c=pink:r=44100:a=0.5
16067
16068 hilbert
16069 Generate odd-tap Hilbert transform FIR coefficients.
16070
16071 The resulting stream can be used with afir filter for phase-shifting
16072 the signal by 90 degrees.
16073
16074 This is used in many matrix coding schemes and for analytic signal
16075 generation. The process is often written as a multiplication by i (or
16076 j), the imaginary unit.
16077
16078 The filter accepts the following options:
16079
16080 sample_rate, s
16081 Set sample rate, default is 44100.
16082
16083 taps, t
16084 Set length of FIR filter, default is 22051.
16085
16086 nb_samples, n
16087 Set number of samples per each frame.
16088
16089 win_func, w
16090 Set window function to be used when generating FIR coefficients.
16091
16092 sinc
16093 Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or
16094 band-reject FIR coefficients.
16095
16096 The resulting stream can be used with afir filter for filtering the
16097 audio signal.
16098
16099 The filter accepts the following options:
16100
16101 sample_rate, r
16102 Set sample rate, default is 44100.
16103
16104 nb_samples, n
16105 Set number of samples per each frame. Default is 1024.
16106
16107 hp Set high-pass frequency. Default is 0.
16108
16109 lp Set low-pass frequency. Default is 0. If high-pass frequency is
16110 lower than low-pass frequency and low-pass frequency is higher than
16111 0 then filter will create band-pass filter coefficients, otherwise
16112 band-reject filter coefficients.
16113
16114 phase
16115 Set filter phase response. Default is 50. Allowed range is from 0
16116 to 100.
16117
16118 beta
16119 Set Kaiser window beta.
16120
16121 att Set stop-band attenuation. Default is 120dB, allowed range is from
16122 40 to 180 dB.
16123
16124 round
16125 Enable rounding, by default is disabled.
16126
16127 hptaps
16128 Set number of taps for high-pass filter.
16129
16130 lptaps
16131 Set number of taps for low-pass filter.
16132
16133 sine
16134 Generate an audio signal made of a sine wave with amplitude 1/8.
16135
16136 The audio signal is bit-exact.
16137
16138 The filter accepts the following options:
16139
16140 frequency, f
16141 Set the carrier frequency. Default is 440 Hz.
16142
16143 beep_factor, b
16144 Enable a periodic beep every second with frequency beep_factor
16145 times the carrier frequency. Default is 0, meaning the beep is
16146 disabled.
16147
16148 sample_rate, r
16149 Specify the sample rate, default is 44100.
16150
16151 duration, d
16152 Specify the duration of the generated audio stream.
16153
16154 samples_per_frame
16155 Set the number of samples per output frame.
16156
16157 The expression can contain the following constants:
16158
16159 n The (sequential) number of the output audio frame, starting
16160 from 0.
16161
16162 pts The PTS (Presentation TimeStamp) of the output audio frame,
16163 expressed in TB units.
16164
16165 t The PTS of the output audio frame, expressed in seconds.
16166
16167 TB The timebase of the output audio frames.
16168
16169 Default is 1024.
16170
16171 Examples
16172
16173 • Generate a simple 440 Hz sine wave:
16174
16175 sine
16176
16177 • Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5
16178 seconds:
16179
16180 sine=220:4:d=5
16181 sine=f=220:b=4:d=5
16182 sine=frequency=220:beep_factor=4:duration=5
16183
16184 • Generate a 1 kHz sine wave following "1602,1601,1602,1601,1602"
16185 NTSC pattern:
16186
16187 sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
16188
16190 Below is a description of the currently available audio sinks.
16191
16192 abuffersink
16193 Buffer audio frames, and make them available to the end of filter
16194 chain.
16195
16196 This sink is mainly intended for programmatic use, in particular
16197 through the interface defined in libavfilter/buffersink.h or the
16198 options system.
16199
16200 It accepts a pointer to an AVABufferSinkContext structure, which
16201 defines the incoming buffers' formats, to be passed as the opaque
16202 parameter to "avfilter_init_filter" for initialization.
16203
16204 anullsink
16205 Null audio sink; do absolutely nothing with the input audio. It is
16206 mainly useful as a template and for use in analysis / debugging tools.
16207
16209 When you configure your FFmpeg build, you can disable any of the
16210 existing filters using "--disable-filters". The configure output will
16211 show the video filters included in your build.
16212
16213 Below is a description of the currently available video filters.
16214
16215 addroi
16216 Mark a region of interest in a video frame.
16217
16218 The frame data is passed through unchanged, but metadata is attached to
16219 the frame indicating regions of interest which can affect the behaviour
16220 of later encoding. Multiple regions can be marked by applying the
16221 filter multiple times.
16222
16223 x Region distance in pixels from the left edge of the frame.
16224
16225 y Region distance in pixels from the top edge of the frame.
16226
16227 w Region width in pixels.
16228
16229 h Region height in pixels.
16230
16231 The parameters x, y, w and h are expressions, and may contain the
16232 following variables:
16233
16234 iw Width of the input frame.
16235
16236 ih Height of the input frame.
16237
16238 qoffset
16239 Quantisation offset to apply within the region.
16240
16241 This must be a real value in the range -1 to +1. A value of zero
16242 indicates no quality change. A negative value asks for better
16243 quality (less quantisation), while a positive value asks for worse
16244 quality (greater quantisation).
16245
16246 The range is calibrated so that the extreme values indicate the
16247 largest possible offset - if the rest of the frame is encoded with
16248 the worst possible quality, an offset of -1 indicates that this
16249 region should be encoded with the best possible quality anyway.
16250 Intermediate values are then interpolated in some codec-dependent
16251 way.
16252
16253 For example, in 10-bit H.264 the quantisation parameter varies
16254 between -12 and 51. A typical qoffset value of -1/10 therefore
16255 indicates that this region should be encoded with a QP around one-
16256 tenth of the full range better than the rest of the frame. So, if
16257 most of the frame were to be encoded with a QP of around 30, this
16258 region would get a QP of around 24 (an offset of approximately
16259 -1/10 * (51 - -12) = -6.3). An extreme value of -1 would indicate
16260 that this region should be encoded with the best possible quality
16261 regardless of the treatment of the rest of the frame - that is,
16262 should be encoded at a QP of -12.
16263
16264 clear
16265 If set to true, remove any existing regions of interest marked on
16266 the frame before adding the new one.
16267
16268 Examples
16269
16270 • Mark the centre quarter of the frame as interesting.
16271
16272 addroi=iw/4:ih/4:iw/2:ih/2:-1/10
16273
16274 • Mark the 100-pixel-wide region on the left edge of the frame as
16275 very uninteresting (to be encoded at much lower quality than the
16276 rest of the frame).
16277
16278 addroi=0:0:100:ih:+1/5
16279
16280 alphaextract
16281 Extract the alpha component from the input as a grayscale video. This
16282 is especially useful with the alphamerge filter.
16283
16284 alphamerge
16285 Add or replace the alpha component of the primary input with the
16286 grayscale value of a second input. This is intended for use with
16287 alphaextract to allow the transmission or storage of frame sequences
16288 that have alpha in a format that doesn't support an alpha channel.
16289
16290 For example, to reconstruct full frames from a normal YUV-encoded video
16291 and a separate video created with alphaextract, you might use:
16292
16293 movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
16294
16295 amplify
16296 Amplify differences between current pixel and pixels of adjacent frames
16297 in same pixel location.
16298
16299 This filter accepts the following options:
16300
16301 radius
16302 Set frame radius. Default is 2. Allowed range is from 1 to 63. For
16303 example radius of 3 will instruct filter to calculate average of 7
16304 frames.
16305
16306 factor
16307 Set factor to amplify difference. Default is 2. Allowed range is
16308 from 0 to 65535.
16309
16310 threshold
16311 Set threshold for difference amplification. Any difference greater
16312 or equal to this value will not alter source pixel. Default is 10.
16313 Allowed range is from 0 to 65535.
16314
16315 tolerance
16316 Set tolerance for difference amplification. Any difference lower to
16317 this value will not alter source pixel. Default is 0. Allowed
16318 range is from 0 to 65535.
16319
16320 low Set lower limit for changing source pixel. Default is 65535.
16321 Allowed range is from 0 to 65535. This option controls maximum
16322 possible value that will decrease source pixel value.
16323
16324 high
16325 Set high limit for changing source pixel. Default is 65535. Allowed
16326 range is from 0 to 65535. This option controls maximum possible
16327 value that will increase source pixel value.
16328
16329 planes
16330 Set which planes to filter. Default is all. Allowed range is from 0
16331 to 15.
16332
16333 Commands
16334
16335 This filter supports the following commands that corresponds to option
16336 of same name:
16337
16338 factor
16339 threshold
16340 tolerance
16341 low
16342 high
16343 planes
16344
16345 ass
16346 Same as the subtitles filter, except that it doesn't require libavcodec
16347 and libavformat to work. On the other hand, it is limited to ASS
16348 (Advanced Substation Alpha) subtitles files.
16349
16350 This filter accepts the following option in addition to the common
16351 options from the subtitles filter:
16352
16353 shaping
16354 Set the shaping engine
16355
16356 Available values are:
16357
16358 auto
16359 The default libass shaping engine, which is the best available.
16360
16361 simple
16362 Fast, font-agnostic shaper that can do only substitutions
16363
16364 complex
16365 Slower shaper using OpenType for substitutions and positioning
16366
16367 The default is "auto".
16368
16369 atadenoise
16370 Apply an Adaptive Temporal Averaging Denoiser to the video input.
16371
16372 The filter accepts the following options:
16373
16374 0a Set threshold A for 1st plane. Default is 0.02. Valid range is 0
16375 to 0.3.
16376
16377 0b Set threshold B for 1st plane. Default is 0.04. Valid range is 0
16378 to 5.
16379
16380 1a Set threshold A for 2nd plane. Default is 0.02. Valid range is 0
16381 to 0.3.
16382
16383 1b Set threshold B for 2nd plane. Default is 0.04. Valid range is 0
16384 to 5.
16385
16386 2a Set threshold A for 3rd plane. Default is 0.02. Valid range is 0
16387 to 0.3.
16388
16389 2b Set threshold B for 3rd plane. Default is 0.04. Valid range is 0
16390 to 5.
16391
16392 Threshold A is designed to react on abrupt changes in the input
16393 signal and threshold B is designed to react on continuous changes
16394 in the input signal.
16395
16396 s Set number of frames filter will use for averaging. Default is 9.
16397 Must be odd number in range [5, 129].
16398
16399 p Set what planes of frame filter will use for averaging. Default is
16400 all.
16401
16402 a Set what variant of algorithm filter will use for averaging.
16403 Default is "p" parallel. Alternatively can be set to "s" serial.
16404
16405 Parallel can be faster then serial, while other way around is never
16406 true. Parallel will abort early on first change being greater then
16407 thresholds, while serial will continue processing other side of
16408 frames if they are equal or below thresholds.
16409
16410 0s
16411 1s
16412 2s Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
16413 Valid range is from 0 to 32767. This options controls weight for
16414 each pixel in radius defined by size. Default value means every
16415 pixel have same weight. Setting this option to 0 effectively
16416 disables filtering.
16417
16418 Commands
16419
16420 This filter supports same commands as options except option "s". The
16421 command accepts the same syntax of the corresponding option.
16422
16423 avgblur
16424 Apply average blur filter.
16425
16426 The filter accepts the following options:
16427
16428 sizeX
16429 Set horizontal radius size.
16430
16431 planes
16432 Set which planes to filter. By default all planes are filtered.
16433
16434 sizeY
16435 Set vertical radius size, if zero it will be same as "sizeX".
16436 Default is 0.
16437
16438 Commands
16439
16440 This filter supports same commands as options. The command accepts the
16441 same syntax of the corresponding option.
16442
16443 If the specified expression is not valid, it is kept at its current
16444 value.
16445
16446 backgroundkey
16447 Turns a static background into transparency.
16448
16449 The filter accepts the following option:
16450
16451 threshold
16452 Threshold for scene change detection.
16453
16454 similarity
16455 Similarity percentage with the background.
16456
16457 blend
16458 Set the blend amount for pixels that are not similar.
16459
16460 Commands
16461
16462 This filter supports the all above options as commands.
16463
16464 bbox
16465 Compute the bounding box for the non-black pixels in the input frame
16466 luminance plane.
16467
16468 This filter computes the bounding box containing all the pixels with a
16469 luminance value greater than the minimum allowed value. The parameters
16470 describing the bounding box are printed on the filter log.
16471
16472 The filter accepts the following option:
16473
16474 min_val
16475 Set the minimal luminance value. Default is 16.
16476
16477 Commands
16478
16479 This filter supports the all above options as commands.
16480
16481 bilateral
16482 Apply bilateral filter, spatial smoothing while preserving edges.
16483
16484 The filter accepts the following options:
16485
16486 sigmaS
16487 Set sigma of gaussian function to calculate spatial weight.
16488 Allowed range is 0 to 512. Default is 0.1.
16489
16490 sigmaR
16491 Set sigma of gaussian function to calculate range weight. Allowed
16492 range is 0 to 1. Default is 0.1.
16493
16494 planes
16495 Set planes to filter. Default is first only.
16496
16497 Commands
16498
16499 This filter supports the all above options as commands.
16500
16501 bilateral_cuda
16502 CUDA accelerated bilateral filter, an edge preserving filter. This
16503 filter is mathematically accurate thanks to the use of GPU
16504 acceleration. For best output quality, use one to one chroma
16505 subsampling, i.e. yuv444p format.
16506
16507 The filter accepts the following options:
16508
16509 sigmaS
16510 Set sigma of gaussian function to calculate spatial weight, also
16511 called sigma space. Allowed range is 0.1 to 512. Default is 0.1.
16512
16513 sigmaR
16514 Set sigma of gaussian function to calculate color range weight,
16515 also called sigma color. Allowed range is 0.1 to 512. Default is
16516 0.1.
16517
16518 window_size
16519 Set window size of the bilateral function to determine the number
16520 of neighbours to loop on. If the number entered is even, one will
16521 be added automatically. Allowed range is 1 to 255. Default is 1.
16522
16523 Examples
16524
16525 • Apply the bilateral filter on a video.
16526
16527 ./ffmpeg -v verbose \
16528 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 \
16529 -init_hw_device cuda \
16530 -filter_complex \
16531 " \
16532 [0:v]scale_cuda=format=yuv444p[scaled_video];
16533 [scaled_video]bilateral_cuda=window_size=9:sigmaS=3.0:sigmaR=50.0" \
16534 -an -sn -c:v h264_nvenc -cq 20 out.mp4
16535
16536 bitplanenoise
16537 Show and measure bit plane noise.
16538
16539 The filter accepts the following options:
16540
16541 bitplane
16542 Set which plane to analyze. Default is 1.
16543
16544 filter
16545 Filter out noisy pixels from "bitplane" set above. Default is
16546 disabled.
16547
16548 blackdetect
16549 Detect video intervals that are (almost) completely black. Can be
16550 useful to detect chapter transitions, commercials, or invalid
16551 recordings.
16552
16553 The filter outputs its detection analysis to both the log as well as
16554 frame metadata. If a black segment of at least the specified minimum
16555 duration is found, a line with the start and end timestamps as well as
16556 duration is printed to the log with level "info". In addition, a log
16557 line with level "debug" is printed per frame showing the black amount
16558 detected for that frame.
16559
16560 The filter also attaches metadata to the first frame of a black segment
16561 with key "lavfi.black_start" and to the first frame after the black
16562 segment ends with key "lavfi.black_end". The value is the frame's
16563 timestamp. This metadata is added regardless of the minimum duration
16564 specified.
16565
16566 The filter accepts the following options:
16567
16568 black_min_duration, d
16569 Set the minimum detected black duration expressed in seconds. It
16570 must be a non-negative floating point number.
16571
16572 Default value is 2.0.
16573
16574 picture_black_ratio_th, pic_th
16575 Set the threshold for considering a picture "black". Express the
16576 minimum value for the ratio:
16577
16578 <nb_black_pixels> / <nb_pixels>
16579
16580 for which a picture is considered black. Default value is 0.98.
16581
16582 pixel_black_th, pix_th
16583 Set the threshold for considering a pixel "black".
16584
16585 The threshold expresses the maximum pixel luminance value for which
16586 a pixel is considered "black". The provided value is scaled
16587 according to the following equation:
16588
16589 <absolute_threshold> = <luminance_minimum_value> + <pixel_black_th> * <luminance_range_size>
16590
16591 luminance_range_size and luminance_minimum_value depend on the
16592 input video format, the range is [0-255] for YUV full-range formats
16593 and [16-235] for YUV non full-range formats.
16594
16595 Default value is 0.10.
16596
16597 The following example sets the maximum pixel threshold to the minimum
16598 value, and detects only black intervals of 2 or more seconds:
16599
16600 blackdetect=d=2:pix_th=0.00
16601
16602 blackframe
16603 Detect frames that are (almost) completely black. Can be useful to
16604 detect chapter transitions or commercials. Output lines consist of the
16605 frame number of the detected frame, the percentage of blackness, the
16606 position in the file if known or -1 and the timestamp in seconds.
16607
16608 In order to display the output lines, you need to set the loglevel at
16609 least to the AV_LOG_INFO value.
16610
16611 This filter exports frame metadata "lavfi.blackframe.pblack". The
16612 value represents the percentage of pixels in the picture that are below
16613 the threshold value.
16614
16615 It accepts the following parameters:
16616
16617 amount
16618 The percentage of the pixels that have to be below the threshold;
16619 it defaults to 98.
16620
16621 threshold, thresh
16622 The threshold below which a pixel value is considered black; it
16623 defaults to 32.
16624
16625 blend
16626 Blend two video frames into each other.
16627
16628 The "blend" filter takes two input streams and outputs one stream, the
16629 first input is the "top" layer and second input is "bottom" layer. By
16630 default, the output terminates when the longest input terminates.
16631
16632 The "tblend" (time blend) filter takes two consecutive frames from one
16633 single stream, and outputs the result obtained by blending the new
16634 frame on top of the old frame.
16635
16636 A description of the accepted options follows.
16637
16638 c0_mode
16639 c1_mode
16640 c2_mode
16641 c3_mode
16642 all_mode
16643 Set blend mode for specific pixel component or all pixel components
16644 in case of all_mode. Default value is "normal".
16645
16646 Available values for component modes are:
16647
16648 addition
16649 and
16650 average
16651 bleach
16652 burn
16653 darken
16654 difference
16655 divide
16656 dodge
16657 exclusion
16658 extremity
16659 freeze
16660 geometric
16661 glow
16662 grainextract
16663 grainmerge
16664 hardlight
16665 hardmix
16666 hardoverlay
16667 harmonic
16668 heat
16669 interpolate
16670 lighten
16671 linearlight
16672 multiply
16673 multiply128
16674 negation
16675 normal
16676 or
16677 overlay
16678 phoenix
16679 pinlight
16680 reflect
16681 screen
16682 softdifference
16683 softlight
16684 stain
16685 subtract
16686 vividlight
16687 xor
16688 c0_opacity
16689 c1_opacity
16690 c2_opacity
16691 c3_opacity
16692 all_opacity
16693 Set blend opacity for specific pixel component or all pixel
16694 components in case of all_opacity. Only used in combination with
16695 pixel component blend modes.
16696
16697 c0_expr
16698 c1_expr
16699 c2_expr
16700 c3_expr
16701 all_expr
16702 Set blend expression for specific pixel component or all pixel
16703 components in case of all_expr. Note that related mode options will
16704 be ignored if those are set.
16705
16706 The expressions can use the following variables:
16707
16708 N The sequential number of the filtered frame, starting from 0.
16709
16710 X
16711 Y the coordinates of the current sample
16712
16713 W
16714 H the width and height of currently filtered plane
16715
16716 SW
16717 SH Width and height scale for the plane being filtered. It is the
16718 ratio between the dimensions of the current plane to the luma
16719 plane, e.g. for a "yuv420p" frame, the values are "1,1" for the
16720 luma plane and "0.5,0.5" for the chroma planes.
16721
16722 T Time of the current frame, expressed in seconds.
16723
16724 TOP, A
16725 Value of pixel component at current location for first video
16726 frame (top layer).
16727
16728 BOTTOM, B
16729 Value of pixel component at current location for second video
16730 frame (bottom layer).
16731
16732 The "blend" filter also supports the framesync options.
16733
16734 Examples
16735
16736 • Apply transition from bottom layer to top layer in first 10
16737 seconds:
16738
16739 blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
16740
16741 • Apply linear horizontal transition from top layer to bottom layer:
16742
16743 blend=all_expr='A*(X/W)+B*(1-X/W)'
16744
16745 • Apply 1x1 checkerboard effect:
16746
16747 blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
16748
16749 • Apply uncover left effect:
16750
16751 blend=all_expr='if(gte(N*SW+X,W),A,B)'
16752
16753 • Apply uncover down effect:
16754
16755 blend=all_expr='if(gte(Y-N*SH,0),A,B)'
16756
16757 • Apply uncover up-left effect:
16758
16759 blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
16760
16761 • Split diagonally video and shows top and bottom layer on each side:
16762
16763 blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
16764
16765 • Display differences between the current and the previous frame:
16766
16767 tblend=all_mode=grainextract
16768
16769 Commands
16770
16771 This filter supports same commands as options.
16772
16773 blockdetect
16774 Determines blockiness of frames without altering the input frames.
16775
16776 Based on Remco Muijs and Ihor Kirenko: "A no-reference blocking
16777 artifact measure for adaptive video processing." 2005 13th European
16778 signal processing conference.
16779
16780 The filter accepts the following options:
16781
16782 period_min
16783 period_max
16784 Set minimum and maximum values for determining pixel grids
16785 (periods). Default values are [3,24].
16786
16787 planes
16788 Set planes to filter. Default is first only.
16789
16790 Examples
16791
16792 • Determine blockiness for the first plane and search for periods
16793 within [8,32]:
16794
16795 blockdetect=period_min=8:period_max=32:planes=1
16796
16797 blurdetect
16798 Determines blurriness of frames without altering the input frames.
16799
16800 Based on Marziliano, Pina, et al. "A no-reference perceptual blur
16801 metric." Allows for a block-based abbreviation.
16802
16803 The filter accepts the following options:
16804
16805 low
16806 high
16807 Set low and high threshold values used by the Canny thresholding
16808 algorithm.
16809
16810 The high threshold selects the "strong" edge pixels, which are then
16811 connected through 8-connectivity with the "weak" edge pixels
16812 selected by the low threshold.
16813
16814 low and high threshold values must be chosen in the range [0,1],
16815 and low should be lesser or equal to high.
16816
16817 Default value for low is "20/255", and default value for high is
16818 "50/255".
16819
16820 radius
16821 Define the radius to search around an edge pixel for local maxima.
16822
16823 block_pct
16824 Determine blurriness only for the most significant blocks, given in
16825 percentage.
16826
16827 block_width
16828 Determine blurriness for blocks of width block_width. If set to any
16829 value smaller 1, no blocks are used and the whole image is
16830 processed as one no matter of block_height.
16831
16832 block_height
16833 Determine blurriness for blocks of height block_height. If set to
16834 any value smaller 1, no blocks are used and the whole image is
16835 processed as one no matter of block_width.
16836
16837 planes
16838 Set planes to filter. Default is first only.
16839
16840 Examples
16841
16842 • Determine blur for 80% of most significant 32x32 blocks:
16843
16844 blurdetect=block_width=32:block_height=32:block_pct=80
16845
16846 bm3d
16847 Denoise frames using Block-Matching 3D algorithm.
16848
16849 The filter accepts the following options.
16850
16851 sigma
16852 Set denoising strength. Default value is 1. Allowed range is from
16853 0 to 999.9. The denoising algorithm is very sensitive to sigma, so
16854 adjust it according to the source.
16855
16856 block
16857 Set local patch size. This sets dimensions in 2D.
16858
16859 bstep
16860 Set sliding step for processing blocks. Default value is 4.
16861 Allowed range is from 1 to 64. Smaller values allows processing
16862 more reference blocks and is slower.
16863
16864 group
16865 Set maximal number of similar blocks for 3rd dimension. Default
16866 value is 1. When set to 1, no block matching is done. Larger
16867 values allows more blocks in single group. Allowed range is from 1
16868 to 256.
16869
16870 range
16871 Set radius for search block matching. Default is 9. Allowed range
16872 is from 1 to INT32_MAX.
16873
16874 mstep
16875 Set step between two search locations for block matching. Default
16876 is 1. Allowed range is from 1 to 64. Smaller is slower.
16877
16878 thmse
16879 Set threshold of mean square error for block matching. Valid range
16880 is 0 to INT32_MAX.
16881
16882 hdthr
16883 Set thresholding parameter for hard thresholding in 3D transformed
16884 domain. Larger values results in stronger hard-thresholding
16885 filtering in frequency domain.
16886
16887 estim
16888 Set filtering estimation mode. Can be "basic" or "final". Default
16889 is "basic".
16890
16891 ref If enabled, filter will use 2nd stream for block matching. Default
16892 is disabled for "basic" value of estim option, and always enabled
16893 if value of estim is "final".
16894
16895 planes
16896 Set planes to filter. Default is all available except alpha.
16897
16898 Examples
16899
16900 • Basic filtering with bm3d:
16901
16902 bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
16903
16904 • Same as above, but filtering only luma:
16905
16906 bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
16907
16908 • Same as above, but with both estimation modes:
16909
16910 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
16911
16912 • Same as above, but prefilter with nlmeans filter instead:
16913
16914 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
16915
16916 boxblur
16917 Apply a boxblur algorithm to the input video.
16918
16919 It accepts the following parameters:
16920
16921 luma_radius, lr
16922 luma_power, lp
16923 chroma_radius, cr
16924 chroma_power, cp
16925 alpha_radius, ar
16926 alpha_power, ap
16927
16928 A description of the accepted options follows.
16929
16930 luma_radius, lr
16931 chroma_radius, cr
16932 alpha_radius, ar
16933 Set an expression for the box radius in pixels used for blurring
16934 the corresponding input plane.
16935
16936 The radius value must be a non-negative number, and must not be
16937 greater than the value of the expression "min(w,h)/2" for the luma
16938 and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
16939
16940 Default value for luma_radius is "2". If not specified,
16941 chroma_radius and alpha_radius default to the corresponding value
16942 set for luma_radius.
16943
16944 The expressions can contain the following constants:
16945
16946 w
16947 h The input width and height in pixels.
16948
16949 cw
16950 ch The input chroma image width and height in pixels.
16951
16952 hsub
16953 vsub
16954 The horizontal and vertical chroma subsample values. For
16955 example, for the pixel format "yuv422p", hsub is 2 and vsub is
16956 1.
16957
16958 luma_power, lp
16959 chroma_power, cp
16960 alpha_power, ap
16961 Specify how many times the boxblur filter is applied to the
16962 corresponding plane.
16963
16964 Default value for luma_power is 2. If not specified, chroma_power
16965 and alpha_power default to the corresponding value set for
16966 luma_power.
16967
16968 A value of 0 will disable the effect.
16969
16970 Examples
16971
16972 • Apply a boxblur filter with the luma, chroma, and alpha radii set
16973 to 2:
16974
16975 boxblur=luma_radius=2:luma_power=1
16976 boxblur=2:1
16977
16978 • Set the luma radius to 2, and alpha and chroma radius to 0:
16979
16980 boxblur=2:1:cr=0:ar=0
16981
16982 • Set the luma and chroma radii to a fraction of the video dimension:
16983
16984 boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
16985
16986 bwdif
16987 Deinterlace the input video ("bwdif" stands for "Bob Weaver
16988 Deinterlacing Filter").
16989
16990 Motion adaptive deinterlacing based on yadif with the use of w3fdif and
16991 cubic interpolation algorithms. It accepts the following parameters:
16992
16993 mode
16994 The interlacing mode to adopt. It accepts one of the following
16995 values:
16996
16997 0, send_frame
16998 Output one frame for each frame.
16999
17000 1, send_field
17001 Output one frame for each field.
17002
17003 The default value is "send_field".
17004
17005 parity
17006 The picture field parity assumed for the input interlaced video. It
17007 accepts one of the following values:
17008
17009 0, tff
17010 Assume the top field is first.
17011
17012 1, bff
17013 Assume the bottom field is first.
17014
17015 -1, auto
17016 Enable automatic detection of field parity.
17017
17018 The default value is "auto". If the interlacing is unknown or the
17019 decoder does not export this information, top field first will be
17020 assumed.
17021
17022 deint
17023 Specify which frames to deinterlace. Accepts one of the following
17024 values:
17025
17026 0, all
17027 Deinterlace all frames.
17028
17029 1, interlaced
17030 Only deinterlace frames marked as interlaced.
17031
17032 The default value is "all".
17033
17034 cas
17035 Apply Contrast Adaptive Sharpen filter to video stream.
17036
17037 The filter accepts the following options:
17038
17039 strength
17040 Set the sharpening strength. Default value is 0.
17041
17042 planes
17043 Set planes to filter. Default value is to filter all planes except
17044 alpha plane.
17045
17046 Commands
17047
17048 This filter supports same commands as options.
17049
17050 chromahold
17051 Remove all color information for all colors except for certain one.
17052
17053 The filter accepts the following options:
17054
17055 color
17056 The color which will not be replaced with neutral chroma.
17057
17058 similarity
17059 Similarity percentage with the above color. 0.01 matches only the
17060 exact key color, while 1.0 matches everything.
17061
17062 blend
17063 Blend percentage. 0.0 makes pixels either fully gray, or not gray
17064 at all. Higher values result in more preserved color.
17065
17066 yuv Signals that the color passed is already in YUV instead of RGB.
17067
17068 Literal colors like "green" or "red" don't make sense with this
17069 enabled anymore. This can be used to pass exact YUV values as
17070 hexadecimal numbers.
17071
17072 Commands
17073
17074 This filter supports same commands as options. The command accepts the
17075 same syntax of the corresponding option.
17076
17077 If the specified expression is not valid, it is kept at its current
17078 value.
17079
17080 chromakey
17081 YUV colorspace color/chroma keying.
17082
17083 The filter accepts the following options:
17084
17085 color
17086 The color which will be replaced with transparency.
17087
17088 similarity
17089 Similarity percentage with the key color.
17090
17091 0.01 matches only the exact key color, while 1.0 matches
17092 everything.
17093
17094 blend
17095 Blend percentage.
17096
17097 0.0 makes pixels either fully transparent, or not transparent at
17098 all.
17099
17100 Higher values result in semi-transparent pixels, with a higher
17101 transparency the more similar the pixels color is to the key color.
17102
17103 yuv Signals that the color passed is already in YUV instead of RGB.
17104
17105 Literal colors like "green" or "red" don't make sense with this
17106 enabled anymore. This can be used to pass exact YUV values as
17107 hexadecimal numbers.
17108
17109 Commands
17110
17111 This filter supports same commands as options. The command accepts the
17112 same syntax of the corresponding option.
17113
17114 If the specified expression is not valid, it is kept at its current
17115 value.
17116
17117 Examples
17118
17119 • Make every green pixel in the input image transparent:
17120
17121 ffmpeg -i input.png -vf chromakey=green out.png
17122
17123 • Overlay a greenscreen-video on top of a static black background.
17124
17125 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
17126
17127 chromakey_cuda
17128 CUDA accelerated YUV colorspace color/chroma keying.
17129
17130 This filter works like normal chromakey filter but operates on CUDA
17131 frames. for more details and parameters see chromakey.
17132
17133 Examples
17134
17135 • Make all the green pixels in the input video transparent and use it
17136 as an overlay for another video:
17137
17138 ./ffmpeg \
17139 -hwaccel cuda -hwaccel_output_format cuda -i input_green.mp4 \
17140 -hwaccel cuda -hwaccel_output_format cuda -i base_video.mp4 \
17141 -init_hw_device cuda \
17142 -filter_complex \
17143 " \
17144 [0:v]chromakey_cuda=0x25302D:0.1:0.12:1[overlay_video]; \
17145 [1:v]scale_cuda=format=yuv420p[base]; \
17146 [base][overlay_video]overlay_cuda" \
17147 -an -sn -c:v h264_nvenc -cq 20 output.mp4
17148
17149 • Process two software sources, explicitly uploading the frames:
17150
17151 ./ffmpeg -init_hw_device cuda=cuda -filter_hw_device cuda \
17152 -f lavfi -i color=size=800x600:color=white,format=yuv420p \
17153 -f lavfi -i yuvtestsrc=size=200x200,format=yuv420p \
17154 -filter_complex \
17155 " \
17156 [0]hwupload[under]; \
17157 [1]hwupload,chromakey_cuda=green:0.1:0.12[over]; \
17158 [under][over]overlay_cuda" \
17159 -c:v hevc_nvenc -cq 18 -preset slow output.mp4
17160
17161 chromanr
17162 Reduce chrominance noise.
17163
17164 The filter accepts the following options:
17165
17166 thres
17167 Set threshold for averaging chrominance values. Sum of absolute
17168 difference of Y, U and V pixel components of current pixel and
17169 neighbour pixels lower than this threshold will be used in
17170 averaging. Luma component is left unchanged and is copied to
17171 output. Default value is 30. Allowed range is from 1 to 200.
17172
17173 sizew
17174 Set horizontal radius of rectangle used for averaging. Allowed
17175 range is from 1 to 100. Default value is 5.
17176
17177 sizeh
17178 Set vertical radius of rectangle used for averaging. Allowed range
17179 is from 1 to 100. Default value is 5.
17180
17181 stepw
17182 Set horizontal step when averaging. Default value is 1. Allowed
17183 range is from 1 to 50. Mostly useful to speed-up filtering.
17184
17185 steph
17186 Set vertical step when averaging. Default value is 1. Allowed
17187 range is from 1 to 50. Mostly useful to speed-up filtering.
17188
17189 threy
17190 Set Y threshold for averaging chrominance values. Set finer
17191 control for max allowed difference between Y components of current
17192 pixel and neigbour pixels. Default value is 200. Allowed range is
17193 from 1 to 200.
17194
17195 threu
17196 Set U threshold for averaging chrominance values. Set finer
17197 control for max allowed difference between U components of current
17198 pixel and neigbour pixels. Default value is 200. Allowed range is
17199 from 1 to 200.
17200
17201 threv
17202 Set V threshold for averaging chrominance values. Set finer
17203 control for max allowed difference between V components of current
17204 pixel and neigbour pixels. Default value is 200. Allowed range is
17205 from 1 to 200.
17206
17207 distance
17208 Set distance type used in calculations.
17209
17210 manhattan
17211 Absolute difference.
17212
17213 euclidean
17214 Difference squared.
17215
17216 Default distance type is manhattan.
17217
17218 Commands
17219
17220 This filter supports same commands as options. The command accepts the
17221 same syntax of the corresponding option.
17222
17223 chromashift
17224 Shift chroma pixels horizontally and/or vertically.
17225
17226 The filter accepts the following options:
17227
17228 cbh Set amount to shift chroma-blue horizontally.
17229
17230 cbv Set amount to shift chroma-blue vertically.
17231
17232 crh Set amount to shift chroma-red horizontally.
17233
17234 crv Set amount to shift chroma-red vertically.
17235
17236 edge
17237 Set edge mode, can be smear, default, or warp.
17238
17239 Commands
17240
17241 This filter supports the all above options as commands.
17242
17243 ciescope
17244 Display CIE color diagram with pixels overlaid onto it.
17245
17246 The filter accepts the following options:
17247
17248 system
17249 Set color system.
17250
17251 ntsc, 470m
17252 ebu, 470bg
17253 smpte
17254 240m
17255 apple
17256 widergb
17257 cie1931
17258 rec709, hdtv
17259 uhdtv, rec2020
17260 dcip3
17261 cie Set CIE system.
17262
17263 xyy
17264 ucs
17265 luv
17266 gamuts
17267 Set what gamuts to draw.
17268
17269 See "system" option for available values.
17270
17271 size, s
17272 Set ciescope size, by default set to 512.
17273
17274 intensity, i
17275 Set intensity used to map input pixel values to CIE diagram.
17276
17277 contrast
17278 Set contrast used to draw tongue colors that are out of active
17279 color system gamut.
17280
17281 corrgamma
17282 Correct gamma displayed on scope, by default enabled.
17283
17284 showwhite
17285 Show white point on CIE diagram, by default disabled.
17286
17287 gamma
17288 Set input gamma. Used only with XYZ input color space.
17289
17290 fill
17291 Fill with CIE colors. By default is enabled.
17292
17293 codecview
17294 Visualize information exported by some codecs.
17295
17296 Some codecs can export information through frames using side-data or
17297 other means. For example, some MPEG based codecs export motion vectors
17298 through the export_mvs flag in the codec flags2 option.
17299
17300 The filter accepts the following option:
17301
17302 block
17303 Display block partition structure using the luma plane.
17304
17305 mv Set motion vectors to visualize.
17306
17307 Available flags for mv are:
17308
17309 pf forward predicted MVs of P-frames
17310
17311 bf forward predicted MVs of B-frames
17312
17313 bb backward predicted MVs of B-frames
17314
17315 qp Display quantization parameters using the chroma planes.
17316
17317 mv_type, mvt
17318 Set motion vectors type to visualize. Includes MVs from all frames
17319 unless specified by frame_type option.
17320
17321 Available flags for mv_type are:
17322
17323 fp forward predicted MVs
17324
17325 bp backward predicted MVs
17326
17327 frame_type, ft
17328 Set frame type to visualize motion vectors of.
17329
17330 Available flags for frame_type are:
17331
17332 if intra-coded frames (I-frames)
17333
17334 pf predicted frames (P-frames)
17335
17336 bf bi-directionally predicted frames (B-frames)
17337
17338 Examples
17339
17340 • Visualize forward predicted MVs of all frames using ffplay:
17341
17342 ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
17343
17344 • Visualize multi-directionals MVs of P and B-Frames using ffplay:
17345
17346 ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
17347
17348 colorbalance
17349 Modify intensity of primary colors (red, green and blue) of input
17350 frames.
17351
17352 The filter allows an input frame to be adjusted in the shadows,
17353 midtones or highlights regions for the red-cyan, green-magenta or blue-
17354 yellow balance.
17355
17356 A positive adjustment value shifts the balance towards the primary
17357 color, a negative value towards the complementary color.
17358
17359 The filter accepts the following options:
17360
17361 rs
17362 gs
17363 bs Adjust red, green and blue shadows (darkest pixels).
17364
17365 rm
17366 gm
17367 bm Adjust red, green and blue midtones (medium pixels).
17368
17369 rh
17370 gh
17371 bh Adjust red, green and blue highlights (brightest pixels).
17372
17373 Allowed ranges for options are "[-1.0, 1.0]". Defaults are 0.
17374
17375 pl Preserve lightness when changing color balance. Default is
17376 disabled.
17377
17378 Examples
17379
17380 • Add red color cast to shadows:
17381
17382 colorbalance=rs=.3
17383
17384 Commands
17385
17386 This filter supports the all above options as commands.
17387
17388 colorcontrast
17389 Adjust color contrast between RGB components.
17390
17391 The filter accepts the following options:
17392
17393 rc Set the red-cyan contrast. Defaults is 0.0. Allowed range is from
17394 -1.0 to 1.0.
17395
17396 gm Set the green-magenta contrast. Defaults is 0.0. Allowed range is
17397 from -1.0 to 1.0.
17398
17399 by Set the blue-yellow contrast. Defaults is 0.0. Allowed range is
17400 from -1.0 to 1.0.
17401
17402 rcw
17403 gmw
17404 byw Set the weight of each "rc", "gm", "by" option value. Default value
17405 is 0.0. Allowed range is from 0.0 to 1.0. If all weights are 0.0
17406 filtering is disabled.
17407
17408 pl Set the amount of preserving lightness. Default value is 0.0.
17409 Allowed range is from 0.0 to 1.0.
17410
17411 Commands
17412
17413 This filter supports the all above options as commands.
17414
17415 colorcorrect
17416 Adjust color white balance selectively for blacks and whites. This
17417 filter operates in YUV colorspace.
17418
17419 The filter accepts the following options:
17420
17421 rl Set the red shadow spot. Allowed range is from -1.0 to 1.0.
17422 Default value is 0.
17423
17424 bl Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
17425 Default value is 0.
17426
17427 rh Set the red highlight spot. Allowed range is from -1.0 to 1.0.
17428 Default value is 0.
17429
17430 bh Set the red highlight spot. Allowed range is from -1.0 to 1.0.
17431 Default value is 0.
17432
17433 saturation
17434 Set the amount of saturation. Allowed range is from -3.0 to 3.0.
17435 Default value is 1.
17436
17437 analyze
17438 If set to anything other than "manual" it will analyze every frame
17439 and use derived parameters for filtering output frame.
17440
17441 Possible values are:
17442
17443 manual
17444 average
17445 minmax
17446 median
17447
17448 Default value is "manual".
17449
17450 Commands
17451
17452 This filter supports the all above options as commands.
17453
17454 colorchannelmixer
17455 Adjust video input frames by re-mixing color channels.
17456
17457 This filter modifies a color channel by adding the values associated to
17458 the other channels of the same pixels. For example if the value to
17459 modify is red, the output value will be:
17460
17461 <red>=<red>*<rr> + <blue>*<rb> + <green>*<rg> + <alpha>*<ra>
17462
17463 The filter accepts the following options:
17464
17465 rr
17466 rg
17467 rb
17468 ra Adjust contribution of input red, green, blue and alpha channels
17469 for output red channel. Default is 1 for rr, and 0 for rg, rb and
17470 ra.
17471
17472 gr
17473 gg
17474 gb
17475 ga Adjust contribution of input red, green, blue and alpha channels
17476 for output green channel. Default is 1 for gg, and 0 for gr, gb
17477 and ga.
17478
17479 br
17480 bg
17481 bb
17482 ba Adjust contribution of input red, green, blue and alpha channels
17483 for output blue channel. Default is 1 for bb, and 0 for br, bg and
17484 ba.
17485
17486 ar
17487 ag
17488 ab
17489 aa Adjust contribution of input red, green, blue and alpha channels
17490 for output alpha channel. Default is 1 for aa, and 0 for ar, ag
17491 and ab.
17492
17493 Allowed ranges for options are "[-2.0, 2.0]".
17494
17495 pc Set preserve color mode. The accepted values are:
17496
17497 none
17498 Disable color preserving, this is default.
17499
17500 lum Preserve luminance.
17501
17502 max Preserve max value of RGB triplet.
17503
17504 avg Preserve average value of RGB triplet.
17505
17506 sum Preserve sum value of RGB triplet.
17507
17508 nrm Preserve normalized value of RGB triplet.
17509
17510 pwr Preserve power value of RGB triplet.
17511
17512 pa Set the preserve color amount when changing colors. Allowed range
17513 is from "[0.0, 1.0]". Default is 0.0, thus disabled.
17514
17515 Examples
17516
17517 • Convert source to grayscale:
17518
17519 colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
17520
17521 • Simulate sepia tones:
17522
17523 colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
17524
17525 Commands
17526
17527 This filter supports the all above options as commands.
17528
17529 colorize
17530 Overlay a solid color on the video stream.
17531
17532 The filter accepts the following options:
17533
17534 hue Set the color hue. Allowed range is from 0 to 360. Default value
17535 is 0.
17536
17537 saturation
17538 Set the color saturation. Allowed range is from 0 to 1. Default
17539 value is 0.5.
17540
17541 lightness
17542 Set the color lightness. Allowed range is from 0 to 1. Default
17543 value is 0.5.
17544
17545 mix Set the mix of source lightness. By default is set to 1.0. Allowed
17546 range is from 0.0 to 1.0.
17547
17548 Commands
17549
17550 This filter supports the all above options as commands.
17551
17552 colorkey
17553 RGB colorspace color keying. This filter operates on 8-bit RGB format
17554 frames by setting the alpha component of each pixel which falls within
17555 the similarity radius of the key color to 0. The alpha value for pixels
17556 outside the similarity radius depends on the value of the blend option.
17557
17558 The filter accepts the following options:
17559
17560 color
17561 Set the color for which alpha will be set to 0 (full transparency).
17562 See "Color" section in the ffmpeg-utils manual. Default is
17563 "black".
17564
17565 similarity
17566 Set the radius from the key color within which other colors also
17567 have full transparency. The computed distance is related to the
17568 unit fractional distance in 3D space between the RGB values of the
17569 key color and the pixel's color. Range is 0.01 to 1.0. 0.01 matches
17570 within a very small radius around the exact key color, while 1.0
17571 matches everything. Default is 0.01.
17572
17573 blend
17574 Set how the alpha value for pixels that fall outside the similarity
17575 radius is computed. 0.0 makes pixels either fully transparent or
17576 fully opaque. Higher values result in semi-transparent pixels,
17577 with greater transparency the more similar the pixel color is to
17578 the key color. Range is 0.0 to 1.0. Default is 0.0.
17579
17580 Examples
17581
17582 • Make every green pixel in the input image transparent:
17583
17584 ffmpeg -i input.png -vf colorkey=green out.png
17585
17586 • Overlay a greenscreen-video on top of a static background image.
17587
17588 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
17589
17590 Commands
17591
17592 This filter supports same commands as options. The command accepts the
17593 same syntax of the corresponding option.
17594
17595 If the specified expression is not valid, it is kept at its current
17596 value.
17597
17598 colorhold
17599 Remove all color information for all RGB colors except for certain one.
17600
17601 The filter accepts the following options:
17602
17603 color
17604 The color which will not be replaced with neutral gray.
17605
17606 similarity
17607 Similarity percentage with the above color. 0.01 matches only the
17608 exact key color, while 1.0 matches everything.
17609
17610 blend
17611 Blend percentage. 0.0 makes pixels fully gray. Higher values
17612 result in more preserved color.
17613
17614 Commands
17615
17616 This filter supports same commands as options. The command accepts the
17617 same syntax of the corresponding option.
17618
17619 If the specified expression is not valid, it is kept at its current
17620 value.
17621
17622 colorlevels
17623 Adjust video input frames using levels.
17624
17625 The filter accepts the following options:
17626
17627 rimin
17628 gimin
17629 bimin
17630 aimin
17631 Adjust red, green, blue and alpha input black point. Allowed
17632 ranges for options are "[-1.0, 1.0]". Defaults are 0.
17633
17634 rimax
17635 gimax
17636 bimax
17637 aimax
17638 Adjust red, green, blue and alpha input white point. Allowed
17639 ranges for options are "[-1.0, 1.0]". Defaults are 1.
17640
17641 Input levels are used to lighten highlights (bright tones), darken
17642 shadows (dark tones), change the balance of bright and dark tones.
17643
17644 romin
17645 gomin
17646 bomin
17647 aomin
17648 Adjust red, green, blue and alpha output black point. Allowed
17649 ranges for options are "[0, 1.0]". Defaults are 0.
17650
17651 romax
17652 gomax
17653 bomax
17654 aomax
17655 Adjust red, green, blue and alpha output white point. Allowed
17656 ranges for options are "[0, 1.0]". Defaults are 1.
17657
17658 Output levels allows manual selection of a constrained output level
17659 range.
17660
17661 preserve
17662 Set preserve color mode. The accepted values are:
17663
17664 none
17665 Disable color preserving, this is default.
17666
17667 lum Preserve luminance.
17668
17669 max Preserve max value of RGB triplet.
17670
17671 avg Preserve average value of RGB triplet.
17672
17673 sum Preserve sum value of RGB triplet.
17674
17675 nrm Preserve normalized value of RGB triplet.
17676
17677 pwr Preserve power value of RGB triplet.
17678
17679 Examples
17680
17681 • Make video output darker:
17682
17683 colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
17684
17685 • Increase contrast:
17686
17687 colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
17688
17689 • Make video output lighter:
17690
17691 colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
17692
17693 • Increase brightness:
17694
17695 colorlevels=romin=0.5:gomin=0.5:bomin=0.5
17696
17697 Commands
17698
17699 This filter supports the all above options as commands.
17700
17701 colormap
17702 Apply custom color maps to video stream.
17703
17704 This filter needs three input video streams. First stream is video
17705 stream that is going to be filtered out. Second and third video stream
17706 specify color patches for source color to target color mapping.
17707
17708 The filter accepts the following options:
17709
17710 patch_size
17711 Set the source and target video stream patch size in pixels.
17712
17713 nb_patches
17714 Set the max number of used patches from source and target video
17715 stream. Default value is number of patches available in additional
17716 video streams. Max allowed number of patches is 64.
17717
17718 type
17719 Set the adjustments used for target colors. Can be "relative" or
17720 "absolute". Defaults is "absolute".
17721
17722 kernel
17723 Set the kernel used to measure color differences between mapped
17724 colors.
17725
17726 The accepted values are:
17727
17728 euclidean
17729 weuclidean
17730
17731 Default is "euclidean".
17732
17733 colormatrix
17734 Convert color matrix.
17735
17736 The filter accepts the following options:
17737
17738 src
17739 dst Specify the source and destination color matrix. Both values must
17740 be specified.
17741
17742 The accepted values are:
17743
17744 bt709
17745 BT.709
17746
17747 fcc FCC
17748
17749 bt601
17750 BT.601
17751
17752 bt470
17753 BT.470
17754
17755 bt470bg
17756 BT.470BG
17757
17758 smpte170m
17759 SMPTE-170M
17760
17761 smpte240m
17762 SMPTE-240M
17763
17764 bt2020
17765 BT.2020
17766
17767 For example to convert from BT.601 to SMPTE-240M, use the command:
17768
17769 colormatrix=bt601:smpte240m
17770
17771 colorspace
17772 Convert colorspace, transfer characteristics or color primaries. Input
17773 video needs to have an even size.
17774
17775 The filter accepts the following options:
17776
17777 all Specify all color properties at once.
17778
17779 The accepted values are:
17780
17781 bt470m
17782 BT.470M
17783
17784 bt470bg
17785 BT.470BG
17786
17787 bt601-6-525
17788 BT.601-6 525
17789
17790 bt601-6-625
17791 BT.601-6 625
17792
17793 bt709
17794 BT.709
17795
17796 smpte170m
17797 SMPTE-170M
17798
17799 smpte240m
17800 SMPTE-240M
17801
17802 bt2020
17803 BT.2020
17804
17805 space
17806 Specify output colorspace.
17807
17808 The accepted values are:
17809
17810 bt709
17811 BT.709
17812
17813 fcc FCC
17814
17815 bt470bg
17816 BT.470BG or BT.601-6 625
17817
17818 smpte170m
17819 SMPTE-170M or BT.601-6 525
17820
17821 smpte240m
17822 SMPTE-240M
17823
17824 ycgco
17825 YCgCo
17826
17827 bt2020ncl
17828 BT.2020 with non-constant luminance
17829
17830 trc Specify output transfer characteristics.
17831
17832 The accepted values are:
17833
17834 bt709
17835 BT.709
17836
17837 bt470m
17838 BT.470M
17839
17840 bt470bg
17841 BT.470BG
17842
17843 gamma22
17844 Constant gamma of 2.2
17845
17846 gamma28
17847 Constant gamma of 2.8
17848
17849 smpte170m
17850 SMPTE-170M, BT.601-6 625 or BT.601-6 525
17851
17852 smpte240m
17853 SMPTE-240M
17854
17855 srgb
17856 SRGB
17857
17858 iec61966-2-1
17859 iec61966-2-1
17860
17861 iec61966-2-4
17862 iec61966-2-4
17863
17864 xvycc
17865 xvycc
17866
17867 bt2020-10
17868 BT.2020 for 10-bits content
17869
17870 bt2020-12
17871 BT.2020 for 12-bits content
17872
17873 primaries
17874 Specify output color primaries.
17875
17876 The accepted values are:
17877
17878 bt709
17879 BT.709
17880
17881 bt470m
17882 BT.470M
17883
17884 bt470bg
17885 BT.470BG or BT.601-6 625
17886
17887 smpte170m
17888 SMPTE-170M or BT.601-6 525
17889
17890 smpte240m
17891 SMPTE-240M
17892
17893 film
17894 film
17895
17896 smpte431
17897 SMPTE-431
17898
17899 smpte432
17900 SMPTE-432
17901
17902 bt2020
17903 BT.2020
17904
17905 jedec-p22
17906 JEDEC P22 phosphors
17907
17908 range
17909 Specify output color range.
17910
17911 The accepted values are:
17912
17913 tv TV (restricted) range
17914
17915 mpeg
17916 MPEG (restricted) range
17917
17918 pc PC (full) range
17919
17920 jpeg
17921 JPEG (full) range
17922
17923 format
17924 Specify output color format.
17925
17926 The accepted values are:
17927
17928 yuv420p
17929 YUV 4:2:0 planar 8-bits
17930
17931 yuv420p10
17932 YUV 4:2:0 planar 10-bits
17933
17934 yuv420p12
17935 YUV 4:2:0 planar 12-bits
17936
17937 yuv422p
17938 YUV 4:2:2 planar 8-bits
17939
17940 yuv422p10
17941 YUV 4:2:2 planar 10-bits
17942
17943 yuv422p12
17944 YUV 4:2:2 planar 12-bits
17945
17946 yuv444p
17947 YUV 4:4:4 planar 8-bits
17948
17949 yuv444p10
17950 YUV 4:4:4 planar 10-bits
17951
17952 yuv444p12
17953 YUV 4:4:4 planar 12-bits
17954
17955 fast
17956 Do a fast conversion, which skips gamma/primary correction. This
17957 will take significantly less CPU, but will be mathematically
17958 incorrect. To get output compatible with that produced by the
17959 colormatrix filter, use fast=1.
17960
17961 dither
17962 Specify dithering mode.
17963
17964 The accepted values are:
17965
17966 none
17967 No dithering
17968
17969 fsb Floyd-Steinberg dithering
17970
17971 wpadapt
17972 Whitepoint adaptation mode.
17973
17974 The accepted values are:
17975
17976 bradford
17977 Bradford whitepoint adaptation
17978
17979 vonkries
17980 von Kries whitepoint adaptation
17981
17982 identity
17983 identity whitepoint adaptation (i.e. no whitepoint adaptation)
17984
17985 iall
17986 Override all input properties at once. Same accepted values as all.
17987
17988 ispace
17989 Override input colorspace. Same accepted values as space.
17990
17991 iprimaries
17992 Override input color primaries. Same accepted values as primaries.
17993
17994 itrc
17995 Override input transfer characteristics. Same accepted values as
17996 trc.
17997
17998 irange
17999 Override input color range. Same accepted values as range.
18000
18001 The filter converts the transfer characteristics, color space and color
18002 primaries to the specified user values. The output value, if not
18003 specified, is set to a default value based on the "all" property. If
18004 that property is also not specified, the filter will log an error. The
18005 output color range and format default to the same value as the input
18006 color range and format. The input transfer characteristics, color
18007 space, color primaries and color range should be set on the input data.
18008 If any of these are missing, the filter will log an error and no
18009 conversion will take place.
18010
18011 For example to convert the input to SMPTE-240M, use the command:
18012
18013 colorspace=smpte240m
18014
18015 colorspace_cuda
18016 CUDA accelerated implementation of the colorspace filter.
18017
18018 It is by no means feature complete compared to the software colorspace
18019 filter, and at the current time only supports color range conversion
18020 between jpeg/full and mpeg/limited range.
18021
18022 The filter accepts the following options:
18023
18024 range
18025 Specify output color range.
18026
18027 The accepted values are:
18028
18029 tv TV (restricted) range
18030
18031 mpeg
18032 MPEG (restricted) range
18033
18034 pc PC (full) range
18035
18036 jpeg
18037 JPEG (full) range
18038
18039 colortemperature
18040 Adjust color temperature in video to simulate variations in ambient
18041 color temperature.
18042
18043 The filter accepts the following options:
18044
18045 temperature
18046 Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
18047 Default value is 6500 K.
18048
18049 mix Set mixing with filtered output. Allowed range is from 0 to 1.
18050 Default value is 1.
18051
18052 pl Set the amount of preserving lightness. Allowed range is from 0 to
18053 1. Default value is 0.
18054
18055 Commands
18056
18057 This filter supports same commands as options.
18058
18059 convolution
18060 Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49
18061 elements.
18062
18063 The filter accepts the following options:
18064
18065 0m
18066 1m
18067 2m
18068 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49
18069 signed integers in square mode, and from 1 to 49 odd number of
18070 signed integers in row mode.
18071
18072 0rdiv
18073 1rdiv
18074 2rdiv
18075 3rdiv
18076 Set multiplier for calculated value for each plane. If unset or 0,
18077 it will be sum of all matrix elements.
18078
18079 0bias
18080 1bias
18081 2bias
18082 3bias
18083 Set bias for each plane. This value is added to the result of the
18084 multiplication. Useful for making the overall image brighter or
18085 darker. Default is 0.0.
18086
18087 0mode
18088 1mode
18089 2mode
18090 3mode
18091 Set matrix mode for each plane. Can be square, row or column.
18092 Default is square.
18093
18094 Commands
18095
18096 This filter supports the all above options as commands.
18097
18098 Examples
18099
18100 • Apply sharpen:
18101
18102 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"
18103
18104 • Apply blur:
18105
18106 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"
18107
18108 • Apply edge enhance:
18109
18110 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"
18111
18112 • Apply edge detect:
18113
18114 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"
18115
18116 • Apply laplacian edge detector which includes diagonals:
18117
18118 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"
18119
18120 • Apply emboss:
18121
18122 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"
18123
18124 convolve
18125 Apply 2D convolution of video stream in frequency domain using second
18126 stream as impulse.
18127
18128 The filter accepts the following options:
18129
18130 planes
18131 Set which planes to process.
18132
18133 impulse
18134 Set which impulse video frames will be processed, can be first or
18135 all. Default is all.
18136
18137 The "convolve" filter also supports the framesync options.
18138
18139 copy
18140 Copy the input video source unchanged to the output. This is mainly
18141 useful for testing purposes.
18142
18143 coreimage
18144 Video filtering on GPU using Apple's CoreImage API on OSX.
18145
18146 Hardware acceleration is based on an OpenGL context. Usually, this
18147 means it is processed by video hardware. However, software-based OpenGL
18148 implementations exist which means there is no guarantee for hardware
18149 processing. It depends on the respective OSX.
18150
18151 There are many filters and image generators provided by Apple that come
18152 with a large variety of options. The filter has to be referenced by its
18153 name along with its options.
18154
18155 The coreimage filter accepts the following options:
18156
18157 list_filters
18158 List all available filters and generators along with all their
18159 respective options as well as possible minimum and maximum values
18160 along with the default values.
18161
18162 list_filters=true
18163
18164 filter
18165 Specify all filters by their respective name and options. Use
18166 list_filters to determine all valid filter names and options.
18167 Numerical options are specified by a float value and are
18168 automatically clamped to their respective value range. Vector and
18169 color options have to be specified by a list of space separated
18170 float values. Character escaping has to be done. A special option
18171 name "default" is available to use default options for a filter.
18172
18173 It is required to specify either "default" or at least one of the
18174 filter options. All omitted options are used with their default
18175 values. The syntax of the filter string is as follows:
18176
18177 filter=<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...][#<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...]][#...]
18178
18179 output_rect
18180 Specify a rectangle where the output of the filter chain is copied
18181 into the input image. It is given by a list of space separated
18182 float values:
18183
18184 output_rect=x\ y\ width\ height
18185
18186 If not given, the output rectangle equals the dimensions of the
18187 input image. The output rectangle is automatically cropped at the
18188 borders of the input image. Negative values are valid for each
18189 component.
18190
18191 output_rect=25\ 25\ 100\ 100
18192
18193 Several filters can be chained for successive processing without GPU-
18194 HOST transfers allowing for fast processing of complex filter chains.
18195 Currently, only filters with zero (generators) or exactly one (filters)
18196 input image and one output image are supported. Also, transition
18197 filters are not yet usable as intended.
18198
18199 Some filters generate output images with additional padding depending
18200 on the respective filter kernel. The padding is automatically removed
18201 to ensure the filter output has the same size as the input image.
18202
18203 For image generators, the size of the output image is determined by the
18204 previous output image of the filter chain or the input image of the
18205 whole filterchain, respectively. The generators do not use the pixel
18206 information of this image to generate their output. However, the
18207 generated output is blended onto this image, resulting in partial or
18208 complete coverage of the output image.
18209
18210 The coreimagesrc video source can be used for generating input images
18211 which are directly fed into the filter chain. By using it, providing
18212 input images by another video source or an input video is not required.
18213
18214 Examples
18215
18216 • List all filters available:
18217
18218 coreimage=list_filters=true
18219
18220 • Use the CIBoxBlur filter with default options to blur an image:
18221
18222 coreimage=filter=CIBoxBlur@default
18223
18224 • Use a filter chain with CISepiaTone at default values and
18225 CIVignetteEffect with its center at 100x100 and a radius of 50
18226 pixels:
18227
18228 coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
18229
18230 • Use nullsrc and CIQRCodeGenerator to create a QR code for the
18231 FFmpeg homepage, given as complete and escaped command-line for
18232 Apple's standard bash shell:
18233
18234 ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
18235
18236 corr
18237 Obtain the correlation between two input videos.
18238
18239 This filter takes two input videos.
18240
18241 Both input videos must have the same resolution and pixel format for
18242 this filter to work correctly. Also it assumes that both inputs have
18243 the same number of frames, which are compared one by one.
18244
18245 The obtained per component, average, min and max correlation is printed
18246 through the logging system.
18247
18248 The filter stores the calculated correlation of each frame in frame
18249 metadata.
18250
18251 This filter also supports the framesync options.
18252
18253 In the below example the input file main.mpg being processed is
18254 compared with the reference file ref.mpg.
18255
18256 ffmpeg -i main.mpg -i ref.mpg -lavfi corr -f null -
18257
18258 cover_rect
18259 Cover a rectangular object
18260
18261 It accepts the following options:
18262
18263 cover
18264 Filepath of the optional cover image, needs to be in yuv420.
18265
18266 mode
18267 Set covering mode.
18268
18269 It accepts the following values:
18270
18271 cover
18272 cover it by the supplied image
18273
18274 blur
18275 cover it by interpolating the surrounding pixels
18276
18277 Default value is blur.
18278
18279 Examples
18280
18281 • Cover a rectangular object by the supplied image of a given video
18282 using ffmpeg:
18283
18284 ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
18285
18286 crop
18287 Crop the input video to given dimensions.
18288
18289 It accepts the following parameters:
18290
18291 w, out_w
18292 The width of the output video. It defaults to "iw". This
18293 expression is evaluated only once during the filter configuration,
18294 or when the w or out_w command is sent.
18295
18296 h, out_h
18297 The height of the output video. It defaults to "ih". This
18298 expression is evaluated only once during the filter configuration,
18299 or when the h or out_h command is sent.
18300
18301 x The horizontal position, in the input video, of the left edge of
18302 the output video. It defaults to "(in_w-out_w)/2". This expression
18303 is evaluated per-frame.
18304
18305 y The vertical position, in the input video, of the top edge of the
18306 output video. It defaults to "(in_h-out_h)/2". This expression is
18307 evaluated per-frame.
18308
18309 keep_aspect
18310 If set to 1 will force the output display aspect ratio to be the
18311 same of the input, by changing the output sample aspect ratio. It
18312 defaults to 0.
18313
18314 exact
18315 Enable exact cropping. If enabled, subsampled videos will be
18316 cropped at exact width/height/x/y as specified and will not be
18317 rounded to nearest smaller value. It defaults to 0.
18318
18319 The out_w, out_h, x, y parameters are expressions containing the
18320 following constants:
18321
18322 x
18323 y The computed values for x and y. They are evaluated for each new
18324 frame.
18325
18326 in_w
18327 in_h
18328 The input width and height.
18329
18330 iw
18331 ih These are the same as in_w and in_h.
18332
18333 out_w
18334 out_h
18335 The output (cropped) width and height.
18336
18337 ow
18338 oh These are the same as out_w and out_h.
18339
18340 a same as iw / ih
18341
18342 sar input sample aspect ratio
18343
18344 dar input display aspect ratio, it is the same as (iw / ih) * sar
18345
18346 hsub
18347 vsub
18348 horizontal and vertical chroma subsample values. For example for
18349 the pixel format "yuv422p" hsub is 2 and vsub is 1.
18350
18351 n The number of the input frame, starting from 0.
18352
18353 pos the position in the file of the input frame, NAN if unknown
18354
18355 t The timestamp expressed in seconds. It's NAN if the input timestamp
18356 is unknown.
18357
18358 The expression for out_w may depend on the value of out_h, and the
18359 expression for out_h may depend on out_w, but they cannot depend on x
18360 and y, as x and y are evaluated after out_w and out_h.
18361
18362 The x and y parameters specify the expressions for the position of the
18363 top-left corner of the output (non-cropped) area. They are evaluated
18364 for each frame. If the evaluated value is not valid, it is approximated
18365 to the nearest valid value.
18366
18367 The expression for x may depend on y, and the expression for y may
18368 depend on x.
18369
18370 Examples
18371
18372 • Crop area with size 100x100 at position (12,34).
18373
18374 crop=100:100:12:34
18375
18376 Using named options, the example above becomes:
18377
18378 crop=w=100:h=100:x=12:y=34
18379
18380 • Crop the central input area with size 100x100:
18381
18382 crop=100:100
18383
18384 • Crop the central input area with size 2/3 of the input video:
18385
18386 crop=2/3*in_w:2/3*in_h
18387
18388 • Crop the input video central square:
18389
18390 crop=out_w=in_h
18391 crop=in_h
18392
18393 • Delimit the rectangle with the top-left corner placed at position
18394 100:100 and the right-bottom corner corresponding to the right-
18395 bottom corner of the input image.
18396
18397 crop=in_w-100:in_h-100:100:100
18398
18399 • Crop 10 pixels from the left and right borders, and 20 pixels from
18400 the top and bottom borders
18401
18402 crop=in_w-2*10:in_h-2*20
18403
18404 • Keep only the bottom right quarter of the input image:
18405
18406 crop=in_w/2:in_h/2:in_w/2:in_h/2
18407
18408 • Crop height for getting Greek harmony:
18409
18410 crop=in_w:1/PHI*in_w
18411
18412 • Apply trembling effect:
18413
18414 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)
18415
18416 • Apply erratic camera effect depending on timestamp:
18417
18418 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)"
18419
18420 • Set x depending on the value of y:
18421
18422 crop=in_w/2:in_h/2:y:10+10*sin(n/10)
18423
18424 Commands
18425
18426 This filter supports the following commands:
18427
18428 w, out_w
18429 h, out_h
18430 x
18431 y Set width/height of the output video and the horizontal/vertical
18432 position in the input video. The command accepts the same syntax
18433 of the corresponding option.
18434
18435 If the specified expression is not valid, it is kept at its current
18436 value.
18437
18438 cropdetect
18439 Auto-detect the crop size.
18440
18441 It calculates the necessary cropping parameters and prints the
18442 recommended parameters via the logging system. The detected dimensions
18443 correspond to the non-black or video area of the input video according
18444 to mode.
18445
18446 It accepts the following parameters:
18447
18448 mode
18449 Depending on mode crop detection is based on either the mere black
18450 value of surrounding pixels or a combination of motion vectors and
18451 edge pixels.
18452
18453 black
18454 Detect black pixels surrounding the playing video. For fine
18455 control use option limit.
18456
18457 mvedges
18458 Detect the playing video by the motion vectors inside the video
18459 and scanning for edge pixels typically forming the border of a
18460 playing video.
18461
18462 limit
18463 Set higher black value threshold, which can be optionally specified
18464 from nothing (0) to everything (255 for 8-bit based formats). An
18465 intensity value greater to the set value is considered non-black.
18466 It defaults to 24. You can also specify a value between 0.0 and
18467 1.0 which will be scaled depending on the bitdepth of the pixel
18468 format.
18469
18470 round
18471 The value which the width/height should be divisible by. It
18472 defaults to 16. The offset is automatically adjusted to center the
18473 video. Use 2 to get only even dimensions (needed for 4:2:2 video).
18474 16 is best when encoding to most video codecs.
18475
18476 skip
18477 Set the number of initial frames for which evaluation is skipped.
18478 Default is 2. Range is 0 to INT_MAX.
18479
18480 reset_count, reset
18481 Set the counter that determines after how many frames cropdetect
18482 will reset the previously detected largest video area and start
18483 over to detect the current optimal crop area. Default value is 0.
18484
18485 This can be useful when channel logos distort the video area. 0
18486 indicates 'never reset', and returns the largest area encountered
18487 during playback.
18488
18489 mv_threshold
18490 Set motion in pixel units as threshold for motion detection. It
18491 defaults to 8.
18492
18493 low
18494 high
18495 Set low and high threshold values used by the Canny thresholding
18496 algorithm.
18497
18498 The high threshold selects the "strong" edge pixels, which are then
18499 connected through 8-connectivity with the "weak" edge pixels
18500 selected by the low threshold.
18501
18502 low and high threshold values must be chosen in the range [0,1],
18503 and low should be lesser or equal to high.
18504
18505 Default value for low is "5/255", and default value for high is
18506 "15/255".
18507
18508 Examples
18509
18510 • Find video area surrounded by black borders:
18511
18512 ffmpeg -i file.mp4 -vf cropdetect,metadata=mode=print -f null -
18513
18514 • Find an embedded video area, generate motion vectors beforehand:
18515
18516 ffmpeg -i file.mp4 -vf mestimate,cropdetect=mode=mvedges,metadata=mode=print -f null -
18517
18518 • Find an embedded video area, use motion vectors from decoder:
18519
18520 ffmpeg -flags2 +export_mvs -i file.mp4 -vf cropdetect=mode=mvedges,metadata=mode=print -f null -
18521
18522 Commands
18523
18524 This filter supports the following commands:
18525
18526 limit
18527 The command accepts the same syntax of the corresponding option.
18528 If the specified expression is not valid, it is kept at its current
18529 value.
18530
18531 cue
18532 Delay video filtering until a given wallclock timestamp. The filter
18533 first passes on preroll amount of frames, then it buffers at most
18534 buffer amount of frames and waits for the cue. After reaching the cue
18535 it forwards the buffered frames and also any subsequent frames coming
18536 in its input.
18537
18538 The filter can be used synchronize the output of multiple ffmpeg
18539 processes for realtime output devices like decklink. By putting the
18540 delay in the filtering chain and pre-buffering frames the process can
18541 pass on data to output almost immediately after the target wallclock
18542 timestamp is reached.
18543
18544 Perfect frame accuracy cannot be guaranteed, but the result is good
18545 enough for some use cases.
18546
18547 cue The cue timestamp expressed in a UNIX timestamp in microseconds.
18548 Default is 0.
18549
18550 preroll
18551 The duration of content to pass on as preroll expressed in seconds.
18552 Default is 0.
18553
18554 buffer
18555 The maximum duration of content to buffer before waiting for the
18556 cue expressed in seconds. Default is 0.
18557
18558 curves
18559 Apply color adjustments using curves.
18560
18561 This filter is similar to the Adobe Photoshop and GIMP curves tools.
18562 Each component (red, green and blue) has its values defined by N key
18563 points tied from each other using a smooth curve. The x-axis represents
18564 the pixel values from the input frame, and the y-axis the new pixel
18565 values to be set for the output frame.
18566
18567 By default, a component curve is defined by the two points (0;0) and
18568 (1;1). This creates a straight line where each original pixel value is
18569 "adjusted" to its own value, which means no change to the image.
18570
18571 The filter allows you to redefine these two points and add some more. A
18572 new curve will be define to pass smoothly through all these new
18573 coordinates. The new defined points needs to be strictly increasing
18574 over the x-axis, and their x and y values must be in the [0;1]
18575 interval. The curve is formed by using a natural or monotonic cubic
18576 spline interpolation, depending on the interp option (default:
18577 "natural"). The "natural" spline produces a smoother curve in general
18578 while the monotonic ("pchip") spline guarantees the transitions between
18579 the specified points to be monotonic. If the computed curves happened
18580 to go outside the vector spaces, the values will be clipped
18581 accordingly.
18582
18583 The filter accepts the following options:
18584
18585 preset
18586 Select one of the available color presets. This option can be used
18587 in addition to the r, g, b parameters; in this case, the later
18588 options takes priority on the preset values. Available presets
18589 are:
18590
18591 none
18592 color_negative
18593 cross_process
18594 darker
18595 increase_contrast
18596 lighter
18597 linear_contrast
18598 medium_contrast
18599 negative
18600 strong_contrast
18601 vintage
18602
18603 Default is "none".
18604
18605 master, m
18606 Set the master key points. These points will define a second pass
18607 mapping. It is sometimes called a "luminance" or "value" mapping.
18608 It can be used with r, g, b or all since it acts like a post-
18609 processing LUT.
18610
18611 red, r
18612 Set the key points for the red component.
18613
18614 green, g
18615 Set the key points for the green component.
18616
18617 blue, b
18618 Set the key points for the blue component.
18619
18620 all Set the key points for all components (not including master). Can
18621 be used in addition to the other key points component options. In
18622 this case, the unset component(s) will fallback on this all
18623 setting.
18624
18625 psfile
18626 Specify a Photoshop curves file (".acv") to import the settings
18627 from.
18628
18629 plot
18630 Save Gnuplot script of the curves in specified file.
18631
18632 interp
18633 Specify the kind of interpolation. Available algorithms are:
18634
18635 natural
18636 Natural cubic spline using a piece-wise cubic polynomial that
18637 is twice continuously differentiable.
18638
18639 pchip
18640 Monotonic cubic spline using a piecewise cubic Hermite
18641 interpolating polynomial (PCHIP).
18642
18643 To avoid some filtergraph syntax conflicts, each key points list need
18644 to be defined using the following syntax: "x0/y0 x1/y1 x2/y2 ...".
18645
18646 Commands
18647
18648 This filter supports same commands as options.
18649
18650 Examples
18651
18652 • Increase slightly the middle level of blue:
18653
18654 curves=blue='0/0 0.5/0.58 1/1'
18655
18656 • Vintage effect:
18657
18658 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'
18659
18660 Here we obtain the following coordinates for each components:
18661
18662 red "(0;0.11) (0.42;0.51) (1;0.95)"
18663
18664 green
18665 "(0;0) (0.50;0.48) (1;1)"
18666
18667 blue
18668 "(0;0.22) (0.49;0.44) (1;0.80)"
18669
18670 • The previous example can also be achieved with the associated
18671 built-in preset:
18672
18673 curves=preset=vintage
18674
18675 • Or simply:
18676
18677 curves=vintage
18678
18679 • Use a Photoshop preset and redefine the points of the green
18680 component:
18681
18682 curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
18683
18684 • Check out the curves of the "cross_process" profile using ffmpeg
18685 and gnuplot:
18686
18687 ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
18688 gnuplot -p /tmp/curves.plt
18689
18690 datascope
18691 Video data analysis filter.
18692
18693 This filter shows hexadecimal pixel values of part of video.
18694
18695 The filter accepts the following options:
18696
18697 size, s
18698 Set output video size.
18699
18700 x Set x offset from where to pick pixels.
18701
18702 y Set y offset from where to pick pixels.
18703
18704 mode
18705 Set scope mode, can be one of the following:
18706
18707 mono
18708 Draw hexadecimal pixel values with white color on black
18709 background.
18710
18711 color
18712 Draw hexadecimal pixel values with input video pixel color on
18713 black background.
18714
18715 color2
18716 Draw hexadecimal pixel values on color background picked from
18717 input video, the text color is picked in such way so its always
18718 visible.
18719
18720 axis
18721 Draw rows and columns numbers on left and top of video.
18722
18723 opacity
18724 Set background opacity.
18725
18726 format
18727 Set display number format. Can be "hex", or "dec". Default is
18728 "hex".
18729
18730 components
18731 Set pixel components to display. By default all pixel components
18732 are displayed.
18733
18734 Commands
18735
18736 This filter supports same commands as options excluding "size" option.
18737
18738 dblur
18739 Apply Directional blur filter.
18740
18741 The filter accepts the following options:
18742
18743 angle
18744 Set angle of directional blur. Default is 45.
18745
18746 radius
18747 Set radius of directional blur. Default is 5.
18748
18749 planes
18750 Set which planes to filter. By default all planes are filtered.
18751
18752 Commands
18753
18754 This filter supports same commands as options. The command accepts the
18755 same syntax of the corresponding option.
18756
18757 If the specified expression is not valid, it is kept at its current
18758 value.
18759
18760 dctdnoiz
18761 Denoise frames using 2D DCT (frequency domain filtering).
18762
18763 This filter is not designed for real time.
18764
18765 The filter accepts the following options:
18766
18767 sigma, s
18768 Set the noise sigma constant.
18769
18770 This sigma defines a hard threshold of "3 * sigma"; every DCT
18771 coefficient (absolute value) below this threshold with be dropped.
18772
18773 If you need a more advanced filtering, see expr.
18774
18775 Default is 0.
18776
18777 overlap
18778 Set number overlapping pixels for each block. Since the filter can
18779 be slow, you may want to reduce this value, at the cost of a less
18780 effective filter and the risk of various artefacts.
18781
18782 If the overlapping value doesn't permit processing the whole input
18783 width or height, a warning will be displayed and according borders
18784 won't be denoised.
18785
18786 Default value is blocksize-1, which is the best possible setting.
18787
18788 expr, e
18789 Set the coefficient factor expression.
18790
18791 For each coefficient of a DCT block, this expression will be
18792 evaluated as a multiplier value for the coefficient.
18793
18794 If this is option is set, the sigma option will be ignored.
18795
18796 The absolute value of the coefficient can be accessed through the c
18797 variable.
18798
18799 n Set the blocksize using the number of bits. "1<<n" defines the
18800 blocksize, which is the width and height of the processed blocks.
18801
18802 The default value is 3 (8x8) and can be raised to 4 for a blocksize
18803 of 16x16. Note that changing this setting has huge consequences on
18804 the speed processing. Also, a larger block size does not
18805 necessarily means a better de-noising.
18806
18807 Examples
18808
18809 Apply a denoise with a sigma of 4.5:
18810
18811 dctdnoiz=4.5
18812
18813 The same operation can be achieved using the expression system:
18814
18815 dctdnoiz=e='gte(c, 4.5*3)'
18816
18817 Violent denoise using a block size of "16x16":
18818
18819 dctdnoiz=15:n=4
18820
18821 deband
18822 Remove banding artifacts from input video. It works by replacing
18823 banded pixels with average value of referenced pixels.
18824
18825 The filter accepts the following options:
18826
18827 1thr
18828 2thr
18829 3thr
18830 4thr
18831 Set banding detection threshold for each plane. Default is 0.02.
18832 Valid range is 0.00003 to 0.5. If difference between current pixel
18833 and reference pixel is less than threshold, it will be considered
18834 as banded.
18835
18836 range, r
18837 Banding detection range in pixels. Default is 16. If positive,
18838 random number in range 0 to set value will be used. If negative,
18839 exact absolute value will be used. The range defines square of
18840 four pixels around current pixel.
18841
18842 direction, d
18843 Set direction in radians from which four pixel will be compared. If
18844 positive, random direction from 0 to set direction will be picked.
18845 If negative, exact of absolute value will be picked. For example
18846 direction 0, -PI or -2*PI radians will pick only pixels on same row
18847 and -PI/2 will pick only pixels on same column.
18848
18849 blur, b
18850 If enabled, current pixel is compared with average value of all
18851 four surrounding pixels. The default is enabled. If disabled
18852 current pixel is compared with all four surrounding pixels. The
18853 pixel is considered banded if only all four differences with
18854 surrounding pixels are less than threshold.
18855
18856 coupling, c
18857 If enabled, current pixel is changed if and only if all pixel
18858 components are banded, e.g. banding detection threshold is
18859 triggered for all color components. The default is disabled.
18860
18861 Commands
18862
18863 This filter supports the all above options as commands.
18864
18865 deblock
18866 Remove blocking artifacts from input video.
18867
18868 The filter accepts the following options:
18869
18870 filter
18871 Set filter type, can be weak or strong. Default is strong. This
18872 controls what kind of deblocking is applied.
18873
18874 block
18875 Set size of block, allowed range is from 4 to 512. Default is 8.
18876
18877 alpha
18878 beta
18879 gamma
18880 delta
18881 Set blocking detection thresholds. Allowed range is 0 to 1.
18882 Defaults are: 0.098 for alpha and 0.05 for the rest. Using higher
18883 threshold gives more deblocking strength. Setting alpha controls
18884 threshold detection at exact edge of block. Remaining options
18885 controls threshold detection near the edge. Each one for
18886 below/above or left/right. Setting any of those to 0 disables
18887 deblocking.
18888
18889 planes
18890 Set planes to filter. Default is to filter all available planes.
18891
18892 Examples
18893
18894 • Deblock using weak filter and block size of 4 pixels.
18895
18896 deblock=filter=weak:block=4
18897
18898 • Deblock using strong filter, block size of 4 pixels and custom
18899 thresholds for deblocking more edges.
18900
18901 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
18902
18903 • Similar as above, but filter only first plane.
18904
18905 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
18906
18907 • Similar as above, but filter only second and third plane.
18908
18909 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
18910
18911 Commands
18912
18913 This filter supports the all above options as commands.
18914
18915 decimate
18916 Drop duplicated frames at regular intervals.
18917
18918 The filter accepts the following options:
18919
18920 cycle
18921 Set the number of frames from which one will be dropped. Setting
18922 this to N means one frame in every batch of N frames will be
18923 dropped. Default is 5.
18924
18925 dupthresh
18926 Set the threshold for duplicate detection. If the difference metric
18927 for a frame is less than or equal to this value, then it is
18928 declared as duplicate. Default is 1.1
18929
18930 scthresh
18931 Set scene change threshold. Default is 15.
18932
18933 blockx
18934 blocky
18935 Set the size of the x and y-axis blocks used during metric
18936 calculations. Larger blocks give better noise suppression, but
18937 also give worse detection of small movements. Must be a power of
18938 two. Default is 32.
18939
18940 ppsrc
18941 Mark main input as a pre-processed input and activate clean source
18942 input stream. This allows the input to be pre-processed with
18943 various filters to help the metrics calculation while keeping the
18944 frame selection lossless. When set to 1, the first stream is for
18945 the pre-processed input, and the second stream is the clean source
18946 from where the kept frames are chosen. Default is 0.
18947
18948 chroma
18949 Set whether or not chroma is considered in the metric calculations.
18950 Default is 1.
18951
18952 mixed
18953 Set whether or not the input only partially contains content to be
18954 decimated. Default is "false". If enabled video output stream
18955 will be in variable frame rate.
18956
18957 deconvolve
18958 Apply 2D deconvolution of video stream in frequency domain using second
18959 stream as impulse.
18960
18961 The filter accepts the following options:
18962
18963 planes
18964 Set which planes to process.
18965
18966 impulse
18967 Set which impulse video frames will be processed, can be first or
18968 all. Default is all.
18969
18970 noise
18971 Set noise when doing divisions. Default is 0.0000001. Useful when
18972 width and height are not same and not power of 2 or if stream prior
18973 to convolving had noise.
18974
18975 The "deconvolve" filter also supports the framesync options.
18976
18977 dedot
18978 Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from
18979 video.
18980
18981 It accepts the following options:
18982
18983 m Set mode of operation. Can be combination of dotcrawl for cross-
18984 luminance reduction and/or rainbows for cross-color reduction.
18985
18986 lt Set spatial luma threshold. Lower values increases reduction of
18987 cross-luminance.
18988
18989 tl Set tolerance for temporal luma. Higher values increases reduction
18990 of cross-luminance.
18991
18992 tc Set tolerance for chroma temporal variation. Higher values
18993 increases reduction of cross-color.
18994
18995 ct Set temporal chroma threshold. Lower values increases reduction of
18996 cross-color.
18997
18998 deflate
18999 Apply deflate effect to the video.
19000
19001 This filter replaces the pixel by the local(3x3) average by taking into
19002 account only values lower than the pixel.
19003
19004 It accepts the following options:
19005
19006 threshold0
19007 threshold1
19008 threshold2
19009 threshold3
19010 Limit the maximum change for each plane, default is 65535. If 0,
19011 plane will remain unchanged.
19012
19013 Commands
19014
19015 This filter supports the all above options as commands.
19016
19017 deflicker
19018 Remove temporal frame luminance variations.
19019
19020 It accepts the following options:
19021
19022 size, s
19023 Set moving-average filter size in frames. Default is 5. Allowed
19024 range is 2 - 129.
19025
19026 mode, m
19027 Set averaging mode to smooth temporal luminance variations.
19028
19029 Available values are:
19030
19031 am Arithmetic mean
19032
19033 gm Geometric mean
19034
19035 hm Harmonic mean
19036
19037 qm Quadratic mean
19038
19039 cm Cubic mean
19040
19041 pm Power mean
19042
19043 median
19044 Median
19045
19046 bypass
19047 Do not actually modify frame. Useful when one only wants metadata.
19048
19049 dejudder
19050 Remove judder produced by partially interlaced telecined content.
19051
19052 Judder can be introduced, for instance, by pullup filter. If the
19053 original source was partially telecined content then the output of
19054 "pullup,dejudder" will have a variable frame rate. May change the
19055 recorded frame rate of the container. Aside from that change, this
19056 filter will not affect constant frame rate video.
19057
19058 The option available in this filter is:
19059
19060 cycle
19061 Specify the length of the window over which the judder repeats.
19062
19063 Accepts any integer greater than 1. Useful values are:
19064
19065 4 If the original was telecined from 24 to 30 fps (Film to NTSC).
19066
19067 5 If the original was telecined from 25 to 30 fps (PAL to NTSC).
19068
19069 20 If a mixture of the two.
19070
19071 The default is 4.
19072
19073 delogo
19074 Suppress a TV station logo by a simple interpolation of the surrounding
19075 pixels. Just set a rectangle covering the logo and watch it disappear
19076 (and sometimes something even uglier appear - your mileage may vary).
19077
19078 It accepts the following parameters:
19079
19080 x
19081 y Specify the top left corner coordinates of the logo. They must be
19082 specified.
19083
19084 w
19085 h Specify the width and height of the logo to clear. They must be
19086 specified.
19087
19088 show
19089 When set to 1, a green rectangle is drawn on the screen to simplify
19090 finding the right x, y, w, and h parameters. The default value is
19091 0.
19092
19093 The rectangle is drawn on the outermost pixels which will be
19094 (partly) replaced with interpolated values. The values of the next
19095 pixels immediately outside this rectangle in each direction will be
19096 used to compute the interpolated pixel values inside the rectangle.
19097
19098 Examples
19099
19100 • Set a rectangle covering the area with top left corner coordinates
19101 0,0 and size 100x77:
19102
19103 delogo=x=0:y=0:w=100:h=77
19104
19105 derain
19106 Remove the rain in the input image/video by applying the derain methods
19107 based on convolutional neural networks. Supported models:
19108
19109 • Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
19110 See
19111 <http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf>.
19112
19113 Training as well as model generation scripts are provided in the
19114 repository at <https://github.com/XueweiMeng/derain_filter.git>.
19115
19116 Native model files (.model) can be generated from TensorFlow model
19117 files (.pb) by using tools/python/convert.py
19118
19119 The filter accepts the following options:
19120
19121 filter_type
19122 Specify which filter to use. This option accepts the following
19123 values:
19124
19125 derain
19126 Derain filter. To conduct derain filter, you need to use a
19127 derain model.
19128
19129 dehaze
19130 Dehaze filter. To conduct dehaze filter, you need to use a
19131 dehaze model.
19132
19133 Default value is derain.
19134
19135 dnn_backend
19136 Specify which DNN backend to use for model loading and execution.
19137 This option accepts the following values:
19138
19139 native
19140 Native implementation of DNN loading and execution.
19141
19142 tensorflow
19143 TensorFlow backend. To enable this backend you need to install
19144 the TensorFlow for C library (see
19145 <https://www.tensorflow.org/install/lang_c>) and configure
19146 FFmpeg with "--enable-libtensorflow"
19147
19148 Default value is native.
19149
19150 model
19151 Set path to model file specifying network architecture and its
19152 parameters. Note that different backends use different file
19153 formats. TensorFlow and native backend can load files for only its
19154 format.
19155
19156 To get full functionality (such as async execution), please use the
19157 dnn_processing filter.
19158
19159 deshake
19160 Attempt to fix small changes in horizontal and/or vertical shift. This
19161 filter helps remove camera shake from hand-holding a camera, bumping a
19162 tripod, moving on a vehicle, etc.
19163
19164 The filter accepts the following options:
19165
19166 x
19167 y
19168 w
19169 h Specify a rectangular area where to limit the search for motion
19170 vectors. If desired the search for motion vectors can be limited
19171 to a rectangular area of the frame defined by its top left corner,
19172 width and height. These parameters have the same meaning as the
19173 drawbox filter which can be used to visualise the position of the
19174 bounding box.
19175
19176 This is useful when simultaneous movement of subjects within the
19177 frame might be confused for camera motion by the motion vector
19178 search.
19179
19180 If any or all of x, y, w and h are set to -1 then the full frame is
19181 used. This allows later options to be set without specifying the
19182 bounding box for the motion vector search.
19183
19184 Default - search the whole frame.
19185
19186 rx
19187 ry Specify the maximum extent of movement in x and y directions in the
19188 range 0-64 pixels. Default 16.
19189
19190 edge
19191 Specify how to generate pixels to fill blanks at the edge of the
19192 frame. Available values are:
19193
19194 blank, 0
19195 Fill zeroes at blank locations
19196
19197 original, 1
19198 Original image at blank locations
19199
19200 clamp, 2
19201 Extruded edge value at blank locations
19202
19203 mirror, 3
19204 Mirrored edge at blank locations
19205
19206 Default value is mirror.
19207
19208 blocksize
19209 Specify the blocksize to use for motion search. Range 4-128 pixels,
19210 default 8.
19211
19212 contrast
19213 Specify the contrast threshold for blocks. Only blocks with more
19214 than the specified contrast (difference between darkest and
19215 lightest pixels) will be considered. Range 1-255, default 125.
19216
19217 search
19218 Specify the search strategy. Available values are:
19219
19220 exhaustive, 0
19221 Set exhaustive search
19222
19223 less, 1
19224 Set less exhaustive search.
19225
19226 Default value is exhaustive.
19227
19228 filename
19229 If set then a detailed log of the motion search is written to the
19230 specified file.
19231
19232 despill
19233 Remove unwanted contamination of foreground colors, caused by reflected
19234 color of greenscreen or bluescreen.
19235
19236 This filter accepts the following options:
19237
19238 type
19239 Set what type of despill to use.
19240
19241 mix Set how spillmap will be generated.
19242
19243 expand
19244 Set how much to get rid of still remaining spill.
19245
19246 red Controls amount of red in spill area.
19247
19248 green
19249 Controls amount of green in spill area. Should be -1 for
19250 greenscreen.
19251
19252 blue
19253 Controls amount of blue in spill area. Should be -1 for
19254 bluescreen.
19255
19256 brightness
19257 Controls brightness of spill area, preserving colors.
19258
19259 alpha
19260 Modify alpha from generated spillmap.
19261
19262 Commands
19263
19264 This filter supports the all above options as commands.
19265
19266 detelecine
19267 Apply an exact inverse of the telecine operation. It requires a
19268 predefined pattern specified using the pattern option which must be the
19269 same as that passed to the telecine filter.
19270
19271 This filter accepts the following options:
19272
19273 first_field
19274 top, t
19275 top field first
19276
19277 bottom, b
19278 bottom field first The default value is "top".
19279
19280 pattern
19281 A string of numbers representing the pulldown pattern you wish to
19282 apply. The default value is 23.
19283
19284 start_frame
19285 A number representing position of the first frame with respect to
19286 the telecine pattern. This is to be used if the stream is cut. The
19287 default value is 0.
19288
19289 dilation
19290 Apply dilation effect to the video.
19291
19292 This filter replaces the pixel by the local(3x3) maximum.
19293
19294 It accepts the following options:
19295
19296 threshold0
19297 threshold1
19298 threshold2
19299 threshold3
19300 Limit the maximum change for each plane, default is 65535. If 0,
19301 plane will remain unchanged.
19302
19303 coordinates
19304 Flag which specifies the pixel to refer to. Default is 255 i.e. all
19305 eight pixels are used.
19306
19307 Flags to local 3x3 coordinates maps like this:
19308
19309 1 2 3
19310 4 5
19311 6 7 8
19312
19313 Commands
19314
19315 This filter supports the all above options as commands.
19316
19317 displace
19318 Displace pixels as indicated by second and third input stream.
19319
19320 It takes three input streams and outputs one stream, the first input is
19321 the source, and second and third input are displacement maps.
19322
19323 The second input specifies how much to displace pixels along the
19324 x-axis, while the third input specifies how much to displace pixels
19325 along the y-axis. If one of displacement map streams terminates, last
19326 frame from that displacement map will be used.
19327
19328 Note that once generated, displacements maps can be reused over and
19329 over again.
19330
19331 A description of the accepted options follows.
19332
19333 edge
19334 Set displace behavior for pixels that are out of range.
19335
19336 Available values are:
19337
19338 blank
19339 Missing pixels are replaced by black pixels.
19340
19341 smear
19342 Adjacent pixels will spread out to replace missing pixels.
19343
19344 wrap
19345 Out of range pixels are wrapped so they point to pixels of
19346 other side.
19347
19348 mirror
19349 Out of range pixels will be replaced with mirrored pixels.
19350
19351 Default is smear.
19352
19353 Examples
19354
19355 • Add ripple effect to rgb input of video size hd720:
19356
19357 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
19358
19359 • Add wave effect to rgb input of video size hd720:
19360
19361 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
19362
19363 dnn_classify
19364 Do classification with deep neural networks based on bounding boxes.
19365
19366 The filter accepts the following options:
19367
19368 dnn_backend
19369 Specify which DNN backend to use for model loading and execution.
19370 This option accepts only openvino now, tensorflow backends will be
19371 added.
19372
19373 model
19374 Set path to model file specifying network architecture and its
19375 parameters. Note that different backends use different file
19376 formats.
19377
19378 input
19379 Set the input name of the dnn network.
19380
19381 output
19382 Set the output name of the dnn network.
19383
19384 confidence
19385 Set the confidence threshold (default: 0.5).
19386
19387 labels
19388 Set path to label file specifying the mapping between label id and
19389 name. Each label name is written in one line, tailing spaces and
19390 empty lines are skipped. The first line is the name of label id 0,
19391 and the second line is the name of label id 1, etc. The label id
19392 is considered as name if the label file is not provided.
19393
19394 backend_configs
19395 Set the configs to be passed into backend
19396
19397 For tensorflow backend, you can set its configs with sess_config
19398 options, please use tools/python/tf_sess_config.py to get the
19399 configs for your system.
19400
19401 dnn_detect
19402 Do object detection with deep neural networks.
19403
19404 The filter accepts the following options:
19405
19406 dnn_backend
19407 Specify which DNN backend to use for model loading and execution.
19408 This option accepts only openvino now, tensorflow backends will be
19409 added.
19410
19411 model
19412 Set path to model file specifying network architecture and its
19413 parameters. Note that different backends use different file
19414 formats.
19415
19416 input
19417 Set the input name of the dnn network.
19418
19419 output
19420 Set the output name of the dnn network.
19421
19422 confidence
19423 Set the confidence threshold (default: 0.5).
19424
19425 labels
19426 Set path to label file specifying the mapping between label id and
19427 name. Each label name is written in one line, tailing spaces and
19428 empty lines are skipped. The first line is the name of label id 0
19429 (usually it is 'background'), and the second line is the name of
19430 label id 1, etc. The label id is considered as name if the label
19431 file is not provided.
19432
19433 backend_configs
19434 Set the configs to be passed into backend. To use async execution,
19435 set async (default: set). Roll back to sync execution if the
19436 backend does not support async.
19437
19438 dnn_processing
19439 Do image processing with deep neural networks. It works together with
19440 another filter which converts the pixel format of the Frame to what the
19441 dnn network requires.
19442
19443 The filter accepts the following options:
19444
19445 dnn_backend
19446 Specify which DNN backend to use for model loading and execution.
19447 This option accepts the following values:
19448
19449 native
19450 Native implementation of DNN loading and execution.
19451
19452 tensorflow
19453 TensorFlow backend. To enable this backend you need to install
19454 the TensorFlow for C library (see
19455 <https://www.tensorflow.org/install/lang_c>) and configure
19456 FFmpeg with "--enable-libtensorflow"
19457
19458 openvino
19459 OpenVINO backend. To enable this backend you need to build and
19460 install the OpenVINO for C library (see
19461 <https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md>)
19462 and configure FFmpeg with "--enable-libopenvino"
19463 (--extra-cflags=-I... --extra-ldflags=-L... might be needed if
19464 the header files and libraries are not installed into system
19465 path)
19466
19467 Default value is native.
19468
19469 model
19470 Set path to model file specifying network architecture and its
19471 parameters. Note that different backends use different file
19472 formats. TensorFlow, OpenVINO and native backend can load files for
19473 only its format.
19474
19475 Native model file (.model) can be generated from TensorFlow model
19476 file (.pb) by using tools/python/convert.py
19477
19478 input
19479 Set the input name of the dnn network.
19480
19481 output
19482 Set the output name of the dnn network.
19483
19484 backend_configs
19485 Set the configs to be passed into backend. To use async execution,
19486 set async (default: set). Roll back to sync execution if the
19487 backend does not support async.
19488
19489 For tensorflow backend, you can set its configs with sess_config
19490 options, please use tools/python/tf_sess_config.py to get the
19491 configs of TensorFlow backend for your system.
19492
19493 Examples
19494
19495 • Remove rain in rgb24 frame with can.pb (see derain filter):
19496
19497 ./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg
19498
19499 • Halve the pixel value of the frame with format gray32f:
19500
19501 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
19502
19503 • Handle the Y channel with srcnn.pb (see sr filter) for frame with
19504 yuv420p (planar YUV formats supported):
19505
19506 ./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
19507
19508 • Handle the Y channel with espcn.pb (see sr filter), which changes
19509 frame size, for format yuv420p (planar YUV formats supported),
19510 please use tools/python/tf_sess_config.py to get the configs of
19511 TensorFlow backend for your system.
19512
19513 ./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
19514
19515 drawbox
19516 Draw a colored box on the input image.
19517
19518 It accepts the following parameters:
19519
19520 x
19521 y The expressions which specify the top left corner coordinates of
19522 the box. It defaults to 0.
19523
19524 width, w
19525 height, h
19526 The expressions which specify the width and height of the box; if 0
19527 they are interpreted as the input width and height. It defaults to
19528 0.
19529
19530 color, c
19531 Specify the color of the box to write. For the general syntax of
19532 this option, check the "Color" section in the ffmpeg-utils manual.
19533 If the special value "invert" is used, the box edge color is the
19534 same as the video with inverted luma.
19535
19536 thickness, t
19537 The expression which sets the thickness of the box edge. A value
19538 of "fill" will create a filled box. Default value is 3.
19539
19540 See below for the list of accepted constants.
19541
19542 replace
19543 Applicable if the input has alpha. With value 1, the pixels of the
19544 painted box will overwrite the video's color and alpha pixels.
19545 Default is 0, which composites the box onto the input, leaving the
19546 video's alpha intact.
19547
19548 The parameters for x, y, w and h and t are expressions containing the
19549 following constants:
19550
19551 dar The input display aspect ratio, it is the same as (w / h) * sar.
19552
19553 hsub
19554 vsub
19555 horizontal and vertical chroma subsample values. For example for
19556 the pixel format "yuv422p" hsub is 2 and vsub is 1.
19557
19558 in_h, ih
19559 in_w, iw
19560 The input width and height.
19561
19562 sar The input sample aspect ratio.
19563
19564 x
19565 y The x and y offset coordinates where the box is drawn.
19566
19567 w
19568 h The width and height of the drawn box.
19569
19570 box_source
19571 Box source can be set as side_data_detection_bboxes if you want to
19572 use box data in detection bboxes of side data.
19573
19574 If box_source is set, the x, y, width and height will be ignored
19575 and still use box data in detection bboxes of side data. So please
19576 do not use this parameter if you were not sure about the box
19577 source.
19578
19579 t The thickness of the drawn box.
19580
19581 These constants allow the x, y, w, h and t expressions to refer to
19582 each other, so you may for example specify "y=x/dar" or "h=w/dar".
19583
19584 Examples
19585
19586 • Draw a black box around the edge of the input image:
19587
19588 drawbox
19589
19590 • Draw a box with color red and an opacity of 50%:
19591
19592 drawbox=10:20:200:60:red@0.5
19593
19594 The previous example can be specified as:
19595
19596 drawbox=x=10:y=20:w=200:h=60:color=red@0.5
19597
19598 • Fill the box with pink color:
19599
19600 drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
19601
19602 • Draw a 2-pixel red 2.40:1 mask:
19603
19604 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
19605
19606 Commands
19607
19608 This filter supports same commands as options. The command accepts the
19609 same syntax of the corresponding option.
19610
19611 If the specified expression is not valid, it is kept at its current
19612 value.
19613
19614 drawgraph
19615 Draw a graph using input video metadata.
19616
19617 It accepts the following parameters:
19618
19619 m1 Set 1st frame metadata key from which metadata values will be used
19620 to draw a graph.
19621
19622 fg1 Set 1st foreground color expression.
19623
19624 m2 Set 2nd frame metadata key from which metadata values will be used
19625 to draw a graph.
19626
19627 fg2 Set 2nd foreground color expression.
19628
19629 m3 Set 3rd frame metadata key from which metadata values will be used
19630 to draw a graph.
19631
19632 fg3 Set 3rd foreground color expression.
19633
19634 m4 Set 4th frame metadata key from which metadata values will be used
19635 to draw a graph.
19636
19637 fg4 Set 4th foreground color expression.
19638
19639 min Set minimal value of metadata value.
19640
19641 max Set maximal value of metadata value.
19642
19643 bg Set graph background color. Default is white.
19644
19645 mode
19646 Set graph mode.
19647
19648 Available values for mode is:
19649
19650 bar
19651 dot
19652 line
19653
19654 Default is "line".
19655
19656 slide
19657 Set slide mode.
19658
19659 Available values for slide is:
19660
19661 frame
19662 Draw new frame when right border is reached.
19663
19664 replace
19665 Replace old columns with new ones.
19666
19667 scroll
19668 Scroll from right to left.
19669
19670 rscroll
19671 Scroll from left to right.
19672
19673 picture
19674 Draw single picture.
19675
19676 Default is "frame".
19677
19678 size
19679 Set size of graph video. For the syntax of this option, check the
19680 "Video size" section in the ffmpeg-utils manual. The default value
19681 is "900x256".
19682
19683 rate, r
19684 Set the output frame rate. Default value is 25.
19685
19686 The foreground color expressions can use the following variables:
19687
19688 MIN Minimal value of metadata value.
19689
19690 MAX Maximal value of metadata value.
19691
19692 VAL Current metadata key value.
19693
19694 The color is defined as 0xAABBGGRR.
19695
19696 Example using metadata from signalstats filter:
19697
19698 signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
19699
19700 Example using metadata from ebur128 filter:
19701
19702 ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
19703
19704 drawgrid
19705 Draw a grid on the input image.
19706
19707 It accepts the following parameters:
19708
19709 x
19710 y The expressions which specify the coordinates of some point of grid
19711 intersection (meant to configure offset). Both default to 0.
19712
19713 width, w
19714 height, h
19715 The expressions which specify the width and height of the grid
19716 cell, if 0 they are interpreted as the input width and height,
19717 respectively, minus "thickness", so image gets framed. Default to
19718 0.
19719
19720 color, c
19721 Specify the color of the grid. For the general syntax of this
19722 option, check the "Color" section in the ffmpeg-utils manual. If
19723 the special value "invert" is used, the grid color is the same as
19724 the video with inverted luma.
19725
19726 thickness, t
19727 The expression which sets the thickness of the grid line. Default
19728 value is 1.
19729
19730 See below for the list of accepted constants.
19731
19732 replace
19733 Applicable if the input has alpha. With 1 the pixels of the painted
19734 grid will overwrite the video's color and alpha pixels. Default is
19735 0, which composites the grid onto the input, leaving the video's
19736 alpha intact.
19737
19738 The parameters for x, y, w and h and t are expressions containing the
19739 following constants:
19740
19741 dar The input display aspect ratio, it is the same as (w / h) * sar.
19742
19743 hsub
19744 vsub
19745 horizontal and vertical chroma subsample values. For example for
19746 the pixel format "yuv422p" hsub is 2 and vsub is 1.
19747
19748 in_h, ih
19749 in_w, iw
19750 The input grid cell width and height.
19751
19752 sar The input sample aspect ratio.
19753
19754 x
19755 y The x and y coordinates of some point of grid intersection (meant
19756 to configure offset).
19757
19758 w
19759 h The width and height of the drawn cell.
19760
19761 t The thickness of the drawn cell.
19762
19763 These constants allow the x, y, w, h and t expressions to refer to
19764 each other, so you may for example specify "y=x/dar" or "h=w/dar".
19765
19766 Examples
19767
19768 • Draw a grid with cell 100x100 pixels, thickness 2 pixels, with
19769 color red and an opacity of 50%:
19770
19771 drawgrid=width=100:height=100:thickness=2:color=red@0.5
19772
19773 • Draw a white 3x3 grid with an opacity of 50%:
19774
19775 drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
19776
19777 Commands
19778
19779 This filter supports same commands as options. The command accepts the
19780 same syntax of the corresponding option.
19781
19782 If the specified expression is not valid, it is kept at its current
19783 value.
19784
19785 drawtext
19786 Draw a text string or text from a specified file on top of a video,
19787 using the libfreetype library.
19788
19789 To enable compilation of this filter, you need to configure FFmpeg with
19790 "--enable-libfreetype". To enable default font fallback and the font
19791 option you need to configure FFmpeg with "--enable-libfontconfig". To
19792 enable the text_shaping option, you need to configure FFmpeg with
19793 "--enable-libfribidi".
19794
19795 Syntax
19796
19797 It accepts the following parameters:
19798
19799 box Used to draw a box around text using the background color. The
19800 value must be either 1 (enable) or 0 (disable). The default value
19801 of box is 0.
19802
19803 boxborderw
19804 Set the width of the border to be drawn around the box using
19805 boxcolor. The default value of boxborderw is 0.
19806
19807 boxcolor
19808 The color to be used for drawing box around text. For the syntax of
19809 this option, check the "Color" section in the ffmpeg-utils manual.
19810
19811 The default value of boxcolor is "white".
19812
19813 line_spacing
19814 Set the line spacing in pixels of the border to be drawn around the
19815 box using box. The default value of line_spacing is 0.
19816
19817 borderw
19818 Set the width of the border to be drawn around the text using
19819 bordercolor. The default value of borderw is 0.
19820
19821 bordercolor
19822 Set the color to be used for drawing border around text. For the
19823 syntax of this option, check the "Color" section in the ffmpeg-
19824 utils manual.
19825
19826 The default value of bordercolor is "black".
19827
19828 expansion
19829 Select how the text is expanded. Can be either "none", "strftime"
19830 (deprecated) or "normal" (default). See the drawtext_expansion,
19831 Text expansion section below for details.
19832
19833 basetime
19834 Set a start time for the count. Value is in microseconds. Only
19835 applied in the deprecated strftime expansion mode. To emulate in
19836 normal expansion mode use the "pts" function, supplying the start
19837 time (in seconds) as the second argument.
19838
19839 fix_bounds
19840 If true, check and fix text coords to avoid clipping.
19841
19842 fontcolor
19843 The color to be used for drawing fonts. For the syntax of this
19844 option, check the "Color" section in the ffmpeg-utils manual.
19845
19846 The default value of fontcolor is "black".
19847
19848 fontcolor_expr
19849 String which is expanded the same way as text to obtain dynamic
19850 fontcolor value. By default this option has empty value and is not
19851 processed. When this option is set, it overrides fontcolor option.
19852
19853 font
19854 The font family to be used for drawing text. By default Sans.
19855
19856 fontfile
19857 The font file to be used for drawing text. The path must be
19858 included. This parameter is mandatory if the fontconfig support is
19859 disabled.
19860
19861 alpha
19862 Draw the text applying alpha blending. The value can be a number
19863 between 0.0 and 1.0. The expression accepts the same variables x,
19864 y as well. The default value is 1. Please see fontcolor_expr.
19865
19866 fontsize
19867 The font size to be used for drawing text. The default value of
19868 fontsize is 16.
19869
19870 text_shaping
19871 If set to 1, attempt to shape the text (for example, reverse the
19872 order of right-to-left text and join Arabic characters) before
19873 drawing it. Otherwise, just draw the text exactly as given. By
19874 default 1 (if supported).
19875
19876 ft_load_flags
19877 The flags to be used for loading the fonts.
19878
19879 The flags map the corresponding flags supported by libfreetype, and
19880 are a combination of the following values:
19881
19882 default
19883 no_scale
19884 no_hinting
19885 render
19886 no_bitmap
19887 vertical_layout
19888 force_autohint
19889 crop_bitmap
19890 pedantic
19891 ignore_global_advance_width
19892 no_recurse
19893 ignore_transform
19894 monochrome
19895 linear_design
19896 no_autohint
19897
19898 Default value is "default".
19899
19900 For more information consult the documentation for the FT_LOAD_*
19901 libfreetype flags.
19902
19903 shadowcolor
19904 The color to be used for drawing a shadow behind the drawn text.
19905 For the syntax of this option, check the "Color" section in the
19906 ffmpeg-utils manual.
19907
19908 The default value of shadowcolor is "black".
19909
19910 shadowx
19911 shadowy
19912 The x and y offsets for the text shadow position with respect to
19913 the position of the text. They can be either positive or negative
19914 values. The default value for both is "0".
19915
19916 start_number
19917 The starting frame number for the n/frame_num variable. The default
19918 value is "0".
19919
19920 tabsize
19921 The size in number of spaces to use for rendering the tab. Default
19922 value is 4.
19923
19924 timecode
19925 Set the initial timecode representation in "hh:mm:ss[:;.]ff"
19926 format. It can be used with or without text parameter.
19927 timecode_rate option must be specified.
19928
19929 timecode_rate, rate, r
19930 Set the timecode frame rate (timecode only). Value will be rounded
19931 to nearest integer. Minimum value is "1". Drop-frame timecode is
19932 supported for frame rates 30 & 60.
19933
19934 tc24hmax
19935 If set to 1, the output of the timecode option will wrap around at
19936 24 hours. Default is 0 (disabled).
19937
19938 text
19939 The text string to be drawn. The text must be a sequence of UTF-8
19940 encoded characters. This parameter is mandatory if no file is
19941 specified with the parameter textfile.
19942
19943 textfile
19944 A text file containing text to be drawn. The text must be a
19945 sequence of UTF-8 encoded characters.
19946
19947 This parameter is mandatory if no text string is specified with the
19948 parameter text.
19949
19950 If both text and textfile are specified, an error is thrown.
19951
19952 text_source
19953 Text source should be set as side_data_detection_bboxes if you want
19954 to use text data in detection bboxes of side data.
19955
19956 If text source is set, text and textfile will be ignored and still
19957 use text data in detection bboxes of side data. So please do not
19958 use this parameter if you are not sure about the text source.
19959
19960 reload
19961 The textfile will be reloaded at specified frame interval. Be sure
19962 to update textfile atomically, or it may be read partially, or even
19963 fail. Range is 0 to INT_MAX. Default is 0.
19964
19965 x
19966 y The expressions which specify the offsets where text will be drawn
19967 within the video frame. They are relative to the top/left border of
19968 the output image.
19969
19970 The default value of x and y is "0".
19971
19972 See below for the list of accepted constants and functions.
19973
19974 The parameters for x and y are expressions containing the following
19975 constants and functions:
19976
19977 dar input display aspect ratio, it is the same as (w / h) * sar
19978
19979 hsub
19980 vsub
19981 horizontal and vertical chroma subsample values. For example for
19982 the pixel format "yuv422p" hsub is 2 and vsub is 1.
19983
19984 line_h, lh
19985 the height of each text line
19986
19987 main_h, h, H
19988 the input height
19989
19990 main_w, w, W
19991 the input width
19992
19993 max_glyph_a, ascent
19994 the maximum distance from the baseline to the highest/upper grid
19995 coordinate used to place a glyph outline point, for all the
19996 rendered glyphs. It is a positive value, due to the grid's
19997 orientation with the Y axis upwards.
19998
19999 max_glyph_d, descent
20000 the maximum distance from the baseline to the lowest grid
20001 coordinate used to place a glyph outline point, for all the
20002 rendered glyphs. This is a negative value, due to the grid's
20003 orientation, with the Y axis upwards.
20004
20005 max_glyph_h
20006 maximum glyph height, that is the maximum height for all the glyphs
20007 contained in the rendered text, it is equivalent to ascent -
20008 descent.
20009
20010 max_glyph_w
20011 maximum glyph width, that is the maximum width for all the glyphs
20012 contained in the rendered text
20013
20014 n the number of input frame, starting from 0
20015
20016 rand(min, max)
20017 return a random number included between min and max
20018
20019 sar The input sample aspect ratio.
20020
20021 t timestamp expressed in seconds, NAN if the input timestamp is
20022 unknown
20023
20024 text_h, th
20025 the height of the rendered text
20026
20027 text_w, tw
20028 the width of the rendered text
20029
20030 x
20031 y the x and y offset coordinates where the text is drawn.
20032
20033 These parameters allow the x and y expressions to refer to each
20034 other, so you can for example specify "y=x/dar".
20035
20036 pict_type
20037 A one character description of the current frame's picture type.
20038
20039 pkt_pos
20040 The current packet's position in the input file or stream (in
20041 bytes, from the start of the input). A value of -1 indicates this
20042 info is not available.
20043
20044 duration
20045 The current packet's duration, in seconds.
20046
20047 pkt_size
20048 The current packet's size (in bytes).
20049
20050 Text expansion
20051
20052 If expansion is set to "strftime", the filter recognizes strftime()
20053 sequences in the provided text and expands them accordingly. Check the
20054 documentation of strftime(). This feature is deprecated.
20055
20056 If expansion is set to "none", the text is printed verbatim.
20057
20058 If expansion is set to "normal" (which is the default), the following
20059 expansion mechanism is used.
20060
20061 The backslash character \, followed by any character, always expands to
20062 the second character.
20063
20064 Sequences of the form "%{...}" are expanded. The text between the
20065 braces is a function name, possibly followed by arguments separated by
20066 ':'. If the arguments contain special characters or delimiters (':' or
20067 '}'), they should be escaped.
20068
20069 Note that they probably must also be escaped as the value for the text
20070 option in the filter argument string and as the filter argument in the
20071 filtergraph description, and possibly also for the shell, that makes up
20072 to four levels of escaping; using a text file avoids these problems.
20073
20074 The following functions are available:
20075
20076 expr, e
20077 The expression evaluation result.
20078
20079 It must take one argument specifying the expression to be
20080 evaluated, which accepts the same constants and functions as the x
20081 and y values. Note that not all constants should be used, for
20082 example the text size is not known when evaluating the expression,
20083 so the constants text_w and text_h will have an undefined value.
20084
20085 expr_int_format, eif
20086 Evaluate the expression's value and output as formatted integer.
20087
20088 The first argument is the expression to be evaluated, just as for
20089 the expr function. The second argument specifies the output
20090 format. Allowed values are x, X, d and u. They are treated exactly
20091 as in the "printf" function. The third parameter is optional and
20092 sets the number of positions taken by the output. It can be used
20093 to add padding with zeros from the left.
20094
20095 gmtime
20096 The time at which the filter is running, expressed in UTC. It can
20097 accept an argument: a strftime() format string. The format string
20098 is extended to support the variable %[1-6]N which prints fractions
20099 of the second with optionally specified number of digits.
20100
20101 localtime
20102 The time at which the filter is running, expressed in the local
20103 time zone. It can accept an argument: a strftime() format string.
20104 The format string is extended to support the variable %[1-6]N which
20105 prints fractions of the second with optionally specified number of
20106 digits.
20107
20108 metadata
20109 Frame metadata. Takes one or two arguments.
20110
20111 The first argument is mandatory and specifies the metadata key.
20112
20113 The second argument is optional and specifies a default value, used
20114 when the metadata key is not found or empty.
20115
20116 Available metadata can be identified by inspecting entries starting
20117 with TAG included within each frame section printed by running
20118 "ffprobe -show_frames".
20119
20120 String metadata generated in filters leading to the drawtext filter
20121 are also available.
20122
20123 n, frame_num
20124 The frame number, starting from 0.
20125
20126 pict_type
20127 A one character description of the current picture type.
20128
20129 pts The timestamp of the current frame. It can take up to three
20130 arguments.
20131
20132 The first argument is the format of the timestamp; it defaults to
20133 "flt" for seconds as a decimal number with microsecond accuracy;
20134 "hms" stands for a formatted [-]HH:MM:SS.mmm timestamp with
20135 millisecond accuracy. "gmtime" stands for the timestamp of the
20136 frame formatted as UTC time; "localtime" stands for the timestamp
20137 of the frame formatted as local time zone time.
20138
20139 The second argument is an offset added to the timestamp.
20140
20141 If the format is set to "hms", a third argument "24HH" may be
20142 supplied to present the hour part of the formatted timestamp in 24h
20143 format (00-23).
20144
20145 If the format is set to "localtime" or "gmtime", a third argument
20146 may be supplied: a strftime() format string. By default, YYYY-MM-
20147 DD HH:MM:SS format will be used.
20148
20149 Commands
20150
20151 This filter supports altering parameters via commands:
20152
20153 reinit
20154 Alter existing filter parameters.
20155
20156 Syntax for the argument is the same as for filter invocation, e.g.
20157
20158 fontsize=56:fontcolor=green:text='Hello World'
20159
20160 Full filter invocation with sendcmd would look like this:
20161
20162 sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
20163
20164 If the entire argument can't be parsed or applied as valid values then
20165 the filter will continue with its existing parameters.
20166
20167 Examples
20168
20169 • Draw "Test Text" with font FreeSerif, using the default values for
20170 the optional parameters.
20171
20172 drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'"
20173
20174 • Draw 'Test Text' with font FreeSerif of size 24 at position x=100
20175 and y=50 (counting from the top-left corner of the screen), text is
20176 yellow with a red box around it. Both the text and the box have an
20177 opacity of 20%.
20178
20179 drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
20180 x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2"
20181
20182 Note that the double quotes are not necessary if spaces are not
20183 used within the parameter list.
20184
20185 • Show the text at the center of the video frame:
20186
20187 drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2"
20188
20189 • Show the text at a random position, switching to a new position
20190 every 30 seconds:
20191
20192 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)"
20193
20194 • Show a text line sliding from right to left in the last row of the
20195 video frame. The file LONG_LINE is assumed to contain a single line
20196 with no newlines.
20197
20198 drawtext="fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t"
20199
20200 • Show the content of file CREDITS off the bottom of the frame and
20201 scroll up.
20202
20203 drawtext="fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t"
20204
20205 • Draw a single green letter "g", at the center of the input video.
20206 The glyph baseline is placed at half screen height.
20207
20208 drawtext="fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent"
20209
20210 • Show text for 1 second every 3 seconds:
20211
20212 drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'"
20213
20214 • Use fontconfig to set the font. Note that the colons need to be
20215 escaped.
20216
20217 drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
20218
20219 • Draw "Test Text" with font size dependent on height of the video.
20220
20221 drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)"
20222
20223 • Print the date of a real-time encoding (see strftime(3)):
20224
20225 drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
20226
20227 • Show text fading in and out (appearing/disappearing):
20228
20229 #!/bin/sh
20230 DS=1.0 # display start
20231 DE=10.0 # display end
20232 FID=1.5 # fade in duration
20233 FOD=5 # fade out duration
20234 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 }"
20235
20236 • Horizontally align multiple separate texts. Note that max_glyph_a
20237 and the fontsize value are included in the y offset.
20238
20239 drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
20240 drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
20241
20242 • Plot special lavf.image2dec.source_basename metadata onto each
20243 frame if such metadata exists. Otherwise, plot the string "NA".
20244 Note that image2 demuxer must have option -export_path_metadata 1
20245 for the special metadata fields to be available for filters.
20246
20247 drawtext="fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10"
20248
20249 For more information about libfreetype, check:
20250 <http://www.freetype.org/>.
20251
20252 For more information about fontconfig, check:
20253 <http://freedesktop.org/software/fontconfig/fontconfig-user.html>.
20254
20255 For more information about libfribidi, check: <http://fribidi.org/>.
20256
20257 edgedetect
20258 Detect and draw edges. The filter uses the Canny Edge Detection
20259 algorithm.
20260
20261 The filter accepts the following options:
20262
20263 low
20264 high
20265 Set low and high threshold values used by the Canny thresholding
20266 algorithm.
20267
20268 The high threshold selects the "strong" edge pixels, which are then
20269 connected through 8-connectivity with the "weak" edge pixels
20270 selected by the low threshold.
20271
20272 low and high threshold values must be chosen in the range [0,1],
20273 and low should be lesser or equal to high.
20274
20275 Default value for low is "20/255", and default value for high is
20276 "50/255".
20277
20278 mode
20279 Define the drawing mode.
20280
20281 wires
20282 Draw white/gray wires on black background.
20283
20284 colormix
20285 Mix the colors to create a paint/cartoon effect.
20286
20287 canny
20288 Apply Canny edge detector on all selected planes.
20289
20290 Default value is wires.
20291
20292 planes
20293 Select planes for filtering. By default all available planes are
20294 filtered.
20295
20296 Examples
20297
20298 • Standard edge detection with custom values for the hysteresis
20299 thresholding:
20300
20301 edgedetect=low=0.1:high=0.4
20302
20303 • Painting effect without thresholding:
20304
20305 edgedetect=mode=colormix:high=0
20306
20307 elbg
20308 Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
20309
20310 For each input image, the filter will compute the optimal mapping from
20311 the input to the output given the codebook length, that is the number
20312 of distinct output colors.
20313
20314 This filter accepts the following options.
20315
20316 codebook_length, l
20317 Set codebook length. The value must be a positive integer, and
20318 represents the number of distinct output colors. Default value is
20319 256.
20320
20321 nb_steps, n
20322 Set the maximum number of iterations to apply for computing the
20323 optimal mapping. The higher the value the better the result and the
20324 higher the computation time. Default value is 1.
20325
20326 seed, s
20327 Set a random seed, must be an integer included between 0 and
20328 UINT32_MAX. If not specified, or if explicitly set to -1, the
20329 filter will try to use a good random seed on a best effort basis.
20330
20331 pal8
20332 Set pal8 output pixel format. This option does not work with
20333 codebook length greater than 256. Default is disabled.
20334
20335 use_alpha
20336 Include alpha values in the quantization calculation. Allows
20337 creating palettized output images (e.g. PNG8) with multiple alpha
20338 smooth blending.
20339
20340 entropy
20341 Measure graylevel entropy in histogram of color channels of video
20342 frames.
20343
20344 It accepts the following parameters:
20345
20346 mode
20347 Can be either normal or diff. Default is normal.
20348
20349 diff mode measures entropy of histogram delta values, absolute
20350 differences between neighbour histogram values.
20351
20352 epx
20353 Apply the EPX magnification filter which is designed for pixel art.
20354
20355 It accepts the following option:
20356
20357 n Set the scaling dimension: 2 for "2xEPX", 3 for "3xEPX". Default
20358 is 3.
20359
20360 eq
20361 Set brightness, contrast, saturation and approximate gamma adjustment.
20362
20363 The filter accepts the following options:
20364
20365 contrast
20366 Set the contrast expression. The value must be a float value in
20367 range -1000.0 to 1000.0. The default value is "1".
20368
20369 brightness
20370 Set the brightness expression. The value must be a float value in
20371 range -1.0 to 1.0. The default value is "0".
20372
20373 saturation
20374 Set the saturation expression. The value must be a float in range
20375 0.0 to 3.0. The default value is "1".
20376
20377 gamma
20378 Set the gamma expression. The value must be a float in range 0.1 to
20379 10.0. The default value is "1".
20380
20381 gamma_r
20382 Set the gamma expression for red. The value must be a float in
20383 range 0.1 to 10.0. The default value is "1".
20384
20385 gamma_g
20386 Set the gamma expression for green. The value must be a float in
20387 range 0.1 to 10.0. The default value is "1".
20388
20389 gamma_b
20390 Set the gamma expression for blue. The value must be a float in
20391 range 0.1 to 10.0. The default value is "1".
20392
20393 gamma_weight
20394 Set the gamma weight expression. It can be used to reduce the
20395 effect of a high gamma value on bright image areas, e.g. keep them
20396 from getting overamplified and just plain white. The value must be
20397 a float in range 0.0 to 1.0. A value of 0.0 turns the gamma
20398 correction all the way down while 1.0 leaves it at its full
20399 strength. Default is "1".
20400
20401 eval
20402 Set when the expressions for brightness, contrast, saturation and
20403 gamma expressions are evaluated.
20404
20405 It accepts the following values:
20406
20407 init
20408 only evaluate expressions once during the filter initialization
20409 or when a command is processed
20410
20411 frame
20412 evaluate expressions for each incoming frame
20413
20414 Default value is init.
20415
20416 The expressions accept the following parameters:
20417
20418 n frame count of the input frame starting from 0
20419
20420 pos byte position of the corresponding packet in the input file, NAN if
20421 unspecified
20422
20423 r frame rate of the input video, NAN if the input frame rate is
20424 unknown
20425
20426 t timestamp expressed in seconds, NAN if the input timestamp is
20427 unknown
20428
20429 Commands
20430
20431 The filter supports the following commands:
20432
20433 contrast
20434 Set the contrast expression.
20435
20436 brightness
20437 Set the brightness expression.
20438
20439 saturation
20440 Set the saturation expression.
20441
20442 gamma
20443 Set the gamma expression.
20444
20445 gamma_r
20446 Set the gamma_r expression.
20447
20448 gamma_g
20449 Set gamma_g expression.
20450
20451 gamma_b
20452 Set gamma_b expression.
20453
20454 gamma_weight
20455 Set gamma_weight expression.
20456
20457 The command accepts the same syntax of the corresponding option.
20458
20459 If the specified expression is not valid, it is kept at its current
20460 value.
20461
20462 erosion
20463 Apply erosion effect to the video.
20464
20465 This filter replaces the pixel by the local(3x3) minimum.
20466
20467 It accepts the following options:
20468
20469 threshold0
20470 threshold1
20471 threshold2
20472 threshold3
20473 Limit the maximum change for each plane, default is 65535. If 0,
20474 plane will remain unchanged.
20475
20476 coordinates
20477 Flag which specifies the pixel to refer to. Default is 255 i.e. all
20478 eight pixels are used.
20479
20480 Flags to local 3x3 coordinates maps like this:
20481
20482 1 2 3
20483 4 5
20484 6 7 8
20485
20486 Commands
20487
20488 This filter supports the all above options as commands.
20489
20490 estdif
20491 Deinterlace the input video ("estdif" stands for "Edge Slope Tracing
20492 Deinterlacing Filter").
20493
20494 Spatial only filter that uses edge slope tracing algorithm to
20495 interpolate missing lines. It accepts the following parameters:
20496
20497 mode
20498 The interlacing mode to adopt. It accepts one of the following
20499 values:
20500
20501 frame
20502 Output one frame for each frame.
20503
20504 field
20505 Output one frame for each field.
20506
20507 The default value is "field".
20508
20509 parity
20510 The picture field parity assumed for the input interlaced video. It
20511 accepts one of the following values:
20512
20513 tff Assume the top field is first.
20514
20515 bff Assume the bottom field is first.
20516
20517 auto
20518 Enable automatic detection of field parity.
20519
20520 The default value is "auto". If the interlacing is unknown or the
20521 decoder does not export this information, top field first will be
20522 assumed.
20523
20524 deint
20525 Specify which frames to deinterlace. Accepts one of the following
20526 values:
20527
20528 all Deinterlace all frames.
20529
20530 interlaced
20531 Only deinterlace frames marked as interlaced.
20532
20533 The default value is "all".
20534
20535 rslope
20536 Specify the search radius for edge slope tracing. Default value is
20537 1. Allowed range is from 1 to 15.
20538
20539 redge
20540 Specify the search radius for best edge matching. Default value is
20541 2. Allowed range is from 0 to 15.
20542
20543 ecost
20544 Specify the edge cost for edge matching. Default value is 1.0.
20545 Allowed range is from 0 to 9.
20546
20547 mcost
20548 Specify the middle cost for edge matching. Default value is 0.5.
20549 Allowed range is from 0 to 1.
20550
20551 dcost
20552 Specify the distance cost for edge matching. Default value is 0.5.
20553 Allowed range is from 0 to 1.
20554
20555 interp
20556 Specify the interpolation used. Default is 4-point interpolation.
20557 It accepts one of the following values:
20558
20559 2p Two-point interpolation.
20560
20561 4p Four-point interpolation.
20562
20563 6p Six-point interpolation.
20564
20565 Commands
20566
20567 This filter supports same commands as options.
20568
20569 exposure
20570 Adjust exposure of the video stream.
20571
20572 The filter accepts the following options:
20573
20574 exposure
20575 Set the exposure correction in EV. Allowed range is from -3.0 to
20576 3.0 EV Default value is 0 EV.
20577
20578 black
20579 Set the black level correction. Allowed range is from -1.0 to 1.0.
20580 Default value is 0.
20581
20582 Commands
20583
20584 This filter supports same commands as options.
20585
20586 extractplanes
20587 Extract color channel components from input video stream into separate
20588 grayscale video streams.
20589
20590 The filter accepts the following option:
20591
20592 planes
20593 Set plane(s) to extract.
20594
20595 Available values for planes are:
20596
20597 y
20598 u
20599 v
20600 a
20601 r
20602 g
20603 b
20604
20605 Choosing planes not available in the input will result in an error.
20606 That means you cannot select "r", "g", "b" planes with "y", "u",
20607 "v" planes at same time.
20608
20609 Examples
20610
20611 • Extract luma, u and v color channel component from input video
20612 frame into 3 grayscale outputs:
20613
20614 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
20615
20616 fade
20617 Apply a fade-in/out effect to the input video.
20618
20619 It accepts the following parameters:
20620
20621 type, t
20622 The effect type can be either "in" for a fade-in, or "out" for a
20623 fade-out effect. Default is "in".
20624
20625 start_frame, s
20626 Specify the number of the frame to start applying the fade effect
20627 at. Default is 0.
20628
20629 nb_frames, n
20630 The number of frames that the fade effect lasts. At the end of the
20631 fade-in effect, the output video will have the same intensity as
20632 the input video. At the end of the fade-out transition, the output
20633 video will be filled with the selected color. Default is 25.
20634
20635 alpha
20636 If set to 1, fade only alpha channel, if one exists on the input.
20637 Default value is 0.
20638
20639 start_time, st
20640 Specify the timestamp (in seconds) of the frame to start to apply
20641 the fade effect. If both start_frame and start_time are specified,
20642 the fade will start at whichever comes last. Default is 0.
20643
20644 duration, d
20645 The number of seconds for which the fade effect has to last. At the
20646 end of the fade-in effect the output video will have the same
20647 intensity as the input video, at the end of the fade-out transition
20648 the output video will be filled with the selected color. If both
20649 duration and nb_frames are specified, duration is used. Default is
20650 0 (nb_frames is used by default).
20651
20652 color, c
20653 Specify the color of the fade. Default is "black".
20654
20655 Examples
20656
20657 • Fade in the first 30 frames of video:
20658
20659 fade=in:0:30
20660
20661 The command above is equivalent to:
20662
20663 fade=t=in:s=0:n=30
20664
20665 • Fade out the last 45 frames of a 200-frame video:
20666
20667 fade=out:155:45
20668 fade=type=out:start_frame=155:nb_frames=45
20669
20670 • Fade in the first 25 frames and fade out the last 25 frames of a
20671 1000-frame video:
20672
20673 fade=in:0:25, fade=out:975:25
20674
20675 • Make the first 5 frames yellow, then fade in from frame 5-24:
20676
20677 fade=in:5:20:color=yellow
20678
20679 • Fade in alpha over first 25 frames of video:
20680
20681 fade=in:0:25:alpha=1
20682
20683 • Make the first 5.5 seconds black, then fade in for 0.5 seconds:
20684
20685 fade=t=in:st=5.5:d=0.5
20686
20687 feedback
20688 Apply feedback video filter.
20689
20690 This filter pass cropped input frames to 2nd output. From there it can
20691 be filtered with other video filters. After filter receives frame from
20692 2nd input, that frame is combined on top of original frame from 1st
20693 input and passed to 1st output.
20694
20695 The typical usage is filter only part of frame.
20696
20697 The filter accepts the following options:
20698
20699 x
20700 y Set the top left crop position.
20701
20702 w
20703 h Set the crop size.
20704
20705 Examples
20706
20707 • Blur only top left rectangular part of video frame size 100x100
20708 with gblur filter.
20709
20710 [in][blurin]feedback=x=0:y=0:w=100:h=100[out][blurout];[blurout]gblur=8[blurin]
20711
20712 • Draw black box on top left part of video frame of size 100x100 with
20713 drawbox filter.
20714
20715 [in][blurin]feedback=x=0:y=0:w=100:h=100[out][blurout];[blurout]drawbox=x=0:y=0:w=100:h=100:t=100[blurin]
20716
20717 fftdnoiz
20718 Denoise frames using 3D FFT (frequency domain filtering).
20719
20720 The filter accepts the following options:
20721
20722 sigma
20723 Set the noise sigma constant. This sets denoising strength.
20724 Default value is 1. Allowed range is from 0 to 30. Using very high
20725 sigma with low overlap may give blocking artifacts.
20726
20727 amount
20728 Set amount of denoising. By default all detected noise is reduced.
20729 Default value is 1. Allowed range is from 0 to 1.
20730
20731 block
20732 Set size of block in pixels, Default is 32, can be 8 to 256.
20733
20734 overlap
20735 Set block overlap. Default is 0.5. Allowed range is from 0.2 to
20736 0.8.
20737
20738 method
20739 Set denoising method. Default is "wiener", can also be "hard".
20740
20741 prev
20742 Set number of previous frames to use for denoising. By default is
20743 set to 0.
20744
20745 next
20746 Set number of next frames to to use for denoising. By default is
20747 set to 0.
20748
20749 planes
20750 Set planes which will be filtered, by default are all available
20751 filtered except alpha.
20752
20753 fftfilt
20754 Apply arbitrary expressions to samples in frequency domain
20755
20756 dc_Y
20757 Adjust the dc value (gain) of the luma plane of the image. The
20758 filter accepts an integer value in range 0 to 1000. The default
20759 value is set to 0.
20760
20761 dc_U
20762 Adjust the dc value (gain) of the 1st chroma plane of the image.
20763 The filter accepts an integer value in range 0 to 1000. The default
20764 value is set to 0.
20765
20766 dc_V
20767 Adjust the dc value (gain) of the 2nd chroma plane of the image.
20768 The filter accepts an integer value in range 0 to 1000. The default
20769 value is set to 0.
20770
20771 weight_Y
20772 Set the frequency domain weight expression for the luma plane.
20773
20774 weight_U
20775 Set the frequency domain weight expression for the 1st chroma
20776 plane.
20777
20778 weight_V
20779 Set the frequency domain weight expression for the 2nd chroma
20780 plane.
20781
20782 eval
20783 Set when the expressions are evaluated.
20784
20785 It accepts the following values:
20786
20787 init
20788 Only evaluate expressions once during the filter
20789 initialization.
20790
20791 frame
20792 Evaluate expressions for each incoming frame.
20793
20794 Default value is init.
20795
20796 The filter accepts the following variables:
20797
20798 X
20799 Y The coordinates of the current sample.
20800
20801 W
20802 H The width and height of the image.
20803
20804 N The number of input frame, starting from 0.
20805
20806 WS
20807 HS The size of FFT array for horizontal and vertical processing.
20808
20809 Examples
20810
20811 • High-pass:
20812
20813 fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
20814
20815 • Low-pass:
20816
20817 fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
20818
20819 • Sharpen:
20820
20821 fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
20822
20823 • Blur:
20824
20825 fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
20826
20827 field
20828 Extract a single field from an interlaced image using stride arithmetic
20829 to avoid wasting CPU time. The output frames are marked as non-
20830 interlaced.
20831
20832 The filter accepts the following options:
20833
20834 type
20835 Specify whether to extract the top (if the value is 0 or "top") or
20836 the bottom field (if the value is 1 or "bottom").
20837
20838 fieldhint
20839 Create new frames by copying the top and bottom fields from surrounding
20840 frames supplied as numbers by the hint file.
20841
20842 hint
20843 Set file containing hints: absolute/relative frame numbers.
20844
20845 There must be one line for each frame in a clip. Each line must
20846 contain two numbers separated by the comma, optionally followed by
20847 "-" or "+". Numbers supplied on each line of file can not be out
20848 of [N-1,N+1] where N is current frame number for "absolute" mode or
20849 out of [-1, 1] range for "relative" mode. First number tells from
20850 which frame to pick up top field and second number tells from which
20851 frame to pick up bottom field.
20852
20853 If optionally followed by "+" output frame will be marked as
20854 interlaced, else if followed by "-" output frame will be marked as
20855 progressive, else it will be marked same as input frame. If
20856 optionally followed by "t" output frame will use only top field, or
20857 in case of "b" it will use only bottom field. If line starts with
20858 "#" or ";" that line is skipped.
20859
20860 mode
20861 Can be item "absolute" or "relative" or "pattern". Default is
20862 "absolute". The "pattern" mode is same as "relative" mode, except
20863 at last entry of file if there are more frames to process than
20864 "hint" file is seek back to start.
20865
20866 Example of first several lines of "hint" file for "relative" mode:
20867
20868 0,0 - # first frame
20869 1,0 - # second frame, use third's frame top field and second's frame bottom field
20870 1,0 - # third frame, use fourth's frame top field and third's frame bottom field
20871 1,0 -
20872 0,0 -
20873 0,0 -
20874 1,0 -
20875 1,0 -
20876 1,0 -
20877 0,0 -
20878 0,0 -
20879 1,0 -
20880 1,0 -
20881 1,0 -
20882 0,0 -
20883
20884 fieldmatch
20885 Field matching filter for inverse telecine. It is meant to reconstruct
20886 the progressive frames from a telecined stream. The filter does not
20887 drop duplicated frames, so to achieve a complete inverse telecine
20888 "fieldmatch" needs to be followed by a decimation filter such as
20889 decimate in the filtergraph.
20890
20891 The separation of the field matching and the decimation is notably
20892 motivated by the possibility of inserting a de-interlacing filter
20893 fallback between the two. If the source has mixed telecined and real
20894 interlaced content, "fieldmatch" will not be able to match fields for
20895 the interlaced parts. But these remaining combed frames will be marked
20896 as interlaced, and thus can be de-interlaced by a later filter such as
20897 yadif before decimation.
20898
20899 In addition to the various configuration options, "fieldmatch" can take
20900 an optional second stream, activated through the ppsrc option. If
20901 enabled, the frames reconstruction will be based on the fields and
20902 frames from this second stream. This allows the first input to be pre-
20903 processed in order to help the various algorithms of the filter, while
20904 keeping the output lossless (assuming the fields are matched properly).
20905 Typically, a field-aware denoiser, or brightness/contrast adjustments
20906 can help.
20907
20908 Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth
20909 project) and VIVTC/VFM (VapourSynth project). The later is a light
20910 clone of TFM from which "fieldmatch" is based on. While the semantic
20911 and usage are very close, some behaviour and options names can differ.
20912
20913 The decimate filter currently only works for constant frame rate input.
20914 If your input has mixed telecined (30fps) and progressive content with
20915 a lower framerate like 24fps use the following filterchain to produce
20916 the necessary cfr stream:
20917 "dejudder,fps=30000/1001,fieldmatch,decimate".
20918
20919 The filter accepts the following options:
20920
20921 order
20922 Specify the assumed field order of the input stream. Available
20923 values are:
20924
20925 auto
20926 Auto detect parity (use FFmpeg's internal parity value).
20927
20928 bff Assume bottom field first.
20929
20930 tff Assume top field first.
20931
20932 Note that it is sometimes recommended not to trust the parity
20933 announced by the stream.
20934
20935 Default value is auto.
20936
20937 mode
20938 Set the matching mode or strategy to use. pc mode is the safest in
20939 the sense that it won't risk creating jerkiness due to duplicate
20940 frames when possible, but if there are bad edits or blended fields
20941 it will end up outputting combed frames when a good match might
20942 actually exist. On the other hand, pcn_ub mode is the most risky in
20943 terms of creating jerkiness, but will almost always find a good
20944 frame if there is one. The other values are all somewhere in
20945 between pc and pcn_ub in terms of risking jerkiness and creating
20946 duplicate frames versus finding good matches in sections with bad
20947 edits, orphaned fields, blended fields, etc.
20948
20949 More details about p/c/n/u/b are available in p/c/n/u/b meaning
20950 section.
20951
20952 Available values are:
20953
20954 pc 2-way matching (p/c)
20955
20956 pc_n
20957 2-way matching, and trying 3rd match if still combed (p/c + n)
20958
20959 pc_u
20960 2-way matching, and trying 3rd match (same order) if still
20961 combed (p/c + u)
20962
20963 pc_n_ub
20964 2-way matching, trying 3rd match if still combed, and trying
20965 4th/5th matches if still combed (p/c + n + u/b)
20966
20967 pcn 3-way matching (p/c/n)
20968
20969 pcn_ub
20970 3-way matching, and trying 4th/5th matches if all 3 of the
20971 original matches are detected as combed (p/c/n + u/b)
20972
20973 The parenthesis at the end indicate the matches that would be used
20974 for that mode assuming order=tff (and field on auto or top).
20975
20976 In terms of speed pc mode is by far the fastest and pcn_ub is the
20977 slowest.
20978
20979 Default value is pc_n.
20980
20981 ppsrc
20982 Mark the main input stream as a pre-processed input, and enable the
20983 secondary input stream as the clean source to pick the fields from.
20984 See the filter introduction for more details. It is similar to the
20985 clip2 feature from VFM/TFM.
20986
20987 Default value is 0 (disabled).
20988
20989 field
20990 Set the field to match from. It is recommended to set this to the
20991 same value as order unless you experience matching failures with
20992 that setting. In certain circumstances changing the field that is
20993 used to match from can have a large impact on matching performance.
20994 Available values are:
20995
20996 auto
20997 Automatic (same value as order).
20998
20999 bottom
21000 Match from the bottom field.
21001
21002 top Match from the top field.
21003
21004 Default value is auto.
21005
21006 mchroma
21007 Set whether or not chroma is included during the match comparisons.
21008 In most cases it is recommended to leave this enabled. You should
21009 set this to 0 only if your clip has bad chroma problems such as
21010 heavy rainbowing or other artifacts. Setting this to 0 could also
21011 be used to speed things up at the cost of some accuracy.
21012
21013 Default value is 1.
21014
21015 y0
21016 y1 These define an exclusion band which excludes the lines between y0
21017 and y1 from being included in the field matching decision. An
21018 exclusion band can be used to ignore subtitles, a logo, or other
21019 things that may interfere with the matching. y0 sets the starting
21020 scan line and y1 sets the ending line; all lines in between y0 and
21021 y1 (including y0 and y1) will be ignored. Setting y0 and y1 to the
21022 same value will disable the feature. y0 and y1 defaults to 0.
21023
21024 scthresh
21025 Set the scene change detection threshold as a percentage of maximum
21026 change on the luma plane. Good values are in the "[8.0, 14.0]"
21027 range. Scene change detection is only relevant in case
21028 combmatch=sc. The range for scthresh is "[0.0, 100.0]".
21029
21030 Default value is 12.0.
21031
21032 combmatch
21033 When combatch is not none, "fieldmatch" will take into account the
21034 combed scores of matches when deciding what match to use as the
21035 final match. Available values are:
21036
21037 none
21038 No final matching based on combed scores.
21039
21040 sc Combed scores are only used when a scene change is detected.
21041
21042 full
21043 Use combed scores all the time.
21044
21045 Default is sc.
21046
21047 combdbg
21048 Force "fieldmatch" to calculate the combed metrics for certain
21049 matches and print them. This setting is known as micout in TFM/VFM
21050 vocabulary. Available values are:
21051
21052 none
21053 No forced calculation.
21054
21055 pcn Force p/c/n calculations.
21056
21057 pcnub
21058 Force p/c/n/u/b calculations.
21059
21060 Default value is none.
21061
21062 cthresh
21063 This is the area combing threshold used for combed frame detection.
21064 This essentially controls how "strong" or "visible" combing must be
21065 to be detected. Larger values mean combing must be more visible
21066 and smaller values mean combing can be less visible or strong and
21067 still be detected. Valid settings are from -1 (every pixel will be
21068 detected as combed) to 255 (no pixel will be detected as combed).
21069 This is basically a pixel difference value. A good range is "[8,
21070 12]".
21071
21072 Default value is 9.
21073
21074 chroma
21075 Sets whether or not chroma is considered in the combed frame
21076 decision. Only disable this if your source has chroma problems
21077 (rainbowing, etc.) that are causing problems for the combed frame
21078 detection with chroma enabled. Actually, using chroma=0 is usually
21079 more reliable, except for the case where there is chroma only
21080 combing in the source.
21081
21082 Default value is 0.
21083
21084 blockx
21085 blocky
21086 Respectively set the x-axis and y-axis size of the window used
21087 during combed frame detection. This has to do with the size of the
21088 area in which combpel pixels are required to be detected as combed
21089 for a frame to be declared combed. See the combpel parameter
21090 description for more info. Possible values are any number that is
21091 a power of 2 starting at 4 and going up to 512.
21092
21093 Default value is 16.
21094
21095 combpel
21096 The number of combed pixels inside any of the blocky by blockx size
21097 blocks on the frame for the frame to be detected as combed. While
21098 cthresh controls how "visible" the combing must be, this setting
21099 controls "how much" combing there must be in any localized area (a
21100 window defined by the blockx and blocky settings) on the frame.
21101 Minimum value is 0 and maximum is "blocky x blockx" (at which point
21102 no frames will ever be detected as combed). This setting is known
21103 as MI in TFM/VFM vocabulary.
21104
21105 Default value is 80.
21106
21107 p/c/n/u/b meaning
21108
21109 p/c/n
21110
21111 We assume the following telecined stream:
21112
21113 Top fields: 1 2 2 3 4
21114 Bottom fields: 1 2 3 4 4
21115
21116 The numbers correspond to the progressive frame the fields relate to.
21117 Here, the first two frames are progressive, the 3rd and 4th are combed,
21118 and so on.
21119
21120 When "fieldmatch" is configured to run a matching from bottom
21121 (field=bottom) this is how this input stream get transformed:
21122
21123 Input stream:
21124 T 1 2 2 3 4
21125 B 1 2 3 4 4 <-- matching reference
21126
21127 Matches: c c n n c
21128
21129 Output stream:
21130 T 1 2 3 4 4
21131 B 1 2 3 4 4
21132
21133 As a result of the field matching, we can see that some frames get
21134 duplicated. To perform a complete inverse telecine, you need to rely
21135 on a decimation filter after this operation. See for instance the
21136 decimate filter.
21137
21138 The same operation now matching from top fields (field=top) looks like
21139 this:
21140
21141 Input stream:
21142 T 1 2 2 3 4 <-- matching reference
21143 B 1 2 3 4 4
21144
21145 Matches: c c p p c
21146
21147 Output stream:
21148 T 1 2 2 3 4
21149 B 1 2 2 3 4
21150
21151 In these examples, we can see what p, c and n mean; basically, they
21152 refer to the frame and field of the opposite parity:
21153
21154 *<p matches the field of the opposite parity in the previous frame>
21155 *<c matches the field of the opposite parity in the current frame>
21156 *<n matches the field of the opposite parity in the next frame>
21157
21158 u/b
21159
21160 The u and b matching are a bit special in the sense that they match
21161 from the opposite parity flag. In the following examples, we assume
21162 that we are currently matching the 2nd frame (Top:2, bottom:2).
21163 According to the match, a 'x' is placed above and below each matched
21164 fields.
21165
21166 With bottom matching (field=bottom):
21167
21168 Match: c p n b u
21169
21170 x x x x x
21171 Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
21172 Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
21173 x x x x x
21174
21175 Output frames:
21176 2 1 2 2 2
21177 2 2 2 1 3
21178
21179 With top matching (field=top):
21180
21181 Match: c p n b u
21182
21183 x x x x x
21184 Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
21185 Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
21186 x x x x x
21187
21188 Output frames:
21189 2 2 2 1 2
21190 2 1 3 2 2
21191
21192 Examples
21193
21194 Simple IVTC of a top field first telecined stream:
21195
21196 fieldmatch=order=tff:combmatch=none, decimate
21197
21198 Advanced IVTC, with fallback on yadif for still combed frames:
21199
21200 fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
21201
21202 fieldorder
21203 Transform the field order of the input video.
21204
21205 It accepts the following parameters:
21206
21207 order
21208 The output field order. Valid values are tff for top field first or
21209 bff for bottom field first.
21210
21211 The default value is tff.
21212
21213 The transformation is done by shifting the picture content up or down
21214 by one line, and filling the remaining line with appropriate picture
21215 content. This method is consistent with most broadcast field order
21216 converters.
21217
21218 If the input video is not flagged as being interlaced, or it is already
21219 flagged as being of the required output field order, then this filter
21220 does not alter the incoming video.
21221
21222 It is very useful when converting to or from PAL DV material, which is
21223 bottom field first.
21224
21225 For example:
21226
21227 ffmpeg -i in.vob -vf "fieldorder=bff" out.dv
21228
21229 fifo, afifo
21230 Buffer input images and send them when they are requested.
21231
21232 It is mainly useful when auto-inserted by the libavfilter framework.
21233
21234 It does not take parameters.
21235
21236 fillborders
21237 Fill borders of the input video, without changing video stream
21238 dimensions. Sometimes video can have garbage at the four edges and you
21239 may not want to crop video input to keep size multiple of some number.
21240
21241 This filter accepts the following options:
21242
21243 left
21244 Number of pixels to fill from left border.
21245
21246 right
21247 Number of pixels to fill from right border.
21248
21249 top Number of pixels to fill from top border.
21250
21251 bottom
21252 Number of pixels to fill from bottom border.
21253
21254 mode
21255 Set fill mode.
21256
21257 It accepts the following values:
21258
21259 smear
21260 fill pixels using outermost pixels
21261
21262 mirror
21263 fill pixels using mirroring (half sample symmetric)
21264
21265 fixed
21266 fill pixels with constant value
21267
21268 reflect
21269 fill pixels using reflecting (whole sample symmetric)
21270
21271 wrap
21272 fill pixels using wrapping
21273
21274 fade
21275 fade pixels to constant value
21276
21277 margins
21278 fill pixels at top and bottom with weighted averages pixels
21279 near borders
21280
21281 Default is smear.
21282
21283 color
21284 Set color for pixels in fixed or fade mode. Default is black.
21285
21286 Commands
21287
21288 This filter supports same commands as options. The command accepts the
21289 same syntax of the corresponding option.
21290
21291 If the specified expression is not valid, it is kept at its current
21292 value.
21293
21294 find_rect
21295 Find a rectangular object
21296
21297 It accepts the following options:
21298
21299 object
21300 Filepath of the object image, needs to be in gray8.
21301
21302 threshold
21303 Detection threshold, default is 0.5.
21304
21305 mipmaps
21306 Number of mipmaps, default is 3.
21307
21308 xmin, ymin, xmax, ymax
21309 Specifies the rectangle in which to search.
21310
21311 discard
21312 Discard frames where object is not detected. Default is disabled.
21313
21314 Examples
21315
21316 • Cover a rectangular object by the supplied image of a given video
21317 using ffmpeg:
21318
21319 ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
21320
21321 floodfill
21322 Flood area with values of same pixel components with another values.
21323
21324 It accepts the following options:
21325
21326 x Set pixel x coordinate.
21327
21328 y Set pixel y coordinate.
21329
21330 s0 Set source #0 component value.
21331
21332 s1 Set source #1 component value.
21333
21334 s2 Set source #2 component value.
21335
21336 s3 Set source #3 component value.
21337
21338 d0 Set destination #0 component value.
21339
21340 d1 Set destination #1 component value.
21341
21342 d2 Set destination #2 component value.
21343
21344 d3 Set destination #3 component value.
21345
21346 format
21347 Convert the input video to one of the specified pixel formats.
21348 Libavfilter will try to pick one that is suitable as input to the next
21349 filter.
21350
21351 It accepts the following parameters:
21352
21353 pix_fmts
21354 A '|'-separated list of pixel format names, such as
21355 "pix_fmts=yuv420p|monow|rgb24".
21356
21357 Examples
21358
21359 • Convert the input video to the yuv420p format
21360
21361 format=pix_fmts=yuv420p
21362
21363 Convert the input video to any of the formats in the list
21364
21365 format=pix_fmts=yuv420p|yuv444p|yuv410p
21366
21367 fps
21368 Convert the video to specified constant frame rate by duplicating or
21369 dropping frames as necessary.
21370
21371 It accepts the following parameters:
21372
21373 fps The desired output frame rate. It accepts expressions containing
21374 the following constants:
21375
21376 source_fps
21377 The input's frame rate
21378
21379 ntsc
21380 NTSC frame rate of "30000/1001"
21381
21382 pal PAL frame rate of 25.0
21383
21384 film
21385 Film frame rate of 24.0
21386
21387 ntsc_film
21388 NTSC-film frame rate of "24000/1001"
21389
21390 The default is 25.
21391
21392 start_time
21393 Assume the first PTS should be the given value, in seconds. This
21394 allows for padding/trimming at the start of stream. By default, no
21395 assumption is made about the first frame's expected PTS, so no
21396 padding or trimming is done. For example, this could be set to 0
21397 to pad the beginning with duplicates of the first frame if a video
21398 stream starts after the audio stream or to trim any frames with a
21399 negative PTS.
21400
21401 round
21402 Timestamp (PTS) rounding method.
21403
21404 Possible values are:
21405
21406 zero
21407 round towards 0
21408
21409 inf round away from 0
21410
21411 down
21412 round towards -infinity
21413
21414 up round towards +infinity
21415
21416 near
21417 round to nearest
21418
21419 The default is "near".
21420
21421 eof_action
21422 Action performed when reading the last frame.
21423
21424 Possible values are:
21425
21426 round
21427 Use same timestamp rounding method as used for other frames.
21428
21429 pass
21430 Pass through last frame if input duration has not been reached
21431 yet.
21432
21433 The default is "round".
21434
21435 Alternatively, the options can be specified as a flat string:
21436 fps[:start_time[:round]].
21437
21438 See also the setpts filter.
21439
21440 Examples
21441
21442 • A typical usage in order to set the fps to 25:
21443
21444 fps=fps=25
21445
21446 • Sets the fps to 24, using abbreviation and rounding method to round
21447 to nearest:
21448
21449 fps=fps=film:round=near
21450
21451 framepack
21452 Pack two different video streams into a stereoscopic video, setting
21453 proper metadata on supported codecs. The two views should have the same
21454 size and framerate and processing will stop when the shorter video
21455 ends. Please note that you may conveniently adjust view properties with
21456 the scale and fps filters.
21457
21458 It accepts the following parameters:
21459
21460 format
21461 The desired packing format. Supported values are:
21462
21463 sbs The views are next to each other (default).
21464
21465 tab The views are on top of each other.
21466
21467 lines
21468 The views are packed by line.
21469
21470 columns
21471 The views are packed by column.
21472
21473 frameseq
21474 The views are temporally interleaved.
21475
21476 Some examples:
21477
21478 # Convert left and right views into a frame-sequential video
21479 ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
21480
21481 # Convert views into a side-by-side video with the same output resolution as the input
21482 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
21483
21484 framerate
21485 Change the frame rate by interpolating new video output frames from the
21486 source frames.
21487
21488 This filter is not designed to function correctly with interlaced
21489 media. If you wish to change the frame rate of interlaced media then
21490 you are required to deinterlace before this filter and re-interlace
21491 after this filter.
21492
21493 A description of the accepted options follows.
21494
21495 fps Specify the output frames per second. This option can also be
21496 specified as a value alone. The default is 50.
21497
21498 interp_start
21499 Specify the start of a range where the output frame will be created
21500 as a linear interpolation of two frames. The range is [0-255], the
21501 default is 15.
21502
21503 interp_end
21504 Specify the end of a range where the output frame will be created
21505 as a linear interpolation of two frames. The range is [0-255], the
21506 default is 240.
21507
21508 scene
21509 Specify the level at which a scene change is detected as a value
21510 between 0 and 100 to indicate a new scene; a low value reflects a
21511 low probability for the current frame to introduce a new scene,
21512 while a higher value means the current frame is more likely to be
21513 one. The default is 8.2.
21514
21515 flags
21516 Specify flags influencing the filter process.
21517
21518 Available value for flags is:
21519
21520 scene_change_detect, scd
21521 Enable scene change detection using the value of the option
21522 scene. This flag is enabled by default.
21523
21524 framestep
21525 Select one frame every N-th frame.
21526
21527 This filter accepts the following option:
21528
21529 step
21530 Select frame after every "step" frames. Allowed values are
21531 positive integers higher than 0. Default value is 1.
21532
21533 freezedetect
21534 Detect frozen video.
21535
21536 This filter logs a message and sets frame metadata when it detects that
21537 the input video has no significant change in content during a specified
21538 duration. Video freeze detection calculates the mean average absolute
21539 difference of all the components of video frames and compares it to a
21540 noise floor.
21541
21542 The printed times and duration are expressed in seconds. The
21543 "lavfi.freezedetect.freeze_start" metadata key is set on the first
21544 frame whose timestamp equals or exceeds the detection duration and it
21545 contains the timestamp of the first frame of the freeze. The
21546 "lavfi.freezedetect.freeze_duration" and
21547 "lavfi.freezedetect.freeze_end" metadata keys are set on the first
21548 frame after the freeze.
21549
21550 The filter accepts the following options:
21551
21552 noise, n
21553 Set noise tolerance. Can be specified in dB (in case "dB" is
21554 appended to the specified value) or as a difference ratio between 0
21555 and 1. Default is -60dB, or 0.001.
21556
21557 duration, d
21558 Set freeze duration until notification (default is 2 seconds).
21559
21560 freezeframes
21561 Freeze video frames.
21562
21563 This filter freezes video frames using frame from 2nd input.
21564
21565 The filter accepts the following options:
21566
21567 first
21568 Set number of first frame from which to start freeze.
21569
21570 last
21571 Set number of last frame from which to end freeze.
21572
21573 replace
21574 Set number of frame from 2nd input which will be used instead of
21575 replaced frames.
21576
21577 frei0r
21578 Apply a frei0r effect to the input video.
21579
21580 To enable the compilation of this filter, you need to install the
21581 frei0r header and configure FFmpeg with "--enable-frei0r".
21582
21583 It accepts the following parameters:
21584
21585 filter_name
21586 The name of the frei0r effect to load. If the environment variable
21587 FREI0R_PATH is defined, the frei0r effect is searched for in each
21588 of the directories specified by the colon-separated list in
21589 FREI0R_PATH. Otherwise, the standard frei0r paths are searched, in
21590 this order: HOME/.frei0r-1/lib/, /usr/local/lib/frei0r-1/,
21591 /usr/lib/frei0r-1/.
21592
21593 filter_params
21594 A '|'-separated list of parameters to pass to the frei0r effect.
21595
21596 A frei0r effect parameter can be a boolean (its value is either "y" or
21597 "n"), a double, a color (specified as R/G/B, where R, G, and B are
21598 floating point numbers between 0.0 and 1.0, inclusive) or a color
21599 description as specified in the "Color" section in the ffmpeg-utils
21600 manual, a position (specified as X/Y, where X and Y are floating point
21601 numbers) and/or a string.
21602
21603 The number and types of parameters depend on the loaded effect. If an
21604 effect parameter is not specified, the default value is set.
21605
21606 Examples
21607
21608 • Apply the distort0r effect, setting the first two double
21609 parameters:
21610
21611 frei0r=filter_name=distort0r:filter_params=0.5|0.01
21612
21613 • Apply the colordistance effect, taking a color as the first
21614 parameter:
21615
21616 frei0r=colordistance:0.2/0.3/0.4
21617 frei0r=colordistance:violet
21618 frei0r=colordistance:0x112233
21619
21620 • Apply the perspective effect, specifying the top left and top right
21621 image positions:
21622
21623 frei0r=perspective:0.2/0.2|0.8/0.2
21624
21625 For more information, see <http://frei0r.dyne.org>
21626
21627 Commands
21628
21629 This filter supports the filter_params option as commands.
21630
21631 fspp
21632 Apply fast and simple postprocessing. It is a faster version of spp.
21633
21634 It splits (I)DCT into horizontal/vertical passes. Unlike the simple
21635 post- processing filter, one of them is performed once per block, not
21636 per pixel. This allows for much higher speed.
21637
21638 The filter accepts the following options:
21639
21640 quality
21641 Set quality. This option defines the number of levels for
21642 averaging. It accepts an integer in the range 4-5. Default value is
21643 4.
21644
21645 qp Force a constant quantization parameter. It accepts an integer in
21646 range 0-63. If not set, the filter will use the QP from the video
21647 stream (if available).
21648
21649 strength
21650 Set filter strength. It accepts an integer in range -15 to 32.
21651 Lower values mean more details but also more artifacts, while
21652 higher values make the image smoother but also blurrier. Default
21653 value is 0 − PSNR optimal.
21654
21655 use_bframe_qp
21656 Enable the use of the QP from the B-Frames if set to 1. Using this
21657 option may cause flicker since the B-Frames have often larger QP.
21658 Default is 0 (not enabled).
21659
21660 gblur
21661 Apply Gaussian blur filter.
21662
21663 The filter accepts the following options:
21664
21665 sigma
21666 Set horizontal sigma, standard deviation of Gaussian blur. Default
21667 is 0.5.
21668
21669 steps
21670 Set number of steps for Gaussian approximation. Default is 1.
21671
21672 planes
21673 Set which planes to filter. By default all planes are filtered.
21674
21675 sigmaV
21676 Set vertical sigma, if negative it will be same as "sigma".
21677 Default is -1.
21678
21679 Commands
21680
21681 This filter supports same commands as options. The command accepts the
21682 same syntax of the corresponding option.
21683
21684 If the specified expression is not valid, it is kept at its current
21685 value.
21686
21687 geq
21688 Apply generic equation to each pixel.
21689
21690 The filter accepts the following options:
21691
21692 lum_expr, lum
21693 Set the luminance expression.
21694
21695 cb_expr, cb
21696 Set the chrominance blue expression.
21697
21698 cr_expr, cr
21699 Set the chrominance red expression.
21700
21701 alpha_expr, a
21702 Set the alpha expression.
21703
21704 red_expr, r
21705 Set the red expression.
21706
21707 green_expr, g
21708 Set the green expression.
21709
21710 blue_expr, b
21711 Set the blue expression.
21712
21713 The colorspace is selected according to the specified options. If one
21714 of the lum_expr, cb_expr, or cr_expr options is specified, the filter
21715 will automatically select a YCbCr colorspace. If one of the red_expr,
21716 green_expr, or blue_expr options is specified, it will select an RGB
21717 colorspace.
21718
21719 If one of the chrominance expression is not defined, it falls back on
21720 the other one. If no alpha expression is specified it will evaluate to
21721 opaque value. If none of chrominance expressions are specified, they
21722 will evaluate to the luminance expression.
21723
21724 The expressions can use the following variables and functions:
21725
21726 N The sequential number of the filtered frame, starting from 0.
21727
21728 X
21729 Y The coordinates of the current sample.
21730
21731 W
21732 H The width and height of the image.
21733
21734 SW
21735 SH Width and height scale depending on the currently filtered plane.
21736 It is the ratio between the corresponding luma plane number of
21737 pixels and the current plane ones. E.g. for YUV4:2:0 the values are
21738 "1,1" for the luma plane, and "0.5,0.5" for chroma planes.
21739
21740 T Time of the current frame, expressed in seconds.
21741
21742 p(x, y)
21743 Return the value of the pixel at location (x,y) of the current
21744 plane.
21745
21746 lum(x, y)
21747 Return the value of the pixel at location (x,y) of the luminance
21748 plane.
21749
21750 cb(x, y)
21751 Return the value of the pixel at location (x,y) of the blue-
21752 difference chroma plane. Return 0 if there is no such plane.
21753
21754 cr(x, y)
21755 Return the value of the pixel at location (x,y) of the red-
21756 difference chroma plane. Return 0 if there is no such plane.
21757
21758 r(x, y)
21759 g(x, y)
21760 b(x, y)
21761 Return the value of the pixel at location (x,y) of the
21762 red/green/blue component. Return 0 if there is no such component.
21763
21764 alpha(x, y)
21765 Return the value of the pixel at location (x,y) of the alpha plane.
21766 Return 0 if there is no such plane.
21767
21768 psum(x,y), lumsum(x, y), cbsum(x,y), crsum(x,y), rsum(x,y), gsum(x,y),
21769 bsum(x,y), alphasum(x,y)
21770 Sum of sample values in the rectangle from (0,0) to (x,y), this
21771 allows obtaining sums of samples within a rectangle. See the
21772 functions without the sum postfix.
21773
21774 interpolation
21775 Set one of interpolation methods:
21776
21777 nearest, n
21778 bilinear, b
21779
21780 Default is bilinear.
21781
21782 For functions, if x and y are outside the area, the value will be
21783 automatically clipped to the closer edge.
21784
21785 Please note that this filter can use multiple threads in which case
21786 each slice will have its own expression state. If you want to use only
21787 a single expression state because your expressions depend on previous
21788 state then you should limit the number of filter threads to 1.
21789
21790 Examples
21791
21792 • Flip the image horizontally:
21793
21794 geq=p(W-X\,Y)
21795
21796 • Generate a bidimensional sine wave, with angle "PI/3" and a
21797 wavelength of 100 pixels:
21798
21799 geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
21800
21801 • Generate a fancy enigmatic moving light:
21802
21803 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
21804
21805 • Generate a quick emboss effect:
21806
21807 format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
21808
21809 • Modify RGB components depending on pixel position:
21810
21811 geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
21812
21813 • Create a radial gradient that is the same size as the input (also
21814 see the vignette filter):
21815
21816 geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
21817
21818 gradfun
21819 Fix the banding artifacts that are sometimes introduced into nearly
21820 flat regions by truncation to 8-bit color depth. Interpolate the
21821 gradients that should go where the bands are, and dither them.
21822
21823 It is designed for playback only. Do not use it prior to lossy
21824 compression, because compression tends to lose the dither and bring
21825 back the bands.
21826
21827 It accepts the following parameters:
21828
21829 strength
21830 The maximum amount by which the filter will change any one pixel.
21831 This is also the threshold for detecting nearly flat regions.
21832 Acceptable values range from .51 to 64; the default value is 1.2.
21833 Out-of-range values will be clipped to the valid range.
21834
21835 radius
21836 The neighborhood to fit the gradient to. A larger radius makes for
21837 smoother gradients, but also prevents the filter from modifying the
21838 pixels near detailed regions. Acceptable values are 8-32; the
21839 default value is 16. Out-of-range values will be clipped to the
21840 valid range.
21841
21842 Alternatively, the options can be specified as a flat string:
21843 strength[:radius]
21844
21845 Examples
21846
21847 • Apply the filter with a 3.5 strength and radius of 8:
21848
21849 gradfun=3.5:8
21850
21851 • Specify radius, omitting the strength (which will fall-back to the
21852 default value):
21853
21854 gradfun=radius=8
21855
21856 graphmonitor
21857 Show various filtergraph stats.
21858
21859 With this filter one can debug complete filtergraph. Especially issues
21860 with links filling with queued frames.
21861
21862 The filter accepts the following options:
21863
21864 size, s
21865 Set video output size. Default is hd720.
21866
21867 opacity, o
21868 Set video opacity. Default is 0.9. Allowed range is from 0 to 1.
21869
21870 mode, m
21871 Set output mode, can be fulll or compact. In compact mode only
21872 filters with some queued frames have displayed stats.
21873
21874 flags, f
21875 Set flags which enable which stats are shown in video.
21876
21877 Available values for flags are:
21878
21879 queue
21880 Display number of queued frames in each link.
21881
21882 frame_count_in
21883 Display number of frames taken from filter.
21884
21885 frame_count_out
21886 Display number of frames given out from filter.
21887
21888 frame_count_delta
21889 Display delta number of frames between above two values.
21890
21891 pts Display current filtered frame pts.
21892
21893 pts_delta
21894 Display pts delta between current and previous frame.
21895
21896 time
21897 Display current filtered frame time.
21898
21899 time_delta
21900 Display time delta between current and previous frame.
21901
21902 timebase
21903 Display time base for filter link.
21904
21905 format
21906 Display used format for filter link.
21907
21908 size
21909 Display video size or number of audio channels in case of audio
21910 used by filter link.
21911
21912 rate
21913 Display video frame rate or sample rate in case of audio used
21914 by filter link.
21915
21916 eof Display link output status.
21917
21918 sample_count_in
21919 Display number of samples taken from filter.
21920
21921 sample_count_out
21922 Display number of samples given out from filter.
21923
21924 sample_count_delta
21925 Display delta number of samples between above two values.
21926
21927 rate, r
21928 Set upper limit for video rate of output stream, Default value is
21929 25. This guarantee that output video frame rate will not be higher
21930 than this value.
21931
21932 grayworld
21933 A color constancy filter that applies color correction based on the
21934 grayworld assumption
21935
21936 See:
21937 <https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging>
21938
21939 The algorithm uses linear light, so input data should be linearized
21940 beforehand (and possibly correctly tagged).
21941
21942 ffmpeg -i INPUT -vf zscale=transfer=linear,grayworld,zscale=transfer=bt709,format=yuv420p OUTPUT
21943
21944 greyedge
21945 A color constancy variation filter which estimates scene illumination
21946 via grey edge algorithm and corrects the scene colors accordingly.
21947
21948 See: <https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf>
21949
21950 The filter accepts the following options:
21951
21952 difford
21953 The order of differentiation to be applied on the scene. Must be
21954 chosen in the range [0,2] and default value is 1.
21955
21956 minknorm
21957 The Minkowski parameter to be used for calculating the Minkowski
21958 distance. Must be chosen in the range [0,20] and default value is
21959 1. Set to 0 for getting max value instead of calculating Minkowski
21960 distance.
21961
21962 sigma
21963 The standard deviation of Gaussian blur to be applied on the scene.
21964 Must be chosen in the range [0,1024.0] and default value = 1.
21965 floor( sigma * break_off_sigma(3) ) can't be equal to 0 if difford
21966 is greater than 0.
21967
21968 Examples
21969
21970 • Grey Edge:
21971
21972 greyedge=difford=1:minknorm=5:sigma=2
21973
21974 • Max Edge:
21975
21976 greyedge=difford=1:minknorm=0:sigma=2
21977
21978 guided
21979 Apply guided filter for edge-preserving smoothing, dehazing and so on.
21980
21981 The filter accepts the following options:
21982
21983 radius
21984 Set the box radius in pixels. Allowed range is 1 to 20. Default is
21985 3.
21986
21987 eps Set regularization parameter (with square). Allowed range is 0 to
21988 1. Default is 0.01.
21989
21990 mode
21991 Set filter mode. Can be "basic" or "fast". Default is "basic".
21992
21993 sub Set subsampling ratio for "fast" mode. Range is 2 to 64. Default
21994 is 4. No subsampling occurs in "basic" mode.
21995
21996 guidance
21997 Set guidance mode. Can be "off" or "on". Default is "off". If
21998 "off", single input is required. If "on", two inputs of the same
21999 resolution and pixel format are required. The second input serves
22000 as the guidance.
22001
22002 planes
22003 Set planes to filter. Default is first only.
22004
22005 Commands
22006
22007 This filter supports the all above options as commands.
22008
22009 Examples
22010
22011 • Edge-preserving smoothing with guided filter:
22012
22013 ffmpeg -i in.png -vf guided out.png
22014
22015 • Dehazing, structure-transferring filtering, detail enhancement with
22016 guided filter. For the generation of guidance image, refer to
22017 paper "Guided Image Filtering". See:
22018 <http://kaiminghe.com/publications/pami12guidedfilter.pdf>.
22019
22020 ffmpeg -i in.png -i guidance.png -filter_complex guided=guidance=on out.png
22021
22022 haldclut
22023 Apply a Hald CLUT to a video stream.
22024
22025 First input is the video stream to process, and second one is the Hald
22026 CLUT. The Hald CLUT input can be a simple picture or a complete video
22027 stream.
22028
22029 The filter accepts the following options:
22030
22031 clut
22032 Set which CLUT video frames will be processed from second input
22033 stream, can be first or all. Default is all.
22034
22035 shortest
22036 Force termination when the shortest input terminates. Default is 0.
22037
22038 repeatlast
22039 Continue applying the last CLUT after the end of the stream. A
22040 value of 0 disable the filter after the last frame of the CLUT is
22041 reached. Default is 1.
22042
22043 "haldclut" also has the same interpolation options as lut3d (both
22044 filters share the same internals).
22045
22046 This filter also supports the framesync options.
22047
22048 More information about the Hald CLUT can be found on Eskil Steenberg's
22049 website (Hald CLUT author) at
22050 <http://www.quelsolaar.com/technology/clut.html>.
22051
22052 Commands
22053
22054 This filter supports the "interp" option as commands.
22055
22056 Workflow examples
22057
22058 Hald CLUT video stream
22059
22060 Generate an identity Hald CLUT stream altered with various effects:
22061
22062 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
22063
22064 Note: make sure you use a lossless codec.
22065
22066 Then use it with "haldclut" to apply it on some random stream:
22067
22068 ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
22069
22070 The Hald CLUT will be applied to the 10 first seconds (duration of
22071 clut.nut), then the latest picture of that CLUT stream will be applied
22072 to the remaining frames of the "mandelbrot" stream.
22073
22074 Hald CLUT with preview
22075
22076 A Hald CLUT is supposed to be a squared image of "Level*Level*Level" by
22077 "Level*Level*Level" pixels. For a given Hald CLUT, FFmpeg will select
22078 the biggest possible square starting at the top left of the picture.
22079 The remaining padding pixels (bottom or right) will be ignored. This
22080 area can be used to add a preview of the Hald CLUT.
22081
22082 Typically, the following generated Hald CLUT will be supported by the
22083 "haldclut" filter:
22084
22085 ffmpeg -f lavfi -i B<haldclutsrc>=8 -vf "
22086 pad=iw+320 [padded_clut];
22087 smptebars=s=320x256, split [a][b];
22088 [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
22089 [main][b] overlay=W-320" -frames:v 1 clut.png
22090
22091 It contains the original and a preview of the effect of the CLUT: SMPTE
22092 color bars are displayed on the right-top, and below the same color
22093 bars processed by the color changes.
22094
22095 Then, the effect of this Hald CLUT can be visualized with:
22096
22097 ffplay input.mkv -vf "movie=clut.png, [in] haldclut"
22098
22099 hflip
22100 Flip the input video horizontally.
22101
22102 For example, to horizontally flip the input video with ffmpeg:
22103
22104 ffmpeg -i in.avi -vf "hflip" out.avi
22105
22106 histeq
22107 This filter applies a global color histogram equalization on a per-
22108 frame basis.
22109
22110 It can be used to correct video that has a compressed range of pixel
22111 intensities. The filter redistributes the pixel intensities to
22112 equalize their distribution across the intensity range. It may be
22113 viewed as an "automatically adjusting contrast filter". This filter is
22114 useful only for correcting degraded or poorly captured source video.
22115
22116 The filter accepts the following options:
22117
22118 strength
22119 Determine the amount of equalization to be applied. As the
22120 strength is reduced, the distribution of pixel intensities more-
22121 and-more approaches that of the input frame. The value must be a
22122 float number in the range [0,1] and defaults to 0.200.
22123
22124 intensity
22125 Set the maximum intensity that can generated and scale the output
22126 values appropriately. The strength should be set as desired and
22127 then the intensity can be limited if needed to avoid washing-out.
22128 The value must be a float number in the range [0,1] and defaults to
22129 0.210.
22130
22131 antibanding
22132 Set the antibanding level. If enabled the filter will randomly vary
22133 the luminance of output pixels by a small amount to avoid banding
22134 of the histogram. Possible values are "none", "weak" or "strong".
22135 It defaults to "none".
22136
22137 histogram
22138 Compute and draw a color distribution histogram for the input video.
22139
22140 The computed histogram is a representation of the color component
22141 distribution in an image.
22142
22143 Standard histogram displays the color components distribution in an
22144 image. Displays color graph for each color component. Shows
22145 distribution of the Y, U, V, A or R, G, B components, depending on
22146 input format, in the current frame. Below each graph a color component
22147 scale meter is shown.
22148
22149 The filter accepts the following options:
22150
22151 level_height
22152 Set height of level. Default value is 200. Allowed range is [50,
22153 2048].
22154
22155 scale_height
22156 Set height of color scale. Default value is 12. Allowed range is
22157 [0, 40].
22158
22159 display_mode
22160 Set display mode. It accepts the following values:
22161
22162 stack
22163 Per color component graphs are placed below each other.
22164
22165 parade
22166 Per color component graphs are placed side by side.
22167
22168 overlay
22169 Presents information identical to that in the "parade", except
22170 that the graphs representing color components are superimposed
22171 directly over one another.
22172
22173 Default is "stack".
22174
22175 levels_mode
22176 Set mode. Can be either "linear", or "logarithmic". Default is
22177 "linear".
22178
22179 components
22180 Set what color components to display. Default is 7.
22181
22182 fgopacity
22183 Set foreground opacity. Default is 0.7.
22184
22185 bgopacity
22186 Set background opacity. Default is 0.5.
22187
22188 colors_mode
22189 Set colors mode. It accepts the following values:
22190
22191 whiteonblack
22192 blackonwhite
22193 whiteongray
22194 blackongray
22195 coloronblack
22196 coloronwhite
22197 colorongray
22198 blackoncolor
22199 whiteoncolor
22200 grayoncolor
22201
22202 Default is "whiteonblack".
22203
22204 Examples
22205
22206 • Calculate and draw histogram:
22207
22208 ffplay -i input -vf histogram
22209
22210 hqdn3d
22211 This is a high precision/quality 3d denoise filter. It aims to reduce
22212 image noise, producing smooth images and making still images really
22213 still. It should enhance compressibility.
22214
22215 It accepts the following optional parameters:
22216
22217 luma_spatial
22218 A non-negative floating point number which specifies spatial luma
22219 strength. It defaults to 4.0.
22220
22221 chroma_spatial
22222 A non-negative floating point number which specifies spatial chroma
22223 strength. It defaults to 3.0*luma_spatial/4.0.
22224
22225 luma_tmp
22226 A floating point number which specifies luma temporal strength. It
22227 defaults to 6.0*luma_spatial/4.0.
22228
22229 chroma_tmp
22230 A floating point number which specifies chroma temporal strength.
22231 It defaults to luma_tmp*chroma_spatial/luma_spatial.
22232
22233 Commands
22234
22235 This filter supports same commands as options. The command accepts the
22236 same syntax of the corresponding option.
22237
22238 If the specified expression is not valid, it is kept at its current
22239 value.
22240
22241 hwdownload
22242 Download hardware frames to system memory.
22243
22244 The input must be in hardware frames, and the output a non-hardware
22245 format. Not all formats will be supported on the output - it may be
22246 necessary to insert an additional format filter immediately following
22247 in the graph to get the output in a supported format.
22248
22249 hwmap
22250 Map hardware frames to system memory or to another device.
22251
22252 This filter has several different modes of operation; which one is used
22253 depends on the input and output formats:
22254
22255 • Hardware frame input, normal frame output
22256
22257 Map the input frames to system memory and pass them to the output.
22258 If the original hardware frame is later required (for example,
22259 after overlaying something else on part of it), the hwmap filter
22260 can be used again in the next mode to retrieve it.
22261
22262 • Normal frame input, hardware frame output
22263
22264 If the input is actually a software-mapped hardware frame, then
22265 unmap it - that is, return the original hardware frame.
22266
22267 Otherwise, a device must be provided. Create new hardware surfaces
22268 on that device for the output, then map them back to the software
22269 format at the input and give those frames to the preceding filter.
22270 This will then act like the hwupload filter, but may be able to
22271 avoid an additional copy when the input is already in a compatible
22272 format.
22273
22274 • Hardware frame input and output
22275
22276 A device must be supplied for the output, either directly or with
22277 the derive_device option. The input and output devices must be of
22278 different types and compatible - the exact meaning of this is
22279 system-dependent, but typically it means that they must refer to
22280 the same underlying hardware context (for example, refer to the
22281 same graphics card).
22282
22283 If the input frames were originally created on the output device,
22284 then unmap to retrieve the original frames.
22285
22286 Otherwise, map the frames to the output device - create new
22287 hardware frames on the output corresponding to the frames on the
22288 input.
22289
22290 The following additional parameters are accepted:
22291
22292 mode
22293 Set the frame mapping mode. Some combination of:
22294
22295 read
22296 The mapped frame should be readable.
22297
22298 write
22299 The mapped frame should be writeable.
22300
22301 overwrite
22302 The mapping will always overwrite the entire frame.
22303
22304 This may improve performance in some cases, as the original
22305 contents of the frame need not be loaded.
22306
22307 direct
22308 The mapping must not involve any copying.
22309
22310 Indirect mappings to copies of frames are created in some cases
22311 where either direct mapping is not possible or it would have
22312 unexpected properties. Setting this flag ensures that the
22313 mapping is direct and will fail if that is not possible.
22314
22315 Defaults to read+write if not specified.
22316
22317 derive_device type
22318 Rather than using the device supplied at initialisation, instead
22319 derive a new device of type type from the device the input frames
22320 exist on.
22321
22322 reverse
22323 In a hardware to hardware mapping, map in reverse - create frames
22324 in the sink and map them back to the source. This may be necessary
22325 in some cases where a mapping in one direction is required but only
22326 the opposite direction is supported by the devices being used.
22327
22328 This option is dangerous - it may break the preceding filter in
22329 undefined ways if there are any additional constraints on that
22330 filter's output. Do not use it without fully understanding the
22331 implications of its use.
22332
22333 hwupload
22334 Upload system memory frames to hardware surfaces.
22335
22336 The device to upload to must be supplied when the filter is
22337 initialised. If using ffmpeg, select the appropriate device with the
22338 -filter_hw_device option or with the derive_device option. The input
22339 and output devices must be of different types and compatible - the
22340 exact meaning of this is system-dependent, but typically it means that
22341 they must refer to the same underlying hardware context (for example,
22342 refer to the same graphics card).
22343
22344 The following additional parameters are accepted:
22345
22346 derive_device type
22347 Rather than using the device supplied at initialisation, instead
22348 derive a new device of type type from the device the input frames
22349 exist on.
22350
22351 hwupload_cuda
22352 Upload system memory frames to a CUDA device.
22353
22354 It accepts the following optional parameters:
22355
22356 device
22357 The number of the CUDA device to use
22358
22359 hqx
22360 Apply a high-quality magnification filter designed for pixel art. This
22361 filter was originally created by Maxim Stepin.
22362
22363 It accepts the following option:
22364
22365 n Set the scaling dimension: 2 for "hq2x", 3 for "hq3x" and 4 for
22366 "hq4x". Default is 3.
22367
22368 hstack
22369 Stack input videos horizontally.
22370
22371 All streams must be of same pixel format and of same height.
22372
22373 Note that this filter is faster than using overlay and pad filter to
22374 create same output.
22375
22376 The filter accepts the following option:
22377
22378 inputs
22379 Set number of input streams. Default is 2.
22380
22381 shortest
22382 If set to 1, force the output to terminate when the shortest input
22383 terminates. Default value is 0.
22384
22385 hsvhold
22386 Turns a certain HSV range into gray values.
22387
22388 This filter measures color difference between set HSV color in options
22389 and ones measured in video stream. Depending on options, output colors
22390 can be changed to be gray or not.
22391
22392 The filter accepts the following options:
22393
22394 hue Set the hue value which will be used in color difference
22395 calculation. Allowed range is from -360 to 360. Default value is
22396 0.
22397
22398 sat Set the saturation value which will be used in color difference
22399 calculation. Allowed range is from -1 to 1. Default value is 0.
22400
22401 val Set the value which will be used in color difference calculation.
22402 Allowed range is from -1 to 1. Default value is 0.
22403
22404 similarity
22405 Set similarity percentage with the key color. Allowed range is
22406 from 0 to 1. Default value is 0.01.
22407
22408 0.00001 matches only the exact key color, while 1.0 matches
22409 everything.
22410
22411 blend
22412 Blend percentage. Allowed range is from 0 to 1. Default value is
22413 0.
22414
22415 0.0 makes pixels either fully gray, or not gray at all.
22416
22417 Higher values result in more gray pixels, with a higher gray pixel
22418 the more similar the pixels color is to the key color.
22419
22420 hsvkey
22421 Turns a certain HSV range into transparency.
22422
22423 This filter measures color difference between set HSV color in options
22424 and ones measured in video stream. Depending on options, output colors
22425 can be changed to transparent by adding alpha channel.
22426
22427 The filter accepts the following options:
22428
22429 hue Set the hue value which will be used in color difference
22430 calculation. Allowed range is from -360 to 360. Default value is
22431 0.
22432
22433 sat Set the saturation value which will be used in color difference
22434 calculation. Allowed range is from -1 to 1. Default value is 0.
22435
22436 val Set the value which will be used in color difference calculation.
22437 Allowed range is from -1 to 1. Default value is 0.
22438
22439 similarity
22440 Set similarity percentage with the key color. Allowed range is
22441 from 0 to 1. Default value is 0.01.
22442
22443 0.00001 matches only the exact key color, while 1.0 matches
22444 everything.
22445
22446 blend
22447 Blend percentage. Allowed range is from 0 to 1. Default value is
22448 0.
22449
22450 0.0 makes pixels either fully transparent, or not transparent at
22451 all.
22452
22453 Higher values result in semi-transparent pixels, with a higher
22454 transparency the more similar the pixels color is to the key color.
22455
22456 hue
22457 Modify the hue and/or the saturation of the input.
22458
22459 It accepts the following parameters:
22460
22461 h Specify the hue angle as a number of degrees. It accepts an
22462 expression, and defaults to "0".
22463
22464 s Specify the saturation in the [-10,10] range. It accepts an
22465 expression and defaults to "1".
22466
22467 H Specify the hue angle as a number of radians. It accepts an
22468 expression, and defaults to "0".
22469
22470 b Specify the brightness in the [-10,10] range. It accepts an
22471 expression and defaults to "0".
22472
22473 h and H are mutually exclusive, and can't be specified at the same
22474 time.
22475
22476 The b, h, H and s option values are expressions containing the
22477 following constants:
22478
22479 n frame count of the input frame starting from 0
22480
22481 pts presentation timestamp of the input frame expressed in time base
22482 units
22483
22484 r frame rate of the input video, NAN if the input frame rate is
22485 unknown
22486
22487 t timestamp expressed in seconds, NAN if the input timestamp is
22488 unknown
22489
22490 tb time base of the input video
22491
22492 Examples
22493
22494 • Set the hue to 90 degrees and the saturation to 1.0:
22495
22496 hue=h=90:s=1
22497
22498 • Same command but expressing the hue in radians:
22499
22500 hue=H=PI/2:s=1
22501
22502 • Rotate hue and make the saturation swing between 0 and 2 over a
22503 period of 1 second:
22504
22505 hue="H=2*PI*t: s=sin(2*PI*t)+1"
22506
22507 • Apply a 3 seconds saturation fade-in effect starting at 0:
22508
22509 hue="s=min(t/3\,1)"
22510
22511 The general fade-in expression can be written as:
22512
22513 hue="s=min(0\, max((t-START)/DURATION\, 1))"
22514
22515 • Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
22516
22517 hue="s=max(0\, min(1\, (8-t)/3))"
22518
22519 The general fade-out expression can be written as:
22520
22521 hue="s=max(0\, min(1\, (START+DURATION-t)/DURATION))"
22522
22523 Commands
22524
22525 This filter supports the following commands:
22526
22527 b
22528 s
22529 h
22530 H Modify the hue and/or the saturation and/or brightness of the input
22531 video. The command accepts the same syntax of the corresponding
22532 option.
22533
22534 If the specified expression is not valid, it is kept at its current
22535 value.
22536
22537 huesaturation
22538 Apply hue-saturation-intensity adjustments to input video stream.
22539
22540 This filter operates in RGB colorspace.
22541
22542 This filter accepts the following options:
22543
22544 hue Set the hue shift in degrees to apply. Default is 0. Allowed range
22545 is from -180 to 180.
22546
22547 saturation
22548 Set the saturation shift. Default is 0. Allowed range is from -1
22549 to 1.
22550
22551 intensity
22552 Set the intensity shift. Default is 0. Allowed range is from -1 to
22553 1.
22554
22555 colors
22556 Set which primary and complementary colors are going to be
22557 adjusted. This options is set by providing one or multiple values.
22558 This can select multiple colors at once. By default all colors are
22559 selected.
22560
22561 r Adjust reds.
22562
22563 y Adjust yellows.
22564
22565 g Adjust greens.
22566
22567 c Adjust cyans.
22568
22569 b Adjust blues.
22570
22571 m Adjust magentas.
22572
22573 a Adjust all colors.
22574
22575 strength
22576 Set strength of filtering. Allowed range is from 0 to 100. Default
22577 value is 1.
22578
22579 rw, gw, bw
22580 Set weight for each RGB component. Allowed range is from 0 to 1.
22581 By default is set to 0.333, 0.334, 0.333. Those options are used
22582 in saturation and lightess processing.
22583
22584 lightness
22585 Set preserving lightness, by default is disabled. Adjusting hues
22586 can change lightness from original RGB triplet, with this option
22587 enabled lightness is kept at same value.
22588
22589 hysteresis
22590 Grow first stream into second stream by connecting components. This
22591 makes it possible to build more robust edge masks.
22592
22593 This filter accepts the following options:
22594
22595 planes
22596 Set which planes will be processed as bitmap, unprocessed planes
22597 will be copied from first stream. By default value 0xf, all planes
22598 will be processed.
22599
22600 threshold
22601 Set threshold which is used in filtering. If pixel component value
22602 is higher than this value filter algorithm for connecting
22603 components is activated. By default value is 0.
22604
22605 The "hysteresis" filter also supports the framesync options.
22606
22607 iccdetect
22608 Detect the colorspace from an embedded ICC profile (if present), and
22609 update the frame's tags accordingly.
22610
22611 This filter accepts the following options:
22612
22613 force
22614 If true, the frame's existing colorspace tags will always be
22615 overridden by values detected from an ICC profile. Otherwise, they
22616 will only be assigned if they contain "unknown". Enabled by
22617 default.
22618
22619 iccgen
22620 Generate ICC profiles and attach them to frames.
22621
22622 This filter accepts the following options:
22623
22624 color_primaries
22625 color_trc
22626 Configure the colorspace that the ICC profile will be generated
22627 for. The default value of "auto" infers the value from the input
22628 frame's metadata, defaulting to BT.709/sRGB as appropriate.
22629
22630 See the setparams filter for a list of possible values, but note
22631 that "unknown" are not valid values for this filter.
22632
22633 force
22634 If true, an ICC profile will be generated even if it would
22635 overwrite an already existing ICC profile. Disabled by default.
22636
22637 identity
22638 Obtain the identity score between two input videos.
22639
22640 This filter takes two input videos.
22641
22642 Both input videos must have the same resolution and pixel format for
22643 this filter to work correctly. Also it assumes that both inputs have
22644 the same number of frames, which are compared one by one.
22645
22646 The obtained per component, average, min and max identity score is
22647 printed through the logging system.
22648
22649 The filter stores the calculated identity scores of each frame in frame
22650 metadata.
22651
22652 This filter also supports the framesync options.
22653
22654 In the below example the input file main.mpg being processed is
22655 compared with the reference file ref.mpg.
22656
22657 ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
22658
22659 idet
22660 Detect video interlacing type.
22661
22662 This filter tries to detect if the input frames are interlaced,
22663 progressive, top or bottom field first. It will also try to detect
22664 fields that are repeated between adjacent frames (a sign of telecine).
22665
22666 Single frame detection considers only immediately adjacent frames when
22667 classifying each frame. Multiple frame detection incorporates the
22668 classification history of previous frames.
22669
22670 The filter will log these metadata values:
22671
22672 single.current_frame
22673 Detected type of current frame using single-frame detection. One
22674 of: ``tff'' (top field first), ``bff'' (bottom field first),
22675 ``progressive'', or ``undetermined''
22676
22677 single.tff
22678 Cumulative number of frames detected as top field first using
22679 single-frame detection.
22680
22681 multiple.tff
22682 Cumulative number of frames detected as top field first using
22683 multiple-frame detection.
22684
22685 single.bff
22686 Cumulative number of frames detected as bottom field first using
22687 single-frame detection.
22688
22689 multiple.current_frame
22690 Detected type of current frame using multiple-frame detection. One
22691 of: ``tff'' (top field first), ``bff'' (bottom field first),
22692 ``progressive'', or ``undetermined''
22693
22694 multiple.bff
22695 Cumulative number of frames detected as bottom field first using
22696 multiple-frame detection.
22697
22698 single.progressive
22699 Cumulative number of frames detected as progressive using single-
22700 frame detection.
22701
22702 multiple.progressive
22703 Cumulative number of frames detected as progressive using multiple-
22704 frame detection.
22705
22706 single.undetermined
22707 Cumulative number of frames that could not be classified using
22708 single-frame detection.
22709
22710 multiple.undetermined
22711 Cumulative number of frames that could not be classified using
22712 multiple-frame detection.
22713
22714 repeated.current_frame
22715 Which field in the current frame is repeated from the last. One of
22716 ``neither'', ``top'', or ``bottom''.
22717
22718 repeated.neither
22719 Cumulative number of frames with no repeated field.
22720
22721 repeated.top
22722 Cumulative number of frames with the top field repeated from the
22723 previous frame's top field.
22724
22725 repeated.bottom
22726 Cumulative number of frames with the bottom field repeated from the
22727 previous frame's bottom field.
22728
22729 The filter accepts the following options:
22730
22731 intl_thres
22732 Set interlacing threshold.
22733
22734 prog_thres
22735 Set progressive threshold.
22736
22737 rep_thres
22738 Threshold for repeated field detection.
22739
22740 half_life
22741 Number of frames after which a given frame's contribution to the
22742 statistics is halved (i.e., it contributes only 0.5 to its
22743 classification). The default of 0 means that all frames seen are
22744 given full weight of 1.0 forever.
22745
22746 analyze_interlaced_flag
22747 When this is not 0 then idet will use the specified number of
22748 frames to determine if the interlaced flag is accurate, it will not
22749 count undetermined frames. If the flag is found to be accurate it
22750 will be used without any further computations, if it is found to be
22751 inaccurate it will be cleared without any further computations.
22752 This allows inserting the idet filter as a low computational method
22753 to clean up the interlaced flag
22754
22755 il
22756 Deinterleave or interleave fields.
22757
22758 This filter allows one to process interlaced images fields without
22759 deinterlacing them. Deinterleaving splits the input frame into 2 fields
22760 (so called half pictures). Odd lines are moved to the top half of the
22761 output image, even lines to the bottom half. You can process (filter)
22762 them independently and then re-interleave them.
22763
22764 The filter accepts the following options:
22765
22766 luma_mode, l
22767 chroma_mode, c
22768 alpha_mode, a
22769 Available values for luma_mode, chroma_mode and alpha_mode are:
22770
22771 none
22772 Do nothing.
22773
22774 deinterleave, d
22775 Deinterleave fields, placing one above the other.
22776
22777 interleave, i
22778 Interleave fields. Reverse the effect of deinterleaving.
22779
22780 Default value is "none".
22781
22782 luma_swap, ls
22783 chroma_swap, cs
22784 alpha_swap, as
22785 Swap luma/chroma/alpha fields. Exchange even & odd lines. Default
22786 value is 0.
22787
22788 Commands
22789
22790 This filter supports the all above options as commands.
22791
22792 inflate
22793 Apply inflate effect to the video.
22794
22795 This filter replaces the pixel by the local(3x3) average by taking into
22796 account only values higher than the pixel.
22797
22798 It accepts the following options:
22799
22800 threshold0
22801 threshold1
22802 threshold2
22803 threshold3
22804 Limit the maximum change for each plane, default is 65535. If 0,
22805 plane will remain unchanged.
22806
22807 Commands
22808
22809 This filter supports the all above options as commands.
22810
22811 interlace
22812 Simple interlacing filter from progressive contents. This interleaves
22813 upper (or lower) lines from odd frames with lower (or upper) lines from
22814 even frames, halving the frame rate and preserving image height.
22815
22816 Original Original New Frame
22817 Frame 'j' Frame 'j+1' (tff)
22818 ========== =========== ==================
22819 Line 0 --------------------> Frame 'j' Line 0
22820 Line 1 Line 1 ----> Frame 'j+1' Line 1
22821 Line 2 ---------------------> Frame 'j' Line 2
22822 Line 3 Line 3 ----> Frame 'j+1' Line 3
22823 ... ... ...
22824 New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
22825
22826 It accepts the following optional parameters:
22827
22828 scan
22829 This determines whether the interlaced frame is taken from the even
22830 (tff - default) or odd (bff) lines of the progressive frame.
22831
22832 lowpass
22833 Vertical lowpass filter to avoid twitter interlacing and reduce
22834 moire patterns.
22835
22836 0, off
22837 Disable vertical lowpass filter
22838
22839 1, linear
22840 Enable linear filter (default)
22841
22842 2, complex
22843 Enable complex filter. This will slightly less reduce twitter
22844 and moire but better retain detail and subjective sharpness
22845 impression.
22846
22847 kerndeint
22848 Deinterlace input video by applying Donald Graft's adaptive kernel
22849 deinterling. Work on interlaced parts of a video to produce progressive
22850 frames.
22851
22852 The description of the accepted parameters follows.
22853
22854 thresh
22855 Set the threshold which affects the filter's tolerance when
22856 determining if a pixel line must be processed. It must be an
22857 integer in the range [0,255] and defaults to 10. A value of 0 will
22858 result in applying the process on every pixels.
22859
22860 map Paint pixels exceeding the threshold value to white if set to 1.
22861 Default is 0.
22862
22863 order
22864 Set the fields order. Swap fields if set to 1, leave fields alone
22865 if 0. Default is 0.
22866
22867 sharp
22868 Enable additional sharpening if set to 1. Default is 0.
22869
22870 twoway
22871 Enable twoway sharpening if set to 1. Default is 0.
22872
22873 Examples
22874
22875 • Apply default values:
22876
22877 kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
22878
22879 • Enable additional sharpening:
22880
22881 kerndeint=sharp=1
22882
22883 • Paint processed pixels in white:
22884
22885 kerndeint=map=1
22886
22887 kirsch
22888 Apply kirsch operator to input video stream.
22889
22890 The filter accepts the following option:
22891
22892 planes
22893 Set which planes will be processed, unprocessed planes will be
22894 copied. By default value 0xf, all planes will be processed.
22895
22896 scale
22897 Set value which will be multiplied with filtered result.
22898
22899 delta
22900 Set value which will be added to filtered result.
22901
22902 Commands
22903
22904 This filter supports the all above options as commands.
22905
22906 lagfun
22907 Slowly update darker pixels.
22908
22909 This filter makes short flashes of light appear longer. This filter
22910 accepts the following options:
22911
22912 decay
22913 Set factor for decaying. Default is .95. Allowed range is from 0 to
22914 1.
22915
22916 planes
22917 Set which planes to filter. Default is all. Allowed range is from 0
22918 to 15.
22919
22920 Commands
22921
22922 This filter supports the all above options as commands.
22923
22924 lenscorrection
22925 Correct radial lens distortion
22926
22927 This filter can be used to correct for radial distortion as can result
22928 from the use of wide angle lenses, and thereby re-rectify the image. To
22929 find the right parameters one can use tools available for example as
22930 part of opencv or simply trial-and-error. To use opencv use the
22931 calibration sample (under samples/cpp) from the opencv sources and
22932 extract the k1 and k2 coefficients from the resulting matrix.
22933
22934 Note that effectively the same filter is available in the open-source
22935 tools Krita and Digikam from the KDE project.
22936
22937 In contrast to the vignette filter, which can also be used to
22938 compensate lens errors, this filter corrects the distortion of the
22939 image, whereas vignette corrects the brightness distribution, so you
22940 may want to use both filters together in certain cases, though you will
22941 have to take care of ordering, i.e. whether vignetting should be
22942 applied before or after lens correction.
22943
22944 Options
22945
22946 The filter accepts the following options:
22947
22948 cx Relative x-coordinate of the focal point of the image, and thereby
22949 the center of the distortion. This value has a range [0,1] and is
22950 expressed as fractions of the image width. Default is 0.5.
22951
22952 cy Relative y-coordinate of the focal point of the image, and thereby
22953 the center of the distortion. This value has a range [0,1] and is
22954 expressed as fractions of the image height. Default is 0.5.
22955
22956 k1 Coefficient of the quadratic correction term. This value has a
22957 range [-1,1]. 0 means no correction. Default is 0.
22958
22959 k2 Coefficient of the double quadratic correction term. This value has
22960 a range [-1,1]. 0 means no correction. Default is 0.
22961
22962 i Set interpolation type. Can be "nearest" or "bilinear". Default is
22963 "nearest".
22964
22965 fc Specify the color of the unmapped pixels. For the syntax of this
22966 option, check the "Color" section in the ffmpeg-utils manual.
22967 Default color is "black@0".
22968
22969 The formula that generates the correction is:
22970
22971 r_src = r_tgt * (1 + k1 * (r_tgt / r_0)^2 + k2 * (r_tgt / r_0)^4)
22972
22973 where r_0 is halve of the image diagonal and r_src and r_tgt are the
22974 distances from the focal point in the source and target images,
22975 respectively.
22976
22977 Commands
22978
22979 This filter supports the all above options as commands.
22980
22981 lensfun
22982 Apply lens correction via the lensfun library
22983 (<http://lensfun.sourceforge.net/>).
22984
22985 The "lensfun" filter requires the camera make, camera model, and lens
22986 model to apply the lens correction. The filter will load the lensfun
22987 database and query it to find the corresponding camera and lens entries
22988 in the database. As long as these entries can be found with the given
22989 options, the filter can perform corrections on frames. Note that
22990 incomplete strings will result in the filter choosing the best match
22991 with the given options, and the filter will output the chosen camera
22992 and lens models (logged with level "info"). You must provide the make,
22993 camera model, and lens model as they are required.
22994
22995 To obtain a list of available makes and models, leave out one or both
22996 of "make" and "model" options. The filter will send the full list to
22997 the log with level "INFO". The first column is the make and the second
22998 column is the model. To obtain a list of available lenses, set any
22999 values for make and model and leave out the "lens_model" option. The
23000 filter will send the full list of lenses in the log with level "INFO".
23001 The ffmpeg tool will exit after the list is printed.
23002
23003 The filter accepts the following options:
23004
23005 make
23006 The make of the camera (for example, "Canon"). This option is
23007 required.
23008
23009 model
23010 The model of the camera (for example, "Canon EOS 100D"). This
23011 option is required.
23012
23013 lens_model
23014 The model of the lens (for example, "Canon EF-S 18-55mm f/3.5-5.6
23015 IS STM"). This option is required.
23016
23017 db_path
23018 The full path to the lens database folder. If not set, the filter
23019 will attempt to load the database from the install path when the
23020 library was built. Default is unset.
23021
23022 mode
23023 The type of correction to apply. The following values are valid
23024 options:
23025
23026 vignetting
23027 Enables fixing lens vignetting.
23028
23029 geometry
23030 Enables fixing lens geometry. This is the default.
23031
23032 subpixel
23033 Enables fixing chromatic aberrations.
23034
23035 vig_geo
23036 Enables fixing lens vignetting and lens geometry.
23037
23038 vig_subpixel
23039 Enables fixing lens vignetting and chromatic aberrations.
23040
23041 distortion
23042 Enables fixing both lens geometry and chromatic aberrations.
23043
23044 all Enables all possible corrections.
23045
23046 focal_length
23047 The focal length of the image/video (zoom; expected constant for
23048 video). For example, a 18--55mm lens has focal length range of
23049 [18--55], so a value in that range should be chosen when using that
23050 lens. Default 18.
23051
23052 aperture
23053 The aperture of the image/video (expected constant for video). Note
23054 that aperture is only used for vignetting correction. Default 3.5.
23055
23056 focus_distance
23057 The focus distance of the image/video (expected constant for
23058 video). Note that focus distance is only used for vignetting and
23059 only slightly affects the vignetting correction process. If
23060 unknown, leave it at the default value (which is 1000).
23061
23062 scale
23063 The scale factor which is applied after transformation. After
23064 correction the video is no longer necessarily rectangular. This
23065 parameter controls how much of the resulting image is visible. The
23066 value 0 means that a value will be chosen automatically such that
23067 there is little or no unmapped area in the output image. 1.0 means
23068 that no additional scaling is done. Lower values may result in more
23069 of the corrected image being visible, while higher values may avoid
23070 unmapped areas in the output.
23071
23072 target_geometry
23073 The target geometry of the output image/video. The following values
23074 are valid options:
23075
23076 rectilinear (default)
23077 fisheye
23078 panoramic
23079 equirectangular
23080 fisheye_orthographic
23081 fisheye_stereographic
23082 fisheye_equisolid
23083 fisheye_thoby
23084 reverse
23085 Apply the reverse of image correction (instead of correcting
23086 distortion, apply it).
23087
23088 interpolation
23089 The type of interpolation used when correcting distortion. The
23090 following values are valid options:
23091
23092 nearest
23093 linear (default)
23094 lanczos
23095
23096 Examples
23097
23098 • Apply lens correction with make "Canon", camera model "Canon EOS
23099 100D", and lens model "Canon EF-S 18-55mm f/3.5-5.6 IS STM" with
23100 focal length of "18" and aperture of "8.0".
23101
23102 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
23103
23104 • Apply the same as before, but only for the first 5 seconds of
23105 video.
23106
23107 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
23108
23109 libplacebo
23110 Flexible GPU-accelerated processing filter based on libplacebo
23111 (<https://code.videolan.org/videolan/libplacebo>). Note that this
23112 filter currently only accepts Vulkan input frames.
23113
23114 Options
23115
23116 The options for this filter are divided into the following sections:
23117
23118 Output mode
23119
23120 These options control the overall output mode. By default, libplacebo
23121 will try to preserve the source colorimetry and size as best as it can,
23122 but it will apply any embedded film grain, dolby vision metadata or
23123 anamorphic SAR present in source frames.
23124
23125 w
23126 h Set the output video dimension expression. Default value is the
23127 input dimension.
23128
23129 Allows for the same expressions as the scale filter.
23130
23131 format
23132 Set the output format override. If unset (the default), frames will
23133 be output in the same format as the respective input frames.
23134 Otherwise, format conversion will be performed.
23135
23136 force_original_aspect_ratio
23137 force_divisible_by
23138 Work the same as the identical scale filter options.
23139
23140 normalize_sar
23141 If enabled, output frames will always have a pixel aspect ratio of
23142 1:1. This will introduce padding/cropping as necessary. If disabled
23143 (the default), any aspect ratio mismatches, including those from
23144 e.g. anamorphic video sources, are forwarded to the output pixel
23145 aspect ratio.
23146
23147 pad_crop_ratio
23148 Specifies a ratio (between 0.0 and 1.0) between padding and
23149 cropping when the input aspect ratio does not match the output
23150 aspect ratio and normalize_sar is in effect. The default of 0.0
23151 always pads the content with black borders, while a value of 1.0
23152 always crops off parts of the content. Intermediate values are
23153 possible, leading to a mix of the two approaches.
23154
23155 colorspace
23156 color_primaries
23157 color_trc
23158 range
23159 Configure the colorspace that output frames will be delivered in.
23160 The default value of "auto" outputs frames in the same format as
23161 the input frames, leading to no change. For any other value,
23162 conversion will be performed.
23163
23164 See the setparams filter for a list of possible values.
23165
23166 apply_filmgrain
23167 Apply film grain (e.g. AV1 or H.274) if present in source frames,
23168 and strip it from the output. Enabled by default.
23169
23170 apply_dolbyvision
23171 Apply Dolby Vision RPU metadata if present in source frames, and
23172 strip it from the output. Enabled by default. Note that Dolby
23173 Vision will always output BT.2020+PQ, overriding the usual input
23174 frame metadata. These will also be picked as the values of "auto"
23175 for the respective frame output options.
23176
23177 Scaling
23178
23179 The options in this section control how libplacebo performs upscaling
23180 and (if necessary) downscaling. Note that libplacebo will always
23181 internally operate on 4:4:4 content, so any sub-sampled chroma formats
23182 such as "yuv420p" will necessarily be upsampled and downsampled as part
23183 of the rendering process. That means scaling might be in effect even if
23184 the source and destination resolution are the same.
23185
23186 upscaler
23187 downscaler
23188 Configure the filter kernel used for upscaling and downscaling. The
23189 respective defaults are "spline36" and "mitchell". For a full list
23190 of possible values, pass "help" to these options. The most
23191 important values are:
23192
23193 none
23194 Forces the use of built-in GPU texture sampling (typically
23195 bilinear). Extremely fast but poor quality, especially when
23196 downscaling.
23197
23198 bilinear
23199 Bilinear interpolation. Can generally be done for free on GPUs,
23200 except when doing so would lead to aliasing. Fast and low
23201 quality.
23202
23203 nearest
23204 Nearest-neighbour interpolation. Sharp but highly aliasing.
23205
23206 oversample
23207 Algorithm that looks visually similar to nearest-neighbour
23208 interpolation but tries to preserve pixel aspect ratio. Good
23209 for pixel art, since it results in minimal distortion of the
23210 artistic appearance.
23211
23212 lanczos
23213 Standard sinc-sinc interpolation kernel.
23214
23215 spline36
23216 Cubic spline approximation of lanczos. No difference in
23217 performance, but has very slightly less ringing.
23218
23219 ewa_lanczos
23220 Elliptically weighted average version of lanczos, based on a
23221 jinc-sinc kernel. This is also popularly referred to as just
23222 "Jinc scaling". Slow but very high quality.
23223
23224 gaussian
23225 Gaussian kernel. Has certain ideal mathematical properties, but
23226 subjectively very blurry.
23227
23228 mitchell
23229 Cubic BC spline with parameters recommended by Mitchell and
23230 Netravali. Very little ringing.
23231
23232 lut_entries
23233 Configures the size of scaler LUTs, ranging from 1 to 256. The
23234 default of 0 will pick libplacebo's internal default, typically 64.
23235
23236 antiringing
23237 Enables anti-ringing (for non-EWA filters). The value (between 0.0
23238 and 1.0) configures the strength of the anti-ringing algorithm. May
23239 increase aliasing if set too high. Disabled by default.
23240
23241 sigmoid
23242 Enable sigmoidal compression during upscaling. Reduces ringing
23243 slightly. Enabled by default.
23244
23245 Debanding
23246
23247 Libplacebo comes with a built-in debanding filter that is good at
23248 counteracting many common sources of banding and blocking. Turning this
23249 on is highly recommended whenever quality is desired.
23250
23251 deband
23252 Enable (fast) debanding algorithm. Disabled by default.
23253
23254 deband_iterations
23255 Number of deband iterations of the debanding algorithm. Each
23256 iteration is performed with progressively increased radius (and
23257 diminished threshold). Recommended values are in the range 1 to 4.
23258 Defaults to 1.
23259
23260 deband_threshold
23261 Debanding filter strength. Higher numbers lead to more aggressive
23262 debanding. Defaults to 4.0.
23263
23264 deband_radius
23265 Debanding filter radius. A higher radius is better for slow
23266 gradients, while a lower radius is better for steep gradients.
23267 Defaults to 16.0.
23268
23269 deband_grain
23270 Amount of extra output grain to add. Helps hide imperfections.
23271 Defaults to 6.0.
23272
23273 Color adjustment
23274
23275 A collection of subjective color controls. Not very rigorous, so the
23276 exact effect will vary somewhat depending on the input primaries and
23277 colorspace.
23278
23279 brightness
23280 Brightness boost, between -1.0 and 1.0. Defaults to 0.0.
23281
23282 contrast
23283 Contrast gain, between 0.0 and 16.0. Defaults to 1.0.
23284
23285 saturation
23286 Saturation gain, between 0.0 and 16.0. Defaults to 1.0.
23287
23288 hue Hue shift in radians, between -3.14 and 3.14. Defaults to 0.0. This
23289 will rotate the UV subvector, defaulting to BT.709 coefficients for
23290 RGB inputs.
23291
23292 gamma
23293 Gamma adjustment, between 0.0 and 16.0. Defaults to 1.0.
23294
23295 cones
23296 Cone model to use for color blindness simulation. Accepts any
23297 combination of "l", "m" and "s". Here are some examples:
23298
23299 m Deuteranomaly / deuteranopia (affecting 3%-4% of the
23300 population)
23301
23302 l Protanomaly / protanopia (affecting 1%-2% of the population)
23303
23304 l+m Monochromacy (very rare)
23305
23306 l+m+s
23307 Achromatopsy (complete loss of daytime vision, extremely rare)
23308
23309 cone-strength
23310 Gain factor for the cones specified by "cones", between 0.0 and
23311 10.0. A value of 1.0 results in no change to color vision. A value
23312 of 0.0 (the default) simulates complete loss of those cones. Values
23313 above 1.0 result in exaggerating the differences between cones,
23314 which may help compensate for reduced color vision.
23315
23316 Peak detection
23317
23318 To help deal with sources that only have static HDR10 metadata (or no
23319 tagging whatsoever), libplacebo uses its own internal frame analysis
23320 compute shader to analyze source frames and adapt the tone mapping
23321 function in realtime. If this is too slow, or if exactly reproducible
23322 frame-perfect results are needed, it's recommended to turn this feature
23323 off.
23324
23325 peak_detect
23326 Enable HDR peak detection. Ignores static MaxCLL/MaxFALL values in
23327 favor of dynamic detection from the input. Note that the detected
23328 values do not get written back to the output frames, they merely
23329 guide the internal tone mapping process. Enabled by default.
23330
23331 smoothing_period
23332 Peak detection smoothing period, between 0.0 and 1000.0. Higher
23333 values result in peak detection becoming less responsive to changes
23334 in the input. Defaults to 100.0.
23335
23336 minimum_peak
23337 Lower bound on the detected peak (relative to SDR white), between
23338 0.0 and 100.0. Defaults to 1.0.
23339
23340 scene_threshold_low
23341 scene_threshold_high
23342 Lower and upper thresholds for scene change detection. Expressed in
23343 a logarithmic scale between 0.0 and 100.0. Default to 5.5 and 10.0,
23344 respectively. Setting either to a negative value disables this
23345 functionality.
23346
23347 overshoot
23348 Peak smoothing overshoot margin, between 0.0 and 1.0. Provides a
23349 safety margin to prevent clipping as a result of peak smoothing.
23350 Defaults to 0.05, corresponding to a margin of 5%.
23351
23352 Tone mapping
23353
23354 The options in this section control how libplacebo performs tone-
23355 mapping and gamut-mapping when dealing with mismatches between wide-
23356 gamut or HDR content. In general, libplacebo relies on accurate source
23357 tagging and mastering display gamut information to produce the best
23358 results.
23359
23360 intent
23361 Rendering intent to use when adapting between different primary
23362 color gamuts (after tone-mapping).
23363
23364 perceptual
23365 Perceptual gamut mapping. Currently equivalent to relative
23366 colorimetric.
23367
23368 relative
23369 Relative colorimetric. This is the default.
23370
23371 absolute
23372 Absolute colorimetric.
23373
23374 saturation
23375 Saturation mapping. Forcibly stretches the source gamut to the
23376 target gamut.
23377
23378 gamut_mode
23379 How to handle out-of-gamut colors that can occur as a result of
23380 colorimetric gamut mapping.
23381
23382 clip
23383 Do nothing, simply clip out-of-range colors to the RGB volume.
23384 This is the default.
23385
23386 warn
23387 Highlight out-of-gamut pixels (by coloring them pink).
23388
23389 darken
23390 Linearly reduces content brightness to preserves saturated
23391 details, followed by clipping the remaining out-of-gamut
23392 colors. As the name implies, this makes everything darker, but
23393 provides a good balance between preserving details and colors.
23394
23395 desaturate
23396 Hard-desaturates out-of-gamut colors towards white, while
23397 preserving the luminance. Has a tendency to shift colors.
23398
23399 tonemapping
23400 Tone-mapping algorithm to use. Available values are:
23401
23402 auto
23403 Automatic selection based on internal heuristics. This is the
23404 default.
23405
23406 clip
23407 Performs no tone-mapping, just clips out-of-range colors.
23408 Retains perfect color accuracy for in-range colors but
23409 completely destroys out-of-range information. Does not perform
23410 any black point adaptation. Not configurable.
23411
23412 st2094-40
23413 EETF from SMPTE ST 2094-40 Annex B, which applies the Bezier
23414 curves from HDR10+ dynamic metadata based on Bezier curves to
23415 perform tone-mapping. The OOTF used is adjusted based on the
23416 ratio between the targeted and actual display peak luminances.
23417
23418 st2094-10
23419 EETF from SMPTE ST 2094-10 Annex B.2, which takes into account
23420 the input signal average luminance in addition to the
23421 maximum/minimum. The configurable contrast parameter influences
23422 the slope of the linear output segment, defaulting to 1.0 for
23423 no increase/decrease in contrast. Note that this does not
23424 currently include the subjective gain/offset/gamma controls
23425 defined in Annex B.3.
23426
23427 bt.2390
23428 EETF from the ITU-R Report BT.2390, a hermite spline roll-off
23429 with linear segment. The knee point offset is configurable.
23430 Note that this parameter defaults to 1.0, rather than the value
23431 of 0.5 from the ITU-R spec.
23432
23433 bt.2446a
23434 EETF from ITU-R Report BT.2446, method A. Designed for well-
23435 mastered HDR sources. Can be used for both forward and inverse
23436 tone mapping. Not configurable.
23437
23438 spline
23439 Simple spline consisting of two polynomials, joined by a single
23440 pivot point. The parameter gives the pivot point (in PQ
23441 space), defaulting to 0.30. Can be used for both forward and
23442 inverse tone mapping.
23443
23444 reinhard
23445 Simple non-linear, global tone mapping algorithm. The parameter
23446 specifies the local contrast coefficient at the display peak.
23447 Essentially, a parameter of 0.5 implies that the reference
23448 white will be about half as bright as when clipping. Defaults
23449 to 0.5, which results in the simplest formulation of this
23450 function.
23451
23452 mobius
23453 Generalization of the reinhard tone mapping algorithm to
23454 support an additional linear slope near black. The tone mapping
23455 parameter indicates the trade-off between the linear section
23456 and the non-linear section. Essentially, for a given parameter
23457 x, every color value below x will be mapped linearly, while
23458 higher values get non-linearly tone-mapped. Values near 1.0
23459 make this curve behave like "clip", while values near 0.0 make
23460 this curve behave like "reinhard". The default value is 0.3,
23461 which provides a good balance between colorimetric accuracy and
23462 preserving out-of-gamut details.
23463
23464 hable
23465 Piece-wise, filmic tone-mapping algorithm developed by John
23466 Hable for use in Uncharted 2, inspired by a similar tone-
23467 mapping algorithm used by Kodak. Popularized by its use in
23468 video games with HDR rendering. Preserves both dark and bright
23469 details very well, but comes with the drawback of changing the
23470 average brightness quite significantly. This is sort of similar
23471 to "reinhard" with parameter 0.24.
23472
23473 gamma
23474 Fits a gamma (power) function to transfer between the source
23475 and target color spaces, effectively resulting in a perceptual
23476 hard-knee joining two roughly linear sections. This preserves
23477 details at all scales fairly accurately, but can result in an
23478 image with a muted or dull appearance. The parameter is used as
23479 the cutoff point, defaulting to 0.5.
23480
23481 linear
23482 Linearly stretches the input range to the output range, in PQ
23483 space. This will preserve all details accurately, but results
23484 in a significantly different average brightness. Can be used
23485 for inverse tone-mapping in addition to regular tone-mapping.
23486 The parameter can be used as an additional linear gain
23487 coefficient (defaulting to 1.0).
23488
23489 tonemapping_param
23490 For tunable tone mapping functions, this parameter can be used to
23491 fine-tune the curve behavior. Refer to the documentation of
23492 "tonemapping". The default value of 0.0 is replaced by the curve's
23493 preferred default setting.
23494
23495 tonemapping_mode
23496 This option determines how the tone mapping function specified by
23497 "tonemapping" is applied to the colors in a scene. Possible values
23498 are:
23499
23500 auto
23501 Automatic selection based on internal heuristics. This is the
23502 default.
23503
23504 rgb Apply the function per-channel in the RGB colorspace. Per-
23505 channel tone-mapping in RGB. Guarantees no clipping and heavily
23506 desaturates the output, but distorts the colors quite
23507 significantly. Very similar to the "Hollywood" look and feel.
23508
23509 max Tone-mapping is performed on the brightest component found in
23510 the signal. Good at preserving details in highlights, but has a
23511 tendency to crush blacks.
23512
23513 hybrid
23514 Tone-map per-channel for highlights and linearly (luma-based)
23515 for midtones/shadows, based on a fixed gamma 2.4 coefficient
23516 curve.
23517
23518 luma
23519 Tone-map linearly on the luma component (CIE Y), and adjust
23520 (desaturate) the chromaticities to compensate using a simple
23521 constant factor. This is essentially the mode used in ITU-R
23522 BT.2446 method A.
23523
23524 inverse_tonemapping
23525 If enabled, this filter will also attempt stretching SDR signals to
23526 fill HDR output color volumes. Disabled by default.
23527
23528 tonemapping_crosstalk
23529 Extra tone-mapping crosstalk factor, between 0.0 and 0.3. This can
23530 help reduce issues tone-mapping certain bright spectral colors.
23531 Defaults to 0.04.
23532
23533 tonemapping_lut_size
23534 Size of the tone-mapping LUT, between 2 and 1024. Defaults to 256.
23535 Note that this figure is squared when combined with "peak_detect".
23536
23537 Dithering
23538
23539 By default, libplacebo will dither whenever necessary, which includes
23540 rendering to any integer format below 16-bit precision. It's
23541 recommended to always leave this on, since not doing so may result in
23542 visible banding in the output, even if the "debanding" filter is
23543 enabled. If maximum performance is needed, use "ordered_fixed" instead
23544 of disabling dithering.
23545
23546 dithering
23547 Dithering method to use. Accepts the following values:
23548
23549 none
23550 Disables dithering completely. May result in visible banding.
23551
23552 blue
23553 Dither with pseudo-blue noise. This is the default.
23554
23555 ordered
23556 Tunable ordered dither pattern.
23557
23558 ordered_fixed
23559 Faster ordered dither with a fixed size of 6. Texture-less.
23560
23561 white
23562 Dither with white noise. Texture-less.
23563
23564 dither_lut_size
23565 Dither LUT size, as log base2 between 1 and 8. Defaults to 6,
23566 corresponding to a LUT size of "64x64".
23567
23568 dither_temporal
23569 Enables temporal dithering. Disabled by default.
23570
23571 Custom shaders
23572
23573 libplacebo supports a number of custom shaders based on the mpv .hook
23574 GLSL syntax. A collection of such shaders can be found here:
23575 <https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders>
23576
23577 A full description of the mpv shader format is beyond the scope of this
23578 section, but a summary can be found here:
23579 <https://mpv.io/manual/master/#options-glsl-shader>
23580
23581 custom_shader_path
23582 Specifies a path to a custom shader file to load at runtime.
23583
23584 custom_shader_bin
23585 Specifies a complete custom shader as a raw string.
23586
23587 Debugging / performance
23588
23589 All of the options in this section default off. They may be of
23590 assistance when attempting to squeeze the maximum performance at the
23591 cost of quality.
23592
23593 skip_aa
23594 Disable anti-aliasing when downscaling.
23595
23596 polar_cutoff
23597 Truncate polar (EWA) scaler kernels below this absolute magnitude,
23598 between 0.0 and 1.0.
23599
23600 disable_linear
23601 Disable linear light scaling.
23602
23603 disable_builtin
23604 Disable built-in GPU sampling (forces LUT).
23605
23606 disable_fbos
23607 Forcibly disable FBOs, resulting in loss of almost all
23608 functionality, but offering the maximum possible speed.
23609
23610 Commands
23611
23612 This filter supports almost all of the above options as commands.
23613
23614 Examples
23615
23616 • Complete example for how to initialize the Vulkan device, upload
23617 frames to the GPU, perform filter conversion to yuv420p, and
23618 download frames back to the CPU for output. Note that in specific
23619 cases you can get around the need to perform format conversion by
23620 specifying the correct "format" filter option corresponding to the
23621 input frames.
23622
23623 ffmpeg -i $INPUT -init_hw_device vulkan -vf hwupload,libplacebo=format=yuv420p,hwdownload,format=yuv420p $OUTPUT
23624
23625 • Tone-map input to standard gamut BT.709 output:
23626
23627 libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv
23628
23629 • Rescale input to fit into standard 1080p, with high quality
23630 scaling:
23631
23632 libplacebo=w=1920:h=1080:force_original_aspect_ratio=decrease:normalize_sar=true:upscaler=ewa_lanczos:downscaler=ewa_lanczos
23633
23634 • Convert input to standard sRGB JPEG:
23635
23636 libplacebo=format=yuv420p:colorspace=bt470bg:color_primaries=bt709:color_trc=iec61966-2-1:range=pc
23637
23638 • Use higher quality debanding settings:
23639
23640 libplacebo=deband=true:deband_iterations=3:deband_radius=8:deband_threshold=6
23641
23642 • Run this filter on the CPU, on systems with Mesa installed (and
23643 with the most expensive options disabled):
23644
23645 ffmpeg ... -init_hw_device vulkan:llvmpipe ... -vf libplacebo=upscaler=none:downscaler=none:peak_detect=false
23646
23647 • Suppress CPU-based AV1/H.274 film grain application in the decoder,
23648 in favor of doing it with this filter. Note that this is only a
23649 gain if the frames are either already on the GPU, or if you're
23650 using libplacebo for other purposes, since otherwise the VRAM
23651 roundtrip will more than offset any expected speedup.
23652
23653 ffmpeg -export_side_data +film_grain ... -vf libplacebo=apply_filmgrain=true
23654
23655 libvmaf
23656 Calulate the VMAF (Video Multi-Method Assessment Fusion) score for a
23657 reference/distorted pair of input videos.
23658
23659 The first input is the distorted video, and the second input is the
23660 reference video.
23661
23662 The obtained VMAF score is printed through the logging system.
23663
23664 It requires Netflix's vmaf library (libvmaf) as a pre-requisite. After
23665 installing the library it can be enabled using: "./configure
23666 --enable-libvmaf".
23667
23668 The filter has following options:
23669
23670 model
23671 A `|` delimited list of vmaf models. Each model can be configured
23672 with a number of parameters. Default value: "version=vmaf_v0.6.1"
23673
23674 model_path
23675 Deprecated, use model='path=...'.
23676
23677 enable_transform
23678 Deprecated, use model='enable_transform=true'.
23679
23680 phone_model
23681 Deprecated, use model='enable_transform=true'.
23682
23683 enable_conf_interval
23684 Deprecated, use model='enable_conf_interval=true'.
23685
23686 feature
23687 A `|` delimited list of features. Each feature can be configured
23688 with a number of parameters.
23689
23690 psnr
23691 Deprecated, use feature='name=psnr'.
23692
23693 ssim
23694 Deprecated, use feature='name=ssim'.
23695
23696 ms_ssim
23697 Deprecated, use feature='name=ms_ssim'.
23698
23699 log_path
23700 Set the file path to be used to store log files.
23701
23702 log_fmt
23703 Set the format of the log file (xml, json, csv, or sub).
23704
23705 n_threads
23706 Set number of threads to be used when initializing libvmaf.
23707 Default value: 0, no threads.
23708
23709 n_subsample
23710 Set frame subsampling interval to be used.
23711
23712 This filter also supports the framesync options.
23713
23714 Examples
23715
23716 • In the examples below, a distorted video distorted.mpg is compared
23717 with a reference file reference.mpg.
23718
23719 • Basic usage:
23720
23721 ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf=log_path=output.xml -f null -
23722
23723 • Example with multiple models:
23724
23725 ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='model=version=vmaf_v0.6.1\\:name=vmaf|version=vmaf_v0.6.1neg\\:name=vmaf_neg' -f null -
23726
23727 • Example with multiple addtional features:
23728
23729 ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='feature=name=psnr|name=ciede' -f null -
23730
23731 • Example with options and different containers:
23732
23733 ffmpeg -i distorted.mpg -i reference.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=log_fmt=json:log_path=output.json" -f null -
23734
23735 limitdiff
23736 Apply limited difference filter using second and optionally third video
23737 stream.
23738
23739 The filter accepts the following options:
23740
23741 threshold
23742 Set the threshold to use when allowing certain differences between
23743 video streams. Any absolute difference value lower or exact than
23744 this threshold will pick pixel components from first video stream.
23745
23746 elasticity
23747 Set the elasticity of soft thresholding when processing video
23748 streams. This value multiplied with first one sets second
23749 threshold. Any absolute difference value greater or exact than
23750 second threshold will pick pixel components from second video
23751 stream. For values between those two threshold linear interpolation
23752 between first and second video stream will be used.
23753
23754 reference
23755 Enable the reference (third) video stream processing. By default is
23756 disabled. If set, this video stream will be used for calculating
23757 absolute difference with first video stream.
23758
23759 planes
23760 Specify which planes will be processed. Defaults to all available.
23761
23762 Commands
23763
23764 This filter supports the all above options as commands except option
23765 reference.
23766
23767 limiter
23768 Limits the pixel components values to the specified range [min, max].
23769
23770 The filter accepts the following options:
23771
23772 min Lower bound. Defaults to the lowest allowed value for the input.
23773
23774 max Upper bound. Defaults to the highest allowed value for the input.
23775
23776 planes
23777 Specify which planes will be processed. Defaults to all available.
23778
23779 Commands
23780
23781 This filter supports the all above options as commands.
23782
23783 loop
23784 Loop video frames.
23785
23786 The filter accepts the following options:
23787
23788 loop
23789 Set the number of loops. Setting this value to -1 will result in
23790 infinite loops. Default is 0.
23791
23792 size
23793 Set maximal size in number of frames. Default is 0.
23794
23795 start
23796 Set first frame of loop. Default is 0.
23797
23798 Examples
23799
23800 • Loop single first frame infinitely:
23801
23802 loop=loop=-1:size=1:start=0
23803
23804 • Loop single first frame 10 times:
23805
23806 loop=loop=10:size=1:start=0
23807
23808 • Loop 10 first frames 5 times:
23809
23810 loop=loop=5:size=10:start=0
23811
23812 lut1d
23813 Apply a 1D LUT to an input video.
23814
23815 The filter accepts the following options:
23816
23817 file
23818 Set the 1D LUT file name.
23819
23820 Currently supported formats:
23821
23822 cube
23823 Iridas
23824
23825 csp cineSpace
23826
23827 interp
23828 Select interpolation mode.
23829
23830 Available values are:
23831
23832 nearest
23833 Use values from the nearest defined point.
23834
23835 linear
23836 Interpolate values using the linear interpolation.
23837
23838 cosine
23839 Interpolate values using the cosine interpolation.
23840
23841 cubic
23842 Interpolate values using the cubic interpolation.
23843
23844 spline
23845 Interpolate values using the spline interpolation.
23846
23847 Commands
23848
23849 This filter supports the all above options as commands.
23850
23851 lut3d
23852 Apply a 3D LUT to an input video.
23853
23854 The filter accepts the following options:
23855
23856 file
23857 Set the 3D LUT file name.
23858
23859 Currently supported formats:
23860
23861 3dl AfterEffects
23862
23863 cube
23864 Iridas
23865
23866 dat DaVinci
23867
23868 m3d Pandora
23869
23870 csp cineSpace
23871
23872 interp
23873 Select interpolation mode.
23874
23875 Available values are:
23876
23877 nearest
23878 Use values from the nearest defined point.
23879
23880 trilinear
23881 Interpolate values using the 8 points defining a cube.
23882
23883 tetrahedral
23884 Interpolate values using a tetrahedron.
23885
23886 pyramid
23887 Interpolate values using a pyramid.
23888
23889 prism
23890 Interpolate values using a prism.
23891
23892 Commands
23893
23894 This filter supports the "interp" option as commands.
23895
23896 lumakey
23897 Turn certain luma values into transparency.
23898
23899 The filter accepts the following options:
23900
23901 threshold
23902 Set the luma which will be used as base for transparency. Default
23903 value is 0.
23904
23905 tolerance
23906 Set the range of luma values to be keyed out. Default value is
23907 0.01.
23908
23909 softness
23910 Set the range of softness. Default value is 0. Use this to control
23911 gradual transition from zero to full transparency.
23912
23913 Commands
23914
23915 This filter supports same commands as options. The command accepts the
23916 same syntax of the corresponding option.
23917
23918 If the specified expression is not valid, it is kept at its current
23919 value.
23920
23921 lut, lutrgb, lutyuv
23922 Compute a look-up table for binding each pixel component input value to
23923 an output value, and apply it to the input video.
23924
23925 lutyuv applies a lookup table to a YUV input video, lutrgb to an RGB
23926 input video.
23927
23928 These filters accept the following parameters:
23929
23930 c0 set first pixel component expression
23931
23932 c1 set second pixel component expression
23933
23934 c2 set third pixel component expression
23935
23936 c3 set fourth pixel component expression, corresponds to the alpha
23937 component
23938
23939 r set red component expression
23940
23941 g set green component expression
23942
23943 b set blue component expression
23944
23945 a alpha component expression
23946
23947 y set Y/luminance component expression
23948
23949 u set U/Cb component expression
23950
23951 v set V/Cr component expression
23952
23953 Each of them specifies the expression to use for computing the lookup
23954 table for the corresponding pixel component values.
23955
23956 The exact component associated to each of the c* options depends on the
23957 format in input.
23958
23959 The lut filter requires either YUV or RGB pixel formats in input,
23960 lutrgb requires RGB pixel formats in input, and lutyuv requires YUV.
23961
23962 The expressions can contain the following constants and functions:
23963
23964 w
23965 h The input width and height.
23966
23967 val The input value for the pixel component.
23968
23969 clipval
23970 The input value, clipped to the minval-maxval range.
23971
23972 maxval
23973 The maximum value for the pixel component.
23974
23975 minval
23976 The minimum value for the pixel component.
23977
23978 negval
23979 The negated value for the pixel component value, clipped to the
23980 minval-maxval range; it corresponds to the expression
23981 "maxval-clipval+minval".
23982
23983 clip(val)
23984 The computed value in val, clipped to the minval-maxval range.
23985
23986 gammaval(gamma)
23987 The computed gamma correction value of the pixel component value,
23988 clipped to the minval-maxval range. It corresponds to the
23989 expression
23990 "pow((clipval-minval)/(maxval-minval)\,gamma)*(maxval-minval)+minval"
23991
23992 All expressions default to "clipval".
23993
23994 Commands
23995
23996 This filter supports same commands as options.
23997
23998 Examples
23999
24000 • Negate input video:
24001
24002 lutrgb="r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val"
24003 lutyuv="y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val"
24004
24005 The above is the same as:
24006
24007 lutrgb="r=negval:g=negval:b=negval"
24008 lutyuv="y=negval:u=negval:v=negval"
24009
24010 • Negate luminance:
24011
24012 lutyuv=y=negval
24013
24014 • Remove chroma components, turning the video into a graytone image:
24015
24016 lutyuv="u=128:v=128"
24017
24018 • Apply a luma burning effect:
24019
24020 lutyuv="y=2*val"
24021
24022 • Remove green and blue components:
24023
24024 lutrgb="g=0:b=0"
24025
24026 • Set a constant alpha channel value on input:
24027
24028 format=rgba,lutrgb=a="maxval-minval/2"
24029
24030 • Correct luminance gamma by a factor of 0.5:
24031
24032 lutyuv=y=gammaval(0.5)
24033
24034 • Discard least significant bits of luma:
24035
24036 lutyuv=y='bitand(val, 128+64+32)'
24037
24038 • Technicolor like effect:
24039
24040 lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
24041
24042 lut2, tlut2
24043 The "lut2" filter takes two input streams and outputs one stream.
24044
24045 The "tlut2" (time lut2) filter takes two consecutive frames from one
24046 single stream.
24047
24048 This filter accepts the following parameters:
24049
24050 c0 set first pixel component expression
24051
24052 c1 set second pixel component expression
24053
24054 c2 set third pixel component expression
24055
24056 c3 set fourth pixel component expression, corresponds to the alpha
24057 component
24058
24059 d set output bit depth, only available for "lut2" filter. By default
24060 is 0, which means bit depth is automatically picked from first
24061 input format.
24062
24063 The "lut2" filter also supports the framesync options.
24064
24065 Each of them specifies the expression to use for computing the lookup
24066 table for the corresponding pixel component values.
24067
24068 The exact component associated to each of the c* options depends on the
24069 format in inputs.
24070
24071 The expressions can contain the following constants:
24072
24073 w
24074 h The input width and height.
24075
24076 x The first input value for the pixel component.
24077
24078 y The second input value for the pixel component.
24079
24080 bdx The first input video bit depth.
24081
24082 bdy The second input video bit depth.
24083
24084 All expressions default to "x".
24085
24086 Commands
24087
24088 This filter supports the all above options as commands except option
24089 "d".
24090
24091 Examples
24092
24093 • Highlight differences between two RGB video streams:
24094
24095 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)'
24096
24097 • Highlight differences between two YUV video streams:
24098
24099 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)'
24100
24101 • Show max difference between two video streams:
24102
24103 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)))'
24104
24105 maskedclamp
24106 Clamp the first input stream with the second input and third input
24107 stream.
24108
24109 Returns the value of first stream to be between second input stream -
24110 "undershoot" and third input stream + "overshoot".
24111
24112 This filter accepts the following options:
24113
24114 undershoot
24115 Default value is 0.
24116
24117 overshoot
24118 Default value is 0.
24119
24120 planes
24121 Set which planes will be processed as bitmap, unprocessed planes
24122 will be copied from first stream. By default value 0xf, all planes
24123 will be processed.
24124
24125 Commands
24126
24127 This filter supports the all above options as commands.
24128
24129 maskedmax
24130 Merge the second and third input stream into output stream using
24131 absolute differences between second input stream and first input stream
24132 and absolute difference between third input stream and first input
24133 stream. The picked value will be from second input stream if second
24134 absolute difference is greater than first one or from third input
24135 stream otherwise.
24136
24137 This filter accepts the following options:
24138
24139 planes
24140 Set which planes will be processed as bitmap, unprocessed planes
24141 will be copied from first stream. By default value 0xf, all planes
24142 will be processed.
24143
24144 Commands
24145
24146 This filter supports the all above options as commands.
24147
24148 maskedmerge
24149 Merge the first input stream with the second input stream using per
24150 pixel weights in the third input stream.
24151
24152 A value of 0 in the third stream pixel component means that pixel
24153 component from first stream is returned unchanged, while maximum value
24154 (eg. 255 for 8-bit videos) means that pixel component from second
24155 stream is returned unchanged. Intermediate values define the amount of
24156 merging between both input stream's pixel components.
24157
24158 This filter accepts the following options:
24159
24160 planes
24161 Set which planes will be processed as bitmap, unprocessed planes
24162 will be copied from first stream. By default value 0xf, all planes
24163 will be processed.
24164
24165 Commands
24166
24167 This filter supports the all above options as commands.
24168
24169 maskedmin
24170 Merge the second and third input stream into output stream using
24171 absolute differences between second input stream and first input stream
24172 and absolute difference between third input stream and first input
24173 stream. The picked value will be from second input stream if second
24174 absolute difference is less than first one or from third input stream
24175 otherwise.
24176
24177 This filter accepts the following options:
24178
24179 planes
24180 Set which planes will be processed as bitmap, unprocessed planes
24181 will be copied from first stream. By default value 0xf, all planes
24182 will be processed.
24183
24184 Commands
24185
24186 This filter supports the all above options as commands.
24187
24188 maskedthreshold
24189 Pick pixels comparing absolute difference of two video streams with
24190 fixed threshold.
24191
24192 If absolute difference between pixel component of first and second
24193 video stream is equal or lower than user supplied threshold than pixel
24194 component from first video stream is picked, otherwise pixel component
24195 from second video stream is picked.
24196
24197 This filter accepts the following options:
24198
24199 threshold
24200 Set threshold used when picking pixels from absolute difference
24201 from two input video streams.
24202
24203 planes
24204 Set which planes will be processed as bitmap, unprocessed planes
24205 will be copied from second stream. By default value 0xf, all
24206 planes will be processed.
24207
24208 mode
24209 Set mode of filter operation. Can be "abs" or "diff". Default is
24210 "abs".
24211
24212 Commands
24213
24214 This filter supports the all above options as commands.
24215
24216 maskfun
24217 Create mask from input video.
24218
24219 For example it is useful to create motion masks after "tblend" filter.
24220
24221 This filter accepts the following options:
24222
24223 low Set low threshold. Any pixel component lower or exact than this
24224 value will be set to 0.
24225
24226 high
24227 Set high threshold. Any pixel component higher than this value will
24228 be set to max value allowed for current pixel format.
24229
24230 planes
24231 Set planes to filter, by default all available planes are filtered.
24232
24233 fill
24234 Fill all frame pixels with this value.
24235
24236 sum Set max average pixel value for frame. If sum of all pixel
24237 components is higher that this average, output frame will be
24238 completely filled with value set by fill option. Typically useful
24239 for scene changes when used in combination with "tblend" filter.
24240
24241 Commands
24242
24243 This filter supports the all above options as commands.
24244
24245 mcdeint
24246 Apply motion-compensation deinterlacing.
24247
24248 It needs one field per frame as input and must thus be used together
24249 with yadif=1/3 or equivalent.
24250
24251 This filter is only available in ffmpeg version 4.4 or earlier.
24252
24253 This filter accepts the following options:
24254
24255 mode
24256 Set the deinterlacing mode.
24257
24258 It accepts one of the following values:
24259
24260 fast
24261 medium
24262 slow
24263 use iterative motion estimation
24264
24265 extra_slow
24266 like slow, but use multiple reference frames.
24267
24268 Default value is fast.
24269
24270 parity
24271 Set the picture field parity assumed for the input video. It must
24272 be one of the following values:
24273
24274 0, tff
24275 assume top field first
24276
24277 1, bff
24278 assume bottom field first
24279
24280 Default value is bff.
24281
24282 qp Set per-block quantization parameter (QP) used by the internal
24283 encoder.
24284
24285 Higher values should result in a smoother motion vector field but
24286 less optimal individual vectors. Default value is 1.
24287
24288 median
24289 Pick median pixel from certain rectangle defined by radius.
24290
24291 This filter accepts the following options:
24292
24293 radius
24294 Set horizontal radius size. Default value is 1. Allowed range is
24295 integer from 1 to 127.
24296
24297 planes
24298 Set which planes to process. Default is 15, which is all available
24299 planes.
24300
24301 radiusV
24302 Set vertical radius size. Default value is 0. Allowed range is
24303 integer from 0 to 127. If it is 0, value will be picked from
24304 horizontal "radius" option.
24305
24306 percentile
24307 Set median percentile. Default value is 0.5. Default value of 0.5
24308 will pick always median values, while 0 will pick minimum values,
24309 and 1 maximum values.
24310
24311 Commands
24312
24313 This filter supports same commands as options. The command accepts the
24314 same syntax of the corresponding option.
24315
24316 If the specified expression is not valid, it is kept at its current
24317 value.
24318
24319 mergeplanes
24320 Merge color channel components from several video streams.
24321
24322 The filter accepts up to 4 input streams, and merge selected input
24323 planes to the output video.
24324
24325 This filter accepts the following options:
24326
24327 mapping
24328 Set input to output plane mapping. Default is 0.
24329
24330 The mappings is specified as a bitmap. It should be specified as a
24331 hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. 'Aa' describes the
24332 mapping for the first plane of the output stream. 'A' sets the
24333 number of the input stream to use (from 0 to 3), and 'a' the plane
24334 number of the corresponding input to use (from 0 to 3). The rest of
24335 the mappings is similar, 'Bb' describes the mapping for the output
24336 stream second plane, 'Cc' describes the mapping for the output
24337 stream third plane and 'Dd' describes the mapping for the output
24338 stream fourth plane.
24339
24340 format
24341 Set output pixel format. Default is "yuva444p".
24342
24343 map0s
24344 map1s
24345 map2s
24346 map3s
24347 Set input to output stream mapping for output Nth plane. Default is
24348 0.
24349
24350 map0p
24351 map1p
24352 map2p
24353 map3p
24354 Set input to output plane mapping for output Nth plane. Default is
24355 0.
24356
24357 Examples
24358
24359 • Merge three gray video streams of same width and height into single
24360 video stream:
24361
24362 [a0][a1][a2]mergeplanes=0x001020:yuv444p
24363
24364 • Merge 1st yuv444p stream and 2nd gray video stream into yuva444p
24365 video stream:
24366
24367 [a0][a1]mergeplanes=0x00010210:yuva444p
24368
24369 • Swap Y and A plane in yuva444p stream:
24370
24371 format=yuva444p,mergeplanes=0x03010200:yuva444p
24372
24373 • Swap U and V plane in yuv420p stream:
24374
24375 format=yuv420p,mergeplanes=0x000201:yuv420p
24376
24377 • Cast a rgb24 clip to yuv444p:
24378
24379 format=rgb24,mergeplanes=0x000102:yuv444p
24380
24381 mestimate
24382 Estimate and export motion vectors using block matching algorithms.
24383 Motion vectors are stored in frame side data to be used by other
24384 filters.
24385
24386 This filter accepts the following options:
24387
24388 method
24389 Specify the motion estimation method. Accepts one of the following
24390 values:
24391
24392 esa Exhaustive search algorithm.
24393
24394 tss Three step search algorithm.
24395
24396 tdls
24397 Two dimensional logarithmic search algorithm.
24398
24399 ntss
24400 New three step search algorithm.
24401
24402 fss Four step search algorithm.
24403
24404 ds Diamond search algorithm.
24405
24406 hexbs
24407 Hexagon-based search algorithm.
24408
24409 epzs
24410 Enhanced predictive zonal search algorithm.
24411
24412 umh Uneven multi-hexagon search algorithm.
24413
24414 Default value is esa.
24415
24416 mb_size
24417 Macroblock size. Default 16.
24418
24419 search_param
24420 Search parameter. Default 7.
24421
24422 midequalizer
24423 Apply Midway Image Equalization effect using two video streams.
24424
24425 Midway Image Equalization adjusts a pair of images to have the same
24426 histogram, while maintaining their dynamics as much as possible. It's
24427 useful for e.g. matching exposures from a pair of stereo cameras.
24428
24429 This filter has two inputs and one output, which must be of same pixel
24430 format, but may be of different sizes. The output of filter is first
24431 input adjusted with midway histogram of both inputs.
24432
24433 This filter accepts the following option:
24434
24435 planes
24436 Set which planes to process. Default is 15, which is all available
24437 planes.
24438
24439 minterpolate
24440 Convert the video to specified frame rate using motion interpolation.
24441
24442 This filter accepts the following options:
24443
24444 fps Specify the output frame rate. This can be rational e.g.
24445 "60000/1001". Frames are dropped if fps is lower than source fps.
24446 Default 60.
24447
24448 mi_mode
24449 Motion interpolation mode. Following values are accepted:
24450
24451 dup Duplicate previous or next frame for interpolating new ones.
24452
24453 blend
24454 Blend source frames. Interpolated frame is mean of previous and
24455 next frames.
24456
24457 mci Motion compensated interpolation. Following options are
24458 effective when this mode is selected:
24459
24460 mc_mode
24461 Motion compensation mode. Following values are accepted:
24462
24463 obmc
24464 Overlapped block motion compensation.
24465
24466 aobmc
24467 Adaptive overlapped block motion compensation. Window
24468 weighting coefficients are controlled adaptively
24469 according to the reliabilities of the neighboring
24470 motion vectors to reduce oversmoothing.
24471
24472 Default mode is obmc.
24473
24474 me_mode
24475 Motion estimation mode. Following values are accepted:
24476
24477 bidir
24478 Bidirectional motion estimation. Motion vectors are
24479 estimated for each source frame in both forward and
24480 backward directions.
24481
24482 bilat
24483 Bilateral motion estimation. Motion vectors are
24484 estimated directly for interpolated frame.
24485
24486 Default mode is bilat.
24487
24488 me The algorithm to be used for motion estimation. Following
24489 values are accepted:
24490
24491 esa Exhaustive search algorithm.
24492
24493 tss Three step search algorithm.
24494
24495 tdls
24496 Two dimensional logarithmic search algorithm.
24497
24498 ntss
24499 New three step search algorithm.
24500
24501 fss Four step search algorithm.
24502
24503 ds Diamond search algorithm.
24504
24505 hexbs
24506 Hexagon-based search algorithm.
24507
24508 epzs
24509 Enhanced predictive zonal search algorithm.
24510
24511 umh Uneven multi-hexagon search algorithm.
24512
24513 Default algorithm is epzs.
24514
24515 mb_size
24516 Macroblock size. Default 16.
24517
24518 search_param
24519 Motion estimation search parameter. Default 32.
24520
24521 vsbmc
24522 Enable variable-size block motion compensation. Motion
24523 estimation is applied with smaller block sizes at object
24524 boundaries in order to make the them less blur. Default is
24525 0 (disabled).
24526
24527 scd Scene change detection method. Scene change leads motion vectors to
24528 be in random direction. Scene change detection replace interpolated
24529 frames by duplicate ones. May not be needed for other modes.
24530 Following values are accepted:
24531
24532 none
24533 Disable scene change detection.
24534
24535 fdiff
24536 Frame difference. Corresponding pixel values are compared and
24537 if it satisfies scd_threshold scene change is detected.
24538
24539 Default method is fdiff.
24540
24541 scd_threshold
24542 Scene change detection threshold. Default is 10..
24543
24544 mix
24545 Mix several video input streams into one video stream.
24546
24547 A description of the accepted options follows.
24548
24549 inputs
24550 The number of inputs. If unspecified, it defaults to 2.
24551
24552 weights
24553 Specify weight of each input video stream as sequence. Each weight
24554 is separated by space. If number of weights is smaller than number
24555 of frames last specified weight will be used for all remaining
24556 unset weights.
24557
24558 scale
24559 Specify scale, if it is set it will be multiplied with sum of each
24560 weight multiplied with pixel values to give final destination pixel
24561 value. By default scale is auto scaled to sum of weights.
24562
24563 planes
24564 Set which planes to filter. Default is all. Allowed range is from 0
24565 to 15.
24566
24567 duration
24568 Specify how end of stream is determined.
24569
24570 longest
24571 The duration of the longest input. (default)
24572
24573 shortest
24574 The duration of the shortest input.
24575
24576 first
24577 The duration of the first input.
24578
24579 Commands
24580
24581 This filter supports the following commands:
24582
24583 weights
24584 scale
24585 planes
24586 Syntax is same as option with same name.
24587
24588 monochrome
24589 Convert video to gray using custom color filter.
24590
24591 A description of the accepted options follows.
24592
24593 cb Set the chroma blue spot. Allowed range is from -1 to 1. Default
24594 value is 0.
24595
24596 cr Set the chroma red spot. Allowed range is from -1 to 1. Default
24597 value is 0.
24598
24599 size
24600 Set the color filter size. Allowed range is from .1 to 10. Default
24601 value is 1.
24602
24603 high
24604 Set the highlights strength. Allowed range is from 0 to 1. Default
24605 value is 0.
24606
24607 Commands
24608
24609 This filter supports the all above options as commands.
24610
24611 morpho
24612 This filter allows to apply main morphological grayscale transforms,
24613 erode and dilate with arbitrary structures set in second input stream.
24614
24615 Unlike naive implementation and much slower performance in erosion and
24616 dilation filters, when speed is critical "morpho" filter should be used
24617 instead.
24618
24619 A description of accepted options follows,
24620
24621 mode
24622 Set morphological transform to apply, can be:
24623
24624 erode
24625 dilate
24626 open
24627 close
24628 gradient
24629 tophat
24630 blackhat
24631
24632 Default is "erode".
24633
24634 planes
24635 Set planes to filter, by default all planes except alpha are
24636 filtered.
24637
24638 structure
24639 Set which structure video frames will be processed from second
24640 input stream, can be first or all. Default is all.
24641
24642 The "morpho" filter also supports the framesync options.
24643
24644 Commands
24645
24646 This filter supports same commands as options.
24647
24648 mpdecimate
24649 Drop frames that do not differ greatly from the previous frame in order
24650 to reduce frame rate.
24651
24652 The main use of this filter is for very-low-bitrate encoding (e.g.
24653 streaming over dialup modem), but it could in theory be used for fixing
24654 movies that were inverse-telecined incorrectly.
24655
24656 A description of the accepted options follows.
24657
24658 max Set the maximum number of consecutive frames which can be dropped
24659 (if positive), or the minimum interval between dropped frames (if
24660 negative). If the value is 0, the frame is dropped disregarding the
24661 number of previous sequentially dropped frames.
24662
24663 Default value is 0.
24664
24665 hi
24666 lo
24667 frac
24668 Set the dropping threshold values.
24669
24670 Values for hi and lo are for 8x8 pixel blocks and represent actual
24671 pixel value differences, so a threshold of 64 corresponds to 1 unit
24672 of difference for each pixel, or the same spread out differently
24673 over the block.
24674
24675 A frame is a candidate for dropping if no 8x8 blocks differ by more
24676 than a threshold of hi, and if no more than frac blocks (1 meaning
24677 the whole image) differ by more than a threshold of lo.
24678
24679 Default value for hi is 64*12, default value for lo is 64*5, and
24680 default value for frac is 0.33.
24681
24682 msad
24683 Obtain the MSAD (Mean Sum of Absolute Differences) between two input
24684 videos.
24685
24686 This filter takes two input videos.
24687
24688 Both input videos must have the same resolution and pixel format for
24689 this filter to work correctly. Also it assumes that both inputs have
24690 the same number of frames, which are compared one by one.
24691
24692 The obtained per component, average, min and max MSAD is printed
24693 through the logging system.
24694
24695 The filter stores the calculated MSAD of each frame in frame metadata.
24696
24697 This filter also supports the framesync options.
24698
24699 In the below example the input file main.mpg being processed is
24700 compared with the reference file ref.mpg.
24701
24702 ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
24703
24704 multiply
24705 Multiply first video stream pixels values with second video stream
24706 pixels values.
24707
24708 The filter accepts the following options:
24709
24710 scale
24711 Set the scale applied to second video stream. By default is 1.
24712 Allowed range is from 0 to 9.
24713
24714 offset
24715 Set the offset applied to second video stream. By default is 0.5.
24716 Allowed range is from -1 to 1.
24717
24718 planes
24719 Specify planes from input video stream that will be processed. By
24720 default all planes are processed.
24721
24722 Commands
24723
24724 This filter supports same commands as options.
24725
24726 negate
24727 Negate (invert) the input video.
24728
24729 It accepts the following option:
24730
24731 components
24732 Set components to negate.
24733
24734 Available values for components are:
24735
24736 y
24737 u
24738 v
24739 a
24740 r
24741 g
24742 b
24743 negate_alpha
24744 With value 1, it negates the alpha component, if present. Default
24745 value is 0.
24746
24747 Commands
24748
24749 This filter supports same commands as options.
24750
24751 nlmeans
24752 Denoise frames using Non-Local Means algorithm.
24753
24754 Each pixel is adjusted by looking for other pixels with similar
24755 contexts. This context similarity is defined by comparing their
24756 surrounding patches of size pxp. Patches are searched in an area of rxr
24757 around the pixel.
24758
24759 Note that the research area defines centers for patches, which means
24760 some patches will be made of pixels outside that research area.
24761
24762 The filter accepts the following options.
24763
24764 s Set denoising strength. Default is 1.0. Must be in range [1.0,
24765 30.0].
24766
24767 p Set patch size. Default is 7. Must be odd number in range [0, 99].
24768
24769 pc Same as p but for chroma planes.
24770
24771 The default value is 0 and means automatic.
24772
24773 r Set research size. Default is 15. Must be odd number in range [0,
24774 99].
24775
24776 rc Same as r but for chroma planes.
24777
24778 The default value is 0 and means automatic.
24779
24780 nnedi
24781 Deinterlace video using neural network edge directed interpolation.
24782
24783 This filter accepts the following options:
24784
24785 weights
24786 Mandatory option, without binary file filter can not work.
24787 Currently file can be found here:
24788 https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
24789
24790 deint
24791 Set which frames to deinterlace, by default it is "all". Can be
24792 "all" or "interlaced".
24793
24794 field
24795 Set mode of operation.
24796
24797 Can be one of the following:
24798
24799 af Use frame flags, both fields.
24800
24801 a Use frame flags, single field.
24802
24803 t Use top field only.
24804
24805 b Use bottom field only.
24806
24807 tf Use both fields, top first.
24808
24809 bf Use both fields, bottom first.
24810
24811 planes
24812 Set which planes to process, by default filter process all frames.
24813
24814 nsize
24815 Set size of local neighborhood around each pixel, used by the
24816 predictor neural network.
24817
24818 Can be one of the following:
24819
24820 s8x6
24821 s16x6
24822 s32x6
24823 s48x6
24824 s8x4
24825 s16x4
24826 s32x4
24827 nns Set the number of neurons in predictor neural network. Can be one
24828 of the following:
24829
24830 n16
24831 n32
24832 n64
24833 n128
24834 n256
24835 qual
24836 Controls the number of different neural network predictions that
24837 are blended together to compute the final output value. Can be
24838 "fast", default or "slow".
24839
24840 etype
24841 Set which set of weights to use in the predictor. Can be one of
24842 the following:
24843
24844 a, abs
24845 weights trained to minimize absolute error
24846
24847 s, mse
24848 weights trained to minimize squared error
24849
24850 pscrn
24851 Controls whether or not the prescreener neural network is used to
24852 decide which pixels should be processed by the predictor neural
24853 network and which can be handled by simple cubic interpolation.
24854 The prescreener is trained to know whether cubic interpolation will
24855 be sufficient for a pixel or whether it should be predicted by the
24856 predictor nn. The computational complexity of the prescreener nn
24857 is much less than that of the predictor nn. Since most pixels can
24858 be handled by cubic interpolation, using the prescreener generally
24859 results in much faster processing. The prescreener is pretty
24860 accurate, so the difference between using it and not using it is
24861 almost always unnoticeable.
24862
24863 Can be one of the following:
24864
24865 none
24866 original
24867 new
24868 new2
24869 new3
24870
24871 Default is "new".
24872
24873 Commands
24874
24875 This filter supports same commands as options, excluding weights
24876 option.
24877
24878 noformat
24879 Force libavfilter not to use any of the specified pixel formats for the
24880 input to the next filter.
24881
24882 It accepts the following parameters:
24883
24884 pix_fmts
24885 A '|'-separated list of pixel format names, such as
24886 pix_fmts=yuv420p|monow|rgb24".
24887
24888 Examples
24889
24890 • Force libavfilter to use a format different from yuv420p for the
24891 input to the vflip filter:
24892
24893 noformat=pix_fmts=yuv420p,vflip
24894
24895 • Convert the input video to any of the formats not contained in the
24896 list:
24897
24898 noformat=yuv420p|yuv444p|yuv410p
24899
24900 noise
24901 Add noise on video input frame.
24902
24903 The filter accepts the following options:
24904
24905 all_seed
24906 c0_seed
24907 c1_seed
24908 c2_seed
24909 c3_seed
24910 Set noise seed for specific pixel component or all pixel components
24911 in case of all_seed. Default value is 123457.
24912
24913 all_strength, alls
24914 c0_strength, c0s
24915 c1_strength, c1s
24916 c2_strength, c2s
24917 c3_strength, c3s
24918 Set noise strength for specific pixel component or all pixel
24919 components in case all_strength. Default value is 0. Allowed range
24920 is [0, 100].
24921
24922 all_flags, allf
24923 c0_flags, c0f
24924 c1_flags, c1f
24925 c2_flags, c2f
24926 c3_flags, c3f
24927 Set pixel component flags or set flags for all components if
24928 all_flags. Available values for component flags are:
24929
24930 a averaged temporal noise (smoother)
24931
24932 p mix random noise with a (semi)regular pattern
24933
24934 t temporal noise (noise pattern changes between frames)
24935
24936 u uniform noise (gaussian otherwise)
24937
24938 Examples
24939
24940 Add temporal and uniform noise to input video:
24941
24942 noise=alls=20:allf=t+u
24943
24944 normalize
24945 Normalize RGB video (aka histogram stretching, contrast stretching).
24946 See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
24947
24948 For each channel of each frame, the filter computes the input range and
24949 maps it linearly to the user-specified output range. The output range
24950 defaults to the full dynamic range from pure black to pure white.
24951
24952 Temporal smoothing can be used on the input range to reduce flickering
24953 (rapid changes in brightness) caused when small dark or bright objects
24954 enter or leave the scene. This is similar to the auto-exposure
24955 (automatic gain control) on a video camera, and, like a video camera,
24956 it may cause a period of over- or under-exposure of the video.
24957
24958 The R,G,B channels can be normalized independently, which may cause
24959 some color shifting, or linked together as a single channel, which
24960 prevents color shifting. Linked normalization preserves hue.
24961 Independent normalization does not, so it can be used to remove some
24962 color casts. Independent and linked normalization can be combined in
24963 any ratio.
24964
24965 The normalize filter accepts the following options:
24966
24967 blackpt
24968 whitept
24969 Colors which define the output range. The minimum input value is
24970 mapped to the blackpt. The maximum input value is mapped to the
24971 whitept. The defaults are black and white respectively. Specifying
24972 white for blackpt and black for whitept will give color-inverted,
24973 normalized video. Shades of grey can be used to reduce the dynamic
24974 range (contrast). Specifying saturated colors here can create some
24975 interesting effects.
24976
24977 smoothing
24978 The number of previous frames to use for temporal smoothing. The
24979 input range of each channel is smoothed using a rolling average
24980 over the current frame and the smoothing previous frames. The
24981 default is 0 (no temporal smoothing).
24982
24983 independence
24984 Controls the ratio of independent (color shifting) channel
24985 normalization to linked (color preserving) normalization. 0.0 is
24986 fully linked, 1.0 is fully independent. Defaults to 1.0 (fully
24987 independent).
24988
24989 strength
24990 Overall strength of the filter. 1.0 is full strength. 0.0 is a
24991 rather expensive no-op. Defaults to 1.0 (full strength).
24992
24993 Commands
24994
24995 This filter supports same commands as options, excluding smoothing
24996 option. The command accepts the same syntax of the corresponding
24997 option.
24998
24999 If the specified expression is not valid, it is kept at its current
25000 value.
25001
25002 Examples
25003
25004 Stretch video contrast to use the full dynamic range, with no temporal
25005 smoothing; may flicker depending on the source content:
25006
25007 normalize=blackpt=black:whitept=white:smoothing=0
25008
25009 As above, but with 50 frames of temporal smoothing; flicker should be
25010 reduced, depending on the source content:
25011
25012 normalize=blackpt=black:whitept=white:smoothing=50
25013
25014 As above, but with hue-preserving linked channel normalization:
25015
25016 normalize=blackpt=black:whitept=white:smoothing=50:independence=0
25017
25018 As above, but with half strength:
25019
25020 normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
25021
25022 Map the darkest input color to red, the brightest input color to cyan:
25023
25024 normalize=blackpt=red:whitept=cyan
25025
25026 null
25027 Pass the video source unchanged to the output.
25028
25029 ocr
25030 Optical Character Recognition
25031
25032 This filter uses Tesseract for optical character recognition. To enable
25033 compilation of this filter, you need to configure FFmpeg with
25034 "--enable-libtesseract".
25035
25036 It accepts the following options:
25037
25038 datapath
25039 Set datapath to tesseract data. Default is to use whatever was set
25040 at installation.
25041
25042 language
25043 Set language, default is "eng".
25044
25045 whitelist
25046 Set character whitelist.
25047
25048 blacklist
25049 Set character blacklist.
25050
25051 The filter exports recognized text as the frame metadata
25052 "lavfi.ocr.text". The filter exports confidence of recognized words as
25053 the frame metadata "lavfi.ocr.confidence".
25054
25055 ocv
25056 Apply a video transform using libopencv.
25057
25058 To enable this filter, install the libopencv library and headers and
25059 configure FFmpeg with "--enable-libopencv".
25060
25061 It accepts the following parameters:
25062
25063 filter_name
25064 The name of the libopencv filter to apply.
25065
25066 filter_params
25067 The parameters to pass to the libopencv filter. If not specified,
25068 the default values are assumed.
25069
25070 Refer to the official libopencv documentation for more precise
25071 information:
25072 <http://docs.opencv.org/master/modules/imgproc/doc/filtering.html>
25073
25074 Several libopencv filters are supported; see the following subsections.
25075
25076 dilate
25077
25078 Dilate an image by using a specific structuring element. It
25079 corresponds to the libopencv function "cvDilate".
25080
25081 It accepts the parameters: struct_el|nb_iterations.
25082
25083 struct_el represents a structuring element, and has the syntax:
25084 colsxrows+anchor_xxanchor_y/shape
25085
25086 cols and rows represent the number of columns and rows of the
25087 structuring element, anchor_x and anchor_y the anchor point, and shape
25088 the shape for the structuring element. shape must be "rect", "cross",
25089 "ellipse", or "custom".
25090
25091 If the value for shape is "custom", it must be followed by a string of
25092 the form "=filename". The file with name filename is assumed to
25093 represent a binary image, with each printable character corresponding
25094 to a bright pixel. When a custom shape is used, cols and rows are
25095 ignored, the number or columns and rows of the read file are assumed
25096 instead.
25097
25098 The default value for struct_el is "3x3+0x0/rect".
25099
25100 nb_iterations specifies the number of times the transform is applied to
25101 the image, and defaults to 1.
25102
25103 Some examples:
25104
25105 # Use the default values
25106 ocv=dilate
25107
25108 # Dilate using a structuring element with a 5x5 cross, iterating two times
25109 ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
25110
25111 # Read the shape from the file diamond.shape, iterating two times.
25112 # The file diamond.shape may contain a pattern of characters like this
25113 # *
25114 # ***
25115 # *****
25116 # ***
25117 # *
25118 # The specified columns and rows are ignored
25119 # but the anchor point coordinates are not
25120 ocv=dilate:0x0+2x2/custom=diamond.shape|2
25121
25122 erode
25123
25124 Erode an image by using a specific structuring element. It corresponds
25125 to the libopencv function "cvErode".
25126
25127 It accepts the parameters: struct_el:nb_iterations, with the same
25128 syntax and semantics as the dilate filter.
25129
25130 smooth
25131
25132 Smooth the input video.
25133
25134 The filter takes the following parameters:
25135 type|param1|param2|param3|param4.
25136
25137 type is the type of smooth filter to apply, and must be one of the
25138 following values: "blur", "blur_no_scale", "median", "gaussian", or
25139 "bilateral". The default value is "gaussian".
25140
25141 The meaning of param1, param2, param3, and param4 depends on the smooth
25142 type. param1 and param2 accept integer positive values or 0. param3 and
25143 param4 accept floating point values.
25144
25145 The default value for param1 is 3. The default value for the other
25146 parameters is 0.
25147
25148 These parameters correspond to the parameters assigned to the libopencv
25149 function "cvSmooth".
25150
25151 oscilloscope
25152 2D Video Oscilloscope.
25153
25154 Useful to measure spatial impulse, step responses, chroma delays, etc.
25155
25156 It accepts the following parameters:
25157
25158 x Set scope center x position.
25159
25160 y Set scope center y position.
25161
25162 s Set scope size, relative to frame diagonal.
25163
25164 t Set scope tilt/rotation.
25165
25166 o Set trace opacity.
25167
25168 tx Set trace center x position.
25169
25170 ty Set trace center y position.
25171
25172 tw Set trace width, relative to width of frame.
25173
25174 th Set trace height, relative to height of frame.
25175
25176 c Set which components to trace. By default it traces first three
25177 components.
25178
25179 g Draw trace grid. By default is enabled.
25180
25181 st Draw some statistics. By default is enabled.
25182
25183 sc Draw scope. By default is enabled.
25184
25185 Commands
25186
25187 This filter supports same commands as options. The command accepts the
25188 same syntax of the corresponding option.
25189
25190 If the specified expression is not valid, it is kept at its current
25191 value.
25192
25193 Examples
25194
25195 • Inspect full first row of video frame.
25196
25197 oscilloscope=x=0.5:y=0:s=1
25198
25199 • Inspect full last row of video frame.
25200
25201 oscilloscope=x=0.5:y=1:s=1
25202
25203 • Inspect full 5th line of video frame of height 1080.
25204
25205 oscilloscope=x=0.5:y=5/1080:s=1
25206
25207 • Inspect full last column of video frame.
25208
25209 oscilloscope=x=1:y=0.5:s=1:t=1
25210
25211 overlay
25212 Overlay one video on top of another.
25213
25214 It takes two inputs and has one output. The first input is the "main"
25215 video on which the second input is overlaid.
25216
25217 It accepts the following parameters:
25218
25219 A description of the accepted options follows.
25220
25221 x
25222 y Set the expression for the x and y coordinates of the overlaid
25223 video on the main video. Default value is "0" for both expressions.
25224 In case the expression is invalid, it is set to a huge value
25225 (meaning that the overlay will not be displayed within the output
25226 visible area).
25227
25228 eof_action
25229 See framesync.
25230
25231 eval
25232 Set when the expressions for x, and y are evaluated.
25233
25234 It accepts the following values:
25235
25236 init
25237 only evaluate expressions once during the filter initialization
25238 or when a command is processed
25239
25240 frame
25241 evaluate expressions for each incoming frame
25242
25243 Default value is frame.
25244
25245 shortest
25246 See framesync.
25247
25248 format
25249 Set the format for the output video.
25250
25251 It accepts the following values:
25252
25253 yuv420
25254 force YUV420 output
25255
25256 yuv420p10
25257 force YUV420p10 output
25258
25259 yuv422
25260 force YUV422 output
25261
25262 yuv422p10
25263 force YUV422p10 output
25264
25265 yuv444
25266 force YUV444 output
25267
25268 rgb force packed RGB output
25269
25270 gbrp
25271 force planar RGB output
25272
25273 auto
25274 automatically pick format
25275
25276 Default value is yuv420.
25277
25278 repeatlast
25279 See framesync.
25280
25281 alpha
25282 Set format of alpha of the overlaid video, it can be straight or
25283 premultiplied. Default is straight.
25284
25285 The x, and y expressions can contain the following parameters.
25286
25287 main_w, W
25288 main_h, H
25289 The main input width and height.
25290
25291 overlay_w, w
25292 overlay_h, h
25293 The overlay input width and height.
25294
25295 x
25296 y The computed values for x and y. They are evaluated for each new
25297 frame.
25298
25299 hsub
25300 vsub
25301 horizontal and vertical chroma subsample values of the output
25302 format. For example for the pixel format "yuv422p" hsub is 2 and
25303 vsub is 1.
25304
25305 n the number of input frame, starting from 0
25306
25307 pos the position in the file of the input frame, NAN if unknown
25308
25309 t The timestamp, expressed in seconds. It's NAN if the input
25310 timestamp is unknown.
25311
25312 This filter also supports the framesync options.
25313
25314 Note that the n, pos, t variables are available only when evaluation is
25315 done per frame, and will evaluate to NAN when eval is set to init.
25316
25317 Be aware that frames are taken from each input video in timestamp
25318 order, hence, if their initial timestamps differ, it is a good idea to
25319 pass the two inputs through a setpts=PTS-STARTPTS filter to have them
25320 begin in the same zero timestamp, as the example for the movie filter
25321 does.
25322
25323 You can chain together more overlays but you should test the efficiency
25324 of such approach.
25325
25326 Commands
25327
25328 This filter supports the following commands:
25329
25330 x
25331 y Modify the x and y of the overlay input. The command accepts the
25332 same syntax of the corresponding option.
25333
25334 If the specified expression is not valid, it is kept at its current
25335 value.
25336
25337 Examples
25338
25339 • Draw the overlay at 10 pixels from the bottom right corner of the
25340 main video:
25341
25342 overlay=main_w-overlay_w-10:main_h-overlay_h-10
25343
25344 Using named options the example above becomes:
25345
25346 overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
25347
25348 • Insert a transparent PNG logo in the bottom left corner of the
25349 input, using the ffmpeg tool with the "-filter_complex" option:
25350
25351 ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
25352
25353 • Insert 2 different transparent PNG logos (second logo on bottom
25354 right corner) using the ffmpeg tool:
25355
25356 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
25357
25358 • Add a transparent color layer on top of the main video; "WxH" must
25359 specify the size of the main input to the overlay filter:
25360
25361 color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
25362
25363 • Play an original video and a filtered version (here with the
25364 deshake filter) side by side using the ffplay tool:
25365
25366 ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
25367
25368 The above command is the same as:
25369
25370 ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
25371
25372 • Make a sliding overlay appearing from the left to the right top
25373 part of the screen starting since time 2:
25374
25375 overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
25376
25377 • Compose output by putting two input videos side to side:
25378
25379 ffmpeg -i left.avi -i right.avi -filter_complex "
25380 nullsrc=size=200x100 [background];
25381 [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
25382 [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
25383 [background][left] overlay=shortest=1 [background+left];
25384 [background+left][right] overlay=shortest=1:x=100 [left+right]
25385 "
25386
25387 • Mask 10-20 seconds of a video by applying the delogo filter to a
25388 section
25389
25390 ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
25391 -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]'
25392 masked.avi
25393
25394 • Chain several overlays in cascade:
25395
25396 nullsrc=s=200x200 [bg];
25397 testsrc=s=100x100, split=4 [in0][in1][in2][in3];
25398 [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
25399 [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
25400 [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
25401 [in3] null, [mid2] overlay=100:100 [out0]
25402
25403 overlay_cuda
25404 Overlay one video on top of another.
25405
25406 This is the CUDA variant of the overlay filter. It only accepts CUDA
25407 frames. The underlying input pixel formats have to match.
25408
25409 It takes two inputs and has one output. The first input is the "main"
25410 video on which the second input is overlaid.
25411
25412 It accepts the following parameters:
25413
25414 x
25415 y Set expressions for the x and y coordinates of the overlaid video
25416 on the main video.
25417
25418 They can contain the following parameters:
25419
25420 main_w, W
25421 main_h, H
25422 The main input width and height.
25423
25424 overlay_w, w
25425 overlay_h, h
25426 The overlay input width and height.
25427
25428 x
25429 y The computed values for x and y. They are evaluated for each
25430 new frame.
25431
25432 n The ordinal index of the main input frame, starting from 0.
25433
25434 pos The byte offset position in the file of the main input frame,
25435 NAN if unknown.
25436
25437 t The timestamp of the main input frame, expressed in seconds,
25438 NAN if unknown.
25439
25440 Default value is "0" for both expressions.
25441
25442 eval
25443 Set when the expressions for x and y are evaluated.
25444
25445 It accepts the following values:
25446
25447 init
25448 Evaluate expressions once during filter initialization or when
25449 a command is processed.
25450
25451 frame
25452 Evaluate expressions for each incoming frame
25453
25454 Default value is frame.
25455
25456 eof_action
25457 See framesync.
25458
25459 shortest
25460 See framesync.
25461
25462 repeatlast
25463 See framesync.
25464
25465 This filter also supports the framesync options.
25466
25467 owdenoise
25468 Apply Overcomplete Wavelet denoiser.
25469
25470 The filter accepts the following options:
25471
25472 depth
25473 Set depth.
25474
25475 Larger depth values will denoise lower frequency components more,
25476 but slow down filtering.
25477
25478 Must be an int in the range 8-16, default is 8.
25479
25480 luma_strength, ls
25481 Set luma strength.
25482
25483 Must be a double value in the range 0-1000, default is 1.0.
25484
25485 chroma_strength, cs
25486 Set chroma strength.
25487
25488 Must be a double value in the range 0-1000, default is 1.0.
25489
25490 pad
25491 Add paddings to the input image, and place the original input at the
25492 provided x, y coordinates.
25493
25494 It accepts the following parameters:
25495
25496 width, w
25497 height, h
25498 Specify an expression for the size of the output image with the
25499 paddings added. If the value for width or height is 0, the
25500 corresponding input size is used for the output.
25501
25502 The width expression can reference the value set by the height
25503 expression, and vice versa.
25504
25505 The default value of width and height is 0.
25506
25507 x
25508 y Specify the offsets to place the input image at within the padded
25509 area, with respect to the top/left border of the output image.
25510
25511 The x expression can reference the value set by the y expression,
25512 and vice versa.
25513
25514 The default value of x and y is 0.
25515
25516 If x or y evaluate to a negative number, they'll be changed so the
25517 input image is centered on the padded area.
25518
25519 color
25520 Specify the color of the padded area. For the syntax of this
25521 option, check the "Color" section in the ffmpeg-utils manual.
25522
25523 The default value of color is "black".
25524
25525 eval
25526 Specify when to evaluate width, height, x and y expression.
25527
25528 It accepts the following values:
25529
25530 init
25531 Only evaluate expressions once during the filter initialization
25532 or when a command is processed.
25533
25534 frame
25535 Evaluate expressions for each incoming frame.
25536
25537 Default value is init.
25538
25539 aspect
25540 Pad to aspect instead to a resolution.
25541
25542 The value for the width, height, x, and y options are expressions
25543 containing the following constants:
25544
25545 in_w
25546 in_h
25547 The input video width and height.
25548
25549 iw
25550 ih These are the same as in_w and in_h.
25551
25552 out_w
25553 out_h
25554 The output width and height (the size of the padded area), as
25555 specified by the width and height expressions.
25556
25557 ow
25558 oh These are the same as out_w and out_h.
25559
25560 x
25561 y The x and y offsets as specified by the x and y expressions, or NAN
25562 if not yet specified.
25563
25564 a same as iw / ih
25565
25566 sar input sample aspect ratio
25567
25568 dar input display aspect ratio, it is the same as (iw / ih) * sar
25569
25570 hsub
25571 vsub
25572 The horizontal and vertical chroma subsample values. For example
25573 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
25574
25575 Examples
25576
25577 • Add paddings with the color "violet" to the input video. The output
25578 video size is 640x480, and the top-left corner of the input video
25579 is placed at column 0, row 40
25580
25581 pad=640:480:0:40:violet
25582
25583 The example above is equivalent to the following command:
25584
25585 pad=width=640:height=480:x=0:y=40:color=violet
25586
25587 • Pad the input to get an output with dimensions increased by 3/2,
25588 and put the input video at the center of the padded area:
25589
25590 pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
25591
25592 • Pad the input to get a squared output with size equal to the
25593 maximum value between the input width and height, and put the input
25594 video at the center of the padded area:
25595
25596 pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
25597
25598 • Pad the input to get a final w/h ratio of 16:9:
25599
25600 pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
25601
25602 • In case of anamorphic video, in order to set the output display
25603 aspect correctly, it is necessary to use sar in the expression,
25604 according to the relation:
25605
25606 (ih * X / ih) * sar = output_dar
25607 X = output_dar / sar
25608
25609 Thus the previous example needs to be modified to:
25610
25611 pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
25612
25613 • Double the output size and put the input video in the bottom-right
25614 corner of the output padded area:
25615
25616 pad="2*iw:2*ih:ow-iw:oh-ih"
25617
25618 palettegen
25619 Generate one palette for a whole video stream.
25620
25621 It accepts the following options:
25622
25623 max_colors
25624 Set the maximum number of colors to quantize in the palette. Note:
25625 the palette will still contain 256 colors; the unused palette
25626 entries will be black.
25627
25628 reserve_transparent
25629 Create a palette of 255 colors maximum and reserve the last one for
25630 transparency. Reserving the transparency color is useful for GIF
25631 optimization. If not set, the maximum of colors in the palette
25632 will be 256. You probably want to disable this option for a
25633 standalone image. Set by default.
25634
25635 transparency_color
25636 Set the color that will be used as background for transparency.
25637
25638 stats_mode
25639 Set statistics mode.
25640
25641 It accepts the following values:
25642
25643 full
25644 Compute full frame histograms.
25645
25646 diff
25647 Compute histograms only for the part that differs from previous
25648 frame. This might be relevant to give more importance to the
25649 moving part of your input if the background is static.
25650
25651 single
25652 Compute new histogram for each frame.
25653
25654 Default value is full.
25655
25656 The filter also exports the frame metadata "lavfi.color_quant_ratio"
25657 ("nb_color_in / nb_color_out") which you can use to evaluate the degree
25658 of color quantization of the palette. This information is also visible
25659 at info logging level.
25660
25661 Examples
25662
25663 • Generate a representative palette of a given video using ffmpeg:
25664
25665 ffmpeg -i input.mkv -vf palettegen palette.png
25666
25667 paletteuse
25668 Use a palette to downsample an input video stream.
25669
25670 The filter takes two inputs: one video stream and a palette. The
25671 palette must be a 256 pixels image.
25672
25673 It accepts the following options:
25674
25675 dither
25676 Select dithering mode. Available algorithms are:
25677
25678 bayer
25679 Ordered 8x8 bayer dithering (deterministic)
25680
25681 heckbert
25682 Dithering as defined by Paul Heckbert in 1982 (simple error
25683 diffusion). Note: this dithering is sometimes considered
25684 "wrong" and is included as a reference.
25685
25686 floyd_steinberg
25687 Floyd and Steingberg dithering (error diffusion)
25688
25689 sierra2
25690 Frankie Sierra dithering v2 (error diffusion)
25691
25692 sierra2_4a
25693 Frankie Sierra dithering v2 "Lite" (error diffusion)
25694
25695 sierra3
25696 Frankie Sierra dithering v3 (error diffusion)
25697
25698 burkes
25699 Burkes dithering (error diffusion)
25700
25701 atkinson
25702 Atkinson dithering by Bill Atkinson at Apple Computer (error
25703 diffusion)
25704
25705 Default is sierra2_4a.
25706
25707 bayer_scale
25708 When bayer dithering is selected, this option defines the scale of
25709 the pattern (how much the crosshatch pattern is visible). A low
25710 value means more visible pattern for less banding, and higher value
25711 means less visible pattern at the cost of more banding.
25712
25713 The option must be an integer value in the range [0,5]. Default is
25714 2.
25715
25716 diff_mode
25717 If set, define the zone to process
25718
25719 rectangle
25720 Only the changing rectangle will be reprocessed. This is
25721 similar to GIF cropping/offsetting compression mechanism. This
25722 option can be useful for speed if only a part of the image is
25723 changing, and has use cases such as limiting the scope of the
25724 error diffusal dither to the rectangle that bounds the moving
25725 scene (it leads to more deterministic output if the scene
25726 doesn't change much, and as a result less moving noise and
25727 better GIF compression).
25728
25729 Default is none.
25730
25731 new Take new palette for each output frame.
25732
25733 alpha_threshold
25734 Sets the alpha threshold for transparency. Alpha values above this
25735 threshold will be treated as completely opaque, and values below
25736 this threshold will be treated as completely transparent.
25737
25738 The option must be an integer value in the range [0,255]. Default
25739 is 128.
25740
25741 Examples
25742
25743 • Use a palette (generated for example with palettegen) to encode a
25744 GIF using ffmpeg:
25745
25746 ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
25747
25748 perspective
25749 Correct perspective of video not recorded perpendicular to the screen.
25750
25751 A description of the accepted parameters follows.
25752
25753 x0
25754 y0
25755 x1
25756 y1
25757 x2
25758 y2
25759 x3
25760 y3 Set coordinates expression for top left, top right, bottom left and
25761 bottom right corners. Default values are "0:0:W:0:0:H:W:H" with
25762 which perspective will remain unchanged. If the "sense" option is
25763 set to "source", then the specified points will be sent to the
25764 corners of the destination. If the "sense" option is set to
25765 "destination", then the corners of the source will be sent to the
25766 specified coordinates.
25767
25768 The expressions can use the following variables:
25769
25770 W
25771 H the width and height of video frame.
25772
25773 in Input frame count.
25774
25775 on Output frame count.
25776
25777 interpolation
25778 Set interpolation for perspective correction.
25779
25780 It accepts the following values:
25781
25782 linear
25783 cubic
25784
25785 Default value is linear.
25786
25787 sense
25788 Set interpretation of coordinate options.
25789
25790 It accepts the following values:
25791
25792 0, source
25793 Send point in the source specified by the given coordinates to
25794 the corners of the destination.
25795
25796 1, destination
25797 Send the corners of the source to the point in the destination
25798 specified by the given coordinates.
25799
25800 Default value is source.
25801
25802 eval
25803 Set when the expressions for coordinates x0,y0,...x3,y3 are
25804 evaluated.
25805
25806 It accepts the following values:
25807
25808 init
25809 only evaluate expressions once during the filter initialization
25810 or when a command is processed
25811
25812 frame
25813 evaluate expressions for each incoming frame
25814
25815 Default value is init.
25816
25817 phase
25818 Delay interlaced video by one field time so that the field order
25819 changes.
25820
25821 The intended use is to fix PAL movies that have been captured with the
25822 opposite field order to the film-to-video transfer.
25823
25824 A description of the accepted parameters follows.
25825
25826 mode
25827 Set phase mode.
25828
25829 It accepts the following values:
25830
25831 t Capture field order top-first, transfer bottom-first. Filter
25832 will delay the bottom field.
25833
25834 b Capture field order bottom-first, transfer top-first. Filter
25835 will delay the top field.
25836
25837 p Capture and transfer with the same field order. This mode only
25838 exists for the documentation of the other options to refer to,
25839 but if you actually select it, the filter will faithfully do
25840 nothing.
25841
25842 a Capture field order determined automatically by field flags,
25843 transfer opposite. Filter selects among t and b modes on a
25844 frame by frame basis using field flags. If no field information
25845 is available, then this works just like u.
25846
25847 u Capture unknown or varying, transfer opposite. Filter selects
25848 among t and b on a frame by frame basis by analyzing the images
25849 and selecting the alternative that produces best match between
25850 the fields.
25851
25852 T Capture top-first, transfer unknown or varying. Filter selects
25853 among t and p using image analysis.
25854
25855 B Capture bottom-first, transfer unknown or varying. Filter
25856 selects among b and p using image analysis.
25857
25858 A Capture determined by field flags, transfer unknown or varying.
25859 Filter selects among t, b and p using field flags and image
25860 analysis. If no field information is available, then this works
25861 just like U. This is the default mode.
25862
25863 U Both capture and transfer unknown or varying. Filter selects
25864 among t, b and p using image analysis only.
25865
25866 Commands
25867
25868 This filter supports the all above options as commands.
25869
25870 photosensitivity
25871 Reduce various flashes in video, so to help users with epilepsy.
25872
25873 It accepts the following options:
25874
25875 frames, f
25876 Set how many frames to use when filtering. Default is 30.
25877
25878 threshold, t
25879 Set detection threshold factor. Default is 1. Lower is stricter.
25880
25881 skip
25882 Set how many pixels to skip when sampling frames. Default is 1.
25883 Allowed range is from 1 to 1024.
25884
25885 bypass
25886 Leave frames unchanged. Default is disabled.
25887
25888 pixdesctest
25889 Pixel format descriptor test filter, mainly useful for internal
25890 testing. The output video should be equal to the input video.
25891
25892 For example:
25893
25894 format=monow, pixdesctest
25895
25896 can be used to test the monowhite pixel format descriptor definition.
25897
25898 pixelize
25899 Apply pixelization to video stream.
25900
25901 The filter accepts the following options:
25902
25903 width, w
25904 height, h
25905 Set block dimensions that will be used for pixelization. Default
25906 value is 16.
25907
25908 mode, m
25909 Set the mode of pixelization used.
25910
25911 Possible values are:
25912
25913 avg
25914 min
25915 max
25916
25917 Default value is "avg".
25918
25919 planes, p
25920 Set what planes to filter. Default is to filter all planes.
25921
25922 Commands
25923
25924 This filter supports all options as commands.
25925
25926 pixscope
25927 Display sample values of color channels. Mainly useful for checking
25928 color and levels. Minimum supported resolution is 640x480.
25929
25930 The filters accept the following options:
25931
25932 x Set scope X position, relative offset on X axis.
25933
25934 y Set scope Y position, relative offset on Y axis.
25935
25936 w Set scope width.
25937
25938 h Set scope height.
25939
25940 o Set window opacity. This window also holds statistics about pixel
25941 area.
25942
25943 wx Set window X position, relative offset on X axis.
25944
25945 wy Set window Y position, relative offset on Y axis.
25946
25947 Commands
25948
25949 This filter supports same commands as options.
25950
25951 pp
25952 Enable the specified chain of postprocessing subfilters using
25953 libpostproc. This library should be automatically selected with a GPL
25954 build ("--enable-gpl"). Subfilters must be separated by '/' and can be
25955 disabled by prepending a '-'. Each subfilter and some options have a
25956 short and a long name that can be used interchangeably, i.e. dr/dering
25957 are the same.
25958
25959 The filters accept the following options:
25960
25961 subfilters
25962 Set postprocessing subfilters string.
25963
25964 All subfilters share common options to determine their scope:
25965
25966 a/autoq
25967 Honor the quality commands for this subfilter.
25968
25969 c/chrom
25970 Do chrominance filtering, too (default).
25971
25972 y/nochrom
25973 Do luminance filtering only (no chrominance).
25974
25975 n/noluma
25976 Do chrominance filtering only (no luminance).
25977
25978 These options can be appended after the subfilter name, separated by a
25979 '|'.
25980
25981 Available subfilters are:
25982
25983 hb/hdeblock[|difference[|flatness]]
25984 Horizontal deblocking filter
25985
25986 difference
25987 Difference factor where higher values mean more deblocking
25988 (default: 32).
25989
25990 flatness
25991 Flatness threshold where lower values mean more deblocking
25992 (default: 39).
25993
25994 vb/vdeblock[|difference[|flatness]]
25995 Vertical deblocking filter
25996
25997 difference
25998 Difference factor where higher values mean more deblocking
25999 (default: 32).
26000
26001 flatness
26002 Flatness threshold where lower values mean more deblocking
26003 (default: 39).
26004
26005 ha/hadeblock[|difference[|flatness]]
26006 Accurate horizontal deblocking filter
26007
26008 difference
26009 Difference factor where higher values mean more deblocking
26010 (default: 32).
26011
26012 flatness
26013 Flatness threshold where lower values mean more deblocking
26014 (default: 39).
26015
26016 va/vadeblock[|difference[|flatness]]
26017 Accurate vertical deblocking filter
26018
26019 difference
26020 Difference factor where higher values mean more deblocking
26021 (default: 32).
26022
26023 flatness
26024 Flatness threshold where lower values mean more deblocking
26025 (default: 39).
26026
26027 The horizontal and vertical deblocking filters share the difference and
26028 flatness values so you cannot set different horizontal and vertical
26029 thresholds.
26030
26031 h1/x1hdeblock
26032 Experimental horizontal deblocking filter
26033
26034 v1/x1vdeblock
26035 Experimental vertical deblocking filter
26036
26037 dr/dering
26038 Deringing filter
26039
26040 tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise
26041 reducer
26042 threshold1
26043 larger -> stronger filtering
26044
26045 threshold2
26046 larger -> stronger filtering
26047
26048 threshold3
26049 larger -> stronger filtering
26050
26051 al/autolevels[:f/fullyrange], automatic brightness / contrast
26052 correction
26053 f/fullyrange
26054 Stretch luminance to "0-255".
26055
26056 lb/linblenddeint
26057 Linear blend deinterlacing filter that deinterlaces the given block
26058 by filtering all lines with a "(1 2 1)" filter.
26059
26060 li/linipoldeint
26061 Linear interpolating deinterlacing filter that deinterlaces the
26062 given block by linearly interpolating every second line.
26063
26064 ci/cubicipoldeint
26065 Cubic interpolating deinterlacing filter deinterlaces the given
26066 block by cubically interpolating every second line.
26067
26068 md/mediandeint
26069 Median deinterlacing filter that deinterlaces the given block by
26070 applying a median filter to every second line.
26071
26072 fd/ffmpegdeint
26073 FFmpeg deinterlacing filter that deinterlaces the given block by
26074 filtering every second line with a "(-1 4 2 4 -1)" filter.
26075
26076 l5/lowpass5
26077 Vertically applied FIR lowpass deinterlacing filter that
26078 deinterlaces the given block by filtering all lines with a "(-1 2 6
26079 2 -1)" filter.
26080
26081 fq/forceQuant[|quantizer]
26082 Overrides the quantizer table from the input with the constant
26083 quantizer you specify.
26084
26085 quantizer
26086 Quantizer to use
26087
26088 de/default
26089 Default pp filter combination ("hb|a,vb|a,dr|a")
26090
26091 fa/fast
26092 Fast pp filter combination ("h1|a,v1|a,dr|a")
26093
26094 ac High quality pp filter combination ("ha|a|128|7,va|a,dr|a")
26095
26096 Examples
26097
26098 • Apply horizontal and vertical deblocking, deringing and automatic
26099 brightness/contrast:
26100
26101 pp=hb/vb/dr/al
26102
26103 • Apply default filters without brightness/contrast correction:
26104
26105 pp=de/-al
26106
26107 • Apply default filters and temporal denoiser:
26108
26109 pp=default/tmpnoise|1|2|3
26110
26111 • Apply deblocking on luminance only, and switch vertical deblocking
26112 on or off automatically depending on available CPU time:
26113
26114 pp=hb|y/vb|a
26115
26116 pp7
26117 Apply Postprocessing filter 7. It is variant of the spp filter, similar
26118 to spp = 6 with 7 point DCT, where only the center sample is used after
26119 IDCT.
26120
26121 The filter accepts the following options:
26122
26123 qp Force a constant quantization parameter. It accepts an integer in
26124 range 0 to 63. If not set, the filter will use the QP from the
26125 video stream (if available).
26126
26127 mode
26128 Set thresholding mode. Available modes are:
26129
26130 hard
26131 Set hard thresholding.
26132
26133 soft
26134 Set soft thresholding (better de-ringing effect, but likely
26135 blurrier).
26136
26137 medium
26138 Set medium thresholding (good results, default).
26139
26140 premultiply
26141 Apply alpha premultiply effect to input video stream using first plane
26142 of second stream as alpha.
26143
26144 Both streams must have same dimensions and same pixel format.
26145
26146 The filter accepts the following option:
26147
26148 planes
26149 Set which planes will be processed, unprocessed planes will be
26150 copied. By default value 0xf, all planes will be processed.
26151
26152 inplace
26153 Do not require 2nd input for processing, instead use alpha plane
26154 from input stream.
26155
26156 prewitt
26157 Apply prewitt operator to input video stream.
26158
26159 The filter accepts the following option:
26160
26161 planes
26162 Set which planes will be processed, unprocessed planes will be
26163 copied. By default value 0xf, all planes will be processed.
26164
26165 scale
26166 Set value which will be multiplied with filtered result.
26167
26168 delta
26169 Set value which will be added to filtered result.
26170
26171 Commands
26172
26173 This filter supports the all above options as commands.
26174
26175 pseudocolor
26176 Alter frame colors in video with pseudocolors.
26177
26178 This filter accepts the following options:
26179
26180 c0 set pixel first component expression
26181
26182 c1 set pixel second component expression
26183
26184 c2 set pixel third component expression
26185
26186 c3 set pixel fourth component expression, corresponds to the alpha
26187 component
26188
26189 index, i
26190 set component to use as base for altering colors
26191
26192 preset, p
26193 Pick one of built-in LUTs. By default is set to none.
26194
26195 Available LUTs:
26196
26197 magma
26198 inferno
26199 plasma
26200 viridis
26201 turbo
26202 cividis
26203 range1
26204 range2
26205 shadows
26206 highlights
26207 solar
26208 nominal
26209 preferred
26210 total
26211 spectral
26212 opacity
26213 Set opacity of output colors. Allowed range is from 0 to 1.
26214 Default value is set to 1.
26215
26216 Each of the expression options specifies the expression to use for
26217 computing the lookup table for the corresponding pixel component
26218 values.
26219
26220 The expressions can contain the following constants and functions:
26221
26222 w
26223 h The input width and height.
26224
26225 val The input value for the pixel component.
26226
26227 ymin, umin, vmin, amin
26228 The minimum allowed component value.
26229
26230 ymax, umax, vmax, amax
26231 The maximum allowed component value.
26232
26233 All expressions default to "val".
26234
26235 Commands
26236
26237 This filter supports the all above options as commands.
26238
26239 Examples
26240
26241 • Change too high luma values to gradient:
26242
26243 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'"
26244
26245 psnr
26246 Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
26247 Ratio) between two input videos.
26248
26249 This filter takes in input two input videos, the first input is
26250 considered the "main" source and is passed unchanged to the output. The
26251 second input is used as a "reference" video for computing the PSNR.
26252
26253 Both video inputs must have the same resolution and pixel format for
26254 this filter to work correctly. Also it assumes that both inputs have
26255 the same number of frames, which are compared one by one.
26256
26257 The obtained average PSNR is printed through the logging system.
26258
26259 The filter stores the accumulated MSE (mean squared error) of each
26260 frame, and at the end of the processing it is averaged across all
26261 frames equally, and the following formula is applied to obtain the
26262 PSNR:
26263
26264 PSNR = 10*log10(MAX^2/MSE)
26265
26266 Where MAX is the average of the maximum values of each component of the
26267 image.
26268
26269 The description of the accepted parameters follows.
26270
26271 stats_file, f
26272 If specified the filter will use the named file to save the PSNR of
26273 each individual frame. When filename equals "-" the data is sent to
26274 standard output.
26275
26276 stats_version
26277 Specifies which version of the stats file format to use. Details of
26278 each format are written below. Default value is 1.
26279
26280 stats_add_max
26281 Determines whether the max value is output to the stats log.
26282 Default value is 0. Requires stats_version >= 2. If this is set
26283 and stats_version < 2, the filter will return an error.
26284
26285 This filter also supports the framesync options.
26286
26287 The file printed if stats_file is selected, contains a sequence of
26288 key/value pairs of the form key:value for each compared couple of
26289 frames.
26290
26291 If a stats_version greater than 1 is specified, a header line precedes
26292 the list of per-frame-pair stats, with key value pairs following the
26293 frame format with the following parameters:
26294
26295 psnr_log_version
26296 The version of the log file format. Will match stats_version.
26297
26298 fields
26299 A comma separated list of the per-frame-pair parameters included in
26300 the log.
26301
26302 A description of each shown per-frame-pair parameter follows:
26303
26304 n sequential number of the input frame, starting from 1
26305
26306 mse_avg
26307 Mean Square Error pixel-by-pixel average difference of the compared
26308 frames, averaged over all the image components.
26309
26310 mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a
26311 Mean Square Error pixel-by-pixel average difference of the compared
26312 frames for the component specified by the suffix.
26313
26314 psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a
26315 Peak Signal to Noise ratio of the compared frames for the component
26316 specified by the suffix.
26317
26318 max_avg, max_y, max_u, max_v
26319 Maximum allowed value for each channel, and average over all
26320 channels.
26321
26322 Examples
26323
26324 • For example:
26325
26326 movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
26327 [main][ref] psnr="stats_file=stats.log" [out]
26328
26329 On this example the input file being processed is compared with the
26330 reference file ref_movie.mpg. The PSNR of each individual frame is
26331 stored in stats.log.
26332
26333 • Another example with different containers:
26334
26335 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 -
26336
26337 pullup
26338 Pulldown reversal (inverse telecine) filter, capable of handling mixed
26339 hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps
26340 progressive content.
26341
26342 The pullup filter is designed to take advantage of future context in
26343 making its decisions. This filter is stateless in the sense that it
26344 does not lock onto a pattern to follow, but it instead looks forward to
26345 the following fields in order to identify matches and rebuild
26346 progressive frames.
26347
26348 To produce content with an even framerate, insert the fps filter after
26349 pullup, use "fps=24000/1001" if the input frame rate is 29.97fps,
26350 "fps=24" for 30fps and the (rare) telecined 25fps input.
26351
26352 The filter accepts the following options:
26353
26354 jl
26355 jr
26356 jt
26357 jb These options set the amount of "junk" to ignore at the left,
26358 right, top, and bottom of the image, respectively. Left and right
26359 are in units of 8 pixels, while top and bottom are in units of 2
26360 lines. The default is 8 pixels on each side.
26361
26362 sb Set the strict breaks. Setting this option to 1 will reduce the
26363 chances of filter generating an occasional mismatched frame, but it
26364 may also cause an excessive number of frames to be dropped during
26365 high motion sequences. Conversely, setting it to -1 will make
26366 filter match fields more easily. This may help processing of video
26367 where there is slight blurring between the fields, but may also
26368 cause there to be interlaced frames in the output. Default value
26369 is 0.
26370
26371 mp Set the metric plane to use. It accepts the following values:
26372
26373 l Use luma plane.
26374
26375 u Use chroma blue plane.
26376
26377 v Use chroma red plane.
26378
26379 This option may be set to use chroma plane instead of the default
26380 luma plane for doing filter's computations. This may improve
26381 accuracy on very clean source material, but more likely will
26382 decrease accuracy, especially if there is chroma noise (rainbow
26383 effect) or any grayscale video. The main purpose of setting mp to
26384 a chroma plane is to reduce CPU load and make pullup usable in
26385 realtime on slow machines.
26386
26387 For best results (without duplicated frames in the output file) it is
26388 necessary to change the output frame rate. For example, to inverse
26389 telecine NTSC input:
26390
26391 ffmpeg -i input -vf pullup -r 24000/1001 ...
26392
26393 qp
26394 Change video quantization parameters (QP).
26395
26396 The filter accepts the following option:
26397
26398 qp Set expression for quantization parameter.
26399
26400 The expression is evaluated through the eval API and can contain, among
26401 others, the following constants:
26402
26403 known
26404 1 if index is not 129, 0 otherwise.
26405
26406 qp Sequential index starting from -129 to 128.
26407
26408 Examples
26409
26410 • Some equation like:
26411
26412 qp=2+2*sin(PI*qp)
26413
26414 random
26415 Flush video frames from internal cache of frames into a random order.
26416 No frame is discarded. Inspired by frei0r nervous filter.
26417
26418 frames
26419 Set size in number of frames of internal cache, in range from 2 to
26420 512. Default is 30.
26421
26422 seed
26423 Set seed for random number generator, must be an integer included
26424 between 0 and "UINT32_MAX". If not specified, or if explicitly set
26425 to less than 0, the filter will try to use a good random seed on a
26426 best effort basis.
26427
26428 readeia608
26429 Read closed captioning (EIA-608) information from the top lines of a
26430 video frame.
26431
26432 This filter adds frame metadata for "lavfi.readeia608.X.cc" and
26433 "lavfi.readeia608.X.line", where "X" is the number of the identified
26434 line with EIA-608 data (starting from 0). A description of each
26435 metadata value follows:
26436
26437 lavfi.readeia608.X.cc
26438 The two bytes stored as EIA-608 data (printed in hexadecimal).
26439
26440 lavfi.readeia608.X.line
26441 The number of the line on which the EIA-608 data was identified and
26442 read.
26443
26444 This filter accepts the following options:
26445
26446 scan_min
26447 Set the line to start scanning for EIA-608 data. Default is 0.
26448
26449 scan_max
26450 Set the line to end scanning for EIA-608 data. Default is 29.
26451
26452 spw Set the ratio of width reserved for sync code detection. Default
26453 is 0.27. Allowed range is "[0.1 - 0.7]".
26454
26455 chp Enable checking the parity bit. In the event of a parity error, the
26456 filter will output 0x00 for that character. Default is false.
26457
26458 lp Lowpass lines prior to further processing. Default is enabled.
26459
26460 Commands
26461
26462 This filter supports the all above options as commands.
26463
26464 Examples
26465
26466 • Output a csv with presentation time and the first two lines of
26467 identified EIA-608 captioning data.
26468
26469 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
26470
26471 readvitc
26472 Read vertical interval timecode (VITC) information from the top lines
26473 of a video frame.
26474
26475 The filter adds frame metadata key "lavfi.readvitc.tc_str" with the
26476 timecode value, if a valid timecode has been detected. Further metadata
26477 key "lavfi.readvitc.found" is set to 0/1 depending on whether timecode
26478 data has been found or not.
26479
26480 This filter accepts the following options:
26481
26482 scan_max
26483 Set the maximum number of lines to scan for VITC data. If the value
26484 is set to -1 the full video frame is scanned. Default is 45.
26485
26486 thr_b
26487 Set the luma threshold for black. Accepts float numbers in the
26488 range [0.0,1.0], default value is 0.2. The value must be equal or
26489 less than "thr_w".
26490
26491 thr_w
26492 Set the luma threshold for white. Accepts float numbers in the
26493 range [0.0,1.0], default value is 0.6. The value must be equal or
26494 greater than "thr_b".
26495
26496 Examples
26497
26498 • Detect and draw VITC data onto the video frame; if no valid VITC is
26499 detected, draw "--:--:--:--" as a placeholder:
26500
26501 ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--}:x=(w-tw)/2:y=400-ascent'
26502
26503 remap
26504 Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
26505
26506 Destination pixel at position (X, Y) will be picked from source (x, y)
26507 position where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are
26508 out of range, zero value for pixel will be used for destination pixel.
26509
26510 Xmap and Ymap input video streams must be of same dimensions. Output
26511 video stream will have Xmap/Ymap video stream dimensions. Xmap and
26512 Ymap input video streams are 16bit depth, single channel.
26513
26514 format
26515 Specify pixel format of output from this filter. Can be "color" or
26516 "gray". Default is "color".
26517
26518 fill
26519 Specify the color of the unmapped pixels. For the syntax of this
26520 option, check the "Color" section in the ffmpeg-utils manual.
26521 Default color is "black".
26522
26523 removegrain
26524 The removegrain filter is a spatial denoiser for progressive video.
26525
26526 m0 Set mode for the first plane.
26527
26528 m1 Set mode for the second plane.
26529
26530 m2 Set mode for the third plane.
26531
26532 m3 Set mode for the fourth plane.
26533
26534 Range of mode is from 0 to 24. Description of each mode follows:
26535
26536 0 Leave input plane unchanged. Default.
26537
26538 1 Clips the pixel with the minimum and maximum of the 8 neighbour
26539 pixels.
26540
26541 2 Clips the pixel with the second minimum and maximum of the 8
26542 neighbour pixels.
26543
26544 3 Clips the pixel with the third minimum and maximum of the 8
26545 neighbour pixels.
26546
26547 4 Clips the pixel with the fourth minimum and maximum of the 8
26548 neighbour pixels. This is equivalent to a median filter.
26549
26550 5 Line-sensitive clipping giving the minimal change.
26551
26552 6 Line-sensitive clipping, intermediate.
26553
26554 7 Line-sensitive clipping, intermediate.
26555
26556 8 Line-sensitive clipping, intermediate.
26557
26558 9 Line-sensitive clipping on a line where the neighbours pixels are
26559 the closest.
26560
26561 10 Replaces the target pixel with the closest neighbour.
26562
26563 11 [1 2 1] horizontal and vertical kernel blur.
26564
26565 12 Same as mode 11.
26566
26567 13 Bob mode, interpolates top field from the line where the neighbours
26568 pixels are the closest.
26569
26570 14 Bob mode, interpolates bottom field from the line where the
26571 neighbours pixels are the closest.
26572
26573 15 Bob mode, interpolates top field. Same as 13 but with a more
26574 complicated interpolation formula.
26575
26576 16 Bob mode, interpolates bottom field. Same as 14 but with a more
26577 complicated interpolation formula.
26578
26579 17 Clips the pixel with the minimum and maximum of respectively the
26580 maximum and minimum of each pair of opposite neighbour pixels.
26581
26582 18 Line-sensitive clipping using opposite neighbours whose greatest
26583 distance from the current pixel is minimal.
26584
26585 19 Replaces the pixel with the average of its 8 neighbours.
26586
26587 20 Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
26588
26589 21 Clips pixels using the averages of opposite neighbour.
26590
26591 22 Same as mode 21 but simpler and faster.
26592
26593 23 Small edge and halo removal, but reputed useless.
26594
26595 24 Similar as 23.
26596
26597 removelogo
26598 Suppress a TV station logo, using an image file to determine which
26599 pixels comprise the logo. It works by filling in the pixels that
26600 comprise the logo with neighboring pixels.
26601
26602 The filter accepts the following options:
26603
26604 filename, f
26605 Set the filter bitmap file, which can be any image format supported
26606 by libavformat. The width and height of the image file must match
26607 those of the video stream being processed.
26608
26609 Pixels in the provided bitmap image with a value of zero are not
26610 considered part of the logo, non-zero pixels are considered part of the
26611 logo. If you use white (255) for the logo and black (0) for the rest,
26612 you will be safe. For making the filter bitmap, it is recommended to
26613 take a screen capture of a black frame with the logo visible, and then
26614 using a threshold filter followed by the erode filter once or twice.
26615
26616 If needed, little splotches can be fixed manually. Remember that if
26617 logo pixels are not covered, the filter quality will be much reduced.
26618 Marking too many pixels as part of the logo does not hurt as much, but
26619 it will increase the amount of blurring needed to cover over the image
26620 and will destroy more information than necessary, and extra pixels will
26621 slow things down on a large logo.
26622
26623 repeatfields
26624 This filter uses the repeat_field flag from the Video ES headers and
26625 hard repeats fields based on its value.
26626
26627 reverse
26628 Reverse a video clip.
26629
26630 Warning: This filter requires memory to buffer the entire clip, so
26631 trimming is suggested.
26632
26633 Examples
26634
26635 • Take the first 5 seconds of a clip, and reverse it.
26636
26637 trim=end=5,reverse
26638
26639 rgbashift
26640 Shift R/G/B/A pixels horizontally and/or vertically.
26641
26642 The filter accepts the following options:
26643
26644 rh Set amount to shift red horizontally.
26645
26646 rv Set amount to shift red vertically.
26647
26648 gh Set amount to shift green horizontally.
26649
26650 gv Set amount to shift green vertically.
26651
26652 bh Set amount to shift blue horizontally.
26653
26654 bv Set amount to shift blue vertically.
26655
26656 ah Set amount to shift alpha horizontally.
26657
26658 av Set amount to shift alpha vertically.
26659
26660 edge
26661 Set edge mode, can be smear, default, or warp.
26662
26663 Commands
26664
26665 This filter supports the all above options as commands.
26666
26667 roberts
26668 Apply roberts cross operator to input video stream.
26669
26670 The filter accepts the following option:
26671
26672 planes
26673 Set which planes will be processed, unprocessed planes will be
26674 copied. By default value 0xf, all planes will be processed.
26675
26676 scale
26677 Set value which will be multiplied with filtered result.
26678
26679 delta
26680 Set value which will be added to filtered result.
26681
26682 Commands
26683
26684 This filter supports the all above options as commands.
26685
26686 rotate
26687 Rotate video by an arbitrary angle expressed in radians.
26688
26689 The filter accepts the following options:
26690
26691 A description of the optional parameters follows.
26692
26693 angle, a
26694 Set an expression for the angle by which to rotate the input video
26695 clockwise, expressed as a number of radians. A negative value will
26696 result in a counter-clockwise rotation. By default it is set to
26697 "0".
26698
26699 This expression is evaluated for each frame.
26700
26701 out_w, ow
26702 Set the output width expression, default value is "iw". This
26703 expression is evaluated just once during configuration.
26704
26705 out_h, oh
26706 Set the output height expression, default value is "ih". This
26707 expression is evaluated just once during configuration.
26708
26709 bilinear
26710 Enable bilinear interpolation if set to 1, a value of 0 disables
26711 it. Default value is 1.
26712
26713 fillcolor, c
26714 Set the color used to fill the output area not covered by the
26715 rotated image. For the general syntax of this option, check the
26716 "Color" section in the ffmpeg-utils manual. If the special value
26717 "none" is selected then no background is printed (useful for
26718 example if the background is never shown).
26719
26720 Default value is "black".
26721
26722 The expressions for the angle and the output size can contain the
26723 following constants and functions:
26724
26725 n sequential number of the input frame, starting from 0. It is always
26726 NAN before the first frame is filtered.
26727
26728 t time in seconds of the input frame, it is set to 0 when the filter
26729 is configured. It is always NAN before the first frame is filtered.
26730
26731 hsub
26732 vsub
26733 horizontal and vertical chroma subsample values. For example for
26734 the pixel format "yuv422p" hsub is 2 and vsub is 1.
26735
26736 in_w, iw
26737 in_h, ih
26738 the input video width and height
26739
26740 out_w, ow
26741 out_h, oh
26742 the output width and height, that is the size of the padded area as
26743 specified by the width and height expressions
26744
26745 rotw(a)
26746 roth(a)
26747 the minimal width/height required for completely containing the
26748 input video rotated by a radians.
26749
26750 These are only available when computing the out_w and out_h
26751 expressions.
26752
26753 Examples
26754
26755 • Rotate the input by PI/6 radians clockwise:
26756
26757 rotate=PI/6
26758
26759 • Rotate the input by PI/6 radians counter-clockwise:
26760
26761 rotate=-PI/6
26762
26763 • Rotate the input by 45 degrees clockwise:
26764
26765 rotate=45*PI/180
26766
26767 • Apply a constant rotation with period T, starting from an angle of
26768 PI/3:
26769
26770 rotate=PI/3+2*PI*t/T
26771
26772 • Make the input video rotation oscillating with a period of T
26773 seconds and an amplitude of A radians:
26774
26775 rotate=A*sin(2*PI/T*t)
26776
26777 • Rotate the video, output size is chosen so that the whole rotating
26778 input video is always completely contained in the output:
26779
26780 rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
26781
26782 • Rotate the video, reduce the output size so that no background is
26783 ever shown:
26784
26785 rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
26786
26787 Commands
26788
26789 The filter supports the following commands:
26790
26791 a, angle
26792 Set the angle expression. The command accepts the same syntax of
26793 the corresponding option.
26794
26795 If the specified expression is not valid, it is kept at its current
26796 value.
26797
26798 sab
26799 Apply Shape Adaptive Blur.
26800
26801 The filter accepts the following options:
26802
26803 luma_radius, lr
26804 Set luma blur filter strength, must be a value in range 0.1-4.0,
26805 default value is 1.0. A greater value will result in a more blurred
26806 image, and in slower processing.
26807
26808 luma_pre_filter_radius, lpfr
26809 Set luma pre-filter radius, must be a value in the 0.1-2.0 range,
26810 default value is 1.0.
26811
26812 luma_strength, ls
26813 Set luma maximum difference between pixels to still be considered,
26814 must be a value in the 0.1-100.0 range, default value is 1.0.
26815
26816 chroma_radius, cr
26817 Set chroma blur filter strength, must be a value in range -0.9-4.0.
26818 A greater value will result in a more blurred image, and in slower
26819 processing.
26820
26821 chroma_pre_filter_radius, cpfr
26822 Set chroma pre-filter radius, must be a value in the -0.9-2.0
26823 range.
26824
26825 chroma_strength, cs
26826 Set chroma maximum difference between pixels to still be
26827 considered, must be a value in the -0.9-100.0 range.
26828
26829 Each chroma option value, if not explicitly specified, is set to the
26830 corresponding luma option value.
26831
26832 scale
26833 Scale (resize) the input video, using the libswscale library.
26834
26835 The scale filter forces the output display aspect ratio to be the same
26836 of the input, by changing the output sample aspect ratio.
26837
26838 If the input image format is different from the format requested by the
26839 next filter, the scale filter will convert the input to the requested
26840 format.
26841
26842 Options
26843
26844 The filter accepts the following options, or any of the options
26845 supported by the libswscale scaler.
26846
26847 See the ffmpeg-scaler manual for the complete list of scaler options.
26848
26849 width, w
26850 height, h
26851 Set the output video dimension expression. Default value is the
26852 input dimension.
26853
26854 If the width or w value is 0, the input width is used for the
26855 output. If the height or h value is 0, the input height is used for
26856 the output.
26857
26858 If one and only one of the values is -n with n >= 1, the scale
26859 filter will use a value that maintains the aspect ratio of the
26860 input image, calculated from the other specified dimension. After
26861 that it will, however, make sure that the calculated dimension is
26862 divisible by n and adjust the value if necessary.
26863
26864 If both values are -n with n >= 1, the behavior will be identical
26865 to both values being set to 0 as previously detailed.
26866
26867 See below for the list of accepted constants for use in the
26868 dimension expression.
26869
26870 eval
26871 Specify when to evaluate width and height expression. It accepts
26872 the following values:
26873
26874 init
26875 Only evaluate expressions once during the filter initialization
26876 or when a command is processed.
26877
26878 frame
26879 Evaluate expressions for each incoming frame.
26880
26881 Default value is init.
26882
26883 interl
26884 Set the interlacing mode. It accepts the following values:
26885
26886 1 Force interlaced aware scaling.
26887
26888 0 Do not apply interlaced scaling.
26889
26890 -1 Select interlaced aware scaling depending on whether the source
26891 frames are flagged as interlaced or not.
26892
26893 Default value is 0.
26894
26895 flags
26896 Set libswscale scaling flags. See the ffmpeg-scaler manual for the
26897 complete list of values. If not explicitly specified the filter
26898 applies the default flags.
26899
26900 param0, param1
26901 Set libswscale input parameters for scaling algorithms that need
26902 them. See the ffmpeg-scaler manual for the complete documentation.
26903 If not explicitly specified the filter applies empty parameters.
26904
26905 size, s
26906 Set the video size. For the syntax of this option, check the "Video
26907 size" section in the ffmpeg-utils manual.
26908
26909 in_color_matrix
26910 out_color_matrix
26911 Set in/output YCbCr color space type.
26912
26913 This allows the autodetected value to be overridden as well as
26914 allows forcing a specific value used for the output and encoder.
26915
26916 If not specified, the color space type depends on the pixel format.
26917
26918 Possible values:
26919
26920 auto
26921 Choose automatically.
26922
26923 bt709
26924 Format conforming to International Telecommunication Union
26925 (ITU) Recommendation BT.709.
26926
26927 fcc Set color space conforming to the United States Federal
26928 Communications Commission (FCC) Code of Federal Regulations
26929 (CFR) Title 47 (2003) 73.682 (a).
26930
26931 bt601
26932 bt470
26933 smpte170m
26934 Set color space conforming to:
26935
26936 • ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
26937
26938 • ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
26939
26940 • Society of Motion Picture and Television Engineers (SMPTE)
26941 ST 170:2004
26942
26943 smpte240m
26944 Set color space conforming to SMPTE ST 240:1999.
26945
26946 bt2020
26947 Set color space conforming to ITU-R BT.2020 non-constant
26948 luminance system.
26949
26950 in_range
26951 out_range
26952 Set in/output YCbCr sample range.
26953
26954 This allows the autodetected value to be overridden as well as
26955 allows forcing a specific value used for the output and encoder. If
26956 not specified, the range depends on the pixel format. Possible
26957 values:
26958
26959 auto/unknown
26960 Choose automatically.
26961
26962 jpeg/full/pc
26963 Set full range (0-255 in case of 8-bit luma).
26964
26965 mpeg/limited/tv
26966 Set "MPEG" range (16-235 in case of 8-bit luma).
26967
26968 force_original_aspect_ratio
26969 Enable decreasing or increasing output video width or height if
26970 necessary to keep the original aspect ratio. Possible values:
26971
26972 disable
26973 Scale the video as specified and disable this feature.
26974
26975 decrease
26976 The output video dimensions will automatically be decreased if
26977 needed.
26978
26979 increase
26980 The output video dimensions will automatically be increased if
26981 needed.
26982
26983 One useful instance of this option is that when you know a specific
26984 device's maximum allowed resolution, you can use this to limit the
26985 output video to that, while retaining the aspect ratio. For
26986 example, device A allows 1280x720 playback, and your video is
26987 1920x800. Using this option (set it to decrease) and specifying
26988 1280x720 to the command line makes the output 1280x533.
26989
26990 Please note that this is a different thing than specifying -1 for w
26991 or h, you still need to specify the output resolution for this
26992 option to work.
26993
26994 force_divisible_by
26995 Ensures that both the output dimensions, width and height, are
26996 divisible by the given integer when used together with
26997 force_original_aspect_ratio. This works similar to using "-n" in
26998 the w and h options.
26999
27000 This option respects the value set for force_original_aspect_ratio,
27001 increasing or decreasing the resolution accordingly. The video's
27002 aspect ratio may be slightly modified.
27003
27004 This option can be handy if you need to have a video fit within or
27005 exceed a defined resolution using force_original_aspect_ratio but
27006 also have encoder restrictions on width or height divisibility.
27007
27008 The values of the w and h options are expressions containing the
27009 following constants:
27010
27011 in_w
27012 in_h
27013 The input width and height
27014
27015 iw
27016 ih These are the same as in_w and in_h.
27017
27018 out_w
27019 out_h
27020 The output (scaled) width and height
27021
27022 ow
27023 oh These are the same as out_w and out_h
27024
27025 a The same as iw / ih
27026
27027 sar input sample aspect ratio
27028
27029 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
27030
27031 hsub
27032 vsub
27033 horizontal and vertical input chroma subsample values. For example
27034 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
27035
27036 ohsub
27037 ovsub
27038 horizontal and vertical output chroma subsample values. For example
27039 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
27040
27041 n The (sequential) number of the input frame, starting from 0. Only
27042 available with "eval=frame".
27043
27044 t The presentation timestamp of the input frame, expressed as a
27045 number of seconds. Only available with "eval=frame".
27046
27047 pos The position (byte offset) of the frame in the input stream, or NaN
27048 if this information is unavailable and/or meaningless (for example
27049 in case of synthetic video). Only available with "eval=frame".
27050
27051 Examples
27052
27053 • Scale the input video to a size of 200x100
27054
27055 scale=w=200:h=100
27056
27057 This is equivalent to:
27058
27059 scale=200:100
27060
27061 or:
27062
27063 scale=200x100
27064
27065 • Specify a size abbreviation for the output size:
27066
27067 scale=qcif
27068
27069 which can also be written as:
27070
27071 scale=size=qcif
27072
27073 • Scale the input to 2x:
27074
27075 scale=w=2*iw:h=2*ih
27076
27077 • The above is the same as:
27078
27079 scale=2*in_w:2*in_h
27080
27081 • Scale the input to 2x with forced interlaced scaling:
27082
27083 scale=2*iw:2*ih:interl=1
27084
27085 • Scale the input to half size:
27086
27087 scale=w=iw/2:h=ih/2
27088
27089 • Increase the width, and set the height to the same size:
27090
27091 scale=3/2*iw:ow
27092
27093 • Seek Greek harmony:
27094
27095 scale=iw:1/PHI*iw
27096 scale=ih*PHI:ih
27097
27098 • Increase the height, and set the width to 3/2 of the height:
27099
27100 scale=w=3/2*oh:h=3/5*ih
27101
27102 • Increase the size, making the size a multiple of the chroma
27103 subsample values:
27104
27105 scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
27106
27107 • Increase the width to a maximum of 500 pixels, keeping the same
27108 aspect ratio as the input:
27109
27110 scale=w='min(500\, iw*3/2):h=-1'
27111
27112 • Make pixels square by combining scale and setsar:
27113
27114 scale='trunc(ih*dar):ih',setsar=1/1
27115
27116 • Make pixels square by combining scale and setsar, making sure the
27117 resulting resolution is even (required by some codecs):
27118
27119 scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
27120
27121 Commands
27122
27123 This filter supports the following commands:
27124
27125 width, w
27126 height, h
27127 Set the output video dimension expression. The command accepts the
27128 same syntax of the corresponding option.
27129
27130 If the specified expression is not valid, it is kept at its current
27131 value.
27132
27133 scale_cuda
27134 Scale (resize) and convert (pixel format) the input video, using
27135 accelerated CUDA kernels. Setting the output width and height works in
27136 the same way as for the scale filter.
27137
27138 The filter accepts the following options:
27139
27140 w
27141 h Set the output video dimension expression. Default value is the
27142 input dimension.
27143
27144 Allows for the same expressions as the scale filter.
27145
27146 interp_algo
27147 Sets the algorithm used for scaling:
27148
27149 nearest
27150 Nearest neighbour
27151
27152 Used by default if input parameters match the desired output.
27153
27154 bilinear
27155 Bilinear
27156
27157 bicubic
27158 Bicubic
27159
27160 This is the default.
27161
27162 lanczos
27163 Lanczos
27164
27165 format
27166 Controls the output pixel format. By default, or if none is
27167 specified, the input pixel format is used.
27168
27169 The filter does not support converting between YUV and RGB pixel
27170 formats.
27171
27172 passthrough
27173 If set to 0, every frame is processed, even if no conversion is
27174 neccesary. This mode can be useful to use the filter as a buffer
27175 for a downstream frame-consumer that exhausts the limited decoder
27176 frame pool.
27177
27178 If set to 1, frames are passed through as-is if they match the
27179 desired output parameters. This is the default behaviour.
27180
27181 param
27182 Algorithm-Specific parameter.
27183
27184 Affects the curves of the bicubic algorithm.
27185
27186 force_original_aspect_ratio
27187 force_divisible_by
27188 Work the same as the identical scale filter options.
27189
27190 Examples
27191
27192 • Scale input to 720p, keeping aspect ratio and ensuring the output
27193 is yuv420p.
27194
27195 scale_cuda=-2:720:format=yuv420p
27196
27197 • Upscale to 4K using nearest neighbour algorithm.
27198
27199 scale_cuda=4096:2160:interp_algo=nearest
27200
27201 • Don't do any conversion or scaling, but copy all input frames into
27202 newly allocated ones. This can be useful to deal with a filter and
27203 encode chain that otherwise exhausts the decoders frame pool.
27204
27205 scale_cuda=passthrough=0
27206
27207 scale_npp
27208 Use the NVIDIA Performance Primitives (libnpp) to perform scaling
27209 and/or pixel format conversion on CUDA video frames. Setting the output
27210 width and height works in the same way as for the scale filter.
27211
27212 The following additional options are accepted:
27213
27214 format
27215 The pixel format of the output CUDA frames. If set to the string
27216 "same" (the default), the input format will be kept. Note that
27217 automatic format negotiation and conversion is not yet supported
27218 for hardware frames
27219
27220 interp_algo
27221 The interpolation algorithm used for resizing. One of the
27222 following:
27223
27224 nn Nearest neighbour.
27225
27226 linear
27227 cubic
27228 cubic2p_bspline
27229 2-parameter cubic (B=1, C=0)
27230
27231 cubic2p_catmullrom
27232 2-parameter cubic (B=0, C=1/2)
27233
27234 cubic2p_b05c03
27235 2-parameter cubic (B=1/2, C=3/10)
27236
27237 super
27238 Supersampling
27239
27240 lanczos
27241 force_original_aspect_ratio
27242 Enable decreasing or increasing output video width or height if
27243 necessary to keep the original aspect ratio. Possible values:
27244
27245 disable
27246 Scale the video as specified and disable this feature.
27247
27248 decrease
27249 The output video dimensions will automatically be decreased if
27250 needed.
27251
27252 increase
27253 The output video dimensions will automatically be increased if
27254 needed.
27255
27256 One useful instance of this option is that when you know a specific
27257 device's maximum allowed resolution, you can use this to limit the
27258 output video to that, while retaining the aspect ratio. For
27259 example, device A allows 1280x720 playback, and your video is
27260 1920x800. Using this option (set it to decrease) and specifying
27261 1280x720 to the command line makes the output 1280x533.
27262
27263 Please note that this is a different thing than specifying -1 for w
27264 or h, you still need to specify the output resolution for this
27265 option to work.
27266
27267 force_divisible_by
27268 Ensures that both the output dimensions, width and height, are
27269 divisible by the given integer when used together with
27270 force_original_aspect_ratio. This works similar to using "-n" in
27271 the w and h options.
27272
27273 This option respects the value set for force_original_aspect_ratio,
27274 increasing or decreasing the resolution accordingly. The video's
27275 aspect ratio may be slightly modified.
27276
27277 This option can be handy if you need to have a video fit within or
27278 exceed a defined resolution using force_original_aspect_ratio but
27279 also have encoder restrictions on width or height divisibility.
27280
27281 eval
27282 Specify when to evaluate width and height expression. It accepts
27283 the following values:
27284
27285 init
27286 Only evaluate expressions once during the filter initialization
27287 or when a command is processed.
27288
27289 frame
27290 Evaluate expressions for each incoming frame.
27291
27292 The values of the w and h options are expressions containing the
27293 following constants:
27294
27295 in_w
27296 in_h
27297 The input width and height
27298
27299 iw
27300 ih These are the same as in_w and in_h.
27301
27302 out_w
27303 out_h
27304 The output (scaled) width and height
27305
27306 ow
27307 oh These are the same as out_w and out_h
27308
27309 a The same as iw / ih
27310
27311 sar input sample aspect ratio
27312
27313 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
27314
27315 n The (sequential) number of the input frame, starting from 0. Only
27316 available with "eval=frame".
27317
27318 t The presentation timestamp of the input frame, expressed as a
27319 number of seconds. Only available with "eval=frame".
27320
27321 pos The position (byte offset) of the frame in the input stream, or NaN
27322 if this information is unavailable and/or meaningless (for example
27323 in case of synthetic video). Only available with "eval=frame".
27324
27325 scale2ref
27326 Scale (resize) the input video, based on a reference video.
27327
27328 See the scale filter for available options, scale2ref supports the same
27329 but uses the reference video instead of the main input as basis.
27330 scale2ref also supports the following additional constants for the w
27331 and h options:
27332
27333 main_w
27334 main_h
27335 The main input video's width and height
27336
27337 main_a
27338 The same as main_w / main_h
27339
27340 main_sar
27341 The main input video's sample aspect ratio
27342
27343 main_dar, mdar
27344 The main input video's display aspect ratio. Calculated from
27345 "(main_w / main_h) * main_sar".
27346
27347 main_hsub
27348 main_vsub
27349 The main input video's horizontal and vertical chroma subsample
27350 values. For example for the pixel format "yuv422p" hsub is 2 and
27351 vsub is 1.
27352
27353 main_n
27354 The (sequential) number of the main input frame, starting from 0.
27355 Only available with "eval=frame".
27356
27357 main_t
27358 The presentation timestamp of the main input frame, expressed as a
27359 number of seconds. Only available with "eval=frame".
27360
27361 main_pos
27362 The position (byte offset) of the frame in the main input stream,
27363 or NaN if this information is unavailable and/or meaningless (for
27364 example in case of synthetic video). Only available with
27365 "eval=frame".
27366
27367 Examples
27368
27369 • Scale a subtitle stream (b) to match the main video (a) in size
27370 before overlaying
27371
27372 'scale2ref[b][a];[a][b]overlay'
27373
27374 • Scale a logo to 1/10th the height of a video, while preserving its
27375 display aspect ratio.
27376
27377 [logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
27378
27379 Commands
27380
27381 This filter supports the following commands:
27382
27383 width, w
27384 height, h
27385 Set the output video dimension expression. The command accepts the
27386 same syntax of the corresponding option.
27387
27388 If the specified expression is not valid, it is kept at its current
27389 value.
27390
27391 scale2ref_npp
27392 Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the
27393 input video, based on a reference video.
27394
27395 See the scale_npp filter for available options, scale2ref_npp supports
27396 the same but uses the reference video instead of the main input as
27397 basis. scale2ref_npp also supports the following additional constants
27398 for the w and h options:
27399
27400 main_w
27401 main_h
27402 The main input video's width and height
27403
27404 main_a
27405 The same as main_w / main_h
27406
27407 main_sar
27408 The main input video's sample aspect ratio
27409
27410 main_dar, mdar
27411 The main input video's display aspect ratio. Calculated from
27412 "(main_w / main_h) * main_sar".
27413
27414 main_n
27415 The (sequential) number of the main input frame, starting from 0.
27416 Only available with "eval=frame".
27417
27418 main_t
27419 The presentation timestamp of the main input frame, expressed as a
27420 number of seconds. Only available with "eval=frame".
27421
27422 main_pos
27423 The position (byte offset) of the frame in the main input stream,
27424 or NaN if this information is unavailable and/or meaningless (for
27425 example in case of synthetic video). Only available with
27426 "eval=frame".
27427
27428 Examples
27429
27430 • Scale a subtitle stream (b) to match the main video (a) in size
27431 before overlaying
27432
27433 'scale2ref_npp[b][a];[a][b]overlay_cuda'
27434
27435 • Scale a logo to 1/10th the height of a video, while preserving its
27436 display aspect ratio.
27437
27438 [logo-in][video-in]scale2ref_npp=w=oh*mdar:h=ih/10[logo-out][video-out]
27439
27440 scharr
27441 Apply scharr operator to input video stream.
27442
27443 The filter accepts the following option:
27444
27445 planes
27446 Set which planes will be processed, unprocessed planes will be
27447 copied. By default value 0xf, all planes will be processed.
27448
27449 scale
27450 Set value which will be multiplied with filtered result.
27451
27452 delta
27453 Set value which will be added to filtered result.
27454
27455 Commands
27456
27457 This filter supports the all above options as commands.
27458
27459 scroll
27460 Scroll input video horizontally and/or vertically by constant speed.
27461
27462 The filter accepts the following options:
27463
27464 horizontal, h
27465 Set the horizontal scrolling speed. Default is 0. Allowed range is
27466 from -1 to 1. Negative values changes scrolling direction.
27467
27468 vertical, v
27469 Set the vertical scrolling speed. Default is 0. Allowed range is
27470 from -1 to 1. Negative values changes scrolling direction.
27471
27472 hpos
27473 Set the initial horizontal scrolling position. Default is 0.
27474 Allowed range is from 0 to 1.
27475
27476 vpos
27477 Set the initial vertical scrolling position. Default is 0. Allowed
27478 range is from 0 to 1.
27479
27480 Commands
27481
27482 This filter supports the following commands:
27483
27484 horizontal, h
27485 Set the horizontal scrolling speed.
27486
27487 vertical, v
27488 Set the vertical scrolling speed.
27489
27490 scdet
27491 Detect video scene change.
27492
27493 This filter sets frame metadata with mafd between frame, the scene
27494 score, and forward the frame to the next filter, so they can use these
27495 metadata to detect scene change or others.
27496
27497 In addition, this filter logs a message and sets frame metadata when it
27498 detects a scene change by threshold.
27499
27500 "lavfi.scd.mafd" metadata keys are set with mafd for every frame.
27501
27502 "lavfi.scd.score" metadata keys are set with scene change score for
27503 every frame to detect scene change.
27504
27505 "lavfi.scd.time" metadata keys are set with current filtered frame time
27506 which detect scene change with threshold.
27507
27508 The filter accepts the following options:
27509
27510 threshold, t
27511 Set the scene change detection threshold as a percentage of maximum
27512 change. Good values are in the "[8.0, 14.0]" range. The range for
27513 threshold is "[0., 100.]".
27514
27515 Default value is 10..
27516
27517 sc_pass, s
27518 Set the flag to pass scene change frames to the next filter.
27519 Default value is 0 You can enable it if you want to get snapshot of
27520 scene change frames only.
27521
27522 selectivecolor
27523 Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of
27524 colors (such as "reds", "yellows", "greens", "cyans", ...). The
27525 adjustment range is defined by the "purity" of the color (that is, how
27526 saturated it already is).
27527
27528 This filter is similar to the Adobe Photoshop Selective Color tool.
27529
27530 The filter accepts the following options:
27531
27532 correction_method
27533 Select color correction method.
27534
27535 Available values are:
27536
27537 absolute
27538 Specified adjustments are applied "as-is" (added/subtracted to
27539 original pixel component value).
27540
27541 relative
27542 Specified adjustments are relative to the original component
27543 value.
27544
27545 Default is "absolute".
27546
27547 reds
27548 Adjustments for red pixels (pixels where the red component is the
27549 maximum)
27550
27551 yellows
27552 Adjustments for yellow pixels (pixels where the blue component is
27553 the minimum)
27554
27555 greens
27556 Adjustments for green pixels (pixels where the green component is
27557 the maximum)
27558
27559 cyans
27560 Adjustments for cyan pixels (pixels where the red component is the
27561 minimum)
27562
27563 blues
27564 Adjustments for blue pixels (pixels where the blue component is the
27565 maximum)
27566
27567 magentas
27568 Adjustments for magenta pixels (pixels where the green component is
27569 the minimum)
27570
27571 whites
27572 Adjustments for white pixels (pixels where all components are
27573 greater than 128)
27574
27575 neutrals
27576 Adjustments for all pixels except pure black and pure white
27577
27578 blacks
27579 Adjustments for black pixels (pixels where all components are
27580 lesser than 128)
27581
27582 psfile
27583 Specify a Photoshop selective color file (".asv") to import the
27584 settings from.
27585
27586 All the adjustment settings (reds, yellows, ...) accept up to 4 space
27587 separated floating point adjustment values in the [-1,1] range,
27588 respectively to adjust the amount of cyan, magenta, yellow and black
27589 for the pixels of its range.
27590
27591 Examples
27592
27593 • Increase cyan by 50% and reduce yellow by 33% in every green areas,
27594 and increase magenta by 27% in blue areas:
27595
27596 selectivecolor=greens=.5 0 -.33 0:blues=0 .27
27597
27598 • Use a Photoshop selective color preset:
27599
27600 selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
27601
27602 separatefields
27603 The "separatefields" takes a frame-based video input and splits each
27604 frame into its components fields, producing a new half height clip with
27605 twice the frame rate and twice the frame count.
27606
27607 This filter use field-dominance information in frame to decide which of
27608 each pair of fields to place first in the output. If it gets it wrong
27609 use setfield filter before "separatefields" filter.
27610
27611 setdar, setsar
27612 The "setdar" filter sets the Display Aspect Ratio for the filter output
27613 video.
27614
27615 This is done by changing the specified Sample (aka Pixel) Aspect Ratio,
27616 according to the following equation:
27617
27618 <DAR> = <HORIZONTAL_RESOLUTION> / <VERTICAL_RESOLUTION> * <SAR>
27619
27620 Keep in mind that the "setdar" filter does not modify the pixel
27621 dimensions of the video frame. Also, the display aspect ratio set by
27622 this filter may be changed by later filters in the filterchain, e.g. in
27623 case of scaling or if another "setdar" or a "setsar" filter is applied.
27624
27625 The "setsar" filter sets the Sample (aka Pixel) Aspect Ratio for the
27626 filter output video.
27627
27628 Note that as a consequence of the application of this filter, the
27629 output display aspect ratio will change according to the equation
27630 above.
27631
27632 Keep in mind that the sample aspect ratio set by the "setsar" filter
27633 may be changed by later filters in the filterchain, e.g. if another
27634 "setsar" or a "setdar" filter is applied.
27635
27636 It accepts the following parameters:
27637
27638 r, ratio, dar ("setdar" only), sar ("setsar" only)
27639 Set the aspect ratio used by the filter.
27640
27641 The parameter can be a floating point number string, an expression,
27642 or a string of the form num:den, where num and den are the
27643 numerator and denominator of the aspect ratio. If the parameter is
27644 not specified, it is assumed the value "0". In case the form
27645 "num:den" is used, the ":" character should be escaped.
27646
27647 max Set the maximum integer value to use for expressing numerator and
27648 denominator when reducing the expressed aspect ratio to a rational.
27649 Default value is 100.
27650
27651 The parameter sar is an expression containing the following constants:
27652
27653 E, PI, PHI
27654 These are approximated values for the mathematical constants e
27655 (Euler's number), pi (Greek pi), and phi (the golden ratio).
27656
27657 w, h
27658 The input width and height.
27659
27660 a These are the same as w / h.
27661
27662 sar The input sample aspect ratio.
27663
27664 dar The input display aspect ratio. It is the same as (w / h) * sar.
27665
27666 hsub, vsub
27667 Horizontal and vertical chroma subsample values. For example, for
27668 the pixel format "yuv422p" hsub is 2 and vsub is 1.
27669
27670 Examples
27671
27672 • To change the display aspect ratio to 16:9, specify one of the
27673 following:
27674
27675 setdar=dar=1.77777
27676 setdar=dar=16/9
27677
27678 • To change the sample aspect ratio to 10:11, specify:
27679
27680 setsar=sar=10/11
27681
27682 • To set a display aspect ratio of 16:9, and specify a maximum
27683 integer value of 1000 in the aspect ratio reduction, use the
27684 command:
27685
27686 setdar=ratio=16/9:max=1000
27687
27688 setfield
27689 Force field for the output video frame.
27690
27691 The "setfield" filter marks the interlace type field for the output
27692 frames. It does not change the input frame, but only sets the
27693 corresponding property, which affects how the frame is treated by
27694 following filters (e.g. "fieldorder" or "yadif").
27695
27696 The filter accepts the following options:
27697
27698 mode
27699 Available values are:
27700
27701 auto
27702 Keep the same field property.
27703
27704 bff Mark the frame as bottom-field-first.
27705
27706 tff Mark the frame as top-field-first.
27707
27708 prog
27709 Mark the frame as progressive.
27710
27711 setparams
27712 Force frame parameter for the output video frame.
27713
27714 The "setparams" filter marks interlace and color range for the output
27715 frames. It does not change the input frame, but only sets the
27716 corresponding property, which affects how the frame is treated by
27717 filters/encoders.
27718
27719 field_mode
27720 Available values are:
27721
27722 auto
27723 Keep the same field property (default).
27724
27725 bff Mark the frame as bottom-field-first.
27726
27727 tff Mark the frame as top-field-first.
27728
27729 prog
27730 Mark the frame as progressive.
27731
27732 range
27733 Available values are:
27734
27735 auto
27736 Keep the same color range property (default).
27737
27738 unspecified, unknown
27739 Mark the frame as unspecified color range.
27740
27741 limited, tv, mpeg
27742 Mark the frame as limited range.
27743
27744 full, pc, jpeg
27745 Mark the frame as full range.
27746
27747 color_primaries
27748 Set the color primaries. Available values are:
27749
27750 auto
27751 Keep the same color primaries property (default).
27752
27753 bt709
27754 unknown
27755 bt470m
27756 bt470bg
27757 smpte170m
27758 smpte240m
27759 film
27760 bt2020
27761 smpte428
27762 smpte431
27763 smpte432
27764 jedec-p22
27765 color_trc
27766 Set the color transfer. Available values are:
27767
27768 auto
27769 Keep the same color trc property (default).
27770
27771 bt709
27772 unknown
27773 bt470m
27774 bt470bg
27775 smpte170m
27776 smpte240m
27777 linear
27778 log100
27779 log316
27780 iec61966-2-4
27781 bt1361e
27782 iec61966-2-1
27783 bt2020-10
27784 bt2020-12
27785 smpte2084
27786 smpte428
27787 arib-std-b67
27788 colorspace
27789 Set the colorspace. Available values are:
27790
27791 auto
27792 Keep the same colorspace property (default).
27793
27794 gbr
27795 bt709
27796 unknown
27797 fcc
27798 bt470bg
27799 smpte170m
27800 smpte240m
27801 ycgco
27802 bt2020nc
27803 bt2020c
27804 smpte2085
27805 chroma-derived-nc
27806 chroma-derived-c
27807 ictcp
27808
27809 sharpen_npp
27810 Use the NVIDIA Performance Primitives (libnpp) to perform image
27811 sharpening with border control.
27812
27813 The following additional options are accepted:
27814
27815 border_type
27816 Type of sampling to be used ad frame borders. One of the following:
27817
27818 replicate
27819 Replicate pixel values.
27820
27821 shear
27822 Apply shear transform to input video.
27823
27824 This filter supports the following options:
27825
27826 shx Shear factor in X-direction. Default value is 0. Allowed range is
27827 from -2 to 2.
27828
27829 shy Shear factor in Y-direction. Default value is 0. Allowed range is
27830 from -2 to 2.
27831
27832 fillcolor, c
27833 Set the color used to fill the output area not covered by the
27834 transformed video. For the general syntax of this option, check the
27835 "Color" section in the ffmpeg-utils manual. If the special value
27836 "none" is selected then no background is printed (useful for
27837 example if the background is never shown).
27838
27839 Default value is "black".
27840
27841 interp
27842 Set interpolation type. Can be "bilinear" or "nearest". Default is
27843 "bilinear".
27844
27845 Commands
27846
27847 This filter supports the all above options as commands.
27848
27849 showinfo
27850 Show a line containing various information for each input video frame.
27851 The input video is not modified.
27852
27853 This filter supports the following options:
27854
27855 checksum
27856 Calculate checksums of each plane. By default enabled.
27857
27858 The shown line contains a sequence of key/value pairs of the form
27859 key:value.
27860
27861 The following values are shown in the output:
27862
27863 n The (sequential) number of the input frame, starting from 0.
27864
27865 pts The Presentation TimeStamp of the input frame, expressed as a
27866 number of time base units. The time base unit depends on the filter
27867 input pad.
27868
27869 pts_time
27870 The Presentation TimeStamp of the input frame, expressed as a
27871 number of seconds.
27872
27873 pos The position of the frame in the input stream, or -1 if this
27874 information is unavailable and/or meaningless (for example in case
27875 of synthetic video).
27876
27877 fmt The pixel format name.
27878
27879 sar The sample aspect ratio of the input frame, expressed in the form
27880 num/den.
27881
27882 s The size of the input frame. For the syntax of this option, check
27883 the "Video size" section in the ffmpeg-utils manual.
27884
27885 i The type of interlaced mode ("P" for "progressive", "T" for top
27886 field first, "B" for bottom field first).
27887
27888 iskey
27889 This is 1 if the frame is a key frame, 0 otherwise.
27890
27891 type
27892 The picture type of the input frame ("I" for an I-frame, "P" for a
27893 P-frame, "B" for a B-frame, or "?" for an unknown type). Also
27894 refer to the documentation of the "AVPictureType" enum and of the
27895 "av_get_picture_type_char" function defined in libavutil/avutil.h.
27896
27897 checksum
27898 The Adler-32 checksum (printed in hexadecimal) of all the planes of
27899 the input frame.
27900
27901 plane_checksum
27902 The Adler-32 checksum (printed in hexadecimal) of each plane of the
27903 input frame, expressed in the form "[c0 c1 c2 c3]".
27904
27905 mean
27906 The mean value of pixels in each plane of the input frame,
27907 expressed in the form "[mean0 mean1 mean2 mean3]".
27908
27909 stdev
27910 The standard deviation of pixel values in each plane of the input
27911 frame, expressed in the form "[stdev0 stdev1 stdev2 stdev3]".
27912
27913 showpalette
27914 Displays the 256 colors palette of each frame. This filter is only
27915 relevant for pal8 pixel format frames.
27916
27917 It accepts the following option:
27918
27919 s Set the size of the box used to represent one palette color entry.
27920 Default is 30 (for a "30x30" pixel box).
27921
27922 shuffleframes
27923 Reorder and/or duplicate and/or drop video frames.
27924
27925 It accepts the following parameters:
27926
27927 mapping
27928 Set the destination indexes of input frames. This is space or '|'
27929 separated list of indexes that maps input frames to output frames.
27930 Number of indexes also sets maximal value that each index may have.
27931 '-1' index have special meaning and that is to drop frame.
27932
27933 The first frame has the index 0. The default is to keep the input
27934 unchanged.
27935
27936 Examples
27937
27938 • Swap second and third frame of every three frames of the input:
27939
27940 ffmpeg -i INPUT -vf "shuffleframes=0 2 1" OUTPUT
27941
27942 • Swap 10th and 1st frame of every ten frames of the input:
27943
27944 ffmpeg -i INPUT -vf "shuffleframes=9 1 2 3 4 5 6 7 8 0" OUTPUT
27945
27946 shufflepixels
27947 Reorder pixels in video frames.
27948
27949 This filter accepts the following options:
27950
27951 direction, d
27952 Set shuffle direction. Can be forward or inverse direction.
27953 Default direction is forward.
27954
27955 mode, m
27956 Set shuffle mode. Can be horizontal, vertical or block mode.
27957
27958 width, w
27959 height, h
27960 Set shuffle block_size. In case of horizontal shuffle mode only
27961 width part of size is used, and in case of vertical shuffle mode
27962 only height part of size is used.
27963
27964 seed, s
27965 Set random seed used with shuffling pixels. Mainly useful to set to
27966 be able to reverse filtering process to get original input. For
27967 example, to reverse forward shuffle you need to use same parameters
27968 and exact same seed and to set direction to inverse.
27969
27970 shuffleplanes
27971 Reorder and/or duplicate video planes.
27972
27973 It accepts the following parameters:
27974
27975 map0
27976 The index of the input plane to be used as the first output plane.
27977
27978 map1
27979 The index of the input plane to be used as the second output plane.
27980
27981 map2
27982 The index of the input plane to be used as the third output plane.
27983
27984 map3
27985 The index of the input plane to be used as the fourth output plane.
27986
27987 The first plane has the index 0. The default is to keep the input
27988 unchanged.
27989
27990 Examples
27991
27992 • Swap the second and third planes of the input:
27993
27994 ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
27995
27996 signalstats
27997 Evaluate various visual metrics that assist in determining issues
27998 associated with the digitization of analog video media.
27999
28000 By default the filter will log these metadata values:
28001
28002 YMIN
28003 Display the minimal Y value contained within the input frame.
28004 Expressed in range of [0-255].
28005
28006 YLOW
28007 Display the Y value at the 10% percentile within the input frame.
28008 Expressed in range of [0-255].
28009
28010 YAVG
28011 Display the average Y value within the input frame. Expressed in
28012 range of [0-255].
28013
28014 YHIGH
28015 Display the Y value at the 90% percentile within the input frame.
28016 Expressed in range of [0-255].
28017
28018 YMAX
28019 Display the maximum Y value contained within the input frame.
28020 Expressed in range of [0-255].
28021
28022 UMIN
28023 Display the minimal U value contained within the input frame.
28024 Expressed in range of [0-255].
28025
28026 ULOW
28027 Display the U value at the 10% percentile within the input frame.
28028 Expressed in range of [0-255].
28029
28030 UAVG
28031 Display the average U value within the input frame. Expressed in
28032 range of [0-255].
28033
28034 UHIGH
28035 Display the U value at the 90% percentile within the input frame.
28036 Expressed in range of [0-255].
28037
28038 UMAX
28039 Display the maximum U value contained within the input frame.
28040 Expressed in range of [0-255].
28041
28042 VMIN
28043 Display the minimal V value contained within the input frame.
28044 Expressed in range of [0-255].
28045
28046 VLOW
28047 Display the V value at the 10% percentile within the input frame.
28048 Expressed in range of [0-255].
28049
28050 VAVG
28051 Display the average V value within the input frame. Expressed in
28052 range of [0-255].
28053
28054 VHIGH
28055 Display the V value at the 90% percentile within the input frame.
28056 Expressed in range of [0-255].
28057
28058 VMAX
28059 Display the maximum V value contained within the input frame.
28060 Expressed in range of [0-255].
28061
28062 SATMIN
28063 Display the minimal saturation value contained within the input
28064 frame. Expressed in range of [0-~181.02].
28065
28066 SATLOW
28067 Display the saturation value at the 10% percentile within the input
28068 frame. Expressed in range of [0-~181.02].
28069
28070 SATAVG
28071 Display the average saturation value within the input frame.
28072 Expressed in range of [0-~181.02].
28073
28074 SATHIGH
28075 Display the saturation value at the 90% percentile within the input
28076 frame. Expressed in range of [0-~181.02].
28077
28078 SATMAX
28079 Display the maximum saturation value contained within the input
28080 frame. Expressed in range of [0-~181.02].
28081
28082 HUEMED
28083 Display the median value for hue within the input frame. Expressed
28084 in range of [0-360].
28085
28086 HUEAVG
28087 Display the average value for hue within the input frame. Expressed
28088 in range of [0-360].
28089
28090 YDIF
28091 Display the average of sample value difference between all values
28092 of the Y plane in the current frame and corresponding values of the
28093 previous input frame. Expressed in range of [0-255].
28094
28095 UDIF
28096 Display the average of sample value difference between all values
28097 of the U plane in the current frame and corresponding values of the
28098 previous input frame. Expressed in range of [0-255].
28099
28100 VDIF
28101 Display the average of sample value difference between all values
28102 of the V plane in the current frame and corresponding values of the
28103 previous input frame. Expressed in range of [0-255].
28104
28105 YBITDEPTH
28106 Display bit depth of Y plane in current frame. Expressed in range
28107 of [0-16].
28108
28109 UBITDEPTH
28110 Display bit depth of U plane in current frame. Expressed in range
28111 of [0-16].
28112
28113 VBITDEPTH
28114 Display bit depth of V plane in current frame. Expressed in range
28115 of [0-16].
28116
28117 The filter accepts the following options:
28118
28119 stat
28120 out stat specify an additional form of image analysis. out output
28121 video with the specified type of pixel highlighted.
28122
28123 Both options accept the following values:
28124
28125 tout
28126 Identify temporal outliers pixels. A temporal outlier is a
28127 pixel unlike the neighboring pixels of the same field. Examples
28128 of temporal outliers include the results of video dropouts,
28129 head clogs, or tape tracking issues.
28130
28131 vrep
28132 Identify vertical line repetition. Vertical line repetition
28133 includes similar rows of pixels within a frame. In born-digital
28134 video vertical line repetition is common, but this pattern is
28135 uncommon in video digitized from an analog source. When it
28136 occurs in video that results from the digitization of an analog
28137 source it can indicate concealment from a dropout compensator.
28138
28139 brng
28140 Identify pixels that fall outside of legal broadcast range.
28141
28142 color, c
28143 Set the highlight color for the out option. The default color is
28144 yellow.
28145
28146 Examples
28147
28148 • Output data of various video metrics:
28149
28150 ffprobe -f lavfi movie=example.mov,signalstats="stat=tout+vrep+brng" -show_frames
28151
28152 • Output specific data about the minimum and maximum values of the Y
28153 plane per frame:
28154
28155 ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
28156
28157 • Playback video while highlighting pixels that are outside of
28158 broadcast range in red.
28159
28160 ffplay example.mov -vf signalstats="out=brng:color=red"
28161
28162 • Playback video with signalstats metadata drawn over the frame.
28163
28164 ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
28165
28166 The contents of signalstat_drawtext.txt used in the command are:
28167
28168 time %{pts:hms}
28169 Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
28170 U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
28171 V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
28172 saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
28173
28174 signature
28175 Calculates the MPEG-7 Video Signature. The filter can handle more than
28176 one input. In this case the matching between the inputs can be
28177 calculated additionally. The filter always passes through the first
28178 input. The signature of each stream can be written into a file.
28179
28180 It accepts the following options:
28181
28182 detectmode
28183 Enable or disable the matching process.
28184
28185 Available values are:
28186
28187 off Disable the calculation of a matching (default).
28188
28189 full
28190 Calculate the matching for the whole video and output whether
28191 the whole video matches or only parts.
28192
28193 fast
28194 Calculate only until a matching is found or the video ends.
28195 Should be faster in some cases.
28196
28197 nb_inputs
28198 Set the number of inputs. The option value must be a non negative
28199 integer. Default value is 1.
28200
28201 filename
28202 Set the path to which the output is written. If there is more than
28203 one input, the path must be a prototype, i.e. must contain %d or
28204 %0nd (where n is a positive integer), that will be replaced with
28205 the input number. If no filename is specified, no output will be
28206 written. This is the default.
28207
28208 format
28209 Choose the output format.
28210
28211 Available values are:
28212
28213 binary
28214 Use the specified binary representation (default).
28215
28216 xml Use the specified xml representation.
28217
28218 th_d
28219 Set threshold to detect one word as similar. The option value must
28220 be an integer greater than zero. The default value is 9000.
28221
28222 th_dc
28223 Set threshold to detect all words as similar. The option value must
28224 be an integer greater than zero. The default value is 60000.
28225
28226 th_xh
28227 Set threshold to detect frames as similar. The option value must be
28228 an integer greater than zero. The default value is 116.
28229
28230 th_di
28231 Set the minimum length of a sequence in frames to recognize it as
28232 matching sequence. The option value must be a non negative integer
28233 value. The default value is 0.
28234
28235 th_it
28236 Set the minimum relation, that matching frames to all frames must
28237 have. The option value must be a double value between 0 and 1. The
28238 default value is 0.5.
28239
28240 Examples
28241
28242 • To calculate the signature of an input video and store it in
28243 signature.bin:
28244
28245 ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
28246
28247 • To detect whether two videos match and store the signatures in XML
28248 format in signature0.xml and signature1.xml:
28249
28250 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 -
28251
28252 siti
28253 Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video,
28254 as defined in ITU-T P.910: Subjective video quality assessment methods
28255 for multimedia applications. Available PDF at
28256 <https://www.itu.int/rec/T-REC-P.910-199909-S/en >.
28257
28258 It accepts the following option:
28259
28260 print_summary
28261 If set to 1, Summary statistics will be printed to the console.
28262 Default 0.
28263
28264 Examples
28265
28266 • To calculate SI/TI metrics and print summary:
28267
28268 ffmpeg -i input.mp4 -vf siti=print_summary=1 -f null -
28269
28270 smartblur
28271 Blur the input video without impacting the outlines.
28272
28273 It accepts the following options:
28274
28275 luma_radius, lr
28276 Set the luma radius. The option value must be a float number in the
28277 range [0.1,5.0] that specifies the variance of the gaussian filter
28278 used to blur the image (slower if larger). Default value is 1.0.
28279
28280 luma_strength, ls
28281 Set the luma strength. The option value must be a float number in
28282 the range [-1.0,1.0] that configures the blurring. A value included
28283 in [0.0,1.0] will blur the image whereas a value included in
28284 [-1.0,0.0] will sharpen the image. Default value is 1.0.
28285
28286 luma_threshold, lt
28287 Set the luma threshold used as a coefficient to determine whether a
28288 pixel should be blurred or not. The option value must be an integer
28289 in the range [-30,30]. A value of 0 will filter all the image, a
28290 value included in [0,30] will filter flat areas and a value
28291 included in [-30,0] will filter edges. Default value is 0.
28292
28293 chroma_radius, cr
28294 Set the chroma radius. The option value must be a float number in
28295 the range [0.1,5.0] that specifies the variance of the gaussian
28296 filter used to blur the image (slower if larger). Default value is
28297 luma_radius.
28298
28299 chroma_strength, cs
28300 Set the chroma strength. The option value must be a float number in
28301 the range [-1.0,1.0] that configures the blurring. A value included
28302 in [0.0,1.0] will blur the image whereas a value included in
28303 [-1.0,0.0] will sharpen the image. Default value is luma_strength.
28304
28305 chroma_threshold, ct
28306 Set the chroma threshold used as a coefficient to determine whether
28307 a pixel should be blurred or not. The option value must be an
28308 integer in the range [-30,30]. A value of 0 will filter all the
28309 image, a value included in [0,30] will filter flat areas and a
28310 value included in [-30,0] will filter edges. Default value is
28311 luma_threshold.
28312
28313 If a chroma option is not explicitly set, the corresponding luma value
28314 is set.
28315
28316 sobel
28317 Apply sobel operator to input video stream.
28318
28319 The filter accepts the following option:
28320
28321 planes
28322 Set which planes will be processed, unprocessed planes will be
28323 copied. By default value 0xf, all planes will be processed.
28324
28325 scale
28326 Set value which will be multiplied with filtered result.
28327
28328 delta
28329 Set value which will be added to filtered result.
28330
28331 Commands
28332
28333 This filter supports the all above options as commands.
28334
28335 spp
28336 Apply a simple postprocessing filter that compresses and decompresses
28337 the image at several (or - in the case of quality level 6 - all) shifts
28338 and average the results.
28339
28340 The filter accepts the following options:
28341
28342 quality
28343 Set quality. This option defines the number of levels for
28344 averaging. It accepts an integer in the range 0-6. If set to 0, the
28345 filter will have no effect. A value of 6 means the higher quality.
28346 For each increment of that value the speed drops by a factor of
28347 approximately 2. Default value is 3.
28348
28349 qp Force a constant quantization parameter. If not set, the filter
28350 will use the QP from the video stream (if available).
28351
28352 mode
28353 Set thresholding mode. Available modes are:
28354
28355 hard
28356 Set hard thresholding (default).
28357
28358 soft
28359 Set soft thresholding (better de-ringing effect, but likely
28360 blurrier).
28361
28362 use_bframe_qp
28363 Enable the use of the QP from the B-Frames if set to 1. Using this
28364 option may cause flicker since the B-Frames have often larger QP.
28365 Default is 0 (not enabled).
28366
28367 Commands
28368
28369 This filter supports the following commands:
28370
28371 quality, level
28372 Set quality level. The value "max" can be used to set the maximum
28373 level, currently 6.
28374
28375 sr
28376 Scale the input by applying one of the super-resolution methods based
28377 on convolutional neural networks. Supported models:
28378
28379 • Super-Resolution Convolutional Neural Network model (SRCNN). See
28380 <https://arxiv.org/abs/1501.00092>.
28381
28382 • Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
28383 See <https://arxiv.org/abs/1609.05158>.
28384
28385 Training scripts as well as scripts for model file (.pb) saving can be
28386 found at <https://github.com/XueweiMeng/sr/tree/sr_dnn_native>.
28387 Original repository is at
28388 <https://github.com/HighVoltageRocknRoll/sr.git>.
28389
28390 Native model files (.model) can be generated from TensorFlow model
28391 files (.pb) by using tools/python/convert.py
28392
28393 The filter accepts the following options:
28394
28395 dnn_backend
28396 Specify which DNN backend to use for model loading and execution.
28397 This option accepts the following values:
28398
28399 native
28400 Native implementation of DNN loading and execution.
28401
28402 tensorflow
28403 TensorFlow backend. To enable this backend you need to install
28404 the TensorFlow for C library (see
28405 <https://www.tensorflow.org/install/lang_c>) and configure
28406 FFmpeg with "--enable-libtensorflow"
28407
28408 Default value is native.
28409
28410 model
28411 Set path to model file specifying network architecture and its
28412 parameters. Note that different backends use different file
28413 formats. TensorFlow backend can load files for both formats, while
28414 native backend can load files for only its format.
28415
28416 scale_factor
28417 Set scale factor for SRCNN model. Allowed values are 2, 3 and 4.
28418 Default value is 2. Scale factor is necessary for SRCNN model,
28419 because it accepts input upscaled using bicubic upscaling with
28420 proper scale factor.
28421
28422 To get full functionality (such as async execution), please use the
28423 dnn_processing filter.
28424
28425 ssim
28426 Obtain the SSIM (Structural SImilarity Metric) between two input
28427 videos.
28428
28429 This filter takes in input two input videos, the first input is
28430 considered the "main" source and is passed unchanged to the output. The
28431 second input is used as a "reference" video for computing the SSIM.
28432
28433 Both video inputs must have the same resolution and pixel format for
28434 this filter to work correctly. Also it assumes that both inputs have
28435 the same number of frames, which are compared one by one.
28436
28437 The filter stores the calculated SSIM of each frame.
28438
28439 The description of the accepted parameters follows.
28440
28441 stats_file, f
28442 If specified the filter will use the named file to save the SSIM of
28443 each individual frame. When filename equals "-" the data is sent to
28444 standard output.
28445
28446 The file printed if stats_file is selected, contains a sequence of
28447 key/value pairs of the form key:value for each compared couple of
28448 frames.
28449
28450 A description of each shown parameter follows:
28451
28452 n sequential number of the input frame, starting from 1
28453
28454 Y, U, V, R, G, B
28455 SSIM of the compared frames for the component specified by the
28456 suffix.
28457
28458 All SSIM of the compared frames for the whole frame.
28459
28460 dB Same as above but in dB representation.
28461
28462 This filter also supports the framesync options.
28463
28464 Examples
28465
28466 • For example:
28467
28468 movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
28469 [main][ref] ssim="stats_file=stats.log" [out]
28470
28471 On this example the input file being processed is compared with the
28472 reference file ref_movie.mpg. The SSIM of each individual frame is
28473 stored in stats.log.
28474
28475 • Another example with both psnr and ssim at same time:
28476
28477 ffmpeg -i main.mpg -i ref.mpg -lavfi "ssim;[0:v][1:v]psnr" -f null -
28478
28479 • Another example with different containers:
28480
28481 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 -
28482
28483 stereo3d
28484 Convert between different stereoscopic image formats.
28485
28486 The filters accept the following options:
28487
28488 in Set stereoscopic image format of input.
28489
28490 Available values for input image formats are:
28491
28492 sbsl
28493 side by side parallel (left eye left, right eye right)
28494
28495 sbsr
28496 side by side crosseye (right eye left, left eye right)
28497
28498 sbs2l
28499 side by side parallel with half width resolution (left eye
28500 left, right eye right)
28501
28502 sbs2r
28503 side by side crosseye with half width resolution (right eye
28504 left, left eye right)
28505
28506 abl
28507 tbl above-below (left eye above, right eye below)
28508
28509 abr
28510 tbr above-below (right eye above, left eye below)
28511
28512 ab2l
28513 tb2l
28514 above-below with half height resolution (left eye above, right
28515 eye below)
28516
28517 ab2r
28518 tb2r
28519 above-below with half height resolution (right eye above, left
28520 eye below)
28521
28522 al alternating frames (left eye first, right eye second)
28523
28524 ar alternating frames (right eye first, left eye second)
28525
28526 irl interleaved rows (left eye has top row, right eye starts on
28527 next row)
28528
28529 irr interleaved rows (right eye has top row, left eye starts on
28530 next row)
28531
28532 icl interleaved columns, left eye first
28533
28534 icr interleaved columns, right eye first
28535
28536 Default value is sbsl.
28537
28538 out Set stereoscopic image format of output.
28539
28540 sbsl
28541 side by side parallel (left eye left, right eye right)
28542
28543 sbsr
28544 side by side crosseye (right eye left, left eye right)
28545
28546 sbs2l
28547 side by side parallel with half width resolution (left eye
28548 left, right eye right)
28549
28550 sbs2r
28551 side by side crosseye with half width resolution (right eye
28552 left, left eye right)
28553
28554 abl
28555 tbl above-below (left eye above, right eye below)
28556
28557 abr
28558 tbr above-below (right eye above, left eye below)
28559
28560 ab2l
28561 tb2l
28562 above-below with half height resolution (left eye above, right
28563 eye below)
28564
28565 ab2r
28566 tb2r
28567 above-below with half height resolution (right eye above, left
28568 eye below)
28569
28570 al alternating frames (left eye first, right eye second)
28571
28572 ar alternating frames (right eye first, left eye second)
28573
28574 irl interleaved rows (left eye has top row, right eye starts on
28575 next row)
28576
28577 irr interleaved rows (right eye has top row, left eye starts on
28578 next row)
28579
28580 arbg
28581 anaglyph red/blue gray (red filter on left eye, blue filter on
28582 right eye)
28583
28584 argg
28585 anaglyph red/green gray (red filter on left eye, green filter
28586 on right eye)
28587
28588 arcg
28589 anaglyph red/cyan gray (red filter on left eye, cyan filter on
28590 right eye)
28591
28592 arch
28593 anaglyph red/cyan half colored (red filter on left eye, cyan
28594 filter on right eye)
28595
28596 arcc
28597 anaglyph red/cyan color (red filter on left eye, cyan filter on
28598 right eye)
28599
28600 arcd
28601 anaglyph red/cyan color optimized with the least squares
28602 projection of dubois (red filter on left eye, cyan filter on
28603 right eye)
28604
28605 agmg
28606 anaglyph green/magenta gray (green filter on left eye, magenta
28607 filter on right eye)
28608
28609 agmh
28610 anaglyph green/magenta half colored (green filter on left eye,
28611 magenta filter on right eye)
28612
28613 agmc
28614 anaglyph green/magenta colored (green filter on left eye,
28615 magenta filter on right eye)
28616
28617 agmd
28618 anaglyph green/magenta color optimized with the least squares
28619 projection of dubois (green filter on left eye, magenta filter
28620 on right eye)
28621
28622 aybg
28623 anaglyph yellow/blue gray (yellow filter on left eye, blue
28624 filter on right eye)
28625
28626 aybh
28627 anaglyph yellow/blue half colored (yellow filter on left eye,
28628 blue filter on right eye)
28629
28630 aybc
28631 anaglyph yellow/blue colored (yellow filter on left eye, blue
28632 filter on right eye)
28633
28634 aybd
28635 anaglyph yellow/blue color optimized with the least squares
28636 projection of dubois (yellow filter on left eye, blue filter on
28637 right eye)
28638
28639 ml mono output (left eye only)
28640
28641 mr mono output (right eye only)
28642
28643 chl checkerboard, left eye first
28644
28645 chr checkerboard, right eye first
28646
28647 icl interleaved columns, left eye first
28648
28649 icr interleaved columns, right eye first
28650
28651 hdmi
28652 HDMI frame pack
28653
28654 Default value is arcd.
28655
28656 Examples
28657
28658 • Convert input video from side by side parallel to anaglyph
28659 yellow/blue dubois:
28660
28661 stereo3d=sbsl:aybd
28662
28663 • Convert input video from above below (left eye above, right eye
28664 below) to side by side crosseye.
28665
28666 stereo3d=abl:sbsr
28667
28668 streamselect, astreamselect
28669 Select video or audio streams.
28670
28671 The filter accepts the following options:
28672
28673 inputs
28674 Set number of inputs. Default is 2.
28675
28676 map Set input indexes to remap to outputs.
28677
28678 Commands
28679
28680 The "streamselect" and "astreamselect" filter supports the following
28681 commands:
28682
28683 map Set input indexes to remap to outputs.
28684
28685 Examples
28686
28687 • Select first 5 seconds 1st stream and rest of time 2nd stream:
28688
28689 sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
28690
28691 • Same as above, but for audio:
28692
28693 asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
28694
28695 subtitles
28696 Draw subtitles on top of input video using the libass library.
28697
28698 To enable compilation of this filter you need to configure FFmpeg with
28699 "--enable-libass". This filter also requires a build with libavcodec
28700 and libavformat to convert the passed subtitles file to ASS (Advanced
28701 Substation Alpha) subtitles format.
28702
28703 The filter accepts the following options:
28704
28705 filename, f
28706 Set the filename of the subtitle file to read. It must be
28707 specified.
28708
28709 original_size
28710 Specify the size of the original video, the video for which the ASS
28711 file was composed. For the syntax of this option, check the "Video
28712 size" section in the ffmpeg-utils manual. Due to a misdesign in
28713 ASS aspect ratio arithmetic, this is necessary to correctly scale
28714 the fonts if the aspect ratio has been changed.
28715
28716 fontsdir
28717 Set a directory path containing fonts that can be used by the
28718 filter. These fonts will be used in addition to whatever the font
28719 provider uses.
28720
28721 alpha
28722 Process alpha channel, by default alpha channel is untouched.
28723
28724 charenc
28725 Set subtitles input character encoding. "subtitles" filter only.
28726 Only useful if not UTF-8.
28727
28728 stream_index, si
28729 Set subtitles stream index. "subtitles" filter only.
28730
28731 force_style
28732 Override default style or script info parameters of the subtitles.
28733 It accepts a string containing ASS style format "KEY=VALUE" couples
28734 separated by ",".
28735
28736 If the first key is not specified, it is assumed that the first value
28737 specifies the filename.
28738
28739 For example, to render the file sub.srt on top of the input video, use
28740 the command:
28741
28742 subtitles=sub.srt
28743
28744 which is equivalent to:
28745
28746 subtitles=filename=sub.srt
28747
28748 To render the default subtitles stream from file video.mkv, use:
28749
28750 subtitles=video.mkv
28751
28752 To render the second subtitles stream from that file, use:
28753
28754 subtitles=video.mkv:si=1
28755
28756 To make the subtitles stream from sub.srt appear in 80% transparent
28757 blue "DejaVu Serif", use:
28758
28759 subtitles=sub.srt:force_style='Fontname=DejaVu Serif,PrimaryColour=&HCCFF0000'
28760
28761 super2xsai
28762 Scale the input by 2x and smooth using the Super2xSaI (Scale and
28763 Interpolate) pixel art scaling algorithm.
28764
28765 Useful for enlarging pixel art images without reducing sharpness.
28766
28767 swaprect
28768 Swap two rectangular objects in video.
28769
28770 This filter accepts the following options:
28771
28772 w Set object width.
28773
28774 h Set object height.
28775
28776 x1 Set 1st rect x coordinate.
28777
28778 y1 Set 1st rect y coordinate.
28779
28780 x2 Set 2nd rect x coordinate.
28781
28782 y2 Set 2nd rect y coordinate.
28783
28784 All expressions are evaluated once for each frame.
28785
28786 The all options are expressions containing the following constants:
28787
28788 w
28789 h The input width and height.
28790
28791 a same as w / h
28792
28793 sar input sample aspect ratio
28794
28795 dar input display aspect ratio, it is the same as (w / h) * sar
28796
28797 n The number of the input frame, starting from 0.
28798
28799 t The timestamp expressed in seconds. It's NAN if the input timestamp
28800 is unknown.
28801
28802 pos the position in the file of the input frame, NAN if unknown
28803
28804 Commands
28805
28806 This filter supports the all above options as commands.
28807
28808 swapuv
28809 Swap U & V plane.
28810
28811 tblend
28812 Blend successive video frames.
28813
28814 See blend
28815
28816 telecine
28817 Apply telecine process to the video.
28818
28819 This filter accepts the following options:
28820
28821 first_field
28822 top, t
28823 top field first
28824
28825 bottom, b
28826 bottom field first The default value is "top".
28827
28828 pattern
28829 A string of numbers representing the pulldown pattern you wish to
28830 apply. The default value is 23.
28831
28832 Some typical patterns:
28833
28834 NTSC output (30i):
28835 27.5p: 32222
28836 24p: 23 (classic)
28837 24p: 2332 (preferred)
28838 20p: 33
28839 18p: 334
28840 16p: 3444
28841
28842 PAL output (25i):
28843 27.5p: 12222
28844 24p: 222222222223 ("Euro pulldown")
28845 16.67p: 33
28846 16p: 33333334
28847
28848 thistogram
28849 Compute and draw a color distribution histogram for the input video
28850 across time.
28851
28852 Unlike histogram video filter which only shows histogram of single
28853 input frame at certain time, this filter shows also past histograms of
28854 number of frames defined by "width" option.
28855
28856 The computed histogram is a representation of the color component
28857 distribution in an image.
28858
28859 The filter accepts the following options:
28860
28861 width, w
28862 Set width of single color component output. Default value is 0.
28863 Value of 0 means width will be picked from input video. This also
28864 set number of passed histograms to keep. Allowed range is [0,
28865 8192].
28866
28867 display_mode, d
28868 Set display mode. It accepts the following values:
28869
28870 stack
28871 Per color component graphs are placed below each other.
28872
28873 parade
28874 Per color component graphs are placed side by side.
28875
28876 overlay
28877 Presents information identical to that in the "parade", except
28878 that the graphs representing color components are superimposed
28879 directly over one another.
28880
28881 Default is "stack".
28882
28883 levels_mode, m
28884 Set mode. Can be either "linear", or "logarithmic". Default is
28885 "linear".
28886
28887 components, c
28888 Set what color components to display. Default is 7.
28889
28890 bgopacity, b
28891 Set background opacity. Default is 0.9.
28892
28893 envelope, e
28894 Show envelope. Default is disabled.
28895
28896 ecolor, ec
28897 Set envelope color. Default is "gold".
28898
28899 slide
28900 Set slide mode.
28901
28902 Available values for slide is:
28903
28904 frame
28905 Draw new frame when right border is reached.
28906
28907 replace
28908 Replace old columns with new ones.
28909
28910 scroll
28911 Scroll from right to left.
28912
28913 rscroll
28914 Scroll from left to right.
28915
28916 picture
28917 Draw single picture.
28918
28919 Default is "replace".
28920
28921 threshold
28922 Apply threshold effect to video stream.
28923
28924 This filter needs four video streams to perform thresholding. First
28925 stream is stream we are filtering. Second stream is holding threshold
28926 values, third stream is holding min values, and last, fourth stream is
28927 holding max values.
28928
28929 The filter accepts the following option:
28930
28931 planes
28932 Set which planes will be processed, unprocessed planes will be
28933 copied. By default value 0xf, all planes will be processed.
28934
28935 For example if first stream pixel's component value is less then
28936 threshold value of pixel component from 2nd threshold stream, third
28937 stream value will picked, otherwise fourth stream pixel component value
28938 will be picked.
28939
28940 Using color source filter one can perform various types of
28941 thresholding:
28942
28943 Commands
28944
28945 This filter supports the all options as commands.
28946
28947 Examples
28948
28949 • Binary threshold, using gray color as threshold:
28950
28951 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi
28952
28953 • Inverted binary threshold, using gray color as threshold:
28954
28955 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi
28956
28957 • Truncate binary threshold, using gray color as threshold:
28958
28959 ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
28960
28961 • Threshold to zero, using gray color as threshold:
28962
28963 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
28964
28965 • Inverted threshold to zero, using gray color as threshold:
28966
28967 ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
28968
28969 thumbnail
28970 Select the most representative frame in a given sequence of consecutive
28971 frames.
28972
28973 The filter accepts the following options:
28974
28975 n Set the frames batch size to analyze; in a set of n frames, the
28976 filter will pick one of them, and then handle the next batch of n
28977 frames until the end. Default is 100.
28978
28979 log Set the log level to display picked frame stats. Default is
28980 "info".
28981
28982 Since the filter keeps track of the whole frames sequence, a bigger n
28983 value will result in a higher memory usage, so a high value is not
28984 recommended.
28985
28986 Examples
28987
28988 • Extract one picture each 50 frames:
28989
28990 thumbnail=50
28991
28992 • Complete example of a thumbnail creation with ffmpeg:
28993
28994 ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
28995
28996 tile
28997 Tile several successive frames together.
28998
28999 The untile filter can do the reverse.
29000
29001 The filter accepts the following options:
29002
29003 layout
29004 Set the grid size in the form "COLUMNSxROWS". Range is upto
29005 UINT_MAX cells. Default is "6x5".
29006
29007 nb_frames
29008 Set the maximum number of frames to render in the given area. It
29009 must be less than or equal to wxh. The default value is 0, meaning
29010 all the area will be used.
29011
29012 margin
29013 Set the outer border margin in pixels. Range is 0 to 1024. Default
29014 is 0.
29015
29016 padding
29017 Set the inner border thickness (i.e. the number of pixels between
29018 frames). For more advanced padding options (such as having
29019 different values for the edges), refer to the pad video filter.
29020 Range is 0 to 1024. Default is 0.
29021
29022 color
29023 Specify the color of the unused area. For the syntax of this
29024 option, check the "Color" section in the ffmpeg-utils manual. The
29025 default value of color is "black".
29026
29027 overlap
29028 Set the number of frames to overlap when tiling several successive
29029 frames together. The value must be between 0 and nb_frames - 1.
29030 Default is 0.
29031
29032 init_padding
29033 Set the number of frames to initially be empty before displaying
29034 first output frame. This controls how soon will one get first
29035 output frame. The value must be between 0 and nb_frames - 1.
29036 Default is 0.
29037
29038 Examples
29039
29040 • Produce 8x8 PNG tiles of all keyframes (-skip_frame nokey) in a
29041 movie:
29042
29043 ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
29044
29045 The -vsync 0 is necessary to prevent ffmpeg from duplicating each
29046 output frame to accommodate the originally detected frame rate.
29047
29048 • Display 5 pictures in an area of "3x2" frames, with 7 pixels
29049 between them, and 2 pixels of initial margin, using mixed flat and
29050 named options:
29051
29052 tile=3x2:nb_frames=5:padding=7:margin=2
29053
29054 tinterlace
29055 Perform various types of temporal field interlacing.
29056
29057 Frames are counted starting from 1, so the first input frame is
29058 considered odd.
29059
29060 The filter accepts the following options:
29061
29062 mode
29063 Specify the mode of the interlacing. This option can also be
29064 specified as a value alone. See below for a list of values for this
29065 option.
29066
29067 Available values are:
29068
29069 merge, 0
29070 Move odd frames into the upper field, even into the lower
29071 field, generating a double height frame at half frame rate.
29072
29073 ------> time
29074 Input:
29075 Frame 1 Frame 2 Frame 3 Frame 4
29076
29077 11111 22222 33333 44444
29078 11111 22222 33333 44444
29079 11111 22222 33333 44444
29080 11111 22222 33333 44444
29081
29082 Output:
29083 11111 33333
29084 22222 44444
29085 11111 33333
29086 22222 44444
29087 11111 33333
29088 22222 44444
29089 11111 33333
29090 22222 44444
29091
29092 drop_even, 1
29093 Only output odd frames, even frames are dropped, generating a
29094 frame with unchanged height at half frame rate.
29095
29096 ------> time
29097 Input:
29098 Frame 1 Frame 2 Frame 3 Frame 4
29099
29100 11111 22222 33333 44444
29101 11111 22222 33333 44444
29102 11111 22222 33333 44444
29103 11111 22222 33333 44444
29104
29105 Output:
29106 11111 33333
29107 11111 33333
29108 11111 33333
29109 11111 33333
29110
29111 drop_odd, 2
29112 Only output even frames, odd frames are dropped, generating a
29113 frame with unchanged height at half frame rate.
29114
29115 ------> time
29116 Input:
29117 Frame 1 Frame 2 Frame 3 Frame 4
29118
29119 11111 22222 33333 44444
29120 11111 22222 33333 44444
29121 11111 22222 33333 44444
29122 11111 22222 33333 44444
29123
29124 Output:
29125 22222 44444
29126 22222 44444
29127 22222 44444
29128 22222 44444
29129
29130 pad, 3
29131 Expand each frame to full height, but pad alternate lines with
29132 black, generating a frame with double height at the same input
29133 frame rate.
29134
29135 ------> time
29136 Input:
29137 Frame 1 Frame 2 Frame 3 Frame 4
29138
29139 11111 22222 33333 44444
29140 11111 22222 33333 44444
29141 11111 22222 33333 44444
29142 11111 22222 33333 44444
29143
29144 Output:
29145 11111 ..... 33333 .....
29146 ..... 22222 ..... 44444
29147 11111 ..... 33333 .....
29148 ..... 22222 ..... 44444
29149 11111 ..... 33333 .....
29150 ..... 22222 ..... 44444
29151 11111 ..... 33333 .....
29152 ..... 22222 ..... 44444
29153
29154 interleave_top, 4
29155 Interleave the upper field from odd frames with the lower field
29156 from even frames, generating a frame with unchanged height at
29157 half frame rate.
29158
29159 ------> time
29160 Input:
29161 Frame 1 Frame 2 Frame 3 Frame 4
29162
29163 11111<- 22222 33333<- 44444
29164 11111 22222<- 33333 44444<-
29165 11111<- 22222 33333<- 44444
29166 11111 22222<- 33333 44444<-
29167
29168 Output:
29169 11111 33333
29170 22222 44444
29171 11111 33333
29172 22222 44444
29173
29174 interleave_bottom, 5
29175 Interleave the lower field from odd frames with the upper field
29176 from even frames, generating a frame with unchanged height at
29177 half frame rate.
29178
29179 ------> time
29180 Input:
29181 Frame 1 Frame 2 Frame 3 Frame 4
29182
29183 11111 22222<- 33333 44444<-
29184 11111<- 22222 33333<- 44444
29185 11111 22222<- 33333 44444<-
29186 11111<- 22222 33333<- 44444
29187
29188 Output:
29189 22222 44444
29190 11111 33333
29191 22222 44444
29192 11111 33333
29193
29194 interlacex2, 6
29195 Double frame rate with unchanged height. Frames are inserted
29196 each containing the second temporal field from the previous
29197 input frame and the first temporal field from the next input
29198 frame. This mode relies on the top_field_first flag. Useful for
29199 interlaced video displays with no field synchronisation.
29200
29201 ------> time
29202 Input:
29203 Frame 1 Frame 2 Frame 3 Frame 4
29204
29205 11111 22222 33333 44444
29206 11111 22222 33333 44444
29207 11111 22222 33333 44444
29208 11111 22222 33333 44444
29209
29210 Output:
29211 11111 22222 22222 33333 33333 44444 44444
29212 11111 11111 22222 22222 33333 33333 44444
29213 11111 22222 22222 33333 33333 44444 44444
29214 11111 11111 22222 22222 33333 33333 44444
29215
29216 mergex2, 7
29217 Move odd frames into the upper field, even into the lower
29218 field, generating a double height frame at same frame rate.
29219
29220 ------> time
29221 Input:
29222 Frame 1 Frame 2 Frame 3 Frame 4
29223
29224 11111 22222 33333 44444
29225 11111 22222 33333 44444
29226 11111 22222 33333 44444
29227 11111 22222 33333 44444
29228
29229 Output:
29230 11111 33333 33333 55555
29231 22222 22222 44444 44444
29232 11111 33333 33333 55555
29233 22222 22222 44444 44444
29234 11111 33333 33333 55555
29235 22222 22222 44444 44444
29236 11111 33333 33333 55555
29237 22222 22222 44444 44444
29238
29239 Numeric values are deprecated but are accepted for backward
29240 compatibility reasons.
29241
29242 Default mode is "merge".
29243
29244 flags
29245 Specify flags influencing the filter process.
29246
29247 Available value for flags is:
29248
29249 low_pass_filter, vlpf
29250 Enable linear vertical low-pass filtering in the filter.
29251 Vertical low-pass filtering is required when creating an
29252 interlaced destination from a progressive source which contains
29253 high-frequency vertical detail. Filtering will reduce interlace
29254 'twitter' and Moire patterning.
29255
29256 complex_filter, cvlpf
29257 Enable complex vertical low-pass filtering. This will slightly
29258 less reduce interlace 'twitter' and Moire patterning but better
29259 retain detail and subjective sharpness impression.
29260
29261 bypass_il
29262 Bypass already interlaced frames, only adjust the frame rate.
29263
29264 Vertical low-pass filtering and bypassing already interlaced frames
29265 can only be enabled for mode interleave_top and interleave_bottom.
29266
29267 tmedian
29268 Pick median pixels from several successive input video frames.
29269
29270 The filter accepts the following options:
29271
29272 radius
29273 Set radius of median filter. Default is 1. Allowed range is from 1
29274 to 127.
29275
29276 planes
29277 Set which planes to filter. Default value is 15, by which all
29278 planes are processed.
29279
29280 percentile
29281 Set median percentile. Default value is 0.5. Default value of 0.5
29282 will pick always median values, while 0 will pick minimum values,
29283 and 1 maximum values.
29284
29285 Commands
29286
29287 This filter supports all above options as commands, excluding option
29288 "radius".
29289
29290 tmidequalizer
29291 Apply Temporal Midway Video Equalization effect.
29292
29293 Midway Video Equalization adjusts a sequence of video frames to have
29294 the same histograms, while maintaining their dynamics as much as
29295 possible. It's useful for e.g. matching exposures from a video frames
29296 sequence.
29297
29298 This filter accepts the following option:
29299
29300 radius
29301 Set filtering radius. Default is 5. Allowed range is from 1 to 127.
29302
29303 sigma
29304 Set filtering sigma. Default is 0.5. This controls strength of
29305 filtering. Setting this option to 0 effectively does nothing.
29306
29307 planes
29308 Set which planes to process. Default is 15, which is all available
29309 planes.
29310
29311 tmix
29312 Mix successive video frames.
29313
29314 A description of the accepted options follows.
29315
29316 frames
29317 The number of successive frames to mix. If unspecified, it defaults
29318 to 3.
29319
29320 weights
29321 Specify weight of each input video frame. Each weight is separated
29322 by space. If number of weights is smaller than number of frames
29323 last specified weight will be used for all remaining unset weights.
29324
29325 scale
29326 Specify scale, if it is set it will be multiplied with sum of each
29327 weight multiplied with pixel values to give final destination pixel
29328 value. By default scale is auto scaled to sum of weights.
29329
29330 planes
29331 Set which planes to filter. Default is all. Allowed range is from 0
29332 to 15.
29333
29334 Examples
29335
29336 • Average 7 successive frames:
29337
29338 tmix=frames=7:weights="1 1 1 1 1 1 1"
29339
29340 • Apply simple temporal convolution:
29341
29342 tmix=frames=3:weights="-1 3 -1"
29343
29344 • Similar as above but only showing temporal differences:
29345
29346 tmix=frames=3:weights="-1 2 -1":scale=1
29347
29348 Commands
29349
29350 This filter supports the following commands:
29351
29352 weights
29353 scale
29354 planes
29355 Syntax is same as option with same name.
29356
29357 tonemap
29358 Tone map colors from different dynamic ranges.
29359
29360 This filter expects data in single precision floating point, as it
29361 needs to operate on (and can output) out-of-range values. Another
29362 filter, such as zscale, is needed to convert the resulting frame to a
29363 usable format.
29364
29365 The tonemapping algorithms implemented only work on linear light, so
29366 input data should be linearized beforehand (and possibly correctly
29367 tagged).
29368
29369 ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
29370
29371 Options
29372
29373 The filter accepts the following options.
29374
29375 tonemap
29376 Set the tone map algorithm to use.
29377
29378 Possible values are:
29379
29380 none
29381 Do not apply any tone map, only desaturate overbright pixels.
29382
29383 clip
29384 Hard-clip any out-of-range values. Use it for perfect color
29385 accuracy for in-range values, while distorting out-of-range
29386 values.
29387
29388 linear
29389 Stretch the entire reference gamut to a linear multiple of the
29390 display.
29391
29392 gamma
29393 Fit a logarithmic transfer between the tone curves.
29394
29395 reinhard
29396 Preserve overall image brightness with a simple curve, using
29397 nonlinear contrast, which results in flattening details and
29398 degrading color accuracy.
29399
29400 hable
29401 Preserve both dark and bright details better than reinhard, at
29402 the cost of slightly darkening everything. Use it when detail
29403 preservation is more important than color and brightness
29404 accuracy.
29405
29406 mobius
29407 Smoothly map out-of-range values, while retaining contrast and
29408 colors for in-range material as much as possible. Use it when
29409 color accuracy is more important than detail preservation.
29410
29411 Default is none.
29412
29413 param
29414 Tune the tone mapping algorithm.
29415
29416 This affects the following algorithms:
29417
29418 none
29419 Ignored.
29420
29421 linear
29422 Specifies the scale factor to use while stretching. Default to
29423 1.0.
29424
29425 gamma
29426 Specifies the exponent of the function. Default to 1.8.
29427
29428 clip
29429 Specify an extra linear coefficient to multiply into the signal
29430 before clipping. Default to 1.0.
29431
29432 reinhard
29433 Specify the local contrast coefficient at the display peak.
29434 Default to 0.5, which means that in-gamut values will be about
29435 half as bright as when clipping.
29436
29437 hable
29438 Ignored.
29439
29440 mobius
29441 Specify the transition point from linear to mobius transform.
29442 Every value below this point is guaranteed to be mapped 1:1.
29443 The higher the value, the more accurate the result will be, at
29444 the cost of losing bright details. Default to 0.3, which due
29445 to the steep initial slope still preserves in-range colors
29446 fairly accurately.
29447
29448 desat
29449 Apply desaturation for highlights that exceed this level of
29450 brightness. The higher the parameter, the more color information
29451 will be preserved. This setting helps prevent unnaturally blown-out
29452 colors for super-highlights, by (smoothly) turning into white
29453 instead. This makes images feel more natural, at the cost of
29454 reducing information about out-of-range colors.
29455
29456 The default of 2.0 is somewhat conservative and will mostly just
29457 apply to skies or directly sunlit surfaces. A setting of 0.0
29458 disables this option.
29459
29460 This option works only if the input frame has a supported color
29461 tag.
29462
29463 peak
29464 Override signal/nominal/reference peak with this value. Useful when
29465 the embedded peak information in display metadata is not reliable
29466 or when tone mapping from a lower range to a higher range.
29467
29468 tpad
29469 Temporarily pad video frames.
29470
29471 The filter accepts the following options:
29472
29473 start
29474 Specify number of delay frames before input video stream. Default
29475 is 0.
29476
29477 stop
29478 Specify number of padding frames after input video stream. Set to
29479 -1 to pad indefinitely. Default is 0.
29480
29481 start_mode
29482 Set kind of frames added to beginning of stream. Can be either add
29483 or clone. With add frames of solid-color are added. With clone
29484 frames are clones of first frame. Default is add.
29485
29486 stop_mode
29487 Set kind of frames added to end of stream. Can be either add or
29488 clone. With add frames of solid-color are added. With clone
29489 frames are clones of last frame. Default is add.
29490
29491 start_duration, stop_duration
29492 Specify the duration of the start/stop delay. See the Time duration
29493 section in the ffmpeg-utils(1) manual for the accepted syntax.
29494 These options override start and stop. Default is 0.
29495
29496 color
29497 Specify the color of the padded area. For the syntax of this
29498 option, check the "Color" section in the ffmpeg-utils manual.
29499
29500 The default value of color is "black".
29501
29502 transpose
29503 Transpose rows with columns in the input video and optionally flip it.
29504
29505 It accepts the following parameters:
29506
29507 dir Specify the transposition direction.
29508
29509 Can assume the following values:
29510
29511 0, 4, cclock_flip
29512 Rotate by 90 degrees counterclockwise and vertically flip
29513 (default), that is:
29514
29515 L.R L.l
29516 . . -> . .
29517 l.r R.r
29518
29519 1, 5, clock
29520 Rotate by 90 degrees clockwise, that is:
29521
29522 L.R l.L
29523 . . -> . .
29524 l.r r.R
29525
29526 2, 6, cclock
29527 Rotate by 90 degrees counterclockwise, that is:
29528
29529 L.R R.r
29530 . . -> . .
29531 l.r L.l
29532
29533 3, 7, clock_flip
29534 Rotate by 90 degrees clockwise and vertically flip, that is:
29535
29536 L.R r.R
29537 . . -> . .
29538 l.r l.L
29539
29540 For values between 4-7, the transposition is only done if the input
29541 video geometry is portrait and not landscape. These values are
29542 deprecated, the "passthrough" option should be used instead.
29543
29544 Numerical values are deprecated, and should be dropped in favor of
29545 symbolic constants.
29546
29547 passthrough
29548 Do not apply the transposition if the input geometry matches the
29549 one specified by the specified value. It accepts the following
29550 values:
29551
29552 none
29553 Always apply transposition.
29554
29555 portrait
29556 Preserve portrait geometry (when height >= width).
29557
29558 landscape
29559 Preserve landscape geometry (when width >= height).
29560
29561 Default value is "none".
29562
29563 For example to rotate by 90 degrees clockwise and preserve portrait
29564 layout:
29565
29566 transpose=dir=1:passthrough=portrait
29567
29568 The command above can also be specified as:
29569
29570 transpose=1:portrait
29571
29572 transpose_npp
29573 Transpose rows with columns in the input video and optionally flip it.
29574 For more in depth examples see the transpose video filter, which shares
29575 mostly the same options.
29576
29577 It accepts the following parameters:
29578
29579 dir Specify the transposition direction.
29580
29581 Can assume the following values:
29582
29583 cclock_flip
29584 Rotate by 90 degrees counterclockwise and vertically flip.
29585 (default)
29586
29587 clock
29588 Rotate by 90 degrees clockwise.
29589
29590 cclock
29591 Rotate by 90 degrees counterclockwise.
29592
29593 clock_flip
29594 Rotate by 90 degrees clockwise and vertically flip.
29595
29596 passthrough
29597 Do not apply the transposition if the input geometry matches the
29598 one specified by the specified value. It accepts the following
29599 values:
29600
29601 none
29602 Always apply transposition. (default)
29603
29604 portrait
29605 Preserve portrait geometry (when height >= width).
29606
29607 landscape
29608 Preserve landscape geometry (when width >= height).
29609
29610 trim
29611 Trim the input so that the output contains one continuous subpart of
29612 the input.
29613
29614 It accepts the following parameters:
29615
29616 start
29617 Specify the time of the start of the kept section, i.e. the frame
29618 with the timestamp start will be the first frame in the output.
29619
29620 end Specify the time of the first frame that will be dropped, i.e. the
29621 frame immediately preceding the one with the timestamp end will be
29622 the last frame in the output.
29623
29624 start_pts
29625 This is the same as start, except this option sets the start
29626 timestamp in timebase units instead of seconds.
29627
29628 end_pts
29629 This is the same as end, except this option sets the end timestamp
29630 in timebase units instead of seconds.
29631
29632 duration
29633 The maximum duration of the output in seconds.
29634
29635 start_frame
29636 The number of the first frame that should be passed to the output.
29637
29638 end_frame
29639 The number of the first frame that should be dropped.
29640
29641 start, end, and duration are expressed as time duration specifications;
29642 see the Time duration section in the ffmpeg-utils(1) manual for the
29643 accepted syntax.
29644
29645 Note that the first two sets of the start/end options and the duration
29646 option look at the frame timestamp, while the _frame variants simply
29647 count the frames that pass through the filter. Also note that this
29648 filter does not modify the timestamps. If you wish for the output
29649 timestamps to start at zero, insert a setpts filter after the trim
29650 filter.
29651
29652 If multiple start or end options are set, this filter tries to be
29653 greedy and keep all the frames that match at least one of the specified
29654 constraints. To keep only the part that matches all the constraints at
29655 once, chain multiple trim filters.
29656
29657 The defaults are such that all the input is kept. So it is possible to
29658 set e.g. just the end values to keep everything before the specified
29659 time.
29660
29661 Examples:
29662
29663 • Drop everything except the second minute of input:
29664
29665 ffmpeg -i INPUT -vf trim=60:120
29666
29667 • Keep only the first second:
29668
29669 ffmpeg -i INPUT -vf trim=duration=1
29670
29671 unpremultiply
29672 Apply alpha unpremultiply effect to input video stream using first
29673 plane of second stream as alpha.
29674
29675 Both streams must have same dimensions and same pixel format.
29676
29677 The filter accepts the following option:
29678
29679 planes
29680 Set which planes will be processed, unprocessed planes will be
29681 copied. By default value 0xf, all planes will be processed.
29682
29683 If the format has 1 or 2 components, then luma is bit 0. If the
29684 format has 3 or 4 components: for RGB formats bit 0 is green, bit 1
29685 is blue and bit 2 is red; for YUV formats bit 0 is luma, bit 1 is
29686 chroma-U and bit 2 is chroma-V. If present, the alpha channel is
29687 always the last bit.
29688
29689 inplace
29690 Do not require 2nd input for processing, instead use alpha plane
29691 from input stream.
29692
29693 unsharp
29694 Sharpen or blur the input video.
29695
29696 It accepts the following parameters:
29697
29698 luma_msize_x, lx
29699 Set the luma matrix horizontal size. It must be an odd integer
29700 between 3 and 23. The default value is 5.
29701
29702 luma_msize_y, ly
29703 Set the luma matrix vertical size. It must be an odd integer
29704 between 3 and 23. The default value is 5.
29705
29706 luma_amount, la
29707 Set the luma effect strength. It must be a floating point number,
29708 reasonable values lay between -1.5 and 1.5.
29709
29710 Negative values will blur the input video, while positive values
29711 will sharpen it, a value of zero will disable the effect.
29712
29713 Default value is 1.0.
29714
29715 chroma_msize_x, cx
29716 Set the chroma matrix horizontal size. It must be an odd integer
29717 between 3 and 23. The default value is 5.
29718
29719 chroma_msize_y, cy
29720 Set the chroma matrix vertical size. It must be an odd integer
29721 between 3 and 23. The default value is 5.
29722
29723 chroma_amount, ca
29724 Set the chroma effect strength. It must be a floating point number,
29725 reasonable values lay between -1.5 and 1.5.
29726
29727 Negative values will blur the input video, while positive values
29728 will sharpen it, a value of zero will disable the effect.
29729
29730 Default value is 0.0.
29731
29732 alpha_msize_x, ax
29733 Set the alpha matrix horizontal size. It must be an odd integer
29734 between 3 and 23. The default value is 5.
29735
29736 alpha_msize_y, ay
29737 Set the alpha matrix vertical size. It must be an odd integer
29738 between 3 and 23. The default value is 5.
29739
29740 alpha_amount, aa
29741 Set the alpha effect strength. It must be a floating point number,
29742 reasonable values lay between -1.5 and 1.5.
29743
29744 Negative values will blur the input video, while positive values
29745 will sharpen it, a value of zero will disable the effect.
29746
29747 Default value is 0.0.
29748
29749 All parameters are optional and default to the equivalent of the string
29750 '5:5:1.0:5:5:0.0'.
29751
29752 Examples
29753
29754 • Apply strong luma sharpen effect:
29755
29756 unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
29757
29758 • Apply a strong blur of both luma and chroma parameters:
29759
29760 unsharp=7:7:-2:7:7:-2
29761
29762 untile
29763 Decompose a video made of tiled images into the individual images.
29764
29765 The frame rate of the output video is the frame rate of the input video
29766 multiplied by the number of tiles.
29767
29768 This filter does the reverse of tile.
29769
29770 The filter accepts the following options:
29771
29772 layout
29773 Set the grid size (i.e. the number of lines and columns). For the
29774 syntax of this option, check the "Video size" section in the
29775 ffmpeg-utils manual.
29776
29777 Examples
29778
29779 • Produce a 1-second video from a still image file made of 25 frames
29780 stacked vertically, like an analogic film reel:
29781
29782 ffmpeg -r 1 -i image.jpg -vf untile=1x25 movie.mkv
29783
29784 uspp
29785 Apply ultra slow/simple postprocessing filter that compresses and
29786 decompresses the image at several (or - in the case of quality level 8
29787 - all) shifts and average the results.
29788
29789 The way this differs from the behavior of spp is that uspp actually
29790 encodes & decodes each case with libavcodec Snow, whereas spp uses a
29791 simplified intra only 8x8 DCT similar to MJPEG.
29792
29793 This filter is only available in ffmpeg version 4.4 or earlier.
29794
29795 The filter accepts the following options:
29796
29797 quality
29798 Set quality. This option defines the number of levels for
29799 averaging. It accepts an integer in the range 0-8. If set to 0, the
29800 filter will have no effect. A value of 8 means the higher quality.
29801 For each increment of that value the speed drops by a factor of
29802 approximately 2. Default value is 3.
29803
29804 qp Force a constant quantization parameter. If not set, the filter
29805 will use the QP from the video stream (if available).
29806
29807 v360
29808 Convert 360 videos between various formats.
29809
29810 The filter accepts the following options:
29811
29812 input
29813 output
29814 Set format of the input/output video.
29815
29816 Available formats:
29817
29818 e
29819 equirect
29820 Equirectangular projection.
29821
29822 c3x2
29823 c6x1
29824 c1x6
29825 Cubemap with 3x2/6x1/1x6 layout.
29826
29827 Format specific options:
29828
29829 in_pad
29830 out_pad
29831 Set padding proportion for the input/output cubemap. Values
29832 in decimals.
29833
29834 Example values:
29835
29836 0 No padding.
29837
29838 0.01
29839 1% of face is padding. For example, with 1920x1280
29840 resolution face size would be 640x640 and padding would
29841 be 3 pixels from each side. (640 * 0.01 = 6 pixels)
29842
29843 Default value is @samp{0}. Maximum value is @samp{0.1}.
29844
29845 fin_pad
29846 fout_pad
29847 Set fixed padding for the input/output cubemap. Values in
29848 pixels.
29849
29850 Default value is @samp{0}. If greater than zero it
29851 overrides other padding options.
29852
29853 in_forder
29854 out_forder
29855 Set order of faces for the input/output cubemap. Choose one
29856 direction for each position.
29857
29858 Designation of directions:
29859
29860 r right
29861
29862 l left
29863
29864 u up
29865
29866 d down
29867
29868 f forward
29869
29870 b back
29871
29872 Default value is @samp{rludfb}.
29873
29874 in_frot
29875 out_frot
29876 Set rotation of faces for the input/output cubemap. Choose
29877 one angle for each position.
29878
29879 Designation of angles:
29880
29881 0 0 degrees clockwise
29882
29883 1 90 degrees clockwise
29884
29885 2 180 degrees clockwise
29886
29887 3 270 degrees clockwise
29888
29889 Default value is @samp{000000}.
29890
29891 eac Equi-Angular Cubemap.
29892
29893 flat
29894 gnomonic
29895 rectilinear
29896 Regular video.
29897
29898 Format specific options:
29899
29900 h_fov
29901 v_fov
29902 d_fov
29903 Set output horizontal/vertical/diagonal field of view.
29904 Values in degrees.
29905
29906 If diagonal field of view is set it overrides horizontal
29907 and vertical field of view.
29908
29909 ih_fov
29910 iv_fov
29911 id_fov
29912 Set input horizontal/vertical/diagonal field of view.
29913 Values in degrees.
29914
29915 If diagonal field of view is set it overrides horizontal
29916 and vertical field of view.
29917
29918 dfisheye
29919 Dual fisheye.
29920
29921 Format specific options:
29922
29923 h_fov
29924 v_fov
29925 d_fov
29926 Set output horizontal/vertical/diagonal field of view.
29927 Values in degrees.
29928
29929 If diagonal field of view is set it overrides horizontal
29930 and vertical field of view.
29931
29932 ih_fov
29933 iv_fov
29934 id_fov
29935 Set input horizontal/vertical/diagonal field of view.
29936 Values in degrees.
29937
29938 If diagonal field of view is set it overrides horizontal
29939 and vertical field of view.
29940
29941 barrel
29942 fb
29943 barrelsplit
29944 Facebook's 360 formats.
29945
29946 sg Stereographic format.
29947
29948 Format specific options:
29949
29950 h_fov
29951 v_fov
29952 d_fov
29953 Set output horizontal/vertical/diagonal field of view.
29954 Values in degrees.
29955
29956 If diagonal field of view is set it overrides horizontal
29957 and vertical field of view.
29958
29959 ih_fov
29960 iv_fov
29961 id_fov
29962 Set input horizontal/vertical/diagonal field of view.
29963 Values in degrees.
29964
29965 If diagonal field of view is set it overrides horizontal
29966 and vertical field of view.
29967
29968 mercator
29969 Mercator format.
29970
29971 ball
29972 Ball format, gives significant distortion toward the back.
29973
29974 hammer
29975 Hammer-Aitoff map projection format.
29976
29977 sinusoidal
29978 Sinusoidal map projection format.
29979
29980 fisheye
29981 Fisheye projection.
29982
29983 Format specific options:
29984
29985 h_fov
29986 v_fov
29987 d_fov
29988 Set output horizontal/vertical/diagonal field of view.
29989 Values in degrees.
29990
29991 If diagonal field of view is set it overrides horizontal
29992 and vertical field of view.
29993
29994 ih_fov
29995 iv_fov
29996 id_fov
29997 Set input horizontal/vertical/diagonal field of view.
29998 Values in degrees.
29999
30000 If diagonal field of view is set it overrides horizontal
30001 and vertical field of view.
30002
30003 pannini
30004 Pannini projection.
30005
30006 Format specific options:
30007
30008 h_fov
30009 Set output pannini parameter.
30010
30011 ih_fov
30012 Set input pannini parameter.
30013
30014 cylindrical
30015 Cylindrical projection.
30016
30017 Format specific options:
30018
30019 h_fov
30020 v_fov
30021 d_fov
30022 Set output horizontal/vertical/diagonal field of view.
30023 Values in degrees.
30024
30025 If diagonal field of view is set it overrides horizontal
30026 and vertical field of view.
30027
30028 ih_fov
30029 iv_fov
30030 id_fov
30031 Set input horizontal/vertical/diagonal field of view.
30032 Values in degrees.
30033
30034 If diagonal field of view is set it overrides horizontal
30035 and vertical field of view.
30036
30037 perspective
30038 Perspective projection. (output only)
30039
30040 Format specific options:
30041
30042 v_fov
30043 Set perspective parameter.
30044
30045 tetrahedron
30046 Tetrahedron projection.
30047
30048 tsp Truncated square pyramid projection.
30049
30050 he
30051 hequirect
30052 Half equirectangular projection.
30053
30054 equisolid
30055 Equisolid format.
30056
30057 Format specific options:
30058
30059 h_fov
30060 v_fov
30061 d_fov
30062 Set output horizontal/vertical/diagonal field of view.
30063 Values in degrees.
30064
30065 If diagonal field of view is set it overrides horizontal
30066 and vertical field of view.
30067
30068 ih_fov
30069 iv_fov
30070 id_fov
30071 Set input horizontal/vertical/diagonal field of view.
30072 Values in degrees.
30073
30074 If diagonal field of view is set it overrides horizontal
30075 and vertical field of view.
30076
30077 og Orthographic format.
30078
30079 Format specific options:
30080
30081 h_fov
30082 v_fov
30083 d_fov
30084 Set output horizontal/vertical/diagonal field of view.
30085 Values in degrees.
30086
30087 If diagonal field of view is set it overrides horizontal
30088 and vertical field of view.
30089
30090 ih_fov
30091 iv_fov
30092 id_fov
30093 Set input horizontal/vertical/diagonal field of view.
30094 Values in degrees.
30095
30096 If diagonal field of view is set it overrides horizontal
30097 and vertical field of view.
30098
30099 octahedron
30100 Octahedron projection.
30101
30102 cylindricalea
30103 Cylindrical Equal Area projection.
30104
30105 interp
30106 Set interpolation method.Note: more complex interpolation methods
30107 require much more memory to run.
30108
30109 Available methods:
30110
30111 near
30112 nearest
30113 Nearest neighbour.
30114
30115 line
30116 linear
30117 Bilinear interpolation.
30118
30119 lagrange9
30120 Lagrange9 interpolation.
30121
30122 cube
30123 cubic
30124 Bicubic interpolation.
30125
30126 lanc
30127 lanczos
30128 Lanczos interpolation.
30129
30130 sp16
30131 spline16
30132 Spline16 interpolation.
30133
30134 gauss
30135 gaussian
30136 Gaussian interpolation.
30137
30138 mitchell
30139 Mitchell interpolation.
30140
30141 Default value is @samp{line}.
30142
30143 w
30144 h Set the output video resolution.
30145
30146 Default resolution depends on formats.
30147
30148 in_stereo
30149 out_stereo
30150 Set the input/output stereo format.
30151
30152 2d 2D mono
30153
30154 sbs Side by side
30155
30156 tb Top bottom
30157
30158 Default value is @samp{2d} for input and output format.
30159
30160 yaw
30161 pitch
30162 roll
30163 Set rotation for the output video. Values in degrees.
30164
30165 rorder
30166 Set rotation order for the output video. Choose one item for each
30167 position.
30168
30169 y, Y
30170 yaw
30171
30172 p, P
30173 pitch
30174
30175 r, R
30176 roll
30177
30178 Default value is @samp{ypr}.
30179
30180 h_flip
30181 v_flip
30182 d_flip
30183 Flip the output video horizontally(swaps
30184 left-right)/vertically(swaps up-down)/in-depth(swaps back-forward).
30185 Boolean values.
30186
30187 ih_flip
30188 iv_flip
30189 Set if input video is flipped horizontally/vertically. Boolean
30190 values.
30191
30192 in_trans
30193 Set if input video is transposed. Boolean value, by default
30194 disabled.
30195
30196 out_trans
30197 Set if output video needs to be transposed. Boolean value, by
30198 default disabled.
30199
30200 h_offset
30201 v_offset
30202 Set output horizontal/vertical off-axis offset. Default is set to
30203 0. Allowed range is from -1 to 1.
30204
30205 alpha_mask
30206 Build mask in alpha plane for all unmapped pixels by marking them
30207 fully transparent. Boolean value, by default disabled.
30208
30209 reset_rot
30210 Reset rotation of output video. Boolean value, by default disabled.
30211
30212 Examples
30213
30214 • Convert equirectangular video to cubemap with 3x2 layout and 1%
30215 padding using bicubic interpolation:
30216
30217 ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
30218
30219 • Extract back view of Equi-Angular Cubemap:
30220
30221 ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
30222
30223 • Convert transposed and horizontally flipped Equi-Angular Cubemap in
30224 side-by-side stereo format to equirectangular top-bottom stereo
30225 format:
30226
30227 v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
30228
30229 Commands
30230
30231 This filter supports subset of above options as commands.
30232
30233 vaguedenoiser
30234 Apply a wavelet based denoiser.
30235
30236 It transforms each frame from the video input into the wavelet domain,
30237 using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
30238 the obtained coefficients. It does an inverse wavelet transform after.
30239 Due to wavelet properties, it should give a nice smoothed result, and
30240 reduced noise, without blurring picture features.
30241
30242 This filter accepts the following options:
30243
30244 threshold
30245 The filtering strength. The higher, the more filtered the video
30246 will be. Hard thresholding can use a higher threshold than soft
30247 thresholding before the video looks overfiltered. Default value is
30248 2.
30249
30250 method
30251 The filtering method the filter will use.
30252
30253 It accepts the following values:
30254
30255 hard
30256 All values under the threshold will be zeroed.
30257
30258 soft
30259 All values under the threshold will be zeroed. All values above
30260 will be reduced by the threshold.
30261
30262 garrote
30263 Scales or nullifies coefficients - intermediary between (more)
30264 soft and (less) hard thresholding.
30265
30266 Default is garrote.
30267
30268 nsteps
30269 Number of times, the wavelet will decompose the picture. Picture
30270 can't be decomposed beyond a particular point (typically, 8 for a
30271 640x480 frame - as 2^9 = 512 > 480). Valid values are integers
30272 between 1 and 32. Default value is 6.
30273
30274 percent
30275 Partial of full denoising (limited coefficients shrinking), from 0
30276 to 100. Default value is 85.
30277
30278 planes
30279 A list of the planes to process. By default all planes are
30280 processed.
30281
30282 type
30283 The threshold type the filter will use.
30284
30285 It accepts the following values:
30286
30287 universal
30288 Threshold used is same for all decompositions.
30289
30290 bayes
30291 Threshold used depends also on each decomposition coefficients.
30292
30293 Default is universal.
30294
30295 varblur
30296 Apply variable blur filter by using 2nd video stream to set blur
30297 radius. The 2nd stream must have the same dimensions.
30298
30299 This filter accepts the following options:
30300
30301 min_r
30302 Set min allowed radius. Allowed range is from 0 to 254. Default is
30303 0.
30304
30305 max_r
30306 Set max allowed radius. Allowed range is from 1 to 255. Default is
30307 8.
30308
30309 planes
30310 Set which planes to process. By default, all are used.
30311
30312 The "varblur" filter also supports the framesync options.
30313
30314 Commands
30315
30316 This filter supports all the above options as commands.
30317
30318 vectorscope
30319 Display 2 color component values in the two dimensional graph (which is
30320 called a vectorscope).
30321
30322 This filter accepts the following options:
30323
30324 mode, m
30325 Set vectorscope mode.
30326
30327 It accepts the following values:
30328
30329 gray
30330 tint
30331 Gray values are displayed on graph, higher brightness means
30332 more pixels have same component color value on location in
30333 graph. This is the default mode.
30334
30335 color
30336 Gray values are displayed on graph. Surrounding pixels values
30337 which are not present in video frame are drawn in gradient of 2
30338 color components which are set by option "x" and "y". The 3rd
30339 color component is static.
30340
30341 color2
30342 Actual color components values present in video frame are
30343 displayed on graph.
30344
30345 color3
30346 Similar as color2 but higher frequency of same values "x" and
30347 "y" on graph increases value of another color component, which
30348 is luminance by default values of "x" and "y".
30349
30350 color4
30351 Actual colors present in video frame are displayed on graph. If
30352 two different colors map to same position on graph then color
30353 with higher value of component not present in graph is picked.
30354
30355 color5
30356 Gray values are displayed on graph. Similar to "color" but with
30357 3rd color component picked from radial gradient.
30358
30359 x Set which color component will be represented on X-axis. Default is
30360 1.
30361
30362 y Set which color component will be represented on Y-axis. Default is
30363 2.
30364
30365 intensity, i
30366 Set intensity, used by modes: gray, color, color3 and color5 for
30367 increasing brightness of color component which represents frequency
30368 of (X, Y) location in graph.
30369
30370 envelope, e
30371 none
30372 No envelope, this is default.
30373
30374 instant
30375 Instant envelope, even darkest single pixel will be clearly
30376 highlighted.
30377
30378 peak
30379 Hold maximum and minimum values presented in graph over time.
30380 This way you can still spot out of range values without
30381 constantly looking at vectorscope.
30382
30383 peak+instant
30384 Peak and instant envelope combined together.
30385
30386 graticule, g
30387 Set what kind of graticule to draw.
30388
30389 none
30390 green
30391 color
30392 invert
30393 opacity, o
30394 Set graticule opacity.
30395
30396 flags, f
30397 Set graticule flags.
30398
30399 white
30400 Draw graticule for white point.
30401
30402 black
30403 Draw graticule for black point.
30404
30405 name
30406 Draw color points short names.
30407
30408 bgopacity, b
30409 Set background opacity.
30410
30411 lthreshold, l
30412 Set low threshold for color component not represented on X or Y
30413 axis. Values lower than this value will be ignored. Default is 0.
30414 Note this value is multiplied with actual max possible value one
30415 pixel component can have. So for 8-bit input and low threshold
30416 value of 0.1 actual threshold is 0.1 * 255 = 25.
30417
30418 hthreshold, h
30419 Set high threshold for color component not represented on X or Y
30420 axis. Values higher than this value will be ignored. Default is 1.
30421 Note this value is multiplied with actual max possible value one
30422 pixel component can have. So for 8-bit input and high threshold
30423 value of 0.9 actual threshold is 0.9 * 255 = 230.
30424
30425 colorspace, c
30426 Set what kind of colorspace to use when drawing graticule.
30427
30428 auto
30429 601
30430 709
30431
30432 Default is auto.
30433
30434 tint0, t0
30435 tint1, t1
30436 Set color tint for gray/tint vectorscope mode. By default both
30437 options are zero. This means no tint, and output will remain gray.
30438
30439 vidstabdetect
30440 Analyze video stabilization/deshaking. Perform pass 1 of 2, see
30441 vidstabtransform for pass 2.
30442
30443 This filter generates a file with relative translation and rotation
30444 transform information about subsequent frames, which is then used by
30445 the vidstabtransform filter.
30446
30447 To enable compilation of this filter you need to configure FFmpeg with
30448 "--enable-libvidstab".
30449
30450 This filter accepts the following options:
30451
30452 result
30453 Set the path to the file used to write the transforms information.
30454 Default value is transforms.trf.
30455
30456 shakiness
30457 Set how shaky the video is and how quick the camera is. It accepts
30458 an integer in the range 1-10, a value of 1 means little shakiness,
30459 a value of 10 means strong shakiness. Default value is 5.
30460
30461 accuracy
30462 Set the accuracy of the detection process. It must be a value in
30463 the range 1-15. A value of 1 means low accuracy, a value of 15
30464 means high accuracy. Default value is 15.
30465
30466 stepsize
30467 Set stepsize of the search process. The region around minimum is
30468 scanned with 1 pixel resolution. Default value is 6.
30469
30470 mincontrast
30471 Set minimum contrast. Below this value a local measurement field is
30472 discarded. Must be a floating point value in the range 0-1. Default
30473 value is 0.3.
30474
30475 tripod
30476 Set reference frame number for tripod mode.
30477
30478 If enabled, the motion of the frames is compared to a reference
30479 frame in the filtered stream, identified by the specified number.
30480 The idea is to compensate all movements in a more-or-less static
30481 scene and keep the camera view absolutely still.
30482
30483 If set to 0, it is disabled. The frames are counted starting from
30484 1.
30485
30486 show
30487 Show fields and transforms in the resulting frames. It accepts an
30488 integer in the range 0-2. Default value is 0, which disables any
30489 visualization.
30490
30491 Examples
30492
30493 • Use default values:
30494
30495 vidstabdetect
30496
30497 • Analyze strongly shaky movie and put the results in file
30498 mytransforms.trf:
30499
30500 vidstabdetect=shakiness=10:accuracy=15:result="mytransforms.trf"
30501
30502 • Visualize the result of internal transformations in the resulting
30503 video:
30504
30505 vidstabdetect=show=1
30506
30507 • Analyze a video with medium shakiness using ffmpeg:
30508
30509 ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
30510
30511 vidstabtransform
30512 Video stabilization/deshaking: pass 2 of 2, see vidstabdetect for pass
30513 1.
30514
30515 Read a file with transform information for each frame and
30516 apply/compensate them. Together with the vidstabdetect filter this can
30517 be used to deshake videos. See also
30518 <http://public.hronopik.de/vid.stab>. It is important to also use the
30519 unsharp filter, see below.
30520
30521 To enable compilation of this filter you need to configure FFmpeg with
30522 "--enable-libvidstab".
30523
30524 Options
30525
30526 input
30527 Set path to the file used to read the transforms. Default value is
30528 transforms.trf.
30529
30530 smoothing
30531 Set the number of frames (value*2 + 1) used for lowpass filtering
30532 the camera movements. Default value is 10.
30533
30534 For example a number of 10 means that 21 frames are used (10 in the
30535 past and 10 in the future) to smoothen the motion in the video. A
30536 larger value leads to a smoother video, but limits the acceleration
30537 of the camera (pan/tilt movements). 0 is a special case where a
30538 static camera is simulated.
30539
30540 optalgo
30541 Set the camera path optimization algorithm.
30542
30543 Accepted values are:
30544
30545 gauss
30546 gaussian kernel low-pass filter on camera motion (default)
30547
30548 avg averaging on transformations
30549
30550 maxshift
30551 Set maximal number of pixels to translate frames. Default value is
30552 -1, meaning no limit.
30553
30554 maxangle
30555 Set maximal angle in radians (degree*PI/180) to rotate frames.
30556 Default value is -1, meaning no limit.
30557
30558 crop
30559 Specify how to deal with borders that may be visible due to
30560 movement compensation.
30561
30562 Available values are:
30563
30564 keep
30565 keep image information from previous frame (default)
30566
30567 black
30568 fill the border black
30569
30570 invert
30571 Invert transforms if set to 1. Default value is 0.
30572
30573 relative
30574 Consider transforms as relative to previous frame if set to 1,
30575 absolute if set to 0. Default value is 0.
30576
30577 zoom
30578 Set percentage to zoom. A positive value will result in a zoom-in
30579 effect, a negative value in a zoom-out effect. Default value is 0
30580 (no zoom).
30581
30582 optzoom
30583 Set optimal zooming to avoid borders.
30584
30585 Accepted values are:
30586
30587 0 disabled
30588
30589 1 optimal static zoom value is determined (only very strong
30590 movements will lead to visible borders) (default)
30591
30592 2 optimal adaptive zoom value is determined (no borders will be
30593 visible), see zoomspeed
30594
30595 Note that the value given at zoom is added to the one calculated
30596 here.
30597
30598 zoomspeed
30599 Set percent to zoom maximally each frame (enabled when optzoom is
30600 set to 2). Range is from 0 to 5, default value is 0.25.
30601
30602 interpol
30603 Specify type of interpolation.
30604
30605 Available values are:
30606
30607 no no interpolation
30608
30609 linear
30610 linear only horizontal
30611
30612 bilinear
30613 linear in both directions (default)
30614
30615 bicubic
30616 cubic in both directions (slow)
30617
30618 tripod
30619 Enable virtual tripod mode if set to 1, which is equivalent to
30620 "relative=0:smoothing=0". Default value is 0.
30621
30622 Use also "tripod" option of vidstabdetect.
30623
30624 debug
30625 Increase log verbosity if set to 1. Also the detected global
30626 motions are written to the temporary file global_motions.trf.
30627 Default value is 0.
30628
30629 Examples
30630
30631 • Use ffmpeg for a typical stabilization with default values:
30632
30633 ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
30634
30635 Note the use of the unsharp filter which is always recommended.
30636
30637 • Zoom in a bit more and load transform data from a given file:
30638
30639 vidstabtransform=zoom=5:input="mytransforms.trf"
30640
30641 • Smoothen the video even more:
30642
30643 vidstabtransform=smoothing=30
30644
30645 vflip
30646 Flip the input video vertically.
30647
30648 For example, to vertically flip a video with ffmpeg:
30649
30650 ffmpeg -i in.avi -vf "vflip" out.avi
30651
30652 vfrdet
30653 Detect variable frame rate video.
30654
30655 This filter tries to detect if the input is variable or constant frame
30656 rate.
30657
30658 At end it will output number of frames detected as having variable
30659 delta pts, and ones with constant delta pts. If there was frames with
30660 variable delta, than it will also show min, max and average delta
30661 encountered.
30662
30663 vibrance
30664 Boost or alter saturation.
30665
30666 The filter accepts the following options:
30667
30668 intensity
30669 Set strength of boost if positive value or strength of alter if
30670 negative value. Default is 0. Allowed range is from -2 to 2.
30671
30672 rbal
30673 Set the red balance. Default is 1. Allowed range is from -10 to 10.
30674
30675 gbal
30676 Set the green balance. Default is 1. Allowed range is from -10 to
30677 10.
30678
30679 bbal
30680 Set the blue balance. Default is 1. Allowed range is from -10 to
30681 10.
30682
30683 rlum
30684 Set the red luma coefficient.
30685
30686 glum
30687 Set the green luma coefficient.
30688
30689 blum
30690 Set the blue luma coefficient.
30691
30692 alternate
30693 If "intensity" is negative and this is set to 1, colors will
30694 change, otherwise colors will be less saturated, more towards gray.
30695
30696 Commands
30697
30698 This filter supports the all above options as commands.
30699
30700 vif
30701 Obtain the average VIF (Visual Information Fidelity) between two input
30702 videos.
30703
30704 This filter takes two input videos.
30705
30706 Both input videos must have the same resolution and pixel format for
30707 this filter to work correctly. Also it assumes that both inputs have
30708 the same number of frames, which are compared one by one.
30709
30710 The obtained average VIF score is printed through the logging system.
30711
30712 The filter stores the calculated VIF score of each frame.
30713
30714 This filter also supports the framesync options.
30715
30716 In the below example the input file main.mpg being processed is
30717 compared with the reference file ref.mpg.
30718
30719 ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
30720
30721 vignette
30722 Make or reverse a natural vignetting effect.
30723
30724 The filter accepts the following options:
30725
30726 angle, a
30727 Set lens angle expression as a number of radians.
30728
30729 The value is clipped in the "[0,PI/2]" range.
30730
30731 Default value: "PI/5"
30732
30733 x0
30734 y0 Set center coordinates expressions. Respectively "w/2" and "h/2" by
30735 default.
30736
30737 mode
30738 Set forward/backward mode.
30739
30740 Available modes are:
30741
30742 forward
30743 The larger the distance from the central point, the darker the
30744 image becomes.
30745
30746 backward
30747 The larger the distance from the central point, the brighter
30748 the image becomes. This can be used to reverse a vignette
30749 effect, though there is no automatic detection to extract the
30750 lens angle and other settings (yet). It can also be used to
30751 create a burning effect.
30752
30753 Default value is forward.
30754
30755 eval
30756 Set evaluation mode for the expressions (angle, x0, y0).
30757
30758 It accepts the following values:
30759
30760 init
30761 Evaluate expressions only once during the filter
30762 initialization.
30763
30764 frame
30765 Evaluate expressions for each incoming frame. This is way
30766 slower than the init mode since it requires all the scalers to
30767 be re-computed, but it allows advanced dynamic expressions.
30768
30769 Default value is init.
30770
30771 dither
30772 Set dithering to reduce the circular banding effects. Default is 1
30773 (enabled).
30774
30775 aspect
30776 Set vignette aspect. This setting allows one to adjust the shape of
30777 the vignette. Setting this value to the SAR of the input will make
30778 a rectangular vignetting following the dimensions of the video.
30779
30780 Default is "1/1".
30781
30782 Expressions
30783
30784 The alpha, x0 and y0 expressions can contain the following parameters.
30785
30786 w
30787 h input width and height
30788
30789 n the number of input frame, starting from 0
30790
30791 pts the PTS (Presentation TimeStamp) time of the filtered video frame,
30792 expressed in TB units, NAN if undefined
30793
30794 r frame rate of the input video, NAN if the input frame rate is
30795 unknown
30796
30797 t the PTS (Presentation TimeStamp) of the filtered video frame,
30798 expressed in seconds, NAN if undefined
30799
30800 tb time base of the input video
30801
30802 Examples
30803
30804 • Apply simple strong vignetting effect:
30805
30806 vignette=PI/4
30807
30808 • Make a flickering vignetting:
30809
30810 vignette='PI/4+random(1)*PI/50':eval=frame
30811
30812 vmafmotion
30813 Obtain the average VMAF motion score of a video. It is one of the
30814 component metrics of VMAF.
30815
30816 The obtained average motion score is printed through the logging
30817 system.
30818
30819 The filter accepts the following options:
30820
30821 stats_file
30822 If specified, the filter will use the named file to save the motion
30823 score of each frame with respect to the previous frame. When
30824 filename equals "-" the data is sent to standard output.
30825
30826 Example:
30827
30828 ffmpeg -i ref.mpg -vf vmafmotion -f null -
30829
30830 vstack
30831 Stack input videos vertically.
30832
30833 All streams must be of same pixel format and of same width.
30834
30835 Note that this filter is faster than using overlay and pad filter to
30836 create same output.
30837
30838 The filter accepts the following options:
30839
30840 inputs
30841 Set number of input streams. Default is 2.
30842
30843 shortest
30844 If set to 1, force the output to terminate when the shortest input
30845 terminates. Default value is 0.
30846
30847 w3fdif
30848 Deinterlace the input video ("w3fdif" stands for "Weston 3 Field
30849 Deinterlacing Filter").
30850
30851 Based on the process described by Martin Weston for BBC R&D, and
30852 implemented based on the de-interlace algorithm written by Jim
30853 Easterbrook for BBC R&D, the Weston 3 field deinterlacing filter uses
30854 filter coefficients calculated by BBC R&D.
30855
30856 This filter uses field-dominance information in frame to decide which
30857 of each pair of fields to place first in the output. If it gets it
30858 wrong use setfield filter before "w3fdif" filter.
30859
30860 There are two sets of filter coefficients, so called "simple" and
30861 "complex". Which set of filter coefficients is used can be set by
30862 passing an optional parameter:
30863
30864 filter
30865 Set the interlacing filter coefficients. Accepts one of the
30866 following values:
30867
30868 simple
30869 Simple filter coefficient set.
30870
30871 complex
30872 More-complex filter coefficient set.
30873
30874 Default value is complex.
30875
30876 mode
30877 The interlacing mode to adopt. It accepts one of the following
30878 values:
30879
30880 frame
30881 Output one frame for each frame.
30882
30883 field
30884 Output one frame for each field.
30885
30886 The default value is "field".
30887
30888 parity
30889 The picture field parity assumed for the input interlaced video. It
30890 accepts one of the following values:
30891
30892 tff Assume the top field is first.
30893
30894 bff Assume the bottom field is first.
30895
30896 auto
30897 Enable automatic detection of field parity.
30898
30899 The default value is "auto". If the interlacing is unknown or the
30900 decoder does not export this information, top field first will be
30901 assumed.
30902
30903 deint
30904 Specify which frames to deinterlace. Accepts one of the following
30905 values:
30906
30907 all Deinterlace all frames,
30908
30909 interlaced
30910 Only deinterlace frames marked as interlaced.
30911
30912 Default value is all.
30913
30914 Commands
30915
30916 This filter supports same commands as options.
30917
30918 waveform
30919 Video waveform monitor.
30920
30921 The waveform monitor plots color component intensity. By default
30922 luminance only. Each column of the waveform corresponds to a column of
30923 pixels in the source video.
30924
30925 It accepts the following options:
30926
30927 mode, m
30928 Can be either "row", or "column". Default is "column". In row
30929 mode, the graph on the left side represents color component value 0
30930 and the right side represents value = 255. In column mode, the top
30931 side represents color component value = 0 and bottom side
30932 represents value = 255.
30933
30934 intensity, i
30935 Set intensity. Smaller values are useful to find out how many
30936 values of the same luminance are distributed across input
30937 rows/columns. Default value is 0.04. Allowed range is [0, 1].
30938
30939 mirror, r
30940 Set mirroring mode. 0 means unmirrored, 1 means mirrored. In
30941 mirrored mode, higher values will be represented on the left side
30942 for "row" mode and at the top for "column" mode. Default is 1
30943 (mirrored).
30944
30945 display, d
30946 Set display mode. It accepts the following values:
30947
30948 overlay
30949 Presents information identical to that in the "parade", except
30950 that the graphs representing color components are superimposed
30951 directly over one another.
30952
30953 This display mode makes it easier to spot relative differences
30954 or similarities in overlapping areas of the color components
30955 that are supposed to be identical, such as neutral whites,
30956 grays, or blacks.
30957
30958 stack
30959 Display separate graph for the color components side by side in
30960 "row" mode or one below the other in "column" mode.
30961
30962 parade
30963 Display separate graph for the color components side by side in
30964 "column" mode or one below the other in "row" mode.
30965
30966 Using this display mode makes it easy to spot color casts in
30967 the highlights and shadows of an image, by comparing the
30968 contours of the top and the bottom graphs of each waveform.
30969 Since whites, grays, and blacks are characterized by exactly
30970 equal amounts of red, green, and blue, neutral areas of the
30971 picture should display three waveforms of roughly equal
30972 width/height. If not, the correction is easy to perform by
30973 making level adjustments the three waveforms.
30974
30975 Default is "stack".
30976
30977 components, c
30978 Set which color components to display. Default is 1, which means
30979 only luminance or red color component if input is in RGB
30980 colorspace. If is set for example to 7 it will display all 3 (if)
30981 available color components.
30982
30983 envelope, e
30984 none
30985 No envelope, this is default.
30986
30987 instant
30988 Instant envelope, minimum and maximum values presented in graph
30989 will be easily visible even with small "step" value.
30990
30991 peak
30992 Hold minimum and maximum values presented in graph across time.
30993 This way you can still spot out of range values without
30994 constantly looking at waveforms.
30995
30996 peak+instant
30997 Peak and instant envelope combined together.
30998
30999 filter, f
31000 lowpass
31001 No filtering, this is default.
31002
31003 flat
31004 Luma and chroma combined together.
31005
31006 aflat
31007 Similar as above, but shows difference between blue and red
31008 chroma.
31009
31010 xflat
31011 Similar as above, but use different colors.
31012
31013 yflat
31014 Similar as above, but again with different colors.
31015
31016 chroma
31017 Displays only chroma.
31018
31019 color
31020 Displays actual color value on waveform.
31021
31022 acolor
31023 Similar as above, but with luma showing frequency of chroma
31024 values.
31025
31026 graticule, g
31027 Set which graticule to display.
31028
31029 none
31030 Do not display graticule.
31031
31032 green
31033 Display green graticule showing legal broadcast ranges.
31034
31035 orange
31036 Display orange graticule showing legal broadcast ranges.
31037
31038 invert
31039 Display invert graticule showing legal broadcast ranges.
31040
31041 opacity, o
31042 Set graticule opacity.
31043
31044 flags, fl
31045 Set graticule flags.
31046
31047 numbers
31048 Draw numbers above lines. By default enabled.
31049
31050 dots
31051 Draw dots instead of lines.
31052
31053 scale, s
31054 Set scale used for displaying graticule.
31055
31056 digital
31057 millivolts
31058 ire
31059
31060 Default is digital.
31061
31062 bgopacity, b
31063 Set background opacity.
31064
31065 tint0, t0
31066 tint1, t1
31067 Set tint for output. Only used with lowpass filter and when
31068 display is not overlay and input pixel formats are not RGB.
31069
31070 fitmode, fm
31071 Set sample aspect ratio of video output frames. Can be used to
31072 configure waveform so it is not streched too much in one of
31073 directions.
31074
31075 none
31076 Set sample aspect ration to 1/1.
31077
31078 size
31079 Set sample aspect ratio to match input size of video
31080
31081 Default is none.
31082
31083 weave, doubleweave
31084 The "weave" takes a field-based video input and join each two
31085 sequential fields into single frame, producing a new double height clip
31086 with half the frame rate and half the frame count.
31087
31088 The "doubleweave" works same as "weave" but without halving frame rate
31089 and frame count.
31090
31091 It accepts the following option:
31092
31093 first_field
31094 Set first field. Available values are:
31095
31096 top, t
31097 Set the frame as top-field-first.
31098
31099 bottom, b
31100 Set the frame as bottom-field-first.
31101
31102 Examples
31103
31104 • Interlace video using select and separatefields filter:
31105
31106 separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
31107
31108 xbr
31109 Apply the xBR high-quality magnification filter which is designed for
31110 pixel art. It follows a set of edge-detection rules, see
31111 <https://forums.libretro.com/t/xbr-algorithm-tutorial/123>.
31112
31113 It accepts the following option:
31114
31115 n Set the scaling dimension: 2 for "2xBR", 3 for "3xBR" and 4 for
31116 "4xBR". Default is 3.
31117
31118 xcorrelate
31119 Apply normalized cross-correlation between first and second input video
31120 stream.
31121
31122 Second input video stream dimensions must be lower than first input
31123 video stream.
31124
31125 The filter accepts the following options:
31126
31127 planes
31128 Set which planes to process.
31129
31130 secondary
31131 Set which secondary video frames will be processed from second
31132 input video stream, can be first or all. Default is all.
31133
31134 The "xcorrelate" filter also supports the framesync options.
31135
31136 xfade
31137 Apply cross fade from one input video stream to another input video
31138 stream. The cross fade is applied for specified duration.
31139
31140 Both inputs must be constant frame-rate and have the same resolution,
31141 pixel format, frame rate and timebase.
31142
31143 The filter accepts the following options:
31144
31145 transition
31146 Set one of available transition effects:
31147
31148 custom
31149 fade
31150 wipeleft
31151 wiperight
31152 wipeup
31153 wipedown
31154 slideleft
31155 slideright
31156 slideup
31157 slidedown
31158 circlecrop
31159 rectcrop
31160 distance
31161 fadeblack
31162 fadewhite
31163 radial
31164 smoothleft
31165 smoothright
31166 smoothup
31167 smoothdown
31168 circleopen
31169 circleclose
31170 vertopen
31171 vertclose
31172 horzopen
31173 horzclose
31174 dissolve
31175 pixelize
31176 diagtl
31177 diagtr
31178 diagbl
31179 diagbr
31180 hlslice
31181 hrslice
31182 vuslice
31183 vdslice
31184 hblur
31185 fadegrays
31186 wipetl
31187 wipetr
31188 wipebl
31189 wipebr
31190 squeezeh
31191 squeezev
31192 zoomin
31193 fadefast
31194 fadeslow
31195
31196 Default transition effect is fade.
31197
31198 duration
31199 Set cross fade duration in seconds. Range is 0 to 60 seconds.
31200 Default duration is 1 second.
31201
31202 offset
31203 Set cross fade start relative to first input stream in seconds.
31204 Default offset is 0.
31205
31206 expr
31207 Set expression for custom transition effect.
31208
31209 The expressions can use the following variables and functions:
31210
31211 X
31212 Y The coordinates of the current sample.
31213
31214 W
31215 H The width and height of the image.
31216
31217 P Progress of transition effect.
31218
31219 PLANE
31220 Currently processed plane.
31221
31222 A Return value of first input at current location and plane.
31223
31224 B Return value of second input at current location and plane.
31225
31226 a0(x, y)
31227 a1(x, y)
31228 a2(x, y)
31229 a3(x, y)
31230 Return the value of the pixel at location (x,y) of the
31231 first/second/third/fourth component of first input.
31232
31233 b0(x, y)
31234 b1(x, y)
31235 b2(x, y)
31236 b3(x, y)
31237 Return the value of the pixel at location (x,y) of the
31238 first/second/third/fourth component of second input.
31239
31240 Examples
31241
31242 • Cross fade from one input video to another input video, with fade
31243 transition and duration of transition of 2 seconds starting at
31244 offset of 5 seconds:
31245
31246 ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
31247
31248 xmedian
31249 Pick median pixels from several input videos.
31250
31251 The filter accepts the following options:
31252
31253 inputs
31254 Set number of inputs. Default is 3. Allowed range is from 3 to
31255 255. If number of inputs is even number, than result will be mean
31256 value between two median values.
31257
31258 planes
31259 Set which planes to filter. Default value is 15, by which all
31260 planes are processed.
31261
31262 percentile
31263 Set median percentile. Default value is 0.5. Default value of 0.5
31264 will pick always median values, while 0 will pick minimum values,
31265 and 1 maximum values.
31266
31267 Commands
31268
31269 This filter supports all above options as commands, excluding option
31270 "inputs".
31271
31272 xstack
31273 Stack video inputs into custom layout.
31274
31275 All streams must be of same pixel format.
31276
31277 The filter accepts the following options:
31278
31279 inputs
31280 Set number of input streams. Default is 2.
31281
31282 layout
31283 Specify layout of inputs. This option requires the desired layout
31284 configuration to be explicitly set by the user. This sets position
31285 of each video input in output. Each input is separated by '|'. The
31286 first number represents the column, and the second number
31287 represents the row. Numbers start at 0 and are separated by '_'.
31288 Optionally one can use wX and hX, where X is video input from which
31289 to take width or height. Multiple values can be used when
31290 separated by '+'. In such case values are summed together.
31291
31292 Note that if inputs are of different sizes gaps may appear, as not
31293 all of the output video frame will be filled. Similarly, videos can
31294 overlap each other if their position doesn't leave enough space for
31295 the full frame of adjoining videos.
31296
31297 For 2 inputs, a default layout of "0_0|w0_0" (equivalent to
31298 "grid=2x1") is set. In all other cases, a layout or a grid must be
31299 set by the user. Either "grid" or "layout" can be specified at a
31300 time. Specifying both will result in an error.
31301
31302 grid
31303 Specify a fixed size grid of inputs. This option is used to create
31304 a fixed size grid of the input streams. Set the grid size in the
31305 form "COLUMNSxROWS". There must be "ROWS * COLUMNS" input streams
31306 and they will be arranged as a grid with "ROWS" rows and "COLUMNS"
31307 columns. When using this option, each input stream within a row
31308 must have the same height and all the rows must have the same
31309 width.
31310
31311 If "grid" is set, then "inputs" option is ignored and is implicitly
31312 set to "ROWS * COLUMNS".
31313
31314 For 2 inputs, a default grid of "2x1" (equivalent to
31315 "layout=0_0|w0_0") is set. In all other cases, a layout or a grid
31316 must be set by the user. Either "grid" or "layout" can be specified
31317 at a time. Specifying both will result in an error.
31318
31319 shortest
31320 If set to 1, force the output to terminate when the shortest input
31321 terminates. Default value is 0.
31322
31323 fill
31324 If set to valid color, all unused pixels will be filled with that
31325 color. By default fill is set to none, so it is disabled.
31326
31327 Examples
31328
31329 • Display 4 inputs into 2x2 grid.
31330
31331 Layout:
31332
31333 input1(0, 0) | input3(w0, 0)
31334 input2(0, h0) | input4(w0, h0)
31335
31336
31337
31338 xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
31339
31340 Note that if inputs are of different sizes, gaps or overlaps may
31341 occur.
31342
31343 • Display 4 inputs into 1x4 grid.
31344
31345 Layout:
31346
31347 input1(0, 0)
31348 input2(0, h0)
31349 input3(0, h0+h1)
31350 input4(0, h0+h1+h2)
31351
31352
31353
31354 xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
31355
31356 Note that if inputs are of different widths, unused space will
31357 appear.
31358
31359 • Display 9 inputs into 3x3 grid.
31360
31361 Layout:
31362
31363 input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
31364 input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
31365 input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
31366
31367
31368
31369 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
31370
31371 Note that if inputs are of different sizes, gaps or overlaps may
31372 occur.
31373
31374 • Display 16 inputs into 4x4 grid.
31375
31376 Layout:
31377
31378 input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
31379 input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
31380 input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
31381 input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
31382
31383
31384
31385 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|
31386 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
31387
31388 Note that if inputs are of different sizes, gaps or overlaps may
31389 occur.
31390
31391 yadif
31392 Deinterlace the input video ("yadif" means "yet another deinterlacing
31393 filter").
31394
31395 It accepts the following parameters:
31396
31397 mode
31398 The interlacing mode to adopt. It accepts one of the following
31399 values:
31400
31401 0, send_frame
31402 Output one frame for each frame.
31403
31404 1, send_field
31405 Output one frame for each field.
31406
31407 2, send_frame_nospatial
31408 Like "send_frame", but it skips the spatial interlacing check.
31409
31410 3, send_field_nospatial
31411 Like "send_field", but it skips the spatial interlacing check.
31412
31413 The default value is "send_frame".
31414
31415 parity
31416 The picture field parity assumed for the input interlaced video. It
31417 accepts one of the following values:
31418
31419 0, tff
31420 Assume the top field is first.
31421
31422 1, bff
31423 Assume the bottom field is first.
31424
31425 -1, auto
31426 Enable automatic detection of field parity.
31427
31428 The default value is "auto". If the interlacing is unknown or the
31429 decoder does not export this information, top field first will be
31430 assumed.
31431
31432 deint
31433 Specify which frames to deinterlace. Accepts one of the following
31434 values:
31435
31436 0, all
31437 Deinterlace all frames.
31438
31439 1, interlaced
31440 Only deinterlace frames marked as interlaced.
31441
31442 The default value is "all".
31443
31444 yadif_cuda
31445 Deinterlace the input video using the yadif algorithm, but implemented
31446 in CUDA so that it can work as part of a GPU accelerated pipeline with
31447 nvdec and/or nvenc.
31448
31449 It accepts the following parameters:
31450
31451 mode
31452 The interlacing mode to adopt. It accepts one of the following
31453 values:
31454
31455 0, send_frame
31456 Output one frame for each frame.
31457
31458 1, send_field
31459 Output one frame for each field.
31460
31461 2, send_frame_nospatial
31462 Like "send_frame", but it skips the spatial interlacing check.
31463
31464 3, send_field_nospatial
31465 Like "send_field", but it skips the spatial interlacing check.
31466
31467 The default value is "send_frame".
31468
31469 parity
31470 The picture field parity assumed for the input interlaced video. It
31471 accepts one of the following values:
31472
31473 0, tff
31474 Assume the top field is first.
31475
31476 1, bff
31477 Assume the bottom field is first.
31478
31479 -1, auto
31480 Enable automatic detection of field parity.
31481
31482 The default value is "auto". If the interlacing is unknown or the
31483 decoder does not export this information, top field first will be
31484 assumed.
31485
31486 deint
31487 Specify which frames to deinterlace. Accepts one of the following
31488 values:
31489
31490 0, all
31491 Deinterlace all frames.
31492
31493 1, interlaced
31494 Only deinterlace frames marked as interlaced.
31495
31496 The default value is "all".
31497
31498 yaepblur
31499 Apply blur filter while preserving edges ("yaepblur" means "yet another
31500 edge preserving blur filter"). The algorithm is described in "J. S.
31501 Lee, Digital image enhancement and noise filtering by use of local
31502 statistics, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 1980."
31503
31504 It accepts the following parameters:
31505
31506 radius, r
31507 Set the window radius. Default value is 3.
31508
31509 planes, p
31510 Set which planes to filter. Default is only the first plane.
31511
31512 sigma, s
31513 Set blur strength. Default value is 128.
31514
31515 Commands
31516
31517 This filter supports same commands as options.
31518
31519 zoompan
31520 Apply Zoom & Pan effect.
31521
31522 This filter accepts the following options:
31523
31524 zoom, z
31525 Set the zoom expression. Range is 1-10. Default is 1.
31526
31527 x
31528 y Set the x and y expression. Default is 0.
31529
31530 d Set the duration expression in number of frames. This sets for how
31531 many number of frames effect will last for single input image.
31532 Default is 90.
31533
31534 s Set the output image size, default is 'hd720'.
31535
31536 fps Set the output frame rate, default is '25'.
31537
31538 Each expression can contain the following constants:
31539
31540 in_w, iw
31541 Input width.
31542
31543 in_h, ih
31544 Input height.
31545
31546 out_w, ow
31547 Output width.
31548
31549 out_h, oh
31550 Output height.
31551
31552 in Input frame count.
31553
31554 on Output frame count.
31555
31556 in_time, it
31557 The input timestamp expressed in seconds. It's NAN if the input
31558 timestamp is unknown.
31559
31560 out_time, time, ot
31561 The output timestamp expressed in seconds.
31562
31563 x
31564 y Last calculated 'x' and 'y' position from 'x' and 'y' expression
31565 for current input frame.
31566
31567 px
31568 py 'x' and 'y' of last output frame of previous input frame or 0 when
31569 there was not yet such frame (first input frame).
31570
31571 zoom
31572 Last calculated zoom from 'z' expression for current input frame.
31573
31574 pzoom
31575 Last calculated zoom of last output frame of previous input frame.
31576
31577 duration
31578 Number of output frames for current input frame. Calculated from
31579 'd' expression for each input frame.
31580
31581 pduration
31582 number of output frames created for previous input frame
31583
31584 a Rational number: input width / input height
31585
31586 sar sample aspect ratio
31587
31588 dar display aspect ratio
31589
31590 Examples
31591
31592 • Zoom in up to 1.5x and pan at same time to some spot near center of
31593 picture:
31594
31595 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
31596
31597 • Zoom in up to 1.5x and pan always at center of picture:
31598
31599 zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
31600
31601 • Same as above but without pausing:
31602
31603 zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
31604
31605 • Zoom in 2x into center of picture only for the first second of the
31606 input video:
31607
31608 zoompan=z='if(between(in_time,0,1),2,1)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
31609
31610 zscale
31611 Scale (resize) the input video, using the z.lib library:
31612 <https://github.com/sekrit-twc/zimg>. To enable compilation of this
31613 filter, you need to configure FFmpeg with "--enable-libzimg".
31614
31615 The zscale filter forces the output display aspect ratio to be the same
31616 as the input, by changing the output sample aspect ratio.
31617
31618 If the input image format is different from the format requested by the
31619 next filter, the zscale filter will convert the input to the requested
31620 format.
31621
31622 Options
31623
31624 The filter accepts the following options.
31625
31626 width, w
31627 height, h
31628 Set the output video dimension expression. Default value is the
31629 input dimension.
31630
31631 If the width or w value is 0, the input width is used for the
31632 output. If the height or h value is 0, the input height is used for
31633 the output.
31634
31635 If one and only one of the values is -n with n >= 1, the zscale
31636 filter will use a value that maintains the aspect ratio of the
31637 input image, calculated from the other specified dimension. After
31638 that it will, however, make sure that the calculated dimension is
31639 divisible by n and adjust the value if necessary.
31640
31641 If both values are -n with n >= 1, the behavior will be identical
31642 to both values being set to 0 as previously detailed.
31643
31644 See below for the list of accepted constants for use in the
31645 dimension expression.
31646
31647 size, s
31648 Set the video size. For the syntax of this option, check the "Video
31649 size" section in the ffmpeg-utils manual.
31650
31651 dither, d
31652 Set the dither type.
31653
31654 Possible values are:
31655
31656 none
31657 ordered
31658 random
31659 error_diffusion
31660
31661 Default is none.
31662
31663 filter, f
31664 Set the resize filter type.
31665
31666 Possible values are:
31667
31668 point
31669 bilinear
31670 bicubic
31671 spline16
31672 spline36
31673 lanczos
31674
31675 Default is bilinear.
31676
31677 range, r
31678 Set the color range.
31679
31680 Possible values are:
31681
31682 input
31683 limited
31684 full
31685
31686 Default is same as input.
31687
31688 primaries, p
31689 Set the color primaries.
31690
31691 Possible values are:
31692
31693 input
31694 709
31695 unspecified
31696 170m
31697 240m
31698 2020
31699
31700 Default is same as input.
31701
31702 transfer, t
31703 Set the transfer characteristics.
31704
31705 Possible values are:
31706
31707 input
31708 709
31709 unspecified
31710 601
31711 linear
31712 2020_10
31713 2020_12
31714 smpte2084
31715 iec61966-2-1
31716 arib-std-b67
31717
31718 Default is same as input.
31719
31720 matrix, m
31721 Set the colorspace matrix.
31722
31723 Possible value are:
31724
31725 input
31726 709
31727 unspecified
31728 470bg
31729 170m
31730 2020_ncl
31731 2020_cl
31732
31733 Default is same as input.
31734
31735 rangein, rin
31736 Set the input color range.
31737
31738 Possible values are:
31739
31740 input
31741 limited
31742 full
31743
31744 Default is same as input.
31745
31746 primariesin, pin
31747 Set the input color primaries.
31748
31749 Possible values are:
31750
31751 input
31752 709
31753 unspecified
31754 170m
31755 240m
31756 2020
31757
31758 Default is same as input.
31759
31760 transferin, tin
31761 Set the input transfer characteristics.
31762
31763 Possible values are:
31764
31765 input
31766 709
31767 unspecified
31768 601
31769 linear
31770 2020_10
31771 2020_12
31772
31773 Default is same as input.
31774
31775 matrixin, min
31776 Set the input colorspace matrix.
31777
31778 Possible value are:
31779
31780 input
31781 709
31782 unspecified
31783 470bg
31784 170m
31785 2020_ncl
31786 2020_cl
31787 chromal, c
31788 Set the output chroma location.
31789
31790 Possible values are:
31791
31792 input
31793 left
31794 center
31795 topleft
31796 top
31797 bottomleft
31798 bottom
31799 chromalin, cin
31800 Set the input chroma location.
31801
31802 Possible values are:
31803
31804 input
31805 left
31806 center
31807 topleft
31808 top
31809 bottomleft
31810 bottom
31811 npl Set the nominal peak luminance.
31812
31813 param_a
31814 Parameter A for scaling filters. Parameter "b" for bicubic, and the
31815 number of filter taps for lanczos.
31816
31817 param_b
31818 Parameter B for scaling filters. Parameter "c" for bicubic.
31819
31820 The values of the w and h options are expressions containing the
31821 following constants:
31822
31823 in_w
31824 in_h
31825 The input width and height
31826
31827 iw
31828 ih These are the same as in_w and in_h.
31829
31830 out_w
31831 out_h
31832 The output (scaled) width and height
31833
31834 ow
31835 oh These are the same as out_w and out_h
31836
31837 a The same as iw / ih
31838
31839 sar input sample aspect ratio
31840
31841 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
31842
31843 hsub
31844 vsub
31845 horizontal and vertical input chroma subsample values. For example
31846 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
31847
31848 ohsub
31849 ovsub
31850 horizontal and vertical output chroma subsample values. For example
31851 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
31852
31853 Commands
31854
31855 This filter supports the following commands:
31856
31857 width, w
31858 height, h
31859 Set the output video dimension expression. The command accepts the
31860 same syntax of the corresponding option.
31861
31862 If the specified expression is not valid, it is kept at its current
31863 value.
31864
31866 Below is a description of the currently available OpenCL video filters.
31867
31868 To enable compilation of these filters you need to configure FFmpeg
31869 with "--enable-opencl".
31870
31871 Running OpenCL filters requires you to initialize a hardware device and
31872 to pass that device to all filters in any filter graph.
31873
31874 -init_hw_device opencl[=name][:device[,key=value...]]
31875 Initialise a new hardware device of type opencl called name, using
31876 the given device parameters.
31877
31878 -filter_hw_device name
31879 Pass the hardware device called name to all filters in any filter
31880 graph.
31881
31882 For more detailed information see
31883 <https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options>
31884
31885 • Example of choosing the first device on the second platform and
31886 running avgblur_opencl filter with default parameters on it.
31887
31888 -init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf "hwupload, avgblur_opencl, hwdownload" OUTPUT
31889
31890 Since OpenCL filters are not able to access frame data in normal
31891 memory, all frame data needs to be uploaded(hwupload) to hardware
31892 surfaces connected to the appropriate device before being used and then
31893 downloaded(hwdownload) back to normal memory. Note that hwupload will
31894 upload to a surface with the same layout as the software frame, so it
31895 may be necessary to add a format filter immediately before to get the
31896 input into the right format and hwdownload does not support all formats
31897 on the output - it may be necessary to insert an additional format
31898 filter immediately following in the graph to get the output in a
31899 supported format.
31900
31901 avgblur_opencl
31902 Apply average blur filter.
31903
31904 The filter accepts the following options:
31905
31906 sizeX
31907 Set horizontal radius size. Range is "[1, 1024]" and default value
31908 is 1.
31909
31910 planes
31911 Set which planes to filter. Default value is 0xf, by which all
31912 planes are processed.
31913
31914 sizeY
31915 Set vertical radius size. Range is "[1, 1024]" and default value is
31916 0. If zero, "sizeX" value will be used.
31917
31918 Example
31919
31920 • Apply average blur filter with horizontal and vertical size of 3,
31921 setting each pixel of the output to the average value of the 7x7
31922 region centered on it in the input. For pixels on the edges of the
31923 image, the region does not extend beyond the image boundaries, and
31924 so out-of-range coordinates are not used in the calculations.
31925
31926 -i INPUT -vf "hwupload, avgblur_opencl=3, hwdownload" OUTPUT
31927
31928 boxblur_opencl
31929 Apply a boxblur algorithm to the input video.
31930
31931 It accepts the following parameters:
31932
31933 luma_radius, lr
31934 luma_power, lp
31935 chroma_radius, cr
31936 chroma_power, cp
31937 alpha_radius, ar
31938 alpha_power, ap
31939
31940 A description of the accepted options follows.
31941
31942 luma_radius, lr
31943 chroma_radius, cr
31944 alpha_radius, ar
31945 Set an expression for the box radius in pixels used for blurring
31946 the corresponding input plane.
31947
31948 The radius value must be a non-negative number, and must not be
31949 greater than the value of the expression "min(w,h)/2" for the luma
31950 and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
31951
31952 Default value for luma_radius is "2". If not specified,
31953 chroma_radius and alpha_radius default to the corresponding value
31954 set for luma_radius.
31955
31956 The expressions can contain the following constants:
31957
31958 w
31959 h The input width and height in pixels.
31960
31961 cw
31962 ch The input chroma image width and height in pixels.
31963
31964 hsub
31965 vsub
31966 The horizontal and vertical chroma subsample values. For
31967 example, for the pixel format "yuv422p", hsub is 2 and vsub is
31968 1.
31969
31970 luma_power, lp
31971 chroma_power, cp
31972 alpha_power, ap
31973 Specify how many times the boxblur filter is applied to the
31974 corresponding plane.
31975
31976 Default value for luma_power is 2. If not specified, chroma_power
31977 and alpha_power default to the corresponding value set for
31978 luma_power.
31979
31980 A value of 0 will disable the effect.
31981
31982 Examples
31983
31984 Apply boxblur filter, setting each pixel of the output to the average
31985 value of box-radiuses luma_radius, chroma_radius, alpha_radius for each
31986 plane respectively. The filter will apply luma_power, chroma_power,
31987 alpha_power times onto the corresponding plane. For pixels on the edges
31988 of the image, the radius does not extend beyond the image boundaries,
31989 and so out-of-range coordinates are not used in the calculations.
31990
31991 • Apply a boxblur filter with the luma, chroma, and alpha radius set
31992 to 2 and luma, chroma, and alpha power set to 3. The filter will
31993 run 3 times with box-radius set to 2 for every plane of the image.
31994
31995 -i INPUT -vf "hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload" OUTPUT
31996 -i INPUT -vf "hwupload, boxblur_opencl=2:3, hwdownload" OUTPUT
31997
31998 • Apply a boxblur filter with luma radius set to 2, luma_power to 1,
31999 chroma_radius to 4, chroma_power to 5, alpha_radius to 3 and
32000 alpha_power to 7.
32001
32002 For the luma plane, a 2x2 box radius will be run once.
32003
32004 For the chroma plane, a 4x4 box radius will be run 5 times.
32005
32006 For the alpha plane, a 3x3 box radius will be run 7 times.
32007
32008 -i INPUT -vf "hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload" OUTPUT
32009
32010 colorkey_opencl
32011 RGB colorspace color keying.
32012
32013 The filter accepts the following options:
32014
32015 color
32016 The color which will be replaced with transparency.
32017
32018 similarity
32019 Similarity percentage with the key color.
32020
32021 0.01 matches only the exact key color, while 1.0 matches
32022 everything.
32023
32024 blend
32025 Blend percentage.
32026
32027 0.0 makes pixels either fully transparent, or not transparent at
32028 all.
32029
32030 Higher values result in semi-transparent pixels, with a higher
32031 transparency the more similar the pixels color is to the key color.
32032
32033 Examples
32034
32035 • Make every semi-green pixel in the input transparent with some
32036 slight blending:
32037
32038 -i INPUT -vf "hwupload, colorkey_opencl=green:0.3:0.1, hwdownload" OUTPUT
32039
32040 convolution_opencl
32041 Apply convolution of 3x3, 5x5, 7x7 matrix.
32042
32043 The filter accepts the following options:
32044
32045 0m
32046 1m
32047 2m
32048 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49
32049 signed numbers. Default value for each plane is "0 0 0 0 1 0 0 0
32050 0".
32051
32052 0rdiv
32053 1rdiv
32054 2rdiv
32055 3rdiv
32056 Set multiplier for calculated value for each plane. If unset or 0,
32057 it will be sum of all matrix elements. The option value must be a
32058 float number greater or equal to 0.0. Default value is 1.0.
32059
32060 0bias
32061 1bias
32062 2bias
32063 3bias
32064 Set bias for each plane. This value is added to the result of the
32065 multiplication. Useful for making the overall image brighter or
32066 darker. The option value must be a float number greater or equal
32067 to 0.0. Default value is 0.0.
32068
32069 Examples
32070
32071 • Apply sharpen:
32072
32073 -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
32074
32075 • Apply blur:
32076
32077 -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
32078
32079 • Apply edge enhance:
32080
32081 -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
32082
32083 • Apply edge detect:
32084
32085 -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
32086
32087 • Apply laplacian edge detector which includes diagonals:
32088
32089 -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
32090
32091 • Apply emboss:
32092
32093 -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
32094
32095 erosion_opencl
32096 Apply erosion effect to the video.
32097
32098 This filter replaces the pixel by the local(3x3) minimum.
32099
32100 It accepts the following options:
32101
32102 threshold0
32103 threshold1
32104 threshold2
32105 threshold3
32106 Limit the maximum change for each plane. Range is "[0, 65535]" and
32107 default value is 65535. If 0, plane will remain unchanged.
32108
32109 coordinates
32110 Flag which specifies the pixel to refer to. Range is "[0, 255]"
32111 and default value is 255, i.e. all eight pixels are used.
32112
32113 Flags to local 3x3 coordinates region centered on "x":
32114
32115 1 2 3
32116
32117 4 x 5
32118
32119 6 7 8
32120
32121 Example
32122
32123 • Apply erosion filter with threshold0 set to 30, threshold1 set 40,
32124 threshold2 set to 50 and coordinates set to 231, setting each pixel
32125 of the output to the local minimum between pixels: 1, 2, 3, 6, 7, 8
32126 of the 3x3 region centered on it in the input. If the difference
32127 between input pixel and local minimum is more then threshold of the
32128 corresponding plane, output pixel will be set to input pixel -
32129 threshold of corresponding plane.
32130
32131 -i INPUT -vf "hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
32132
32133 deshake_opencl
32134 Feature-point based video stabilization filter.
32135
32136 The filter accepts the following options:
32137
32138 tripod
32139 Simulates a tripod by preventing any camera movement whatsoever
32140 from the original frame. Defaults to 0.
32141
32142 debug
32143 Whether or not additional debug info should be displayed, both in
32144 the processed output and in the console.
32145
32146 Note that in order to see console debug output you will also need
32147 to pass "-v verbose" to ffmpeg.
32148
32149 Viewing point matches in the output video is only supported for RGB
32150 input.
32151
32152 Defaults to 0.
32153
32154 adaptive_crop
32155 Whether or not to do a tiny bit of cropping at the borders to cut
32156 down on the amount of mirrored pixels.
32157
32158 Defaults to 1.
32159
32160 refine_features
32161 Whether or not feature points should be refined at a sub-pixel
32162 level.
32163
32164 This can be turned off for a slight performance gain at the cost of
32165 precision.
32166
32167 Defaults to 1.
32168
32169 smooth_strength
32170 The strength of the smoothing applied to the camera path from 0.0
32171 to 1.0.
32172
32173 1.0 is the maximum smoothing strength while values less than that
32174 result in less smoothing.
32175
32176 0.0 causes the filter to adaptively choose a smoothing strength on
32177 a per-frame basis.
32178
32179 Defaults to 0.0.
32180
32181 smooth_window_multiplier
32182 Controls the size of the smoothing window (the number of frames
32183 buffered to determine motion information from).
32184
32185 The size of the smoothing window is determined by multiplying the
32186 framerate of the video by this number.
32187
32188 Acceptable values range from 0.1 to 10.0.
32189
32190 Larger values increase the amount of motion data available for
32191 determining how to smooth the camera path, potentially improving
32192 smoothness, but also increase latency and memory usage.
32193
32194 Defaults to 2.0.
32195
32196 Examples
32197
32198 • Stabilize a video with a fixed, medium smoothing strength:
32199
32200 -i INPUT -vf "hwupload, deshake_opencl=smooth_strength=0.5, hwdownload" OUTPUT
32201
32202 • Stabilize a video with debugging (both in console and in rendered
32203 video):
32204
32205 -i INPUT -filter_complex "[0:v]format=rgba, hwupload, deshake_opencl=debug=1, hwdownload, format=rgba, format=yuv420p" -v verbose OUTPUT
32206
32207 dilation_opencl
32208 Apply dilation effect to the video.
32209
32210 This filter replaces the pixel by the local(3x3) maximum.
32211
32212 It accepts the following options:
32213
32214 threshold0
32215 threshold1
32216 threshold2
32217 threshold3
32218 Limit the maximum change for each plane. Range is "[0, 65535]" and
32219 default value is 65535. If 0, plane will remain unchanged.
32220
32221 coordinates
32222 Flag which specifies the pixel to refer to. Range is "[0, 255]"
32223 and default value is 255, i.e. all eight pixels are used.
32224
32225 Flags to local 3x3 coordinates region centered on "x":
32226
32227 1 2 3
32228
32229 4 x 5
32230
32231 6 7 8
32232
32233 Example
32234
32235 • Apply dilation filter with threshold0 set to 30, threshold1 set 40,
32236 threshold2 set to 50 and coordinates set to 231, setting each pixel
32237 of the output to the local maximum between pixels: 1, 2, 3, 6, 7, 8
32238 of the 3x3 region centered on it in the input. If the difference
32239 between input pixel and local maximum is more then threshold of the
32240 corresponding plane, output pixel will be set to input pixel +
32241 threshold of corresponding plane.
32242
32243 -i INPUT -vf "hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
32244
32245 nlmeans_opencl
32246 Non-local Means denoise filter through OpenCL, this filter accepts same
32247 options as nlmeans.
32248
32249 overlay_opencl
32250 Overlay one video on top of another.
32251
32252 It takes two inputs and has one output. The first input is the "main"
32253 video on which the second input is overlaid. This filter requires same
32254 memory layout for all the inputs. So, format conversion may be needed.
32255
32256 The filter accepts the following options:
32257
32258 x Set the x coordinate of the overlaid video on the main video.
32259 Default value is 0.
32260
32261 y Set the y coordinate of the overlaid video on the main video.
32262 Default value is 0.
32263
32264 Examples
32265
32266 • Overlay an image LOGO at the top-left corner of the INPUT video.
32267 Both inputs are yuv420p format.
32268
32269 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
32270
32271 • The inputs have same memory layout for color channels , the overlay
32272 has additional alpha plane, like INPUT is yuv420p, and the LOGO is
32273 yuva420p.
32274
32275 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
32276
32277 pad_opencl
32278 Add paddings to the input image, and place the original input at the
32279 provided x, y coordinates.
32280
32281 It accepts the following options:
32282
32283 width, w
32284 height, h
32285 Specify an expression for the size of the output image with the
32286 paddings added. If the value for width or height is 0, the
32287 corresponding input size is used for the output.
32288
32289 The width expression can reference the value set by the height
32290 expression, and vice versa.
32291
32292 The default value of width and height is 0.
32293
32294 x
32295 y Specify the offsets to place the input image at within the padded
32296 area, with respect to the top/left border of the output image.
32297
32298 The x expression can reference the value set by the y expression,
32299 and vice versa.
32300
32301 The default value of x and y is 0.
32302
32303 If x or y evaluate to a negative number, they'll be changed so the
32304 input image is centered on the padded area.
32305
32306 color
32307 Specify the color of the padded area. For the syntax of this
32308 option, check the "Color" section in the ffmpeg-utils manual.
32309
32310 aspect
32311 Pad to an aspect instead to a resolution.
32312
32313 The value for the width, height, x, and y options are expressions
32314 containing the following constants:
32315
32316 in_w
32317 in_h
32318 The input video width and height.
32319
32320 iw
32321 ih These are the same as in_w and in_h.
32322
32323 out_w
32324 out_h
32325 The output width and height (the size of the padded area), as
32326 specified by the width and height expressions.
32327
32328 ow
32329 oh These are the same as out_w and out_h.
32330
32331 x
32332 y The x and y offsets as specified by the x and y expressions, or NAN
32333 if not yet specified.
32334
32335 a same as iw / ih
32336
32337 sar input sample aspect ratio
32338
32339 dar input display aspect ratio, it is the same as (iw / ih) * sar
32340
32341 prewitt_opencl
32342 Apply the Prewitt operator
32343 (<https://en.wikipedia.org/wiki/Prewitt_operator>) to input video
32344 stream.
32345
32346 The filter accepts the following option:
32347
32348 planes
32349 Set which planes to filter. Default value is 0xf, by which all
32350 planes are processed.
32351
32352 scale
32353 Set value which will be multiplied with filtered result. Range is
32354 "[0.0, 65535]" and default value is 1.0.
32355
32356 delta
32357 Set value which will be added to filtered result. Range is
32358 "[-65535, 65535]" and default value is 0.0.
32359
32360 Example
32361
32362 • Apply the Prewitt operator with scale set to 2 and delta set to 10.
32363
32364 -i INPUT -vf "hwupload, prewitt_opencl=scale=2:delta=10, hwdownload" OUTPUT
32365
32366 program_opencl
32367 Filter video using an OpenCL program.
32368
32369 source
32370 OpenCL program source file.
32371
32372 kernel
32373 Kernel name in program.
32374
32375 inputs
32376 Number of inputs to the filter. Defaults to 1.
32377
32378 size, s
32379 Size of output frames. Defaults to the same as the first input.
32380
32381 The "program_opencl" filter also supports the framesync options.
32382
32383 The program source file must contain a kernel function with the given
32384 name, which will be run once for each plane of the output. Each run on
32385 a plane gets enqueued as a separate 2D global NDRange with one work-
32386 item for each pixel to be generated. The global ID offset for each
32387 work-item is therefore the coordinates of a pixel in the destination
32388 image.
32389
32390 The kernel function needs to take the following arguments:
32391
32392 • Destination image, __write_only image2d_t.
32393
32394 This image will become the output; the kernel should write all of
32395 it.
32396
32397 • Frame index, unsigned int.
32398
32399 This is a counter starting from zero and increasing by one for each
32400 frame.
32401
32402 • Source images, __read_only image2d_t.
32403
32404 These are the most recent images on each input. The kernel may
32405 read from them to generate the output, but they can't be written
32406 to.
32407
32408 Example programs:
32409
32410 • Copy the input to the output (output must be the same size as the
32411 input).
32412
32413 __kernel void copy(__write_only image2d_t destination,
32414 unsigned int index,
32415 __read_only image2d_t source)
32416 {
32417 const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
32418
32419 int2 location = (int2)(get_global_id(0), get_global_id(1));
32420
32421 float4 value = read_imagef(source, sampler, location);
32422
32423 write_imagef(destination, location, value);
32424 }
32425
32426 • Apply a simple transformation, rotating the input by an amount
32427 increasing with the index counter. Pixel values are linearly
32428 interpolated by the sampler, and the output need not have the same
32429 dimensions as the input.
32430
32431 __kernel void rotate_image(__write_only image2d_t dst,
32432 unsigned int index,
32433 __read_only image2d_t src)
32434 {
32435 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
32436 CLK_FILTER_LINEAR);
32437
32438 float angle = (float)index / 100.0f;
32439
32440 float2 dst_dim = convert_float2(get_image_dim(dst));
32441 float2 src_dim = convert_float2(get_image_dim(src));
32442
32443 float2 dst_cen = dst_dim / 2.0f;
32444 float2 src_cen = src_dim / 2.0f;
32445
32446 int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
32447
32448 float2 dst_pos = convert_float2(dst_loc) - dst_cen;
32449 float2 src_pos = {
32450 cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
32451 sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
32452 };
32453 src_pos = src_pos * src_dim / dst_dim;
32454
32455 float2 src_loc = src_pos + src_cen;
32456
32457 if (src_loc.x < 0.0f || src_loc.y < 0.0f ||
32458 src_loc.x > src_dim.x || src_loc.y > src_dim.y)
32459 write_imagef(dst, dst_loc, 0.5f);
32460 else
32461 write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
32462 }
32463
32464 • Blend two inputs together, with the amount of each input used
32465 varying with the index counter.
32466
32467 __kernel void blend_images(__write_only image2d_t dst,
32468 unsigned int index,
32469 __read_only image2d_t src1,
32470 __read_only image2d_t src2)
32471 {
32472 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
32473 CLK_FILTER_LINEAR);
32474
32475 float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
32476
32477 int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
32478 int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
32479 int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
32480
32481 float4 val1 = read_imagef(src1, sampler, src1_loc);
32482 float4 val2 = read_imagef(src2, sampler, src2_loc);
32483
32484 write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
32485 }
32486
32487 remap_opencl
32488 Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
32489
32490 Destination pixel at position (X, Y) will be picked from source (x, y)
32491 position where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are
32492 out of range, zero value for pixel will be used for destination pixel.
32493
32494 Xmap and Ymap input video streams must be of same dimensions. Output
32495 video stream will have Xmap/Ymap video stream dimensions. Xmap and
32496 Ymap input video streams are 32bit float pixel format, single channel.
32497
32498 interp
32499 Specify interpolation used for remapping of pixels. Allowed values
32500 are "near" and "linear". Default value is "linear".
32501
32502 fill
32503 Specify the color of the unmapped pixels. For the syntax of this
32504 option, check the "Color" section in the ffmpeg-utils manual.
32505 Default color is "black".
32506
32507 roberts_opencl
32508 Apply the Roberts cross operator
32509 (<https://en.wikipedia.org/wiki/Roberts_cross>) to input video stream.
32510
32511 The filter accepts the following option:
32512
32513 planes
32514 Set which planes to filter. Default value is 0xf, by which all
32515 planes are processed.
32516
32517 scale
32518 Set value which will be multiplied with filtered result. Range is
32519 "[0.0, 65535]" and default value is 1.0.
32520
32521 delta
32522 Set value which will be added to filtered result. Range is
32523 "[-65535, 65535]" and default value is 0.0.
32524
32525 Example
32526
32527 • Apply the Roberts cross operator with scale set to 2 and delta set
32528 to 10
32529
32530 -i INPUT -vf "hwupload, roberts_opencl=scale=2:delta=10, hwdownload" OUTPUT
32531
32532 sobel_opencl
32533 Apply the Sobel operator
32534 (<https://en.wikipedia.org/wiki/Sobel_operator>) to input video stream.
32535
32536 The filter accepts the following option:
32537
32538 planes
32539 Set which planes to filter. Default value is 0xf, by which all
32540 planes are processed.
32541
32542 scale
32543 Set value which will be multiplied with filtered result. Range is
32544 "[0.0, 65535]" and default value is 1.0.
32545
32546 delta
32547 Set value which will be added to filtered result. Range is
32548 "[-65535, 65535]" and default value is 0.0.
32549
32550 Example
32551
32552 • Apply sobel operator with scale set to 2 and delta set to 10
32553
32554 -i INPUT -vf "hwupload, sobel_opencl=scale=2:delta=10, hwdownload" OUTPUT
32555
32556 tonemap_opencl
32557 Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
32558
32559 It accepts the following parameters:
32560
32561 tonemap
32562 Specify the tone-mapping operator to be used. Same as tonemap
32563 option in tonemap.
32564
32565 param
32566 Tune the tone mapping algorithm. same as param option in tonemap.
32567
32568 desat
32569 Apply desaturation for highlights that exceed this level of
32570 brightness. The higher the parameter, the more color information
32571 will be preserved. This setting helps prevent unnaturally blown-out
32572 colors for super-highlights, by (smoothly) turning into white
32573 instead. This makes images feel more natural, at the cost of
32574 reducing information about out-of-range colors.
32575
32576 The default value is 0.5, and the algorithm here is a little
32577 different from the cpu version tonemap currently. A setting of 0.0
32578 disables this option.
32579
32580 threshold
32581 The tonemapping algorithm parameters is fine-tuned per each scene.
32582 And a threshold is used to detect whether the scene has changed or
32583 not. If the distance between the current frame average brightness
32584 and the current running average exceeds a threshold value, we would
32585 re-calculate scene average and peak brightness. The default value
32586 is 0.2.
32587
32588 format
32589 Specify the output pixel format.
32590
32591 Currently supported formats are:
32592
32593 p010
32594 nv12
32595 range, r
32596 Set the output color range.
32597
32598 Possible values are:
32599
32600 tv/mpeg
32601 pc/jpeg
32602
32603 Default is same as input.
32604
32605 primaries, p
32606 Set the output color primaries.
32607
32608 Possible values are:
32609
32610 bt709
32611 bt2020
32612
32613 Default is same as input.
32614
32615 transfer, t
32616 Set the output transfer characteristics.
32617
32618 Possible values are:
32619
32620 bt709
32621 bt2020
32622
32623 Default is bt709.
32624
32625 matrix, m
32626 Set the output colorspace matrix.
32627
32628 Possible value are:
32629
32630 bt709
32631 bt2020
32632
32633 Default is same as input.
32634
32635 Example
32636
32637 • Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010
32638 format using linear operator.
32639
32640 -i INPUT -vf "format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010" OUTPUT
32641
32642 unsharp_opencl
32643 Sharpen or blur the input video.
32644
32645 It accepts the following parameters:
32646
32647 luma_msize_x, lx
32648 Set the luma matrix horizontal size. Range is "[1, 23]" and
32649 default value is 5.
32650
32651 luma_msize_y, ly
32652 Set the luma matrix vertical size. Range is "[1, 23]" and default
32653 value is 5.
32654
32655 luma_amount, la
32656 Set the luma effect strength. Range is "[-10, 10]" and default
32657 value is 1.0.
32658
32659 Negative values will blur the input video, while positive values
32660 will sharpen it, a value of zero will disable the effect.
32661
32662 chroma_msize_x, cx
32663 Set the chroma matrix horizontal size. Range is "[1, 23]" and
32664 default value is 5.
32665
32666 chroma_msize_y, cy
32667 Set the chroma matrix vertical size. Range is "[1, 23]" and
32668 default value is 5.
32669
32670 chroma_amount, ca
32671 Set the chroma effect strength. Range is "[-10, 10]" and default
32672 value is 0.0.
32673
32674 Negative values will blur the input video, while positive values
32675 will sharpen it, a value of zero will disable the effect.
32676
32677 All parameters are optional and default to the equivalent of the string
32678 '5:5:1.0:5:5:0.0'.
32679
32680 Examples
32681
32682 • Apply strong luma sharpen effect:
32683
32684 -i INPUT -vf "hwupload, unsharp_opencl=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5, hwdownload" OUTPUT
32685
32686 • Apply a strong blur of both luma and chroma parameters:
32687
32688 -i INPUT -vf "hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload" OUTPUT
32689
32690 xfade_opencl
32691 Cross fade two videos with custom transition effect by using OpenCL.
32692
32693 It accepts the following options:
32694
32695 transition
32696 Set one of possible transition effects.
32697
32698 custom
32699 Select custom transition effect, the actual transition
32700 description will be picked from source and kernel options.
32701
32702 fade
32703 wipeleft
32704 wiperight
32705 wipeup
32706 wipedown
32707 slideleft
32708 slideright
32709 slideup
32710 slidedown
32711 Default transition is fade.
32712
32713 source
32714 OpenCL program source file for custom transition.
32715
32716 kernel
32717 Set name of kernel to use for custom transition from program source
32718 file.
32719
32720 duration
32721 Set duration of video transition.
32722
32723 offset
32724 Set time of start of transition relative to first video.
32725
32726 The program source file must contain a kernel function with the given
32727 name, which will be run once for each plane of the output. Each run on
32728 a plane gets enqueued as a separate 2D global NDRange with one work-
32729 item for each pixel to be generated. The global ID offset for each
32730 work-item is therefore the coordinates of a pixel in the destination
32731 image.
32732
32733 The kernel function needs to take the following arguments:
32734
32735 • Destination image, __write_only image2d_t.
32736
32737 This image will become the output; the kernel should write all of
32738 it.
32739
32740 • First Source image, __read_only image2d_t. Second Source image,
32741 __read_only image2d_t.
32742
32743 These are the most recent images on each input. The kernel may
32744 read from them to generate the output, but they can't be written
32745 to.
32746
32747 • Transition progress, float. This value is always between 0 and 1
32748 inclusive.
32749
32750 Example programs:
32751
32752 • Apply dots curtain transition effect:
32753
32754 __kernel void blend_images(__write_only image2d_t dst,
32755 __read_only image2d_t src1,
32756 __read_only image2d_t src2,
32757 float progress)
32758 {
32759 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
32760 CLK_FILTER_LINEAR);
32761 int2 p = (int2)(get_global_id(0), get_global_id(1));
32762 float2 rp = (float2)(get_global_id(0), get_global_id(1));
32763 float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
32764 rp = rp / dim;
32765
32766 float2 dots = (float2)(20.0, 20.0);
32767 float2 center = (float2)(0,0);
32768 float2 unused;
32769
32770 float4 val1 = read_imagef(src1, sampler, p);
32771 float4 val2 = read_imagef(src2, sampler, p);
32772 bool next = distance(fract(rp * dots, &unused), (float2)(0.5, 0.5)) < (progress / distance(rp, center));
32773
32774 write_imagef(dst, p, next ? val1 : val2);
32775 }
32776
32778 VAAPI Video filters are usually used with VAAPI decoder and VAAPI
32779 encoder. Below is a description of VAAPI video filters.
32780
32781 To enable compilation of these filters you need to configure FFmpeg
32782 with "--enable-vaapi".
32783
32784 To use vaapi filters, you need to setup the vaapi device correctly. For
32785 more information, please read
32786 <https://trac.ffmpeg.org/wiki/Hardware/VAAPI>
32787
32788 overlay_vaapi
32789 Overlay one video on the top of another.
32790
32791 It takes two inputs and has one output. The first input is the "main"
32792 video on which the second input is overlaid.
32793
32794 The filter accepts the following options:
32795
32796 x
32797 y Set expressions for the x and y coordinates of the overlaid video
32798 on the main video.
32799
32800 Default value is "0" for both expressions.
32801
32802 w
32803 h Set expressions for the width and height the overlaid video on the
32804 main video.
32805
32806 Default values are 'overlay_iw' for 'w' and
32807 'overlay_ih*w/overlay_iw' for 'h'.
32808
32809 The expressions can contain the following parameters:
32810
32811 main_w, W
32812 main_h, H
32813 The main input width and height.
32814
32815 overlay_iw
32816 overlay_ih
32817 The overlay input width and height.
32818
32819 overlay_w, w
32820 overlay_h, h
32821 The overlay output width and height.
32822
32823 overlay_x, x
32824 overlay_y, y
32825 Position of the overlay layer inside of main
32826
32827 alpha
32828 Set transparency of overlaid video. Allowed range is 0.0 to 1.0.
32829 Higher value means lower transparency. Default value is 1.0.
32830
32831 eof_action
32832 See framesync.
32833
32834 shortest
32835 See framesync.
32836
32837 repeatlast
32838 See framesync.
32839
32840 This filter also supports the framesync options.
32841
32842 Examples
32843
32844 • Overlay an image LOGO at the top-left corner of the INPUT video.
32845 Both inputs for this filter are yuv420p format.
32846
32847 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_vaapi" OUTPUT
32848
32849 • Overlay an image LOGO at the offset (200, 100) from the top-left
32850 corner of the INPUT video. The inputs have same memory layout for
32851 color channels, the overlay has additional alpha plane, like INPUT
32852 is yuv420p, and the LOGO is yuva420p.
32853
32854 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_vaapi=x=200:y=100:w=400:h=300:alpha=1.0, hwdownload, format=nv12" OUTPUT
32855
32856 tonemap_vaapi
32857 Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range)
32858 conversion with tone-mapping. It maps the dynamic range of HDR10
32859 content to the SDR content. It currently only accepts HDR10 as input.
32860
32861 It accepts the following parameters:
32862
32863 format
32864 Specify the output pixel format.
32865
32866 Currently supported formats are:
32867
32868 p010
32869 nv12
32870
32871 Default is nv12.
32872
32873 primaries, p
32874 Set the output color primaries.
32875
32876 Default is same as input.
32877
32878 transfer, t
32879 Set the output transfer characteristics.
32880
32881 Default is bt709.
32882
32883 matrix, m
32884 Set the output colorspace matrix.
32885
32886 Default is same as input.
32887
32888 Example
32889
32890 • Convert HDR(HDR10) video to bt2020-transfer-characteristic p010
32891 format
32892
32893 tonemap_vaapi=format=p010:t=bt2020-10
32894
32895 hstack_vaapi
32896 Stack input videos horizontally.
32897
32898 This is the VA-API variant of the hstack filter, each input stream may
32899 have different height, this filter will scale down/up each input stream
32900 while keeping the orignal aspect.
32901
32902 It accepts the following options:
32903
32904 inputs
32905 See hstack.
32906
32907 shortest
32908 See hstack.
32909
32910 height
32911 Set height of output. If set to 0, this filter will set height of
32912 output to height of the first input stream. Default value is 0.
32913
32914 vstack_vaapi
32915 Stack input videos vertically.
32916
32917 This is the VA-API variant of the vstack filter, each input stream may
32918 have different width, this filter will scale down/up each input stream
32919 while keeping the orignal aspect.
32920
32921 It accepts the following options:
32922
32923 inputs
32924 See vstack.
32925
32926 shortest
32927 See vstack.
32928
32929 width
32930 Set width of output. If set to 0, this filter will set width of
32931 output to width of the first input stream. Default value is 0.
32932
32933 xstack_vaapi
32934 Stack video inputs into custom layout.
32935
32936 This is the VA-API variant of the xstack filter, each input stream may
32937 have different size, this filter will scale down/up each input stream
32938 to the given output size, or the size of the first input stream.
32939
32940 It accepts the following options:
32941
32942 inputs
32943 See xstack.
32944
32945 shortest
32946 See xstack.
32947
32948 layout
32949 See xstack. Moreover, this permits the user to supply output size
32950 for each input stream.
32951
32952 xstack_vaapi=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080
32953
32954 grid
32955 See xstack.
32956
32957 grid_tile_size
32958 Set output size for each input stream when grid is set. If this
32959 option is not set, this filter will set output size by default to
32960 the size of the first input stream. For the syntax of this option,
32961 check the "Video size" section in the ffmpeg-utils manual.
32962
32963 fill
32964 See xstack.
32965
32967 Below is a description of the currently available QSV video filters.
32968
32969 To enable compilation of these filters you need to configure FFmpeg
32970 with "--enable-libmfx" or "--enable-libvpl".
32971
32972 To use QSV filters, you need to setup the QSV device correctly. For
32973 more information, please read
32974 <https://trac.ffmpeg.org/wiki/Hardware/QuickSync>
32975
32976 hstack_qsv
32977 Stack input videos horizontally.
32978
32979 This is the QSV variant of the hstack filter, each input stream may
32980 have different height, this filter will scale down/up each input stream
32981 while keeping the orignal aspect.
32982
32983 It accepts the following options:
32984
32985 inputs
32986 See hstack.
32987
32988 shortest
32989 See hstack.
32990
32991 height
32992 Set height of output. If set to 0, this filter will set height of
32993 output to height of the first input stream. Default value is 0.
32994
32995 vstack_qsv
32996 Stack input videos vertically.
32997
32998 This is the QSV variant of the vstack filter, each input stream may
32999 have different width, this filter will scale down/up each input stream
33000 while keeping the orignal aspect.
33001
33002 It accepts the following options:
33003
33004 inputs
33005 See vstack.
33006
33007 shortest
33008 See vstack.
33009
33010 width
33011 Set width of output. If set to 0, this filter will set width of
33012 output to width of the first input stream. Default value is 0.
33013
33014 xstack_qsv
33015 Stack video inputs into custom layout.
33016
33017 This is the QSV variant of the xstack filter.
33018
33019 It accepts the following options:
33020
33021 inputs
33022 See xstack.
33023
33024 shortest
33025 See xstack.
33026
33027 layout
33028 See xstack. Moreover, this permits the user to supply output size
33029 for each input stream.
33030
33031 xstack_qsv=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080
33032
33033 grid
33034 See xstack.
33035
33036 grid_tile_size
33037 Set output size for each input stream when grid is set. If this
33038 option is not set, this filter will set output size by default to
33039 the size of the first input stream. For the syntax of this option,
33040 check the "Video size" section in the ffmpeg-utils manual.
33041
33042 fill
33043 See xstack.
33044
33046 Below is a description of the currently available video sources.
33047
33048 buffer
33049 Buffer video frames, and make them available to the filter chain.
33050
33051 This source is mainly intended for a programmatic use, in particular
33052 through the interface defined in libavfilter/buffersrc.h.
33053
33054 It accepts the following parameters:
33055
33056 video_size
33057 Specify the size (width and height) of the buffered video frames.
33058 For the syntax of this option, check the "Video size" section in
33059 the ffmpeg-utils manual.
33060
33061 width
33062 The input video width.
33063
33064 height
33065 The input video height.
33066
33067 pix_fmt
33068 A string representing the pixel format of the buffered video
33069 frames. It may be a number corresponding to a pixel format, or a
33070 pixel format name.
33071
33072 time_base
33073 Specify the timebase assumed by the timestamps of the buffered
33074 frames.
33075
33076 frame_rate
33077 Specify the frame rate expected for the video stream.
33078
33079 pixel_aspect, sar
33080 The sample (pixel) aspect ratio of the input video.
33081
33082 hw_frames_ctx
33083 When using a hardware pixel format, this should be a reference to
33084 an AVHWFramesContext describing input frames.
33085
33086 For example:
33087
33088 buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
33089
33090 will instruct the source to accept video frames with size 320x240 and
33091 with format "yuv410p", assuming 1/24 as the timestamps timebase and
33092 square pixels (1:1 sample aspect ratio). Since the pixel format with
33093 name "yuv410p" corresponds to the number 6 (check the enum
33094 AVPixelFormat definition in libavutil/pixfmt.h), this example
33095 corresponds to:
33096
33097 buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
33098
33099 Alternatively, the options can be specified as a flat string, but this
33100 syntax is deprecated:
33101
33102 width:height:pix_fmt:time_base.num:time_base.den:pixel_aspect.num:pixel_aspect.den
33103
33104 cellauto
33105 Create a pattern generated by an elementary cellular automaton.
33106
33107 The initial state of the cellular automaton can be defined through the
33108 filename and pattern options. If such options are not specified an
33109 initial state is created randomly.
33110
33111 At each new frame a new row in the video is filled with the result of
33112 the cellular automaton next generation. The behavior when the whole
33113 frame is filled is defined by the scroll option.
33114
33115 This source accepts the following options:
33116
33117 filename, f
33118 Read the initial cellular automaton state, i.e. the starting row,
33119 from the specified file. In the file, each non-whitespace
33120 character is considered an alive cell, a newline will terminate the
33121 row, and further characters in the file will be ignored.
33122
33123 pattern, p
33124 Read the initial cellular automaton state, i.e. the starting row,
33125 from the specified string.
33126
33127 Each non-whitespace character in the string is considered an alive
33128 cell, a newline will terminate the row, and further characters in
33129 the string will be ignored.
33130
33131 rate, r
33132 Set the video rate, that is the number of frames generated per
33133 second. Default is 25.
33134
33135 random_fill_ratio, ratio
33136 Set the random fill ratio for the initial cellular automaton row.
33137 It is a floating point number value ranging from 0 to 1, defaults
33138 to 1/PHI.
33139
33140 This option is ignored when a file or a pattern is specified.
33141
33142 random_seed, seed
33143 Set the seed for filling randomly the initial row, must be an
33144 integer included between 0 and UINT32_MAX. If not specified, or if
33145 explicitly set to -1, the filter will try to use a good random seed
33146 on a best effort basis.
33147
33148 rule
33149 Set the cellular automaton rule, it is a number ranging from 0 to
33150 255. Default value is 110.
33151
33152 size, s
33153 Set the size of the output video. For the syntax of this option,
33154 check the "Video size" section in the ffmpeg-utils manual.
33155
33156 If filename or pattern is specified, the size is set by default to
33157 the width of the specified initial state row, and the height is set
33158 to width * PHI.
33159
33160 If size is set, it must contain the width of the specified pattern
33161 string, and the specified pattern will be centered in the larger
33162 row.
33163
33164 If a filename or a pattern string is not specified, the size value
33165 defaults to "320x518" (used for a randomly generated initial
33166 state).
33167
33168 scroll
33169 If set to 1, scroll the output upward when all the rows in the
33170 output have been already filled. If set to 0, the new generated row
33171 will be written over the top row just after the bottom row is
33172 filled. Defaults to 1.
33173
33174 start_full, full
33175 If set to 1, completely fill the output with generated rows before
33176 outputting the first frame. This is the default behavior, for
33177 disabling set the value to 0.
33178
33179 stitch
33180 If set to 1, stitch the left and right row edges together. This is
33181 the default behavior, for disabling set the value to 0.
33182
33183 Examples
33184
33185 • Read the initial state from pattern, and specify an output of size
33186 200x400.
33187
33188 cellauto=f=pattern:s=200x400
33189
33190 • Generate a random initial row with a width of 200 cells, with a
33191 fill ratio of 2/3:
33192
33193 cellauto=ratio=2/3:s=200x200
33194
33195 • Create a pattern generated by rule 18 starting by a single alive
33196 cell centered on an initial row with width 100:
33197
33198 cellauto=p=@s=100x400:full=0:rule=18
33199
33200 • Specify a more elaborated initial pattern:
33201
33202 cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
33203
33204 coreimagesrc
33205 Video source generated on GPU using Apple's CoreImage API on OSX.
33206
33207 This video source is a specialized version of the coreimage video
33208 filter. Use a core image generator at the beginning of the applied
33209 filterchain to generate the content.
33210
33211 The coreimagesrc video source accepts the following options:
33212
33213 list_generators
33214 List all available generators along with all their respective
33215 options as well as possible minimum and maximum values along with
33216 the default values.
33217
33218 list_generators=true
33219
33220 size, s
33221 Specify the size of the sourced video. For the syntax of this
33222 option, check the "Video size" section in the ffmpeg-utils manual.
33223 The default value is "320x240".
33224
33225 rate, r
33226 Specify the frame rate of the sourced video, as the number of
33227 frames generated per second. It has to be a string in the format
33228 frame_rate_num/frame_rate_den, an integer number, a floating point
33229 number or a valid video frame rate abbreviation. The default value
33230 is "25".
33231
33232 sar Set the sample aspect ratio of the sourced video.
33233
33234 duration, d
33235 Set the duration of the sourced video. See the Time duration
33236 section in the ffmpeg-utils(1) manual for the accepted syntax.
33237
33238 If not specified, or the expressed duration is negative, the video
33239 is supposed to be generated forever.
33240
33241 Additionally, all options of the coreimage video filter are accepted.
33242 A complete filterchain can be used for further processing of the
33243 generated input without CPU-HOST transfer. See coreimage documentation
33244 and examples for details.
33245
33246 Examples
33247
33248 • Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
33249 given as complete and escaped command-line for Apple's standard
33250 bash shell:
33251
33252 ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
33253
33254 This example is equivalent to the QRCode example of coreimage
33255 without the need for a nullsrc video source.
33256
33257 ddagrab
33258 Captures the Windows Desktop via Desktop Duplication API.
33259
33260 The filter exclusively returns D3D11 Hardware Frames, for on-gpu
33261 encoding or processing. So an explicit hwdownload is needed for any
33262 kind of software processing.
33263
33264 It accepts the following options:
33265
33266 output_idx
33267 DXGI Output Index to capture.
33268
33269 Usually corresponds to the index Windows has given the screen minus
33270 one, so it's starting at 0.
33271
33272 Defaults to output 0.
33273
33274 draw_mouse
33275 Whether to draw the mouse cursor.
33276
33277 Defaults to true.
33278
33279 Only affects hardware cursors. If a game or application renders its
33280 own cursor, it'll always be captured.
33281
33282 framerate
33283 Framerate at which the desktop will be captured.
33284
33285 Defaults to 30 FPS.
33286
33287 video_size
33288 Specify the size of the captured video.
33289
33290 Defaults to the full size of the screen.
33291
33292 Cropped from the bottom/right if smaller than screen size.
33293
33294 offset_x
33295 Horizontal offset of the captured video.
33296
33297 offset_y
33298 Vertical offset of the captured video.
33299
33300 output_fmt
33301 Desired filter output format. Defaults to 8 Bit BGRA.
33302
33303 It accepts the following values:
33304
33305 auto
33306 Passes all supported output formats to DDA and returns what DDA
33307 decides to use.
33308
33309 8bit
33310 bgra
33311 8 Bit formats always work, and DDA will convert to them if
33312 neccesary.
33313
33314 10bit
33315 x2bgr10
33316 Filter initialization will fail if 10 bit format is requested
33317 but unavailable.
33318
33319 Examples
33320
33321 Capture primary screen and encode using nvenc:
33322
33323 ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 output.mp4
33324
33325 You can also skip the lavfi device and directly use the filter. Also
33326 demonstrates downloading the frame and encoding with libx264. Explicit
33327 output format specification is required in this case:
33328
33329 ffmpeg -filter_complex ddagrab=output_idx=1:framerate=60,hwdownload,format=bgra -c:v libx264 -crf 18 output.mp4
33330
33331 If you want to capture only a subsection of the desktop, this can be
33332 achieved by specifying a smaller size and its offsets into the screen:
33333
33334 ddagrab=video_size=800x600:offset_x=100:offset_y=100
33335
33336 gradients
33337 Generate several gradients.
33338
33339 size, s
33340 Set frame size. For the syntax of this option, check the "Video
33341 size" section in the ffmpeg-utils manual. Default value is
33342 "640x480".
33343
33344 rate, r
33345 Set frame rate, expressed as number of frames per second. Default
33346 value is "25".
33347
33348 c0, c1, c2, c3, c4, c5, c6, c7
33349 Set 8 colors. Default values for colors is to pick random one.
33350
33351 x0, y0, y0, y1
33352 Set gradient line source and destination points. If negative or out
33353 of range, random ones are picked.
33354
33355 nb_colors, n
33356 Set number of colors to use at once. Allowed range is from 2 to 8.
33357 Default value is 2.
33358
33359 seed
33360 Set seed for picking gradient line points.
33361
33362 duration, d
33363 Set the duration of the sourced video. See the Time duration
33364 section in the ffmpeg-utils(1) manual for the accepted syntax.
33365
33366 If not specified, or the expressed duration is negative, the video
33367 is supposed to be generated forever.
33368
33369 speed
33370 Set speed of gradients rotation.
33371
33372 type, t
33373 Set type of gradients, can be "linear" or "radial" or "circular" or
33374 "spiral".
33375
33376 mandelbrot
33377 Generate a Mandelbrot set fractal, and progressively zoom towards the
33378 point specified with start_x and start_y.
33379
33380 This source accepts the following options:
33381
33382 end_pts
33383 Set the terminal pts value. Default value is 400.
33384
33385 end_scale
33386 Set the terminal scale value. Must be a floating point value.
33387 Default value is 0.3.
33388
33389 inner
33390 Set the inner coloring mode, that is the algorithm used to draw the
33391 Mandelbrot fractal internal region.
33392
33393 It shall assume one of the following values:
33394
33395 black
33396 Set black mode.
33397
33398 convergence
33399 Show time until convergence.
33400
33401 mincol
33402 Set color based on point closest to the origin of the
33403 iterations.
33404
33405 period
33406 Set period mode.
33407
33408 Default value is mincol.
33409
33410 bailout
33411 Set the bailout value. Default value is 10.0.
33412
33413 maxiter
33414 Set the maximum of iterations performed by the rendering algorithm.
33415 Default value is 7189.
33416
33417 outer
33418 Set outer coloring mode. It shall assume one of following values:
33419
33420 iteration_count
33421 Set iteration count mode.
33422
33423 normalized_iteration_count
33424 set normalized iteration count mode.
33425
33426 Default value is normalized_iteration_count.
33427
33428 rate, r
33429 Set frame rate, expressed as number of frames per second. Default
33430 value is "25".
33431
33432 size, s
33433 Set frame size. For the syntax of this option, check the "Video
33434 size" section in the ffmpeg-utils manual. Default value is
33435 "640x480".
33436
33437 start_scale
33438 Set the initial scale value. Default value is 3.0.
33439
33440 start_x
33441 Set the initial x position. Must be a floating point value between
33442 -100 and 100. Default value is
33443 -0.743643887037158704752191506114774.
33444
33445 start_y
33446 Set the initial y position. Must be a floating point value between
33447 -100 and 100. Default value is
33448 -0.131825904205311970493132056385139.
33449
33450 mptestsrc
33451 Generate various test patterns, as generated by the MPlayer test
33452 filter.
33453
33454 The size of the generated video is fixed, and is 256x256. This source
33455 is useful in particular for testing encoding features.
33456
33457 This source accepts the following options:
33458
33459 rate, r
33460 Specify the frame rate of the sourced video, as the number of
33461 frames generated per second. It has to be a string in the format
33462 frame_rate_num/frame_rate_den, an integer number, a floating point
33463 number or a valid video frame rate abbreviation. The default value
33464 is "25".
33465
33466 duration, d
33467 Set the duration of the sourced video. See the Time duration
33468 section in the ffmpeg-utils(1) manual for the accepted syntax.
33469
33470 If not specified, or the expressed duration is negative, the video
33471 is supposed to be generated forever.
33472
33473 test, t
33474 Set the number or the name of the test to perform. Supported tests
33475 are:
33476
33477 dc_luma
33478 dc_chroma
33479 freq_luma
33480 freq_chroma
33481 amp_luma
33482 amp_chroma
33483 cbp
33484 mv
33485 ring1
33486 ring2
33487 all
33488 max_frames, m
33489 Set the maximum number of frames generated for each test,
33490 default value is 30.
33491
33492 Default value is "all", which will cycle through the list of all
33493 tests.
33494
33495 Some examples:
33496
33497 mptestsrc=t=dc_luma
33498
33499 will generate a "dc_luma" test pattern.
33500
33501 frei0r_src
33502 Provide a frei0r source.
33503
33504 To enable compilation of this filter you need to install the frei0r
33505 header and configure FFmpeg with "--enable-frei0r".
33506
33507 This source accepts the following parameters:
33508
33509 size
33510 The size of the video to generate. For the syntax of this option,
33511 check the "Video size" section in the ffmpeg-utils manual.
33512
33513 framerate
33514 The framerate of the generated video. It may be a string of the
33515 form num/den or a frame rate abbreviation.
33516
33517 filter_name
33518 The name to the frei0r source to load. For more information
33519 regarding frei0r and how to set the parameters, read the frei0r
33520 section in the video filters documentation.
33521
33522 filter_params
33523 A '|'-separated list of parameters to pass to the frei0r source.
33524
33525 For example, to generate a frei0r partik0l source with size 200x200 and
33526 frame rate 10 which is overlaid on the overlay filter main input:
33527
33528 frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
33529
33530 life
33531 Generate a life pattern.
33532
33533 This source is based on a generalization of John Conway's life game.
33534
33535 The sourced input represents a life grid, each pixel represents a cell
33536 which can be in one of two possible states, alive or dead. Every cell
33537 interacts with its eight neighbours, which are the cells that are
33538 horizontally, vertically, or diagonally adjacent.
33539
33540 At each interaction the grid evolves according to the adopted rule,
33541 which specifies the number of neighbor alive cells which will make a
33542 cell stay alive or born. The rule option allows one to specify the rule
33543 to adopt.
33544
33545 This source accepts the following options:
33546
33547 filename, f
33548 Set the file from which to read the initial grid state. In the
33549 file, each non-whitespace character is considered an alive cell,
33550 and newline is used to delimit the end of each row.
33551
33552 If this option is not specified, the initial grid is generated
33553 randomly.
33554
33555 rate, r
33556 Set the video rate, that is the number of frames generated per
33557 second. Default is 25.
33558
33559 random_fill_ratio, ratio
33560 Set the random fill ratio for the initial random grid. It is a
33561 floating point number value ranging from 0 to 1, defaults to 1/PHI.
33562 It is ignored when a file is specified.
33563
33564 random_seed, seed
33565 Set the seed for filling the initial random grid, must be an
33566 integer included between 0 and UINT32_MAX. If not specified, or if
33567 explicitly set to -1, the filter will try to use a good random seed
33568 on a best effort basis.
33569
33570 rule
33571 Set the life rule.
33572
33573 A rule can be specified with a code of the kind "SNS/BNB", where NS
33574 and NB are sequences of numbers in the range 0-8, NS specifies the
33575 number of alive neighbor cells which make a live cell stay alive,
33576 and NB the number of alive neighbor cells which make a dead cell to
33577 become alive (i.e. to "born"). "s" and "b" can be used in place of
33578 "S" and "B", respectively.
33579
33580 Alternatively a rule can be specified by an 18-bits integer. The 9
33581 high order bits are used to encode the next cell state if it is
33582 alive for each number of neighbor alive cells, the low order bits
33583 specify the rule for "borning" new cells. Higher order bits encode
33584 for an higher number of neighbor cells. For example the number
33585 6153 = "(12<<9)+9" specifies a stay alive rule of 12 and a born
33586 rule of 9, which corresponds to "S23/B03".
33587
33588 Default value is "S23/B3", which is the original Conway's game of
33589 life rule, and will keep a cell alive if it has 2 or 3 neighbor
33590 alive cells, and will born a new cell if there are three alive
33591 cells around a dead cell.
33592
33593 size, s
33594 Set the size of the output video. For the syntax of this option,
33595 check the "Video size" section in the ffmpeg-utils manual.
33596
33597 If filename is specified, the size is set by default to the same
33598 size of the input file. If size is set, it must contain the size
33599 specified in the input file, and the initial grid defined in that
33600 file is centered in the larger resulting area.
33601
33602 If a filename is not specified, the size value defaults to
33603 "320x240" (used for a randomly generated initial grid).
33604
33605 stitch
33606 If set to 1, stitch the left and right grid edges together, and the
33607 top and bottom edges also. Defaults to 1.
33608
33609 mold
33610 Set cell mold speed. If set, a dead cell will go from death_color
33611 to mold_color with a step of mold. mold can have a value from 0 to
33612 255.
33613
33614 life_color
33615 Set the color of living (or new born) cells.
33616
33617 death_color
33618 Set the color of dead cells. If mold is set, this is the first
33619 color used to represent a dead cell.
33620
33621 mold_color
33622 Set mold color, for definitely dead and moldy cells.
33623
33624 For the syntax of these 3 color options, check the "Color" section
33625 in the ffmpeg-utils manual.
33626
33627 Examples
33628
33629 • Read a grid from pattern, and center it on a grid of size 300x300
33630 pixels:
33631
33632 life=f=pattern:s=300x300
33633
33634 • Generate a random grid of size 200x200, with a fill ratio of 2/3:
33635
33636 life=ratio=2/3:s=200x200
33637
33638 • Specify a custom rule for evolving a randomly generated grid:
33639
33640 life=rule=S14/B34
33641
33642 • Full example with slow death effect (mold) using ffplay:
33643
33644 ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
33645
33646 allrgb, allyuv, color, colorchart, colorspectrum, haldclutsrc, nullsrc,
33647 pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc,
33648 testsrc2, yuvtestsrc
33649 The "allrgb" source returns frames of size 4096x4096 of all rgb colors.
33650
33651 The "allyuv" source returns frames of size 4096x4096 of all yuv colors.
33652
33653 The "color" source provides an uniformly colored input.
33654
33655 The "colorchart" source provides a colors checker chart.
33656
33657 The "colorspectrum" source provides a color spectrum input.
33658
33659 The "haldclutsrc" source provides an identity Hald CLUT. See also
33660 haldclut filter.
33661
33662 The "nullsrc" source returns unprocessed video frames. It is mainly
33663 useful to be employed in analysis / debugging tools, or as the source
33664 for filters which ignore the input data.
33665
33666 The "pal75bars" source generates a color bars pattern, based on EBU PAL
33667 recommendations with 75% color levels.
33668
33669 The "pal100bars" source generates a color bars pattern, based on EBU
33670 PAL recommendations with 100% color levels.
33671
33672 The "rgbtestsrc" source generates an RGB test pattern useful for
33673 detecting RGB vs BGR issues. You should see a red, green and blue
33674 stripe from top to bottom.
33675
33676 The "smptebars" source generates a color bars pattern, based on the
33677 SMPTE Engineering Guideline EG 1-1990.
33678
33679 The "smptehdbars" source generates a color bars pattern, based on the
33680 SMPTE RP 219-2002.
33681
33682 The "testsrc" source generates a test video pattern, showing a color
33683 pattern, a scrolling gradient and a timestamp. This is mainly intended
33684 for testing purposes.
33685
33686 The "testsrc2" source is similar to testsrc, but supports more pixel
33687 formats instead of just "rgb24". This allows using it as an input for
33688 other tests without requiring a format conversion.
33689
33690 The "yuvtestsrc" source generates an YUV test pattern. You should see a
33691 y, cb and cr stripe from top to bottom.
33692
33693 The sources accept the following parameters:
33694
33695 level
33696 Specify the level of the Hald CLUT, only available in the
33697 "haldclutsrc" source. A level of "N" generates a picture of "N*N*N"
33698 by "N*N*N" pixels to be used as identity matrix for 3D lookup
33699 tables. Each component is coded on a "1/(N*N)" scale.
33700
33701 color, c
33702 Specify the color of the source, only available in the "color"
33703 source. For the syntax of this option, check the "Color" section in
33704 the ffmpeg-utils manual.
33705
33706 size, s
33707 Specify the size of the sourced video. For the syntax of this
33708 option, check the "Video size" section in the ffmpeg-utils manual.
33709 The default value is "320x240".
33710
33711 This option is not available with the "allrgb", "allyuv", and
33712 "haldclutsrc" filters.
33713
33714 rate, r
33715 Specify the frame rate of the sourced video, as the number of
33716 frames generated per second. It has to be a string in the format
33717 frame_rate_num/frame_rate_den, an integer number, a floating point
33718 number or a valid video frame rate abbreviation. The default value
33719 is "25".
33720
33721 duration, d
33722 Set the duration of the sourced video. See the Time duration
33723 section in the ffmpeg-utils(1) manual for the accepted syntax.
33724
33725 If not specified, or the expressed duration is negative, the video
33726 is supposed to be generated forever.
33727
33728 Since the frame rate is used as time base, all frames including the
33729 last one will have their full duration. If the specified duration
33730 is not a multiple of the frame duration, it will be rounded up.
33731
33732 sar Set the sample aspect ratio of the sourced video.
33733
33734 alpha
33735 Specify the alpha (opacity) of the background, only available in
33736 the "testsrc2" source. The value must be between 0 (fully
33737 transparent) and 255 (fully opaque, the default).
33738
33739 decimals, n
33740 Set the number of decimals to show in the timestamp, only available
33741 in the "testsrc" source.
33742
33743 The displayed timestamp value will correspond to the original
33744 timestamp value multiplied by the power of 10 of the specified
33745 value. Default value is 0.
33746
33747 type
33748 Set the type of the color spectrum, only available in the
33749 "colorspectrum" source. Can be one of the following:
33750
33751 black
33752 white
33753 all
33754 patch_size
33755 Set patch size of single color patch, only available in the
33756 "colorchart" source. Default is "64x64".
33757
33758 preset
33759 Set colorchecker colors preset, only available in the "colorchart"
33760 source.
33761
33762 Available values are:
33763
33764 reference
33765 skintones
33766
33767 Default value is "reference".
33768
33769 Examples
33770
33771 • Generate a video with a duration of 5.3 seconds, with size 176x144
33772 and a frame rate of 10 frames per second:
33773
33774 testsrc=duration=5.3:size=qcif:rate=10
33775
33776 • The following graph description will generate a red source with an
33777 opacity of 0.2, with size "qcif" and a frame rate of 10 frames per
33778 second:
33779
33780 color=c=red@0.2:s=qcif:r=10
33781
33782 • If the input content is to be ignored, "nullsrc" can be used. The
33783 following command generates noise in the luminance plane by
33784 employing the "geq" filter:
33785
33786 nullsrc=s=256x256, geq=random(1)*255:128:128
33787
33788 Commands
33789
33790 The "color" source supports the following commands:
33791
33792 c, color
33793 Set the color of the created image. Accepts the same syntax of the
33794 corresponding color option.
33795
33796 openclsrc
33797 Generate video using an OpenCL program.
33798
33799 source
33800 OpenCL program source file.
33801
33802 kernel
33803 Kernel name in program.
33804
33805 size, s
33806 Size of frames to generate. This must be set.
33807
33808 format
33809 Pixel format to use for the generated frames. This must be set.
33810
33811 rate, r
33812 Number of frames generated every second. Default value is '25'.
33813
33814 For details of how the program loading works, see the program_opencl
33815 filter.
33816
33817 Example programs:
33818
33819 • Generate a colour ramp by setting pixel values from the position of
33820 the pixel in the output image. (Note that this will work with all
33821 pixel formats, but the generated output will not be the same.)
33822
33823 __kernel void ramp(__write_only image2d_t dst,
33824 unsigned int index)
33825 {
33826 int2 loc = (int2)(get_global_id(0), get_global_id(1));
33827
33828 float4 val;
33829 val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
33830
33831 write_imagef(dst, loc, val);
33832 }
33833
33834 • Generate a Sierpinski carpet pattern, panning by a single pixel
33835 each frame.
33836
33837 __kernel void sierpinski_carpet(__write_only image2d_t dst,
33838 unsigned int index)
33839 {
33840 int2 loc = (int2)(get_global_id(0), get_global_id(1));
33841
33842 float4 value = 0.0f;
33843 int x = loc.x + index;
33844 int y = loc.y + index;
33845 while (x > 0 || y > 0) {
33846 if (x % 3 == 1 && y % 3 == 1) {
33847 value = 1.0f;
33848 break;
33849 }
33850 x /= 3;
33851 y /= 3;
33852 }
33853
33854 write_imagef(dst, loc, value);
33855 }
33856
33857 sierpinski
33858 Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
33859
33860 This source accepts the following options:
33861
33862 size, s
33863 Set frame size. For the syntax of this option, check the "Video
33864 size" section in the ffmpeg-utils manual. Default value is
33865 "640x480".
33866
33867 rate, r
33868 Set frame rate, expressed as number of frames per second. Default
33869 value is "25".
33870
33871 seed
33872 Set seed which is used for random panning.
33873
33874 jump
33875 Set max jump for single pan destination. Allowed range is from 1 to
33876 10000.
33877
33878 type
33879 Set fractal type, can be default "carpet" or "triangle".
33880
33882 Below is a description of the currently available video sinks.
33883
33884 buffersink
33885 Buffer video frames, and make them available to the end of the filter
33886 graph.
33887
33888 This sink is mainly intended for programmatic use, in particular
33889 through the interface defined in libavfilter/buffersink.h or the
33890 options system.
33891
33892 It accepts a pointer to an AVBufferSinkContext structure, which defines
33893 the incoming buffers' formats, to be passed as the opaque parameter to
33894 "avfilter_init_filter" for initialization.
33895
33896 nullsink
33897 Null video sink: do absolutely nothing with the input video. It is
33898 mainly useful as a template and for use in analysis / debugging tools.
33899
33901 Below is a description of the currently available multimedia filters.
33902
33903 a3dscope
33904 Convert input audio to 3d scope video output.
33905
33906 The filter accepts the following options:
33907
33908 rate, r
33909 Set frame rate, expressed as number of frames per second. Default
33910 value is "25".
33911
33912 size, s
33913 Specify the video size for the output. For the syntax of this
33914 option, check the "Video size" section in the ffmpeg-utils manual.
33915 Default value is "hd720".
33916
33917 fov Set the camera field of view. Default is 90 degrees. Allowed range
33918 is from 40 to 150.
33919
33920 roll
33921 Set the camera roll.
33922
33923 pitch
33924 Set the camera pitch.
33925
33926 yaw Set the camera yaw.
33927
33928 xzoom
33929 Set the camera zoom on X-axis.
33930
33931 yzoom
33932 Set the camera zoom on Y-axis.
33933
33934 zzoom
33935 Set the camera zoom on Z-axis.
33936
33937 xpos
33938 Set the camera position on X-axis.
33939
33940 ypos
33941 Set the camera position on Y-axis.
33942
33943 zpos
33944 Set the camera position on Z-axis.
33945
33946 length
33947 Set the length of displayed audio waves in number of frames.
33948
33949 Commands
33950
33951 Filter supports the some above options as commands.
33952
33953 abitscope
33954 Convert input audio to a video output, displaying the audio bit scope.
33955
33956 The filter accepts the following options:
33957
33958 rate, r
33959 Set frame rate, expressed as number of frames per second. Default
33960 value is "25".
33961
33962 size, s
33963 Specify the video size for the output. For the syntax of this
33964 option, check the "Video size" section in the ffmpeg-utils manual.
33965 Default value is "1024x256".
33966
33967 colors
33968 Specify list of colors separated by space or by '|' which will be
33969 used to draw channels. Unrecognized or missing colors will be
33970 replaced by white color.
33971
33972 mode, m
33973 Set output mode. Can be "bars" or "trace". Default is "bars".
33974
33975 adrawgraph
33976 Draw a graph using input audio metadata.
33977
33978 See drawgraph
33979
33980 agraphmonitor
33981 See graphmonitor.
33982
33983 ahistogram
33984 Convert input audio to a video output, displaying the volume histogram.
33985
33986 The filter accepts the following options:
33987
33988 dmode
33989 Specify how histogram is calculated.
33990
33991 It accepts the following values:
33992
33993 single
33994 Use single histogram for all channels.
33995
33996 separate
33997 Use separate histogram for each channel.
33998
33999 Default is "single".
34000
34001 rate, r
34002 Set frame rate, expressed as number of frames per second. Default
34003 value is "25".
34004
34005 size, s
34006 Specify the video size for the output. For the syntax of this
34007 option, check the "Video size" section in the ffmpeg-utils manual.
34008 Default value is "hd720".
34009
34010 scale
34011 Set display scale.
34012
34013 It accepts the following values:
34014
34015 log logarithmic
34016
34017 sqrt
34018 square root
34019
34020 cbrt
34021 cubic root
34022
34023 lin linear
34024
34025 rlog
34026 reverse logarithmic
34027
34028 Default is "log".
34029
34030 ascale
34031 Set amplitude scale.
34032
34033 It accepts the following values:
34034
34035 log logarithmic
34036
34037 lin linear
34038
34039 Default is "log".
34040
34041 acount
34042 Set how much frames to accumulate in histogram. Default is 1.
34043 Setting this to -1 accumulates all frames.
34044
34045 rheight
34046 Set histogram ratio of window height.
34047
34048 slide
34049 Set sonogram sliding.
34050
34051 It accepts the following values:
34052
34053 replace
34054 replace old rows with new ones.
34055
34056 scroll
34057 scroll from top to bottom.
34058
34059 Default is "replace".
34060
34061 hmode
34062 Set histogram mode.
34063
34064 It accepts the following values:
34065
34066 abs Use absolute values of samples.
34067
34068 sign
34069 Use untouched values of samples.
34070
34071 Default is "abs".
34072
34073 aphasemeter
34074 Measures phase of input audio, which is exported as metadata
34075 "lavfi.aphasemeter.phase", representing mean phase of current audio
34076 frame. A video output can also be produced and is enabled by default.
34077 The audio is passed through as first output.
34078
34079 Audio will be rematrixed to stereo if it has a different channel
34080 layout. Phase value is in range "[-1, 1]" where -1 means left and right
34081 channels are completely out of phase and 1 means channels are in phase.
34082
34083 The filter accepts the following options, all related to its video
34084 output:
34085
34086 rate, r
34087 Set the output frame rate. Default value is 25.
34088
34089 size, s
34090 Set the video size for the output. For the syntax of this option,
34091 check the "Video size" section in the ffmpeg-utils manual. Default
34092 value is "800x400".
34093
34094 rc
34095 gc
34096 bc Specify the red, green, blue contrast. Default values are 2, 7 and
34097 1. Allowed range is "[0, 255]".
34098
34099 mpc Set color which will be used for drawing median phase. If color is
34100 "none" which is default, no median phase value will be drawn.
34101
34102 video
34103 Enable video output. Default is enabled.
34104
34105 phasing detection
34106
34107 The filter also detects out of phase and mono sequences in stereo
34108 streams. It logs the sequence start, end and duration when it lasts
34109 longer or as long as the minimum set.
34110
34111 The filter accepts the following options for this detection:
34112
34113 phasing
34114 Enable mono and out of phase detection. Default is disabled.
34115
34116 tolerance, t
34117 Set phase tolerance for mono detection, in amplitude ratio. Default
34118 is 0. Allowed range is "[0, 1]".
34119
34120 angle, a
34121 Set angle threshold for out of phase detection, in degree. Default
34122 is 170. Allowed range is "[90, 180]".
34123
34124 duration, d
34125 Set mono or out of phase duration until notification, expressed in
34126 seconds. Default is 2.
34127
34128 Examples
34129
34130 • Complete example with ffmpeg to detect 1 second of mono with 0.001
34131 phase tolerance:
34132
34133 ffmpeg -i stereo.wav -af aphasemeter=video=0:phasing=1:duration=1:tolerance=0.001 -f null -
34134
34135 avectorscope
34136 Convert input audio to a video output, representing the audio vector
34137 scope.
34138
34139 The filter is used to measure the difference between channels of stereo
34140 audio stream. A monaural signal, consisting of identical left and right
34141 signal, results in straight vertical line. Any stereo separation is
34142 visible as a deviation from this line, creating a Lissajous figure. If
34143 the straight (or deviation from it) but horizontal line appears this
34144 indicates that the left and right channels are out of phase.
34145
34146 The filter accepts the following options:
34147
34148 mode, m
34149 Set the vectorscope mode.
34150
34151 Available values are:
34152
34153 lissajous
34154 Lissajous rotated by 45 degrees.
34155
34156 lissajous_xy
34157 Same as above but not rotated.
34158
34159 polar
34160 Shape resembling half of circle.
34161
34162 Default value is lissajous.
34163
34164 size, s
34165 Set the video size for the output. For the syntax of this option,
34166 check the "Video size" section in the ffmpeg-utils manual. Default
34167 value is "400x400".
34168
34169 rate, r
34170 Set the output frame rate. Default value is 25.
34171
34172 rc
34173 gc
34174 bc
34175 ac Specify the red, green, blue and alpha contrast. Default values are
34176 40, 160, 80 and 255. Allowed range is "[0, 255]".
34177
34178 rf
34179 gf
34180 bf
34181 af Specify the red, green, blue and alpha fade. Default values are 15,
34182 10, 5 and 5. Allowed range is "[0, 255]".
34183
34184 zoom
34185 Set the zoom factor. Default value is 1. Allowed range is "[0,
34186 10]". Values lower than 1 will auto adjust zoom factor to maximal
34187 possible value.
34188
34189 draw
34190 Set the vectorscope drawing mode.
34191
34192 Available values are:
34193
34194 dot Draw dot for each sample.
34195
34196 line
34197 Draw line between previous and current sample.
34198
34199 aaline
34200 Draw anti-aliased line between previous and current sample.
34201
34202 Default value is dot.
34203
34204 scale
34205 Specify amplitude scale of audio samples.
34206
34207 Available values are:
34208
34209 lin Linear.
34210
34211 sqrt
34212 Square root.
34213
34214 cbrt
34215 Cubic root.
34216
34217 log Logarithmic.
34218
34219 swap
34220 Swap left channel axis with right channel axis.
34221
34222 mirror
34223 Mirror axis.
34224
34225 none
34226 No mirror.
34227
34228 x Mirror only x axis.
34229
34230 y Mirror only y axis.
34231
34232 xy Mirror both axis.
34233
34234 Examples
34235
34236 • Complete example using ffplay:
34237
34238 ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
34239 [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
34240
34241 Commands
34242
34243 This filter supports the all above options as commands except options
34244 "size" and "rate".
34245
34246 bench, abench
34247 Benchmark part of a filtergraph.
34248
34249 The filter accepts the following options:
34250
34251 action
34252 Start or stop a timer.
34253
34254 Available values are:
34255
34256 start
34257 Get the current time, set it as frame metadata (using the key
34258 "lavfi.bench.start_time"), and forward the frame to the next
34259 filter.
34260
34261 stop
34262 Get the current time and fetch the "lavfi.bench.start_time"
34263 metadata from the input frame metadata to get the time
34264 difference. Time difference, average, maximum and minimum time
34265 (respectively "t", "avg", "max" and "min") are then printed.
34266 The timestamps are expressed in seconds.
34267
34268 Examples
34269
34270 • Benchmark selectivecolor filter:
34271
34272 bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
34273
34274 concat
34275 Concatenate audio and video streams, joining them together one after
34276 the other.
34277
34278 The filter works on segments of synchronized video and audio streams.
34279 All segments must have the same number of streams of each type, and
34280 that will also be the number of streams at output.
34281
34282 The filter accepts the following options:
34283
34284 n Set the number of segments. Default is 2.
34285
34286 v Set the number of output video streams, that is also the number of
34287 video streams in each segment. Default is 1.
34288
34289 a Set the number of output audio streams, that is also the number of
34290 audio streams in each segment. Default is 0.
34291
34292 unsafe
34293 Activate unsafe mode: do not fail if segments have a different
34294 format.
34295
34296 The filter has v+a outputs: first v video outputs, then a audio
34297 outputs.
34298
34299 There are nx(v+a) inputs: first the inputs for the first segment, in
34300 the same order as the outputs, then the inputs for the second segment,
34301 etc.
34302
34303 Related streams do not always have exactly the same duration, for
34304 various reasons including codec frame size or sloppy authoring. For
34305 that reason, related synchronized streams (e.g. a video and its audio
34306 track) should be concatenated at once. The concat filter will use the
34307 duration of the longest stream in each segment (except the last one),
34308 and if necessary pad shorter audio streams with silence.
34309
34310 For this filter to work correctly, all segments must start at timestamp
34311 0.
34312
34313 All corresponding streams must have the same parameters in all
34314 segments; the filtering system will automatically select a common pixel
34315 format for video streams, and a common sample format, sample rate and
34316 channel layout for audio streams, but other settings, such as
34317 resolution, must be converted explicitly by the user.
34318
34319 Different frame rates are acceptable but will result in variable frame
34320 rate at output; be sure to configure the output file to handle it.
34321
34322 Examples
34323
34324 • Concatenate an opening, an episode and an ending, all in bilingual
34325 version (video in stream 0, audio in streams 1 and 2):
34326
34327 ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
34328 '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
34329 concat=n=3:v=1:a=2 [v] [a1] [a2]' \
34330 -map '[v]' -map '[a1]' -map '[a2]' output.mkv
34331
34332 • Concatenate two parts, handling audio and video separately, using
34333 the (a)movie sources, and adjusting the resolution:
34334
34335 movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
34336 movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
34337 [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
34338
34339 Note that a desync will happen at the stitch if the audio and video
34340 streams do not have exactly the same duration in the first file.
34341
34342 Commands
34343
34344 This filter supports the following commands:
34345
34346 next
34347 Close the current segment and step to the next one
34348
34349 ebur128
34350 EBU R128 scanner filter. This filter takes an audio stream and analyzes
34351 its loudness level. By default, it logs a message at a frequency of
34352 10Hz with the Momentary loudness (identified by "M"), Short-term
34353 loudness ("S"), Integrated loudness ("I") and Loudness Range ("LRA").
34354
34355 The filter can only analyze streams which have sample format is double-
34356 precision floating point. The input stream will be converted to this
34357 specification, if needed. Users may need to insert aformat and/or
34358 aresample filters after this filter to obtain the original parameters.
34359
34360 The filter also has a video output (see the video option) with a real
34361 time graph to observe the loudness evolution. The graphic contains the
34362 logged message mentioned above, so it is not printed anymore when this
34363 option is set, unless the verbose logging is set. The main graphing
34364 area contains the short-term loudness (3 seconds of analysis), and the
34365 gauge on the right is for the momentary loudness (400 milliseconds),
34366 but can optionally be configured to instead display short-term loudness
34367 (see gauge).
34368
34369 The green area marks a +/- 1LU target range around the target loudness
34370 (-23LUFS by default, unless modified through target).
34371
34372 More information about the Loudness Recommendation EBU R128 on
34373 <http://tech.ebu.ch/loudness>.
34374
34375 The filter accepts the following options:
34376
34377 video
34378 Activate the video output. The audio stream is passed unchanged
34379 whether this option is set or no. The video stream will be the
34380 first output stream if activated. Default is 0.
34381
34382 size
34383 Set the video size. This option is for video only. For the syntax
34384 of this option, check the "Video size" section in the ffmpeg-utils
34385 manual. Default and minimum resolution is "640x480".
34386
34387 meter
34388 Set the EBU scale meter. Default is 9. Common values are 9 and 18,
34389 respectively for EBU scale meter +9 and EBU scale meter +18. Any
34390 other integer value between this range is allowed.
34391
34392 metadata
34393 Set metadata injection. If set to 1, the audio input will be
34394 segmented into 100ms output frames, each of them containing various
34395 loudness information in metadata. All the metadata keys are
34396 prefixed with "lavfi.r128.".
34397
34398 Default is 0.
34399
34400 framelog
34401 Force the frame logging level.
34402
34403 Available values are:
34404
34405 quiet
34406 logging disabled
34407
34408 info
34409 information logging level
34410
34411 verbose
34412 verbose logging level
34413
34414 By default, the logging level is set to info. If the video or the
34415 metadata options are set, it switches to verbose.
34416
34417 peak
34418 Set peak mode(s).
34419
34420 Available modes can be cumulated (the option is a "flag" type).
34421 Possible values are:
34422
34423 none
34424 Disable any peak mode (default).
34425
34426 sample
34427 Enable sample-peak mode.
34428
34429 Simple peak mode looking for the higher sample value. It logs a
34430 message for sample-peak (identified by "SPK").
34431
34432 true
34433 Enable true-peak mode.
34434
34435 If enabled, the peak lookup is done on an over-sampled version
34436 of the input stream for better peak accuracy. It logs a message
34437 for true-peak. (identified by "TPK") and true-peak per frame
34438 (identified by "FTPK"). This mode requires a build with
34439 "libswresample".
34440
34441 dualmono
34442 Treat mono input files as "dual mono". If a mono file is intended
34443 for playback on a stereo system, its EBU R128 measurement will be
34444 perceptually incorrect. If set to "true", this option will
34445 compensate for this effect. Multi-channel input files are not
34446 affected by this option.
34447
34448 panlaw
34449 Set a specific pan law to be used for the measurement of dual mono
34450 files. This parameter is optional, and has a default value of
34451 -3.01dB.
34452
34453 target
34454 Set a specific target level (in LUFS) used as relative zero in the
34455 visualization. This parameter is optional and has a default value
34456 of -23LUFS as specified by EBU R128. However, material published
34457 online may prefer a level of -16LUFS (e.g. for use with podcasts or
34458 video platforms).
34459
34460 gauge
34461 Set the value displayed by the gauge. Valid values are "momentary"
34462 and s "shortterm". By default the momentary value will be used, but
34463 in certain scenarios it may be more useful to observe the short
34464 term value instead (e.g. live mixing).
34465
34466 scale
34467 Sets the display scale for the loudness. Valid parameters are
34468 "absolute" (in LUFS) or "relative" (LU) relative to the target.
34469 This only affects the video output, not the summary or continuous
34470 log output.
34471
34472 Examples
34473
34474 • Real-time graph using ffplay, with a EBU scale meter +18:
34475
34476 ffplay -f lavfi -i "amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]"
34477
34478 • Run an analysis with ffmpeg:
34479
34480 ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
34481
34482 interleave, ainterleave
34483 Temporally interleave frames from several inputs.
34484
34485 "interleave" works with video inputs, "ainterleave" with audio.
34486
34487 These filters read frames from several inputs and send the oldest
34488 queued frame to the output.
34489
34490 Input streams must have well defined, monotonically increasing frame
34491 timestamp values.
34492
34493 In order to submit one frame to output, these filters need to enqueue
34494 at least one frame for each input, so they cannot work in case one
34495 input is not yet terminated and will not receive incoming frames.
34496
34497 For example consider the case when one input is a "select" filter which
34498 always drops input frames. The "interleave" filter will keep reading
34499 from that input, but it will never be able to send new frames to output
34500 until the input sends an end-of-stream signal.
34501
34502 Also, depending on inputs synchronization, the filters will drop frames
34503 in case one input receives more frames than the other ones, and the
34504 queue is already filled.
34505
34506 These filters accept the following options:
34507
34508 nb_inputs, n
34509 Set the number of different inputs, it is 2 by default.
34510
34511 duration
34512 How to determine the end-of-stream.
34513
34514 longest
34515 The duration of the longest input. (default)
34516
34517 shortest
34518 The duration of the shortest input.
34519
34520 first
34521 The duration of the first input.
34522
34523 Examples
34524
34525 • Interleave frames belonging to different streams using ffmpeg:
34526
34527 ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex "[0:v][1:v] interleave" out.avi
34528
34529 • Add flickering blur effect:
34530
34531 select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
34532
34533 latency, alatency
34534 Measure filtering latency.
34535
34536 Report previous filter filtering latency, delay in number of audio
34537 samples for audio filters or number of video frames for video filters.
34538
34539 On end of input stream, filter will report min and max measured latency
34540 for previous running filter in filtergraph.
34541
34542 metadata, ametadata
34543 Manipulate frame metadata.
34544
34545 This filter accepts the following options:
34546
34547 mode
34548 Set mode of operation of the filter.
34549
34550 Can be one of the following:
34551
34552 select
34553 If both "value" and "key" is set, select frames which have such
34554 metadata. If only "key" is set, select every frame that has
34555 such key in metadata.
34556
34557 add Add new metadata "key" and "value". If key is already available
34558 do nothing.
34559
34560 modify
34561 Modify value of already present key.
34562
34563 delete
34564 If "value" is set, delete only keys that have such value.
34565 Otherwise, delete key. If "key" is not set, delete all metadata
34566 values in the frame.
34567
34568 print
34569 Print key and its value if metadata was found. If "key" is not
34570 set print all metadata values available in frame.
34571
34572 key Set key used with all modes. Must be set for all modes except
34573 "print" and "delete".
34574
34575 value
34576 Set metadata value which will be used. This option is mandatory for
34577 "modify" and "add" mode.
34578
34579 function
34580 Which function to use when comparing metadata value and "value".
34581
34582 Can be one of following:
34583
34584 same_str
34585 Values are interpreted as strings, returns true if metadata
34586 value is same as "value".
34587
34588 starts_with
34589 Values are interpreted as strings, returns true if metadata
34590 value starts with the "value" option string.
34591
34592 less
34593 Values are interpreted as floats, returns true if metadata
34594 value is less than "value".
34595
34596 equal
34597 Values are interpreted as floats, returns true if "value" is
34598 equal with metadata value.
34599
34600 greater
34601 Values are interpreted as floats, returns true if metadata
34602 value is greater than "value".
34603
34604 expr
34605 Values are interpreted as floats, returns true if expression
34606 from option "expr" evaluates to true.
34607
34608 ends_with
34609 Values are interpreted as strings, returns true if metadata
34610 value ends with the "value" option string.
34611
34612 expr
34613 Set expression which is used when "function" is set to "expr". The
34614 expression is evaluated through the eval API and can contain the
34615 following constants:
34616
34617 VALUE1, FRAMEVAL
34618 Float representation of "value" from metadata key.
34619
34620 VALUE2, USERVAL
34621 Float representation of "value" as supplied by user in "value"
34622 option.
34623
34624 file
34625 If specified in "print" mode, output is written to the named file.
34626 Instead of plain filename any writable url can be specified.
34627 Filename ``-'' is a shorthand for standard output. If "file" option
34628 is not set, output is written to the log with AV_LOG_INFO loglevel.
34629
34630 direct
34631 Reduces buffering in print mode when output is written to a URL set
34632 using file.
34633
34634 Examples
34635
34636 • Print all metadata values for frames with key
34637 "lavfi.signalstats.YDIF" with values between 0 and 1.
34638
34639 signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
34640
34641 • Print silencedetect output to file metadata.txt.
34642
34643 silencedetect,ametadata=mode=print:file=metadata.txt
34644
34645 • Direct all metadata to a pipe with file descriptor 4.
34646
34647 metadata=mode=print:file='pipe\:4'
34648
34649 perms, aperms
34650 Set read/write permissions for the output frames.
34651
34652 These filters are mainly aimed at developers to test direct path in the
34653 following filter in the filtergraph.
34654
34655 The filters accept the following options:
34656
34657 mode
34658 Select the permissions mode.
34659
34660 It accepts the following values:
34661
34662 none
34663 Do nothing. This is the default.
34664
34665 ro Set all the output frames read-only.
34666
34667 rw Set all the output frames directly writable.
34668
34669 toggle
34670 Make the frame read-only if writable, and writable if read-
34671 only.
34672
34673 random
34674 Set each output frame read-only or writable randomly.
34675
34676 seed
34677 Set the seed for the random mode, must be an integer included
34678 between 0 and "UINT32_MAX". If not specified, or if explicitly set
34679 to -1, the filter will try to use a good random seed on a best
34680 effort basis.
34681
34682 Note: in case of auto-inserted filter between the permission filter and
34683 the following one, the permission might not be received as expected in
34684 that following filter. Inserting a format or aformat filter before the
34685 perms/aperms filter can avoid this problem.
34686
34687 realtime, arealtime
34688 Slow down filtering to match real time approximately.
34689
34690 These filters will pause the filtering for a variable amount of time to
34691 match the output rate with the input timestamps. They are similar to
34692 the re option to "ffmpeg".
34693
34694 They accept the following options:
34695
34696 limit
34697 Time limit for the pauses. Any pause longer than that will be
34698 considered a timestamp discontinuity and reset the timer. Default
34699 is 2 seconds.
34700
34701 speed
34702 Speed factor for processing. The value must be a float larger than
34703 zero. Values larger than 1.0 will result in faster than realtime
34704 processing, smaller will slow processing down. The limit is
34705 automatically adapted accordingly. Default is 1.0.
34706
34707 A processing speed faster than what is possible without these
34708 filters cannot be achieved.
34709
34710 Commands
34711
34712 Both filters supports the all above options as commands.
34713
34714 segment, asegment
34715 Split single input stream into multiple streams.
34716
34717 This filter does opposite of concat filters.
34718
34719 "segment" works on video frames, "asegment" on audio samples.
34720
34721 This filter accepts the following options:
34722
34723 timestamps
34724 Timestamps of output segments separated by '|'. The first segment
34725 will run from the beginning of the input stream. The last segment
34726 will run until the end of the input stream
34727
34728 frames, samples
34729 Exact frame/sample count to split the segments.
34730
34731 In all cases, prefixing an each segment with '+' will make it relative
34732 to the previous segment.
34733
34734 Examples
34735
34736 • Split input audio stream into three output audio streams, starting
34737 at start of input audio stream and storing that in 1st output audio
34738 stream, then following at 60th second and storing than in 2nd
34739 output audio stream, and last after 150th second of input audio
34740 stream store in 3rd output audio stream:
34741
34742 asegment=timestamps="60|150"
34743
34744 select, aselect
34745 Select frames to pass in output.
34746
34747 This filter accepts the following options:
34748
34749 expr, e
34750 Set expression, which is evaluated for each input frame.
34751
34752 If the expression is evaluated to zero, the frame is discarded.
34753
34754 If the evaluation result is negative or NaN, the frame is sent to
34755 the first output; otherwise it is sent to the output with index
34756 "ceil(val)-1", assuming that the input index starts from 0.
34757
34758 For example a value of 1.2 corresponds to the output with index
34759 "ceil(1.2)-1 = 2-1 = 1", that is the second output.
34760
34761 outputs, n
34762 Set the number of outputs. The output to which to send the selected
34763 frame is based on the result of the evaluation. Default value is 1.
34764
34765 The expression can contain the following constants:
34766
34767 n The (sequential) number of the filtered frame, starting from 0.
34768
34769 selected_n
34770 The (sequential) number of the selected frame, starting from 0.
34771
34772 prev_selected_n
34773 The sequential number of the last selected frame. It's NAN if
34774 undefined.
34775
34776 TB The timebase of the input timestamps.
34777
34778 pts The PTS (Presentation TimeStamp) of the filtered frame, expressed
34779 in TB units. It's NAN if undefined.
34780
34781 t The PTS of the filtered frame, expressed in seconds. It's NAN if
34782 undefined.
34783
34784 prev_pts
34785 The PTS of the previously filtered frame. It's NAN if undefined.
34786
34787 prev_selected_pts
34788 The PTS of the last previously filtered frame. It's NAN if
34789 undefined.
34790
34791 prev_selected_t
34792 The PTS of the last previously selected frame, expressed in
34793 seconds. It's NAN if undefined.
34794
34795 start_pts
34796 The first PTS in the stream which is not NAN. It remains NAN if not
34797 found.
34798
34799 start_t
34800 The first PTS, in seconds, in the stream which is not NAN. It
34801 remains NAN if not found.
34802
34803 pict_type (video only)
34804 The type of the filtered frame. It can assume one of the following
34805 values:
34806
34807 I
34808 P
34809 B
34810 S
34811 SI
34812 SP
34813 BI
34814 interlace_type (video only)
34815 The frame interlace type. It can assume one of the following
34816 values:
34817
34818 PROGRESSIVE
34819 The frame is progressive (not interlaced).
34820
34821 TOPFIRST
34822 The frame is top-field-first.
34823
34824 BOTTOMFIRST
34825 The frame is bottom-field-first.
34826
34827 consumed_sample_n (audio only)
34828 the number of selected samples before the current frame
34829
34830 samples_n (audio only)
34831 the number of samples in the current frame
34832
34833 sample_rate (audio only)
34834 the input sample rate
34835
34836 key This is 1 if the filtered frame is a key-frame, 0 otherwise.
34837
34838 pos the position in the file of the filtered frame, -1 if the
34839 information is not available (e.g. for synthetic video)
34840
34841 scene (video only)
34842 value between 0 and 1 to indicate a new scene; a low value reflects
34843 a low probability for the current frame to introduce a new scene,
34844 while a higher value means the current frame is more likely to be
34845 one (see the example below)
34846
34847 concatdec_select
34848 The concat demuxer can select only part of a concat input file by
34849 setting an inpoint and an outpoint, but the output packets may not
34850 be entirely contained in the selected interval. By using this
34851 variable, it is possible to skip frames generated by the concat
34852 demuxer which are not exactly contained in the selected interval.
34853
34854 This works by comparing the frame pts against the
34855 lavf.concat.start_time and the lavf.concat.duration packet metadata
34856 values which are also present in the decoded frames.
34857
34858 The concatdec_select variable is -1 if the frame pts is at least
34859 start_time and either the duration metadata is missing or the frame
34860 pts is less than start_time + duration, 0 otherwise, and NaN if the
34861 start_time metadata is missing.
34862
34863 That basically means that an input frame is selected if its pts is
34864 within the interval set by the concat demuxer.
34865
34866 The default value of the select expression is "1".
34867
34868 Examples
34869
34870 • Select all frames in input:
34871
34872 select
34873
34874 The example above is the same as:
34875
34876 select=1
34877
34878 • Skip all frames:
34879
34880 select=0
34881
34882 • Select only I-frames:
34883
34884 select='eq(pict_type\,I)'
34885
34886 • Select one frame every 100:
34887
34888 select='not(mod(n\,100))'
34889
34890 • Select only frames contained in the 10-20 time interval:
34891
34892 select=between(t\,10\,20)
34893
34894 • Select only I-frames contained in the 10-20 time interval:
34895
34896 select=between(t\,10\,20)*eq(pict_type\,I)
34897
34898 • Select frames with a minimum distance of 10 seconds:
34899
34900 select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
34901
34902 • Use aselect to select only audio frames with samples number > 100:
34903
34904 aselect='gt(samples_n\,100)'
34905
34906 • Create a mosaic of the first scenes:
34907
34908 ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
34909
34910 Comparing scene against a value between 0.3 and 0.5 is generally a
34911 sane choice.
34912
34913 • Send even and odd frames to separate outputs, and compose them:
34914
34915 select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
34916
34917 • Select useful frames from an ffconcat file which is using inpoints
34918 and outpoints but where the source files are not intra frame only.
34919
34920 ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
34921
34922 sendcmd, asendcmd
34923 Send commands to filters in the filtergraph.
34924
34925 These filters read commands to be sent to other filters in the
34926 filtergraph.
34927
34928 "sendcmd" must be inserted between two video filters, "asendcmd" must
34929 be inserted between two audio filters, but apart from that they act the
34930 same way.
34931
34932 The specification of commands can be provided in the filter arguments
34933 with the commands option, or in a file specified by the filename
34934 option.
34935
34936 These filters accept the following options:
34937
34938 commands, c
34939 Set the commands to be read and sent to the other filters.
34940
34941 filename, f
34942 Set the filename of the commands to be read and sent to the other
34943 filters.
34944
34945 Commands syntax
34946
34947 A commands description consists of a sequence of interval
34948 specifications, comprising a list of commands to be executed when a
34949 particular event related to that interval occurs. The occurring event
34950 is typically the current frame time entering or leaving a given time
34951 interval.
34952
34953 An interval is specified by the following syntax:
34954
34955 <START>[-<END>] <COMMANDS>;
34956
34957 The time interval is specified by the START and END times. END is
34958 optional and defaults to the maximum time.
34959
34960 The current frame time is considered within the specified interval if
34961 it is included in the interval [START, END), that is when the time is
34962 greater or equal to START and is lesser than END.
34963
34964 COMMANDS consists of a sequence of one or more command specifications,
34965 separated by ",", relating to that interval. The syntax of a command
34966 specification is given by:
34967
34968 [<FLAGS>] <TARGET> <COMMAND> <ARG>
34969
34970 FLAGS is optional and specifies the type of events relating to the time
34971 interval which enable sending the specified command, and must be a non-
34972 null sequence of identifier flags separated by "+" or "|" and enclosed
34973 between "[" and "]".
34974
34975 The following flags are recognized:
34976
34977 enter
34978 The command is sent when the current frame timestamp enters the
34979 specified interval. In other words, the command is sent when the
34980 previous frame timestamp was not in the given interval, and the
34981 current is.
34982
34983 leave
34984 The command is sent when the current frame timestamp leaves the
34985 specified interval. In other words, the command is sent when the
34986 previous frame timestamp was in the given interval, and the current
34987 is not.
34988
34989 expr
34990 The command ARG is interpreted as expression and result of
34991 expression is passed as ARG.
34992
34993 The expression is evaluated through the eval API and can contain
34994 the following constants:
34995
34996 POS Original position in the file of the frame, or undefined if
34997 undefined for the current frame.
34998
34999 PTS The presentation timestamp in input.
35000
35001 N The count of the input frame for video or audio, starting from
35002 0.
35003
35004 T The time in seconds of the current frame.
35005
35006 TS The start time in seconds of the current command interval.
35007
35008 TE The end time in seconds of the current command interval.
35009
35010 TI The interpolated time of the current command interval, TI = (T
35011 - TS) / (TE - TS).
35012
35013 W The video frame width.
35014
35015 H The video frame height.
35016
35017 If FLAGS is not specified, a default value of "[enter]" is assumed.
35018
35019 TARGET specifies the target of the command, usually the name of the
35020 filter class or a specific filter instance name.
35021
35022 COMMAND specifies the name of the command for the target filter.
35023
35024 ARG is optional and specifies the optional list of argument for the
35025 given COMMAND.
35026
35027 Between one interval specification and another, whitespaces, or
35028 sequences of characters starting with "#" until the end of line, are
35029 ignored and can be used to annotate comments.
35030
35031 A simplified BNF description of the commands specification syntax
35032 follows:
35033
35034 <COMMAND_FLAG> ::= "enter" | "leave"
35035 <COMMAND_FLAGS> ::= <COMMAND_FLAG> [(+|"|")<COMMAND_FLAG>]
35036 <COMMAND> ::= ["[" <COMMAND_FLAGS> "]"] <TARGET> <COMMAND> [<ARG>]
35037 <COMMANDS> ::= <COMMAND> [,<COMMANDS>]
35038 <INTERVAL> ::= <START>[-<END>] <COMMANDS>
35039 <INTERVALS> ::= <INTERVAL>[;<INTERVALS>]
35040
35041 Examples
35042
35043 • Specify audio tempo change at second 4:
35044
35045 asendcmd=c='4.0 atempo tempo 1.5',atempo
35046
35047 • Target a specific filter instance:
35048
35049 asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
35050
35051 • Specify a list of drawtext and hue commands in a file.
35052
35053 # show text in the interval 5-10
35054 5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
35055 [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
35056
35057 # desaturate the image in the interval 15-20
35058 15.0-20.0 [enter] hue s 0,
35059 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
35060 [leave] hue s 1,
35061 [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
35062
35063 # apply an exponential saturation fade-out effect, starting from time 25
35064 25 [enter] hue s exp(25-t)
35065
35066 A filtergraph allowing to read and process the above command list
35067 stored in a file test.cmd, can be specified with:
35068
35069 sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
35070
35071 setpts, asetpts
35072 Change the PTS (presentation timestamp) of the input frames.
35073
35074 "setpts" works on video frames, "asetpts" on audio frames.
35075
35076 This filter accepts the following options:
35077
35078 expr
35079 The expression which is evaluated for each frame to construct its
35080 timestamp.
35081
35082 The expression is evaluated through the eval API and can contain the
35083 following constants:
35084
35085 FRAME_RATE, FR
35086 frame rate, only defined for constant frame-rate video
35087
35088 PTS The presentation timestamp in input
35089
35090 N The count of the input frame for video or the number of consumed
35091 samples, not including the current frame for audio, starting from
35092 0.
35093
35094 NB_CONSUMED_SAMPLES
35095 The number of consumed samples, not including the current frame
35096 (only audio)
35097
35098 NB_SAMPLES, S
35099 The number of samples in the current frame (only audio)
35100
35101 SAMPLE_RATE, SR
35102 The audio sample rate.
35103
35104 STARTPTS
35105 The PTS of the first frame.
35106
35107 STARTT
35108 the time in seconds of the first frame
35109
35110 INTERLACED
35111 State whether the current frame is interlaced.
35112
35113 T the time in seconds of the current frame
35114
35115 POS original position in the file of the frame, or undefined if
35116 undefined for the current frame
35117
35118 PREV_INPTS
35119 The previous input PTS.
35120
35121 PREV_INT
35122 previous input time in seconds
35123
35124 PREV_OUTPTS
35125 The previous output PTS.
35126
35127 PREV_OUTT
35128 previous output time in seconds
35129
35130 RTCTIME
35131 The wallclock (RTC) time in microseconds. This is deprecated, use
35132 time(0) instead.
35133
35134 RTCSTART
35135 The wallclock (RTC) time at the start of the movie in microseconds.
35136
35137 TB The timebase of the input timestamps.
35138
35139 Examples
35140
35141 • Start counting PTS from zero
35142
35143 setpts=PTS-STARTPTS
35144
35145 • Apply fast motion effect:
35146
35147 setpts=0.5*PTS
35148
35149 • Apply slow motion effect:
35150
35151 setpts=2.0*PTS
35152
35153 • Set fixed rate of 25 frames per second:
35154
35155 setpts=N/(25*TB)
35156
35157 • Set fixed rate 25 fps with some jitter:
35158
35159 setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
35160
35161 • Apply an offset of 10 seconds to the input PTS:
35162
35163 setpts=PTS+10/TB
35164
35165 • Generate timestamps from a "live source" and rebase onto the
35166 current timebase:
35167
35168 setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
35169
35170 • Generate timestamps by counting samples:
35171
35172 asetpts=N/SR/TB
35173
35174 setrange
35175 Force color range for the output video frame.
35176
35177 The "setrange" filter marks the color range property for the output
35178 frames. It does not change the input frame, but only sets the
35179 corresponding property, which affects how the frame is treated by
35180 following filters.
35181
35182 The filter accepts the following options:
35183
35184 range
35185 Available values are:
35186
35187 auto
35188 Keep the same color range property.
35189
35190 unspecified, unknown
35191 Set the color range as unspecified.
35192
35193 limited, tv, mpeg
35194 Set the color range as limited.
35195
35196 full, pc, jpeg
35197 Set the color range as full.
35198
35199 settb, asettb
35200 Set the timebase to use for the output frames timestamps. It is mainly
35201 useful for testing timebase configuration.
35202
35203 It accepts the following parameters:
35204
35205 expr, tb
35206 The expression which is evaluated into the output timebase.
35207
35208 The value for tb is an arithmetic expression representing a rational.
35209 The expression can contain the constants "AVTB" (the default timebase),
35210 "intb" (the input timebase) and "sr" (the sample rate, audio only).
35211 Default value is "intb".
35212
35213 Examples
35214
35215 • Set the timebase to 1/25:
35216
35217 settb=expr=1/25
35218
35219 • Set the timebase to 1/10:
35220
35221 settb=expr=0.1
35222
35223 • Set the timebase to 1001/1000:
35224
35225 settb=1+0.001
35226
35227 • Set the timebase to 2*intb:
35228
35229 settb=2*intb
35230
35231 • Set the default timebase value:
35232
35233 settb=AVTB
35234
35235 showcqt
35236 Convert input audio to a video output representing frequency spectrum
35237 logarithmically using Brown-Puckette constant Q transform algorithm
35238 with direct frequency domain coefficient calculation (but the transform
35239 itself is not really constant Q, instead the Q factor is actually
35240 variable/clamped), with musical tone scale, from E0 to D#10.
35241
35242 The filter accepts the following options:
35243
35244 size, s
35245 Specify the video size for the output. It must be even. For the
35246 syntax of this option, check the "Video size" section in the
35247 ffmpeg-utils manual. Default value is "1920x1080".
35248
35249 fps, rate, r
35250 Set the output frame rate. Default value is 25.
35251
35252 bar_h
35253 Set the bargraph height. It must be even. Default value is -1 which
35254 computes the bargraph height automatically.
35255
35256 axis_h
35257 Set the axis height. It must be even. Default value is -1 which
35258 computes the axis height automatically.
35259
35260 sono_h
35261 Set the sonogram height. It must be even. Default value is -1 which
35262 computes the sonogram height automatically.
35263
35264 fullhd
35265 Set the fullhd resolution. This option is deprecated, use size, s
35266 instead. Default value is 1.
35267
35268 sono_v, volume
35269 Specify the sonogram volume expression. It can contain variables:
35270
35271 bar_v
35272 the bar_v evaluated expression
35273
35274 frequency, freq, f
35275 the frequency where it is evaluated
35276
35277 timeclamp, tc
35278 the value of timeclamp option
35279
35280 and functions:
35281
35282 a_weighting(f)
35283 A-weighting of equal loudness
35284
35285 b_weighting(f)
35286 B-weighting of equal loudness
35287
35288 c_weighting(f)
35289 C-weighting of equal loudness.
35290
35291 Default value is 16.
35292
35293 bar_v, volume2
35294 Specify the bargraph volume expression. It can contain variables:
35295
35296 sono_v
35297 the sono_v evaluated expression
35298
35299 frequency, freq, f
35300 the frequency where it is evaluated
35301
35302 timeclamp, tc
35303 the value of timeclamp option
35304
35305 and functions:
35306
35307 a_weighting(f)
35308 A-weighting of equal loudness
35309
35310 b_weighting(f)
35311 B-weighting of equal loudness
35312
35313 c_weighting(f)
35314 C-weighting of equal loudness.
35315
35316 Default value is "sono_v".
35317
35318 sono_g, gamma
35319 Specify the sonogram gamma. Lower gamma makes the spectrum more
35320 contrast, higher gamma makes the spectrum having more range.
35321 Default value is 3. Acceptable range is "[1, 7]".
35322
35323 bar_g, gamma2
35324 Specify the bargraph gamma. Default value is 1. Acceptable range is
35325 "[1, 7]".
35326
35327 bar_t
35328 Specify the bargraph transparency level. Lower value makes the
35329 bargraph sharper. Default value is 1. Acceptable range is "[0,
35330 1]".
35331
35332 timeclamp, tc
35333 Specify the transform timeclamp. At low frequency, there is trade-
35334 off between accuracy in time domain and frequency domain. If
35335 timeclamp is lower, event in time domain is represented more
35336 accurately (such as fast bass drum), otherwise event in frequency
35337 domain is represented more accurately (such as bass guitar).
35338 Acceptable range is "[0.002, 1]". Default value is 0.17.
35339
35340 attack
35341 Set attack time in seconds. The default is 0 (disabled). Otherwise,
35342 it limits future samples by applying asymmetric windowing in time
35343 domain, useful when low latency is required. Accepted range is "[0,
35344 1]".
35345
35346 basefreq
35347 Specify the transform base frequency. Default value is
35348 20.01523126408007475, which is frequency 50 cents below E0.
35349 Acceptable range is "[10, 100000]".
35350
35351 endfreq
35352 Specify the transform end frequency. Default value is
35353 20495.59681441799654, which is frequency 50 cents above D#10.
35354 Acceptable range is "[10, 100000]".
35355
35356 coeffclamp
35357 This option is deprecated and ignored.
35358
35359 tlength
35360 Specify the transform length in time domain. Use this option to
35361 control accuracy trade-off between time domain and frequency domain
35362 at every frequency sample. It can contain variables:
35363
35364 frequency, freq, f
35365 the frequency where it is evaluated
35366
35367 timeclamp, tc
35368 the value of timeclamp option.
35369
35370 Default value is "384*tc/(384+tc*f)".
35371
35372 count
35373 Specify the transform count for every video frame. Default value is
35374 6. Acceptable range is "[1, 30]".
35375
35376 fcount
35377 Specify the transform count for every single pixel. Default value
35378 is 0, which makes it computed automatically. Acceptable range is
35379 "[0, 10]".
35380
35381 fontfile
35382 Specify font file for use with freetype to draw the axis. If not
35383 specified, use embedded font. Note that drawing with font file or
35384 embedded font is not implemented with custom basefreq and endfreq,
35385 use axisfile option instead.
35386
35387 font
35388 Specify fontconfig pattern. This has lower priority than fontfile.
35389 The ":" in the pattern may be replaced by "|" to avoid unnecessary
35390 escaping.
35391
35392 fontcolor
35393 Specify font color expression. This is arithmetic expression that
35394 should return integer value 0xRRGGBB. It can contain variables:
35395
35396 frequency, freq, f
35397 the frequency where it is evaluated
35398
35399 timeclamp, tc
35400 the value of timeclamp option
35401
35402 and functions:
35403
35404 midi(f)
35405 midi number of frequency f, some midi numbers: E0(16), C1(24),
35406 C2(36), A4(69)
35407
35408 r(x), g(x), b(x)
35409 red, green, and blue value of intensity x.
35410
35411 Default value is "st(0, (midi(f)-59.5)/12); st(1,
35412 if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0)); r(1-ld(1)) +
35413 b(ld(1))".
35414
35415 axisfile
35416 Specify image file to draw the axis. This option override fontfile
35417 and fontcolor option.
35418
35419 axis, text
35420 Enable/disable drawing text to the axis. If it is set to 0, drawing
35421 to the axis is disabled, ignoring fontfile and axisfile option.
35422 Default value is 1.
35423
35424 csp Set colorspace. The accepted values are:
35425
35426 unspecified
35427 Unspecified (default)
35428
35429 bt709
35430 BT.709
35431
35432 fcc FCC
35433
35434 bt470bg
35435 BT.470BG or BT.601-6 625
35436
35437 smpte170m
35438 SMPTE-170M or BT.601-6 525
35439
35440 smpte240m
35441 SMPTE-240M
35442
35443 bt2020ncl
35444 BT.2020 with non-constant luminance
35445
35446 cscheme
35447 Set spectrogram color scheme. This is list of floating point values
35448 with format "left_r|left_g|left_b|right_r|right_g|right_b". The
35449 default is "1|0.5|0|0|0.5|1".
35450
35451 Examples
35452
35453 • Playing audio while showing the spectrum:
35454
35455 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
35456
35457 • Same as above, but with frame rate 30 fps:
35458
35459 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
35460
35461 • Playing at 1280x720:
35462
35463 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
35464
35465 • Disable sonogram display:
35466
35467 sono_h=0
35468
35469 • A1 and its harmonics: A1, A2, (near)E3, A3:
35470
35471 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),
35472 asplit[a][out1]; [a] showcqt [out0]'
35473
35474 • Same as above, but with more accuracy in frequency domain:
35475
35476 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),
35477 asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
35478
35479 • Custom volume:
35480
35481 bar_v=10:sono_v=bar_v*a_weighting(f)
35482
35483 • Custom gamma, now spectrum is linear to the amplitude.
35484
35485 bar_g=2:sono_g=2
35486
35487 • Custom tlength equation:
35488
35489 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)))'
35490
35491 • Custom fontcolor and fontfile, C-note is colored green, others are
35492 colored blue:
35493
35494 fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
35495
35496 • Custom font using fontconfig:
35497
35498 font='Courier New,Monospace,mono|bold'
35499
35500 • Custom frequency range with custom axis using image file:
35501
35502 axisfile=myaxis.png:basefreq=40:endfreq=10000
35503
35504 showcwt
35505 Convert input audio to video output representing frequency spectrum
35506 using Continuous Wavelet Transform and Morlet wavelet.
35507
35508 The filter accepts the following options:
35509
35510 size, s
35511 Specify the video size for the output. For the syntax of this
35512 option, check the "Video size" section in the ffmpeg-utils manual.
35513 Default value is "640x512".
35514
35515 rate, r
35516 Set the output frame rate. Default value is 25.
35517
35518 scale
35519 Set the frequency scale used. Allowed values are:
35520
35521 linear
35522 log2
35523 bark
35524 mel
35525 erbs
35526
35527 Default value is "linear".
35528
35529 min Set the minimum frequency that will be used in output. Default is
35530 20 Hz.
35531
35532 max Set the maximum frequency that will be used in output. Default is
35533 20000 Hz. The real frequency upper limit depends on input audio's
35534 sample rate and such will be enforced on this value when it is set
35535 to value greater than Nyquist frequency.
35536
35537 logb
35538 Set the logarithmic basis for brightness strength when mapping
35539 calculated magnitude values to pixel values. Allowed range is from
35540 0 to 1. Default value is 0.0001.
35541
35542 deviation
35543 Set the frequency deviation. Lower values than 1 are more
35544 frequency oriented, while higher values than 1 are more time
35545 oriented. Allowed range is from 0 to 10. Default value is 1.
35546
35547 pps Set the number of pixel output per each second in one row. Allowed
35548 range is from 1 to 1024. Default value is 64.
35549
35550 mode
35551 Set the output visual mode. Allowed values are:
35552
35553 magnitude
35554 Show magnitude.
35555
35556 phase
35557 Show only phase.
35558
35559 magphase
35560 Show combination of magnitude and phase. Magnitude is mapped
35561 to brightness and phase to color.
35562
35563 channel
35564 Show unique color per channel magnitude.
35565
35566 stereo
35567 Show unique color per stereo difference.
35568
35569 Default value is "magnitude".
35570
35571 slide
35572 Set the output slide method. Allowed values are:
35573
35574 replace
35575 scroll
35576 frame
35577 direction
35578 Set the direction method for output slide method. Allowed values
35579 are:
35580
35581 lr Direction from left to right.
35582
35583 rl Direction from right to left.
35584
35585 ud Direction from up to down.
35586
35587 du Direction from down to up.
35588
35589 showfreqs
35590 Convert input audio to video output representing the audio power
35591 spectrum. Audio amplitude is on Y-axis while frequency is on X-axis.
35592
35593 The filter accepts the following options:
35594
35595 size, s
35596 Specify size of video. For the syntax of this option, check the
35597 "Video size" section in the ffmpeg-utils manual. Default is
35598 "1024x512".
35599
35600 rate, r
35601 Set video rate. Default is 25.
35602
35603 mode
35604 Set display mode. This set how each frequency bin will be
35605 represented.
35606
35607 It accepts the following values:
35608
35609 line
35610 bar
35611 dot
35612
35613 Default is "bar".
35614
35615 ascale
35616 Set amplitude scale.
35617
35618 It accepts the following values:
35619
35620 lin Linear scale.
35621
35622 sqrt
35623 Square root scale.
35624
35625 cbrt
35626 Cubic root scale.
35627
35628 log Logarithmic scale.
35629
35630 Default is "log".
35631
35632 fscale
35633 Set frequency scale.
35634
35635 It accepts the following values:
35636
35637 lin Linear scale.
35638
35639 log Logarithmic scale.
35640
35641 rlog
35642 Reverse logarithmic scale.
35643
35644 Default is "lin".
35645
35646 win_size
35647 Set window size. Allowed range is from 16 to 65536.
35648
35649 Default is 2048
35650
35651 win_func
35652 Set windowing function.
35653
35654 It accepts the following values:
35655
35656 rect
35657 bartlett
35658 hanning
35659 hamming
35660 blackman
35661 welch
35662 flattop
35663 bharris
35664 bnuttall
35665 bhann
35666 sine
35667 nuttall
35668 lanczos
35669 gauss
35670 tukey
35671 dolph
35672 cauchy
35673 parzen
35674 poisson
35675 bohman
35676 kaiser
35677
35678 Default is "hanning".
35679
35680 overlap
35681 Set window overlap. In range "[0, 1]". Default is 1, which means
35682 optimal overlap for selected window function will be picked.
35683
35684 averaging
35685 Set time averaging. Setting this to 0 will display current maximal
35686 peaks. Default is 1, which means time averaging is disabled.
35687
35688 colors
35689 Specify list of colors separated by space or by '|' which will be
35690 used to draw channel frequencies. Unrecognized or missing colors
35691 will be replaced by white color.
35692
35693 cmode
35694 Set channel display mode.
35695
35696 It accepts the following values:
35697
35698 combined
35699 separate
35700
35701 Default is "combined".
35702
35703 minamp
35704 Set minimum amplitude used in "log" amplitude scaler.
35705
35706 data
35707 Set data display mode.
35708
35709 It accepts the following values:
35710
35711 magnitude
35712 phase
35713 delay
35714
35715 Default is "magnitude".
35716
35717 channels
35718 Set channels to use when processing audio. By default all are
35719 processed.
35720
35721 showspatial
35722 Convert stereo input audio to a video output, representing the spatial
35723 relationship between two channels.
35724
35725 The filter accepts the following options:
35726
35727 size, s
35728 Specify the video size for the output. For the syntax of this
35729 option, check the "Video size" section in the ffmpeg-utils manual.
35730 Default value is "512x512".
35731
35732 win_size
35733 Set window size. Allowed range is from 1024 to 65536. Default size
35734 is 4096.
35735
35736 win_func
35737 Set window function.
35738
35739 It accepts the following values:
35740
35741 rect
35742 bartlett
35743 hann
35744 hanning
35745 hamming
35746 blackman
35747 welch
35748 flattop
35749 bharris
35750 bnuttall
35751 bhann
35752 sine
35753 nuttall
35754 lanczos
35755 gauss
35756 tukey
35757 dolph
35758 cauchy
35759 parzen
35760 poisson
35761 bohman
35762 kaiser
35763
35764 Default value is "hann".
35765
35766 rate, r
35767 Set output framerate.
35768
35769 showspectrum
35770 Convert input audio to a video output, representing the audio frequency
35771 spectrum.
35772
35773 The filter accepts the following options:
35774
35775 size, s
35776 Specify the video size for the output. For the syntax of this
35777 option, check the "Video size" section in the ffmpeg-utils manual.
35778 Default value is "640x512".
35779
35780 slide
35781 Specify how the spectrum should slide along the window.
35782
35783 It accepts the following values:
35784
35785 replace
35786 the samples start again on the left when they reach the right
35787
35788 scroll
35789 the samples scroll from right to left
35790
35791 fullframe
35792 frames are only produced when the samples reach the right
35793
35794 rscroll
35795 the samples scroll from left to right
35796
35797 lreplace
35798 the samples start again on the right when they reach the left
35799
35800 Default value is "replace".
35801
35802 mode
35803 Specify display mode.
35804
35805 It accepts the following values:
35806
35807 combined
35808 all channels are displayed in the same row
35809
35810 separate
35811 all channels are displayed in separate rows
35812
35813 Default value is combined.
35814
35815 color
35816 Specify display color mode.
35817
35818 It accepts the following values:
35819
35820 channel
35821 each channel is displayed in a separate color
35822
35823 intensity
35824 each channel is displayed using the same color scheme
35825
35826 rainbow
35827 each channel is displayed using the rainbow color scheme
35828
35829 moreland
35830 each channel is displayed using the moreland color scheme
35831
35832 nebulae
35833 each channel is displayed using the nebulae color scheme
35834
35835 fire
35836 each channel is displayed using the fire color scheme
35837
35838 fiery
35839 each channel is displayed using the fiery color scheme
35840
35841 fruit
35842 each channel is displayed using the fruit color scheme
35843
35844 cool
35845 each channel is displayed using the cool color scheme
35846
35847 magma
35848 each channel is displayed using the magma color scheme
35849
35850 green
35851 each channel is displayed using the green color scheme
35852
35853 viridis
35854 each channel is displayed using the viridis color scheme
35855
35856 plasma
35857 each channel is displayed using the plasma color scheme
35858
35859 cividis
35860 each channel is displayed using the cividis color scheme
35861
35862 terrain
35863 each channel is displayed using the terrain color scheme
35864
35865 Default value is channel.
35866
35867 scale
35868 Specify scale used for calculating intensity color values.
35869
35870 It accepts the following values:
35871
35872 lin linear
35873
35874 sqrt
35875 square root, default
35876
35877 cbrt
35878 cubic root
35879
35880 log logarithmic
35881
35882 4thrt
35883 4th root
35884
35885 5thrt
35886 5th root
35887
35888 Default value is sqrt.
35889
35890 fscale
35891 Specify frequency scale.
35892
35893 It accepts the following values:
35894
35895 lin linear
35896
35897 log logarithmic
35898
35899 Default value is lin.
35900
35901 saturation
35902 Set saturation modifier for displayed colors. Negative values
35903 provide alternative color scheme. 0 is no saturation at all.
35904 Saturation must be in [-10.0, 10.0] range. Default value is 1.
35905
35906 win_func
35907 Set window function.
35908
35909 It accepts the following values:
35910
35911 rect
35912 bartlett
35913 hann
35914 hanning
35915 hamming
35916 blackman
35917 welch
35918 flattop
35919 bharris
35920 bnuttall
35921 bhann
35922 sine
35923 nuttall
35924 lanczos
35925 gauss
35926 tukey
35927 dolph
35928 cauchy
35929 parzen
35930 poisson
35931 bohman
35932 kaiser
35933
35934 Default value is "hann".
35935
35936 orientation
35937 Set orientation of time vs frequency axis. Can be "vertical" or
35938 "horizontal". Default is "vertical".
35939
35940 overlap
35941 Set ratio of overlap window. Default value is 0. When value is 1
35942 overlap is set to recommended size for specific window function
35943 currently used.
35944
35945 gain
35946 Set scale gain for calculating intensity color values. Default
35947 value is 1.
35948
35949 data
35950 Set which data to display. Can be "magnitude", default or "phase",
35951 or unwrapped phase: "uphase".
35952
35953 rotation
35954 Set color rotation, must be in [-1.0, 1.0] range. Default value is
35955 0.
35956
35957 start
35958 Set start frequency from which to display spectrogram. Default is
35959 0.
35960
35961 stop
35962 Set stop frequency to which to display spectrogram. Default is 0.
35963
35964 fps Set upper frame rate limit. Default is "auto", unlimited.
35965
35966 legend
35967 Draw time and frequency axes and legends. Default is disabled.
35968
35969 drange
35970 Set dynamic range used to calculate intensity color values. Default
35971 is 120 dBFS. Allowed range is from 10 to 200.
35972
35973 limit
35974 Set upper limit of input audio samples volume in dBFS. Default is 0
35975 dBFS. Allowed range is from -100 to 100.
35976
35977 opacity
35978 Set opacity strength when using pixel format output with alpha
35979 component.
35980
35981 The usage is very similar to the showwaves filter; see the examples in
35982 that section.
35983
35984 Examples
35985
35986 • Large window with logarithmic color scaling:
35987
35988 showspectrum=s=1280x480:scale=log
35989
35990 • Complete example for a colored and sliding spectrum per channel
35991 using ffplay:
35992
35993 ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
35994 [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
35995
35996 showspectrumpic
35997 Convert input audio to a single video frame, representing the audio
35998 frequency spectrum.
35999
36000 The filter accepts the following options:
36001
36002 size, s
36003 Specify the video size for the output. For the syntax of this
36004 option, check the "Video size" section in the ffmpeg-utils manual.
36005 Default value is "4096x2048".
36006
36007 mode
36008 Specify display mode.
36009
36010 It accepts the following values:
36011
36012 combined
36013 all channels are displayed in the same row
36014
36015 separate
36016 all channels are displayed in separate rows
36017
36018 Default value is combined.
36019
36020 color
36021 Specify display color mode.
36022
36023 It accepts the following values:
36024
36025 channel
36026 each channel is displayed in a separate color
36027
36028 intensity
36029 each channel is displayed using the same color scheme
36030
36031 rainbow
36032 each channel is displayed using the rainbow color scheme
36033
36034 moreland
36035 each channel is displayed using the moreland color scheme
36036
36037 nebulae
36038 each channel is displayed using the nebulae color scheme
36039
36040 fire
36041 each channel is displayed using the fire color scheme
36042
36043 fiery
36044 each channel is displayed using the fiery color scheme
36045
36046 fruit
36047 each channel is displayed using the fruit color scheme
36048
36049 cool
36050 each channel is displayed using the cool color scheme
36051
36052 magma
36053 each channel is displayed using the magma color scheme
36054
36055 green
36056 each channel is displayed using the green color scheme
36057
36058 viridis
36059 each channel is displayed using the viridis color scheme
36060
36061 plasma
36062 each channel is displayed using the plasma color scheme
36063
36064 cividis
36065 each channel is displayed using the cividis color scheme
36066
36067 terrain
36068 each channel is displayed using the terrain color scheme
36069
36070 Default value is intensity.
36071
36072 scale
36073 Specify scale used for calculating intensity color values.
36074
36075 It accepts the following values:
36076
36077 lin linear
36078
36079 sqrt
36080 square root, default
36081
36082 cbrt
36083 cubic root
36084
36085 log logarithmic
36086
36087 4thrt
36088 4th root
36089
36090 5thrt
36091 5th root
36092
36093 Default value is log.
36094
36095 fscale
36096 Specify frequency scale.
36097
36098 It accepts the following values:
36099
36100 lin linear
36101
36102 log logarithmic
36103
36104 Default value is lin.
36105
36106 saturation
36107 Set saturation modifier for displayed colors. Negative values
36108 provide alternative color scheme. 0 is no saturation at all.
36109 Saturation must be in [-10.0, 10.0] range. Default value is 1.
36110
36111 win_func
36112 Set window function.
36113
36114 It accepts the following values:
36115
36116 rect
36117 bartlett
36118 hann
36119 hanning
36120 hamming
36121 blackman
36122 welch
36123 flattop
36124 bharris
36125 bnuttall
36126 bhann
36127 sine
36128 nuttall
36129 lanczos
36130 gauss
36131 tukey
36132 dolph
36133 cauchy
36134 parzen
36135 poisson
36136 bohman
36137 kaiser
36138
36139 Default value is "hann".
36140
36141 orientation
36142 Set orientation of time vs frequency axis. Can be "vertical" or
36143 "horizontal". Default is "vertical".
36144
36145 gain
36146 Set scale gain for calculating intensity color values. Default
36147 value is 1.
36148
36149 legend
36150 Draw time and frequency axes and legends. Default is enabled.
36151
36152 rotation
36153 Set color rotation, must be in [-1.0, 1.0] range. Default value is
36154 0.
36155
36156 start
36157 Set start frequency from which to display spectrogram. Default is
36158 0.
36159
36160 stop
36161 Set stop frequency to which to display spectrogram. Default is 0.
36162
36163 drange
36164 Set dynamic range used to calculate intensity color values. Default
36165 is 120 dBFS. Allowed range is from 10 to 200.
36166
36167 limit
36168 Set upper limit of input audio samples volume in dBFS. Default is 0
36169 dBFS. Allowed range is from -100 to 100.
36170
36171 opacity
36172 Set opacity strength when using pixel format output with alpha
36173 component.
36174
36175 Examples
36176
36177 • Extract an audio spectrogram of a whole audio track in a 1024x1024
36178 picture using ffmpeg:
36179
36180 ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
36181
36182 showvolume
36183 Convert input audio volume to a video output.
36184
36185 The filter accepts the following options:
36186
36187 rate, r
36188 Set video rate.
36189
36190 b Set border width, allowed range is [0, 5]. Default is 1.
36191
36192 w Set channel width, allowed range is [80, 8192]. Default is 400.
36193
36194 h Set channel height, allowed range is [1, 900]. Default is 20.
36195
36196 f Set fade, allowed range is [0, 1]. Default is 0.95.
36197
36198 c Set volume color expression.
36199
36200 The expression can use the following variables:
36201
36202 VOLUME
36203 Current max volume of channel in dB.
36204
36205 PEAK
36206 Current peak.
36207
36208 CHANNEL
36209 Current channel number, starting from 0.
36210
36211 t If set, displays channel names. Default is enabled.
36212
36213 v If set, displays volume values. Default is enabled.
36214
36215 o Set orientation, can be horizontal: "h" or vertical: "v", default
36216 is "h".
36217
36218 s Set step size, allowed range is [0, 5]. Default is 0, which means
36219 step is disabled.
36220
36221 p Set background opacity, allowed range is [0, 1]. Default is 0.
36222
36223 m Set metering mode, can be peak: "p" or rms: "r", default is "p".
36224
36225 ds Set display scale, can be linear: "lin" or log: "log", default is
36226 "lin".
36227
36228 dm In second. If set to > 0., display a line for the max level in the
36229 previous seconds. default is disabled: 0.
36230
36231 dmc The color of the max line. Use when "dm" option is set to > 0.
36232 default is: "orange"
36233
36234 showwaves
36235 Convert input audio to a video output, representing the samples waves.
36236
36237 The filter accepts the following options:
36238
36239 size, s
36240 Specify the video size for the output. For the syntax of this
36241 option, check the "Video size" section in the ffmpeg-utils manual.
36242 Default value is "600x240".
36243
36244 mode
36245 Set display mode.
36246
36247 Available values are:
36248
36249 point
36250 Draw a point for each sample.
36251
36252 line
36253 Draw a vertical line for each sample.
36254
36255 p2p Draw a point for each sample and a line between them.
36256
36257 cline
36258 Draw a centered vertical line for each sample.
36259
36260 Default value is "point".
36261
36262 n Set the number of samples which are printed on the same column. A
36263 larger value will decrease the frame rate. Must be a positive
36264 integer. This option can be set only if the value for rate is not
36265 explicitly specified.
36266
36267 rate, r
36268 Set the (approximate) output frame rate. This is done by setting
36269 the option n. Default value is "25".
36270
36271 split_channels
36272 Set if channels should be drawn separately or overlap. Default
36273 value is 0.
36274
36275 colors
36276 Set colors separated by '|' which are going to be used for drawing
36277 of each channel.
36278
36279 scale
36280 Set amplitude scale.
36281
36282 Available values are:
36283
36284 lin Linear.
36285
36286 log Logarithmic.
36287
36288 sqrt
36289 Square root.
36290
36291 cbrt
36292 Cubic root.
36293
36294 Default is linear.
36295
36296 draw
36297 Set the draw mode. This is mostly useful to set for high n.
36298
36299 Available values are:
36300
36301 scale
36302 Scale pixel values for each drawn sample.
36303
36304 full
36305 Draw every sample directly.
36306
36307 Default value is "scale".
36308
36309 Examples
36310
36311 • Output the input file audio and the corresponding video
36312 representation at the same time:
36313
36314 amovie=a.mp3,asplit[out0],showwaves[out1]
36315
36316 • Create a synthetic signal and show it with showwaves, forcing a
36317 frame rate of 30 frames per second:
36318
36319 aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
36320
36321 showwavespic
36322 Convert input audio to a single video frame, representing the samples
36323 waves.
36324
36325 The filter accepts the following options:
36326
36327 size, s
36328 Specify the video size for the output. For the syntax of this
36329 option, check the "Video size" section in the ffmpeg-utils manual.
36330 Default value is "600x240".
36331
36332 split_channels
36333 Set if channels should be drawn separately or overlap. Default
36334 value is 0.
36335
36336 colors
36337 Set colors separated by '|' which are going to be used for drawing
36338 of each channel.
36339
36340 scale
36341 Set amplitude scale.
36342
36343 Available values are:
36344
36345 lin Linear.
36346
36347 log Logarithmic.
36348
36349 sqrt
36350 Square root.
36351
36352 cbrt
36353 Cubic root.
36354
36355 Default is linear.
36356
36357 draw
36358 Set the draw mode.
36359
36360 Available values are:
36361
36362 scale
36363 Scale pixel values for each drawn sample.
36364
36365 full
36366 Draw every sample directly.
36367
36368 Default value is "scale".
36369
36370 filter
36371 Set the filter mode.
36372
36373 Available values are:
36374
36375 average
36376 Use average samples values for each drawn sample.
36377
36378 peak
36379 Use peak samples values for each drawn sample.
36380
36381 Default value is "average".
36382
36383 Examples
36384
36385 • Extract a channel split representation of the wave form of a whole
36386 audio track in a 1024x800 picture using ffmpeg:
36387
36388 ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
36389
36390 sidedata, asidedata
36391 Delete frame side data, or select frames based on it.
36392
36393 This filter accepts the following options:
36394
36395 mode
36396 Set mode of operation of the filter.
36397
36398 Can be one of the following:
36399
36400 select
36401 Select every frame with side data of "type".
36402
36403 delete
36404 Delete side data of "type". If "type" is not set, delete all
36405 side data in the frame.
36406
36407 type
36408 Set side data type used with all modes. Must be set for "select"
36409 mode. For the list of frame side data types, refer to the
36410 "AVFrameSideDataType" enum in libavutil/frame.h. For example, to
36411 choose "AV_FRAME_DATA_PANSCAN" side data, you must specify
36412 "PANSCAN".
36413
36414 spectrumsynth
36415 Synthesize audio from 2 input video spectrums, first input stream
36416 represents magnitude across time and second represents phase across
36417 time. The filter will transform from frequency domain as displayed in
36418 videos back to time domain as presented in audio output.
36419
36420 This filter is primarily created for reversing processed showspectrum
36421 filter outputs, but can synthesize sound from other spectrograms too.
36422 But in such case results are going to be poor if the phase data is not
36423 available, because in such cases phase data need to be recreated,
36424 usually it's just recreated from random noise. For best results use
36425 gray only output ("channel" color mode in showspectrum filter) and
36426 "log" scale for magnitude video and "lin" scale for phase video. To
36427 produce phase, for 2nd video, use "data" option. Inputs videos should
36428 generally use "fullframe" slide mode as that saves resources needed for
36429 decoding video.
36430
36431 The filter accepts the following options:
36432
36433 sample_rate
36434 Specify sample rate of output audio, the sample rate of audio from
36435 which spectrum was generated may differ.
36436
36437 channels
36438 Set number of channels represented in input video spectrums.
36439
36440 scale
36441 Set scale which was used when generating magnitude input spectrum.
36442 Can be "lin" or "log". Default is "log".
36443
36444 slide
36445 Set slide which was used when generating inputs spectrums. Can be
36446 "replace", "scroll", "fullframe" or "rscroll". Default is
36447 "fullframe".
36448
36449 win_func
36450 Set window function used for resynthesis.
36451
36452 overlap
36453 Set window overlap. In range "[0, 1]". Default is 1, which means
36454 optimal overlap for selected window function will be picked.
36455
36456 orientation
36457 Set orientation of input videos. Can be "vertical" or "horizontal".
36458 Default is "vertical".
36459
36460 Examples
36461
36462 • First create magnitude and phase videos from audio, assuming audio
36463 is stereo with 44100 sample rate, then resynthesize videos back to
36464 audio with spectrumsynth:
36465
36466 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
36467 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
36468 ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
36469
36470 split, asplit
36471 Split input into several identical outputs.
36472
36473 "asplit" works with audio input, "split" with video.
36474
36475 The filter accepts a single parameter which specifies the number of
36476 outputs. If unspecified, it defaults to 2.
36477
36478 Examples
36479
36480 • Create two separate outputs from the same input:
36481
36482 [in] split [out0][out1]
36483
36484 • To create 3 or more outputs, you need to specify the number of
36485 outputs, like in:
36486
36487 [in] asplit=3 [out0][out1][out2]
36488
36489 • Create two separate outputs from the same input, one cropped and
36490 one padded:
36491
36492 [in] split [splitout1][splitout2];
36493 [splitout1] crop=100:100:0:0 [cropout];
36494 [splitout2] pad=200:200:100:100 [padout];
36495
36496 • Create 5 copies of the input audio with ffmpeg:
36497
36498 ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
36499
36500 zmq, azmq
36501 Receive commands sent through a libzmq client, and forward them to
36502 filters in the filtergraph.
36503
36504 "zmq" and "azmq" work as a pass-through filters. "zmq" must be inserted
36505 between two video filters, "azmq" between two audio filters. Both are
36506 capable to send messages to any filter type.
36507
36508 To enable these filters you need to install the libzmq library and
36509 headers and configure FFmpeg with "--enable-libzmq".
36510
36511 For more information about libzmq see: <http://www.zeromq.org/>
36512
36513 The "zmq" and "azmq" filters work as a libzmq server, which receives
36514 messages sent through a network interface defined by the bind_address
36515 (or the abbreviation "b") option. Default value of this option is
36516 tcp://localhost:5555. You may want to alter this value to your needs,
36517 but do not forget to escape any ':' signs (see filtergraph escaping).
36518
36519 The received message must be in the form:
36520
36521 <TARGET> <COMMAND> [<ARG>]
36522
36523 TARGET specifies the target of the command, usually the name of the
36524 filter class or a specific filter instance name. The default filter
36525 instance name uses the pattern Parsed_<filter_name>_<index>, but you
36526 can override this by using the filter_name@id syntax (see Filtergraph
36527 syntax).
36528
36529 COMMAND specifies the name of the command for the target filter.
36530
36531 ARG is optional and specifies the optional argument list for the given
36532 COMMAND.
36533
36534 Upon reception, the message is processed and the corresponding command
36535 is injected into the filtergraph. Depending on the result, the filter
36536 will send a reply to the client, adopting the format:
36537
36538 <ERROR_CODE> <ERROR_REASON>
36539 <MESSAGE>
36540
36541 MESSAGE is optional.
36542
36543 Examples
36544
36545 Look at tools/zmqsend for an example of a zmq client which can be used
36546 to send commands processed by these filters.
36547
36548 Consider the following filtergraph generated by ffplay. In this
36549 example the last overlay filter has an instance name. All other filters
36550 will have default instance names.
36551
36552 ffplay -dumpgraph 1 -f lavfi "
36553 color=s=100x100:c=red [l];
36554 color=s=100x100:c=blue [r];
36555 nullsrc=s=200x100, zmq [bg];
36556 [bg][l] overlay [bg+l];
36557 [bg+l][r] overlay@my=x=100 "
36558
36559 To change the color of the left side of the video, the following
36560 command can be used:
36561
36562 echo Parsed_color_0 c yellow | tools/zmqsend
36563
36564 To change the right side:
36565
36566 echo Parsed_color_1 c pink | tools/zmqsend
36567
36568 To change the position of the right side:
36569
36570 echo overlay@my x 150 | tools/zmqsend
36571
36573 Below is a description of the currently available multimedia sources.
36574
36575 amovie
36576 This is the same as movie source, except it selects an audio stream by
36577 default.
36578
36579 avsynctest
36580 Generate an Audio/Video Sync Test.
36581
36582 Generated stream periodically shows flash video frame and emits beep in
36583 audio. Useful to inspect A/V sync issues.
36584
36585 It accepts the following options:
36586
36587 size, s
36588 Set output video size. Default value is "hd720".
36589
36590 framerate, fr
36591 Set output video frame rate. Default value is 30.
36592
36593 samplerate, sr
36594 Set output audio sample rate. Default value is 44100.
36595
36596 amplitude, a
36597 Set output audio beep amplitude. Default value is 0.7.
36598
36599 period, p
36600 Set output audio beep period in seconds. Default value is 3.
36601
36602 delay, dl
36603 Set output video flash delay in number of frames. Default value is
36604 0.
36605
36606 cycle, c
36607 Enable cycling of video delays, by default is disabled.
36608
36609 duration, d
36610 Set stream output duration. By default duration is unlimited.
36611
36612 fg, bg, ag
36613 Set foreground/background/additional color.
36614
36615 movie
36616 Read audio and/or video stream(s) from a movie container.
36617
36618 It accepts the following parameters:
36619
36620 filename
36621 The name of the resource to read (not necessarily a file; it can
36622 also be a device or a stream accessed through some protocol).
36623
36624 format_name, f
36625 Specifies the format assumed for the movie to read, and can be
36626 either the name of a container or an input device. If not
36627 specified, the format is guessed from movie_name or by probing.
36628
36629 seek_point, sp
36630 Specifies the seek point in seconds. The frames will be output
36631 starting from this seek point. The parameter is evaluated with
36632 "av_strtod", so the numerical value may be suffixed by an IS
36633 postfix. The default value is "0".
36634
36635 streams, s
36636 Specifies the streams to read. Several streams can be specified,
36637 separated by "+". The source will then have as many outputs, in the
36638 same order. The syntax is explained in the "Stream specifiers"
36639 section in the ffmpeg manual. Two special names, "dv" and "da"
36640 specify respectively the default (best suited) video and audio
36641 stream. Default is "dv", or "da" if the filter is called as
36642 "amovie".
36643
36644 stream_index, si
36645 Specifies the index of the video stream to read. If the value is
36646 -1, the most suitable video stream will be automatically selected.
36647 The default value is "-1". Deprecated. If the filter is called
36648 "amovie", it will select audio instead of video.
36649
36650 loop
36651 Specifies how many times to read the stream in sequence. If the
36652 value is 0, the stream will be looped infinitely. Default value is
36653 "1".
36654
36655 Note that when the movie is looped the source timestamps are not
36656 changed, so it will generate non monotonically increasing
36657 timestamps.
36658
36659 discontinuity
36660 Specifies the time difference between frames above which the point
36661 is considered a timestamp discontinuity which is removed by
36662 adjusting the later timestamps.
36663
36664 dec_threads
36665 Specifies the number of threads for decoding
36666
36667 format_opts
36668 Specify format options for the opened file. Format options can be
36669 specified as a list of key=value pairs separated by ':'. The
36670 following example shows how to add protocol_whitelist and
36671 protocol_blacklist options:
36672
36673 ffplay -f lavfi
36674 "movie=filename='1.sdp':format_opts='protocol_whitelist=file,rtp,udp\:protocol_blacklist=http'"
36675
36676 It allows overlaying a second video on top of the main input of a
36677 filtergraph, as shown in this graph:
36678
36679 input -----------> deltapts0 --> overlay --> output
36680 ^
36681 |
36682 movie --> scale--> deltapts1 -------+
36683
36684 Examples
36685
36686 • Skip 3.2 seconds from the start of the AVI file in.avi, and overlay
36687 it on top of the input labelled "in":
36688
36689 movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
36690 [in] setpts=PTS-STARTPTS [main];
36691 [main][over] overlay=16:16 [out]
36692
36693 • Read from a video4linux2 device, and overlay it on top of the input
36694 labelled "in":
36695
36696 movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
36697 [in] setpts=PTS-STARTPTS [main];
36698 [main][over] overlay=16:16 [out]
36699
36700 • Read the first video stream and the audio stream with id 0x81 from
36701 dvd.vob; the video is connected to the pad named "video" and the
36702 audio is connected to the pad named "audio":
36703
36704 movie=dvd.vob:s=v:0+#0x81 [video] [audio]
36705
36706 Commands
36707
36708 Both movie and amovie support the following commands:
36709
36710 seek
36711 Perform seek using "av_seek_frame". The syntax is: seek
36712 stream_index|timestamp|flags
36713
36714 • stream_index: If stream_index is -1, a default stream is
36715 selected, and timestamp is automatically converted from
36716 AV_TIME_BASE units to the stream specific time_base.
36717
36718 • timestamp: Timestamp in AVStream.time_base units or, if no
36719 stream is specified, in AV_TIME_BASE units.
36720
36721 • flags: Flags which select direction and seeking mode.
36722
36723 get_duration
36724 Get movie duration in AV_TIME_BASE units.
36725
36727 FFmpeg can be hooked up with a number of external libraries to add
36728 support for more formats. None of them are used by default, their use
36729 has to be explicitly requested by passing the appropriate flags to
36730 ./configure.
36731
36732 Alliance for Open Media (AOM)
36733 FFmpeg can make use of the AOM library for AV1 decoding and encoding.
36734
36735 Go to <http://aomedia.org/> and follow the instructions for installing
36736 the library. Then pass "--enable-libaom" to configure to enable it.
36737
36738 AMD AMF/VCE
36739 FFmpeg can use the AMD Advanced Media Framework library for accelerated
36740 H.264 and HEVC(only windows) encoding on hardware with Video Coding
36741 Engine (VCE).
36742
36743 To enable support you must obtain the AMF framework header
36744 files(version 1.4.9+) from
36745 <https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git>.
36746
36747 Create an "AMF/" directory in the system include path. Copy the
36748 contents of "AMF/amf/public/include/" into that directory. Then
36749 configure FFmpeg with "--enable-amf".
36750
36751 Initialization of amf encoder occurs in this order: 1) trying to
36752 initialize through dx11(only windows) 2) trying to initialize through
36753 dx9(only windows) 3) trying to initialize through vulkan
36754
36755 To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and
36756 amf-amdgpu-pro package(amdgru-pro contains, but does not install
36757 automatically) are required.
36758
36759 This driver can be installed using amdgpu-pro-install script in
36760 official amd driver archive.
36761
36762 AviSynth
36763 FFmpeg can read AviSynth scripts as input. To enable support, pass
36764 "--enable-avisynth" to configure after installing the headers provided
36765 by <https://github.com/AviSynth/AviSynthPlus>. AviSynth+ can be
36766 configured to install only the headers by either passing
36767 "-DHEADERS_ONLY:bool=on" to the normal CMake-based build system, or by
36768 using the supplied "GNUmakefile".
36769
36770 For Windows, supported AviSynth variants are <http://avisynth.nl> for
36771 32-bit builds and <http://avisynth.nl/index.php/AviSynth+> for 32-bit
36772 and 64-bit builds.
36773
36774 For Linux, macOS, and BSD, the only supported AviSynth variant is
36775 <https://github.com/AviSynth/AviSynthPlus>, starting with version 3.5.
36776
36777 In 2016, AviSynth+ added support for building with GCC. However,
36778 due to the eccentricities of Windows' calling conventions, 32-bit
36779 GCC builds of AviSynth+ are not compatible with typical 32-bit
36780 builds of FFmpeg.
36781
36782 By default, FFmpeg assumes compatibility with 32-bit MSVC builds of
36783 AviSynth+ since that is the most widely-used and entrenched build
36784 configuration. Users can override this and enable support for
36785 32-bit GCC builds of AviSynth+ by passing "-DAVSC_WIN32_GCC32" to
36786 "--extra-cflags" when configuring FFmpeg.
36787
36788 64-bit builds of FFmpeg are not affected, and can use either MSVC
36789 or GCC builds of AviSynth+ without any special flags.
36790
36791 AviSynth(+) is loaded dynamically. Distributors can build FFmpeg
36792 with "--enable-avisynth", and the binaries will work regardless of
36793 the end user having AviSynth installed. If/when an end user would
36794 like to use AviSynth scripts, then they can install AviSynth(+) and
36795 FFmpeg will be able to find and use it to open scripts.
36796
36797 Chromaprint
36798 FFmpeg can make use of the Chromaprint library for generating audio
36799 fingerprints. Pass "--enable-chromaprint" to configure to enable it.
36800 See <https://acoustid.org/chromaprint>.
36801
36802 codec2
36803 FFmpeg can make use of the codec2 library for codec2 decoding and
36804 encoding. There is currently no native decoder, so libcodec2 must be
36805 used for decoding.
36806
36807 Go to <http://freedv.org/>, download "Codec 2 source archive". Build
36808 and install using CMake. Debian users can install the libcodec2-dev
36809 package instead. Once libcodec2 is installed you can pass
36810 "--enable-libcodec2" to configure to enable it.
36811
36812 The easiest way to use codec2 is with .c2 files, since they contain the
36813 mode information required for decoding. To encode such a file, use a
36814 .c2 file extension and give the libcodec2 encoder the -mode option:
36815 "ffmpeg -i input.wav -mode 700C output.c2". Playback is as simple as
36816 "ffplay output.c2". For a list of supported modes, run "ffmpeg -h
36817 encoder=libcodec2". Raw codec2 files are also supported. To make
36818 sense of them the mode in use needs to be specified as a format option:
36819 "ffmpeg -f codec2raw -mode 1300 -i input.raw output.wav".
36820
36821 dav1d
36822 FFmpeg can make use of the dav1d library for AV1 video decoding.
36823
36824 Go to <https://code.videolan.org/videolan/dav1d> and follow the
36825 instructions for installing the library. Then pass "--enable-libdav1d"
36826 to configure to enable it.
36827
36828 davs2
36829 FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video
36830 decoding.
36831
36832 Go to <https://github.com/pkuvcl/davs2> and follow the instructions for
36833 installing the library. Then pass "--enable-libdavs2" to configure to
36834 enable it.
36835
36836 libdavs2 is under the GNU Public License Version 2 or later (see
36837 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
36838 details), you must upgrade FFmpeg's license to GPL in order to use
36839 it.
36840
36841 uavs3d
36842 FFmpeg can make use of the uavs3d library for AVS3-P2/IEEE1857.10 video
36843 decoding.
36844
36845 Go to <https://github.com/uavs3/uavs3d> and follow the instructions for
36846 installing the library. Then pass "--enable-libuavs3d" to configure to
36847 enable it.
36848
36849 Game Music Emu
36850 FFmpeg can make use of the Game Music Emu library to read audio from
36851 supported video game music file formats. Pass "--enable-libgme" to
36852 configure to enable it. See
36853 <https://bitbucket.org/mpyne/game-music-emu/overview>.
36854
36855 Intel QuickSync Video
36856 FFmpeg can use Intel QuickSync Video (QSV) for accelerated decoding and
36857 encoding of multiple codecs. To use QSV, FFmpeg must be linked against
36858 the "libmfx" dispatcher, which loads the actual decoding libraries.
36859
36860 The dispatcher is open source and can be downloaded from
36861 <https://github.com/lu-zero/mfx_dispatch.git>. FFmpeg needs to be
36862 configured with the "--enable-libmfx" option and "pkg-config" needs to
36863 be able to locate the dispatcher's ".pc" files.
36864
36865 Kvazaar
36866 FFmpeg can make use of the Kvazaar library for HEVC encoding.
36867
36868 Go to <https://github.com/ultravideo/kvazaar> and follow the
36869 instructions for installing the library. Then pass
36870 "--enable-libkvazaar" to configure to enable it.
36871
36872 LAME
36873 FFmpeg can make use of the LAME library for MP3 encoding.
36874
36875 Go to <http://lame.sourceforge.net/> and follow the instructions for
36876 installing the library. Then pass "--enable-libmp3lame" to configure
36877 to enable it.
36878
36879 libilbc
36880 iLBC is a narrowband speech codec that has been made freely available
36881 by Google as part of the WebRTC project. libilbc is a packaging
36882 friendly copy of the iLBC codec. FFmpeg can make use of the libilbc
36883 library for iLBC decoding and encoding.
36884
36885 Go to <https://github.com/TimothyGu/libilbc> and follow the
36886 instructions for installing the library. Then pass "--enable-libilbc"
36887 to configure to enable it.
36888
36889 libjxl
36890 JPEG XL is an image format intended to fully replace legacy JPEG for an
36891 extended period of life. See <https://jpegxl.info/> for more
36892 information, and see <https://github.com/libjxl/libjxl> for the library
36893 source. You can pass "--enable-libjxl" to configure in order enable the
36894 libjxl wrapper.
36895
36896 libvpx
36897 FFmpeg can make use of the libvpx library for VP8/VP9 decoding and
36898 encoding.
36899
36900 Go to <http://www.webmproject.org/> and follow the instructions for
36901 installing the library. Then pass "--enable-libvpx" to configure to
36902 enable it.
36903
36904 ModPlug
36905 FFmpeg can make use of this library, originating in Modplug-XMMS, to
36906 read from MOD-like music files. See
36907 <https://github.com/Konstanty/libmodplug>. Pass "--enable-libmodplug"
36908 to configure to enable it.
36909
36910 OpenCORE, VisualOn, and Fraunhofer libraries
36911 Spun off Google Android sources, OpenCore, VisualOn and Fraunhofer
36912 libraries provide encoders for a number of audio codecs.
36913
36914 OpenCORE and VisualOn libraries are under the Apache License 2.0
36915 (see <http://www.apache.org/licenses/LICENSE-2.0> for details),
36916 which is incompatible to the LGPL version 2.1 and GPL version 2.
36917 You have to upgrade FFmpeg's license to LGPL version 3 (or if you
36918 have enabled GPL components, GPL version 3) by passing
36919 "--enable-version3" to configure in order to use it.
36920
36921 The license of the Fraunhofer AAC library is incompatible with the
36922 GPL. Therefore, for GPL builds, you have to pass
36923 "--enable-nonfree" to configure in order to use it. To the best of
36924 our knowledge, it is compatible with the LGPL.
36925
36926 OpenCORE AMR
36927
36928 FFmpeg can make use of the OpenCORE libraries for AMR-NB
36929 decoding/encoding and AMR-WB decoding.
36930
36931 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
36932 instructions for installing the libraries. Then pass
36933 "--enable-libopencore-amrnb" and/or "--enable-libopencore-amrwb" to
36934 configure to enable them.
36935
36936 VisualOn AMR-WB encoder library
36937
36938 FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB
36939 encoding.
36940
36941 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
36942 instructions for installing the library. Then pass
36943 "--enable-libvo-amrwbenc" to configure to enable it.
36944
36945 Fraunhofer AAC library
36946
36947 FFmpeg can make use of the Fraunhofer AAC library for AAC decoding &
36948 encoding.
36949
36950 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
36951 instructions for installing the library. Then pass
36952 "--enable-libfdk-aac" to configure to enable it.
36953
36954 OpenH264
36955 FFmpeg can make use of the OpenH264 library for H.264 decoding and
36956 encoding.
36957
36958 Go to <http://www.openh264.org/> and follow the instructions for
36959 installing the library. Then pass "--enable-libopenh264" to configure
36960 to enable it.
36961
36962 For decoding, this library is much more limited than the built-in
36963 decoder in libavcodec; currently, this library lacks support for
36964 decoding B-frames and some other main/high profile features. (It
36965 currently only supports constrained baseline profile and CABAC.) Using
36966 it is mostly useful for testing and for taking advantage of Cisco's
36967 patent portfolio license
36968 (<http://www.openh264.org/BINARY_LICENSE.txt>).
36969
36970 OpenJPEG
36971 FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos.
36972 Go to <http://www.openjpeg.org/> to get the libraries and follow the
36973 installation instructions. To enable using OpenJPEG in FFmpeg, pass
36974 "--enable-libopenjpeg" to ./configure.
36975
36976 rav1e
36977 FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to
36978 encode videos. Go to <https://github.com/xiph/rav1e/> and follow the
36979 instructions to build the C library. To enable using rav1e in FFmpeg,
36980 pass "--enable-librav1e" to ./configure.
36981
36982 SVT-AV1
36983 FFmpeg can make use of the Scalable Video Technology for AV1 library
36984 for AV1 encoding.
36985
36986 Go to <https://gitlab.com/AOMediaCodec/SVT-AV1/> and follow the
36987 instructions for installing the library. Then pass "--enable-libsvtav1"
36988 to configure to enable it.
36989
36990 TwoLAME
36991 FFmpeg can make use of the TwoLAME library for MP2 encoding.
36992
36993 Go to <http://www.twolame.org/> and follow the instructions for
36994 installing the library. Then pass "--enable-libtwolame" to configure
36995 to enable it.
36996
36997 VapourSynth
36998 FFmpeg can read VapourSynth scripts as input. To enable support, pass
36999 "--enable-vapoursynth" to configure. Vapoursynth is detected via
37000 "pkg-config". Versions 42 or greater supported. See
37001 <http://www.vapoursynth.com/>.
37002
37003 Due to security concerns, Vapoursynth scripts will not be autodetected
37004 so the input format has to be forced. For ff* CLI tools, add "-f
37005 vapoursynth" before the input "-i yourscript.vpy".
37006
37007 x264
37008 FFmpeg can make use of the x264 library for H.264 encoding.
37009
37010 Go to <http://www.videolan.org/developers/x264.html> and follow the
37011 instructions for installing the library. Then pass "--enable-libx264"
37012 to configure to enable it.
37013
37014 x264 is under the GNU Public License Version 2 or later (see
37015 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
37016 details), you must upgrade FFmpeg's license to GPL in order to use
37017 it.
37018
37019 x265
37020 FFmpeg can make use of the x265 library for HEVC encoding.
37021
37022 Go to <http://x265.org/developers.html> and follow the instructions for
37023 installing the library. Then pass "--enable-libx265" to configure to
37024 enable it.
37025
37026 x265 is under the GNU Public License Version 2 or later (see
37027 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
37028 details), you must upgrade FFmpeg's license to GPL in order to use
37029 it.
37030
37031 xavs
37032 FFmpeg can make use of the xavs library for AVS encoding.
37033
37034 Go to <http://xavs.sf.net/> and follow the instructions for installing
37035 the library. Then pass "--enable-libxavs" to configure to enable it.
37036
37037 xavs2
37038 FFmpeg can make use of the xavs2 library for AVS2-P2/IEEE1857.4 video
37039 encoding.
37040
37041 Go to <https://github.com/pkuvcl/xavs2> and follow the instructions for
37042 installing the library. Then pass "--enable-libxavs2" to configure to
37043 enable it.
37044
37045 libxavs2 is under the GNU Public License Version 2 or later (see
37046 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
37047 details), you must upgrade FFmpeg's license to GPL in order to use
37048 it.
37049
37050 ZVBI
37051 ZVBI is a VBI decoding library which can be used by FFmpeg to decode
37052 DVB teletext pages and DVB teletext subtitles.
37053
37054 Go to <http://sourceforge.net/projects/zapping/> and follow the
37055 instructions for installing the library. Then pass "--enable-libzvbi"
37056 to configure to enable it.
37057
37059 You can use the "-formats" and "-codecs" options to have an exhaustive
37060 list.
37061
37062 File Formats
37063 FFmpeg supports the following file formats through the "libavformat"
37064 library:
37065
37066 Name : Encoding @tab Decoding @tab Comments
37067 3dostr : @tab X
37068 4xm : @tab X
37069 @tab 4X Technologies format, used in some games.
37070
37071 8088flex TMV : @tab X
37072 AAX : @tab X
37073 @tab Audible Enhanced Audio format, used in audiobooks.
37074
37075 AA : @tab X
37076 @tab Audible Format 2, 3, and 4, used in audiobooks.
37077
37078 ACT Voice : @tab X
37079 @tab contains G.729 audio
37080
37081 Adobe Filmstrip : X @tab X
37082 Audio IFF (AIFF) : X @tab X
37083 American Laser Games MM : @tab X
37084 @tab Multimedia format used in games like Mad Dog McCree.
37085
37086 3GPP AMR : X @tab X
37087 Amazing Studio Packed Animation File : @tab X
37088 @tab Multimedia format used in game Heart Of Darkness.
37089
37090 Apple HTTP Live Streaming : @tab X
37091 Artworx Data Format : @tab X
37092 Interplay ACM : @tab X
37093 @tab Audio only format used in some Interplay games.
37094
37095 ADP : @tab X
37096 @tab Audio format used on the Nintendo Gamecube.
37097
37098 AFC : @tab X
37099 @tab Audio format used on the Nintendo Gamecube.
37100
37101 ADS/SS2 : @tab X
37102 @tab Audio format used on the PS2.
37103
37104 APNG : X @tab X
37105 ASF : X @tab X
37106 @tab Advanced / Active Streaming Format.
37107
37108 AST : X @tab X
37109 @tab Audio format used on the Nintendo Wii.
37110
37111 AVI : X @tab X
37112 AviSynth : @tab X
37113 AVR : @tab X
37114 @tab Audio format used on Mac.
37115
37116 AVS : @tab X
37117 @tab Multimedia format used by the Creature Shock game.
37118
37119 Beam Software SIFF : @tab X
37120 @tab Audio and video format used in some games by Beam Software.
37121
37122 Bethesda Softworks VID : @tab X
37123 @tab Used in some games from Bethesda Softworks.
37124
37125 Binary text : @tab X
37126 Bink : @tab X
37127 @tab Multimedia format used by many games.
37128
37129 Bink Audio : @tab X
37130 @tab Audio only multimedia format used by some games.
37131
37132 Bitmap Brothers JV : @tab X
37133 @tab Used in Z and Z95 games.
37134
37135 BRP : @tab X
37136 @tab Argonaut Games format.
37137
37138 Brute Force & Ignorance : @tab X
37139 @tab Used in the game Flash Traffic: City of Angels.
37140
37141 BFSTM : @tab X
37142 @tab Audio format used on the Nintendo WiiU (based on BRSTM).
37143
37144 BRSTM : @tab X
37145 @tab Audio format used on the Nintendo Wii.
37146
37147 BW64 : @tab X
37148 @tab Broadcast Wave 64bit.
37149
37150 BWF : X @tab X
37151 codec2 (raw) : X @tab X
37152 @tab Must be given -mode format option to decode correctly.
37153
37154 codec2 (.c2 files) : X @tab X
37155 @tab Contains header with version and mode info, simplifying playback.
37156
37157 CRI ADX : X @tab X
37158 @tab Audio-only format used in console video games.
37159
37160 CRI AIX : @tab X
37161 CRI HCA : @tab X
37162 @tab Audio-only format used in console video games.
37163
37164 Discworld II BMV : @tab X
37165 Interplay C93 : @tab X
37166 @tab Used in the game Cyberia from Interplay.
37167
37168 Delphine Software International CIN : @tab X
37169 @tab Multimedia format used by Delphine Software games.
37170
37171 Digital Speech Standard (DSS) : @tab X
37172 CD+G : @tab X
37173 @tab Video format used by CD+G karaoke disks
37174
37175 Phantom Cine : @tab X
37176 Commodore CDXL : @tab X
37177 @tab Amiga CD video format
37178
37179 Core Audio Format : X @tab X
37180 @tab Apple Core Audio Format
37181
37182 CRC testing format : X @tab
37183 Creative Voice : X @tab X
37184 @tab Created for the Sound Blaster Pro.
37185
37186 CRYO APC : @tab X
37187 @tab Audio format used in some games by CRYO Interactive Entertainment.
37188
37189 D-Cinema audio : X @tab X
37190 Deluxe Paint Animation : @tab X
37191 DCSTR : @tab X
37192 DFA : @tab X
37193 @tab This format is used in Chronomaster game
37194
37195 DirectDraw Surface : @tab X
37196 DSD Stream File (DSF) : @tab X
37197 DV video : X @tab X
37198 DXA : @tab X
37199 @tab This format is used in the non-Windows version of the Feeble Files
37200 game and different game cutscenes repacked for use with ScummVM.
37201
37202 Electronic Arts cdata : @tab X
37203 Electronic Arts Multimedia : @tab X
37204 @tab Used in various EA games; files have extensions like WVE and UV2.
37205
37206 Ensoniq Paris Audio File : @tab X
37207 FFM (FFserver live feed) : X @tab X
37208 Flash (SWF) : X @tab X
37209 Flash 9 (AVM2) : X @tab X
37210 @tab Only embedded audio is decoded.
37211
37212 FLI/FLC/FLX animation : @tab X
37213 @tab .fli/.flc files
37214
37215 Flash Video (FLV) : X @tab X
37216 @tab Macromedia Flash video files
37217
37218 framecrc testing format : X @tab
37219 FunCom ISS : @tab X
37220 @tab Audio format used in various games from FunCom like The Longest Journey.
37221
37222 G.723.1 : X @tab X
37223 G.726 : @tab X @tab Both left- and right-
37224 justified.
37225 G.729 BIT : X @tab X
37226 G.729 raw : @tab X
37227 GENH : @tab X
37228 @tab Audio format for various games.
37229
37230 GIF Animation : X @tab X
37231 GXF : X @tab X
37232 @tab General eXchange Format SMPTE 360M, used by Thomson Grass Valley
37233 playout servers.
37234
37235 HNM : @tab X
37236 @tab Only version 4 supported, used in some games from Cryo Interactive
37237
37238 iCEDraw File : @tab X
37239 ICO : X @tab X
37240 @tab Microsoft Windows ICO
37241
37242 id Quake II CIN video : @tab X
37243 id RoQ : X @tab X
37244 @tab Used in Quake III, Jedi Knight 2 and other computer games.
37245
37246 IEC61937 encapsulation : X @tab X
37247 IFF : @tab X
37248 @tab Interchange File Format
37249
37250 IFV : @tab X
37251 @tab A format used by some old CCTV DVRs.
37252
37253 iLBC : X @tab X
37254 Interplay MVE : @tab X
37255 @tab Format used in various Interplay computer games.
37256
37257 Iterated Systems ClearVideo : @tab X
37258 @tab I-frames only
37259
37260 IV8 : @tab X
37261 @tab A format generated by IndigoVision 8000 video server.
37262
37263 IVF (On2) : X @tab X
37264 @tab A format used by libvpx
37265
37266 Internet Video Recording : @tab X
37267 IRCAM : X @tab X
37268 LAF : @tab X
37269 @tab Limitless Audio Format
37270
37271 LATM : X @tab X
37272 LMLM4 : @tab X
37273 @tab Used by Linux Media Labs MPEG-4 PCI boards
37274
37275 LOAS : @tab X
37276 @tab contains LATM multiplexed AAC audio
37277
37278 LRC : X @tab X
37279 LVF : @tab X
37280 LXF : @tab X
37281 @tab VR native stream format, used by Leitch/Harris' video servers.
37282
37283 Magic Lantern Video (MLV) : @tab X
37284 Matroska : X @tab X
37285 Matroska audio : X @tab
37286 FFmpeg metadata : X @tab X
37287 @tab Metadata in text format.
37288
37289 MAXIS XA : @tab X
37290 @tab Used in Sim City 3000; file extension .xa.
37291
37292 MCA : @tab X
37293 @tab Used in some games from Capcom; file extension .mca.
37294
37295 MD Studio : @tab X
37296 Metal Gear Solid: The Twin Snakes : @tab X
37297 Megalux Frame : @tab X
37298 @tab Used by Megalux Ultimate Paint
37299
37300 MobiClip MODS : @tab X
37301 MobiClip MOFLEX : @tab X
37302 Mobotix .mxg : @tab X
37303 Monkey's Audio : @tab X
37304 Motion Pixels MVI : @tab X
37305 MOV/QuickTime/MP4 : X @tab X
37306 @tab 3GP, 3GP2, PSP, iPod variants supported
37307
37308 MP2 : X @tab X
37309 MP3 : X @tab X
37310 MPEG-1 System : X @tab X
37311 @tab muxed audio and video, VCD format supported
37312
37313 MPEG-PS (program stream) : X @tab X
37314 @tab also known as C<VOB> file, SVCD and DVD format supported
37315
37316 MPEG-TS (transport stream) : X @tab X
37317 @tab also known as DVB Transport Stream
37318
37319 MPEG-4 : X @tab X
37320 @tab MPEG-4 is a variant of QuickTime.
37321
37322 MSF : @tab X
37323 @tab Audio format used on the PS3.
37324
37325 Mirillis FIC video : @tab X
37326 @tab No cursor rendering.
37327
37328 MIDI Sample Dump Standard : @tab X
37329 MIME multipart JPEG : X @tab
37330 MSN TCP webcam : @tab X
37331 @tab Used by MSN Messenger webcam streams.
37332
37333 MTV : @tab X
37334 Musepack : @tab X
37335 Musepack SV8 : @tab X
37336 Material eXchange Format (MXF) : X @tab X
37337 @tab SMPTE 377M, used by D-Cinema, broadcast industry.
37338
37339 Material eXchange Format (MXF), D-10 Mapping : X @tab X
37340 @tab SMPTE 386M, D-10/IMX Mapping.
37341
37342 NC camera feed : @tab X
37343 @tab NC (AVIP NC4600) camera streams
37344
37345 NIST SPeech HEader REsources : @tab X
37346 Computerized Speech Lab NSP : @tab X
37347 NTT TwinVQ (VQF) : @tab X
37348 @tab Nippon Telegraph and Telephone Corporation TwinVQ.
37349
37350 Nullsoft Streaming Video : @tab X
37351 NuppelVideo : @tab X
37352 NUT : X @tab X
37353 @tab NUT Open Container Format
37354
37355 Ogg : X @tab X
37356 Playstation Portable PMP : @tab X
37357 Portable Voice Format : @tab X
37358 RK Audio (RKA) : @tab X
37359 TechnoTrend PVA : @tab X
37360 @tab Used by TechnoTrend DVB PCI boards.
37361
37362 QCP : @tab X
37363 raw ADTS (AAC) : X @tab X
37364 raw AC-3 : X @tab X
37365 raw AMR-NB : @tab X
37366 raw AMR-WB : @tab X
37367 raw APAC : @tab X
37368 raw aptX : X @tab X
37369 raw aptX HD : X @tab X
37370 raw Bonk : @tab X
37371 raw Chinese AVS video : X @tab X
37372 raw DFPWM : X @tab X
37373 raw Dirac : X @tab X
37374 raw DNxHD : X @tab X
37375 raw DTS : X @tab X
37376 raw DTS-HD : @tab X
37377 raw E-AC-3 : X @tab X
37378 raw FLAC : X @tab X
37379 raw GSM : @tab X
37380 raw H.261 : X @tab X
37381 raw H.263 : X @tab X
37382 raw H.264 : X @tab X
37383 raw HEVC : X @tab X
37384 raw Ingenient MJPEG : @tab X
37385 raw MJPEG : X @tab X
37386 raw MLP : @tab X
37387 raw MPEG : @tab X
37388 raw MPEG-1 : @tab X
37389 raw MPEG-2 : @tab X
37390 raw MPEG-4 : X @tab X
37391 raw NULL : X @tab
37392 raw video : X @tab X
37393 raw id RoQ : X @tab
37394 raw OBU : X @tab X
37395 raw SBC : X @tab X
37396 raw Shorten : @tab X
37397 raw TAK : @tab X
37398 raw TrueHD : X @tab X
37399 raw VC-1 : X @tab X
37400 raw PCM A-law : X @tab X
37401 raw PCM mu-law : X @tab X
37402 raw PCM Archimedes VIDC : X @tab X
37403 raw PCM signed 8 bit : X @tab X
37404 raw PCM signed 16 bit big-endian : X @tab X
37405 raw PCM signed 16 bit little-endian : X @tab X
37406 raw PCM signed 24 bit big-endian : X @tab X
37407 raw PCM signed 24 bit little-endian : X @tab X
37408 raw PCM signed 32 bit big-endian : X @tab X
37409 raw PCM signed 32 bit little-endian : X @tab X
37410 raw PCM signed 64 bit big-endian : X @tab X
37411 raw PCM signed 64 bit little-endian : X @tab X
37412 raw PCM unsigned 8 bit : X @tab X
37413 raw PCM unsigned 16 bit big-endian : X @tab X
37414 raw PCM unsigned 16 bit little-endian : X @tab X
37415 raw PCM unsigned 24 bit big-endian : X @tab X
37416 raw PCM unsigned 24 bit little-endian : X @tab X
37417 raw PCM unsigned 32 bit big-endian : X @tab X
37418 raw PCM unsigned 32 bit little-endian : X @tab X
37419 raw PCM 16.8 floating point little-endian : @tab X
37420 raw PCM 24.0 floating point little-endian : @tab X
37421 raw PCM floating-point 32 bit big-endian : X @tab X
37422 raw PCM floating-point 32 bit little-endian : X @tab X
37423 raw PCM floating-point 64 bit big-endian : X @tab X
37424 raw PCM floating-point 64 bit little-endian : X @tab X
37425 RDT : @tab X
37426 REDCODE R3D : @tab X
37427 @tab File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.
37428
37429 RealMedia : X @tab X
37430 Redirector : @tab X
37431 RedSpark : @tab X
37432 Renderware TeXture Dictionary : @tab X
37433 Resolume DXV : @tab X
37434 RF64 : @tab X
37435 RL2 : @tab X
37436 @tab Audio and video format used in some games by Entertainment Software Partners.
37437
37438 RPL/ARMovie : @tab X
37439 Lego Mindstorms RSO : X @tab X
37440 RSD : @tab X
37441 RTMP : X @tab X
37442 @tab Output is performed by publishing stream to RTMP server
37443
37444 RTP : X @tab X
37445 RTSP : X @tab X
37446 Sample Dump eXchange : @tab X
37447 SAP : X @tab X
37448 SBG : @tab X
37449 SDNS : @tab X
37450 SDP : @tab X
37451 SER : @tab X
37452 Digital Pictures SGA : @tab X
37453 Sega FILM/CPK : X @tab X
37454 @tab Used in many Sega Saturn console games.
37455
37456 Silicon Graphics Movie : @tab X
37457 Sierra SOL : @tab X
37458 @tab .sol files used in Sierra Online games.
37459
37460 Sierra VMD : @tab X
37461 @tab Used in Sierra CD-ROM games.
37462
37463 Smacker : @tab X
37464 @tab Multimedia format used by many games.
37465
37466 SMJPEG : X @tab X
37467 @tab Used in certain Loki game ports.
37468
37469 SMPTE 337M encapsulation : @tab X
37470 Smush : @tab X
37471 @tab Multimedia format used in some LucasArts games.
37472
37473 Sony OpenMG (OMA) : X @tab X
37474 @tab Audio format used in Sony Sonic Stage and Sony Vegas.
37475
37476 Sony PlayStation STR : @tab X
37477 Sony Wave64 (W64) : X @tab X
37478 SoX native format : X @tab X
37479 SUN AU format : X @tab X
37480 SUP raw PGS subtitles : X @tab X
37481 SVAG : @tab X
37482 @tab Audio format used in Konami PS2 games.
37483
37484 TDSC : @tab X
37485 Text files : @tab X
37486 THP : @tab X
37487 @tab Used on the Nintendo GameCube.
37488
37489 Tiertex Limited SEQ : @tab X
37490 @tab Tiertex .seq files used in the DOS CD-ROM version of the game Flashback.
37491
37492 True Audio : X @tab X
37493 VAG : @tab X
37494 @tab Audio format used in many Sony PS2 games.
37495
37496 VC-1 test bitstream : X @tab X
37497 Vidvox Hap : X @tab X
37498 Vivo : @tab X
37499 VPK : @tab X
37500 @tab Audio format used in Sony PS games.
37501
37502 Marble WADY : @tab X
37503 WAV : X @tab X
37504 Waveform Archiver : @tab X
37505 WavPack : X @tab X
37506 WebM : X @tab X
37507 Windows Televison (WTV) : X @tab X
37508 Wing Commander III movie : @tab X
37509 @tab Multimedia format used in Origin's Wing Commander III computer game.
37510
37511 Westwood Studios audio : X @tab X
37512 @tab Multimedia format used in Westwood Studios games.
37513
37514 Westwood Studios VQA : @tab X
37515 @tab Multimedia format used in Westwood Studios games.
37516
37517 Wideband Single-bit Data (WSD) : @tab X
37518 WVE : @tab X
37519 Konami XMD : @tab X
37520 XMV : @tab X
37521 @tab Microsoft video container used in Xbox games.
37522
37523 XVAG : @tab X
37524 @tab Audio format used on the PS3.
37525
37526 xWMA : @tab X
37527 @tab Microsoft audio container used by XAudio 2.
37528
37529 eXtended BINary text (XBIN) : @tab X
37530 YUV4MPEG pipe : X @tab X
37531 Psygnosis YOP : @tab X
37532
37533 "X" means that the feature in that column (encoding / decoding) is
37534 supported.
37535
37536 Image Formats
37537 FFmpeg can read and write images for each frame of a video sequence.
37538 The following image formats are supported:
37539
37540 Name : Encoding @tab Decoding @tab Comments
37541 .Y.U.V : X @tab X
37542 @tab one raw file per component
37543
37544 Alias PIX : X @tab X
37545 @tab Alias/Wavefront PIX image format
37546
37547 animated GIF : X @tab X
37548 APNG : X @tab X
37549 @tab Animated Portable Network Graphics
37550
37551 BMP : X @tab X
37552 @tab Microsoft BMP image
37553
37554 BRender PIX : @tab X
37555 @tab Argonaut BRender 3D engine image format.
37556
37557 CRI : @tab X
37558 @tab Cintel RAW
37559
37560 DPX : X @tab X
37561 @tab Digital Picture Exchange
37562
37563 EXR : @tab X
37564 @tab OpenEXR
37565
37566 FITS : X @tab X
37567 @tab Flexible Image Transport System
37568
37569 HDR : X @tab X
37570 @tab Radiance HDR RGBE Image format
37571
37572 IMG : @tab X
37573 @tab GEM Raster image
37574
37575 JPEG : X @tab X
37576 @tab Progressive JPEG is not supported.
37577
37578 JPEG 2000 : X @tab X
37579 JPEG-LS : X @tab X
37580 LJPEG : X @tab
37581 @tab Lossless JPEG
37582
37583 Media 100 : @tab X
37584 MSP : @tab X
37585 @tab Microsoft Paint image
37586
37587 PAM : X @tab X
37588 @tab PAM is a PNM extension with alpha support.
37589
37590 PBM : X @tab X
37591 @tab Portable BitMap image
37592
37593 PCD : @tab X
37594 @tab PhotoCD
37595
37596 PCX : X @tab X
37597 @tab PC Paintbrush
37598
37599 PFM : X @tab X
37600 @tab Portable FloatMap image
37601
37602 PGM : X @tab X
37603 @tab Portable GrayMap image
37604
37605 PGMYUV : X @tab X
37606 @tab PGM with U and V components in YUV 4:2:0
37607
37608 PGX : @tab X
37609 @tab PGX file decoder
37610
37611 PHM : X @tab X
37612 @tab Portable HalfFloatMap image
37613
37614 PIC : @tab X
37615 @tab Pictor/PC Paint
37616
37617 PNG : X @tab X
37618 @tab Portable Network Graphics image
37619
37620 PPM : X @tab X
37621 @tab Portable PixelMap image
37622
37623 PSD : @tab X
37624 @tab Photoshop
37625
37626 PTX : @tab X
37627 @tab V.Flash PTX format
37628
37629 QOI : X @tab X
37630 @tab Quite OK Image format
37631
37632 SGI : X @tab X
37633 @tab SGI RGB image format
37634
37635 Sun Rasterfile : X @tab X
37636 @tab Sun RAS image format
37637
37638 TIFF : X @tab X
37639 @tab YUV, JPEG and some extension is not supported yet.
37640
37641 Truevision Targa : X @tab X
37642 @tab Targa (.TGA) image format
37643
37644 VBN : X @tab X
37645 @tab Vizrt Binary Image format
37646
37647 WBMP : X @tab X
37648 @tab Wireless Application Protocol Bitmap image format
37649
37650 WebP : E @tab X
37651 @tab WebP image format, encoding supported through external library libwebp
37652
37653 XBM : X @tab X
37654 @tab X BitMap image format
37655
37656 XFace : X @tab X
37657 @tab X-Face image format
37658
37659 XPM : @tab X
37660 @tab X PixMap image format
37661
37662 XWD : X @tab X
37663 @tab X Window Dump image format
37664
37665 "X" means that the feature in that column (encoding / decoding) is
37666 supported.
37667
37668 "E" means that support is provided through an external library.
37669
37670 Video Codecs
37671 Name : Encoding @tab Decoding @tab Comments
37672 4X Movie : @tab X
37673 @tab Used in certain computer games.
37674
37675 8088flex TMV : @tab X
37676 A64 multicolor : X @tab
37677 @tab Creates video suitable to be played on a commodore 64 (multicolor mode).
37678
37679 Amazing Studio PAF Video : @tab X
37680 American Laser Games MM : @tab X
37681 @tab Used in games like Mad Dog McCree.
37682
37683 Amuse Graphics Movie : @tab X
37684 AMV Video : X @tab X
37685 @tab Used in Chinese MP3 players.
37686
37687 ANSI/ASCII art : @tab X
37688 Apple Intermediate Codec : @tab X
37689 Apple MJPEG-B : @tab X
37690 Apple Pixlet : @tab X
37691 Apple ProRes : X @tab X
37692 @tab fourcc: apch,apcn,apcs,apco,ap4h,ap4x
37693
37694 Apple QuickDraw : @tab X
37695 @tab fourcc: qdrw
37696
37697 Argonaut Video : @tab X
37698 @tab Used in some Argonaut games.
37699
37700 Asus v1 : X @tab X
37701 @tab fourcc: ASV1
37702
37703 Asus v2 : X @tab X
37704 @tab fourcc: ASV2
37705
37706 ATI VCR1 : @tab X
37707 @tab fourcc: VCR1
37708
37709 ATI VCR2 : @tab X
37710 @tab fourcc: VCR2
37711
37712 Auravision Aura : @tab X
37713 Auravision Aura 2 : @tab X
37714 Autodesk Animator Flic video : @tab X
37715 Autodesk RLE : @tab X
37716 @tab fourcc: AASC
37717
37718 AV1 : E @tab E
37719 @tab Supported through external libraries libaom, libdav1d, librav1e and libsvtav1
37720
37721 Avid 1:1 10-bit RGB Packer : X @tab X
37722 @tab fourcc: AVrp
37723
37724 AVS (Audio Video Standard) video : @tab X
37725 @tab Video encoding used by the Creature Shock game.
37726
37727 AVS2-P2/IEEE1857.4 : E @tab E
37728 @tab Supported through external libraries libxavs2 and libdavs2
37729
37730 AVS3-P2/IEEE1857.10 : @tab E
37731 @tab Supported through external library libuavs3d
37732
37733 AYUV : X @tab X
37734 @tab Microsoft uncompressed packed 4:4:4:4
37735
37736 Beam Software VB : @tab X
37737 Bethesda VID video : @tab X
37738 @tab Used in some games from Bethesda Softworks.
37739
37740 Bink Video : @tab X
37741 BitJazz SheerVideo : @tab X
37742 Bitmap Brothers JV video : @tab X
37743 y41p Brooktree uncompressed 4:1:1 12-bit : X @tab X
37744 Brooktree ProSumer Video : @tab X
37745 @tab fourcc: BT20
37746
37747 Brute Force & Ignorance : @tab X
37748 @tab Used in the game Flash Traffic: City of Angels.
37749
37750 C93 video : @tab X
37751 @tab Codec used in Cyberia game.
37752
37753 CamStudio : @tab X
37754 @tab fourcc: CSCD
37755
37756 CD+G : @tab X
37757 @tab Video codec for CD+G karaoke disks
37758
37759 CDXL : @tab X
37760 @tab Amiga CD video codec
37761
37762 Chinese AVS video : E @tab X
37763 @tab AVS1-P2, JiZhun profile, encoding through external library libxavs
37764
37765 Delphine Software International CIN video : @tab X
37766 @tab Codec used in Delphine Software International games.
37767
37768 Discworld II BMV Video : @tab X
37769 CineForm HD : X @tab X
37770 Canopus HQ : @tab X
37771 Canopus HQA : @tab X
37772 Canopus HQX : @tab X
37773 Canopus Lossless Codec : @tab X
37774 CDToons : @tab X
37775 @tab Codec used in various Broderbund games.
37776
37777 Cinepak : @tab X
37778 Cirrus Logic AccuPak : X @tab X
37779 @tab fourcc: CLJR
37780
37781 CPiA Video Format : @tab X
37782 Creative YUV (CYUV) : @tab X
37783 DFA : @tab X
37784 @tab Codec used in Chronomaster game.
37785
37786 Dirac : E @tab X
37787 @tab supported though the native vc2 (Dirac Pro) encoder
37788
37789 Deluxe Paint Animation : @tab X
37790 DNxHD : X @tab X
37791 @tab aka SMPTE VC3
37792
37793 Duck TrueMotion 1.0 : @tab X
37794 @tab fourcc: DUCK
37795
37796 Duck TrueMotion 2.0 : @tab X
37797 @tab fourcc: TM20
37798
37799 Duck TrueMotion 2.0 RT : @tab X
37800 @tab fourcc: TR20
37801
37802 DV (Digital Video) : X @tab X
37803 Dxtory capture format : @tab X
37804 Feeble Files/ScummVM DXA : @tab X
37805 @tab Codec originally used in Feeble Files game.
37806
37807 Electronic Arts CMV video : @tab X
37808 @tab Used in NHL 95 game.
37809
37810 Electronic Arts Madcow video : @tab X
37811 Electronic Arts TGV video : @tab X
37812 Electronic Arts TGQ video : @tab X
37813 Electronic Arts TQI video : @tab X
37814 Escape 124 : @tab X
37815 Escape 130 : @tab X
37816 FFmpeg video codec #1 : X @tab X
37817 @tab lossless codec (fourcc: FFV1)
37818
37819 Flash Screen Video v1 : X @tab X
37820 @tab fourcc: FSV1
37821
37822 Flash Screen Video v2 : X @tab X
37823 Flash Video (FLV) : X @tab X
37824 @tab Sorenson H.263 used in Flash
37825
37826 FM Screen Capture Codec : @tab X
37827 Forward Uncompressed : @tab X
37828 Fraps : @tab X
37829 Go2Meeting : @tab X
37830 @tab fourcc: G2M2, G2M3
37831
37832 Go2Webinar : @tab X
37833 @tab fourcc: G2M4
37834
37835 Gremlin Digital Video : @tab X
37836 H.261 : X @tab X
37837 H.263 / H.263-1996 : X @tab X
37838 H.263+ / H.263-1998 / H.263 version 2 : X @tab X
37839 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 : E @tab X
37840 @tab encoding supported through external library libx264 and OpenH264
37841
37842 HEVC : X @tab X
37843 @tab encoding supported through external library libx265 and libkvazaar
37844
37845 HNM version 4 : @tab X
37846 HuffYUV : X @tab X
37847 HuffYUV FFmpeg variant : X @tab X
37848 IBM Ultimotion : @tab X
37849 @tab fourcc: ULTI
37850
37851 id Cinematic video : @tab X
37852 @tab Used in Quake II.
37853
37854 id RoQ video : X @tab X
37855 @tab Used in Quake III, Jedi Knight 2, other computer games.
37856
37857 IFF ILBM : @tab X
37858 @tab IFF interleaved bitmap
37859
37860 IFF ByteRun1 : @tab X
37861 @tab IFF run length encoded bitmap
37862
37863 Infinity IMM4 : @tab X
37864 Intel H.263 : @tab X
37865 Intel Indeo 2 : @tab X
37866 Intel Indeo 3 : @tab X
37867 Intel Indeo 4 : @tab X
37868 Intel Indeo 5 : @tab X
37869 Interplay C93 : @tab X
37870 @tab Used in the game Cyberia from Interplay.
37871
37872 Interplay MVE video : @tab X
37873 @tab Used in Interplay .MVE files.
37874
37875 J2K : X @tab X
37876 Karl Morton's video codec : @tab X
37877 @tab Codec used in Worms games.
37878
37879 Kega Game Video (KGV1) : @tab X
37880 @tab Kega emulator screen capture codec.
37881
37882 Lagarith : @tab X
37883 LCL (LossLess Codec Library) MSZH : @tab X
37884 LCL (LossLess Codec Library) ZLIB : E @tab E
37885 LOCO : @tab X
37886 LucasArts SANM/Smush : @tab X
37887 @tab Used in LucasArts games / SMUSH animations.
37888
37889 lossless MJPEG : X @tab X
37890 MagicYUV Video : X @tab X
37891 Mandsoft Screen Capture Codec : @tab X
37892 Microsoft ATC Screen : @tab X
37893 @tab Also known as Microsoft Screen 3.
37894
37895 Microsoft Expression Encoder Screen : @tab X
37896 @tab Also known as Microsoft Titanium Screen 2.
37897
37898 Microsoft RLE : @tab X
37899 Microsoft Screen 1 : @tab X
37900 @tab Also known as Windows Media Video V7 Screen.
37901
37902 Microsoft Screen 2 : @tab X
37903 @tab Also known as Windows Media Video V9 Screen.
37904
37905 Microsoft Video 1 : @tab X
37906 Mimic : @tab X
37907 @tab Used in MSN Messenger Webcam streams.
37908
37909 Miro VideoXL : @tab X
37910 @tab fourcc: VIXL
37911
37912 MJPEG (Motion JPEG) : X @tab X
37913 Mobotix MxPEG video : @tab X
37914 Motion Pixels video : @tab X
37915 MPEG-1 video : X @tab X
37916 MPEG-2 video : X @tab X
37917 MPEG-4 part 2 : X @tab X
37918 @tab libxvidcore can be used alternatively for encoding.
37919
37920 MPEG-4 part 2 Microsoft variant version 1 : @tab X
37921 MPEG-4 part 2 Microsoft variant version 2 : X @tab X
37922 MPEG-4 part 2 Microsoft variant version 3 : X @tab X
37923 Newtek SpeedHQ : X @tab X
37924 Nintendo Gamecube THP video : @tab X
37925 NotchLC : @tab X
37926 NuppelVideo/RTjpeg : @tab X
37927 @tab Video encoding used in NuppelVideo files.
37928
37929 On2 VP3 : @tab X
37930 @tab still experimental
37931
37932 On2 VP4 : @tab X
37933 @tab fourcc: VP40
37934
37935 On2 VP5 : @tab X
37936 @tab fourcc: VP50
37937
37938 On2 VP6 : @tab X
37939 @tab fourcc: VP60,VP61,VP62
37940
37941 On2 VP7 : @tab X
37942 @tab fourcc: VP70,VP71
37943
37944 VP8 : E @tab X
37945 @tab fourcc: VP80, encoding supported through external library libvpx
37946
37947 VP9 : E @tab X
37948 @tab encoding supported through external library libvpx
37949
37950 Pinnacle TARGA CineWave YUV16 : @tab X
37951 @tab fourcc: Y216
37952
37953 Q-team QPEG : @tab X
37954 @tab fourccs: QPEG, Q1.0, Q1.1
37955
37956 QuickTime 8BPS video : @tab X
37957 QuickTime Animation (RLE) video : X @tab X
37958 @tab fourcc: 'rle '
37959
37960 QuickTime Graphics (SMC) : X @tab X
37961 @tab fourcc: 'smc '
37962
37963 QuickTime video (RPZA) : X @tab X
37964 @tab fourcc: rpza
37965
37966 R10K AJA Kona 10-bit RGB Codec : X @tab X
37967 R210 Quicktime Uncompressed RGB 10-bit : X @tab X
37968 Raw Video : X @tab X
37969 RealVideo 1.0 : X @tab X
37970 RealVideo 2.0 : X @tab X
37971 RealVideo 3.0 : @tab X
37972 @tab still far from ideal
37973
37974 RealVideo 4.0 : @tab X
37975 Renderware TXD (TeXture Dictionary) : @tab X
37976 @tab Texture dictionaries used by the Renderware Engine.
37977
37978 RL2 video : @tab X
37979 @tab used in some games by Entertainment Software Partners
37980
37981 ScreenPressor : @tab X
37982 Screenpresso : @tab X
37983 Screen Recorder Gold Codec : @tab X
37984 Sierra VMD video : @tab X
37985 @tab Used in Sierra VMD files.
37986
37987 Silicon Graphics Motion Video Compressor 1 (MVC1) : @tab X
37988 Silicon Graphics Motion Video Compressor 2 (MVC2) : @tab X
37989 Silicon Graphics RLE 8-bit video : @tab X
37990 Smacker video : @tab X
37991 @tab Video encoding used in Smacker.
37992
37993 SMPTE VC-1 : @tab X
37994 Snow : X @tab X
37995 @tab experimental wavelet codec (fourcc: SNOW)
37996
37997 Sony PlayStation MDEC (Motion DECoder) : @tab X
37998 Sorenson Vector Quantizer 1 : X @tab X
37999 @tab fourcc: SVQ1
38000
38001 Sorenson Vector Quantizer 3 : @tab X
38002 @tab fourcc: SVQ3
38003
38004 Sunplus JPEG (SP5X) : @tab X
38005 @tab fourcc: SP5X
38006
38007 TechSmith Screen Capture Codec : @tab X
38008 @tab fourcc: TSCC
38009
38010 TechSmith Screen Capture Codec 2 : @tab X
38011 @tab fourcc: TSC2
38012
38013 Theora : E @tab X
38014 @tab encoding supported through external library libtheora
38015
38016 Tiertex Limited SEQ video : @tab X
38017 @tab Codec used in DOS CD-ROM FlashBack game.
38018
38019 Ut Video : X @tab X
38020 v210 QuickTime uncompressed 4:2:2 10-bit : X @tab X
38021 v308 QuickTime uncompressed 4:4:4 : X @tab X
38022 v408 QuickTime uncompressed 4:4:4:4 : X @tab X
38023 v410 QuickTime uncompressed 4:4:4 10-bit : X @tab X
38024 VBLE Lossless Codec : @tab X
38025 VMware Screen Codec / VMware Video : @tab X
38026 @tab Codec used in videos captured by VMware.
38027
38028 Westwood Studios VQA (Vector Quantized Animation) video : @tab
38029 X
38030 Windows Media Image : @tab X
38031 Windows Media Video 7 : X @tab X
38032 Windows Media Video 8 : X @tab X
38033 Windows Media Video 9 : @tab X
38034 @tab not completely working
38035
38036 Wing Commander III / Xan : @tab X
38037 @tab Used in Wing Commander III .MVE files.
38038
38039 Wing Commander IV / Xan : @tab X
38040 @tab Used in Wing Commander IV.
38041
38042 Winnov WNV1 : @tab X
38043 WMV7 : X @tab X
38044 YAMAHA SMAF : X @tab X
38045 Psygnosis YOP Video : @tab X
38046 yuv4 : X @tab X
38047 @tab libquicktime uncompressed packed 4:2:0
38048
38049 ZeroCodec Lossless Video : @tab X
38050 ZLIB : X @tab X
38051 @tab part of LCL, encoder experimental
38052
38053 Zip Motion Blocks Video : X @tab X
38054 @tab Encoder works only in PAL8.
38055
38056 "X" means that the feature in that column (encoding / decoding) is
38057 supported.
38058
38059 "E" means that support is provided through an external library.
38060
38061 Audio Codecs
38062 Name : Encoding @tab Decoding @tab Comments
38063 8SVX exponential : @tab X
38064 8SVX fibonacci : @tab X
38065 AAC : EX @tab X
38066 @tab encoding supported through internal encoder and external library libfdk-aac
38067
38068 AAC+ : E @tab IX
38069 @tab encoding supported through external library libfdk-aac
38070
38071 AC-3 : IX @tab IX
38072 ACELP.KELVIN : @tab X
38073 ADPCM 4X Movie : @tab X
38074 ADPCM Yamaha AICA : @tab X
38075 ADPCM AmuseGraphics Movie : @tab X
38076 ADPCM Argonaut Games : X @tab X
38077 ADPCM CDROM XA : @tab X
38078 ADPCM Creative Technology : @tab X
38079 @tab 16 -E<gt> 4, 8 -E<gt> 4, 8 -E<gt> 3, 8 -E<gt> 2
38080
38081 ADPCM Electronic Arts : @tab X
38082 @tab Used in various EA titles.
38083
38084 ADPCM Electronic Arts Maxis CDROM XS : @tab X
38085 @tab Used in Sim City 3000.
38086
38087 ADPCM Electronic Arts R1 : @tab X
38088 ADPCM Electronic Arts R2 : @tab X
38089 ADPCM Electronic Arts R3 : @tab X
38090 ADPCM Electronic Arts XAS : @tab X
38091 ADPCM G.722 : X @tab X
38092 ADPCM G.726 : X @tab X
38093 ADPCM IMA Acorn Replay : @tab X
38094 ADPCM IMA AMV : X @tab X
38095 @tab Used in AMV files
38096
38097 ADPCM IMA Cunning Developments : @tab X
38098 ADPCM IMA Electronic Arts EACS : @tab X
38099 ADPCM IMA Electronic Arts SEAD : @tab X
38100 ADPCM IMA Funcom : @tab X
38101 ADPCM IMA High Voltage Software ALP : X @tab X
38102 ADPCM IMA Mobiclip MOFLEX : @tab X
38103 ADPCM IMA QuickTime : X @tab X
38104 ADPCM IMA Simon & Schuster Interactive : X @tab X
38105 ADPCM IMA Ubisoft APM : X @tab X
38106 ADPCM IMA Loki SDL MJPEG : @tab X
38107 ADPCM IMA WAV : X @tab X
38108 ADPCM IMA Westwood : @tab X
38109 ADPCM ISS IMA : @tab X
38110 @tab Used in FunCom games.
38111
38112 ADPCM IMA Dialogic : @tab X
38113 ADPCM IMA Duck DK3 : @tab X
38114 @tab Used in some Sega Saturn console games.
38115
38116 ADPCM IMA Duck DK4 : @tab X
38117 @tab Used in some Sega Saturn console games.
38118
38119 ADPCM IMA Radical : @tab X
38120 ADPCM Microsoft : X @tab X
38121 ADPCM MS IMA : X @tab X
38122 ADPCM Nintendo Gamecube AFC : @tab X
38123 ADPCM Nintendo Gamecube DTK : @tab X
38124 ADPCM Nintendo THP : @tab X
38125 ADPCM Playstation : @tab X
38126 ADPCM QT IMA : X @tab X
38127 ADPCM SEGA CRI ADX : X @tab X
38128 @tab Used in Sega Dreamcast games.
38129
38130 ADPCM Shockwave Flash : X @tab X
38131 ADPCM Sound Blaster Pro 2-bit : @tab X
38132 ADPCM Sound Blaster Pro 2.6-bit : @tab X
38133 ADPCM Sound Blaster Pro 4-bit : @tab X
38134 ADPCM VIMA : @tab X
38135 @tab Used in LucasArts SMUSH animations.
38136
38137 ADPCM Konami XMD : @tab X
38138 ADPCM Westwood Studios IMA : X @tab X
38139 @tab Used in Westwood Studios games like Command and Conquer.
38140
38141 ADPCM Yamaha : X @tab X
38142 ADPCM Zork : @tab X
38143 AMR-NB : E @tab X
38144 @tab encoding supported through external library libopencore-amrnb
38145
38146 AMR-WB : E @tab X
38147 @tab encoding supported through external library libvo-amrwbenc
38148
38149 Amazing Studio PAF Audio : @tab X
38150 Apple lossless audio : X @tab X
38151 @tab QuickTime fourcc 'alac'
38152
38153 aptX : X @tab X
38154 @tab Used in Bluetooth A2DP
38155
38156 aptX HD : X @tab X
38157 @tab Used in Bluetooth A2DP
38158
38159 ATRAC1 : @tab X
38160 ATRAC3 : @tab X
38161 ATRAC3+ : @tab X
38162 ATRAC9 : @tab X
38163 Bink Audio : @tab X
38164 @tab Used in Bink and Smacker files in many games.
38165
38166 Bonk audio : @tab X
38167 CELT : @tab E
38168 @tab decoding supported through external library libcelt
38169
38170 codec2 : E @tab E
38171 @tab en/decoding supported through external library libcodec2
38172
38173 CRI HCA : @tab X
38174 Delphine Software International CIN audio : @tab X
38175 @tab Codec used in Delphine Software International games.
38176
38177 DFPWM : X @tab X
38178 Digital Speech Standard - Standard Play mode (DSS SP) : @tab X
38179 Discworld II BMV Audio : @tab X
38180 COOK : @tab X
38181 @tab All versions except 5.1 are supported.
38182
38183 DCA (DTS Coherent Acoustics) : X @tab X
38184 @tab supported extensions: XCh, XXCH, X96, XBR, XLL, LBR (partially)
38185
38186 Dolby E : @tab X
38187 DPCM Cuberoot-Delta-Exact : @tab X
38188 @tab Used in few games.
38189
38190 DPCM Gremlin : @tab X
38191 DPCM id RoQ : X @tab X
38192 @tab Used in Quake III, Jedi Knight 2 and other computer games.
38193
38194 DPCM Marble WADY : @tab X
38195 DPCM Interplay : @tab X
38196 @tab Used in various Interplay computer games.
38197
38198 DPCM Squareroot-Delta-Exact : @tab X
38199 @tab Used in various games.
38200
38201 DPCM Sierra Online : @tab X
38202 @tab Used in Sierra Online game audio files.
38203
38204 DPCM Sol : @tab X
38205 DPCM Xan : @tab X
38206 @tab Used in Origin's Wing Commander IV AVI files.
38207
38208 DPCM Xilam DERF : @tab X
38209 DSD (Direct Stream Digital), least significant bit first : @tab X
38210 DSD (Direct Stream Digital), most significant bit first : @tab X
38211 DSD (Direct Stream Digital), least significant bit first, planar :
38212 @tab X
38213 DSD (Direct Stream Digital), most significant bit first, planar :
38214 @tab X
38215 DSP Group TrueSpeech : @tab X
38216 DST (Direct Stream Transfer) : @tab X
38217 DV audio : @tab X
38218 Enhanced AC-3 : X @tab X
38219 EVRC (Enhanced Variable Rate Codec) : @tab X
38220 FLAC (Free Lossless Audio Codec) : X @tab IX
38221 FTR Voice : @tab X
38222 G.723.1 : X @tab X
38223 G.729 : @tab X
38224 GSM : E @tab X
38225 @tab encoding supported through external library libgsm
38226
38227 GSM Microsoft variant : E @tab X
38228 @tab encoding supported through external library libgsm
38229
38230 IAC (Indeo Audio Coder) : @tab X
38231 iLBC (Internet Low Bitrate Codec) : E @tab EX
38232 @tab encoding and decoding supported through external library libilbc
38233
38234 IMC (Intel Music Coder) : @tab X
38235 Interplay ACM : @tab X
38236 MACE (Macintosh Audio Compression/Expansion) 3:1 : @tab X
38237 MACE (Macintosh Audio Compression/Expansion) 6:1 : @tab X
38238 Marian's A-pac audio : @tab X
38239 MI-SC4 (Micronas SC-4 Audio) : @tab X
38240 MLP (Meridian Lossless Packing) : X @tab X
38241 @tab Used in DVD-Audio discs.
38242
38243 Monkey's Audio : @tab X
38244 MP1 (MPEG audio layer 1) : @tab IX
38245 MP2 (MPEG audio layer 2) : IX @tab IX
38246 @tab encoding supported also through external library TwoLAME
38247
38248 MP3 (MPEG audio layer 3) : E @tab IX
38249 @tab encoding supported through external library LAME, ADU MP3 and MP3onMP4 also supported
38250
38251 MPEG-4 Audio Lossless Coding (ALS) : @tab X
38252 MobiClip FastAudio : @tab X
38253 Musepack SV7 : @tab X
38254 Musepack SV8 : @tab X
38255 Nellymoser Asao : X @tab X
38256 On2 AVC (Audio for Video Codec) : @tab X
38257 Opus : E @tab X
38258 @tab encoding supported through external library libopus
38259
38260 PCM A-law : X @tab X
38261 PCM mu-law : X @tab X
38262 PCM Archimedes VIDC : X @tab X
38263 PCM signed 8-bit planar : X @tab X
38264 PCM signed 16-bit big-endian planar : X @tab X
38265 PCM signed 16-bit little-endian planar : X @tab X
38266 PCM signed 24-bit little-endian planar : X @tab X
38267 PCM signed 32-bit little-endian planar : X @tab X
38268 PCM 32-bit floating point big-endian : X @tab X
38269 PCM 32-bit floating point little-endian : X @tab X
38270 PCM 64-bit floating point big-endian : X @tab X
38271 PCM 64-bit floating point little-endian : X @tab X
38272 PCM D-Cinema audio signed 24-bit : X @tab X
38273 PCM signed 8-bit : X @tab X
38274 PCM signed 16-bit big-endian : X @tab X
38275 PCM signed 16-bit little-endian : X @tab X
38276 PCM signed 24-bit big-endian : X @tab X
38277 PCM signed 24-bit little-endian : X @tab X
38278 PCM signed 32-bit big-endian : X @tab X
38279 PCM signed 32-bit little-endian : X @tab X
38280 PCM signed 16/20/24-bit big-endian in MPEG-TS : @tab X
38281 PCM unsigned 8-bit : X @tab X
38282 PCM unsigned 16-bit big-endian : X @tab X
38283 PCM unsigned 16-bit little-endian : X @tab X
38284 PCM unsigned 24-bit big-endian : X @tab X
38285 PCM unsigned 24-bit little-endian : X @tab X
38286 PCM unsigned 32-bit big-endian : X @tab X
38287 PCM unsigned 32-bit little-endian : X @tab X
38288 PCM SGA : @tab X
38289 QCELP / PureVoice : @tab X
38290 QDesign Music Codec 1 : @tab X
38291 QDesign Music Codec 2 : @tab X
38292 @tab There are still some distortions.
38293
38294 RealAudio 1.0 (14.4K) : X @tab X
38295 @tab Real 14400 bit/s codec
38296
38297 RealAudio 2.0 (28.8K) : @tab X
38298 @tab Real 28800 bit/s codec
38299
38300 RealAudio 3.0 (dnet) : IX @tab X
38301 @tab Real low bitrate AC-3 codec
38302
38303 RealAudio Lossless : @tab X
38304 RealAudio SIPR / ACELP.NET : @tab X
38305 RK Audio (RKA) : @tab X
38306 SBC (low-complexity subband codec) : X @tab X
38307 @tab Used in Bluetooth A2DP
38308
38309 Shorten : @tab X
38310 Sierra VMD audio : @tab X
38311 @tab Used in Sierra VMD files.
38312
38313 Smacker audio : @tab X
38314 SMPTE 302M AES3 audio : X @tab X
38315 Sonic : X @tab X
38316 @tab experimental codec
38317
38318 Sonic lossless : X @tab X
38319 @tab experimental codec
38320
38321 Speex : E @tab EX
38322 @tab supported through external library libspeex
38323
38324 TAK (Tom's lossless Audio Kompressor) : @tab X
38325 True Audio (TTA) : X @tab X
38326 TrueHD : X @tab X
38327 @tab Used in HD-DVD and Blu-Ray discs.
38328
38329 TwinVQ (VQF flavor) : @tab X
38330 VIMA : @tab X
38331 @tab Used in LucasArts SMUSH animations.
38332
38333 ViewQuest VQC : @tab X
38334 Vorbis : E @tab X
38335 @tab A native but very primitive encoder exists.
38336
38337 Voxware MetaSound : @tab X
38338 Waveform Archiver : @tab X
38339 WavPack : X @tab X
38340 Westwood Audio (SND1) : @tab X
38341 Windows Media Audio 1 : X @tab X
38342 Windows Media Audio 2 : X @tab X
38343 Windows Media Audio Lossless : @tab X
38344 Windows Media Audio Pro : @tab X
38345 Windows Media Audio Voice : @tab X
38346 Xbox Media Audio 1 : @tab X
38347 Xbox Media Audio 2 : @tab X
38348
38349 "X" means that the feature in that column (encoding / decoding) is
38350 supported.
38351
38352 "E" means that support is provided through an external library.
38353
38354 "I" means that an integer-only version is available, too (ensures high
38355 performance on systems without hardware floating point support).
38356
38357 Subtitle Formats
38358 Name : Muxing @tab Demuxing @tab Encoding @tab Decoding
38359 3GPP Timed Text : @tab @tab X @tab X
38360 AQTitle : @tab X @tab @tab X
38361 DVB : X @tab X @tab X @tab X
38362 DVB teletext : @tab X @tab @tab E
38363 DVD : X @tab X @tab X @tab X
38364 JACOsub : X @tab X @tab @tab X
38365 MicroDVD : X @tab X @tab @tab X
38366 MPL2 : @tab X @tab @tab X
38367 MPsub (MPlayer) : @tab X @tab @tab X
38368 PGS : @tab @tab @tab X
38369 PJS (Phoenix) : @tab X @tab @tab X
38370 RealText : @tab X @tab @tab X
38371 SAMI : @tab X @tab @tab X
38372 Spruce format (STL) : @tab X @tab @tab X
38373 SSA/ASS : X @tab X @tab X @tab X
38374 SubRip (SRT) : X @tab X @tab X @tab X
38375 SubViewer v1 : @tab X @tab @tab X
38376 SubViewer : @tab X @tab @tab X
38377 TED Talks captions : @tab X @tab @tab X
38378 TTML : X @tab @tab X @tab
38379 VobSub (IDX+SUB) : @tab X @tab @tab X
38380 VPlayer : @tab X @tab @tab X
38381 WebVTT : X @tab X @tab X @tab X
38382 XSUB : @tab @tab X @tab X
38383
38384 "X" means that the feature is supported.
38385
38386 "E" means that support is provided through an external library.
38387
38388 Network Protocols
38389 Name : Support
38390 AMQP : E
38391 file : X
38392 FTP : X
38393 Gopher : X
38394 Gophers : X
38395 HLS : X
38396 HTTP : X
38397 HTTPS : X
38398 Icecast : X
38399 MMSH : X
38400 MMST : X
38401 pipe : X
38402 Pro-MPEG FEC : X
38403 RTMP : X
38404 RTMPE : X
38405 RTMPS : X
38406 RTMPT : X
38407 RTMPTE : X
38408 RTMPTS : X
38409 RTP : X
38410 SAMBA : E
38411 SCTP : X
38412 SFTP : E
38413 TCP : X
38414 TLS : X
38415 UDP : X
38416 ZMQ : E
38417
38418 "X" means that the protocol is supported.
38419
38420 "E" means that support is provided through an external library.
38421
38422 Input/Output Devices
38423 Name : Input @tab Output
38424 ALSA : X @tab X
38425 BKTR : X @tab
38426 caca : @tab X
38427 DV1394 : X @tab
38428 Lavfi virtual device : X @tab
38429 Linux framebuffer : X @tab X
38430 JACK : X @tab
38431 LIBCDIO : X
38432 LIBDC1394 : X @tab
38433 OpenAL : X
38434 OpenGL : @tab X
38435 OSS : X @tab X
38436 PulseAudio : X @tab X
38437 SDL : @tab X
38438 Video4Linux2 : X @tab X
38439 VfW capture : X @tab
38440 X11 grabbing : X @tab
38441 Win32 grabbing : X @tab
38442
38443 "X" means that input/output is supported.
38444
38445 Timecode
38446 Codec/format : Read @tab Write
38447 AVI : X @tab X
38448 DV : X @tab X
38449 GXF : X @tab X
38450 MOV : X @tab X
38451 MPEG1/2 : X @tab X
38452 MXF : X @tab X
38453
38455 ffplay(1), ffmpeg(1), ffprobe(1), ffmpeg-utils(1), ffmpeg-scaler(1),
38456 ffmpeg-resampler(1), ffmpeg-codecs(1), ffmpeg-bitstream-filters(1),
38457 ffmpeg-formats(1), ffmpeg-devices(1), ffmpeg-protocols(1),
38458 ffmpeg-filters(1)
38459
38461 The FFmpeg developers.
38462
38463 For details about the authorship, see the Git history of the project
38464 (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
38465 the FFmpeg source directory, or browsing the online repository at
38466 <https://git.ffmpeg.org/ffmpeg>.
38467
38468 Maintainers for the specific components are listed in the file
38469 MAINTAINERS in the source code tree.
38470
38471
38472
38473 FFPLAY-ALL(1)