1FFMPEG-ALL(1) FFMPEG-ALL(1)
2
3
4
6 ffmpeg - ffmpeg video converter
7
9 ffmpeg [global_options] {[input_file_options] -i input_url} ...
10 {[output_file_options] output_url} ...
11
13 ffmpeg is a very fast video and audio converter that can also grab from
14 a live audio/video source. It can also convert between arbitrary sample
15 rates and resize video on the fly with a high quality polyphase filter.
16
17 ffmpeg reads from an arbitrary number of input "files" (which can be
18 regular files, pipes, network streams, grabbing devices, etc.),
19 specified by the "-i" option, and writes to an arbitrary number of
20 output "files", which are specified by a plain output url. Anything
21 found on the command line which cannot be interpreted as an option is
22 considered to be an output url.
23
24 Each input or output url can, in principle, contain any number of
25 streams of different types (video/audio/subtitle/attachment/data). The
26 allowed number and/or types of streams may be limited by the container
27 format. Selecting which streams from which inputs will go into which
28 output is either done automatically or with the "-map" option (see the
29 Stream selection chapter).
30
31 To refer to input files in options, you must use their indices
32 (0-based). E.g. the first input file is 0, the second is 1, etc.
33 Similarly, streams within a file are referred to by their indices. E.g.
34 "2:3" refers to the fourth stream in the third input file. Also see the
35 Stream specifiers chapter.
36
37 As a general rule, options are applied to the next specified file.
38 Therefore, order is important, and you can have the same option on the
39 command line multiple times. Each occurrence is then applied to the
40 next input or output file. Exceptions from this rule are the global
41 options (e.g. verbosity level), which should be specified first.
42
43 Do not mix input and output files -- first specify all input files,
44 then all output files. Also do not mix options which belong to
45 different files. All options apply ONLY to the next input or output
46 file and are reset between files.
47
48 • To set the video bitrate of the output file to 64 kbit/s:
49
50 ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi
51
52 • To force the frame rate of the output file to 24 fps:
53
54 ffmpeg -i input.avi -r 24 output.avi
55
56 • To force the frame rate of the input file (valid for raw formats
57 only) to 1 fps and the frame rate of the output file to 24 fps:
58
59 ffmpeg -r 1 -i input.m2v -r 24 output.avi
60
61 The format option may be needed for raw input files.
62
64 The transcoding process in ffmpeg for each output can be described by
65 the following diagram:
66
67 _______ ______________
68 | | | |
69 | input | demuxer | encoded data | decoder
70 | file | ---------> | packets | -----+
71 |_______| |______________| |
72 v
73 _________
74 | |
75 | decoded |
76 | frames |
77 |_________|
78 ________ ______________ |
79 | | | | |
80 | output | <-------- | encoded data | <----+
81 | file | muxer | packets | encoder
82 |________| |______________|
83
84 ffmpeg calls the libavformat library (containing demuxers) to read
85 input files and get packets containing encoded data from them. When
86 there are multiple input files, ffmpeg tries to keep them synchronized
87 by tracking lowest timestamp on any active input stream.
88
89 Encoded packets are then passed to the decoder (unless streamcopy is
90 selected for the stream, see further for a description). The decoder
91 produces uncompressed frames (raw video/PCM audio/...) which can be
92 processed further by filtering (see next section). After filtering, the
93 frames are passed to the encoder, which encodes them and outputs
94 encoded packets. Finally those are passed to the muxer, which writes
95 the encoded packets to the output file.
96
97 Filtering
98 Before encoding, ffmpeg can process raw audio and video frames using
99 filters from the libavfilter library. Several chained filters form a
100 filter graph. ffmpeg distinguishes between two types of filtergraphs:
101 simple and complex.
102
103 Simple filtergraphs
104
105 Simple filtergraphs are those that have exactly one input and output,
106 both of the same type. In the above diagram they can be represented by
107 simply inserting an additional step between decoding and encoding:
108
109 _________ ______________
110 | | | |
111 | decoded | | encoded data |
112 | frames |\ _ | packets |
113 |_________| \ /||______________|
114 \ __________ /
115 simple _\|| | / encoder
116 filtergraph | filtered |/
117 | frames |
118 |__________|
119
120 Simple filtergraphs are configured with the per-stream -filter option
121 (with -vf and -af aliases for video and audio respectively). A simple
122 filtergraph for video can look for example like this:
123
124 _______ _____________ _______ ________
125 | | | | | | | |
126 | input | ---> | deinterlace | ---> | scale | ---> | output |
127 |_______| |_____________| |_______| |________|
128
129 Note that some filters change frame properties but not frame contents.
130 E.g. the "fps" filter in the example above changes number of frames,
131 but does not touch the frame contents. Another example is the "setpts"
132 filter, which only sets timestamps and otherwise passes the frames
133 unchanged.
134
135 Complex filtergraphs
136
137 Complex filtergraphs are those which cannot be described as simply a
138 linear processing chain applied to one stream. This is the case, for
139 example, when the graph has more than one input and/or output, or when
140 output stream type is different from input. They can be represented
141 with the following diagram:
142
143 _________
144 | |
145 | input 0 |\ __________
146 |_________| \ | |
147 \ _________ /| output 0 |
148 \ | | / |__________|
149 _________ \| complex | /
150 | | | |/
151 | input 1 |---->| filter |\
152 |_________| | | \ __________
153 /| graph | \ | |
154 / | | \| output 1 |
155 _________ / |_________| |__________|
156 | | /
157 | input 2 |/
158 |_________|
159
160 Complex filtergraphs are configured with the -filter_complex option.
161 Note that this option is global, since a complex filtergraph, by its
162 nature, cannot be unambiguously associated with a single stream or
163 file.
164
165 The -lavfi option is equivalent to -filter_complex.
166
167 A trivial example of a complex filtergraph is the "overlay" filter,
168 which has two video inputs and one video output, containing one video
169 overlaid on top of the other. Its audio counterpart is the "amix"
170 filter.
171
172 Stream copy
173 Stream copy is a mode selected by supplying the "copy" parameter to the
174 -codec option. It makes ffmpeg omit the decoding and encoding step for
175 the specified stream, so it does only demuxing and muxing. It is useful
176 for changing the container format or modifying container-level
177 metadata. The diagram above will, in this case, simplify to this:
178
179 _______ ______________ ________
180 | | | | | |
181 | input | demuxer | encoded data | muxer | output |
182 | file | ---------> | packets | -------> | file |
183 |_______| |______________| |________|
184
185 Since there is no decoding or encoding, it is very fast and there is no
186 quality loss. However, it might not work in some cases because of many
187 factors. Applying filters is obviously also impossible, since filters
188 work on uncompressed data.
189
191 ffmpeg provides the "-map" option for manual control of stream
192 selection in each output file. Users can skip "-map" and let ffmpeg
193 perform automatic stream selection as described below. The "-vn / -an /
194 -sn / -dn" options can be used to skip inclusion of video, audio,
195 subtitle and data streams respectively, whether manually mapped or
196 automatically selected, except for those streams which are outputs of
197 complex filtergraphs.
198
199 Description
200 The sub-sections that follow describe the various rules that are
201 involved in stream selection. The examples that follow next show how
202 these rules are applied in practice.
203
204 While every effort is made to accurately reflect the behavior of the
205 program, FFmpeg is under continuous development and the code may have
206 changed since the time of this writing.
207
208 Automatic stream selection
209
210 In the absence of any map options for a particular output file, ffmpeg
211 inspects the output format to check which type of streams can be
212 included in it, viz. video, audio and/or subtitles. For each acceptable
213 stream type, ffmpeg will pick one stream, when available, from among
214 all the inputs.
215
216 It will select that stream based upon the following criteria:
217
218 • for video, it is the stream with the highest resolution,
219
220 • for audio, it is the stream with the most channels,
221
222 • for subtitles, it is the first subtitle stream found but there's a
223 caveat. The output format's default subtitle encoder can be either
224 text-based or image-based, and only a subtitle stream of the same
225 type will be chosen.
226
227 In the case where several streams of the same type rate equally, the
228 stream with the lowest index is chosen.
229
230 Data or attachment streams are not automatically selected and can only
231 be included using "-map".
232
233 Manual stream selection
234
235 When "-map" is used, only user-mapped streams are included in that
236 output file, with one possible exception for filtergraph outputs
237 described below.
238
239 Complex filtergraphs
240
241 If there are any complex filtergraph output streams with unlabeled
242 pads, they will be added to the first output file. This will lead to a
243 fatal error if the stream type is not supported by the output format.
244 In the absence of the map option, the inclusion of these streams leads
245 to the automatic stream selection of their types being skipped. If map
246 options are present, these filtergraph streams are included in addition
247 to the mapped streams.
248
249 Complex filtergraph output streams with labeled pads must be mapped
250 once and exactly once.
251
252 Stream handling
253
254 Stream handling is independent of stream selection, with an exception
255 for subtitles described below. Stream handling is set via the "-codec"
256 option addressed to streams within a specific output file. In
257 particular, codec options are applied by ffmpeg after the stream
258 selection process and thus do not influence the latter. If no "-codec"
259 option is specified for a stream type, ffmpeg will select the default
260 encoder registered by the output file muxer.
261
262 An exception exists for subtitles. If a subtitle encoder is specified
263 for an output file, the first subtitle stream found of any type, text
264 or image, will be included. ffmpeg does not validate if the specified
265 encoder can convert the selected stream or if the converted stream is
266 acceptable within the output format. This applies generally as well:
267 when the user sets an encoder manually, the stream selection process
268 cannot check if the encoded stream can be muxed into the output file.
269 If it cannot, ffmpeg will abort and all output files will fail to be
270 processed.
271
272 Examples
273 The following examples illustrate the behavior, quirks and limitations
274 of ffmpeg's stream selection methods.
275
276 They assume the following three input files.
277
278 input file 'A.avi'
279 stream 0: video 640x360
280 stream 1: audio 2 channels
281
282 input file 'B.mp4'
283 stream 0: video 1920x1080
284 stream 1: audio 2 channels
285 stream 2: subtitles (text)
286 stream 3: audio 5.1 channels
287 stream 4: subtitles (text)
288
289 input file 'C.mkv'
290 stream 0: video 1280x720
291 stream 1: audio 2 channels
292 stream 2: subtitles (image)
293
294 Example: automatic stream selection
295
296 ffmpeg -i A.avi -i B.mp4 out1.mkv out2.wav -map 1:a -c:a copy out3.mov
297
298 There are three output files specified, and for the first two, no
299 "-map" options are set, so ffmpeg will select streams for these two
300 files automatically.
301
302 out1.mkv is a Matroska container file and accepts video, audio and
303 subtitle streams, so ffmpeg will try to select one of each type.For
304 video, it will select "stream 0" from B.mp4, which has the highest
305 resolution among all the input video streams.For audio, it will select
306 "stream 3" from B.mp4, since it has the greatest number of channels.For
307 subtitles, it will select "stream 2" from B.mp4, which is the first
308 subtitle stream from among A.avi and B.mp4.
309
310 out2.wav accepts only audio streams, so only "stream 3" from B.mp4 is
311 selected.
312
313 For out3.mov, since a "-map" option is set, no automatic stream
314 selection will occur. The "-map 1:a" option will select all audio
315 streams from the second input B.mp4. No other streams will be included
316 in this output file.
317
318 For the first two outputs, all included streams will be transcoded. The
319 encoders chosen will be the default ones registered by each output
320 format, which may not match the codec of the selected input streams.
321
322 For the third output, codec option for audio streams has been set to
323 "copy", so no decoding-filtering-encoding operations will occur, or can
324 occur. Packets of selected streams shall be conveyed from the input
325 file and muxed within the output file.
326
327 Example: automatic subtitles selection
328
329 ffmpeg -i C.mkv out1.mkv -c:s dvdsub -an out2.mkv
330
331 Although out1.mkv is a Matroska container file which accepts subtitle
332 streams, only a video and audio stream shall be selected. The subtitle
333 stream of C.mkv is image-based and the default subtitle encoder of the
334 Matroska muxer is text-based, so a transcode operation for the
335 subtitles is expected to fail and hence the stream isn't selected.
336 However, in out2.mkv, a subtitle encoder is specified in the command
337 and so, the subtitle stream is selected, in addition to the video
338 stream. The presence of "-an" disables audio stream selection for
339 out2.mkv.
340
341 Example: unlabeled filtergraph outputs
342
343 ffmpeg -i A.avi -i C.mkv -i B.mp4 -filter_complex "overlay" out1.mp4 out2.srt
344
345 A filtergraph is setup here using the "-filter_complex" option and
346 consists of a single video filter. The "overlay" filter requires
347 exactly two video inputs, but none are specified, so the first two
348 available video streams are used, those of A.avi and C.mkv. The output
349 pad of the filter has no label and so is sent to the first output file
350 out1.mp4. Due to this, automatic selection of the video stream is
351 skipped, which would have selected the stream in B.mp4. The audio
352 stream with most channels viz. "stream 3" in B.mp4, is chosen
353 automatically. No subtitle stream is chosen however, since the MP4
354 format has no default subtitle encoder registered, and the user hasn't
355 specified a subtitle encoder.
356
357 The 2nd output file, out2.srt, only accepts text-based subtitle
358 streams. So, even though the first subtitle stream available belongs to
359 C.mkv, it is image-based and hence skipped. The selected stream,
360 "stream 2" in B.mp4, is the first text-based subtitle stream.
361
362 Example: labeled filtergraph outputs
363
364 ffmpeg -i A.avi -i B.mp4 -i C.mkv -filter_complex "[1:v]hue=s=0[outv];overlay;aresample" \
365 -map '[outv]' -an out1.mp4 \
366 out2.mkv \
367 -map '[outv]' -map 1:a:0 out3.mkv
368
369 The above command will fail, as the output pad labelled "[outv]" has
370 been mapped twice. None of the output files shall be processed.
371
372 ffmpeg -i A.avi -i B.mp4 -i C.mkv -filter_complex "[1:v]hue=s=0[outv];overlay;aresample" \
373 -an out1.mp4 \
374 out2.mkv \
375 -map 1:a:0 out3.mkv
376
377 This command above will also fail as the hue filter output has a label,
378 "[outv]", and hasn't been mapped anywhere.
379
380 The command should be modified as follows,
381
382 ffmpeg -i A.avi -i B.mp4 -i C.mkv -filter_complex "[1:v]hue=s=0,split=2[outv1][outv2];overlay;aresample" \
383 -map '[outv1]' -an out1.mp4 \
384 out2.mkv \
385 -map '[outv2]' -map 1:a:0 out3.mkv
386
387 The video stream from B.mp4 is sent to the hue filter, whose output is
388 cloned once using the split filter, and both outputs labelled. Then a
389 copy each is mapped to the first and third output files.
390
391 The overlay filter, requiring two video inputs, uses the first two
392 unused video streams. Those are the streams from A.avi and C.mkv. The
393 overlay output isn't labelled, so it is sent to the first output file
394 out1.mp4, regardless of the presence of the "-map" option.
395
396 The aresample filter is sent the first unused audio stream, that of
397 A.avi. Since this filter output is also unlabelled, it too is mapped to
398 the first output file. The presence of "-an" only suppresses automatic
399 or manual stream selection of audio streams, not outputs sent from
400 filtergraphs. Both these mapped streams shall be ordered before the
401 mapped stream in out1.mp4.
402
403 The video, audio and subtitle streams mapped to "out2.mkv" are entirely
404 determined by automatic stream selection.
405
406 out3.mkv consists of the cloned video output from the hue filter and
407 the first audio stream from B.mp4.
408
410 All the numerical options, if not specified otherwise, accept a string
411 representing a number as input, which may be followed by one of the SI
412 unit prefixes, for example: 'K', 'M', or 'G'.
413
414 If 'i' is appended to the SI unit prefix, the complete prefix will be
415 interpreted as a unit prefix for binary multiples, which are based on
416 powers of 1024 instead of powers of 1000. Appending 'B' to the SI unit
417 prefix multiplies the value by 8. This allows using, for example: 'KB',
418 'MiB', 'G' and 'B' as number suffixes.
419
420 Options which do not take arguments are boolean options, and set the
421 corresponding value to true. They can be set to false by prefixing the
422 option name with "no". For example using "-nofoo" will set the boolean
423 option with name "foo" to false.
424
425 Stream specifiers
426 Some options are applied per-stream, e.g. bitrate or codec. Stream
427 specifiers are used to precisely specify which stream(s) a given option
428 belongs to.
429
430 A stream specifier is a string generally appended to the option name
431 and separated from it by a colon. E.g. "-codec:a:1 ac3" contains the
432 "a:1" stream specifier, which matches the second audio stream.
433 Therefore, it would select the ac3 codec for the second audio stream.
434
435 A stream specifier can match several streams, so that the option is
436 applied to all of them. E.g. the stream specifier in "-b:a 128k"
437 matches all audio streams.
438
439 An empty stream specifier matches all streams. For example, "-codec
440 copy" or "-codec: copy" would copy all the streams without reencoding.
441
442 Possible forms of stream specifiers are:
443
444 stream_index
445 Matches the stream with this index. E.g. "-threads:1 4" would set
446 the thread count for the second stream to 4. If stream_index is
447 used as an additional stream specifier (see below), then it selects
448 stream number stream_index from the matching streams. Stream
449 numbering is based on the order of the streams as detected by
450 libavformat except when a program ID is also specified. In this
451 case it is based on the ordering of the streams in the program.
452
453 stream_type[:additional_stream_specifier]
454 stream_type is one of following: 'v' or 'V' for video, 'a' for
455 audio, 's' for subtitle, 'd' for data, and 't' for attachments. 'v'
456 matches all video streams, 'V' only matches video streams which are
457 not attached pictures, video thumbnails or cover arts. If
458 additional_stream_specifier is used, then it matches streams which
459 both have this type and match the additional_stream_specifier.
460 Otherwise, it matches all streams of the specified type.
461
462 p:program_id[:additional_stream_specifier]
463 Matches streams which are in the program with the id program_id. If
464 additional_stream_specifier is used, then it matches streams which
465 both are part of the program and match the
466 additional_stream_specifier.
467
468 #stream_id or i:stream_id
469 Match the stream by stream id (e.g. PID in MPEG-TS container).
470
471 m:key[:value]
472 Matches streams with the metadata tag key having the specified
473 value. If value is not given, matches streams that contain the
474 given tag with any value.
475
476 u Matches streams with usable configuration, the codec must be
477 defined and the essential information such as video dimension or
478 audio sample rate must be present.
479
480 Note that in ffmpeg, matching by metadata will only work properly
481 for input files.
482
483 Generic options
484 These options are shared amongst the ff* tools.
485
486 -L Show license.
487
488 -h, -?, -help, --help [arg]
489 Show help. An optional parameter may be specified to print help
490 about a specific item. If no argument is specified, only basic (non
491 advanced) tool options are shown.
492
493 Possible values of arg are:
494
495 long
496 Print advanced tool options in addition to the basic tool
497 options.
498
499 full
500 Print complete list of options, including shared and private
501 options for encoders, decoders, demuxers, muxers, filters, etc.
502
503 decoder=decoder_name
504 Print detailed information about the decoder named
505 decoder_name. Use the -decoders option to get a list of all
506 decoders.
507
508 encoder=encoder_name
509 Print detailed information about the encoder named
510 encoder_name. Use the -encoders option to get a list of all
511 encoders.
512
513 demuxer=demuxer_name
514 Print detailed information about the demuxer named
515 demuxer_name. Use the -formats option to get a list of all
516 demuxers and muxers.
517
518 muxer=muxer_name
519 Print detailed information about the muxer named muxer_name.
520 Use the -formats option to get a list of all muxers and
521 demuxers.
522
523 filter=filter_name
524 Print detailed information about the filter named filter_name.
525 Use the -filters option to get a list of all filters.
526
527 bsf=bitstream_filter_name
528 Print detailed information about the bitstream filter named
529 bitstream_filter_name. Use the -bsfs option to get a list of
530 all bitstream filters.
531
532 protocol=protocol_name
533 Print detailed information about the protocol named
534 protocol_name. Use the -protocols option to get a list of all
535 protocols.
536
537 -version
538 Show version.
539
540 -buildconf
541 Show the build configuration, one option per line.
542
543 -formats
544 Show available formats (including devices).
545
546 -demuxers
547 Show available demuxers.
548
549 -muxers
550 Show available muxers.
551
552 -devices
553 Show available devices.
554
555 -codecs
556 Show all codecs known to libavcodec.
557
558 Note that the term 'codec' is used throughout this documentation as
559 a shortcut for what is more correctly called a media bitstream
560 format.
561
562 -decoders
563 Show available decoders.
564
565 -encoders
566 Show all available encoders.
567
568 -bsfs
569 Show available bitstream filters.
570
571 -protocols
572 Show available protocols.
573
574 -filters
575 Show available libavfilter filters.
576
577 -pix_fmts
578 Show available pixel formats.
579
580 -sample_fmts
581 Show available sample formats.
582
583 -layouts
584 Show channel names and standard channel layouts.
585
586 -dispositions
587 Show stream dispositions.
588
589 -colors
590 Show recognized color names.
591
592 -sources device[,opt1=val1[,opt2=val2]...]
593 Show autodetected sources of the input device. Some devices may
594 provide system-dependent source names that cannot be autodetected.
595 The returned list cannot be assumed to be always complete.
596
597 ffmpeg -sources pulse,server=192.168.0.4
598
599 -sinks device[,opt1=val1[,opt2=val2]...]
600 Show autodetected sinks of the output device. Some devices may
601 provide system-dependent sink names that cannot be autodetected.
602 The returned list cannot be assumed to be always complete.
603
604 ffmpeg -sinks pulse,server=192.168.0.4
605
606 -loglevel [flags+]loglevel | -v [flags+]loglevel
607 Set logging level and flags used by the library.
608
609 The optional flags prefix can consist of the following values:
610
611 repeat
612 Indicates that repeated log output should not be compressed to
613 the first line and the "Last message repeated n times" line
614 will be omitted.
615
616 level
617 Indicates that log output should add a "[level]" prefix to each
618 message line. This can be used as an alternative to log
619 coloring, e.g. when dumping the log to file.
620
621 Flags can also be used alone by adding a '+'/'-' prefix to
622 set/reset a single flag without affecting other flags or changing
623 loglevel. When setting both flags and loglevel, a '+' separator is
624 expected between the last flags value and before loglevel.
625
626 loglevel is a string or a number containing one of the following
627 values:
628
629 quiet, -8
630 Show nothing at all; be silent.
631
632 panic, 0
633 Only show fatal errors which could lead the process to crash,
634 such as an assertion failure. This is not currently used for
635 anything.
636
637 fatal, 8
638 Only show fatal errors. These are errors after which the
639 process absolutely cannot continue.
640
641 error, 16
642 Show all errors, including ones which can be recovered from.
643
644 warning, 24
645 Show all warnings and errors. Any message related to possibly
646 incorrect or unexpected events will be shown.
647
648 info, 32
649 Show informative messages during processing. This is in
650 addition to warnings and errors. This is the default value.
651
652 verbose, 40
653 Same as "info", except more verbose.
654
655 debug, 48
656 Show everything, including debugging information.
657
658 trace, 56
659
660 For example to enable repeated log output, add the "level" prefix,
661 and set loglevel to "verbose":
662
663 ffmpeg -loglevel repeat+level+verbose -i input output
664
665 Another example that enables repeated log output without affecting
666 current state of "level" prefix flag or loglevel:
667
668 ffmpeg [...] -loglevel +repeat
669
670 By default the program logs to stderr. If coloring is supported by
671 the terminal, colors are used to mark errors and warnings. Log
672 coloring can be disabled setting the environment variable
673 AV_LOG_FORCE_NOCOLOR, or can be forced setting the environment
674 variable AV_LOG_FORCE_COLOR.
675
676 -report
677 Dump full command line and log output to a file named
678 "program-YYYYMMDD-HHMMSS.log" in the current directory. This file
679 can be useful for bug reports. It also implies "-loglevel debug".
680
681 Setting the environment variable FFREPORT to any value has the same
682 effect. If the value is a ':'-separated key=value sequence, these
683 options will affect the report; option values must be escaped if
684 they contain special characters or the options delimiter ':' (see
685 the ``Quoting and escaping'' section in the ffmpeg-utils manual).
686
687 The following options are recognized:
688
689 file
690 set the file name to use for the report; %p is expanded to the
691 name of the program, %t is expanded to a timestamp, "%%" is
692 expanded to a plain "%"
693
694 level
695 set the log verbosity level using a numerical value (see
696 "-loglevel").
697
698 For example, to output a report to a file named ffreport.log using
699 a log level of 32 (alias for log level "info"):
700
701 FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
702
703 Errors in parsing the environment variable are not fatal, and will
704 not appear in the report.
705
706 -hide_banner
707 Suppress printing banner.
708
709 All FFmpeg tools will normally show a copyright notice, build
710 options and library versions. This option can be used to suppress
711 printing this information.
712
713 -cpuflags flags (global)
714 Allows setting and clearing cpu flags. This option is intended for
715 testing. Do not use it unless you know what you're doing.
716
717 ffmpeg -cpuflags -sse+mmx ...
718 ffmpeg -cpuflags mmx ...
719 ffmpeg -cpuflags 0 ...
720
721 Possible flags for this option are:
722
723 x86
724 mmx
725 mmxext
726 sse
727 sse2
728 sse2slow
729 sse3
730 sse3slow
731 ssse3
732 atom
733 sse4.1
734 sse4.2
735 avx
736 avx2
737 xop
738 fma3
739 fma4
740 3dnow
741 3dnowext
742 bmi1
743 bmi2
744 cmov
745 ARM
746 armv5te
747 armv6
748 armv6t2
749 vfp
750 vfpv3
751 neon
752 setend
753 AArch64
754 armv8
755 vfp
756 neon
757 PowerPC
758 altivec
759 Specific Processors
760 pentium2
761 pentium3
762 pentium4
763 k6
764 k62
765 athlon
766 athlonxp
767 k8
768 -cpucount count (global)
769 Override detection of CPU count. This option is intended for
770 testing. Do not use it unless you know what you're doing.
771
772 ffmpeg -cpucount 2
773
774 -max_alloc bytes
775 Set the maximum size limit for allocating a block on the heap by
776 ffmpeg's family of malloc functions. Exercise extreme caution when
777 using this option. Don't use if you do not understand the full
778 consequence of doing so. Default is INT_MAX.
779
780 AVOptions
781 These options are provided directly by the libavformat, libavdevice and
782 libavcodec libraries. To see the list of available AVOptions, use the
783 -help option. They are separated into two categories:
784
785 generic
786 These options can be set for any container, codec or device.
787 Generic options are listed under AVFormatContext options for
788 containers/devices and under AVCodecContext options for codecs.
789
790 private
791 These options are specific to the given container, device or codec.
792 Private options are listed under their corresponding
793 containers/devices/codecs.
794
795 For example to write an ID3v2.3 header instead of a default ID3v2.4 to
796 an MP3 file, use the id3v2_version private option of the MP3 muxer:
797
798 ffmpeg -i input.flac -id3v2_version 3 out.mp3
799
800 All codec AVOptions are per-stream, and thus a stream specifier should
801 be attached to them:
802
803 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
804
805 In the above example, a multichannel audio stream is mapped twice for
806 output. The first instance is encoded with codec ac3 and bitrate 640k.
807 The second instance is downmixed to 2 channels and encoded with codec
808 aac. A bitrate of 128k is specified for it using absolute index of the
809 output stream.
810
811 Note: the -nooption syntax cannot be used for boolean AVOptions, use
812 -option 0/-option 1.
813
814 Note: the old undocumented way of specifying per-stream AVOptions by
815 prepending v/a/s to the options name is now obsolete and will be
816 removed soon.
817
818 Main options
819 -f fmt (input/output)
820 Force input or output file format. The format is normally auto
821 detected for input files and guessed from the file extension for
822 output files, so this option is not needed in most cases.
823
824 -i url (input)
825 input file url
826
827 -y (global)
828 Overwrite output files without asking.
829
830 -n (global)
831 Do not overwrite output files, and exit immediately if a specified
832 output file already exists.
833
834 -stream_loop number (input)
835 Set number of times input stream shall be looped. Loop 0 means no
836 loop, loop -1 means infinite loop.
837
838 -recast_media (global)
839 Allow forcing a decoder of a different media type than the one
840 detected or designated by the demuxer. Useful for decoding media
841 data muxed as data streams.
842
843 -c[:stream_specifier] codec (input/output,per-stream)
844 -codec[:stream_specifier] codec (input/output,per-stream)
845 Select an encoder (when used before an output file) or a decoder
846 (when used before an input file) for one or more streams. codec is
847 the name of a decoder/encoder or a special value "copy" (output
848 only) to indicate that the stream is not to be re-encoded.
849
850 For example
851
852 ffmpeg -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT
853
854 encodes all video streams with libx264 and copies all audio
855 streams.
856
857 For each stream, the last matching "c" option is applied, so
858
859 ffmpeg -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT
860
861 will copy all the streams except the second video, which will be
862 encoded with libx264, and the 138th audio, which will be encoded
863 with libvorbis.
864
865 -t duration (input/output)
866 When used as an input option (before "-i"), limit the duration of
867 data read from the input file.
868
869 When used as an output option (before an output url), stop writing
870 the output after its duration reaches duration.
871
872 duration must be a time duration specification, see the Time
873 duration section in the ffmpeg-utils(1) manual.
874
875 -to and -t are mutually exclusive and -t has priority.
876
877 -to position (input/output)
878 Stop writing the output or reading the input at position. position
879 must be a time duration specification, see the Time duration
880 section in the ffmpeg-utils(1) manual.
881
882 -to and -t are mutually exclusive and -t has priority.
883
884 -fs limit_size (output)
885 Set the file size limit, expressed in bytes. No further chunk of
886 bytes is written after the limit is exceeded. The size of the
887 output file is slightly more than the requested file size.
888
889 -ss position (input/output)
890 When used as an input option (before "-i"), seeks in this input
891 file to position. Note that in most formats it is not possible to
892 seek exactly, so ffmpeg will seek to the closest seek point before
893 position. When transcoding and -accurate_seek is enabled (the
894 default), this extra segment between the seek point and position
895 will be decoded and discarded. When doing stream copy or when
896 -noaccurate_seek is used, it will be preserved.
897
898 When used as an output option (before an output url), decodes but
899 discards input until the timestamps reach position.
900
901 position must be a time duration specification, see the Time
902 duration section in the ffmpeg-utils(1) manual.
903
904 -sseof position (input)
905 Like the "-ss" option but relative to the "end of file". That is
906 negative values are earlier in the file, 0 is at EOF.
907
908 -isync input_index (input)
909 Assign an input as a sync source.
910
911 This will take the difference between the start times of the target
912 and reference inputs and offset the timestamps of the target file
913 by that difference. The source timestamps of the two inputs should
914 derive from the same clock source for expected results. If "copyts"
915 is set then "start_at_zero" must also be set. If either of the
916 inputs has no starting timestamp then no sync adjustment is made.
917
918 Acceptable values are those that refer to a valid ffmpeg input
919 index. If the sync reference is the target index itself or -1, then
920 no adjustment is made to target timestamps. A sync reference may
921 not itself be synced to any other input.
922
923 Default value is -1.
924
925 -itsoffset offset (input)
926 Set the input time offset.
927
928 offset must be a time duration specification, see the Time duration
929 section in the ffmpeg-utils(1) manual.
930
931 The offset is added to the timestamps of the input files.
932 Specifying a positive offset means that the corresponding streams
933 are delayed by the time duration specified in offset.
934
935 -itsscale scale (input,per-stream)
936 Rescale input timestamps. scale should be a floating point number.
937
938 -timestamp date (output)
939 Set the recording timestamp in the container.
940
941 date must be a date specification, see the Date section in the
942 ffmpeg-utils(1) manual.
943
944 -metadata[:metadata_specifier] key=value (output,per-metadata)
945 Set a metadata key/value pair.
946
947 An optional metadata_specifier may be given to set metadata on
948 streams, chapters or programs. See "-map_metadata" documentation
949 for details.
950
951 This option overrides metadata set with "-map_metadata". It is also
952 possible to delete metadata by using an empty value.
953
954 For example, for setting the title in the output file:
955
956 ffmpeg -i in.avi -metadata title="my title" out.flv
957
958 To set the language of the first audio stream:
959
960 ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
961
962 -disposition[:stream_specifier] value (output,per-stream)
963 Sets the disposition for a stream.
964
965 By default, the disposition is copied from the input stream, unless
966 the output stream this option applies to is fed by a complex
967 filtergraph - in that case the disposition is unset by default.
968
969 value is a sequence of items separated by '+' or '-'. The first
970 item may also be prefixed with '+' or '-', in which case this
971 option modifies the default value. Otherwise (the first item is not
972 prefixed) this options overrides the default value. A '+' prefix
973 adds the given disposition, '-' removes it. It is also possible to
974 clear the disposition by setting it to 0.
975
976 If no "-disposition" options were specified for an output file,
977 ffmpeg will automatically set the 'default' disposition on the
978 first stream of each type, when there are multiple streams of this
979 type in the output file and no stream of that type is already
980 marked as default.
981
982 The "-dispositions" option lists the known dispositions.
983
984 For example, to make the second audio stream the default stream:
985
986 ffmpeg -i in.mkv -c copy -disposition:a:1 default out.mkv
987
988 To make the second subtitle stream the default stream and remove
989 the default disposition from the first subtitle stream:
990
991 ffmpeg -i in.mkv -c copy -disposition:s:0 0 -disposition:s:1 default out.mkv
992
993 To add an embedded cover/thumbnail:
994
995 ffmpeg -i in.mp4 -i IMAGE -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic out.mp4
996
997 Not all muxers support embedded thumbnails, and those who do, only
998 support a few formats, like JPEG or PNG.
999
1000 -program
1001 [title=title:][program_num=program_num:]st=stream[:st=stream...]
1002 (output)
1003 Creates a program with the specified title, program_num and adds
1004 the specified stream(s) to it.
1005
1006 -target type (output)
1007 Specify target file type ("vcd", "svcd", "dvd", "dv", "dv50"). type
1008 may be prefixed with "pal-", "ntsc-" or "film-" to use the
1009 corresponding standard. All the format options (bitrate, codecs,
1010 buffer sizes) are then set automatically. You can just type:
1011
1012 ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
1013
1014 Nevertheless you can specify additional options as long as you know
1015 they do not conflict with the standard, as in:
1016
1017 ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
1018
1019 The parameters set for each target are as follows.
1020
1021 VCD
1022
1023 <pal>:
1024 -f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324
1025 -s 352x288 -r 25
1026 -codec:v mpeg1video -g 15 -b:v 1150k -maxrate:v 1150k -minrate:v 1150k -bufsize:v 327680
1027 -ar 44100 -ac 2
1028 -codec:a mp2 -b:a 224k
1029
1030 <ntsc>:
1031 -f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324
1032 -s 352x240 -r 30000/1001
1033 -codec:v mpeg1video -g 18 -b:v 1150k -maxrate:v 1150k -minrate:v 1150k -bufsize:v 327680
1034 -ar 44100 -ac 2
1035 -codec:a mp2 -b:a 224k
1036
1037 <film>:
1038 -f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324
1039 -s 352x240 -r 24000/1001
1040 -codec:v mpeg1video -g 18 -b:v 1150k -maxrate:v 1150k -minrate:v 1150k -bufsize:v 327680
1041 -ar 44100 -ac 2
1042 -codec:a mp2 -b:a 224k
1043
1044 SVCD
1045
1046 <pal>:
1047 -f svcd -packetsize 2324
1048 -s 480x576 -pix_fmt yuv420p -r 25
1049 -codec:v mpeg2video -g 15 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1
1050 -ar 44100
1051 -codec:a mp2 -b:a 224k
1052
1053 <ntsc>:
1054 -f svcd -packetsize 2324
1055 -s 480x480 -pix_fmt yuv420p -r 30000/1001
1056 -codec:v mpeg2video -g 18 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1
1057 -ar 44100
1058 -codec:a mp2 -b:a 224k
1059
1060 <film>:
1061 -f svcd -packetsize 2324
1062 -s 480x480 -pix_fmt yuv420p -r 24000/1001
1063 -codec:v mpeg2video -g 18 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1
1064 -ar 44100
1065 -codec:a mp2 -b:a 224k
1066
1067 DVD
1068
1069 <pal>:
1070 -f dvd -muxrate 10080k -packetsize 2048
1071 -s 720x576 -pix_fmt yuv420p -r 25
1072 -codec:v mpeg2video -g 15 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008
1073 -ar 48000
1074 -codec:a ac3 -b:a 448k
1075
1076 <ntsc>:
1077 -f dvd -muxrate 10080k -packetsize 2048
1078 -s 720x480 -pix_fmt yuv420p -r 30000/1001
1079 -codec:v mpeg2video -g 18 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008
1080 -ar 48000
1081 -codec:a ac3 -b:a 448k
1082
1083 <film>:
1084 -f dvd -muxrate 10080k -packetsize 2048
1085 -s 720x480 -pix_fmt yuv420p -r 24000/1001
1086 -codec:v mpeg2video -g 18 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008
1087 -ar 48000
1088 -codec:a ac3 -b:a 448k
1089
1090 DV
1091
1092 <pal>:
1093 -f dv
1094 -s 720x576 -pix_fmt yuv420p -r 25
1095 -ar 48000 -ac 2
1096
1097 <ntsc>:
1098 -f dv
1099 -s 720x480 -pix_fmt yuv411p -r 30000/1001
1100 -ar 48000 -ac 2
1101
1102 <film>:
1103 -f dv
1104 -s 720x480 -pix_fmt yuv411p -r 24000/1001
1105 -ar 48000 -ac 2
1106
1107 The "dv50" target is identical to the "dv" target except that the
1108 pixel format set is "yuv422p" for all three standards.
1109
1110 Any user-set value for a parameter above will override the target
1111 preset value. In that case, the output may not comply with the
1112 target standard.
1113
1114 -dn (input/output)
1115 As an input option, blocks all data streams of a file from being
1116 filtered or being automatically selected or mapped for any output.
1117 See "-discard" option to disable streams individually.
1118
1119 As an output option, disables data recording i.e. automatic
1120 selection or mapping of any data stream. For full manual control
1121 see the "-map" option.
1122
1123 -dframes number (output)
1124 Set the number of data frames to output. This is an obsolete alias
1125 for "-frames:d", which you should use instead.
1126
1127 -frames[:stream_specifier] framecount (output,per-stream)
1128 Stop writing to the stream after framecount frames.
1129
1130 -q[:stream_specifier] q (output,per-stream)
1131 -qscale[:stream_specifier] q (output,per-stream)
1132 Use fixed quality scale (VBR). The meaning of q/qscale is codec-
1133 dependent. If qscale is used without a stream_specifier then it
1134 applies only to the video stream, this is to maintain compatibility
1135 with previous behavior and as specifying the same codec specific
1136 value to 2 different codecs that is audio and video generally is
1137 not what is intended when no stream_specifier is used.
1138
1139 -filter[:stream_specifier] filtergraph (output,per-stream)
1140 Create the filtergraph specified by filtergraph and use it to
1141 filter the stream.
1142
1143 filtergraph is a description of the filtergraph to apply to the
1144 stream, and must have a single input and a single output of the
1145 same type of the stream. In the filtergraph, the input is
1146 associated to the label "in", and the output to the label "out".
1147 See the ffmpeg-filters manual for more information about the
1148 filtergraph syntax.
1149
1150 See the -filter_complex option if you want to create filtergraphs
1151 with multiple inputs and/or outputs.
1152
1153 -filter_script[:stream_specifier] filename (output,per-stream)
1154 This option is similar to -filter, the only difference is that its
1155 argument is the name of the file from which a filtergraph
1156 description is to be read.
1157
1158 -reinit_filter[:stream_specifier] integer (input,per-stream)
1159 This boolean option determines if the filtergraph(s) to which this
1160 stream is fed gets reinitialized when input frame parameters change
1161 mid-stream. This option is enabled by default as most video and all
1162 audio filters cannot handle deviation in input frame properties.
1163 Upon reinitialization, existing filter state is lost, like e.g. the
1164 frame count "n" reference available in some filters. Any frames
1165 buffered at time of reinitialization are lost. The properties
1166 where a change triggers reinitialization are, for video, frame
1167 resolution or pixel format; for audio, sample format, sample rate,
1168 channel count or channel layout.
1169
1170 -filter_threads nb_threads (global)
1171 Defines how many threads are used to process a filter pipeline.
1172 Each pipeline will produce a thread pool with this many threads
1173 available for parallel processing. The default is the number of
1174 available CPUs.
1175
1176 -pre[:stream_specifier] preset_name (output,per-stream)
1177 Specify the preset for matching stream(s).
1178
1179 -stats (global)
1180 Print encoding progress/statistics. It is on by default, to
1181 explicitly disable it you need to specify "-nostats".
1182
1183 -stats_period time (global)
1184 Set period at which encoding progress/statistics are updated.
1185 Default is 0.5 seconds.
1186
1187 -progress url (global)
1188 Send program-friendly progress information to url.
1189
1190 Progress information is written periodically and at the end of the
1191 encoding process. It is made of "key=value" lines. key consists of
1192 only alphanumeric characters. The last key of a sequence of
1193 progress information is always "progress".
1194
1195 The update period is set using "-stats_period".
1196
1197 -stdin
1198 Enable interaction on standard input. On by default unless standard
1199 input is used as an input. To explicitly disable interaction you
1200 need to specify "-nostdin".
1201
1202 Disabling interaction on standard input is useful, for example, if
1203 ffmpeg is in the background process group. Roughly the same result
1204 can be achieved with "ffmpeg ... < /dev/null" but it requires a
1205 shell.
1206
1207 -debug_ts (global)
1208 Print timestamp information. It is off by default. This option is
1209 mostly useful for testing and debugging purposes, and the output
1210 format may change from one version to another, so it should not be
1211 employed by portable scripts.
1212
1213 See also the option "-fdebug ts".
1214
1215 -attach filename (output)
1216 Add an attachment to the output file. This is supported by a few
1217 formats like Matroska for e.g. fonts used in rendering subtitles.
1218 Attachments are implemented as a specific type of stream, so this
1219 option will add a new stream to the file. It is then possible to
1220 use per-stream options on this stream in the usual way. Attachment
1221 streams created with this option will be created after all the
1222 other streams (i.e. those created with "-map" or automatic
1223 mappings).
1224
1225 Note that for Matroska you also have to set the mimetype metadata
1226 tag:
1227
1228 ffmpeg -i INPUT -attach DejaVuSans.ttf -metadata:s:2 mimetype=application/x-truetype-font out.mkv
1229
1230 (assuming that the attachment stream will be third in the output
1231 file).
1232
1233 -dump_attachment[:stream_specifier] filename (input,per-stream)
1234 Extract the matching attachment stream into a file named filename.
1235 If filename is empty, then the value of the "filename" metadata tag
1236 will be used.
1237
1238 E.g. to extract the first attachment to a file named 'out.ttf':
1239
1240 ffmpeg -dump_attachment:t:0 out.ttf -i INPUT
1241
1242 To extract all attachments to files determined by the "filename"
1243 tag:
1244
1245 ffmpeg -dump_attachment:t "" -i INPUT
1246
1247 Technical note -- attachments are implemented as codec extradata,
1248 so this option can actually be used to extract extradata from any
1249 stream, not just attachments.
1250
1251 Video Options
1252 -vframes number (output)
1253 Set the number of video frames to output. This is an obsolete alias
1254 for "-frames:v", which you should use instead.
1255
1256 -r[:stream_specifier] fps (input/output,per-stream)
1257 Set frame rate (Hz value, fraction or abbreviation).
1258
1259 As an input option, ignore any timestamps stored in the file and
1260 instead generate timestamps assuming constant frame rate fps. This
1261 is not the same as the -framerate option used for some input
1262 formats like image2 or v4l2 (it used to be the same in older
1263 versions of FFmpeg). If in doubt use -framerate instead of the
1264 input option -r.
1265
1266 As an output option:
1267
1268 video encoding
1269 Duplicate or drop frames right before encoding them to achieve
1270 constant output frame rate fps.
1271
1272 video streamcopy
1273 Indicate to the muxer that fps is the stream frame rate. No
1274 data is dropped or duplicated in this case. This may produce
1275 invalid files if fps does not match the actual stream frame
1276 rate as determined by packet timestamps. See also the "setts"
1277 bitstream filter.
1278
1279 -fpsmax[:stream_specifier] fps (output,per-stream)
1280 Set maximum frame rate (Hz value, fraction or abbreviation).
1281
1282 Clamps output frame rate when output framerate is auto-set and is
1283 higher than this value. Useful in batch processing or when input
1284 framerate is wrongly detected as very high. It cannot be set
1285 together with "-r". It is ignored during streamcopy.
1286
1287 -s[:stream_specifier] size (input/output,per-stream)
1288 Set frame size.
1289
1290 As an input option, this is a shortcut for the video_size private
1291 option, recognized by some demuxers for which the frame size is
1292 either not stored in the file or is configurable -- e.g. raw video
1293 or video grabbers.
1294
1295 As an output option, this inserts the "scale" video filter to the
1296 end of the corresponding filtergraph. Please use the "scale" filter
1297 directly to insert it at the beginning or some other place.
1298
1299 The format is wxh (default - same as source).
1300
1301 -aspect[:stream_specifier] aspect (output,per-stream)
1302 Set the video display aspect ratio specified by aspect.
1303
1304 aspect can be a floating point number string, or a string of the
1305 form num:den, where num and den are the numerator and denominator
1306 of the aspect ratio. For example "4:3", "16:9", "1.3333", and
1307 "1.7777" are valid argument values.
1308
1309 If used together with -vcodec copy, it will affect the aspect ratio
1310 stored at container level, but not the aspect ratio stored in
1311 encoded frames, if it exists.
1312
1313 -display_rotation[:stream_specifier] rotation (input,per-stream)
1314 Set video rotation metadata.
1315
1316 rotation is a decimal number specifying the amount in degree by
1317 which the video should be rotated counter-clockwise before being
1318 displayed.
1319
1320 This option overrides the rotation/display transform metadata
1321 stored in the file, if any. When the video is being transcoded
1322 (rather than copied) and "-autorotate" is enabled, the video will
1323 be rotated at the filtering stage. Otherwise, the metadata will be
1324 written into the output file if the muxer supports it.
1325
1326 If the "-display_hflip" and/or "-display_vflip" options are given,
1327 they are applied after the rotation specified by this option.
1328
1329 -display_hflip[:stream_specifier] (input,per-stream)
1330 Set whether on display the image should be horizontally flipped.
1331
1332 See the "-display_rotation" option for more details.
1333
1334 -display_vflip[:stream_specifier] (input,per-stream)
1335 Set whether on display the image should be vertically flipped.
1336
1337 See the "-display_rotation" option for more details.
1338
1339 -vn (input/output)
1340 As an input option, blocks all video streams of a file from being
1341 filtered or being automatically selected or mapped for any output.
1342 See "-discard" option to disable streams individually.
1343
1344 As an output option, disables video recording i.e. automatic
1345 selection or mapping of any video stream. For full manual control
1346 see the "-map" option.
1347
1348 -vcodec codec (output)
1349 Set the video codec. This is an alias for "-codec:v".
1350
1351 -pass[:stream_specifier] n (output,per-stream)
1352 Select the pass number (1 or 2). It is used to do two-pass video
1353 encoding. The statistics of the video are recorded in the first
1354 pass into a log file (see also the option -passlogfile), and in the
1355 second pass that log file is used to generate the video at the
1356 exact requested bitrate. On pass 1, you may just deactivate audio
1357 and set output to null, examples for Windows and Unix:
1358
1359 ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y NUL
1360 ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y /dev/null
1361
1362 -passlogfile[:stream_specifier] prefix (output,per-stream)
1363 Set two-pass log file name prefix to prefix, the default file name
1364 prefix is ``ffmpeg2pass''. The complete file name will be
1365 PREFIX-N.log, where N is a number specific to the output stream
1366
1367 -vf filtergraph (output)
1368 Create the filtergraph specified by filtergraph and use it to
1369 filter the stream.
1370
1371 This is an alias for "-filter:v", see the -filter option.
1372
1373 -autorotate
1374 Automatically rotate the video according to file metadata. Enabled
1375 by default, use -noautorotate to disable it.
1376
1377 -autoscale
1378 Automatically scale the video according to the resolution of first
1379 frame. Enabled by default, use -noautoscale to disable it. When
1380 autoscale is disabled, all output frames of filter graph might not
1381 be in the same resolution and may be inadequate for some
1382 encoder/muxer. Therefore, it is not recommended to disable it
1383 unless you really know what you are doing. Disable autoscale at
1384 your own risk.
1385
1386 Advanced Video options
1387 -pix_fmt[:stream_specifier] format (input/output,per-stream)
1388 Set pixel format. Use "-pix_fmts" to show all the supported pixel
1389 formats. If the selected pixel format can not be selected, ffmpeg
1390 will print a warning and select the best pixel format supported by
1391 the encoder. If pix_fmt is prefixed by a "+", ffmpeg will exit
1392 with an error if the requested pixel format can not be selected,
1393 and automatic conversions inside filtergraphs are disabled. If
1394 pix_fmt is a single "+", ffmpeg selects the same pixel format as
1395 the input (or graph output) and automatic conversions are disabled.
1396
1397 -sws_flags flags (input/output)
1398 Set SwScaler flags.
1399
1400 -rc_override[:stream_specifier] override (output,per-stream)
1401 Rate control override for specific intervals, formatted as
1402 "int,int,int" list separated with slashes. Two first values are the
1403 beginning and end frame numbers, last one is quantizer to use if
1404 positive, or quality factor if negative.
1405
1406 -psnr
1407 Calculate PSNR of compressed frames. This option is deprecated,
1408 pass the PSNR flag to the encoder instead, using "-flags +psnr".
1409
1410 -vstats
1411 Dump video coding statistics to vstats_HHMMSS.log.
1412
1413 -vstats_file file
1414 Dump video coding statistics to file.
1415
1416 -vstats_version file
1417 Specifies which version of the vstats format to use. Default is 2.
1418
1419 version = 1 :
1420
1421 "frame= %5d q= %2.1f PSNR= %6.2f f_size= %6d s_size= %8.0fkB time=
1422 %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s"
1423
1424 version > 1:
1425
1426 "out= %2d st= %2d frame= %5d q= %2.1f PSNR= %6.2f f_size= %6d
1427 s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s"
1428
1429 -top[:stream_specifier] n (output,per-stream)
1430 top=1/bottom=0/auto=-1 field first
1431
1432 -vtag fourcc/tag (output)
1433 Force video tag/fourcc. This is an alias for "-tag:v".
1434
1435 -qphist (global)
1436 Show QP histogram
1437
1438 -vbsf bitstream_filter
1439 Deprecated see -bsf
1440
1441 -force_key_frames[:stream_specifier] time[,time...] (output,per-stream)
1442 -force_key_frames[:stream_specifier] expr:expr (output,per-stream)
1443 -force_key_frames[:stream_specifier] source (output,per-stream)
1444 -force_key_frames[:stream_specifier] source_no_drop (output,per-stream)
1445 force_key_frames can take arguments of the following form:
1446
1447 time[,time...]
1448 If the argument consists of timestamps, ffmpeg will round the
1449 specified times to the nearest output timestamp as per the
1450 encoder time base and force a keyframe at the first frame
1451 having timestamp equal or greater than the computed timestamp.
1452 Note that if the encoder time base is too coarse, then the
1453 keyframes may be forced on frames with timestamps lower than
1454 the specified time. The default encoder time base is the
1455 inverse of the output framerate but may be set otherwise via
1456 "-enc_time_base".
1457
1458 If one of the times is ""chapters"[delta]", it is expanded into
1459 the time of the beginning of all chapters in the file, shifted
1460 by delta, expressed as a time in seconds. This option can be
1461 useful to ensure that a seek point is present at a chapter mark
1462 or any other designated place in the output file.
1463
1464 For example, to insert a key frame at 5 minutes, plus key
1465 frames 0.1 second before the beginning of every chapter:
1466
1467 -force_key_frames 0:05:00,chapters-0.1
1468
1469 expr:expr
1470 If the argument is prefixed with "expr:", the string expr is
1471 interpreted like an expression and is evaluated for each frame.
1472 A key frame is forced in case the evaluation is non-zero.
1473
1474 The expression in expr can contain the following constants:
1475
1476 n the number of current processed frame, starting from 0
1477
1478 n_forced
1479 the number of forced frames
1480
1481 prev_forced_n
1482 the number of the previous forced frame, it is "NAN" when
1483 no keyframe was forced yet
1484
1485 prev_forced_t
1486 the time of the previous forced frame, it is "NAN" when no
1487 keyframe was forced yet
1488
1489 t the time of the current processed frame
1490
1491 For example to force a key frame every 5 seconds, you can
1492 specify:
1493
1494 -force_key_frames expr:gte(t,n_forced*5)
1495
1496 To force a key frame 5 seconds after the time of the last
1497 forced one, starting from second 13:
1498
1499 -force_key_frames expr:if(isnan(prev_forced_t),gte(t,13),gte(t,prev_forced_t+5))
1500
1501 source
1502 If the argument is "source", ffmpeg will force a key frame if
1503 the current frame being encoded is marked as a key frame in its
1504 source.
1505
1506 source_no_drop
1507 If the argument is "source_no_drop", ffmpeg will force a key
1508 frame if the current frame being encoded is marked as a key
1509 frame in its source. In cases where this particular source
1510 frame has to be dropped, enforce the next available frame to
1511 become a key frame instead.
1512
1513 Note that forcing too many keyframes is very harmful for the
1514 lookahead algorithms of certain encoders: using fixed-GOP options
1515 or similar would be more efficient.
1516
1517 -copyinkf[:stream_specifier] (output,per-stream)
1518 When doing stream copy, copy also non-key frames found at the
1519 beginning.
1520
1521 -init_hw_device type[=name][:device[,key=value...]]
1522 Initialise a new hardware device of type type called name, using
1523 the given device parameters. If no name is specified it will
1524 receive a default name of the form "type%d".
1525
1526 The meaning of device and the following arguments depends on the
1527 device type:
1528
1529 cuda
1530 device is the number of the CUDA device.
1531
1532 The following options are recognized:
1533
1534 primary_ctx
1535 If set to 1, uses the primary device context instead of
1536 creating a new one.
1537
1538 Examples:
1539
1540 -init_hw_device cuda:1
1541 Choose the second device on the system.
1542
1543 -init_hw_device cuda:0,primary_ctx=1
1544 Choose the first device and use the primary device context.
1545
1546 dxva2
1547 device is the number of the Direct3D 9 display adapter.
1548
1549 d3d11va
1550 device is the number of the Direct3D 11 display adapter.
1551
1552 vaapi
1553 device is either an X11 display name or a DRM render node. If
1554 not specified, it will attempt to open the default X11 display
1555 ($DISPLAY) and then the first DRM render node
1556 (/dev/dri/renderD128).
1557
1558 vdpau
1559 device is an X11 display name. If not specified, it will
1560 attempt to open the default X11 display ($DISPLAY).
1561
1562 qsv device selects a value in MFX_IMPL_*. Allowed values are:
1563
1564 auto
1565 sw
1566 hw
1567 auto_any
1568 hw_any
1569 hw2
1570 hw3
1571 hw4
1572
1573 If not specified, auto_any is used. (Note that it may be
1574 easier to achieve the desired result for QSV by creating the
1575 platform-appropriate subdevice (dxva2 or d3d11va or vaapi) and
1576 then deriving a QSV device from that.)
1577
1578 Alternatively, child_device_type helps to choose platform-
1579 appropriate subdevice type. On Windows d3d11va is used as
1580 default subdevice type.
1581
1582 Examples:
1583
1584 -init_hw_device qsv:hw,child_device_type=d3d11va
1585 Choose the GPU subdevice with type d3d11va and create QSV
1586 device with MFX_IMPL_HARDWARE.
1587
1588 -init_hw_device qsv:hw,child_device_type=dxva2
1589 Choose the GPU subdevice with type dxva2 and create QSV
1590 device with MFX_IMPL_HARDWARE.
1591
1592 opencl
1593 device selects the platform and device as
1594 platform_index.device_index.
1595
1596 The set of devices can also be filtered using the key-value
1597 pairs to find only devices matching particular platform or
1598 device strings.
1599
1600 The strings usable as filters are:
1601
1602 platform_profile
1603 platform_version
1604 platform_name
1605 platform_vendor
1606 platform_extensions
1607 device_name
1608 device_vendor
1609 driver_version
1610 device_version
1611 device_profile
1612 device_extensions
1613 device_type
1614
1615 The indices and filters must together uniquely select a device.
1616
1617 Examples:
1618
1619 -init_hw_device opencl:0.1
1620 Choose the second device on the first platform.
1621
1622 -init_hw_device opencl:,device_name=Foo9000
1623 Choose the device with a name containing the string
1624 Foo9000.
1625
1626 -init_hw_device
1627 opencl:1,device_type=gpu,device_extensions=cl_khr_fp16
1628 Choose the GPU device on the second platform supporting the
1629 cl_khr_fp16 extension.
1630
1631 vulkan
1632 If device is an integer, it selects the device by its index in
1633 a system-dependent list of devices. If device is any other
1634 string, it selects the first device with a name containing that
1635 string as a substring.
1636
1637 The following options are recognized:
1638
1639 debug
1640 If set to 1, enables the validation layer, if installed.
1641
1642 linear_images
1643 If set to 1, images allocated by the hwcontext will be
1644 linear and locally mappable.
1645
1646 instance_extensions
1647 A plus separated list of additional instance extensions to
1648 enable.
1649
1650 device_extensions
1651 A plus separated list of additional device extensions to
1652 enable.
1653
1654 Examples:
1655
1656 -init_hw_device vulkan:1
1657 Choose the second device on the system.
1658
1659 -init_hw_device vulkan:RADV
1660 Choose the first device with a name containing the string
1661 RADV.
1662
1663 -init_hw_device
1664 vulkan:0,instance_extensions=VK_KHR_wayland_surface+VK_KHR_xcb_surface
1665 Choose the first device and enable the Wayland and XCB
1666 instance extensions.
1667
1668 -init_hw_device type[=name]@source
1669 Initialise a new hardware device of type type called name, deriving
1670 it from the existing device with the name source.
1671
1672 -init_hw_device list
1673 List all hardware device types supported in this build of ffmpeg.
1674
1675 -filter_hw_device name
1676 Pass the hardware device called name to all filters in any filter
1677 graph. This can be used to set the device to upload to with the
1678 "hwupload" filter, or the device to map to with the "hwmap" filter.
1679 Other filters may also make use of this parameter when they require
1680 a hardware device. Note that this is typically only required when
1681 the input is not already in hardware frames - when it is, filters
1682 will derive the device they require from the context of the frames
1683 they receive as input.
1684
1685 This is a global setting, so all filters will receive the same
1686 device.
1687
1688 -hwaccel[:stream_specifier] hwaccel (input,per-stream)
1689 Use hardware acceleration to decode the matching stream(s). The
1690 allowed values of hwaccel are:
1691
1692 none
1693 Do not use any hardware acceleration (the default).
1694
1695 auto
1696 Automatically select the hardware acceleration method.
1697
1698 vdpau
1699 Use VDPAU (Video Decode and Presentation API for Unix) hardware
1700 acceleration.
1701
1702 dxva2
1703 Use DXVA2 (DirectX Video Acceleration) hardware acceleration.
1704
1705 d3d11va
1706 Use D3D11VA (DirectX Video Acceleration) hardware acceleration.
1707
1708 vaapi
1709 Use VAAPI (Video Acceleration API) hardware acceleration.
1710
1711 qsv Use the Intel QuickSync Video acceleration for video
1712 transcoding.
1713
1714 Unlike most other values, this option does not enable
1715 accelerated decoding (that is used automatically whenever a qsv
1716 decoder is selected), but accelerated transcoding, without
1717 copying the frames into the system memory.
1718
1719 For it to work, both the decoder and the encoder must support
1720 QSV acceleration and no filters must be used.
1721
1722 This option has no effect if the selected hwaccel is not available
1723 or not supported by the chosen decoder.
1724
1725 Note that most acceleration methods are intended for playback and
1726 will not be faster than software decoding on modern CPUs.
1727 Additionally, ffmpeg will usually need to copy the decoded frames
1728 from the GPU memory into the system memory, resulting in further
1729 performance loss. This option is thus mainly useful for testing.
1730
1731 -hwaccel_device[:stream_specifier] hwaccel_device (input,per-stream)
1732 Select a device to use for hardware acceleration.
1733
1734 This option only makes sense when the -hwaccel option is also
1735 specified. It can either refer to an existing device created with
1736 -init_hw_device by name, or it can create a new device as if
1737 -init_hw_device type:hwaccel_device were called immediately before.
1738
1739 -hwaccels
1740 List all hardware acceleration components enabled in this build of
1741 ffmpeg. Actual runtime availability depends on the hardware and
1742 its suitable driver being installed.
1743
1744 -fix_sub_duration_heartbeat[:stream_specifier]
1745 Set a specific output video stream as the heartbeat stream
1746 according to which to split and push through currently in-progress
1747 subtitle upon receipt of a random access packet.
1748
1749 This lowers the latency of subtitles for which the end packet or
1750 the following subtitle has not yet been received. As a drawback,
1751 this will most likely lead to duplication of subtitle events in
1752 order to cover the full duration, so when dealing with use cases
1753 where latency of when the subtitle event is passed on to output is
1754 not relevant this option should not be utilized.
1755
1756 Requires -fix_sub_duration to be set for the relevant input
1757 subtitle stream for this to have any effect, as well as for the
1758 input subtitle stream having to be directly mapped to the same
1759 output in which the heartbeat stream resides.
1760
1761 Audio Options
1762 -aframes number (output)
1763 Set the number of audio frames to output. This is an obsolete alias
1764 for "-frames:a", which you should use instead.
1765
1766 -ar[:stream_specifier] freq (input/output,per-stream)
1767 Set the audio sampling frequency. For output streams it is set by
1768 default to the frequency of the corresponding input stream. For
1769 input streams this option only makes sense for audio grabbing
1770 devices and raw demuxers and is mapped to the corresponding demuxer
1771 options.
1772
1773 -aq q (output)
1774 Set the audio quality (codec-specific, VBR). This is an alias for
1775 -q:a.
1776
1777 -ac[:stream_specifier] channels (input/output,per-stream)
1778 Set the number of audio channels. For output streams it is set by
1779 default to the number of input audio channels. For input streams
1780 this option only makes sense for audio grabbing devices and raw
1781 demuxers and is mapped to the corresponding demuxer options.
1782
1783 -an (input/output)
1784 As an input option, blocks all audio streams of a file from being
1785 filtered or being automatically selected or mapped for any output.
1786 See "-discard" option to disable streams individually.
1787
1788 As an output option, disables audio recording i.e. automatic
1789 selection or mapping of any audio stream. For full manual control
1790 see the "-map" option.
1791
1792 -acodec codec (input/output)
1793 Set the audio codec. This is an alias for "-codec:a".
1794
1795 -sample_fmt[:stream_specifier] sample_fmt (output,per-stream)
1796 Set the audio sample format. Use "-sample_fmts" to get a list of
1797 supported sample formats.
1798
1799 -af filtergraph (output)
1800 Create the filtergraph specified by filtergraph and use it to
1801 filter the stream.
1802
1803 This is an alias for "-filter:a", see the -filter option.
1804
1805 Advanced Audio options
1806 -atag fourcc/tag (output)
1807 Force audio tag/fourcc. This is an alias for "-tag:a".
1808
1809 -absf bitstream_filter
1810 Deprecated, see -bsf
1811
1812 -guess_layout_max channels (input,per-stream)
1813 If some input channel layout is not known, try to guess only if it
1814 corresponds to at most the specified number of channels. For
1815 example, 2 tells to ffmpeg to recognize 1 channel as mono and 2
1816 channels as stereo but not 6 channels as 5.1. The default is to
1817 always try to guess. Use 0 to disable all guessing.
1818
1819 Subtitle options
1820 -scodec codec (input/output)
1821 Set the subtitle codec. This is an alias for "-codec:s".
1822
1823 -sn (input/output)
1824 As an input option, blocks all subtitle streams of a file from
1825 being filtered or being automatically selected or mapped for any
1826 output. See "-discard" option to disable streams individually.
1827
1828 As an output option, disables subtitle recording i.e. automatic
1829 selection or mapping of any subtitle stream. For full manual
1830 control see the "-map" option.
1831
1832 -sbsf bitstream_filter
1833 Deprecated, see -bsf
1834
1835 Advanced Subtitle options
1836 -fix_sub_duration
1837 Fix subtitles durations. For each subtitle, wait for the next
1838 packet in the same stream and adjust the duration of the first to
1839 avoid overlap. This is necessary with some subtitles codecs,
1840 especially DVB subtitles, because the duration in the original
1841 packet is only a rough estimate and the end is actually marked by
1842 an empty subtitle frame. Failing to use this option when necessary
1843 can result in exaggerated durations or muxing failures due to non-
1844 monotonic timestamps.
1845
1846 Note that this option will delay the output of all data until the
1847 next subtitle packet is decoded: it may increase memory consumption
1848 and latency a lot.
1849
1850 -canvas_size size
1851 Set the size of the canvas used to render subtitles.
1852
1853 Advanced options
1854 -map [-]input_file_id[:stream_specifier][?] | [linklabel] (output)
1855 Create one or more streams in the output file. This option has two
1856 forms for specifying the data source(s): the first selects one or
1857 more streams from some input file (specified with "-i"), the second
1858 takes an output from some complex filtergraph (specified with
1859 "-filter_complex" or "-filter_complex_script").
1860
1861 In the first form, an output stream is created for every stream
1862 from the input file with the index input_file_id. If
1863 stream_specifier is given, only those streams that match the
1864 specifier are used (see the Stream specifiers section for the
1865 stream_specifier syntax).
1866
1867 A "-" character before the stream identifier creates a "negative"
1868 mapping. It disables matching streams from already created
1869 mappings.
1870
1871 A trailing "?" after the stream index will allow the map to be
1872 optional: if the map matches no streams the map will be ignored
1873 instead of failing. Note the map will still fail if an invalid
1874 input file index is used; such as if the map refers to a non-
1875 existent input.
1876
1877 An alternative [linklabel] form will map outputs from complex
1878 filter graphs (see the -filter_complex option) to the output file.
1879 linklabel must correspond to a defined output link label in the
1880 graph.
1881
1882 This option may be specified multiple times, each adding more
1883 streams to the output file. Any given input stream may also be
1884 mapped any number of times as a source for different output
1885 streams, e.g. in order to use different encoding options and/or
1886 filters. The streams are created in the output in the same order in
1887 which the "-map" options are given on the commandline.
1888
1889 Using this option disables the default mappings for this output
1890 file.
1891
1892 Examples:
1893
1894 map everything
1895 To map ALL streams from the first input file to output
1896
1897 ffmpeg -i INPUT -map 0 output
1898
1899 select specific stream
1900 If you have two audio streams in the first input file, these
1901 streams are identified by 0:0 and 0:1. You can use "-map" to
1902 select which streams to place in an output file. For example:
1903
1904 ffmpeg -i INPUT -map 0:1 out.wav
1905
1906 will map the second input stream in INPUT to the (single)
1907 output stream in out.wav.
1908
1909 create multiple streams
1910 To select the stream with index 2 from input file a.mov
1911 (specified by the identifier 0:2), and stream with index 6 from
1912 input b.mov (specified by the identifier 1:6), and copy them to
1913 the output file out.mov:
1914
1915 ffmpeg -i a.mov -i b.mov -c copy -map 0:2 -map 1:6 out.mov
1916
1917 create multiple streams 2
1918 To select all video and the third audio stream from an input
1919 file:
1920
1921 ffmpeg -i INPUT -map 0:v -map 0:a:2 OUTPUT
1922
1923 negative map
1924 To map all the streams except the second audio, use negative
1925 mappings
1926
1927 ffmpeg -i INPUT -map 0 -map -0:a:1 OUTPUT
1928
1929 optional map
1930 To map the video and audio streams from the first input, and
1931 using the trailing "?", ignore the audio mapping if no audio
1932 streams exist in the first input:
1933
1934 ffmpeg -i INPUT -map 0:v -map 0:a? OUTPUT
1935
1936 map by language
1937 To pick the English audio stream:
1938
1939 ffmpeg -i INPUT -map 0:m:language:eng OUTPUT
1940
1941 -ignore_unknown
1942 Ignore input streams with unknown type instead of failing if
1943 copying such streams is attempted.
1944
1945 -copy_unknown
1946 Allow input streams with unknown type to be copied instead of
1947 failing if copying such streams is attempted.
1948
1949 -map_channel
1950 [input_file_id.stream_specifier.channel_id|-1][?][:output_file_id.stream_specifier]
1951 This option is deprecated and will be removed. It can be replaced
1952 by the pan filter. In some cases it may be easier to use some
1953 combination of the channelsplit, channelmap, or amerge filters.
1954
1955 Map an audio channel from a given input to an output. If
1956 output_file_id.stream_specifier is not set, the audio channel will
1957 be mapped on all the audio streams.
1958
1959 Using "-1" instead of input_file_id.stream_specifier.channel_id
1960 will map a muted channel.
1961
1962 A trailing "?" will allow the map_channel to be optional: if the
1963 map_channel matches no channel the map_channel will be ignored
1964 instead of failing.
1965
1966 For example, assuming INPUT is a stereo audio file, you can switch
1967 the two audio channels with the following command:
1968
1969 ffmpeg -i INPUT -map_channel 0.0.1 -map_channel 0.0.0 OUTPUT
1970
1971 If you want to mute the first channel and keep the second:
1972
1973 ffmpeg -i INPUT -map_channel -1 -map_channel 0.0.1 OUTPUT
1974
1975 The order of the "-map_channel" option specifies the order of the
1976 channels in the output stream. The output channel layout is guessed
1977 from the number of channels mapped (mono if one "-map_channel",
1978 stereo if two, etc.). Using "-ac" in combination of "-map_channel"
1979 makes the channel gain levels to be updated if input and output
1980 channel layouts don't match (for instance two "-map_channel"
1981 options and "-ac 6").
1982
1983 You can also extract each channel of an input to specific outputs;
1984 the following command extracts two channels of the INPUT audio
1985 stream (file 0, stream 0) to the respective OUTPUT_CH0 and
1986 OUTPUT_CH1 outputs:
1987
1988 ffmpeg -i INPUT -map_channel 0.0.0 OUTPUT_CH0 -map_channel 0.0.1 OUTPUT_CH1
1989
1990 The following example splits the channels of a stereo input into
1991 two separate streams, which are put into the same output file:
1992
1993 ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -y out.ogg
1994
1995 Note that currently each output stream can only contain channels
1996 from a single input stream; you can't for example use
1997 "-map_channel" to pick multiple input audio channels contained in
1998 different streams (from the same or different files) and merge them
1999 into a single output stream. It is therefore not currently
2000 possible, for example, to turn two separate mono streams into a
2001 single stereo stream. However splitting a stereo stream into two
2002 single channel mono streams is possible.
2003
2004 If you need this feature, a possible workaround is to use the
2005 amerge filter. For example, if you need to merge a media (here
2006 input.mkv) with 2 mono audio streams into one single stereo channel
2007 audio stream (and keep the video stream), you can use the following
2008 command:
2009
2010 ffmpeg -i input.mkv -filter_complex "[0:1] [0:2] amerge" -c:a pcm_s16le -c:v copy output.mkv
2011
2012 To map the first two audio channels from the first input, and using
2013 the trailing "?", ignore the audio channel mapping if the first
2014 input is mono instead of stereo:
2015
2016 ffmpeg -i INPUT -map_channel 0.0.0 -map_channel 0.0.1? OUTPUT
2017
2018 -map_metadata[:metadata_spec_out] infile[:metadata_spec_in]
2019 (output,per-metadata)
2020 Set metadata information of the next output file from infile. Note
2021 that those are file indices (zero-based), not filenames. Optional
2022 metadata_spec_in/out parameters specify, which metadata to copy. A
2023 metadata specifier can have the following forms:
2024
2025 g global metadata, i.e. metadata that applies to the whole file
2026
2027 s[:stream_spec]
2028 per-stream metadata. stream_spec is a stream specifier as
2029 described in the Stream specifiers chapter. In an input
2030 metadata specifier, the first matching stream is copied from.
2031 In an output metadata specifier, all matching streams are
2032 copied to.
2033
2034 c:chapter_index
2035 per-chapter metadata. chapter_index is the zero-based chapter
2036 index.
2037
2038 p:program_index
2039 per-program metadata. program_index is the zero-based program
2040 index.
2041
2042 If metadata specifier is omitted, it defaults to global.
2043
2044 By default, global metadata is copied from the first input file,
2045 per-stream and per-chapter metadata is copied along with
2046 streams/chapters. These default mappings are disabled by creating
2047 any mapping of the relevant type. A negative file index can be used
2048 to create a dummy mapping that just disables automatic copying.
2049
2050 For example to copy metadata from the first stream of the input
2051 file to global metadata of the output file:
2052
2053 ffmpeg -i in.ogg -map_metadata 0:s:0 out.mp3
2054
2055 To do the reverse, i.e. copy global metadata to all audio streams:
2056
2057 ffmpeg -i in.mkv -map_metadata:s:a 0:g out.mkv
2058
2059 Note that simple 0 would work as well in this example, since global
2060 metadata is assumed by default.
2061
2062 -map_chapters input_file_index (output)
2063 Copy chapters from input file with index input_file_index to the
2064 next output file. If no chapter mapping is specified, then chapters
2065 are copied from the first input file with at least one chapter. Use
2066 a negative file index to disable any chapter copying.
2067
2068 -benchmark (global)
2069 Show benchmarking information at the end of an encode. Shows real,
2070 system and user time used and maximum memory consumption. Maximum
2071 memory consumption is not supported on all systems, it will usually
2072 display as 0 if not supported.
2073
2074 -benchmark_all (global)
2075 Show benchmarking information during the encode. Shows real,
2076 system and user time used in various steps (audio/video
2077 encode/decode).
2078
2079 -timelimit duration (global)
2080 Exit after ffmpeg has been running for duration seconds in CPU user
2081 time.
2082
2083 -dump (global)
2084 Dump each input packet to stderr.
2085
2086 -hex (global)
2087 When dumping packets, also dump the payload.
2088
2089 -readrate speed (input)
2090 Limit input read speed.
2091
2092 Its value is a floating-point positive number which represents the
2093 maximum duration of media, in seconds, that should be ingested in
2094 one second of wallclock time. Default value is zero and represents
2095 no imposed limitation on speed of ingestion. Value 1 represents
2096 real-time speed and is equivalent to "-re".
2097
2098 Mainly used to simulate a capture device or live input stream (e.g.
2099 when reading from a file). Should not be used with a low value
2100 when input is an actual capture device or live stream as it may
2101 cause packet loss.
2102
2103 It is useful for when flow speed of output packets is important,
2104 such as live streaming.
2105
2106 -re (input)
2107 Read input at native frame rate. This is equivalent to setting
2108 "-readrate 1".
2109
2110 -vsync parameter (global)
2111 -fps_mode[:stream_specifier] parameter (output,per-stream)
2112 Set video sync method / framerate mode. vsync is applied to all
2113 output video streams but can be overridden for a stream by setting
2114 fps_mode. vsync is deprecated and will be removed in the future.
2115
2116 For compatibility reasons some of the values for vsync can be
2117 specified as numbers (shown in parentheses in the following table).
2118
2119 passthrough (0)
2120 Each frame is passed with its timestamp from the demuxer to the
2121 muxer.
2122
2123 cfr (1)
2124 Frames will be duplicated and dropped to achieve exactly the
2125 requested constant frame rate.
2126
2127 vfr (2)
2128 Frames are passed through with their timestamp or dropped so as
2129 to prevent 2 frames from having the same timestamp.
2130
2131 drop
2132 As passthrough but destroys all timestamps, making the muxer
2133 generate fresh timestamps based on frame-rate.
2134
2135 auto (-1)
2136 Chooses between cfr and vfr depending on muxer capabilities.
2137 This is the default method.
2138
2139 Note that the timestamps may be further modified by the muxer,
2140 after this. For example, in the case that the format option
2141 avoid_negative_ts is enabled.
2142
2143 With -map you can select from which stream the timestamps should be
2144 taken. You can leave either video or audio unchanged and sync the
2145 remaining stream(s) to the unchanged one.
2146
2147 -frame_drop_threshold parameter
2148 Frame drop threshold, which specifies how much behind video frames
2149 can be before they are dropped. In frame rate units, so 1.0 is one
2150 frame. The default is -1.1. One possible usecase is to avoid
2151 framedrops in case of noisy timestamps or to increase frame drop
2152 precision in case of exact timestamps.
2153
2154 -adrift_threshold time
2155 Set the minimum difference between timestamps and audio data (in
2156 seconds) to trigger adding/dropping samples to make it match the
2157 timestamps. This option effectively is a threshold to select
2158 between hard (add/drop) and soft (squeeze/stretch) compensation.
2159 "-async" must be set to a positive value.
2160
2161 -apad parameters (output,per-stream)
2162 Pad the output audio stream(s). This is the same as applying "-af
2163 apad". Argument is a string of filter parameters composed the same
2164 as with the "apad" filter. "-shortest" must be set for this output
2165 for the option to take effect.
2166
2167 -copyts
2168 Do not process input timestamps, but keep their values without
2169 trying to sanitize them. In particular, do not remove the initial
2170 start time offset value.
2171
2172 Note that, depending on the vsync option or on specific muxer
2173 processing (e.g. in case the format option avoid_negative_ts is
2174 enabled) the output timestamps may mismatch with the input
2175 timestamps even when this option is selected.
2176
2177 -start_at_zero
2178 When used with copyts, shift input timestamps so they start at
2179 zero.
2180
2181 This means that using e.g. "-ss 50" will make output timestamps
2182 start at 50 seconds, regardless of what timestamp the input file
2183 started at.
2184
2185 -copytb mode
2186 Specify how to set the encoder timebase when stream copying. mode
2187 is an integer numeric value, and can assume one of the following
2188 values:
2189
2190 1 Use the demuxer timebase.
2191
2192 The time base is copied to the output encoder from the
2193 corresponding input demuxer. This is sometimes required to
2194 avoid non monotonically increasing timestamps when copying
2195 video streams with variable frame rate.
2196
2197 0 Use the decoder timebase.
2198
2199 The time base is copied to the output encoder from the
2200 corresponding input decoder.
2201
2202 -1 Try to make the choice automatically, in order to generate a
2203 sane output.
2204
2205 Default value is -1.
2206
2207 -enc_time_base[:stream_specifier] timebase (output,per-stream)
2208 Set the encoder timebase. timebase is a floating point number, and
2209 can assume one of the following values:
2210
2211 0 Assign a default value according to the media type.
2212
2213 For video - use 1/framerate, for audio - use 1/samplerate.
2214
2215 -1 Use the input stream timebase when possible.
2216
2217 If an input stream is not available, the default timebase will
2218 be used.
2219
2220 >0 Use the provided number as the timebase.
2221
2222 This field can be provided as a ratio of two integers (e.g.
2223 1:24, 1:48000) or as a floating point number (e.g. 0.04166,
2224 2.0833e-5)
2225
2226 Default value is 0.
2227
2228 -bitexact (input/output)
2229 Enable bitexact mode for (de)muxer and (de/en)coder
2230
2231 -shortest (output)
2232 Finish encoding when the shortest output stream ends.
2233
2234 Note that this option may require buffering frames, which
2235 introduces extra latency. The maximum amount of this latency may be
2236 controlled with the "-shortest_buf_duration" option.
2237
2238 -shortest_buf_duration duration (output)
2239 The "-shortest" option may require buffering potentially large
2240 amounts of data when at least one of the streams is "sparse" (i.e.
2241 has large gaps between frames – this is typically the case for
2242 subtitles).
2243
2244 This option controls the maximum duration of buffered frames in
2245 seconds. Larger values may allow the "-shortest" option to produce
2246 more accurate results, but increase memory use and latency.
2247
2248 The default value is 10 seconds.
2249
2250 -dts_delta_threshold
2251 Timestamp discontinuity delta threshold.
2252
2253 -dts_error_threshold seconds
2254 Timestamp error delta threshold. This threshold use to discard
2255 crazy/damaged timestamps and the default is 30 hours which is
2256 arbitrarily picked and quite conservative.
2257
2258 -muxdelay seconds (output)
2259 Set the maximum demux-decode delay.
2260
2261 -muxpreload seconds (output)
2262 Set the initial demux-decode delay.
2263
2264 -streamid output-stream-index:new-value (output)
2265 Assign a new stream-id value to an output stream. This option
2266 should be specified prior to the output filename to which it
2267 applies. For the situation where multiple output files exist, a
2268 streamid may be reassigned to a different value.
2269
2270 For example, to set the stream 0 PID to 33 and the stream 1 PID to
2271 36 for an output mpegts file:
2272
2273 ffmpeg -i inurl -streamid 0:33 -streamid 1:36 out.ts
2274
2275 -bsf[:stream_specifier] bitstream_filters (output,per-stream)
2276 Set bitstream filters for matching streams. bitstream_filters is a
2277 comma-separated list of bitstream filters. Use the "-bsfs" option
2278 to get the list of bitstream filters.
2279
2280 ffmpeg -i h264.mp4 -c:v copy -bsf:v h264_mp4toannexb -an out.h264
2281
2282
2283 ffmpeg -i file.mov -an -vn -bsf:s mov2textsub -c:s copy -f rawvideo sub.txt
2284
2285 -tag[:stream_specifier] codec_tag (input/output,per-stream)
2286 Force a tag/fourcc for matching streams.
2287
2288 -timecode hh:mm:ssSEPff
2289 Specify Timecode for writing. SEP is ':' for non drop timecode and
2290 ';' (or '.') for drop.
2291
2292 ffmpeg -i input.mpg -timecode 01:02:03.04 -r 30000/1001 -s ntsc output.mpg
2293
2294 -filter_complex filtergraph (global)
2295 Define a complex filtergraph, i.e. one with arbitrary number of
2296 inputs and/or outputs. For simple graphs -- those with one input
2297 and one output of the same type -- see the -filter options.
2298 filtergraph is a description of the filtergraph, as described in
2299 the ``Filtergraph syntax'' section of the ffmpeg-filters manual.
2300
2301 Input link labels must refer to input streams using the
2302 "[file_index:stream_specifier]" syntax (i.e. the same as -map
2303 uses). If stream_specifier matches multiple streams, the first one
2304 will be used. An unlabeled input will be connected to the first
2305 unused input stream of the matching type.
2306
2307 Output link labels are referred to with -map. Unlabeled outputs are
2308 added to the first output file.
2309
2310 Note that with this option it is possible to use only lavfi sources
2311 without normal input files.
2312
2313 For example, to overlay an image over video
2314
2315 ffmpeg -i video.mkv -i image.png -filter_complex '[0:v][1:v]overlay[out]' -map
2316 '[out]' out.mkv
2317
2318 Here "[0:v]" refers to the first video stream in the first input
2319 file, which is linked to the first (main) input of the overlay
2320 filter. Similarly the first video stream in the second input is
2321 linked to the second (overlay) input of overlay.
2322
2323 Assuming there is only one video stream in each input file, we can
2324 omit input labels, so the above is equivalent to
2325
2326 ffmpeg -i video.mkv -i image.png -filter_complex 'overlay[out]' -map
2327 '[out]' out.mkv
2328
2329 Furthermore we can omit the output label and the single output from
2330 the filter graph will be added to the output file automatically, so
2331 we can simply write
2332
2333 ffmpeg -i video.mkv -i image.png -filter_complex 'overlay' out.mkv
2334
2335 As a special exception, you can use a bitmap subtitle stream as
2336 input: it will be converted into a video with the same size as the
2337 largest video in the file, or 720x576 if no video is present. Note
2338 that this is an experimental and temporary solution. It will be
2339 removed once libavfilter has proper support for subtitles.
2340
2341 For example, to hardcode subtitles on top of a DVB-T recording
2342 stored in MPEG-TS format, delaying the subtitles by 1 second:
2343
2344 ffmpeg -i input.ts -filter_complex \
2345 '[#0x2ef] setpts=PTS+1/TB [sub] ; [#0x2d0] [sub] overlay' \
2346 -sn -map '#0x2dc' output.mkv
2347
2348 (0x2d0, 0x2dc and 0x2ef are the MPEG-TS PIDs of respectively the
2349 video, audio and subtitles streams; 0:0, 0:3 and 0:7 would have
2350 worked too)
2351
2352 To generate 5 seconds of pure red video using lavfi "color" source:
2353
2354 ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv
2355
2356 -filter_complex_threads nb_threads (global)
2357 Defines how many threads are used to process a filter_complex
2358 graph. Similar to filter_threads but used for "-filter_complex"
2359 graphs only. The default is the number of available CPUs.
2360
2361 -lavfi filtergraph (global)
2362 Define a complex filtergraph, i.e. one with arbitrary number of
2363 inputs and/or outputs. Equivalent to -filter_complex.
2364
2365 -filter_complex_script filename (global)
2366 This option is similar to -filter_complex, the only difference is
2367 that its argument is the name of the file from which a complex
2368 filtergraph description is to be read.
2369
2370 -accurate_seek (input)
2371 This option enables or disables accurate seeking in input files
2372 with the -ss option. It is enabled by default, so seeking is
2373 accurate when transcoding. Use -noaccurate_seek to disable it,
2374 which may be useful e.g. when copying some streams and transcoding
2375 the others.
2376
2377 -seek_timestamp (input)
2378 This option enables or disables seeking by timestamp in input files
2379 with the -ss option. It is disabled by default. If enabled, the
2380 argument to the -ss option is considered an actual timestamp, and
2381 is not offset by the start time of the file. This matters only for
2382 files which do not start from timestamp 0, such as transport
2383 streams.
2384
2385 -thread_queue_size size (input/output)
2386 For input, this option sets the maximum number of queued packets
2387 when reading from the file or device. With low latency / high rate
2388 live streams, packets may be discarded if they are not read in a
2389 timely manner; setting this value can force ffmpeg to use a
2390 separate input thread and read packets as soon as they arrive. By
2391 default ffmpeg only does this if multiple inputs are specified.
2392
2393 For output, this option specified the maximum number of packets
2394 that may be queued to each muxing thread.
2395
2396 -sdp_file file (global)
2397 Print sdp information for an output stream to file. This allows
2398 dumping sdp information when at least one output isn't an rtp
2399 stream. (Requires at least one of the output formats to be rtp).
2400
2401 -discard (input)
2402 Allows discarding specific streams or frames from streams. Any
2403 input stream can be fully discarded, using value "all" whereas
2404 selective discarding of frames from a stream occurs at the demuxer
2405 and is not supported by all demuxers.
2406
2407 none
2408 Discard no frame.
2409
2410 default
2411 Default, which discards no frames.
2412
2413 noref
2414 Discard all non-reference frames.
2415
2416 bidir
2417 Discard all bidirectional frames.
2418
2419 nokey
2420 Discard all frames excepts keyframes.
2421
2422 all Discard all frames.
2423
2424 -abort_on flags (global)
2425 Stop and abort on various conditions. The following flags are
2426 available:
2427
2428 empty_output
2429 No packets were passed to the muxer, the output is empty.
2430
2431 empty_output_stream
2432 No packets were passed to the muxer in some of the output
2433 streams.
2434
2435 -max_error_rate (global)
2436 Set fraction of decoding frame failures across all inputs which
2437 when crossed ffmpeg will return exit code 69. Crossing this
2438 threshold does not terminate processing. Range is a floating-point
2439 number between 0 to 1. Default is 2/3.
2440
2441 -xerror (global)
2442 Stop and exit on error
2443
2444 -max_muxing_queue_size packets (output,per-stream)
2445 When transcoding audio and/or video streams, ffmpeg will not begin
2446 writing into the output until it has one packet for each such
2447 stream. While waiting for that to happen, packets for other streams
2448 are buffered. This option sets the size of this buffer, in packets,
2449 for the matching output stream.
2450
2451 The default value of this option should be high enough for most
2452 uses, so only touch this option if you are sure that you need it.
2453
2454 -muxing_queue_data_threshold bytes (output,per-stream)
2455 This is a minimum threshold until which the muxing queue size is
2456 not taken into account. Defaults to 50 megabytes per stream, and is
2457 based on the overall size of packets passed to the muxer.
2458
2459 -auto_conversion_filters (global)
2460 Enable automatically inserting format conversion filters in all
2461 filter graphs, including those defined by -vf, -af, -filter_complex
2462 and -lavfi. If filter format negotiation requires a conversion, the
2463 initialization of the filters will fail. Conversions can still be
2464 performed by inserting the relevant conversion filter (scale,
2465 aresample) in the graph. On by default, to explicitly disable it
2466 you need to specify "-noauto_conversion_filters".
2467
2468 -bits_per_raw_sample[:stream_specifier] value (output,per-stream)
2469 Declare the number of bits per raw sample in the given output
2470 stream to be value. Note that this option sets the information
2471 provided to the encoder/muxer, it does not change the stream to
2472 conform to this value. Setting values that do not match the stream
2473 properties may result in encoding failures or invalid output files.
2474
2475 -stats_enc_pre[:stream_specifier] path (output,per-stream)
2476 -stats_enc_post[:stream_specifier] path (output,per-stream)
2477 -stats_mux_pre[:stream_specifier] path (output,per-stream)
2478 Write per-frame encoding information about the matching streams
2479 into the file given by path.
2480
2481 -stats_enc_pre writes information about raw video or audio frames
2482 right before they are sent for encoding, while -stats_enc_post
2483 writes information about encoded packets as they are received from
2484 the encoder. -stats_mux_pre writes information about packets just
2485 as they are about to be sent to the muxer. Every frame or packet
2486 produces one line in the specified file. The format of this line is
2487 controlled by -stats_enc_pre_fmt / -stats_enc_post_fmt /
2488 -stats_mux_pre_fmt.
2489
2490 When stats for multiple streams are written into a single file, the
2491 lines corresponding to different streams will be interleaved. The
2492 precise order of this interleaving is not specified and not
2493 guaranteed to remain stable between different invocations of the
2494 program, even with the same options.
2495
2496 -stats_enc_pre_fmt[:stream_specifier] format_spec (output,per-stream)
2497 -stats_enc_post_fmt[:stream_specifier] format_spec (output,per-stream)
2498 -stats_mux_pre_fmt[:stream_specifier] format_spec (output,per-stream)
2499 Specify the format for the lines written with -stats_enc_pre /
2500 -stats_enc_post / -stats_mux_pre.
2501
2502 format_spec is a string that may contain directives of the form
2503 {fmt}. format_spec is backslash-escaped --- use \{, \}, and \\ to
2504 write a literal {, }, or \, respectively, into the output.
2505
2506 The directives given with fmt may be one of the following:
2507
2508 fidx
2509 Index of the output file.
2510
2511 sidx
2512 Index of the output stream in the file.
2513
2514 n Frame number. Pre-encoding: number of frames sent to the
2515 encoder so far. Post-encoding: number of packets received from
2516 the encoder so far. Muxing: number of packets submitted to the
2517 muxer for this stream so far.
2518
2519 ni Input frame number. Index of the input frame (i.e. output by a
2520 decoder) that corresponds to this output frame or packet. -1 if
2521 unavailable.
2522
2523 tb Encoder timebase, as a rational number num/den. Note that this
2524 may be different from the timebase used by the muxer.
2525
2526 tbi Timebase for ptsi, as a rational number num/den. Available when
2527 ptsi is available, 0/1 otherwise.
2528
2529 pts Presentation timestamp of the frame or packet, as an integer.
2530 Should be multiplied by the timebase to compute presentation
2531 time.
2532
2533 ptsi
2534 Presentation timestamp of the input frame (see ni), as an
2535 integer. Should be multiplied by tbi to compute presentation
2536 time. Printed as (2^63 - 1 = 9223372036854775807) when not
2537 available.
2538
2539 t Presentation time of the frame or packet, as a decimal number.
2540 Equal to pts multiplied by tb.
2541
2542 ti Presentation time of the input frame (see ni), as a decimal
2543 number. Equal to ptsi multiplied by tbi. Printed as inf when
2544 not available.
2545
2546 dts Decoding timestamp of the packet, as an integer. Should be
2547 multiplied by the timebase to compute presentation time. Post-
2548 encoding only.
2549
2550 dt Decoding time of the frame or packet, as a decimal number.
2551 Equal to dts multiplied by tb.
2552
2553 sn Number of audio samples sent to the encoder so far. Audio and
2554 pre-encoding only.
2555
2556 samp
2557 Number of audio samples in the frame. Audio and pre-encoding
2558 only.
2559
2560 size
2561 Size of the encoded packet in bytes. Post-encoding only.
2562
2563 br Current bitrate in bits per second. Post-encoding only.
2564
2565 abr Average bitrate for the whole stream so far, in bits per
2566 second, -1 if it cannot be determined at this point. Post-
2567 encoding only.
2568
2569 The default format strings are:
2570
2571 pre-encoding
2572 {fidx} {sidx} {n} {t}
2573
2574 post-encoding
2575 {fidx} {sidx} {n} {t}
2576
2577 In the future, new items may be added to the end of the default
2578 formatting strings. Users who depend on the format staying exactly
2579 the same, should prescribe it manually.
2580
2581 Note that stats for different streams written into the same file
2582 may have different formats.
2583
2584 Preset files
2585 A preset file contains a sequence of option=value pairs, one for each
2586 line, specifying a sequence of options which would be awkward to
2587 specify on the command line. Lines starting with the hash ('#')
2588 character are ignored and are used to provide comments. Check the
2589 presets directory in the FFmpeg source tree for examples.
2590
2591 There are two types of preset files: ffpreset and avpreset files.
2592
2593 ffpreset files
2594
2595 ffpreset files are specified with the "vpre", "apre", "spre", and
2596 "fpre" options. The "fpre" option takes the filename of the preset
2597 instead of a preset name as input and can be used for any kind of
2598 codec. For the "vpre", "apre", and "spre" options, the options
2599 specified in a preset file are applied to the currently selected codec
2600 of the same type as the preset option.
2601
2602 The argument passed to the "vpre", "apre", and "spre" preset options
2603 identifies the preset file to use according to the following rules:
2604
2605 First ffmpeg searches for a file named arg.ffpreset in the directories
2606 $FFMPEG_DATADIR (if set), and $HOME/.ffmpeg, and in the datadir defined
2607 at configuration time (usually PREFIX/share/ffmpeg) or in a ffpresets
2608 folder along the executable on win32, in that order. For example, if
2609 the argument is "libvpx-1080p", it will search for the file
2610 libvpx-1080p.ffpreset.
2611
2612 If no such file is found, then ffmpeg will search for a file named
2613 codec_name-arg.ffpreset in the above-mentioned directories, where
2614 codec_name is the name of the codec to which the preset file options
2615 will be applied. For example, if you select the video codec with
2616 "-vcodec libvpx" and use "-vpre 1080p", then it will search for the
2617 file libvpx-1080p.ffpreset.
2618
2619 avpreset files
2620
2621 avpreset files are specified with the "pre" option. They work similar
2622 to ffpreset files, but they only allow encoder- specific options.
2623 Therefore, an option=value pair specifying an encoder cannot be used.
2624
2625 When the "pre" option is specified, ffmpeg will look for files with the
2626 suffix .avpreset in the directories $AVCONV_DATADIR (if set), and
2627 $HOME/.avconv, and in the datadir defined at configuration time
2628 (usually PREFIX/share/ffmpeg), in that order.
2629
2630 First ffmpeg searches for a file named codec_name-arg.avpreset in the
2631 above-mentioned directories, where codec_name is the name of the codec
2632 to which the preset file options will be applied. For example, if you
2633 select the video codec with "-vcodec libvpx" and use "-pre 1080p", then
2634 it will search for the file libvpx-1080p.avpreset.
2635
2636 If no such file is found, then ffmpeg will search for a file named
2637 arg.avpreset in the same directories.
2638
2640 Video and Audio grabbing
2641 If you specify the input format and device then ffmpeg can grab video
2642 and audio directly.
2643
2644 ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
2645
2646 Or with an ALSA audio source (mono input, card id 1) instead of OSS:
2647
2648 ffmpeg -f alsa -ac 1 -i hw:1 -f video4linux2 -i /dev/video0 /tmp/out.mpg
2649
2650 Note that you must activate the right video source and channel before
2651 launching ffmpeg with any TV viewer such as
2652 <http://linux.bytesex.org/xawtv/> by Gerd Knorr. You also have to set
2653 the audio recording levels correctly with a standard mixer.
2654
2655 X11 grabbing
2656 Grab the X11 display with ffmpeg via
2657
2658 ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 /tmp/out.mpg
2659
2660 0.0 is display.screen number of your X11 server, same as the DISPLAY
2661 environment variable.
2662
2663 ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0+10,20 /tmp/out.mpg
2664
2665 0.0 is display.screen number of your X11 server, same as the DISPLAY
2666 environment variable. 10 is the x-offset and 20 the y-offset for the
2667 grabbing.
2668
2669 Video and Audio file format conversion
2670 Any supported file format and protocol can serve as input to ffmpeg:
2671
2672 Examples:
2673
2674 • You can use YUV files as input:
2675
2676 ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
2677
2678 It will use the files:
2679
2680 /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
2681 /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
2682
2683 The Y files use twice the resolution of the U and V files. They are
2684 raw files, without header. They can be generated by all decent
2685 video decoders. You must specify the size of the image with the -s
2686 option if ffmpeg cannot guess it.
2687
2688 • You can input from a raw YUV420P file:
2689
2690 ffmpeg -i /tmp/test.yuv /tmp/out.avi
2691
2692 test.yuv is a file containing raw YUV planar data. Each frame is
2693 composed of the Y plane followed by the U and V planes at half
2694 vertical and horizontal resolution.
2695
2696 • You can output to a raw YUV420P file:
2697
2698 ffmpeg -i mydivx.avi hugefile.yuv
2699
2700 • You can set several input files and output files:
2701
2702 ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
2703
2704 Converts the audio file a.wav and the raw YUV video file a.yuv to
2705 MPEG file a.mpg.
2706
2707 • You can also do audio and video conversions at the same time:
2708
2709 ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
2710
2711 Converts a.wav to MPEG audio at 22050 Hz sample rate.
2712
2713 • You can encode to several formats at the same time and define a
2714 mapping from input stream to output streams:
2715
2716 ffmpeg -i /tmp/a.wav -map 0:a -b:a 64k /tmp/a.mp2 -map 0:a -b:a 128k /tmp/b.mp2
2717
2718 Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits.
2719 '-map file:index' specifies which input stream is used for each
2720 output stream, in the order of the definition of output streams.
2721
2722 • You can transcode decrypted VOBs:
2723
2724 ffmpeg -i snatch_1.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k snatch.avi
2725
2726 This is a typical DVD ripping example; the input is a VOB file, the
2727 output an AVI file with MPEG-4 video and MP3 audio. Note that in
2728 this command we use B-frames so the MPEG-4 stream is DivX5
2729 compatible, and GOP size is 300 which means one intra frame every
2730 10 seconds for 29.97fps input video. Furthermore, the audio stream
2731 is MP3-encoded so you need to enable LAME support by passing
2732 "--enable-libmp3lame" to configure. The mapping is particularly
2733 useful for DVD transcoding to get the desired audio language.
2734
2735 NOTE: To see the supported input formats, use "ffmpeg -demuxers".
2736
2737 • You can extract images from a video, or create a video from many
2738 images:
2739
2740 For extracting images from a video:
2741
2742 ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
2743
2744 This will extract one video frame per second from the video and
2745 will output them in files named foo-001.jpeg, foo-002.jpeg, etc.
2746 Images will be rescaled to fit the new WxH values.
2747
2748 If you want to extract just a limited number of frames, you can use
2749 the above command in combination with the "-frames:v" or "-t"
2750 option, or in combination with -ss to start extracting from a
2751 certain point in time.
2752
2753 For creating a video from many images:
2754
2755 ffmpeg -f image2 -framerate 12 -i foo-%03d.jpeg -s WxH foo.avi
2756
2757 The syntax "foo-%03d.jpeg" specifies to use a decimal number
2758 composed of three digits padded with zeroes to express the sequence
2759 number. It is the same syntax supported by the C printf function,
2760 but only formats accepting a normal integer are suitable.
2761
2762 When importing an image sequence, -i also supports expanding shell-
2763 like wildcard patterns (globbing) internally, by selecting the
2764 image2-specific "-pattern_type glob" option.
2765
2766 For example, for creating a video from filenames matching the glob
2767 pattern "foo-*.jpeg":
2768
2769 ffmpeg -f image2 -pattern_type glob -framerate 12 -i 'foo-*.jpeg' -s WxH foo.avi
2770
2771 • You can put many streams of the same type in the output:
2772
2773 ffmpeg -i test1.avi -i test2.avi -map 1:1 -map 1:0 -map 0:1 -map 0:0 -c copy -y test12.nut
2774
2775 The resulting output file test12.nut will contain the first four
2776 streams from the input files in reverse order.
2777
2778 • To force CBR video output:
2779
2780 ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
2781
2782 • The four options lmin, lmax, mblmin and mblmax use 'lambda' units,
2783 but you may use the QP2LAMBDA constant to easily convert from 'q'
2784 units:
2785
2786 ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
2787
2789 This section documents the syntax and formats employed by the FFmpeg
2790 libraries and tools.
2791
2792 Quoting and escaping
2793 FFmpeg adopts the following quoting and escaping mechanism, unless
2794 explicitly specified. The following rules are applied:
2795
2796 • ' and \ are special characters (respectively used for quoting and
2797 escaping). In addition to them, there might be other special
2798 characters depending on the specific syntax where the escaping and
2799 quoting are employed.
2800
2801 • A special character is escaped by prefixing it with a \.
2802
2803 • All characters enclosed between '' are included literally in the
2804 parsed string. The quote character ' itself cannot be quoted, so
2805 you may need to close the quote and escape it.
2806
2807 • Leading and trailing whitespaces, unless escaped or quoted, are
2808 removed from the parsed string.
2809
2810 Note that you may need to add a second level of escaping when using the
2811 command line or a script, which depends on the syntax of the adopted
2812 shell language.
2813
2814 The function "av_get_token" defined in libavutil/avstring.h can be used
2815 to parse a token quoted or escaped according to the rules defined
2816 above.
2817
2818 The tool tools/ffescape in the FFmpeg source tree can be used to
2819 automatically quote or escape a string in a script.
2820
2821 Examples
2822
2823 • Escape the string "Crime d'Amour" containing the "'" special
2824 character:
2825
2826 Crime d\'Amour
2827
2828 • The string above contains a quote, so the "'" needs to be escaped
2829 when quoting it:
2830
2831 'Crime d'\''Amour'
2832
2833 • Include leading or trailing whitespaces using quoting:
2834
2835 ' this string starts and ends with whitespaces '
2836
2837 • Escaping and quoting can be mixed together:
2838
2839 ' The string '\'string\'' is a string '
2840
2841 • To include a literal \ you can use either escaping or quoting:
2842
2843 'c:\foo' can be written as c:\\foo
2844
2845 Date
2846 The accepted syntax is:
2847
2848 [(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
2849 now
2850
2851 If the value is "now" it takes the current time.
2852
2853 Time is local time unless Z is appended, in which case it is
2854 interpreted as UTC. If the year-month-day part is not specified it
2855 takes the current year-month-day.
2856
2857 Time duration
2858 There are two accepted syntaxes for expressing time duration.
2859
2860 [-][<HH>:]<MM>:<SS>[.<m>...]
2861
2862 HH expresses the number of hours, MM the number of minutes for a
2863 maximum of 2 digits, and SS the number of seconds for a maximum of 2
2864 digits. The m at the end expresses decimal value for SS.
2865
2866 or
2867
2868 [-]<S>+[.<m>...][s|ms|us]
2869
2870 S expresses the number of seconds, with the optional decimal part m.
2871 The optional literal suffixes s, ms or us indicate to interpret the
2872 value as seconds, milliseconds or microseconds, respectively.
2873
2874 In both expressions, the optional - indicates negative duration.
2875
2876 Examples
2877
2878 The following examples are all valid time duration:
2879
2880 55 55 seconds
2881
2882 0.2 0.2 seconds
2883
2884 200ms
2885 200 milliseconds, that's 0.2s
2886
2887 200000us
2888 200000 microseconds, that's 0.2s
2889
2890 12:03:45
2891 12 hours, 03 minutes and 45 seconds
2892
2893 23.189
2894 23.189 seconds
2895
2896 Video size
2897 Specify the size of the sourced video, it may be a string of the form
2898 widthxheight, or the name of a size abbreviation.
2899
2900 The following abbreviations are recognized:
2901
2902 ntsc
2903 720x480
2904
2905 pal 720x576
2906
2907 qntsc
2908 352x240
2909
2910 qpal
2911 352x288
2912
2913 sntsc
2914 640x480
2915
2916 spal
2917 768x576
2918
2919 film
2920 352x240
2921
2922 ntsc-film
2923 352x240
2924
2925 sqcif
2926 128x96
2927
2928 qcif
2929 176x144
2930
2931 cif 352x288
2932
2933 4cif
2934 704x576
2935
2936 16cif
2937 1408x1152
2938
2939 qqvga
2940 160x120
2941
2942 qvga
2943 320x240
2944
2945 vga 640x480
2946
2947 svga
2948 800x600
2949
2950 xga 1024x768
2951
2952 uxga
2953 1600x1200
2954
2955 qxga
2956 2048x1536
2957
2958 sxga
2959 1280x1024
2960
2961 qsxga
2962 2560x2048
2963
2964 hsxga
2965 5120x4096
2966
2967 wvga
2968 852x480
2969
2970 wxga
2971 1366x768
2972
2973 wsxga
2974 1600x1024
2975
2976 wuxga
2977 1920x1200
2978
2979 woxga
2980 2560x1600
2981
2982 wqsxga
2983 3200x2048
2984
2985 wquxga
2986 3840x2400
2987
2988 whsxga
2989 6400x4096
2990
2991 whuxga
2992 7680x4800
2993
2994 cga 320x200
2995
2996 ega 640x350
2997
2998 hd480
2999 852x480
3000
3001 hd720
3002 1280x720
3003
3004 hd1080
3005 1920x1080
3006
3007 2k 2048x1080
3008
3009 2kflat
3010 1998x1080
3011
3012 2kscope
3013 2048x858
3014
3015 4k 4096x2160
3016
3017 4kflat
3018 3996x2160
3019
3020 4kscope
3021 4096x1716
3022
3023 nhd 640x360
3024
3025 hqvga
3026 240x160
3027
3028 wqvga
3029 400x240
3030
3031 fwqvga
3032 432x240
3033
3034 hvga
3035 480x320
3036
3037 qhd 960x540
3038
3039 2kdci
3040 2048x1080
3041
3042 4kdci
3043 4096x2160
3044
3045 uhd2160
3046 3840x2160
3047
3048 uhd4320
3049 7680x4320
3050
3051 Video rate
3052 Specify the frame rate of a video, expressed as the number of frames
3053 generated per second. It has to be a string in the format
3054 frame_rate_num/frame_rate_den, an integer number, a float number or a
3055 valid video frame rate abbreviation.
3056
3057 The following abbreviations are recognized:
3058
3059 ntsc
3060 30000/1001
3061
3062 pal 25/1
3063
3064 qntsc
3065 30000/1001
3066
3067 qpal
3068 25/1
3069
3070 sntsc
3071 30000/1001
3072
3073 spal
3074 25/1
3075
3076 film
3077 24/1
3078
3079 ntsc-film
3080 24000/1001
3081
3082 Ratio
3083 A ratio can be expressed as an expression, or in the form
3084 numerator:denominator.
3085
3086 Note that a ratio with infinite (1/0) or negative value is considered
3087 valid, so you should check on the returned value if you want to exclude
3088 those values.
3089
3090 The undefined value can be expressed using the "0:0" string.
3091
3092 Color
3093 It can be the name of a color as defined below (case insensitive match)
3094 or a "[0x|#]RRGGBB[AA]" sequence, possibly followed by @ and a string
3095 representing the alpha component.
3096
3097 The alpha component may be a string composed by "0x" followed by an
3098 hexadecimal number or a decimal number between 0.0 and 1.0, which
3099 represents the opacity value (0x00 or 0.0 means completely transparent,
3100 0xff or 1.0 completely opaque). If the alpha component is not specified
3101 then 0xff is assumed.
3102
3103 The string random will result in a random color.
3104
3105 The following names of colors are recognized:
3106
3107 AliceBlue
3108 0xF0F8FF
3109
3110 AntiqueWhite
3111 0xFAEBD7
3112
3113 Aqua
3114 0x00FFFF
3115
3116 Aquamarine
3117 0x7FFFD4
3118
3119 Azure
3120 0xF0FFFF
3121
3122 Beige
3123 0xF5F5DC
3124
3125 Bisque
3126 0xFFE4C4
3127
3128 Black
3129 0x000000
3130
3131 BlanchedAlmond
3132 0xFFEBCD
3133
3134 Blue
3135 0x0000FF
3136
3137 BlueViolet
3138 0x8A2BE2
3139
3140 Brown
3141 0xA52A2A
3142
3143 BurlyWood
3144 0xDEB887
3145
3146 CadetBlue
3147 0x5F9EA0
3148
3149 Chartreuse
3150 0x7FFF00
3151
3152 Chocolate
3153 0xD2691E
3154
3155 Coral
3156 0xFF7F50
3157
3158 CornflowerBlue
3159 0x6495ED
3160
3161 Cornsilk
3162 0xFFF8DC
3163
3164 Crimson
3165 0xDC143C
3166
3167 Cyan
3168 0x00FFFF
3169
3170 DarkBlue
3171 0x00008B
3172
3173 DarkCyan
3174 0x008B8B
3175
3176 DarkGoldenRod
3177 0xB8860B
3178
3179 DarkGray
3180 0xA9A9A9
3181
3182 DarkGreen
3183 0x006400
3184
3185 DarkKhaki
3186 0xBDB76B
3187
3188 DarkMagenta
3189 0x8B008B
3190
3191 DarkOliveGreen
3192 0x556B2F
3193
3194 Darkorange
3195 0xFF8C00
3196
3197 DarkOrchid
3198 0x9932CC
3199
3200 DarkRed
3201 0x8B0000
3202
3203 DarkSalmon
3204 0xE9967A
3205
3206 DarkSeaGreen
3207 0x8FBC8F
3208
3209 DarkSlateBlue
3210 0x483D8B
3211
3212 DarkSlateGray
3213 0x2F4F4F
3214
3215 DarkTurquoise
3216 0x00CED1
3217
3218 DarkViolet
3219 0x9400D3
3220
3221 DeepPink
3222 0xFF1493
3223
3224 DeepSkyBlue
3225 0x00BFFF
3226
3227 DimGray
3228 0x696969
3229
3230 DodgerBlue
3231 0x1E90FF
3232
3233 FireBrick
3234 0xB22222
3235
3236 FloralWhite
3237 0xFFFAF0
3238
3239 ForestGreen
3240 0x228B22
3241
3242 Fuchsia
3243 0xFF00FF
3244
3245 Gainsboro
3246 0xDCDCDC
3247
3248 GhostWhite
3249 0xF8F8FF
3250
3251 Gold
3252 0xFFD700
3253
3254 GoldenRod
3255 0xDAA520
3256
3257 Gray
3258 0x808080
3259
3260 Green
3261 0x008000
3262
3263 GreenYellow
3264 0xADFF2F
3265
3266 HoneyDew
3267 0xF0FFF0
3268
3269 HotPink
3270 0xFF69B4
3271
3272 IndianRed
3273 0xCD5C5C
3274
3275 Indigo
3276 0x4B0082
3277
3278 Ivory
3279 0xFFFFF0
3280
3281 Khaki
3282 0xF0E68C
3283
3284 Lavender
3285 0xE6E6FA
3286
3287 LavenderBlush
3288 0xFFF0F5
3289
3290 LawnGreen
3291 0x7CFC00
3292
3293 LemonChiffon
3294 0xFFFACD
3295
3296 LightBlue
3297 0xADD8E6
3298
3299 LightCoral
3300 0xF08080
3301
3302 LightCyan
3303 0xE0FFFF
3304
3305 LightGoldenRodYellow
3306 0xFAFAD2
3307
3308 LightGreen
3309 0x90EE90
3310
3311 LightGrey
3312 0xD3D3D3
3313
3314 LightPink
3315 0xFFB6C1
3316
3317 LightSalmon
3318 0xFFA07A
3319
3320 LightSeaGreen
3321 0x20B2AA
3322
3323 LightSkyBlue
3324 0x87CEFA
3325
3326 LightSlateGray
3327 0x778899
3328
3329 LightSteelBlue
3330 0xB0C4DE
3331
3332 LightYellow
3333 0xFFFFE0
3334
3335 Lime
3336 0x00FF00
3337
3338 LimeGreen
3339 0x32CD32
3340
3341 Linen
3342 0xFAF0E6
3343
3344 Magenta
3345 0xFF00FF
3346
3347 Maroon
3348 0x800000
3349
3350 MediumAquaMarine
3351 0x66CDAA
3352
3353 MediumBlue
3354 0x0000CD
3355
3356 MediumOrchid
3357 0xBA55D3
3358
3359 MediumPurple
3360 0x9370D8
3361
3362 MediumSeaGreen
3363 0x3CB371
3364
3365 MediumSlateBlue
3366 0x7B68EE
3367
3368 MediumSpringGreen
3369 0x00FA9A
3370
3371 MediumTurquoise
3372 0x48D1CC
3373
3374 MediumVioletRed
3375 0xC71585
3376
3377 MidnightBlue
3378 0x191970
3379
3380 MintCream
3381 0xF5FFFA
3382
3383 MistyRose
3384 0xFFE4E1
3385
3386 Moccasin
3387 0xFFE4B5
3388
3389 NavajoWhite
3390 0xFFDEAD
3391
3392 Navy
3393 0x000080
3394
3395 OldLace
3396 0xFDF5E6
3397
3398 Olive
3399 0x808000
3400
3401 OliveDrab
3402 0x6B8E23
3403
3404 Orange
3405 0xFFA500
3406
3407 OrangeRed
3408 0xFF4500
3409
3410 Orchid
3411 0xDA70D6
3412
3413 PaleGoldenRod
3414 0xEEE8AA
3415
3416 PaleGreen
3417 0x98FB98
3418
3419 PaleTurquoise
3420 0xAFEEEE
3421
3422 PaleVioletRed
3423 0xD87093
3424
3425 PapayaWhip
3426 0xFFEFD5
3427
3428 PeachPuff
3429 0xFFDAB9
3430
3431 Peru
3432 0xCD853F
3433
3434 Pink
3435 0xFFC0CB
3436
3437 Plum
3438 0xDDA0DD
3439
3440 PowderBlue
3441 0xB0E0E6
3442
3443 Purple
3444 0x800080
3445
3446 Red 0xFF0000
3447
3448 RosyBrown
3449 0xBC8F8F
3450
3451 RoyalBlue
3452 0x4169E1
3453
3454 SaddleBrown
3455 0x8B4513
3456
3457 Salmon
3458 0xFA8072
3459
3460 SandyBrown
3461 0xF4A460
3462
3463 SeaGreen
3464 0x2E8B57
3465
3466 SeaShell
3467 0xFFF5EE
3468
3469 Sienna
3470 0xA0522D
3471
3472 Silver
3473 0xC0C0C0
3474
3475 SkyBlue
3476 0x87CEEB
3477
3478 SlateBlue
3479 0x6A5ACD
3480
3481 SlateGray
3482 0x708090
3483
3484 Snow
3485 0xFFFAFA
3486
3487 SpringGreen
3488 0x00FF7F
3489
3490 SteelBlue
3491 0x4682B4
3492
3493 Tan 0xD2B48C
3494
3495 Teal
3496 0x008080
3497
3498 Thistle
3499 0xD8BFD8
3500
3501 Tomato
3502 0xFF6347
3503
3504 Turquoise
3505 0x40E0D0
3506
3507 Violet
3508 0xEE82EE
3509
3510 Wheat
3511 0xF5DEB3
3512
3513 White
3514 0xFFFFFF
3515
3516 WhiteSmoke
3517 0xF5F5F5
3518
3519 Yellow
3520 0xFFFF00
3521
3522 YellowGreen
3523 0x9ACD32
3524
3525 Channel Layout
3526 A channel layout specifies the spatial disposition of the channels in a
3527 multi-channel audio stream. To specify a channel layout, FFmpeg makes
3528 use of a special syntax.
3529
3530 Individual channels are identified by an id, as given by the table
3531 below:
3532
3533 FL front left
3534
3535 FR front right
3536
3537 FC front center
3538
3539 LFE low frequency
3540
3541 BL back left
3542
3543 BR back right
3544
3545 FLC front left-of-center
3546
3547 FRC front right-of-center
3548
3549 BC back center
3550
3551 SL side left
3552
3553 SR side right
3554
3555 TC top center
3556
3557 TFL top front left
3558
3559 TFC top front center
3560
3561 TFR top front right
3562
3563 TBL top back left
3564
3565 TBC top back center
3566
3567 TBR top back right
3568
3569 DL downmix left
3570
3571 DR downmix right
3572
3573 WL wide left
3574
3575 WR wide right
3576
3577 SDL surround direct left
3578
3579 SDR surround direct right
3580
3581 LFE2
3582 low frequency 2
3583
3584 Standard channel layout compositions can be specified by using the
3585 following identifiers:
3586
3587 mono
3588 FC
3589
3590 stereo
3591 FL+FR
3592
3593 2.1 FL+FR+LFE
3594
3595 3.0 FL+FR+FC
3596
3597 3.0(back)
3598 FL+FR+BC
3599
3600 4.0 FL+FR+FC+BC
3601
3602 quad
3603 FL+FR+BL+BR
3604
3605 quad(side)
3606 FL+FR+SL+SR
3607
3608 3.1 FL+FR+FC+LFE
3609
3610 5.0 FL+FR+FC+BL+BR
3611
3612 5.0(side)
3613 FL+FR+FC+SL+SR
3614
3615 4.1 FL+FR+FC+LFE+BC
3616
3617 5.1 FL+FR+FC+LFE+BL+BR
3618
3619 5.1(side)
3620 FL+FR+FC+LFE+SL+SR
3621
3622 6.0 FL+FR+FC+BC+SL+SR
3623
3624 6.0(front)
3625 FL+FR+FLC+FRC+SL+SR
3626
3627 hexagonal
3628 FL+FR+FC+BL+BR+BC
3629
3630 6.1 FL+FR+FC+LFE+BC+SL+SR
3631
3632 6.1 FL+FR+FC+LFE+BL+BR+BC
3633
3634 6.1(front)
3635 FL+FR+LFE+FLC+FRC+SL+SR
3636
3637 7.0 FL+FR+FC+BL+BR+SL+SR
3638
3639 7.0(front)
3640 FL+FR+FC+FLC+FRC+SL+SR
3641
3642 7.1 FL+FR+FC+LFE+BL+BR+SL+SR
3643
3644 7.1(wide)
3645 FL+FR+FC+LFE+BL+BR+FLC+FRC
3646
3647 7.1(wide-side)
3648 FL+FR+FC+LFE+FLC+FRC+SL+SR
3649
3650 7.1(top)
3651 FL+FR+FC+LFE+BL+BR+TFL+TFR
3652
3653 octagonal
3654 FL+FR+FC+BL+BR+BC+SL+SR
3655
3656 cube
3657 FL+FR+BL+BR+TFL+TFR+TBL+TBR
3658
3659 hexadecagonal
3660 FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
3661
3662 downmix
3663 DL+DR
3664
3665 22.2
3666 FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
3667
3668 A custom channel layout can be specified as a sequence of terms,
3669 separated by '+'. Each term can be:
3670
3671 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.), each
3672 optionally containing a custom name after a '@', (e.g. FL@Left,
3673 FR@Right, FC@Center, LFE@Low_Frequency, etc.)
3674
3675 A standard channel layout can be specified by the following:
3676
3677 • the name of a single channel (e.g. FL, FR, FC, LFE, etc.)
3678
3679 • the name of a standard channel layout (e.g. mono, stereo, 4.0,
3680 quad, 5.0, etc.)
3681
3682 • a number of channels, in decimal, followed by 'c', yielding the
3683 default channel layout for that number of channels (see the
3684 function "av_channel_layout_default"). Note that not all channel
3685 counts have a default layout.
3686
3687 • a number of channels, in decimal, followed by 'C', yielding an
3688 unknown channel layout with the specified number of channels. Note
3689 that not all channel layout specification strings support unknown
3690 channel layouts.
3691
3692 • a channel layout mask, in hexadecimal starting with "0x" (see the
3693 "AV_CH_*" macros in libavutil/channel_layout.h.
3694
3695 Before libavutil version 53 the trailing character "c" to specify a
3696 number of channels was optional, but now it is required, while a
3697 channel layout mask can also be specified as a decimal number (if and
3698 only if not followed by "c" or "C").
3699
3700 See also the function "av_channel_layout_from_string" defined in
3701 libavutil/channel_layout.h.
3702
3704 When evaluating an arithmetic expression, FFmpeg uses an internal
3705 formula evaluator, implemented through the libavutil/eval.h interface.
3706
3707 An expression may contain unary, binary operators, constants, and
3708 functions.
3709
3710 Two expressions expr1 and expr2 can be combined to form another
3711 expression "expr1;expr2". expr1 and expr2 are evaluated in turn, and
3712 the new expression evaluates to the value of expr2.
3713
3714 The following binary operators are available: "+", "-", "*", "/", "^".
3715
3716 The following unary operators are available: "+", "-".
3717
3718 The following functions are available:
3719
3720 abs(x)
3721 Compute absolute value of x.
3722
3723 acos(x)
3724 Compute arccosine of x.
3725
3726 asin(x)
3727 Compute arcsine of x.
3728
3729 atan(x)
3730 Compute arctangent of x.
3731
3732 atan2(x, y)
3733 Compute principal value of the arc tangent of y/x.
3734
3735 between(x, min, max)
3736 Return 1 if x is greater than or equal to min and lesser than or
3737 equal to max, 0 otherwise.
3738
3739 bitand(x, y)
3740 bitor(x, y)
3741 Compute bitwise and/or operation on x and y.
3742
3743 The results of the evaluation of x and y are converted to integers
3744 before executing the bitwise operation.
3745
3746 Note that both the conversion to integer and the conversion back to
3747 floating point can lose precision. Beware of unexpected results for
3748 large numbers (usually 2^53 and larger).
3749
3750 ceil(expr)
3751 Round the value of expression expr upwards to the nearest integer.
3752 For example, "ceil(1.5)" is "2.0".
3753
3754 clip(x, min, max)
3755 Return the value of x clipped between min and max.
3756
3757 cos(x)
3758 Compute cosine of x.
3759
3760 cosh(x)
3761 Compute hyperbolic cosine of x.
3762
3763 eq(x, y)
3764 Return 1 if x and y are equivalent, 0 otherwise.
3765
3766 exp(x)
3767 Compute exponential of x (with base "e", the Euler's number).
3768
3769 floor(expr)
3770 Round the value of expression expr downwards to the nearest
3771 integer. For example, "floor(-1.5)" is "-2.0".
3772
3773 gauss(x)
3774 Compute Gauss function of x, corresponding to "exp(-x*x/2) /
3775 sqrt(2*PI)".
3776
3777 gcd(x, y)
3778 Return the greatest common divisor of x and y. If both x and y are
3779 0 or either or both are less than zero then behavior is undefined.
3780
3781 gt(x, y)
3782 Return 1 if x is greater than y, 0 otherwise.
3783
3784 gte(x, y)
3785 Return 1 if x is greater than or equal to y, 0 otherwise.
3786
3787 hypot(x, y)
3788 This function is similar to the C function with the same name; it
3789 returns "sqrt(x*x + y*y)", the length of the hypotenuse of a right
3790 triangle with sides of length x and y, or the distance of the point
3791 (x, y) from the origin.
3792
3793 if(x, y)
3794 Evaluate x, and if the result is non-zero return the result of the
3795 evaluation of y, return 0 otherwise.
3796
3797 if(x, y, z)
3798 Evaluate x, and if the result is non-zero return the evaluation
3799 result of y, otherwise the evaluation result of z.
3800
3801 ifnot(x, y)
3802 Evaluate x, and if the result is zero return the result of the
3803 evaluation of y, return 0 otherwise.
3804
3805 ifnot(x, y, z)
3806 Evaluate x, and if the result is zero return the evaluation result
3807 of y, otherwise the evaluation result of z.
3808
3809 isinf(x)
3810 Return 1.0 if x is +/-INFINITY, 0.0 otherwise.
3811
3812 isnan(x)
3813 Return 1.0 if x is NAN, 0.0 otherwise.
3814
3815 ld(var)
3816 Load the value of the internal variable with number var, which was
3817 previously stored with st(var, expr). The function returns the
3818 loaded value.
3819
3820 lerp(x, y, z)
3821 Return linear interpolation between x and y by amount of z.
3822
3823 log(x)
3824 Compute natural logarithm of x.
3825
3826 lt(x, y)
3827 Return 1 if x is lesser than y, 0 otherwise.
3828
3829 lte(x, y)
3830 Return 1 if x is lesser than or equal to y, 0 otherwise.
3831
3832 max(x, y)
3833 Return the maximum between x and y.
3834
3835 min(x, y)
3836 Return the minimum between x and y.
3837
3838 mod(x, y)
3839 Compute the remainder of division of x by y.
3840
3841 not(expr)
3842 Return 1.0 if expr is zero, 0.0 otherwise.
3843
3844 pow(x, y)
3845 Compute the power of x elevated y, it is equivalent to "(x)^(y)".
3846
3847 print(t)
3848 print(t, l)
3849 Print the value of expression t with loglevel l. If l is not
3850 specified then a default log level is used. Returns the value of
3851 the expression printed.
3852
3853 Prints t with loglevel l
3854
3855 random(x)
3856 Return a pseudo random value between 0.0 and 1.0. x is the index of
3857 the internal variable which will be used to save the seed/state.
3858
3859 root(expr, max)
3860 Find an input value for which the function represented by expr with
3861 argument ld(0) is 0 in the interval 0..max.
3862
3863 The expression in expr must denote a continuous function or the
3864 result is undefined.
3865
3866 ld(0) is used to represent the function input value, which means
3867 that the given expression will be evaluated multiple times with
3868 various input values that the expression can access through ld(0).
3869 When the expression evaluates to 0 then the corresponding input
3870 value will be returned.
3871
3872 round(expr)
3873 Round the value of expression expr to the nearest integer. For
3874 example, "round(1.5)" is "2.0".
3875
3876 sgn(x)
3877 Compute sign of x.
3878
3879 sin(x)
3880 Compute sine of x.
3881
3882 sinh(x)
3883 Compute hyperbolic sine of x.
3884
3885 sqrt(expr)
3886 Compute the square root of expr. This is equivalent to "(expr)^.5".
3887
3888 squish(x)
3889 Compute expression "1/(1 + exp(4*x))".
3890
3891 st(var, expr)
3892 Store the value of the expression expr in an internal variable. var
3893 specifies the number of the variable where to store the value, and
3894 it is a value ranging from 0 to 9. The function returns the value
3895 stored in the internal variable. Note, Variables are currently not
3896 shared between expressions.
3897
3898 tan(x)
3899 Compute tangent of x.
3900
3901 tanh(x)
3902 Compute hyperbolic tangent of x.
3903
3904 taylor(expr, x)
3905 taylor(expr, x, id)
3906 Evaluate a Taylor series at x, given an expression representing the
3907 ld(id)-th derivative of a function at 0.
3908
3909 When the series does not converge the result is undefined.
3910
3911 ld(id) is used to represent the derivative order in expr, which
3912 means that the given expression will be evaluated multiple times
3913 with various input values that the expression can access through
3914 ld(id). If id is not specified then 0 is assumed.
3915
3916 Note, when you have the derivatives at y instead of 0,
3917 "taylor(expr, x-y)" can be used.
3918
3919 time(0)
3920 Return the current (wallclock) time in seconds.
3921
3922 trunc(expr)
3923 Round the value of expression expr towards zero to the nearest
3924 integer. For example, "trunc(-1.5)" is "-1.0".
3925
3926 while(cond, expr)
3927 Evaluate expression expr while the expression cond is non-zero, and
3928 returns the value of the last expr evaluation, or NAN if cond was
3929 always false.
3930
3931 The following constants are available:
3932
3933 PI area of the unit disc, approximately 3.14
3934
3935 E exp(1) (Euler's number), approximately 2.718
3936
3937 PHI golden ratio (1+sqrt(5))/2, approximately 1.618
3938
3939 Assuming that an expression is considered "true" if it has a non-zero
3940 value, note that:
3941
3942 "*" works like AND
3943
3944 "+" works like OR
3945
3946 For example the construct:
3947
3948 if (A AND B) then C
3949
3950 is equivalent to:
3951
3952 if(A*B, C)
3953
3954 In your C code, you can extend the list of unary and binary functions,
3955 and define recognized constants, so that they are available for your
3956 expressions.
3957
3958 The evaluator also recognizes the International System unit prefixes.
3959 If 'i' is appended after the prefix, binary prefixes are used, which
3960 are based on powers of 1024 instead of powers of 1000. The 'B' postfix
3961 multiplies the value by 8, and can be appended after a unit prefix or
3962 used alone. This allows using for example 'KB', 'MiB', 'G' and 'B' as
3963 number postfix.
3964
3965 The list of available International System prefixes follows, with
3966 indication of the corresponding powers of 10 and of 2.
3967
3968 y 10^-24 / 2^-80
3969
3970 z 10^-21 / 2^-70
3971
3972 a 10^-18 / 2^-60
3973
3974 f 10^-15 / 2^-50
3975
3976 p 10^-12 / 2^-40
3977
3978 n 10^-9 / 2^-30
3979
3980 u 10^-6 / 2^-20
3981
3982 m 10^-3 / 2^-10
3983
3984 c 10^-2
3985
3986 d 10^-1
3987
3988 h 10^2
3989
3990 k 10^3 / 2^10
3991
3992 K 10^3 / 2^10
3993
3994 M 10^6 / 2^20
3995
3996 G 10^9 / 2^30
3997
3998 T 10^12 / 2^40
3999
4000 P 10^15 / 2^50
4001
4002 E 10^18 / 2^60
4003
4004 Z 10^21 / 2^70
4005
4006 Y 10^24 / 2^80
4007
4009 libavcodec provides some generic global options, which can be set on
4010 all the encoders and decoders. In addition each codec may support so-
4011 called private options, which are specific for a given codec.
4012
4013 Sometimes, a global option may only affect a specific kind of codec,
4014 and may be nonsensical or ignored by another, so you need to be aware
4015 of the meaning of the specified options. Also some options are meant
4016 only for decoding or encoding.
4017
4018 Options may be set by specifying -option value in the FFmpeg tools, or
4019 by setting the value explicitly in the "AVCodecContext" options or
4020 using the libavutil/opt.h API for programmatic use.
4021
4022 The list of supported options follow:
4023
4024 b integer (encoding,audio,video)
4025 Set bitrate in bits/s. Default value is 200K.
4026
4027 ab integer (encoding,audio)
4028 Set audio bitrate (in bits/s). Default value is 128K.
4029
4030 bt integer (encoding,video)
4031 Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
4032 tolerance specifies how far ratecontrol is willing to deviate from
4033 the target average bitrate value. This is not related to min/max
4034 bitrate. Lowering tolerance too much has an adverse effect on
4035 quality.
4036
4037 flags flags (decoding/encoding,audio,video,subtitles)
4038 Set generic flags.
4039
4040 Possible values:
4041
4042 mv4 Use four motion vector by macroblock (mpeg4).
4043
4044 qpel
4045 Use 1/4 pel motion compensation.
4046
4047 loop
4048 Use loop filter.
4049
4050 qscale
4051 Use fixed qscale.
4052
4053 pass1
4054 Use internal 2pass ratecontrol in first pass mode.
4055
4056 pass2
4057 Use internal 2pass ratecontrol in second pass mode.
4058
4059 gray
4060 Only decode/encode grayscale.
4061
4062 psnr
4063 Set error[?] variables during encoding.
4064
4065 truncated
4066 Input bitstream might be randomly truncated.
4067
4068 drop_changed
4069 Don't output frames whose parameters differ from first decoded
4070 frame in stream. Error AVERROR_INPUT_CHANGED is returned when
4071 a frame is dropped.
4072
4073 ildct
4074 Use interlaced DCT.
4075
4076 low_delay
4077 Force low delay.
4078
4079 global_header
4080 Place global headers in extradata instead of every keyframe.
4081
4082 bitexact
4083 Only write platform-, build- and time-independent data. (except
4084 (I)DCT). This ensures that file and data checksums are
4085 reproducible and match between platforms. Its primary use is
4086 for regression testing.
4087
4088 aic Apply H263 advanced intra coding / mpeg4 ac prediction.
4089
4090 ilme
4091 Apply interlaced motion estimation.
4092
4093 cgop
4094 Use closed gop.
4095
4096 output_corrupt
4097 Output even potentially corrupted frames.
4098
4099 time_base rational number
4100 Set codec time base.
4101
4102 It is the fundamental unit of time (in seconds) in terms of which
4103 frame timestamps are represented. For fixed-fps content, timebase
4104 should be "1 / frame_rate" and timestamp increments should be
4105 identically 1.
4106
4107 g integer (encoding,video)
4108 Set the group of picture (GOP) size. Default value is 12.
4109
4110 ar integer (decoding/encoding,audio)
4111 Set audio sampling rate (in Hz).
4112
4113 ac integer (decoding/encoding,audio)
4114 Set number of audio channels.
4115
4116 cutoff integer (encoding,audio)
4117 Set cutoff bandwidth. (Supported only by selected encoders, see
4118 their respective documentation sections.)
4119
4120 frame_size integer (encoding,audio)
4121 Set audio frame size.
4122
4123 Each submitted frame except the last must contain exactly
4124 frame_size samples per channel. May be 0 when the codec has
4125 CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is
4126 not restricted. It is set by some decoders to indicate constant
4127 frame size.
4128
4129 frame_number integer
4130 Set the frame number.
4131
4132 delay integer
4133 qcomp float (encoding,video)
4134 Set video quantizer scale compression (VBR). It is used as a
4135 constant in the ratecontrol equation. Recommended range for default
4136 rc_eq: 0.0-1.0.
4137
4138 qblur float (encoding,video)
4139 Set video quantizer scale blur (VBR).
4140
4141 qmin integer (encoding,video)
4142 Set min video quantizer scale (VBR). Must be included between -1
4143 and 69, default value is 2.
4144
4145 qmax integer (encoding,video)
4146 Set max video quantizer scale (VBR). Must be included between -1
4147 and 1024, default value is 31.
4148
4149 qdiff integer (encoding,video)
4150 Set max difference between the quantizer scale (VBR).
4151
4152 bf integer (encoding,video)
4153 Set max number of B frames between non-B-frames.
4154
4155 Must be an integer between -1 and 16. 0 means that B-frames are
4156 disabled. If a value of -1 is used, it will choose an automatic
4157 value depending on the encoder.
4158
4159 Default value is 0.
4160
4161 b_qfactor float (encoding,video)
4162 Set qp factor between P and B frames.
4163
4164 codec_tag integer
4165 bug flags (decoding,video)
4166 Workaround not auto detected encoder bugs.
4167
4168 Possible values:
4169
4170 autodetect
4171 xvid_ilace
4172 Xvid interlacing bug (autodetected if fourcc==XVIX)
4173
4174 ump4
4175 (autodetected if fourcc==UMP4)
4176
4177 no_padding
4178 padding bug (autodetected)
4179
4180 amv
4181 qpel_chroma
4182 std_qpel
4183 old standard qpel (autodetected per fourcc/version)
4184
4185 qpel_chroma2
4186 direct_blocksize
4187 direct-qpel-blocksize bug (autodetected per fourcc/version)
4188
4189 edge
4190 edge padding bug (autodetected per fourcc/version)
4191
4192 hpel_chroma
4193 dc_clip
4194 ms Workaround various bugs in microsoft broken decoders.
4195
4196 trunc
4197 trancated frames
4198
4199 strict integer (decoding/encoding,audio,video)
4200 Specify how strictly to follow the standards.
4201
4202 Possible values:
4203
4204 very
4205 strictly conform to an older more strict version of the spec or
4206 reference software
4207
4208 strict
4209 strictly conform to all the things in the spec no matter what
4210 consequences
4211
4212 normal
4213 unofficial
4214 allow unofficial extensions
4215
4216 experimental
4217 allow non standardized experimental things, experimental
4218 (unfinished/work in progress/not well tested) decoders and
4219 encoders. Note: experimental decoders can pose a security
4220 risk, do not use this for decoding untrusted input.
4221
4222 b_qoffset float (encoding,video)
4223 Set QP offset between P and B frames.
4224
4225 err_detect flags (decoding,audio,video)
4226 Set error detection flags.
4227
4228 Possible values:
4229
4230 crccheck
4231 verify embedded CRCs
4232
4233 bitstream
4234 detect bitstream specification deviations
4235
4236 buffer
4237 detect improper bitstream length
4238
4239 explode
4240 abort decoding on minor error detection
4241
4242 ignore_err
4243 ignore decoding errors, and continue decoding. This is useful
4244 if you want to analyze the content of a video and thus want
4245 everything to be decoded no matter what. This option will not
4246 result in a video that is pleasing to watch in case of errors.
4247
4248 careful
4249 consider things that violate the spec and have not been seen in
4250 the wild as errors
4251
4252 compliant
4253 consider all spec non compliancies as errors
4254
4255 aggressive
4256 consider things that a sane encoder should not do as an error
4257
4258 has_b_frames integer
4259 block_align integer
4260 rc_override_count integer
4261 maxrate integer (encoding,audio,video)
4262 Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
4263
4264 minrate integer (encoding,audio,video)
4265 Set min bitrate tolerance (in bits/s). Most useful in setting up a
4266 CBR encode. It is of little use elsewise.
4267
4268 bufsize integer (encoding,audio,video)
4269 Set ratecontrol buffer size (in bits).
4270
4271 i_qfactor float (encoding,video)
4272 Set QP factor between P and I frames.
4273
4274 i_qoffset float (encoding,video)
4275 Set QP offset between P and I frames.
4276
4277 dct integer (encoding,video)
4278 Set DCT algorithm.
4279
4280 Possible values:
4281
4282 auto
4283 autoselect a good one (default)
4284
4285 fastint
4286 fast integer
4287
4288 int accurate integer
4289
4290 mmx
4291 altivec
4292 faan
4293 floating point AAN DCT
4294
4295 lumi_mask float (encoding,video)
4296 Compress bright areas stronger than medium ones.
4297
4298 tcplx_mask float (encoding,video)
4299 Set temporal complexity masking.
4300
4301 scplx_mask float (encoding,video)
4302 Set spatial complexity masking.
4303
4304 p_mask float (encoding,video)
4305 Set inter masking.
4306
4307 dark_mask float (encoding,video)
4308 Compress dark areas stronger than medium ones.
4309
4310 idct integer (decoding/encoding,video)
4311 Select IDCT implementation.
4312
4313 Possible values:
4314
4315 auto
4316 int
4317 simple
4318 simplemmx
4319 simpleauto
4320 Automatically pick a IDCT compatible with the simple one
4321
4322 arm
4323 altivec
4324 sh4
4325 simplearm
4326 simplearmv5te
4327 simplearmv6
4328 simpleneon
4329 xvid
4330 faani
4331 floating point AAN IDCT
4332
4333 slice_count integer
4334 ec flags (decoding,video)
4335 Set error concealment strategy.
4336
4337 Possible values:
4338
4339 guess_mvs
4340 iterative motion vector (MV) search (slow)
4341
4342 deblock
4343 use strong deblock filter for damaged MBs
4344
4345 favor_inter
4346 favor predicting from the previous frame instead of the current
4347
4348 bits_per_coded_sample integer
4349 aspect rational number (encoding,video)
4350 Set sample aspect ratio.
4351
4352 sar rational number (encoding,video)
4353 Set sample aspect ratio. Alias to aspect.
4354
4355 debug flags (decoding/encoding,audio,video,subtitles)
4356 Print specific debug info.
4357
4358 Possible values:
4359
4360 pict
4361 picture info
4362
4363 rc rate control
4364
4365 bitstream
4366 mb_type
4367 macroblock (MB) type
4368
4369 qp per-block quantization parameter (QP)
4370
4371 dct_coeff
4372 green_metadata
4373 display complexity metadata for the upcoming frame, GoP or for
4374 a given duration.
4375
4376 skip
4377 startcode
4378 er error recognition
4379
4380 mmco
4381 memory management control operations (H.264)
4382
4383 bugs
4384 buffers
4385 picture buffer allocations
4386
4387 thread_ops
4388 threading operations
4389
4390 nomc
4391 skip motion compensation
4392
4393 cmp integer (encoding,video)
4394 Set full pel me compare function.
4395
4396 Possible values:
4397
4398 sad sum of absolute differences, fast (default)
4399
4400 sse sum of squared errors
4401
4402 satd
4403 sum of absolute Hadamard transformed differences
4404
4405 dct sum of absolute DCT transformed differences
4406
4407 psnr
4408 sum of squared quantization errors (avoid, low quality)
4409
4410 bit number of bits needed for the block
4411
4412 rd rate distortion optimal, slow
4413
4414 zero
4415 0
4416
4417 vsad
4418 sum of absolute vertical differences
4419
4420 vsse
4421 sum of squared vertical differences
4422
4423 nsse
4424 noise preserving sum of squared differences
4425
4426 w53 5/3 wavelet, only used in snow
4427
4428 w97 9/7 wavelet, only used in snow
4429
4430 dctmax
4431 chroma
4432 subcmp integer (encoding,video)
4433 Set sub pel me compare function.
4434
4435 Possible values:
4436
4437 sad sum of absolute differences, fast (default)
4438
4439 sse sum of squared errors
4440
4441 satd
4442 sum of absolute Hadamard transformed differences
4443
4444 dct sum of absolute DCT transformed differences
4445
4446 psnr
4447 sum of squared quantization errors (avoid, low quality)
4448
4449 bit number of bits needed for the block
4450
4451 rd rate distortion optimal, slow
4452
4453 zero
4454 0
4455
4456 vsad
4457 sum of absolute vertical differences
4458
4459 vsse
4460 sum of squared vertical differences
4461
4462 nsse
4463 noise preserving sum of squared differences
4464
4465 w53 5/3 wavelet, only used in snow
4466
4467 w97 9/7 wavelet, only used in snow
4468
4469 dctmax
4470 chroma
4471 mbcmp integer (encoding,video)
4472 Set macroblock compare function.
4473
4474 Possible values:
4475
4476 sad sum of absolute differences, fast (default)
4477
4478 sse sum of squared errors
4479
4480 satd
4481 sum of absolute Hadamard transformed differences
4482
4483 dct sum of absolute DCT transformed differences
4484
4485 psnr
4486 sum of squared quantization errors (avoid, low quality)
4487
4488 bit number of bits needed for the block
4489
4490 rd rate distortion optimal, slow
4491
4492 zero
4493 0
4494
4495 vsad
4496 sum of absolute vertical differences
4497
4498 vsse
4499 sum of squared vertical differences
4500
4501 nsse
4502 noise preserving sum of squared differences
4503
4504 w53 5/3 wavelet, only used in snow
4505
4506 w97 9/7 wavelet, only used in snow
4507
4508 dctmax
4509 chroma
4510 ildctcmp integer (encoding,video)
4511 Set interlaced dct compare function.
4512
4513 Possible values:
4514
4515 sad sum of absolute differences, fast (default)
4516
4517 sse sum of squared errors
4518
4519 satd
4520 sum of absolute Hadamard transformed differences
4521
4522 dct sum of absolute DCT transformed differences
4523
4524 psnr
4525 sum of squared quantization errors (avoid, low quality)
4526
4527 bit number of bits needed for the block
4528
4529 rd rate distortion optimal, slow
4530
4531 zero
4532 0
4533
4534 vsad
4535 sum of absolute vertical differences
4536
4537 vsse
4538 sum of squared vertical differences
4539
4540 nsse
4541 noise preserving sum of squared differences
4542
4543 w53 5/3 wavelet, only used in snow
4544
4545 w97 9/7 wavelet, only used in snow
4546
4547 dctmax
4548 chroma
4549 dia_size integer (encoding,video)
4550 Set diamond type & size for motion estimation.
4551
4552 (1024, INT_MAX)
4553 full motion estimation(slowest)
4554
4555 (768, 1024]
4556 umh motion estimation
4557
4558 (512, 768]
4559 hex motion estimation
4560
4561 (256, 512]
4562 l2s diamond motion estimation
4563
4564 [2,256]
4565 var diamond motion estimation
4566
4567 (-1, 2)
4568 small diamond motion estimation
4569
4570 -1 funny diamond motion estimation
4571
4572 (INT_MIN, -1)
4573 sab diamond motion estimation
4574
4575 last_pred integer (encoding,video)
4576 Set amount of motion predictors from the previous frame.
4577
4578 precmp integer (encoding,video)
4579 Set pre motion estimation compare function.
4580
4581 Possible values:
4582
4583 sad sum of absolute differences, fast (default)
4584
4585 sse sum of squared errors
4586
4587 satd
4588 sum of absolute Hadamard transformed differences
4589
4590 dct sum of absolute DCT transformed differences
4591
4592 psnr
4593 sum of squared quantization errors (avoid, low quality)
4594
4595 bit number of bits needed for the block
4596
4597 rd rate distortion optimal, slow
4598
4599 zero
4600 0
4601
4602 vsad
4603 sum of absolute vertical differences
4604
4605 vsse
4606 sum of squared vertical differences
4607
4608 nsse
4609 noise preserving sum of squared differences
4610
4611 w53 5/3 wavelet, only used in snow
4612
4613 w97 9/7 wavelet, only used in snow
4614
4615 dctmax
4616 chroma
4617 pre_dia_size integer (encoding,video)
4618 Set diamond type & size for motion estimation pre-pass.
4619
4620 subq integer (encoding,video)
4621 Set sub pel motion estimation quality.
4622
4623 me_range integer (encoding,video)
4624 Set limit motion vectors range (1023 for DivX player).
4625
4626 global_quality integer (encoding,audio,video)
4627 slice_flags integer
4628 mbd integer (encoding,video)
4629 Set macroblock decision algorithm (high quality mode).
4630
4631 Possible values:
4632
4633 simple
4634 use mbcmp (default)
4635
4636 bits
4637 use fewest bits
4638
4639 rd use best rate distortion
4640
4641 rc_init_occupancy integer (encoding,video)
4642 Set number of bits which should be loaded into the rc buffer before
4643 decoding starts.
4644
4645 flags2 flags (decoding/encoding,audio,video,subtitles)
4646 Possible values:
4647
4648 fast
4649 Allow non spec compliant speedup tricks.
4650
4651 noout
4652 Skip bitstream encoding.
4653
4654 ignorecrop
4655 Ignore cropping information from sps.
4656
4657 local_header
4658 Place global headers at every keyframe instead of in extradata.
4659
4660 chunks
4661 Frame data might be split into multiple chunks.
4662
4663 showall
4664 Show all frames before the first keyframe.
4665
4666 export_mvs
4667 Export motion vectors into frame side-data (see
4668 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
4669 also doc/examples/export_mvs.c.
4670
4671 skip_manual
4672 Do not skip samples and export skip information as frame side
4673 data.
4674
4675 ass_ro_flush_noop
4676 Do not reset ASS ReadOrder field on flush.
4677
4678 icc_profiles
4679 Generate/parse embedded ICC profiles from/to colorimetry tags.
4680
4681 export_side_data flags (decoding/encoding,audio,video,subtitles)
4682 Possible values:
4683
4684 mvs Export motion vectors into frame side-data (see
4685 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
4686 also doc/examples/export_mvs.c.
4687
4688 prft
4689 Export encoder Producer Reference Time into packet side-data
4690 (see "AV_PKT_DATA_PRFT") for codecs that support it.
4691
4692 venc_params
4693 Export video encoding parameters through frame side data (see
4694 "AV_FRAME_DATA_VIDEO_ENC_PARAMS") for codecs that support it.
4695 At present, those are H.264 and VP9.
4696
4697 film_grain
4698 Export film grain parameters through frame side data (see
4699 "AV_FRAME_DATA_FILM_GRAIN_PARAMS"). Supported at present by
4700 AV1 decoders.
4701
4702 threads integer (decoding/encoding,video)
4703 Set the number of threads to be used, in case the selected codec
4704 implementation supports multi-threading.
4705
4706 Possible values:
4707
4708 auto, 0
4709 automatically select the number of threads to set
4710
4711 Default value is auto.
4712
4713 dc integer (encoding,video)
4714 Set intra_dc_precision.
4715
4716 nssew integer (encoding,video)
4717 Set nsse weight.
4718
4719 skip_top integer (decoding,video)
4720 Set number of macroblock rows at the top which are skipped.
4721
4722 skip_bottom integer (decoding,video)
4723 Set number of macroblock rows at the bottom which are skipped.
4724
4725 profile integer (encoding,audio,video)
4726 Set encoder codec profile. Default value is unknown. Encoder
4727 specific profiles are documented in the relevant encoder
4728 documentation.
4729
4730 level integer (encoding,audio,video)
4731 Possible values:
4732
4733 unknown
4734 lowres integer (decoding,audio,video)
4735 Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
4736
4737 mblmin integer (encoding,video)
4738 Set min macroblock lagrange factor (VBR).
4739
4740 mblmax integer (encoding,video)
4741 Set max macroblock lagrange factor (VBR).
4742
4743 skip_loop_filter integer (decoding,video)
4744 skip_idct integer (decoding,video)
4745 skip_frame integer (decoding,video)
4746 Make decoder discard processing depending on the frame type
4747 selected by the option value.
4748
4749 skip_loop_filter skips frame loop filtering, skip_idct skips frame
4750 IDCT/dequantization, skip_frame skips decoding.
4751
4752 Possible values:
4753
4754 none
4755 Discard no frame.
4756
4757 default
4758 Discard useless frames like 0-sized frames.
4759
4760 noref
4761 Discard all non-reference frames.
4762
4763 bidir
4764 Discard all bidirectional frames.
4765
4766 nokey
4767 Discard all frames excepts keyframes.
4768
4769 nointra
4770 Discard all frames except I frames.
4771
4772 all Discard all frames.
4773
4774 Default value is default.
4775
4776 bidir_refine integer (encoding,video)
4777 Refine the two motion vectors used in bidirectional macroblocks.
4778
4779 keyint_min integer (encoding,video)
4780 Set minimum interval between IDR-frames.
4781
4782 refs integer (encoding,video)
4783 Set reference frames to consider for motion compensation.
4784
4785 trellis integer (encoding,audio,video)
4786 Set rate-distortion optimal quantization.
4787
4788 mv0_threshold integer (encoding,video)
4789 compression_level integer (encoding,audio,video)
4790 bits_per_raw_sample integer
4791 channel_layout integer (decoding/encoding,audio)
4792 Possible values:
4793
4794 request_channel_layout integer (decoding,audio)
4795 Possible values:
4796
4797 rc_max_vbv_use float (encoding,video)
4798 rc_min_vbv_use float (encoding,video)
4799 ticks_per_frame integer (decoding/encoding,audio,video)
4800 color_primaries integer (decoding/encoding,video)
4801 Possible values:
4802
4803 bt709
4804 BT.709
4805
4806 bt470m
4807 BT.470 M
4808
4809 bt470bg
4810 BT.470 BG
4811
4812 smpte170m
4813 SMPTE 170 M
4814
4815 smpte240m
4816 SMPTE 240 M
4817
4818 film
4819 Film
4820
4821 bt2020
4822 BT.2020
4823
4824 smpte428
4825 smpte428_1
4826 SMPTE ST 428-1
4827
4828 smpte431
4829 SMPTE 431-2
4830
4831 smpte432
4832 SMPTE 432-1
4833
4834 jedec-p22
4835 JEDEC P22
4836
4837 color_trc integer (decoding/encoding,video)
4838 Possible values:
4839
4840 bt709
4841 BT.709
4842
4843 gamma22
4844 BT.470 M
4845
4846 gamma28
4847 BT.470 BG
4848
4849 smpte170m
4850 SMPTE 170 M
4851
4852 smpte240m
4853 SMPTE 240 M
4854
4855 linear
4856 Linear
4857
4858 log
4859 log100
4860 Log
4861
4862 log_sqrt
4863 log316
4864 Log square root
4865
4866 iec61966_2_4
4867 iec61966-2-4
4868 IEC 61966-2-4
4869
4870 bt1361
4871 bt1361e
4872 BT.1361
4873
4874 iec61966_2_1
4875 iec61966-2-1
4876 IEC 61966-2-1
4877
4878 bt2020_10
4879 bt2020_10bit
4880 BT.2020 - 10 bit
4881
4882 bt2020_12
4883 bt2020_12bit
4884 BT.2020 - 12 bit
4885
4886 smpte2084
4887 SMPTE ST 2084
4888
4889 smpte428
4890 smpte428_1
4891 SMPTE ST 428-1
4892
4893 arib-std-b67
4894 ARIB STD-B67
4895
4896 colorspace integer (decoding/encoding,video)
4897 Possible values:
4898
4899 rgb RGB
4900
4901 bt709
4902 BT.709
4903
4904 fcc FCC
4905
4906 bt470bg
4907 BT.470 BG
4908
4909 smpte170m
4910 SMPTE 170 M
4911
4912 smpte240m
4913 SMPTE 240 M
4914
4915 ycocg
4916 YCOCG
4917
4918 bt2020nc
4919 bt2020_ncl
4920 BT.2020 NCL
4921
4922 bt2020c
4923 bt2020_cl
4924 BT.2020 CL
4925
4926 smpte2085
4927 SMPTE 2085
4928
4929 chroma-derived-nc
4930 Chroma-derived NCL
4931
4932 chroma-derived-c
4933 Chroma-derived CL
4934
4935 ictcp
4936 ICtCp
4937
4938 color_range integer (decoding/encoding,video)
4939 If used as input parameter, it serves as a hint to the decoder,
4940 which color_range the input has. Possible values:
4941
4942 tv
4943 mpeg
4944 MPEG (219*2^(n-8))
4945
4946 pc
4947 jpeg
4948 JPEG (2^n-1)
4949
4950 chroma_sample_location integer (decoding/encoding,video)
4951 Possible values:
4952
4953 left
4954 center
4955 topleft
4956 top
4957 bottomleft
4958 bottom
4959 log_level_offset integer
4960 Set the log level offset.
4961
4962 slices integer (encoding,video)
4963 Number of slices, used in parallelized encoding.
4964
4965 thread_type flags (decoding/encoding,video)
4966 Select which multithreading methods to use.
4967
4968 Use of frame will increase decoding delay by one frame per thread,
4969 so clients which cannot provide future frames should not use it.
4970
4971 Possible values:
4972
4973 slice
4974 Decode more than one part of a single frame at once.
4975
4976 Multithreading using slices works only when the video was
4977 encoded with slices.
4978
4979 frame
4980 Decode more than one frame at once.
4981
4982 Default value is slice+frame.
4983
4984 audio_service_type integer (encoding,audio)
4985 Set audio service type.
4986
4987 Possible values:
4988
4989 ma Main Audio Service
4990
4991 ef Effects
4992
4993 vi Visually Impaired
4994
4995 hi Hearing Impaired
4996
4997 di Dialogue
4998
4999 co Commentary
5000
5001 em Emergency
5002
5003 vo Voice Over
5004
5005 ka Karaoke
5006
5007 request_sample_fmt sample_fmt (decoding,audio)
5008 Set sample format audio decoders should prefer. Default value is
5009 "none".
5010
5011 pkt_timebase rational number
5012 sub_charenc encoding (decoding,subtitles)
5013 Set the input subtitles character encoding.
5014
5015 field_order field_order (video)
5016 Set/override the field order of the video. Possible values:
5017
5018 progressive
5019 Progressive video
5020
5021 tt Interlaced video, top field coded and displayed first
5022
5023 bb Interlaced video, bottom field coded and displayed first
5024
5025 tb Interlaced video, top coded first, bottom displayed first
5026
5027 bt Interlaced video, bottom coded first, top displayed first
5028
5029 skip_alpha bool (decoding,video)
5030 Set to 1 to disable processing alpha (transparency). This works
5031 like the gray flag in the flags option which skips chroma
5032 information instead of alpha. Default is 0.
5033
5034 codec_whitelist list (input)
5035 "," separated list of allowed decoders. By default all are allowed.
5036
5037 dump_separator string (input)
5038 Separator used to separate the fields printed on the command line
5039 about the Stream parameters. For example, to separate the fields
5040 with newlines and indentation:
5041
5042 ffprobe -dump_separator "
5043 " -i ~/videos/matrixbench_mpeg2.mpg
5044
5045 max_pixels integer (decoding/encoding,video)
5046 Maximum number of pixels per image. This value can be used to avoid
5047 out of memory failures due to large images.
5048
5049 apply_cropping bool (decoding,video)
5050 Enable cropping if cropping parameters are multiples of the
5051 required alignment for the left and top parameters. If the
5052 alignment is not met the cropping will be partially applied to
5053 maintain alignment. Default is 1 (enabled). Note: The required
5054 alignment depends on if "AV_CODEC_FLAG_UNALIGNED" is set and the
5055 CPU. "AV_CODEC_FLAG_UNALIGNED" cannot be changed from the command
5056 line. Also hardware decoders will not apply left/top Cropping.
5057
5059 Decoders are configured elements in FFmpeg which allow the decoding of
5060 multimedia streams.
5061
5062 When you configure your FFmpeg build, all the supported native decoders
5063 are enabled by default. Decoders requiring an external library must be
5064 enabled manually via the corresponding "--enable-lib" option. You can
5065 list all available decoders using the configure option
5066 "--list-decoders".
5067
5068 You can disable all the decoders with the configure option
5069 "--disable-decoders" and selectively enable / disable single decoders
5070 with the options "--enable-decoder=DECODER" /
5071 "--disable-decoder=DECODER".
5072
5073 The option "-decoders" of the ff* tools will display the list of
5074 enabled decoders.
5075
5077 A description of some of the currently available video decoders
5078 follows.
5079
5080 av1
5081 AOMedia Video 1 (AV1) decoder.
5082
5083 Options
5084
5085 operating_point
5086 Select an operating point of a scalable AV1 bitstream (0 - 31).
5087 Default is 0.
5088
5089 rawvideo
5090 Raw video decoder.
5091
5092 This decoder decodes rawvideo streams.
5093
5094 Options
5095
5096 top top_field_first
5097 Specify the assumed field type of the input video.
5098
5099 -1 the video is assumed to be progressive (default)
5100
5101 0 bottom-field-first is assumed
5102
5103 1 top-field-first is assumed
5104
5105 libdav1d
5106 dav1d AV1 decoder.
5107
5108 libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
5109 Requires the presence of the libdav1d headers and library during
5110 configuration. You need to explicitly configure the build with
5111 "--enable-libdav1d".
5112
5113 Options
5114
5115 The following options are supported by the libdav1d wrapper.
5116
5117 framethreads
5118 Set amount of frame threads to use during decoding. The default
5119 value is 0 (autodetect). This option is deprecated for libdav1d >=
5120 1.0 and will be removed in the future. Use the option
5121 "max_frame_delay" and the global option "threads" instead.
5122
5123 tilethreads
5124 Set amount of tile threads to use during decoding. The default
5125 value is 0 (autodetect). This option is deprecated for libdav1d >=
5126 1.0 and will be removed in the future. Use the global option
5127 "threads" instead.
5128
5129 max_frame_delay
5130 Set max amount of frames the decoder may buffer internally. The
5131 default value is 0 (autodetect).
5132
5133 filmgrain
5134 Apply film grain to the decoded video if present in the bitstream.
5135 Defaults to the internal default of the library. This option is
5136 deprecated and will be removed in the future. See the global option
5137 "export_side_data" to export Film Grain parameters instead of
5138 applying it.
5139
5140 oppoint
5141 Select an operating point of a scalable AV1 bitstream (0 - 31).
5142 Defaults to the internal default of the library.
5143
5144 alllayers
5145 Output all spatial layers of a scalable AV1 bitstream. The default
5146 value is false.
5147
5148 libdavs2
5149 AVS2-P2/IEEE1857.4 video decoder wrapper.
5150
5151 This decoder allows libavcodec to decode AVS2 streams with davs2
5152 library.
5153
5154 libuavs3d
5155 AVS3-P2/IEEE1857.10 video decoder.
5156
5157 libuavs3d allows libavcodec to decode AVS3 streams. Requires the
5158 presence of the libuavs3d headers and library during configuration.
5159 You need to explicitly configure the build with "--enable-libuavs3d".
5160
5161 Options
5162
5163 The following option is supported by the libuavs3d wrapper.
5164
5165 frame_threads
5166 Set amount of frame threads to use during decoding. The default
5167 value is 0 (autodetect).
5168
5169 QSV Decoders
5170 The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC,
5171 JPEG/MJPEG, VP8, VP9, AV1).
5172
5173 Common Options
5174
5175 The following options are supported by all qsv decoders.
5176
5177 async_depth
5178 Internal parallelization depth, the higher the value the higher the
5179 latency.
5180
5181 gpu_copy
5182 A GPU-accelerated copy between video and system memory
5183
5184 default
5185 on
5186 off
5187
5188 HEVC Options
5189
5190 Extra options for hevc_qsv.
5191
5192 load_plugin
5193 A user plugin to load in an internal session
5194
5195 none
5196 hevc_sw
5197 hevc_hw
5198 load_plugins
5199 A :-separate list of hexadecimal plugin UIDs to load in an internal
5200 session
5201
5202 v210
5203 Uncompressed 4:2:2 10-bit decoder.
5204
5205 Options
5206
5207 custom_stride
5208 Set the line size of the v210 data in bytes. The default value is 0
5209 (autodetect). You can use the special -1 value for a strideless
5210 v210 as seen in BOXX files.
5211
5213 A description of some of the currently available audio decoders
5214 follows.
5215
5216 ac3
5217 AC-3 audio decoder.
5218
5219 This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as
5220 well as the undocumented RealAudio 3 (a.k.a. dnet).
5221
5222 AC-3 Decoder Options
5223
5224 -drc_scale value
5225 Dynamic Range Scale Factor. The factor to apply to dynamic range
5226 values from the AC-3 stream. This factor is applied exponentially.
5227 The default value is 1. There are 3 notable scale factor ranges:
5228
5229 drc_scale == 0
5230 DRC disabled. Produces full range audio.
5231
5232 0 < drc_scale <= 1
5233 DRC enabled. Applies a fraction of the stream DRC value.
5234 Audio reproduction is between full range and full compression.
5235
5236 drc_scale > 1
5237 DRC enabled. Applies drc_scale asymmetrically. Loud sounds are
5238 fully compressed. Soft sounds are enhanced.
5239
5240 flac
5241 FLAC audio decoder.
5242
5243 This decoder aims to implement the complete FLAC specification from
5244 Xiph.
5245
5246 FLAC Decoder options
5247
5248 -use_buggy_lpc
5249 The lavc FLAC encoder used to produce buggy streams with high lpc
5250 values (like the default value). This option makes it possible to
5251 decode such streams correctly by using lavc's old buggy lpc logic
5252 for decoding.
5253
5254 ffwavesynth
5255 Internal wave synthesizer.
5256
5257 This decoder generates wave patterns according to predefined sequences.
5258 Its use is purely internal and the format of the data it accepts is not
5259 publicly documented.
5260
5261 libcelt
5262 libcelt decoder wrapper.
5263
5264 libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio
5265 codec. Requires the presence of the libcelt headers and library during
5266 configuration. You need to explicitly configure the build with
5267 "--enable-libcelt".
5268
5269 libgsm
5270 libgsm decoder wrapper.
5271
5272 libgsm allows libavcodec to decode the GSM full rate audio codec.
5273 Requires the presence of the libgsm headers and library during
5274 configuration. You need to explicitly configure the build with
5275 "--enable-libgsm".
5276
5277 This decoder supports both the ordinary GSM and the Microsoft variant.
5278
5279 libilbc
5280 libilbc decoder wrapper.
5281
5282 libilbc allows libavcodec to decode the Internet Low Bitrate Codec
5283 (iLBC) audio codec. Requires the presence of the libilbc headers and
5284 library during configuration. You need to explicitly configure the
5285 build with "--enable-libilbc".
5286
5287 Options
5288
5289 The following option is supported by the libilbc wrapper.
5290
5291 enhance
5292 Enable the enhancement of the decoded audio when set to 1. The
5293 default value is 0 (disabled).
5294
5295 libopencore-amrnb
5296 libopencore-amrnb decoder wrapper.
5297
5298 libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
5299 Narrowband audio codec. Using it requires the presence of the
5300 libopencore-amrnb headers and library during configuration. You need to
5301 explicitly configure the build with "--enable-libopencore-amrnb".
5302
5303 An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
5304 without this library.
5305
5306 libopencore-amrwb
5307 libopencore-amrwb decoder wrapper.
5308
5309 libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
5310 Wideband audio codec. Using it requires the presence of the
5311 libopencore-amrwb headers and library during configuration. You need to
5312 explicitly configure the build with "--enable-libopencore-amrwb".
5313
5314 An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
5315 without this library.
5316
5317 libopus
5318 libopus decoder wrapper.
5319
5320 libopus allows libavcodec to decode the Opus Interactive Audio Codec.
5321 Requires the presence of the libopus headers and library during
5322 configuration. You need to explicitly configure the build with
5323 "--enable-libopus".
5324
5325 An FFmpeg native decoder for Opus exists, so users can decode Opus
5326 without this library.
5327
5329 libaribb24
5330 ARIB STD-B24 caption decoder.
5331
5332 Implements profiles A and C of the ARIB STD-B24 standard.
5333
5334 libaribb24 Decoder Options
5335
5336 -aribb24-base-path path
5337 Sets the base path for the libaribb24 library. This is utilized for
5338 reading of configuration files (for custom unicode conversions),
5339 and for dumping of non-text symbols as images under that location.
5340
5341 Unset by default.
5342
5343 -aribb24-skip-ruby-text boolean
5344 Tells the decoder wrapper to skip text blocks that contain half-
5345 height ruby text.
5346
5347 Enabled by default.
5348
5349 dvbsub
5350 Options
5351
5352 compute_clut
5353 -2 Compute clut once if no matching CLUT is in the stream.
5354
5355 -1 Compute clut if no matching CLUT is in the stream.
5356
5357 0 Never compute CLUT
5358
5359 1 Always compute CLUT and override the one provided in the
5360 stream.
5361
5362 dvb_substream
5363 Selects the dvb substream, or all substreams if -1 which is
5364 default.
5365
5366 dvdsub
5367 This codec decodes the bitmap subtitles used in DVDs; the same
5368 subtitles can also be found in VobSub file pairs and in some Matroska
5369 files.
5370
5371 Options
5372
5373 palette
5374 Specify the global palette used by the bitmaps. When stored in
5375 VobSub, the palette is normally specified in the index file; in
5376 Matroska, the palette is stored in the codec extra-data in the same
5377 format as in VobSub. In DVDs, the palette is stored in the IFO
5378 file, and therefore not available when reading from dumped VOB
5379 files.
5380
5381 The format for this option is a string containing 16 24-bits
5382 hexadecimal numbers (without 0x prefix) separated by commas, for
5383 example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
5384 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
5385 7c127b".
5386
5387 ifo_palette
5388 Specify the IFO file from which the global palette is obtained.
5389 (experimental)
5390
5391 forced_subs_only
5392 Only decode subtitle entries marked as forced. Some titles have
5393 forced and non-forced subtitles in the same track. Setting this
5394 flag to 1 will only keep the forced subtitles. Default value is 0.
5395
5396 libzvbi-teletext
5397 Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
5398 subtitles. Requires the presence of the libzvbi headers and library
5399 during configuration. You need to explicitly configure the build with
5400 "--enable-libzvbi".
5401
5402 Options
5403
5404 txt_page
5405 List of teletext page numbers to decode. Pages that do not match
5406 the specified list are dropped. You may use the special "*" string
5407 to match all pages, or "subtitle" to match all subtitle pages.
5408 Default value is *.
5409
5410 txt_default_region
5411 Set default character set used for decoding, a value between 0 and
5412 87 (see ETS 300 706, Section 15, Table 32). Default value is -1,
5413 which does not override the libzvbi default. This option is needed
5414 for some legacy level 1.0 transmissions which cannot signal the
5415 proper charset.
5416
5417 txt_chop_top
5418 Discards the top teletext line. Default value is 1.
5419
5420 txt_format
5421 Specifies the format of the decoded subtitles.
5422
5423 bitmap
5424 The default format, you should use this for teletext pages,
5425 because certain graphics and colors cannot be expressed in
5426 simple text or even ASS.
5427
5428 text
5429 Simple text based output without formatting.
5430
5431 ass Formatted ASS output, subtitle pages and teletext pages are
5432 returned in different styles, subtitle pages are stripped down
5433 to text, but an effort is made to keep the text alignment and
5434 the formatting.
5435
5436 txt_left
5437 X offset of generated bitmaps, default is 0.
5438
5439 txt_top
5440 Y offset of generated bitmaps, default is 0.
5441
5442 txt_chop_spaces
5443 Chops leading and trailing spaces and removes empty lines from the
5444 generated text. This option is useful for teletext based subtitles
5445 where empty spaces may be present at the start or at the end of the
5446 lines or empty lines may be present between the subtitle lines
5447 because of double-sized teletext characters. Default value is 1.
5448
5449 txt_duration
5450 Sets the display duration of the decoded teletext pages or
5451 subtitles in milliseconds. Default value is -1 which means infinity
5452 or until the next subtitle event comes.
5453
5454 txt_transparent
5455 Force transparent background of the generated teletext bitmaps.
5456 Default value is 0 which means an opaque background.
5457
5458 txt_opacity
5459 Sets the opacity (0-255) of the teletext background. If
5460 txt_transparent is not set, it only affects characters between a
5461 start box and an end box, typically subtitles. Default value is 0
5462 if txt_transparent is set, 255 otherwise.
5463
5465 Encoders are configured elements in FFmpeg which allow the encoding of
5466 multimedia streams.
5467
5468 When you configure your FFmpeg build, all the supported native encoders
5469 are enabled by default. Encoders requiring an external library must be
5470 enabled manually via the corresponding "--enable-lib" option. You can
5471 list all available encoders using the configure option
5472 "--list-encoders".
5473
5474 You can disable all the encoders with the configure option
5475 "--disable-encoders" and selectively enable / disable single encoders
5476 with the options "--enable-encoder=ENCODER" /
5477 "--disable-encoder=ENCODER".
5478
5479 The option "-encoders" of the ff* tools will display the list of
5480 enabled encoders.
5481
5483 A description of some of the currently available audio encoders
5484 follows.
5485
5486 aac
5487 Advanced Audio Coding (AAC) encoder.
5488
5489 This encoder is the default AAC encoder, natively implemented into
5490 FFmpeg.
5491
5492 Options
5493
5494 b Set bit rate in bits/s. Setting this automatically activates
5495 constant bit rate (CBR) mode. If this option is unspecified it is
5496 set to 128kbps.
5497
5498 q Set quality for variable bit rate (VBR) mode. This option is valid
5499 only using the ffmpeg command-line tool. For library interface
5500 users, use global_quality.
5501
5502 cutoff
5503 Set cutoff frequency. If unspecified will allow the encoder to
5504 dynamically adjust the cutoff to improve clarity on low bitrates.
5505
5506 aac_coder
5507 Set AAC encoder coding method. Possible values:
5508
5509 twoloop
5510 Two loop searching (TLS) method. This is the default method.
5511
5512 This method first sets quantizers depending on band thresholds
5513 and then tries to find an optimal combination by adding or
5514 subtracting a specific value from all quantizers and adjusting
5515 some individual quantizer a little. Will tune itself based on
5516 whether aac_is, aac_ms and aac_pns are enabled.
5517
5518 anmr
5519 Average noise to mask ratio (ANMR) trellis-based solution.
5520
5521 This is an experimental coder which currently produces a lower
5522 quality, is more unstable and is slower than the default
5523 twoloop coder but has potential. Currently has no support for
5524 the aac_is or aac_pns options. Not currently recommended.
5525
5526 fast
5527 Constant quantizer method.
5528
5529 Uses a cheaper version of twoloop algorithm that doesn't try to
5530 do as many clever adjustments. Worse with low bitrates (less
5531 than 64kbps), but is better and much faster at higher bitrates.
5532
5533 aac_ms
5534 Sets mid/side coding mode. The default value of "auto" will
5535 automatically use M/S with bands which will benefit from such
5536 coding. Can be forced for all bands using the value "enable", which
5537 is mainly useful for debugging or disabled using "disable".
5538
5539 aac_is
5540 Sets intensity stereo coding tool usage. By default, it's enabled
5541 and will automatically toggle IS for similar pairs of stereo bands
5542 if it's beneficial. Can be disabled for debugging by setting the
5543 value to "disable".
5544
5545 aac_pns
5546 Uses perceptual noise substitution to replace low entropy high
5547 frequency bands with imperceptible white noise during the decoding
5548 process. By default, it's enabled, but can be disabled for
5549 debugging purposes by using "disable".
5550
5551 aac_tns
5552 Enables the use of a multitap FIR filter which spans through the
5553 high frequency bands to hide quantization noise during the encoding
5554 process and is reverted by the decoder. As well as decreasing
5555 unpleasant artifacts in the high range this also reduces the
5556 entropy in the high bands and allows for more bits to be used by
5557 the mid-low bands. By default it's enabled but can be disabled for
5558 debugging by setting the option to "disable".
5559
5560 aac_ltp
5561 Enables the use of the long term prediction extension which
5562 increases coding efficiency in very low bandwidth situations such
5563 as encoding of voice or solo piano music by extending constant
5564 harmonic peaks in bands throughout frames. This option is implied
5565 by profile:a aac_low and is incompatible with aac_pred. Use in
5566 conjunction with -ar to decrease the samplerate.
5567
5568 aac_pred
5569 Enables the use of a more traditional style of prediction where the
5570 spectral coefficients transmitted are replaced by the difference of
5571 the current coefficients minus the previous "predicted"
5572 coefficients. In theory and sometimes in practice this can improve
5573 quality for low to mid bitrate audio. This option implies the
5574 aac_main profile and is incompatible with aac_ltp.
5575
5576 profile
5577 Sets the encoding profile, possible values:
5578
5579 aac_low
5580 The default, AAC "Low-complexity" profile. Is the most
5581 compatible and produces decent quality.
5582
5583 mpeg2_aac_low
5584 Equivalent to "-profile:a aac_low -aac_pns 0". PNS was
5585 introduced with the MPEG4 specifications.
5586
5587 aac_ltp
5588 Long term prediction profile, is enabled by and will enable the
5589 aac_ltp option. Introduced in MPEG4.
5590
5591 aac_main
5592 Main-type prediction profile, is enabled by and will enable the
5593 aac_pred option. Introduced in MPEG2.
5594
5595 If this option is unspecified it is set to aac_low.
5596
5597 ac3 and ac3_fixed
5598 AC-3 audio encoders.
5599
5600 These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as
5601 well as the undocumented RealAudio 3 (a.k.a. dnet).
5602
5603 The ac3 encoder uses floating-point math, while the ac3_fixed encoder
5604 only uses fixed-point integer math. This does not mean that one is
5605 always faster, just that one or the other may be better suited to a
5606 particular system. The ac3_fixed encoder is not the default codec for
5607 any of the output formats, so it must be specified explicitly using the
5608 option "-acodec ac3_fixed" in order to use it.
5609
5610 AC-3 Metadata
5611
5612 The AC-3 metadata options are used to set parameters that describe the
5613 audio, but in most cases do not affect the audio encoding itself. Some
5614 of the options do directly affect or influence the decoding and
5615 playback of the resulting bitstream, while others are just for
5616 informational purposes. A few of the options will add bits to the
5617 output stream that could otherwise be used for audio data, and will
5618 thus affect the quality of the output. Those will be indicated
5619 accordingly with a note in the option list below.
5620
5621 These parameters are described in detail in several publicly-available
5622 documents.
5623
5624 *<<http://www.atsc.org/cms/standards/a_52-2010.pdf>>
5625 *<<http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf>>
5626 *<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf>>
5627 *<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf>>
5628
5629 Metadata Control Options
5630
5631 -per_frame_metadata boolean
5632 Allow Per-Frame Metadata. Specifies if the encoder should check for
5633 changing metadata for each frame.
5634
5635 0 The metadata values set at initialization will be used for
5636 every frame in the stream. (default)
5637
5638 1 Metadata values can be changed before encoding each frame.
5639
5640 Downmix Levels
5641
5642 -center_mixlev level
5643 Center Mix Level. The amount of gain the decoder should apply to
5644 the center channel when downmixing to stereo. This field will only
5645 be written to the bitstream if a center channel is present. The
5646 value is specified as a scale factor. There are 3 valid values:
5647
5648 0.707
5649 Apply -3dB gain
5650
5651 0.595
5652 Apply -4.5dB gain (default)
5653
5654 0.500
5655 Apply -6dB gain
5656
5657 -surround_mixlev level
5658 Surround Mix Level. The amount of gain the decoder should apply to
5659 the surround channel(s) when downmixing to stereo. This field will
5660 only be written to the bitstream if one or more surround channels
5661 are present. The value is specified as a scale factor. There are 3
5662 valid values:
5663
5664 0.707
5665 Apply -3dB gain
5666
5667 0.500
5668 Apply -6dB gain (default)
5669
5670 0.000
5671 Silence Surround Channel(s)
5672
5673 Audio Production Information
5674
5675 Audio Production Information is optional information describing the
5676 mixing environment. Either none or both of the fields are written to
5677 the bitstream.
5678
5679 -mixing_level number
5680 Mixing Level. Specifies peak sound pressure level (SPL) in the
5681 production environment when the mix was mastered. Valid values are
5682 80 to 111, or -1 for unknown or not indicated. The default value is
5683 -1, but that value cannot be used if the Audio Production
5684 Information is written to the bitstream. Therefore, if the
5685 "room_type" option is not the default value, the "mixing_level"
5686 option must not be -1.
5687
5688 -room_type type
5689 Room Type. Describes the equalization used during the final mixing
5690 session at the studio or on the dubbing stage. A large room is a
5691 dubbing stage with the industry standard X-curve equalization; a
5692 small room has flat equalization. This field will not be written
5693 to the bitstream if both the "mixing_level" option and the
5694 "room_type" option have the default values.
5695
5696 0
5697 notindicated
5698 Not Indicated (default)
5699
5700 1
5701 large
5702 Large Room
5703
5704 2
5705 small
5706 Small Room
5707
5708 Other Metadata Options
5709
5710 -copyright boolean
5711 Copyright Indicator. Specifies whether a copyright exists for this
5712 audio.
5713
5714 0
5715 off No Copyright Exists (default)
5716
5717 1
5718 on Copyright Exists
5719
5720 -dialnorm value
5721 Dialogue Normalization. Indicates how far the average dialogue
5722 level of the program is below digital 100% full scale (0 dBFS).
5723 This parameter determines a level shift during audio reproduction
5724 that sets the average volume of the dialogue to a preset level. The
5725 goal is to match volume level between program sources. A value of
5726 -31dB will result in no volume level change, relative to the source
5727 volume, during audio reproduction. Valid values are whole numbers
5728 in the range -31 to -1, with -31 being the default.
5729
5730 -dsur_mode mode
5731 Dolby Surround Mode. Specifies whether the stereo signal uses Dolby
5732 Surround (Pro Logic). This field will only be written to the
5733 bitstream if the audio stream is stereo. Using this option does NOT
5734 mean the encoder will actually apply Dolby Surround processing.
5735
5736 0
5737 notindicated
5738 Not Indicated (default)
5739
5740 1
5741 off Not Dolby Surround Encoded
5742
5743 2
5744 on Dolby Surround Encoded
5745
5746 -original boolean
5747 Original Bit Stream Indicator. Specifies whether this audio is from
5748 the original source and not a copy.
5749
5750 0
5751 off Not Original Source
5752
5753 1
5754 on Original Source (default)
5755
5756 Extended Bitstream Information
5757
5758 The extended bitstream options are part of the Alternate Bit Stream
5759 Syntax as specified in Annex D of the A/52:2010 standard. It is grouped
5760 into 2 parts. If any one parameter in a group is specified, all values
5761 in that group will be written to the bitstream. Default values are
5762 used for those that are written but have not been specified. If the
5763 mixing levels are written, the decoder will use these values instead of
5764 the ones specified in the "center_mixlev" and "surround_mixlev" options
5765 if it supports the Alternate Bit Stream Syntax.
5766
5767 Extended Bitstream Information - Part 1
5768
5769 -dmix_mode mode
5770 Preferred Stereo Downmix Mode. Allows the user to select either
5771 Lt/Rt (Dolby Surround) or Lo/Ro (normal stereo) as the preferred
5772 stereo downmix mode.
5773
5774 0
5775 notindicated
5776 Not Indicated (default)
5777
5778 1
5779 ltrt
5780 Lt/Rt Downmix Preferred
5781
5782 2
5783 loro
5784 Lo/Ro Downmix Preferred
5785
5786 -ltrt_cmixlev level
5787 Lt/Rt Center Mix Level. The amount of gain the decoder should apply
5788 to the center channel when downmixing to stereo in Lt/Rt mode.
5789
5790 1.414
5791 Apply +3dB gain
5792
5793 1.189
5794 Apply +1.5dB gain
5795
5796 1.000
5797 Apply 0dB gain
5798
5799 0.841
5800 Apply -1.5dB gain
5801
5802 0.707
5803 Apply -3.0dB gain
5804
5805 0.595
5806 Apply -4.5dB gain (default)
5807
5808 0.500
5809 Apply -6.0dB gain
5810
5811 0.000
5812 Silence Center Channel
5813
5814 -ltrt_surmixlev level
5815 Lt/Rt Surround Mix Level. The amount of gain the decoder should
5816 apply to the surround channel(s) when downmixing to stereo in Lt/Rt
5817 mode.
5818
5819 0.841
5820 Apply -1.5dB gain
5821
5822 0.707
5823 Apply -3.0dB gain
5824
5825 0.595
5826 Apply -4.5dB gain
5827
5828 0.500
5829 Apply -6.0dB gain (default)
5830
5831 0.000
5832 Silence Surround Channel(s)
5833
5834 -loro_cmixlev level
5835 Lo/Ro Center Mix Level. The amount of gain the decoder should apply
5836 to the center channel when downmixing to stereo in Lo/Ro mode.
5837
5838 1.414
5839 Apply +3dB gain
5840
5841 1.189
5842 Apply +1.5dB gain
5843
5844 1.000
5845 Apply 0dB gain
5846
5847 0.841
5848 Apply -1.5dB gain
5849
5850 0.707
5851 Apply -3.0dB gain
5852
5853 0.595
5854 Apply -4.5dB gain (default)
5855
5856 0.500
5857 Apply -6.0dB gain
5858
5859 0.000
5860 Silence Center Channel
5861
5862 -loro_surmixlev level
5863 Lo/Ro Surround Mix Level. The amount of gain the decoder should
5864 apply to the surround channel(s) when downmixing to stereo in Lo/Ro
5865 mode.
5866
5867 0.841
5868 Apply -1.5dB gain
5869
5870 0.707
5871 Apply -3.0dB gain
5872
5873 0.595
5874 Apply -4.5dB gain
5875
5876 0.500
5877 Apply -6.0dB gain (default)
5878
5879 0.000
5880 Silence Surround Channel(s)
5881
5882 Extended Bitstream Information - Part 2
5883
5884 -dsurex_mode mode
5885 Dolby Surround EX Mode. Indicates whether the stream uses Dolby
5886 Surround EX (7.1 matrixed to 5.1). Using this option does NOT mean
5887 the encoder will actually apply Dolby Surround EX processing.
5888
5889 0
5890 notindicated
5891 Not Indicated (default)
5892
5893 1
5894 on Dolby Surround EX Off
5895
5896 2
5897 off Dolby Surround EX On
5898
5899 -dheadphone_mode mode
5900 Dolby Headphone Mode. Indicates whether the stream uses Dolby
5901 Headphone encoding (multi-channel matrixed to 2.0 for use with
5902 headphones). Using this option does NOT mean the encoder will
5903 actually apply Dolby Headphone processing.
5904
5905 0
5906 notindicated
5907 Not Indicated (default)
5908
5909 1
5910 on Dolby Headphone Off
5911
5912 2
5913 off Dolby Headphone On
5914
5915 -ad_conv_type type
5916 A/D Converter Type. Indicates whether the audio has passed through
5917 HDCD A/D conversion.
5918
5919 0
5920 standard
5921 Standard A/D Converter (default)
5922
5923 1
5924 hdcd
5925 HDCD A/D Converter
5926
5927 Other AC-3 Encoding Options
5928
5929 -stereo_rematrixing boolean
5930 Stereo Rematrixing. Enables/Disables use of rematrixing for stereo
5931 input. This is an optional AC-3 feature that increases quality by
5932 selectively encoding the left/right channels as mid/side. This
5933 option is enabled by default, and it is highly recommended that it
5934 be left as enabled except for testing purposes.
5935
5936 cutoff frequency
5937 Set lowpass cutoff frequency. If unspecified, the encoder selects a
5938 default determined by various other encoding parameters.
5939
5940 Floating-Point-Only AC-3 Encoding Options
5941
5942 These options are only valid for the floating-point encoder and do not
5943 exist for the fixed-point encoder due to the corresponding features not
5944 being implemented in fixed-point.
5945
5946 -channel_coupling boolean
5947 Enables/Disables use of channel coupling, which is an optional AC-3
5948 feature that increases quality by combining high frequency
5949 information from multiple channels into a single channel. The per-
5950 channel high frequency information is sent with less accuracy in
5951 both the frequency and time domains. This allows more bits to be
5952 used for lower frequencies while preserving enough information to
5953 reconstruct the high frequencies. This option is enabled by default
5954 for the floating-point encoder and should generally be left as
5955 enabled except for testing purposes or to increase encoding speed.
5956
5957 -1
5958 auto
5959 Selected by Encoder (default)
5960
5961 0
5962 off Disable Channel Coupling
5963
5964 1
5965 on Enable Channel Coupling
5966
5967 -cpl_start_band number
5968 Coupling Start Band. Sets the channel coupling start band, from 1
5969 to 15. If a value higher than the bandwidth is used, it will be
5970 reduced to 1 less than the coupling end band. If auto is used, the
5971 start band will be determined by the encoder based on the bit rate,
5972 sample rate, and channel layout. This option has no effect if
5973 channel coupling is disabled.
5974
5975 -1
5976 auto
5977 Selected by Encoder (default)
5978
5979 flac
5980 FLAC (Free Lossless Audio Codec) Encoder
5981
5982 Options
5983
5984 The following options are supported by FFmpeg's flac encoder.
5985
5986 compression_level
5987 Sets the compression level, which chooses defaults for many other
5988 options if they are not set explicitly. Valid values are from 0 to
5989 12, 5 is the default.
5990
5991 frame_size
5992 Sets the size of the frames in samples per channel.
5993
5994 lpc_coeff_precision
5995 Sets the LPC coefficient precision, valid values are from 1 to 15,
5996 15 is the default.
5997
5998 lpc_type
5999 Sets the first stage LPC algorithm
6000
6001 none
6002 LPC is not used
6003
6004 fixed
6005 fixed LPC coefficients
6006
6007 levinson
6008 cholesky
6009 lpc_passes
6010 Number of passes to use for Cholesky factorization during LPC
6011 analysis
6012
6013 min_partition_order
6014 The minimum partition order
6015
6016 max_partition_order
6017 The maximum partition order
6018
6019 prediction_order_method
6020 estimation
6021 2level
6022 4level
6023 8level
6024 search
6025 Bruteforce search
6026
6027 log
6028 ch_mode
6029 Channel mode
6030
6031 auto
6032 The mode is chosen automatically for each frame
6033
6034 indep
6035 Channels are independently coded
6036
6037 left_side
6038 right_side
6039 mid_side
6040 exact_rice_parameters
6041 Chooses if rice parameters are calculated exactly or approximately.
6042 if set to 1 then they are chosen exactly, which slows the code down
6043 slightly and improves compression slightly.
6044
6045 multi_dim_quant
6046 Multi Dimensional Quantization. If set to 1 then a 2nd stage LPC
6047 algorithm is applied after the first stage to finetune the
6048 coefficients. This is quite slow and slightly improves compression.
6049
6050 opus
6051 Opus encoder.
6052
6053 This is a native FFmpeg encoder for the Opus format. Currently its in
6054 development and only implements the CELT part of the codec. Its quality
6055 is usually worse and at best is equal to the libopus encoder.
6056
6057 Options
6058
6059 b Set bit rate in bits/s. If unspecified it uses the number of
6060 channels and the layout to make a good guess.
6061
6062 opus_delay
6063 Sets the maximum delay in milliseconds. Lower delays than 20ms will
6064 very quickly decrease quality.
6065
6066 libfdk_aac
6067 libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
6068
6069 The libfdk-aac library is based on the Fraunhofer FDK AAC code from the
6070 Android project.
6071
6072 Requires the presence of the libfdk-aac headers and library during
6073 configuration. You need to explicitly configure the build with
6074 "--enable-libfdk-aac". The library is also incompatible with GPL, so if
6075 you allow the use of GPL, you should configure with "--enable-gpl
6076 --enable-nonfree --enable-libfdk-aac".
6077
6078 This encoder has support for the AAC-HE profiles.
6079
6080 VBR encoding, enabled through the vbr or flags +qscale options, is
6081 experimental and only works with some combinations of parameters.
6082
6083 Support for encoding 7.1 audio is only available with libfdk-aac 0.1.3
6084 or higher.
6085
6086 For more information see the fdk-aac project at
6087 <http://sourceforge.net/p/opencore-amr/fdk-aac/>.
6088
6089 Options
6090
6091 The following options are mapped on the shared FFmpeg codec options.
6092
6093 b Set bit rate in bits/s. If the bitrate is not explicitly specified,
6094 it is automatically set to a suitable value depending on the
6095 selected profile.
6096
6097 In case VBR mode is enabled the option is ignored.
6098
6099 ar Set audio sampling rate (in Hz).
6100
6101 channels
6102 Set the number of audio channels.
6103
6104 flags +qscale
6105 Enable fixed quality, VBR (Variable Bit Rate) mode. Note that VBR
6106 is implicitly enabled when the vbr value is positive.
6107
6108 cutoff
6109 Set cutoff frequency. If not specified (or explicitly set to 0) it
6110 will use a value automatically computed by the library. Default
6111 value is 0.
6112
6113 profile
6114 Set audio profile.
6115
6116 The following profiles are recognized:
6117
6118 aac_low
6119 Low Complexity AAC (LC)
6120
6121 aac_he
6122 High Efficiency AAC (HE-AAC)
6123
6124 aac_he_v2
6125 High Efficiency AAC version 2 (HE-AACv2)
6126
6127 aac_ld
6128 Low Delay AAC (LD)
6129
6130 aac_eld
6131 Enhanced Low Delay AAC (ELD)
6132
6133 If not specified it is set to aac_low.
6134
6135 The following are private options of the libfdk_aac encoder.
6136
6137 afterburner
6138 Enable afterburner feature if set to 1, disabled if set to 0. This
6139 improves the quality but also the required processing power.
6140
6141 Default value is 1.
6142
6143 eld_sbr
6144 Enable SBR (Spectral Band Replication) for ELD if set to 1,
6145 disabled if set to 0.
6146
6147 Default value is 0.
6148
6149 eld_v2
6150 Enable ELDv2 (LD-MPS extension for ELD stereo signals) for ELDv2 if
6151 set to 1, disabled if set to 0.
6152
6153 Note that option is available when fdk-aac version
6154 (AACENCODER_LIB_VL0.AACENCODER_LIB_VL1.AACENCODER_LIB_VL2) >
6155 (4.0.0).
6156
6157 Default value is 0.
6158
6159 signaling
6160 Set SBR/PS signaling style.
6161
6162 It can assume one of the following values:
6163
6164 default
6165 choose signaling implicitly (explicit hierarchical by default,
6166 implicit if global header is disabled)
6167
6168 implicit
6169 implicit backwards compatible signaling
6170
6171 explicit_sbr
6172 explicit SBR, implicit PS signaling
6173
6174 explicit_hierarchical
6175 explicit hierarchical signaling
6176
6177 Default value is default.
6178
6179 latm
6180 Output LATM/LOAS encapsulated data if set to 1, disabled if set to
6181 0.
6182
6183 Default value is 0.
6184
6185 header_period
6186 Set StreamMuxConfig and PCE repetition period (in frames) for
6187 sending in-band configuration buffers within LATM/LOAS transport
6188 layer.
6189
6190 Must be a 16-bits non-negative integer.
6191
6192 Default value is 0.
6193
6194 vbr Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
6195 good) and 5 is highest quality. A value of 0 will disable VBR, and
6196 CBR (Constant Bit Rate) is enabled.
6197
6198 Currently only the aac_low profile supports VBR encoding.
6199
6200 VBR modes 1-5 correspond to roughly the following average bit
6201 rates:
6202
6203 1 32 kbps/channel
6204
6205 2 40 kbps/channel
6206
6207 3 48-56 kbps/channel
6208
6209 4 64 kbps/channel
6210
6211 5 about 80-96 kbps/channel
6212
6213 Default value is 0.
6214
6215 Examples
6216
6217 • Use ffmpeg to convert an audio file to VBR AAC in an M4A (MP4)
6218 container:
6219
6220 ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
6221
6222 • Use ffmpeg to convert an audio file to CBR 64k kbps AAC, using the
6223 High-Efficiency AAC profile:
6224
6225 ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a
6226
6227 libmp3lame
6228 LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
6229
6230 Requires the presence of the libmp3lame headers and library during
6231 configuration. You need to explicitly configure the build with
6232 "--enable-libmp3lame".
6233
6234 See libshine for a fixed-point MP3 encoder, although with a lower
6235 quality.
6236
6237 Options
6238
6239 The following options are supported by the libmp3lame wrapper. The
6240 lame-equivalent of the options are listed in parentheses.
6241
6242 b (-b)
6243 Set bitrate expressed in bits/s for CBR or ABR. LAME "bitrate" is
6244 expressed in kilobits/s.
6245
6246 q (-V)
6247 Set constant quality setting for VBR. This option is valid only
6248 using the ffmpeg command-line tool. For library interface users,
6249 use global_quality.
6250
6251 compression_level (-q)
6252 Set algorithm quality. Valid arguments are integers in the 0-9
6253 range, with 0 meaning highest quality but slowest, and 9 meaning
6254 fastest while producing the worst quality.
6255
6256 cutoff (--lowpass)
6257 Set lowpass cutoff frequency. If unspecified, the encoder
6258 dynamically adjusts the cutoff.
6259
6260 reservoir
6261 Enable use of bit reservoir when set to 1. Default value is 1. LAME
6262 has this enabled by default, but can be overridden by use --nores
6263 option.
6264
6265 joint_stereo (-m j)
6266 Enable the encoder to use (on a frame by frame basis) either L/R
6267 stereo or mid/side stereo. Default value is 1.
6268
6269 abr (--abr)
6270 Enable the encoder to use ABR when set to 1. The lame --abr sets
6271 the target bitrate, while this options only tells FFmpeg to use ABR
6272 still relies on b to set bitrate.
6273
6274 libopencore-amrnb
6275 OpenCORE Adaptive Multi-Rate Narrowband encoder.
6276
6277 Requires the presence of the libopencore-amrnb headers and library
6278 during configuration. You need to explicitly configure the build with
6279 "--enable-libopencore-amrnb --enable-version3".
6280
6281 This is a mono-only encoder. Officially it only supports 8000Hz sample
6282 rate, but you can override it by setting strict to unofficial or lower.
6283
6284 Options
6285
6286 b Set bitrate in bits per second. Only the following bitrates are
6287 supported, otherwise libavcodec will round to the nearest valid
6288 bitrate.
6289
6290 4750
6291 5150
6292 5900
6293 6700
6294 7400
6295 7950
6296 10200
6297 12200
6298 dtx Allow discontinuous transmission (generate comfort noise) when set
6299 to 1. The default value is 0 (disabled).
6300
6301 libopus
6302 libopus Opus Interactive Audio Codec encoder wrapper.
6303
6304 Requires the presence of the libopus headers and library during
6305 configuration. You need to explicitly configure the build with
6306 "--enable-libopus".
6307
6308 Option Mapping
6309
6310 Most libopus options are modelled after the opusenc utility from opus-
6311 tools. The following is an option mapping chart describing options
6312 supported by the libopus wrapper, and their opusenc-equivalent in
6313 parentheses.
6314
6315 b (bitrate)
6316 Set the bit rate in bits/s. FFmpeg's b option is expressed in
6317 bits/s, while opusenc's bitrate in kilobits/s.
6318
6319 vbr (vbr, hard-cbr, and cvbr)
6320 Set VBR mode. The FFmpeg vbr option has the following valid
6321 arguments, with the opusenc equivalent options in parentheses:
6322
6323 off (hard-cbr)
6324 Use constant bit rate encoding.
6325
6326 on (vbr)
6327 Use variable bit rate encoding (the default).
6328
6329 constrained (cvbr)
6330 Use constrained variable bit rate encoding.
6331
6332 compression_level (comp)
6333 Set encoding algorithm complexity. Valid options are integers in
6334 the 0-10 range. 0 gives the fastest encodes but lower quality,
6335 while 10 gives the highest quality but slowest encoding. The
6336 default is 10.
6337
6338 frame_duration (framesize)
6339 Set maximum frame size, or duration of a frame in milliseconds. The
6340 argument must be exactly the following: 2.5, 5, 10, 20, 40, 60.
6341 Smaller frame sizes achieve lower latency but less quality at a
6342 given bitrate. Sizes greater than 20ms are only interesting at
6343 fairly low bitrates. The default is 20ms.
6344
6345 packet_loss (expect-loss)
6346 Set expected packet loss percentage. The default is 0.
6347
6348 fec (n/a)
6349 Enable inband forward error correction. packet_loss must be non-
6350 zero to take advantage - frequency of FEC 'side-data' is
6351 proportional to expected packet loss. Default is disabled.
6352
6353 application (N.A.)
6354 Set intended application type. Valid options are listed below:
6355
6356 voip
6357 Favor improved speech intelligibility.
6358
6359 audio
6360 Favor faithfulness to the input (the default).
6361
6362 lowdelay
6363 Restrict to only the lowest delay modes.
6364
6365 cutoff (N.A.)
6366 Set cutoff bandwidth in Hz. The argument must be exactly one of the
6367 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
6368 narrowband, mediumband, wideband, super wideband, and fullband
6369 respectively. The default is 0 (cutoff disabled).
6370
6371 mapping_family (mapping_family)
6372 Set channel mapping family to be used by the encoder. The default
6373 value of -1 uses mapping family 0 for mono and stereo inputs, and
6374 mapping family 1 otherwise. The default also disables the surround
6375 masking and LFE bandwidth optimzations in libopus, and requires
6376 that the input contains 8 channels or fewer.
6377
6378 Other values include 0 for mono and stereo, 1 for surround sound
6379 with masking and LFE bandwidth optimizations, and 255 for
6380 independent streams with an unspecified channel layout.
6381
6382 apply_phase_inv (N.A.) (requires libopus >= 1.2)
6383 If set to 0, disables the use of phase inversion for intensity
6384 stereo, improving the quality of mono downmixes, but slightly
6385 reducing normal stereo quality. The default is 1 (phase inversion
6386 enabled).
6387
6388 libshine
6389 Shine Fixed-Point MP3 encoder wrapper.
6390
6391 Shine is a fixed-point MP3 encoder. It has a far better performance on
6392 platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
6393 However, as it is more targeted on performance than quality, it is not
6394 on par with LAME and other production-grade encoders quality-wise.
6395 Also, according to the project's homepage, this encoder may not be free
6396 of bugs as the code was written a long time ago and the project was
6397 dead for at least 5 years.
6398
6399 This encoder only supports stereo and mono input. This is also CBR-
6400 only.
6401
6402 The original project (last updated in early 2007) is at
6403 <http://sourceforge.net/projects/libshine-fxp/>. We only support the
6404 updated fork by the Savonet/Liquidsoap project at
6405 <https://github.com/savonet/shine>.
6406
6407 Requires the presence of the libshine headers and library during
6408 configuration. You need to explicitly configure the build with
6409 "--enable-libshine".
6410
6411 See also libmp3lame.
6412
6413 Options
6414
6415 The following options are supported by the libshine wrapper. The
6416 shineenc-equivalent of the options are listed in parentheses.
6417
6418 b (-b)
6419 Set bitrate expressed in bits/s for CBR. shineenc -b option is
6420 expressed in kilobits/s.
6421
6422 libtwolame
6423 TwoLAME MP2 encoder wrapper.
6424
6425 Requires the presence of the libtwolame headers and library during
6426 configuration. You need to explicitly configure the build with
6427 "--enable-libtwolame".
6428
6429 Options
6430
6431 The following options are supported by the libtwolame wrapper. The
6432 twolame-equivalent options follow the FFmpeg ones and are in
6433 parentheses.
6434
6435 b (-b)
6436 Set bitrate expressed in bits/s for CBR. twolame b option is
6437 expressed in kilobits/s. Default value is 128k.
6438
6439 q (-V)
6440 Set quality for experimental VBR support. Maximum value range is
6441 from -50 to 50, useful range is from -10 to 10. The higher the
6442 value, the better the quality. This option is valid only using the
6443 ffmpeg command-line tool. For library interface users, use
6444 global_quality.
6445
6446 mode (--mode)
6447 Set the mode of the resulting audio. Possible values:
6448
6449 auto
6450 Choose mode automatically based on the input. This is the
6451 default.
6452
6453 stereo
6454 Stereo
6455
6456 joint_stereo
6457 Joint stereo
6458
6459 dual_channel
6460 Dual channel
6461
6462 mono
6463 Mono
6464
6465 psymodel (--psyc-mode)
6466 Set psychoacoustic model to use in encoding. The argument must be
6467 an integer between -1 and 4, inclusive. The higher the value, the
6468 better the quality. The default value is 3.
6469
6470 energy_levels (--energy)
6471 Enable energy levels extensions when set to 1. The default value is
6472 0 (disabled).
6473
6474 error_protection (--protect)
6475 Enable CRC error protection when set to 1. The default value is 0
6476 (disabled).
6477
6478 copyright (--copyright)
6479 Set MPEG audio copyright flag when set to 1. The default value is 0
6480 (disabled).
6481
6482 original (--original)
6483 Set MPEG audio original flag when set to 1. The default value is 0
6484 (disabled).
6485
6486 libvo-amrwbenc
6487 VisualOn Adaptive Multi-Rate Wideband encoder.
6488
6489 Requires the presence of the libvo-amrwbenc headers and library during
6490 configuration. You need to explicitly configure the build with
6491 "--enable-libvo-amrwbenc --enable-version3".
6492
6493 This is a mono-only encoder. Officially it only supports 16000Hz sample
6494 rate, but you can override it by setting strict to unofficial or lower.
6495
6496 Options
6497
6498 b Set bitrate in bits/s. Only the following bitrates are supported,
6499 otherwise libavcodec will round to the nearest valid bitrate.
6500
6501 6600
6502 8850
6503 12650
6504 14250
6505 15850
6506 18250
6507 19850
6508 23050
6509 23850
6510 dtx Allow discontinuous transmission (generate comfort noise) when set
6511 to 1. The default value is 0 (disabled).
6512
6513 libvorbis
6514 libvorbis encoder wrapper.
6515
6516 Requires the presence of the libvorbisenc headers and library during
6517 configuration. You need to explicitly configure the build with
6518 "--enable-libvorbis".
6519
6520 Options
6521
6522 The following options are supported by the libvorbis wrapper. The
6523 oggenc-equivalent of the options are listed in parentheses.
6524
6525 To get a more accurate and extensive documentation of the libvorbis
6526 options, consult the libvorbisenc's and oggenc's documentations. See
6527 <http://xiph.org/vorbis/>, <http://wiki.xiph.org/Vorbis-tools>, and
6528 oggenc(1).
6529
6530 b (-b)
6531 Set bitrate expressed in bits/s for ABR. oggenc -b is expressed in
6532 kilobits/s.
6533
6534 q (-q)
6535 Set constant quality setting for VBR. The value should be a float
6536 number in the range of -1.0 to 10.0. The higher the value, the
6537 better the quality. The default value is 3.0.
6538
6539 This option is valid only using the ffmpeg command-line tool. For
6540 library interface users, use global_quality.
6541
6542 cutoff (--advanced-encode-option lowpass_frequency=N)
6543 Set cutoff bandwidth in Hz, a value of 0 disables cutoff. oggenc's
6544 related option is expressed in kHz. The default value is 0 (cutoff
6545 disabled).
6546
6547 minrate (-m)
6548 Set minimum bitrate expressed in bits/s. oggenc -m is expressed in
6549 kilobits/s.
6550
6551 maxrate (-M)
6552 Set maximum bitrate expressed in bits/s. oggenc -M is expressed in
6553 kilobits/s. This only has effect on ABR mode.
6554
6555 iblock (--advanced-encode-option impulse_noisetune=N)
6556 Set noise floor bias for impulse blocks. The value is a float
6557 number from -15.0 to 0.0. A negative bias instructs the encoder to
6558 pay special attention to the crispness of transients in the encoded
6559 audio. The tradeoff for better transient response is a higher
6560 bitrate.
6561
6562 mjpeg
6563 Motion JPEG encoder.
6564
6565 Options
6566
6567 huffman
6568 Set the huffman encoding strategy. Possible values:
6569
6570 default
6571 Use the default huffman tables. This is the default strategy.
6572
6573 optimal
6574 Compute and use optimal huffman tables.
6575
6576 wavpack
6577 WavPack lossless audio encoder.
6578
6579 Options
6580
6581 The equivalent options for wavpack command line utility are listed in
6582 parentheses.
6583
6584 Shared options
6585
6586 The following shared options are effective for this encoder. Only
6587 special notes about this particular encoder will be documented here.
6588 For the general meaning of the options, see the Codec Options chapter.
6589
6590 frame_size (--blocksize)
6591 For this encoder, the range for this option is between 128 and
6592 131072. Default is automatically decided based on sample rate and
6593 number of channel.
6594
6595 For the complete formula of calculating default, see
6596 libavcodec/wavpackenc.c.
6597
6598 compression_level (-f, -h, -hh, and -x)
6599
6600 Private options
6601
6602 joint_stereo (-j)
6603 Set whether to enable joint stereo. Valid values are:
6604
6605 on (1)
6606 Force mid/side audio encoding.
6607
6608 off (0)
6609 Force left/right audio encoding.
6610
6611 auto
6612 Let the encoder decide automatically.
6613
6614 optimize_mono
6615 Set whether to enable optimization for mono. This option is only
6616 effective for non-mono streams. Available values:
6617
6618 on enabled
6619
6620 off disabled
6621
6623 A description of some of the currently available video encoders
6624 follows.
6625
6626 a64_multi, a64_multi5
6627 A64 / Commodore 64 multicolor charset encoder. "a64_multi5" is extended
6628 with 5th color (colram).
6629
6630 Cinepak
6631 Cinepak aka CVID encoder. Compatible with Windows 3.1 and vintage
6632 MacOS.
6633
6634 Options
6635
6636 g integer
6637 Keyframe interval. A keyframe is inserted at least every "-g"
6638 frames, sometimes sooner.
6639
6640 q:v integer
6641 Quality factor. Lower is better. Higher gives lower bitrate. The
6642 following table lists bitrates when encoding akiyo_cif.y4m for
6643 various values of "-q:v" with "-g 100":
6644
6645 "-q:v 1" 1918 kb/s
6646 "-q:v 2" 1735 kb/s
6647 "-q:v 4" 1500 kb/s
6648 "-q:v 10" 1041 kb/s
6649 "-q:v 20" 826 kb/s
6650 "-q:v 40" 553 kb/s
6651 "-q:v 100" 394 kb/s
6652 "-q:v 200" 312 kb/s
6653 "-q:v 400" 266 kb/s
6654 "-q:v 1000" 237 kb/s
6655 max_extra_cb_iterations integer
6656 Max extra codebook recalculation passes, more is better and slower.
6657
6658 skip_empty_cb boolean
6659 Avoid wasting bytes, ignore vintage MacOS decoder.
6660
6661 max_strips integer
6662 min_strips integer
6663 The minimum and maximum number of strips to use. Wider range
6664 sometimes improves quality. More strips is generally better
6665 quality but costs more bits. Fewer strips tend to yield more
6666 keyframes. Vintage compatible is 1..3.
6667
6668 strip_number_adaptivity integer
6669 How much number of strips is allowed to change between frames.
6670 Higher is better but slower.
6671
6672 GIF
6673 GIF image/animation encoder.
6674
6675 Options
6676
6677 gifflags integer
6678 Sets the flags used for GIF encoding.
6679
6680 offsetting
6681 Enables picture offsetting.
6682
6683 Default is enabled.
6684
6685 transdiff
6686 Enables transparency detection between frames.
6687
6688 Default is enabled.
6689
6690 gifimage integer
6691 Enables encoding one full GIF image per frame, rather than an
6692 animated GIF.
6693
6694 Default value is 0.
6695
6696 global_palette integer
6697 Writes a palette to the global GIF header where feasible.
6698
6699 If disabled, every frame will always have a palette written, even
6700 if there is a global palette supplied.
6701
6702 Default value is 1.
6703
6704 Hap
6705 Vidvox Hap video encoder.
6706
6707 Options
6708
6709 format integer
6710 Specifies the Hap format to encode.
6711
6712 hap
6713 hap_alpha
6714 hap_q
6715
6716 Default value is hap.
6717
6718 chunks integer
6719 Specifies the number of chunks to split frames into, between 1 and
6720 64. This permits multithreaded decoding of large frames,
6721 potentially at the cost of data-rate. The encoder may modify this
6722 value to divide frames evenly.
6723
6724 Default value is 1.
6725
6726 compressor integer
6727 Specifies the second-stage compressor to use. If set to none,
6728 chunks will be limited to 1, as chunked uncompressed frames offer
6729 no benefit.
6730
6731 none
6732 snappy
6733
6734 Default value is snappy.
6735
6736 jpeg2000
6737 The native jpeg 2000 encoder is lossy by default, the "-q:v" option can
6738 be used to set the encoding quality. Lossless encoding can be selected
6739 with "-pred 1".
6740
6741 Options
6742
6743 format integer
6744 Can be set to either "j2k" or "jp2" (the default) that makes it
6745 possible to store non-rgb pix_fmts.
6746
6747 tile_width integer
6748 Sets tile width. Range is 1 to 1073741824. Default is 256.
6749
6750 tile_height integer
6751 Sets tile height. Range is 1 to 1073741824. Default is 256.
6752
6753 pred integer
6754 Allows setting the discrete wavelet transform (DWT) type
6755
6756 dwt97int (Lossy)
6757 dwt53 (Lossless)
6758
6759 Default is "dwt97int"
6760
6761 sop boolean
6762 Enable this to add SOP marker at the start of each packet. Disabled
6763 by default.
6764
6765 eph boolean
6766 Enable this to add EPH marker at the end of each packet header.
6767 Disabled by default.
6768
6769 prog integer
6770 Sets the progression order to be used by the encoder. Possible
6771 values are:
6772
6773 lrcp
6774 rlcp
6775 rpcl
6776 pcrl
6777 cprl
6778
6779 Set to "lrcp" by default.
6780
6781 layer_rates string
6782 By default, when this option is not used, compression is done using
6783 the quality metric. This option allows for compression using
6784 compression ratio. The compression ratio for each level could be
6785 specified. The compression ratio of a layer "l" species the what
6786 ratio of total file size is contained in the first "l" layers.
6787
6788 Example usage:
6789
6790 ffmpeg -i input.bmp -c:v jpeg2000 -layer_rates "100,10,1" output.j2k
6791
6792 This would compress the image to contain 3 layers, where the data
6793 contained in the first layer would be compressed by 1000 times,
6794 compressed by 100 in the first two layers, and shall contain all
6795 data while using all 3 layers.
6796
6797 librav1e
6798 rav1e AV1 encoder wrapper.
6799
6800 Requires the presence of the rav1e headers and library during
6801 configuration. You need to explicitly configure the build with
6802 "--enable-librav1e".
6803
6804 Options
6805
6806 qmax
6807 Sets the maximum quantizer to use when using bitrate mode.
6808
6809 qmin
6810 Sets the minimum quantizer to use when using bitrate mode.
6811
6812 qp Uses quantizer mode to encode at the given quantizer (0-255).
6813
6814 speed
6815 Selects the speed preset (0-10) to encode with.
6816
6817 tiles
6818 Selects how many tiles to encode with.
6819
6820 tile-rows
6821 Selects how many rows of tiles to encode with.
6822
6823 tile-columns
6824 Selects how many columns of tiles to encode with.
6825
6826 rav1e-params
6827 Set rav1e options using a list of key=value pairs separated by ":".
6828 See rav1e --help for a list of options.
6829
6830 For example to specify librav1e encoding options with
6831 -rav1e-params:
6832
6833 ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4
6834
6835 libaom-av1
6836 libaom AV1 encoder wrapper.
6837
6838 Requires the presence of the libaom headers and library during
6839 configuration. You need to explicitly configure the build with
6840 "--enable-libaom".
6841
6842 Options
6843
6844 The wrapper supports the following standard libavcodec options:
6845
6846 b Set bitrate target in bits/second. By default this will use
6847 variable-bitrate mode. If maxrate and minrate are also set to the
6848 same value then it will use constant-bitrate mode, otherwise if crf
6849 is set as well then it will use constrained-quality mode.
6850
6851 g keyint_min
6852 Set key frame placement. The GOP size sets the maximum distance
6853 between key frames; if zero the output stream will be intra-only.
6854 The minimum distance is ignored unless it is the same as the GOP
6855 size, in which case key frames will always appear at a fixed
6856 interval. Not set by default, so without this option the library
6857 has completely free choice about where to place key frames.
6858
6859 qmin qmax
6860 Set minimum/maximum quantisation values. Valid range is from 0 to
6861 63 (warning: this does not match the quantiser values actually used
6862 by AV1 - divide by four to map real quantiser values to this
6863 range). Defaults to min/max (no constraint).
6864
6865 minrate maxrate bufsize rc_init_occupancy
6866 Set rate control buffering parameters. Not used if not set -
6867 defaults to unconstrained variable bitrate.
6868
6869 threads
6870 Set the number of threads to use while encoding. This may require
6871 the tiles or row-mt options to also be set to actually use the
6872 specified number of threads fully. Defaults to the number of
6873 hardware threads supported by the host machine.
6874
6875 profile
6876 Set the encoding profile. Defaults to using the profile which
6877 matches the bit depth and chroma subsampling of the input.
6878
6879 The wrapper also has some specific options:
6880
6881 cpu-used
6882 Set the quality/encoding speed tradeoff. Valid range is from 0 to
6883 8, higher numbers indicating greater speed and lower quality. The
6884 default value is 1, which will be slow and high quality.
6885
6886 auto-alt-ref
6887 Enable use of alternate reference frames. Defaults to the internal
6888 default of the library.
6889
6890 arnr-max-frames (frames)
6891 Set altref noise reduction max frame count. Default is -1.
6892
6893 arnr-strength (strength)
6894 Set altref noise reduction filter strength. Range is -1 to 6.
6895 Default is -1.
6896
6897 aq-mode (aq-mode)
6898 Set adaptive quantization mode. Possible values:
6899
6900 none (0)
6901 Disabled.
6902
6903 variance (1)
6904 Variance-based.
6905
6906 complexity (2)
6907 Complexity-based.
6908
6909 cyclic (3)
6910 Cyclic refresh.
6911
6912 tune (tune)
6913 Set the distortion metric the encoder is tuned with. Default is
6914 "psnr".
6915
6916 psnr (0)
6917 ssim (1)
6918 lag-in-frames
6919 Set the maximum number of frames which the encoder may keep in
6920 flight at any one time for lookahead purposes. Defaults to the
6921 internal default of the library.
6922
6923 error-resilience
6924 Enable error resilience features:
6925
6926 default
6927 Improve resilience against losses of whole frames.
6928
6929 Not enabled by default.
6930
6931 crf Set the quality/size tradeoff for constant-quality (no bitrate
6932 target) and constrained-quality (with maximum bitrate target)
6933 modes. Valid range is 0 to 63, higher numbers indicating lower
6934 quality and smaller output size. Only used if set; by default only
6935 the bitrate target is used.
6936
6937 static-thresh
6938 Set a change threshold on blocks below which they will be skipped
6939 by the encoder. Defined in arbitrary units as a nonnegative
6940 integer, defaulting to zero (no blocks are skipped).
6941
6942 drop-threshold
6943 Set a threshold for dropping frames when close to rate control
6944 bounds. Defined as a percentage of the target buffer - when the
6945 rate control buffer falls below this percentage, frames will be
6946 dropped until it has refilled above the threshold. Defaults to
6947 zero (no frames are dropped).
6948
6949 denoise-noise-level (level)
6950 Amount of noise to be removed for grain synthesis. Grain synthesis
6951 is disabled if this option is not set or set to 0.
6952
6953 denoise-block-size (pixels)
6954 Block size used for denoising for grain synthesis. If not set, AV1
6955 codec uses the default value of 32.
6956
6957 undershoot-pct (pct)
6958 Set datarate undershoot (min) percentage of the target bitrate.
6959 Range is -1 to 100. Default is -1.
6960
6961 overshoot-pct (pct)
6962 Set datarate overshoot (max) percentage of the target bitrate.
6963 Range is -1 to 1000. Default is -1.
6964
6965 minsection-pct (pct)
6966 Minimum percentage variation of the GOP bitrate from the target
6967 bitrate. If minsection-pct is not set, the libaomenc wrapper
6968 computes it as follows: "(minrate * 100 / bitrate)". Range is -1
6969 to 100. Default is -1 (unset).
6970
6971 maxsection-pct (pct)
6972 Maximum percentage variation of the GOP bitrate from the target
6973 bitrate. If maxsection-pct is not set, the libaomenc wrapper
6974 computes it as follows: "(maxrate * 100 / bitrate)". Range is -1
6975 to 5000. Default is -1 (unset).
6976
6977 frame-parallel (boolean)
6978 Enable frame parallel decodability features. Default is true.
6979
6980 tiles
6981 Set the number of tiles to encode the input video with, as columns
6982 x rows. Larger numbers allow greater parallelism in both encoding
6983 and decoding, but may decrease coding efficiency. Defaults to the
6984 minimum number of tiles required by the size of the input video
6985 (this is 1x1 (that is, a single tile) for sizes up to and including
6986 4K).
6987
6988 tile-columns tile-rows
6989 Set the number of tiles as log2 of the number of tile rows and
6990 columns. Provided for compatibility with libvpx/VP9.
6991
6992 row-mt (Requires libaom >= 1.0.0-759-g90a15f4f2)
6993 Enable row based multi-threading. Disabled by default.
6994
6995 enable-cdef (boolean)
6996 Enable Constrained Directional Enhancement Filter. The libaom-av1
6997 encoder enables CDEF by default.
6998
6999 enable-restoration (boolean)
7000 Enable Loop Restoration Filter. Default is true for libaom-av1.
7001
7002 enable-global-motion (boolean)
7003 Enable the use of global motion for block prediction. Default is
7004 true.
7005
7006 enable-intrabc (boolean)
7007 Enable block copy mode for intra block prediction. This mode is
7008 useful for screen content. Default is true.
7009
7010 enable-rect-partitions (boolean) (Requires libaom >= v2.0.0)
7011 Enable rectangular partitions. Default is true.
7012
7013 enable-1to4-partitions (boolean) (Requires libaom >= v2.0.0)
7014 Enable 1:4/4:1 partitions. Default is true.
7015
7016 enable-ab-partitions (boolean) (Requires libaom >= v2.0.0)
7017 Enable AB shape partitions. Default is true.
7018
7019 enable-angle-delta (boolean) (Requires libaom >= v2.0.0)
7020 Enable angle delta intra prediction. Default is true.
7021
7022 enable-cfl-intra (boolean) (Requires libaom >= v2.0.0)
7023 Enable chroma predicted from luma intra prediction. Default is
7024 true.
7025
7026 enable-filter-intra (boolean) (Requires libaom >= v2.0.0)
7027 Enable filter intra predictor. Default is true.
7028
7029 enable-intra-edge-filter (boolean) (Requires libaom >= v2.0.0)
7030 Enable intra edge filter. Default is true.
7031
7032 enable-smooth-intra (boolean) (Requires libaom >= v2.0.0)
7033 Enable smooth intra prediction mode. Default is true.
7034
7035 enable-paeth-intra (boolean) (Requires libaom >= v2.0.0)
7036 Enable paeth predictor in intra prediction. Default is true.
7037
7038 enable-palette (boolean) (Requires libaom >= v2.0.0)
7039 Enable palette prediction mode. Default is true.
7040
7041 enable-flip-idtx (boolean) (Requires libaom >= v2.0.0)
7042 Enable extended transform type, including FLIPADST_DCT,
7043 DCT_FLIPADST, FLIPADST_FLIPADST, ADST_FLIPADST, FLIPADST_ADST,
7044 IDTX, V_DCT, H_DCT, V_ADST, H_ADST, V_FLIPADST, H_FLIPADST. Default
7045 is true.
7046
7047 enable-tx64 (boolean) (Requires libaom >= v2.0.0)
7048 Enable 64-pt transform. Default is true.
7049
7050 reduced-tx-type-set (boolean) (Requires libaom >= v2.0.0)
7051 Use reduced set of transform types. Default is false.
7052
7053 use-intra-dct-only (boolean) (Requires libaom >= v2.0.0)
7054 Use DCT only for INTRA modes. Default is false.
7055
7056 use-inter-dct-only (boolean) (Requires libaom >= v2.0.0)
7057 Use DCT only for INTER modes. Default is false.
7058
7059 use-intra-default-tx-only (boolean) (Requires libaom >= v2.0.0)
7060 Use Default-transform only for INTRA modes. Default is false.
7061
7062 enable-ref-frame-mvs (boolean) (Requires libaom >= v2.0.0)
7063 Enable temporal mv prediction. Default is true.
7064
7065 enable-reduced-reference-set (boolean) (Requires libaom >= v2.0.0)
7066 Use reduced set of single and compound references. Default is
7067 false.
7068
7069 enable-obmc (boolean) (Requires libaom >= v2.0.0)
7070 Enable obmc. Default is true.
7071
7072 enable-dual-filter (boolean) (Requires libaom >= v2.0.0)
7073 Enable dual filter. Default is true.
7074
7075 enable-diff-wtd-comp (boolean) (Requires libaom >= v2.0.0)
7076 Enable difference-weighted compound. Default is true.
7077
7078 enable-dist-wtd-comp (boolean) (Requires libaom >= v2.0.0)
7079 Enable distance-weighted compound. Default is true.
7080
7081 enable-onesided-comp (boolean) (Requires libaom >= v2.0.0)
7082 Enable one sided compound. Default is true.
7083
7084 enable-interinter-wedge (boolean) (Requires libaom >= v2.0.0)
7085 Enable interinter wedge compound. Default is true.
7086
7087 enable-interintra-wedge (boolean) (Requires libaom >= v2.0.0)
7088 Enable interintra wedge compound. Default is true.
7089
7090 enable-masked-comp (boolean) (Requires libaom >= v2.0.0)
7091 Enable masked compound. Default is true.
7092
7093 enable-interintra-comp (boolean) (Requires libaom >= v2.0.0)
7094 Enable interintra compound. Default is true.
7095
7096 enable-smooth-interintra (boolean) (Requires libaom >= v2.0.0)
7097 Enable smooth interintra mode. Default is true.
7098
7099 aom-params
7100 Set libaom options using a list of key=value pairs separated by
7101 ":". For a list of supported options, see aomenc --help under the
7102 section "AV1 Specific Options".
7103
7104 For example to specify libaom encoding options with -aom-params:
7105
7106 ffmpeg -i input -c:v libaom-av1 -b:v 500K -aom-params tune=psnr:enable-tpl-model=1 output.mp4
7107
7108 libsvtav1
7109 SVT-AV1 encoder wrapper.
7110
7111 Requires the presence of the SVT-AV1 headers and library during
7112 configuration. You need to explicitly configure the build with
7113 "--enable-libsvtav1".
7114
7115 Options
7116
7117 profile
7118 Set the encoding profile.
7119
7120 main
7121 high
7122 professional
7123 level
7124 Set the operating point level. For example: '4.0'
7125
7126 hielevel
7127 Set the Hierarchical prediction levels.
7128
7129 3level
7130 4level
7131 This is the default.
7132
7133 tier
7134 Set the operating point tier.
7135
7136 main
7137 This is the default.
7138
7139 high
7140 qmax
7141 Set the maximum quantizer to use when using a bitrate mode.
7142
7143 qmin
7144 Set the minimum quantizer to use when using a bitrate mode.
7145
7146 crf Constant rate factor value used in crf rate control mode (0-63).
7147
7148 qp Set the quantizer used in cqp rate control mode (0-63).
7149
7150 sc_detection
7151 Enable scene change detection.
7152
7153 la_depth
7154 Set number of frames to look ahead (0-120).
7155
7156 preset
7157 Set the quality-speed tradeoff, in the range 0 to 13. Higher
7158 values are faster but lower quality.
7159
7160 tile_rows
7161 Set log2 of the number of rows of tiles to use (0-6).
7162
7163 tile_columns
7164 Set log2 of the number of columns of tiles to use (0-4).
7165
7166 svtav1-params
7167 Set SVT-AV1 options using a list of key=value pairs separated by
7168 ":". See the SVT-AV1 encoder user guide for a list of accepted
7169 parameters.
7170
7171 libjxl
7172 libjxl JPEG XL encoder wrapper.
7173
7174 Requires the presence of the libjxl headers and library during
7175 configuration. You need to explicitly configure the build with
7176 "--enable-libjxl".
7177
7178 Options
7179
7180 The libjxl wrapper supports the following options:
7181
7182 distance
7183 Set the target Butteraugli distance. This is a quality setting:
7184 lower distance yields higher quality, with distance=1.0 roughly
7185 comparable to libjpeg Quality 90 for photographic content. Setting
7186 distance=0.0 yields true lossless encoding. Valid values range
7187 between 0.0 and 15.0, and sane values rarely exceed 5.0. Setting
7188 distance=0.1 usually attains transparency for most input. The
7189 default is 1.0.
7190
7191 effort
7192 Set the encoding effort used. Higher effort values produce more
7193 consistent quality and usually produces a better quality/bpp curve,
7194 at the cost of more CPU time required. Valid values range from 1 to
7195 9, and the default is 7.
7196
7197 modular
7198 Force the encoder to use Modular mode instead of choosing
7199 automatically. The default is to use VarDCT for lossy encoding and
7200 Modular for lossless. VarDCT is generally superior to Modular for
7201 lossy encoding but does not support lossless encoding.
7202
7203 libkvazaar
7204 Kvazaar H.265/HEVC encoder.
7205
7206 Requires the presence of the libkvazaar headers and library during
7207 configuration. You need to explicitly configure the build with
7208 --enable-libkvazaar.
7209
7210 Options
7211
7212 b Set target video bitrate in bit/s and enable rate control.
7213
7214 kvazaar-params
7215 Set kvazaar parameters as a list of name=value pairs separated by
7216 commas (,). See kvazaar documentation for a list of options.
7217
7218 libopenh264
7219 Cisco libopenh264 H.264/MPEG-4 AVC encoder wrapper.
7220
7221 This encoder requires the presence of the libopenh264 headers and
7222 library during configuration. You need to explicitly configure the
7223 build with "--enable-libopenh264". The library is detected using pkg-
7224 config.
7225
7226 For more information about the library see <http://www.openh264.org>.
7227
7228 Options
7229
7230 The following FFmpeg global options affect the configurations of the
7231 libopenh264 encoder.
7232
7233 b Set the bitrate (as a number of bits per second).
7234
7235 g Set the GOP size.
7236
7237 maxrate
7238 Set the max bitrate (as a number of bits per second).
7239
7240 flags +global_header
7241 Set global header in the bitstream.
7242
7243 slices
7244 Set the number of slices, used in parallelized encoding. Default
7245 value is 0. This is only used when slice_mode is set to fixed.
7246
7247 loopfilter
7248 Enable loop filter, if set to 1 (automatically enabled). To disable
7249 set a value of 0.
7250
7251 profile
7252 Set profile restrictions. If set to the value of main enable CABAC
7253 (set the "SEncParamExt.iEntropyCodingModeFlag" flag to 1).
7254
7255 max_nal_size
7256 Set maximum NAL size in bytes.
7257
7258 allow_skip_frames
7259 Allow skipping frames to hit the target bitrate if set to 1.
7260
7261 libtheora
7262 libtheora Theora encoder wrapper.
7263
7264 Requires the presence of the libtheora headers and library during
7265 configuration. You need to explicitly configure the build with
7266 "--enable-libtheora".
7267
7268 For more information about the libtheora project see
7269 <http://www.theora.org/>.
7270
7271 Options
7272
7273 The following global options are mapped to internal libtheora options
7274 which affect the quality and the bitrate of the encoded stream.
7275
7276 b Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode.
7277 In case VBR (Variable Bit Rate) mode is enabled this option is
7278 ignored.
7279
7280 flags
7281 Used to enable constant quality mode (VBR) encoding through the
7282 qscale flag, and to enable the "pass1" and "pass2" modes.
7283
7284 g Set the GOP size.
7285
7286 global_quality
7287 Set the global quality as an integer in lambda units.
7288
7289 Only relevant when VBR mode is enabled with "flags +qscale". The
7290 value is converted to QP units by dividing it by "FF_QP2LAMBDA",
7291 clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
7292 value in the native libtheora range [0-63]. A higher value
7293 corresponds to a higher quality.
7294
7295 q Enable VBR mode when set to a non-negative value, and set constant
7296 quality value as a double floating point value in QP units.
7297
7298 The value is clipped in the [0-10] range, and then multiplied by
7299 6.3 to get a value in the native libtheora range [0-63].
7300
7301 This option is valid only using the ffmpeg command-line tool. For
7302 library interface users, use global_quality.
7303
7304 Examples
7305
7306 • Set maximum constant quality (VBR) encoding with ffmpeg:
7307
7308 ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
7309
7310 • Use ffmpeg to convert a CBR 1000 kbps Theora video stream:
7311
7312 ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
7313
7314 libvpx
7315 VP8/VP9 format supported through libvpx.
7316
7317 Requires the presence of the libvpx headers and library during
7318 configuration. You need to explicitly configure the build with
7319 "--enable-libvpx".
7320
7321 Options
7322
7323 The following options are supported by the libvpx wrapper. The
7324 vpxenc-equivalent options or values are listed in parentheses for easy
7325 migration.
7326
7327 To reduce the duplication of documentation, only the private options
7328 and some others requiring special attention are documented here. For
7329 the documentation of the undocumented generic options, see the Codec
7330 Options chapter.
7331
7332 To get more documentation of the libvpx options, invoke the command
7333 ffmpeg -h encoder=libvpx, ffmpeg -h encoder=libvpx-vp9 or vpxenc
7334 --help. Further information is available in the libvpx API
7335 documentation.
7336
7337 b (target-bitrate)
7338 Set bitrate in bits/s. Note that FFmpeg's b option is expressed in
7339 bits/s, while vpxenc's target-bitrate is in kilobits/s.
7340
7341 g (kf-max-dist)
7342 keyint_min (kf-min-dist)
7343 qmin (min-q)
7344 Minimum (Best Quality) Quantizer.
7345
7346 qmax (max-q)
7347 Maximum (Worst Quality) Quantizer. Can be changed per-frame.
7348
7349 bufsize (buf-sz, buf-optimal-sz)
7350 Set ratecontrol buffer size (in bits). Note vpxenc's options are
7351 specified in milliseconds, the libvpx wrapper converts this value
7352 as follows: "buf-sz = bufsize * 1000 / bitrate", "buf-optimal-sz =
7353 bufsize * 1000 / bitrate * 5 / 6".
7354
7355 rc_init_occupancy (buf-initial-sz)
7356 Set number of bits which should be loaded into the rc buffer before
7357 decoding starts. Note vpxenc's option is specified in milliseconds,
7358 the libvpx wrapper converts this value as follows:
7359 "rc_init_occupancy * 1000 / bitrate".
7360
7361 undershoot-pct
7362 Set datarate undershoot (min) percentage of the target bitrate.
7363
7364 overshoot-pct
7365 Set datarate overshoot (max) percentage of the target bitrate.
7366
7367 skip_threshold (drop-frame)
7368 qcomp (bias-pct)
7369 maxrate (maxsection-pct)
7370 Set GOP max bitrate in bits/s. Note vpxenc's option is specified as
7371 a percentage of the target bitrate, the libvpx wrapper converts
7372 this value as follows: "(maxrate * 100 / bitrate)".
7373
7374 minrate (minsection-pct)
7375 Set GOP min bitrate in bits/s. Note vpxenc's option is specified as
7376 a percentage of the target bitrate, the libvpx wrapper converts
7377 this value as follows: "(minrate * 100 / bitrate)".
7378
7379 minrate, maxrate, b end-usage=cbr
7380 "(minrate == maxrate == bitrate)".
7381
7382 crf (end-usage=cq, cq-level)
7383 tune (tune)
7384 psnr (psnr)
7385 ssim (ssim)
7386 quality, deadline (deadline)
7387 best
7388 Use best quality deadline. Poorly named and quite slow, this
7389 option should be avoided as it may give worse quality output
7390 than good.
7391
7392 good
7393 Use good quality deadline. This is a good trade-off between
7394 speed and quality when used with the cpu-used option.
7395
7396 realtime
7397 Use realtime quality deadline.
7398
7399 speed, cpu-used (cpu-used)
7400 Set quality/speed ratio modifier. Higher values speed up the encode
7401 at the cost of quality.
7402
7403 nr (noise-sensitivity)
7404 static-thresh
7405 Set a change threshold on blocks below which they will be skipped
7406 by the encoder.
7407
7408 slices (token-parts)
7409 Note that FFmpeg's slices option gives the total number of
7410 partitions, while vpxenc's token-parts is given as
7411 log2(partitions).
7412
7413 max-intra-rate
7414 Set maximum I-frame bitrate as a percentage of the target bitrate.
7415 A value of 0 means unlimited.
7416
7417 force_key_frames
7418 "VPX_EFLAG_FORCE_KF"
7419
7420 Alternate reference frame related
7421 auto-alt-ref
7422 Enable use of alternate reference frames (2-pass only). Values
7423 greater than 1 enable multi-layer alternate reference frames
7424 (VP9 only).
7425
7426 arnr-maxframes
7427 Set altref noise reduction max frame count.
7428
7429 arnr-type
7430 Set altref noise reduction filter type: backward, forward,
7431 centered.
7432
7433 arnr-strength
7434 Set altref noise reduction filter strength.
7435
7436 rc-lookahead, lag-in-frames (lag-in-frames)
7437 Set number of frames to look ahead for frametype and
7438 ratecontrol.
7439
7440 min-gf-interval
7441 Set minimum golden/alternate reference frame interval (VP9
7442 only).
7443
7444 error-resilient
7445 Enable error resiliency features.
7446
7447 sharpness integer
7448 Increase sharpness at the expense of lower PSNR. The valid range
7449 is [0, 7].
7450
7451 ts-parameters
7452 Sets the temporal scalability configuration using a :-separated
7453 list of key=value pairs. For example, to specify temporal
7454 scalability parameters with "ffmpeg":
7455
7456 ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
7457 ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
7458 ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
7459
7460 Below is a brief explanation of each of the parameters, please
7461 refer to "struct vpx_codec_enc_cfg" in "vpx/vpx_encoder.h" for more
7462 details.
7463
7464 ts_number_layers
7465 Number of temporal coding layers.
7466
7467 ts_target_bitrate
7468 Target bitrate for each temporal layer (in kbps). (bitrate
7469 should be inclusive of the lower temporal layer).
7470
7471 ts_rate_decimator
7472 Frame rate decimation factor for each temporal layer.
7473
7474 ts_periodicity
7475 Length of the sequence defining frame temporal layer
7476 membership.
7477
7478 ts_layer_id
7479 Template defining the membership of frames to temporal layers.
7480
7481 ts_layering_mode
7482 (optional) Selecting the temporal structure from a set of pre-
7483 defined temporal layering modes. Currently supports the
7484 following options.
7485
7486 0 No temporal layering flags are provided internally, relies
7487 on flags being passed in using "metadata" field in
7488 "AVFrame" with following keys.
7489
7490 vp8-flags
7491 Sets the flags passed into the encoder to indicate the
7492 referencing scheme for the current frame. Refer to
7493 function "vpx_codec_encode" in "vpx/vpx_encoder.h" for
7494 more details.
7495
7496 temporal_id
7497 Explicitly sets the temporal id of the current frame to
7498 encode.
7499
7500 2 Two temporal layers. 0-1...
7501
7502 3 Three temporal layers. 0-2-1-2...; with single reference
7503 frame.
7504
7505 4 Same as option "3", except there is a dependency between
7506 the two temporal layer 2 frames within the temporal period.
7507
7508 VP9-specific options
7509 lossless
7510 Enable lossless mode.
7511
7512 tile-columns
7513 Set number of tile columns to use. Note this is given as
7514 log2(tile_columns). For example, 8 tile columns would be
7515 requested by setting the tile-columns option to 3.
7516
7517 tile-rows
7518 Set number of tile rows to use. Note this is given as
7519 log2(tile_rows). For example, 4 tile rows would be requested
7520 by setting the tile-rows option to 2.
7521
7522 frame-parallel
7523 Enable frame parallel decodability features.
7524
7525 aq-mode
7526 Set adaptive quantization mode (0: off (default), 1: variance
7527 2: complexity, 3: cyclic refresh, 4: equator360).
7528
7529 colorspace color-space
7530 Set input color space. The VP9 bitstream supports signaling the
7531 following colorspaces:
7532
7533 rgb sRGB
7534 bt709 bt709
7535 unspecified unknown
7536 bt470bg bt601
7537 smpte170m smpte170
7538 smpte240m smpte240
7539 bt2020_ncl bt2020
7540 row-mt boolean
7541 Enable row based multi-threading.
7542
7543 tune-content
7544 Set content type: default (0), screen (1), film (2).
7545
7546 corpus-complexity
7547 Corpus VBR mode is a variant of standard VBR where the
7548 complexity distribution midpoint is passed in rather than
7549 calculated for a specific clip or chunk.
7550
7551 The valid range is [0, 10000]. 0 (default) uses standard VBR.
7552
7553 enable-tpl boolean
7554 Enable temporal dependency model.
7555
7556 ref-frame-config
7557 Using per-frame metadata, set members of the structure
7558 "vpx_svc_ref_frame_config_t" in "vpx/vp8cx.h" to fine-control
7559 referencing schemes and frame buffer management. Use a
7560 :-separated list of key=value pairs. For example,
7561
7562 av_dict_set(&av_frame->metadata, "ref-frame-config", \
7563 "rfc_update_buffer_slot=7:rfc_lst_fb_idx=0:rfc_gld_fb_idx=1:rfc_alt_fb_idx=2:rfc_reference_last=0:rfc_reference_golden=0:rfc_reference_alt_ref=0");
7564
7565 rfc_update_buffer_slot
7566 Indicates the buffer slot number to update
7567
7568 rfc_update_last
7569 Indicates whether to update the LAST frame
7570
7571 rfc_update_golden
7572 Indicates whether to update GOLDEN frame
7573
7574 rfc_update_alt_ref
7575 Indicates whether to update ALT_REF frame
7576
7577 rfc_lst_fb_idx
7578 LAST frame buffer index
7579
7580 rfc_gld_fb_idx
7581 GOLDEN frame buffer index
7582
7583 rfc_alt_fb_idx
7584 ALT_REF frame buffer index
7585
7586 rfc_reference_last
7587 Indicates whether to reference LAST frame
7588
7589 rfc_reference_golden
7590 Indicates whether to reference GOLDEN frame
7591
7592 rfc_reference_alt_ref
7593 Indicates whether to reference ALT_REF frame
7594
7595 rfc_reference_duration
7596 Indicates frame duration
7597
7598 For more information about libvpx see: <http://www.webmproject.org/>
7599
7600 libwebp
7601 libwebp WebP Image encoder wrapper
7602
7603 libwebp is Google's official encoder for WebP images. It can encode in
7604 either lossy or lossless mode. Lossy images are essentially a wrapper
7605 around a VP8 frame. Lossless images are a separate codec developed by
7606 Google.
7607
7608 Pixel Format
7609
7610 Currently, libwebp only supports YUV420 for lossy and RGB for lossless
7611 due to limitations of the format and libwebp. Alpha is supported for
7612 either mode. Because of API limitations, if RGB is passed in when
7613 encoding lossy or YUV is passed in for encoding lossless, the pixel
7614 format will automatically be converted using functions from libwebp.
7615 This is not ideal and is done only for convenience.
7616
7617 Options
7618
7619 -lossless boolean
7620 Enables/Disables use of lossless mode. Default is 0.
7621
7622 -compression_level integer
7623 For lossy, this is a quality/speed tradeoff. Higher values give
7624 better quality for a given size at the cost of increased encoding
7625 time. For lossless, this is a size/speed tradeoff. Higher values
7626 give smaller size at the cost of increased encoding time. More
7627 specifically, it controls the number of extra algorithms and
7628 compression tools used, and varies the combination of these tools.
7629 This maps to the method option in libwebp. The valid range is 0 to
7630 6. Default is 4.
7631
7632 -quality float
7633 For lossy encoding, this controls image quality. For lossless
7634 encoding, this controls the effort and time spent in compression.
7635 Range is 0 to 100. Default is 75.
7636
7637 -preset type
7638 Configuration preset. This does some automatic settings based on
7639 the general type of the image.
7640
7641 none
7642 Do not use a preset.
7643
7644 default
7645 Use the encoder default.
7646
7647 picture
7648 Digital picture, like portrait, inner shot
7649
7650 photo
7651 Outdoor photograph, with natural lighting
7652
7653 drawing
7654 Hand or line drawing, with high-contrast details
7655
7656 icon
7657 Small-sized colorful images
7658
7659 text
7660 Text-like
7661
7662 libx264, libx264rgb
7663 x264 H.264/MPEG-4 AVC encoder wrapper.
7664
7665 This encoder requires the presence of the libx264 headers and library
7666 during configuration. You need to explicitly configure the build with
7667 "--enable-libx264".
7668
7669 libx264 supports an impressive number of features, including 8x8 and
7670 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
7671 entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
7672 for detail retention (adaptive quantization, psy-RD, psy-trellis).
7673
7674 Many libx264 encoder options are mapped to FFmpeg global codec options,
7675 while unique encoder options are provided through private options.
7676 Additionally the x264opts and x264-params private options allows one to
7677 pass a list of key=value tuples as accepted by the libx264
7678 "x264_param_parse" function.
7679
7680 The x264 project website is at
7681 <http://www.videolan.org/developers/x264.html>.
7682
7683 The libx264rgb encoder is the same as libx264, except it accepts packed
7684 RGB pixel formats as input instead of YUV.
7685
7686 Supported Pixel Formats
7687
7688 x264 supports 8- to 10-bit color spaces. The exact bit depth is
7689 controlled at x264's configure time.
7690
7691 Options
7692
7693 The following options are supported by the libx264 wrapper. The
7694 x264-equivalent options or values are listed in parentheses for easy
7695 migration.
7696
7697 To reduce the duplication of documentation, only the private options
7698 and some others requiring special attention are documented here. For
7699 the documentation of the undocumented generic options, see the Codec
7700 Options chapter.
7701
7702 To get a more accurate and extensive documentation of the libx264
7703 options, invoke the command x264 --fullhelp or consult the libx264
7704 documentation.
7705
7706 b (bitrate)
7707 Set bitrate in bits/s. Note that FFmpeg's b option is expressed in
7708 bits/s, while x264's bitrate is in kilobits/s.
7709
7710 bf (bframes)
7711 g (keyint)
7712 qmin (qpmin)
7713 Minimum quantizer scale.
7714
7715 qmax (qpmax)
7716 Maximum quantizer scale.
7717
7718 qdiff (qpstep)
7719 Maximum difference between quantizer scales.
7720
7721 qblur (qblur)
7722 Quantizer curve blur
7723
7724 qcomp (qcomp)
7725 Quantizer curve compression factor
7726
7727 refs (ref)
7728 Number of reference frames each P-frame can use. The range is from
7729 0-16.
7730
7731 sc_threshold (scenecut)
7732 Sets the threshold for the scene change detection.
7733
7734 trellis (trellis)
7735 Performs Trellis quantization to increase efficiency. Enabled by
7736 default.
7737
7738 nr (nr)
7739 me_range (merange)
7740 Maximum range of the motion search in pixels.
7741
7742 me_method (me)
7743 Set motion estimation method. Possible values in the decreasing
7744 order of speed:
7745
7746 dia (dia)
7747 epzs (dia)
7748 Diamond search with radius 1 (fastest). epzs is an alias for
7749 dia.
7750
7751 hex (hex)
7752 Hexagonal search with radius 2.
7753
7754 umh (umh)
7755 Uneven multi-hexagon search.
7756
7757 esa (esa)
7758 Exhaustive search.
7759
7760 tesa (tesa)
7761 Hadamard exhaustive search (slowest).
7762
7763 forced-idr
7764 Normally, when forcing a I-frame type, the encoder can select any
7765 type of I-frame. This option forces it to choose an IDR-frame.
7766
7767 subq (subme)
7768 Sub-pixel motion estimation method.
7769
7770 b_strategy (b-adapt)
7771 Adaptive B-frame placement decision algorithm. Use only on first-
7772 pass.
7773
7774 keyint_min (min-keyint)
7775 Minimum GOP size.
7776
7777 coder
7778 Set entropy encoder. Possible values:
7779
7780 ac Enable CABAC.
7781
7782 vlc Enable CAVLC and disable CABAC. It generates the same effect as
7783 x264's --no-cabac option.
7784
7785 cmp Set full pixel motion estimation comparison algorithm. Possible
7786 values:
7787
7788 chroma
7789 Enable chroma in motion estimation.
7790
7791 sad Ignore chroma in motion estimation. It generates the same
7792 effect as x264's --no-chroma-me option.
7793
7794 threads (threads)
7795 Number of encoding threads.
7796
7797 thread_type
7798 Set multithreading technique. Possible values:
7799
7800 slice
7801 Slice-based multithreading. It generates the same effect as
7802 x264's --sliced-threads option.
7803
7804 frame
7805 Frame-based multithreading.
7806
7807 flags
7808 Set encoding flags. It can be used to disable closed GOP and enable
7809 open GOP by setting it to "-cgop". The result is similar to the
7810 behavior of x264's --open-gop option.
7811
7812 rc_init_occupancy (vbv-init)
7813 preset (preset)
7814 Set the encoding preset.
7815
7816 tune (tune)
7817 Set tuning of the encoding params.
7818
7819 profile (profile)
7820 Set profile restrictions.
7821
7822 fastfirstpass
7823 Enable fast settings when encoding first pass, when set to 1. When
7824 set to 0, it has the same effect of x264's --slow-firstpass option.
7825
7826 crf (crf)
7827 Set the quality for constant quality mode.
7828
7829 crf_max (crf-max)
7830 In CRF mode, prevents VBV from lowering quality beyond this point.
7831
7832 qp (qp)
7833 Set constant quantization rate control method parameter.
7834
7835 aq-mode (aq-mode)
7836 Set AQ method. Possible values:
7837
7838 none (0)
7839 Disabled.
7840
7841 variance (1)
7842 Variance AQ (complexity mask).
7843
7844 autovariance (2)
7845 Auto-variance AQ (experimental).
7846
7847 aq-strength (aq-strength)
7848 Set AQ strength, reduce blocking and blurring in flat and textured
7849 areas.
7850
7851 psy Use psychovisual optimizations when set to 1. When set to 0, it has
7852 the same effect as x264's --no-psy option.
7853
7854 psy-rd (psy-rd)
7855 Set strength of psychovisual optimization, in psy-rd:psy-trellis
7856 format.
7857
7858 rc-lookahead (rc-lookahead)
7859 Set number of frames to look ahead for frametype and ratecontrol.
7860
7861 weightb
7862 Enable weighted prediction for B-frames when set to 1. When set to
7863 0, it has the same effect as x264's --no-weightb option.
7864
7865 weightp (weightp)
7866 Set weighted prediction method for P-frames. Possible values:
7867
7868 none (0)
7869 Disabled
7870
7871 simple (1)
7872 Enable only weighted refs
7873
7874 smart (2)
7875 Enable both weighted refs and duplicates
7876
7877 ssim (ssim)
7878 Enable calculation and printing SSIM stats after the encoding.
7879
7880 intra-refresh (intra-refresh)
7881 Enable the use of Periodic Intra Refresh instead of IDR frames when
7882 set to 1.
7883
7884 avcintra-class (class)
7885 Configure the encoder to generate AVC-Intra. Valid values are
7886 50,100 and 200
7887
7888 bluray-compat (bluray-compat)
7889 Configure the encoder to be compatible with the bluray standard.
7890 It is a shorthand for setting "bluray-compat=1 force-cfr=1".
7891
7892 b-bias (b-bias)
7893 Set the influence on how often B-frames are used.
7894
7895 b-pyramid (b-pyramid)
7896 Set method for keeping of some B-frames as references. Possible
7897 values:
7898
7899 none (none)
7900 Disabled.
7901
7902 strict (strict)
7903 Strictly hierarchical pyramid.
7904
7905 normal (normal)
7906 Non-strict (not Blu-ray compatible).
7907
7908 mixed-refs
7909 Enable the use of one reference per partition, as opposed to one
7910 reference per macroblock when set to 1. When set to 0, it has the
7911 same effect as x264's --no-mixed-refs option.
7912
7913 8x8dct
7914 Enable adaptive spatial transform (high profile 8x8 transform) when
7915 set to 1. When set to 0, it has the same effect as x264's
7916 --no-8x8dct option.
7917
7918 fast-pskip
7919 Enable early SKIP detection on P-frames when set to 1. When set to
7920 0, it has the same effect as x264's --no-fast-pskip option.
7921
7922 aud (aud)
7923 Enable use of access unit delimiters when set to 1.
7924
7925 mbtree
7926 Enable use macroblock tree ratecontrol when set to 1. When set to
7927 0, it has the same effect as x264's --no-mbtree option.
7928
7929 deblock (deblock)
7930 Set loop filter parameters, in alpha:beta form.
7931
7932 cplxblur (cplxblur)
7933 Set fluctuations reduction in QP (before curve compression).
7934
7935 partitions (partitions)
7936 Set partitions to consider as a comma-separated list of. Possible
7937 values in the list:
7938
7939 p8x8
7940 8x8 P-frame partition.
7941
7942 p4x4
7943 4x4 P-frame partition.
7944
7945 b8x8
7946 4x4 B-frame partition.
7947
7948 i8x8
7949 8x8 I-frame partition.
7950
7951 i4x4
7952 4x4 I-frame partition. (Enabling p4x4 requires p8x8 to be
7953 enabled. Enabling i8x8 requires adaptive spatial transform
7954 (8x8dct option) to be enabled.)
7955
7956 none (none)
7957 Do not consider any partitions.
7958
7959 all (all)
7960 Consider every partition.
7961
7962 direct-pred (direct)
7963 Set direct MV prediction mode. Possible values:
7964
7965 none (none)
7966 Disable MV prediction.
7967
7968 spatial (spatial)
7969 Enable spatial predicting.
7970
7971 temporal (temporal)
7972 Enable temporal predicting.
7973
7974 auto (auto)
7975 Automatically decided.
7976
7977 slice-max-size (slice-max-size)
7978 Set the limit of the size of each slice in bytes. If not specified
7979 but RTP payload size (ps) is specified, that is used.
7980
7981 stats (stats)
7982 Set the file name for multi-pass stats.
7983
7984 nal-hrd (nal-hrd)
7985 Set signal HRD information (requires vbv-bufsize to be set).
7986 Possible values:
7987
7988 none (none)
7989 Disable HRD information signaling.
7990
7991 vbr (vbr)
7992 Variable bit rate.
7993
7994 cbr (cbr)
7995 Constant bit rate (not allowed in MP4 container).
7996
7997 x264opts (N.A.)
7998 Set any x264 option, see x264 --fullhelp for a list.
7999
8000 Argument is a list of key=value couples separated by ":". In filter
8001 and psy-rd options that use ":" as a separator themselves, use ","
8002 instead. They accept it as well since long ago but this is kept
8003 undocumented for some reason.
8004
8005 For example to specify libx264 encoding options with ffmpeg:
8006
8007 ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
8008
8009 a53cc boolean
8010 Import closed captions (which must be ATSC compatible format) into
8011 output. Only the mpeg2 and h264 decoders provide these. Default is
8012 1 (on).
8013
8014 udu_sei boolean
8015 Import user data unregistered SEI if available into output. Default
8016 is 0 (off).
8017
8018 x264-params (N.A.)
8019 Override the x264 configuration using a :-separated list of
8020 key=value parameters.
8021
8022 This option is functionally the same as the x264opts, but is
8023 duplicated for compatibility with the Libav fork.
8024
8025 For example to specify libx264 encoding options with ffmpeg:
8026
8027 ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
8028 cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
8029 no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
8030
8031 Encoding ffpresets for common usages are provided so they can be used
8032 with the general presets system (e.g. passing the pre option).
8033
8034 libx265
8035 x265 H.265/HEVC encoder wrapper.
8036
8037 This encoder requires the presence of the libx265 headers and library
8038 during configuration. You need to explicitly configure the build with
8039 --enable-libx265.
8040
8041 Options
8042
8043 b Sets target video bitrate.
8044
8045 bf
8046 g Set the GOP size.
8047
8048 keyint_min
8049 Minimum GOP size.
8050
8051 refs
8052 Number of reference frames each P-frame can use. The range is from
8053 1-16.
8054
8055 preset
8056 Set the x265 preset.
8057
8058 tune
8059 Set the x265 tune parameter.
8060
8061 profile
8062 Set profile restrictions.
8063
8064 crf Set the quality for constant quality mode.
8065
8066 qp Set constant quantization rate control method parameter.
8067
8068 qmin
8069 Minimum quantizer scale.
8070
8071 qmax
8072 Maximum quantizer scale.
8073
8074 qdiff
8075 Maximum difference between quantizer scales.
8076
8077 qblur
8078 Quantizer curve blur
8079
8080 qcomp
8081 Quantizer curve compression factor
8082
8083 i_qfactor
8084 b_qfactor
8085 forced-idr
8086 Normally, when forcing a I-frame type, the encoder can select any
8087 type of I-frame. This option forces it to choose an IDR-frame.
8088
8089 udu_sei boolean
8090 Import user data unregistered SEI if available into output. Default
8091 is 0 (off).
8092
8093 x265-params
8094 Set x265 options using a list of key=value couples separated by
8095 ":". See x265 --help for a list of options.
8096
8097 For example to specify libx265 encoding options with -x265-params:
8098
8099 ffmpeg -i input -c:v libx265 -x265-params crf=26:psy-rd=1 output.mp4
8100
8101 libxavs2
8102 xavs2 AVS2-P2/IEEE1857.4 encoder wrapper.
8103
8104 This encoder requires the presence of the libxavs2 headers and library
8105 during configuration. You need to explicitly configure the build with
8106 --enable-libxavs2.
8107
8108 The following standard libavcodec options are used:
8109
8110 • b / bit_rate
8111
8112 • g / gop_size
8113
8114 • bf / max_b_frames
8115
8116 The encoder also has its own specific options:
8117
8118 Options
8119
8120 lcu_row_threads
8121 Set the number of parallel threads for rows from 1 to 8 (default
8122 5).
8123
8124 initial_qp
8125 Set the xavs2 quantization parameter from 1 to 63 (default 34).
8126 This is used to set the initial qp for the first frame.
8127
8128 qp Set the xavs2 quantization parameter from 1 to 63 (default 34).
8129 This is used to set the qp value under constant-QP mode.
8130
8131 max_qp
8132 Set the max qp for rate control from 1 to 63 (default 55).
8133
8134 min_qp
8135 Set the min qp for rate control from 1 to 63 (default 20).
8136
8137 speed_level
8138 Set the Speed level from 0 to 9 (default 0). Higher is better but
8139 slower.
8140
8141 log_level
8142 Set the log level from -1 to 3 (default 0). -1: none, 0: error, 1:
8143 warning, 2: info, 3: debug.
8144
8145 xavs2-params
8146 Set xavs2 options using a list of key=value couples separated by
8147 ":".
8148
8149 For example to specify libxavs2 encoding options with
8150 -xavs2-params:
8151
8152 ffmpeg -i input -c:v libxavs2 -xavs2-params RdoqLevel=0 output.avs2
8153
8154 libxvid
8155 Xvid MPEG-4 Part 2 encoder wrapper.
8156
8157 This encoder requires the presence of the libxvidcore headers and
8158 library during configuration. You need to explicitly configure the
8159 build with "--enable-libxvid --enable-gpl".
8160
8161 The native "mpeg4" encoder supports the MPEG-4 Part 2 format, so users
8162 can encode to this format without this library.
8163
8164 Options
8165
8166 The following options are supported by the libxvid wrapper. Some of the
8167 following options are listed but are not documented, and correspond to
8168 shared codec options. See the Codec Options chapter for their
8169 documentation. The other shared options which are not listed have no
8170 effect for the libxvid encoder.
8171
8172 b
8173 g
8174 qmin
8175 qmax
8176 mpeg_quant
8177 threads
8178 bf
8179 b_qfactor
8180 b_qoffset
8181 flags
8182 Set specific encoding flags. Possible values:
8183
8184 mv4 Use four motion vector by macroblock.
8185
8186 aic Enable high quality AC prediction.
8187
8188 gray
8189 Only encode grayscale.
8190
8191 gmc Enable the use of global motion compensation (GMC).
8192
8193 qpel
8194 Enable quarter-pixel motion compensation.
8195
8196 cgop
8197 Enable closed GOP.
8198
8199 global_header
8200 Place global headers in extradata instead of every keyframe.
8201
8202 trellis
8203 me_method
8204 Set motion estimation method. Possible values in decreasing order
8205 of speed and increasing order of quality:
8206
8207 zero
8208 Use no motion estimation (default).
8209
8210 phods
8211 x1
8212 log Enable advanced diamond zonal search for 16x16 blocks and half-
8213 pixel refinement for 16x16 blocks. x1 and log are aliases for
8214 phods.
8215
8216 epzs
8217 Enable all of the things described above, plus advanced diamond
8218 zonal search for 8x8 blocks, half-pixel refinement for 8x8
8219 blocks, and motion estimation on chroma planes.
8220
8221 full
8222 Enable all of the things described above, plus extended 16x16
8223 and 8x8 blocks search.
8224
8225 mbd Set macroblock decision algorithm. Possible values in the
8226 increasing order of quality:
8227
8228 simple
8229 Use macroblock comparing function algorithm (default).
8230
8231 bits
8232 Enable rate distortion-based half pixel and quarter pixel
8233 refinement for 16x16 blocks.
8234
8235 rd Enable all of the things described above, plus rate distortion-
8236 based half pixel and quarter pixel refinement for 8x8 blocks,
8237 and rate distortion-based search using square pattern.
8238
8239 lumi_aq
8240 Enable lumi masking adaptive quantization when set to 1. Default is
8241 0 (disabled).
8242
8243 variance_aq
8244 Enable variance adaptive quantization when set to 1. Default is 0
8245 (disabled).
8246
8247 When combined with lumi_aq, the resulting quality will not be
8248 better than any of the two specified individually. In other words,
8249 the resulting quality will be the worse one of the two effects.
8250
8251 ssim
8252 Set structural similarity (SSIM) displaying method. Possible
8253 values:
8254
8255 off Disable displaying of SSIM information.
8256
8257 avg Output average SSIM at the end of encoding to stdout. The
8258 format of showing the average SSIM is:
8259
8260 Average SSIM: %f
8261
8262 For users who are not familiar with C, %f means a float number,
8263 or a decimal (e.g. 0.939232).
8264
8265 frame
8266 Output both per-frame SSIM data during encoding and average
8267 SSIM at the end of encoding to stdout. The format of per-frame
8268 information is:
8269
8270 SSIM: avg: %1.3f min: %1.3f max: %1.3f
8271
8272 For users who are not familiar with C, %1.3f means a float
8273 number rounded to 3 digits after the dot (e.g. 0.932).
8274
8275 ssim_acc
8276 Set SSIM accuracy. Valid options are integers within the range of
8277 0-4, while 0 gives the most accurate result and 4 computes the
8278 fastest.
8279
8280 MediaFoundation
8281 This provides wrappers to encoders (both audio and video) in the
8282 MediaFoundation framework. It can access both SW and HW encoders.
8283 Video encoders can take input in either of nv12 or yuv420p form (some
8284 encoders support both, some support only either - in practice, nv12 is
8285 the safer choice, especially among HW encoders).
8286
8287 mpeg2
8288 MPEG-2 video encoder.
8289
8290 Options
8291
8292 profile
8293 Select the mpeg2 profile to encode:
8294
8295 422
8296 high
8297 ss Spatially Scalable
8298
8299 snr SNR Scalable
8300
8301 main
8302 simple
8303 level
8304 Select the mpeg2 level to encode:
8305
8306 high
8307 high1440
8308 main
8309 low
8310 seq_disp_ext integer
8311 Specifies if the encoder should write a sequence_display_extension
8312 to the output.
8313
8314 -1
8315 auto
8316 Decide automatically to write it or not (this is the default)
8317 by checking if the data to be written is different from the
8318 default or unspecified values.
8319
8320 0
8321 never
8322 Never write it.
8323
8324 1
8325 always
8326 Always write it.
8327
8328 video_format integer
8329 Specifies the video_format written into the sequence display
8330 extension indicating the source of the video pictures. The default
8331 is unspecified, can be component, pal, ntsc, secam or mac. For
8332 maximum compatibility, use component.
8333
8334 a53cc boolean
8335 Import closed captions (which must be ATSC compatible format) into
8336 output. Default is 1 (on).
8337
8338 png
8339 PNG image encoder.
8340
8341 Private options
8342
8343 dpi integer
8344 Set physical density of pixels, in dots per inch, unset by default
8345
8346 dpm integer
8347 Set physical density of pixels, in dots per meter, unset by default
8348
8349 ProRes
8350 Apple ProRes encoder.
8351
8352 FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
8353 The used encoder can be chosen with the "-vcodec" option.
8354
8355 Private Options for prores-ks
8356
8357 profile integer
8358 Select the ProRes profile to encode
8359
8360 proxy
8361 lt
8362 standard
8363 hq
8364 4444
8365 4444xq
8366 quant_mat integer
8367 Select quantization matrix.
8368
8369 auto
8370 default
8371 proxy
8372 lt
8373 standard
8374 hq
8375
8376 If set to auto, the matrix matching the profile will be picked. If
8377 not set, the matrix providing the highest quality, default, will be
8378 picked.
8379
8380 bits_per_mb integer
8381 How many bits to allot for coding one macroblock. Different
8382 profiles use between 200 and 2400 bits per macroblock, the maximum
8383 is 8000.
8384
8385 mbs_per_slice integer
8386 Number of macroblocks in each slice (1-8); the default value (8)
8387 should be good in almost all situations.
8388
8389 vendor string
8390 Override the 4-byte vendor ID. A custom vendor ID like apl0 would
8391 claim the stream was produced by the Apple encoder.
8392
8393 alpha_bits integer
8394 Specify number of bits for alpha component. Possible values are 0,
8395 8 and 16. Use 0 to disable alpha plane coding.
8396
8397 Speed considerations
8398
8399 In the default mode of operation the encoder has to honor frame
8400 constraints (i.e. not produce frames with size bigger than requested)
8401 while still making output picture as good as possible. A frame
8402 containing a lot of small details is harder to compress and the encoder
8403 would spend more time searching for appropriate quantizers for each
8404 slice.
8405
8406 Setting a higher bits_per_mb limit will improve the speed.
8407
8408 For the fastest encoding speed set the qscale parameter (4 is the
8409 recommended value) and do not set a size constraint.
8410
8411 QSV Encoders
8412 The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC,
8413 JPEG/MJPEG and VP9)
8414
8415 Ratecontrol Method
8416
8417 The ratecontrol method is selected as follows:
8418
8419 • When global_quality is specified, a quality-based mode is used.
8420 Specifically this means either
8421
8422 - CQP - constant quantizer scale, when the qscale codec flag is
8423 also set (the -qscale ffmpeg option).
8424
8425 - LA_ICQ - intelligent constant quality with lookahead, when the
8426 look_ahead option is also set.
8427
8428 - ICQ -- intelligent constant quality otherwise. For the ICQ
8429 modes, global quality range is 1 to 51, with 1 being the best
8430 quality.
8431
8432 • Otherwise, a bitrate-based mode is used. For all of those, you
8433 should specify at least the desired average bitrate with the b
8434 option.
8435
8436 - LA - VBR with lookahead, when the look_ahead option is
8437 specified.
8438
8439 - VCM - video conferencing mode, when the vcm option is set.
8440
8441 - CBR - constant bitrate, when maxrate is specified and equal to
8442 the average bitrate.
8443
8444 - VBR - variable bitrate, when maxrate is specified, but is
8445 higher than the average bitrate.
8446
8447 - AVBR - average VBR mode, when maxrate is not specified, both
8448 avbr_accuracy and avbr_convergence are set to non-zero. This
8449 mode is available for H264 and HEVC on Windows.
8450
8451 Note that depending on your system, a different mode than the one you
8452 specified may be selected by the encoder. Set the verbosity level to
8453 verbose or higher to see the actual settings used by the QSV runtime.
8454
8455 Global Options -> MSDK Options
8456
8457 Additional libavcodec global options are mapped to MSDK options as
8458 follows:
8459
8460 • g/gop_size -> GopPicSize
8461
8462 • bf/max_b_frames+1 -> GopRefDist
8463
8464 • rc_init_occupancy/rc_initial_buffer_occupancy -> InitialDelayInKB
8465
8466 • slices -> NumSlice
8467
8468 • refs -> NumRefFrame
8469
8470 • b_strategy/b_frame_strategy -> BRefType
8471
8472 • cgop/CLOSED_GOP codec flag -> GopOptFlag
8473
8474 • For the CQP mode, the i_qfactor/i_qoffset and b_qfactor/b_qoffset
8475 set the difference between QPP and QPI, and QPP and QPB
8476 respectively.
8477
8478 • Setting the coder option to the value vlc will make the H.264
8479 encoder use CAVLC instead of CABAC.
8480
8481 Common Options
8482
8483 Following options are used by all qsv encoders.
8484
8485 async_depth
8486 Specifies how many asynchronous operations an application performs
8487 before the application explicitly synchronizes the result. If zero,
8488 the value is not specified.
8489
8490 preset
8491 This option itemizes a range of choices from veryfast (best speed)
8492 to veryslow (best quality).
8493
8494 veryfast
8495 faster
8496 fast
8497 medium
8498 slow
8499 slower
8500 veryslow
8501 forced_idr
8502 Forcing I frames as IDR frames.
8503
8504 low_power
8505 For encoders set this flag to ON to reduce power consumption and
8506 GPU usage.
8507
8508 Runtime Options
8509
8510 Following options can be used durning qsv encoding.
8511
8512 global_quality
8513 i_quant_factor
8514 i_quant_offset
8515 b_quant_factor
8516 b_quant_offset
8517 Supported in h264_qsv and hevc_qsv. Change these value to reset
8518 qsv codec's qp configuration.
8519
8520 max_frame_size
8521 Supported in h264_qsv and hevc_qsv. Change this value to reset qsv
8522 codec's MaxFrameSize configuration.
8523
8524 gop_size
8525 Change this value to reset qsv codec's gop configuration.
8526
8527 int_ref_type
8528 int_ref_cycle_size
8529 int_ref_qp_delta
8530 int_ref_cycle_dist
8531 Supported in h264_qsv and hevc_qsv. Change these value to reset
8532 qsv codec's Intra Refresh configuration.
8533
8534 qmax
8535 qmin
8536 max_qp_i
8537 min_qp_i
8538 max_qp_p
8539 min_qp_p
8540 max_qp_b
8541 min_qp_b
8542 Supported in h264_qsv. Change these value to reset qsv codec's
8543 max/min qp configuration.
8544
8545 low_delay_brc
8546 Supported in h264_qsv and hevc_qsv. Change this value to reset qsv
8547 codec's low_delay_brc configuration.
8548
8549 framerate
8550 Change this value to reset qsv codec's framerate configuration.
8551
8552 bit_rate
8553 rc_buffer_size
8554 rc_initial_buffer_occupancy
8555 rc_max_rate
8556 Change these value to reset qsv codec's bitrate control
8557 configuration.
8558
8559 pic_timing_sei
8560 Supported in h264_qsv and hevc_qsv. Change this value to reset qsv
8561 codec's pic_timing_sei configuration.
8562
8563 H264 options
8564
8565 These options are used by h264_qsv
8566
8567 extbrc
8568 Extended bitrate control.
8569
8570 recovery_point_sei
8571 Set this flag to insert the recovery point SEI message at the
8572 beginning of every intra refresh cycle.
8573
8574 rdo Enable rate distortion optimization.
8575
8576 max_frame_size
8577 Maximum encoded frame size in bytes.
8578
8579 max_frame_size_i
8580 Maximum encoded frame size for I frames in bytes. If this value is
8581 set as larger than zero, then for I frames the value set by
8582 max_frame_size is ignored.
8583
8584 max_frame_size_p
8585 Maximum encoded frame size for P frames in bytes. If this value is
8586 set as larger than zero, then for P frames the value set by
8587 max_frame_size is ignored.
8588
8589 max_slice_size
8590 Maximum encoded slice size in bytes.
8591
8592 bitrate_limit
8593 Toggle bitrate limitations. Modifies bitrate to be in the range
8594 imposed by the QSV encoder. Setting this flag off may lead to
8595 violation of HRD conformance. Mind that specifying bitrate below
8596 the QSV encoder range might significantly affect quality. If on
8597 this option takes effect in non CQP modes: if bitrate is not in the
8598 range imposed by the QSV encoder, it will be changed to be in the
8599 range.
8600
8601 mbbrc
8602 Setting this flag enables macroblock level bitrate control that
8603 generally improves subjective visual quality. Enabling this flag
8604 may have negative impact on performance and objective visual
8605 quality metric.
8606
8607 low_delay_brc
8608 Setting this flag turns on or off LowDelayBRC feautre in qsv
8609 plugin, which provides more accurate bitrate control to minimize
8610 the variance of bitstream size frame by frame. Value: -1-default
8611 0-off 1-on
8612
8613 adaptive_i
8614 This flag controls insertion of I frames by the QSV encoder. Turn
8615 ON this flag to allow changing of frame type from P and B to I.
8616
8617 adaptive_b
8618 This flag controls changing of frame type from B to P.
8619
8620 p_strategy
8621 Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to
8622 0).
8623
8624 b_strategy
8625 This option controls usage of B frames as reference.
8626
8627 dblk_idc
8628 This option disable deblocking. It has value in range 0~2.
8629
8630 cavlc
8631 If set, CAVLC is used; if unset, CABAC is used for encoding.
8632
8633 vcm Video conferencing mode, please see ratecontrol method.
8634
8635 idr_interval
8636 Distance (in I-frames) between IDR frames.
8637
8638 pic_timing_sei
8639 Insert picture timing SEI with pic_struct_syntax element.
8640
8641 single_sei_nal_unit
8642 Put all the SEI messages into one NALU.
8643
8644 max_dec_frame_buffering
8645 Maximum number of frames buffered in the DPB.
8646
8647 look_ahead
8648 Use VBR algorithm with look ahead.
8649
8650 look_ahead_depth
8651 Depth of look ahead in number frames.
8652
8653 look_ahead_downsampling
8654 Downscaling factor for the frames saved for the lookahead analysis.
8655
8656 unknown
8657 auto
8658 off
8659 2x
8660 4x
8661 int_ref_type
8662 Specifies intra refresh type. The major goal of intra refresh is
8663 improvement of error resilience without significant impact on
8664 encoded bitstream size caused by I frames. The SDK encoder achieves
8665 this by encoding part of each frame in refresh cycle using intra
8666 MBs. none means no refresh. vertical means vertical refresh, by
8667 column of MBs. horizontal means horizontal refresh, by rows of MBs.
8668 slice means horizontal refresh by slices without overlapping. In
8669 case of slice, in_ref_cycle_size is ignored. To enable intra
8670 refresh, B frame should be set to 0.
8671
8672 int_ref_cycle_size
8673 Specifies number of pictures within refresh cycle starting from 2.
8674 0 and 1 are invalid values.
8675
8676 int_ref_qp_delta
8677 Specifies QP difference for inserted intra MBs. This is signed
8678 value in [-51, 51] range if target encoding bit-depth for luma
8679 samples is 8 and this range is [-63, 63] for 10 bit-depth or [-75,
8680 75] for 12 bit-depth respectively.
8681
8682 int_ref_cycle_dist
8683 Distance between the beginnings of the intra-refresh cycles in
8684 frames.
8685
8686 profile
8687 unknown
8688 baseline
8689 main
8690 high
8691 a53cc
8692 Use A53 Closed Captions (if available).
8693
8694 aud Insert the Access Unit Delimiter NAL.
8695
8696 mfmode
8697 Multi-Frame Mode.
8698
8699 off
8700 auto
8701 repeat_pps
8702 Repeat pps for every frame.
8703
8704 max_qp_i
8705 Maximum video quantizer scale for I frame.
8706
8707 min_qp_i
8708 Minimum video quantizer scale for I frame.
8709
8710 max_qp_p
8711 Maximum video quantizer scale for P frame.
8712
8713 min_qp_p
8714 Minimum video quantizer scale for P frame.
8715
8716 max_qp_b
8717 Maximum video quantizer scale for B frame.
8718
8719 min_qp_b
8720 Minimum video quantizer scale for B frame.
8721
8722 scenario
8723 Provides a hint to encoder about the scenario for the encoding
8724 session.
8725
8726 unknown
8727 displayremoting
8728 videoconference
8729 archive
8730 livestreaming
8731 cameracapture
8732 videosurveillance
8733 gamestreaming
8734 remotegaming
8735 avbr_accuracy
8736 Accuracy of the AVBR ratecontrol (unit of tenth of percent).
8737
8738 avbr_convergence
8739 Convergence of the AVBR ratecontrol (unit of 100 frames)
8740
8741 The parameters avbr_accuracy and avbr_convergence are for the
8742 average variable bitrate control (AVBR) algorithm. The algorithm
8743 focuses on overall encoding quality while meeting the specified
8744 bitrate, target_bitrate, within the accuracy range avbr_accuracy,
8745 after a avbr_Convergence period. This method does not follow HRD
8746 and the instant bitrate is not capped or padded.
8747
8748 skip_frame
8749 Use per-frame metadata "qsv_skip_frame" to skip frame when
8750 encoding. This option defines the usage of this metadata.
8751
8752 no_skip
8753 Frame skipping is disabled.
8754
8755 insert_dummy
8756 Encoder inserts into bitstream frame where all macroblocks are
8757 encoded as skipped.
8758
8759 insert_nothing
8760 Similar to insert_dummy, but encoder inserts nothing into
8761 bitstream. The skipped frames are still used in brc. For
8762 example, gop still include skipped frames, and the frames after
8763 skipped frames will be larger in size.
8764
8765 brc_only
8766 skip_frame metadata indicates the number of missed frames
8767 before the current frame.
8768
8769 HEVC Options
8770
8771 These options are used by hevc_qsv
8772
8773 extbrc
8774 Extended bitrate control.
8775
8776 recovery_point_sei
8777 Set this flag to insert the recovery point SEI message at the
8778 beginning of every intra refresh cycle.
8779
8780 rdo Enable rate distortion optimization.
8781
8782 max_frame_size
8783 Maximum encoded frame size in bytes.
8784
8785 max_frame_size_i
8786 Maximum encoded frame size for I frames in bytes. If this value is
8787 set as larger than zero, then for I frames the value set by
8788 max_frame_size is ignored.
8789
8790 max_frame_size_p
8791 Maximum encoded frame size for P frames in bytes. If this value is
8792 set as larger than zero, then for P frames the value set by
8793 max_frame_size is ignored.
8794
8795 max_slice_size
8796 Maximum encoded slice size in bytes.
8797
8798 mbbrc
8799 Setting this flag enables macroblock level bitrate control that
8800 generally improves subjective visual quality. Enabling this flag
8801 may have negative impact on performance and objective visual
8802 quality metric.
8803
8804 low_delay_brc
8805 Setting this flag turns on or off LowDelayBRC feautre in qsv
8806 plugin, which provides more accurate bitrate control to minimize
8807 the variance of bitstream size frame by frame. Value: -1-default
8808 0-off 1-on
8809
8810 adaptive_i
8811 This flag controls insertion of I frames by the QSV encoder. Turn
8812 ON this flag to allow changing of frame type from P and B to I.
8813
8814 adaptive_b
8815 This flag controls changing of frame type from B to P.
8816
8817 p_strategy
8818 Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to
8819 0).
8820
8821 b_strategy
8822 This option controls usage of B frames as reference.
8823
8824 dblk_idc
8825 This option disable deblocking. It has value in range 0~2.
8826
8827 idr_interval
8828 Distance (in I-frames) between IDR frames.
8829
8830 begin_only
8831 Output an IDR-frame only at the beginning of the stream.
8832
8833 load_plugin
8834 A user plugin to load in an internal session.
8835
8836 none
8837 hevc_sw
8838 hevc_hw
8839 load_plugins
8840 A :-separate list of hexadecimal plugin UIDs to load in an internal
8841 session.
8842
8843 look_ahead_depth
8844 Depth of look ahead in number frames, available when extbrc option
8845 is enabled.
8846
8847 profile
8848 Set the encoding profile (scc requires libmfx >= 1.32).
8849
8850 unknown
8851 main
8852 main10
8853 mainsp
8854 rext
8855 scc
8856 tier
8857 Set the encoding tier (only level >= 4 can support high tier).
8858 This option only takes effect when the level option is specified.
8859
8860 main
8861 high
8862 gpb 1: GPB (generalized P/B frame)
8863
8864 0: regular P frame.
8865
8866 tile_cols
8867 Number of columns for tiled encoding.
8868
8869 tile_rows
8870 Number of rows for tiled encoding.
8871
8872 aud Insert the Access Unit Delimiter NAL.
8873
8874 pic_timing_sei
8875 Insert picture timing SEI with pic_struct_syntax element.
8876
8877 transform_skip
8878 Turn this option ON to enable transformskip. It is supported on
8879 platform equal or newer than ICL.
8880
8881 int_ref_type
8882 Specifies intra refresh type. The major goal of intra refresh is
8883 improvement of error resilience without significant impact on
8884 encoded bitstream size caused by I frames. The SDK encoder achieves
8885 this by encoding part of each frame in refresh cycle using intra
8886 MBs. none means no refresh. vertical means vertical refresh, by
8887 column of MBs. horizontal means horizontal refresh, by rows of MBs.
8888 slice means horizontal refresh by slices without overlapping. In
8889 case of slice, in_ref_cycle_size is ignored. To enable intra
8890 refresh, B frame should be set to 0.
8891
8892 int_ref_cycle_size
8893 Specifies number of pictures within refresh cycle starting from 2.
8894 0 and 1 are invalid values.
8895
8896 int_ref_qp_delta
8897 Specifies QP difference for inserted intra MBs. This is signed
8898 value in [-51, 51] range if target encoding bit-depth for luma
8899 samples is 8 and this range is [-63, 63] for 10 bit-depth or [-75,
8900 75] for 12 bit-depth respectively.
8901
8902 int_ref_cycle_dist
8903 Distance between the beginnings of the intra-refresh cycles in
8904 frames.
8905
8906 max_qp_i
8907 Maximum video quantizer scale for I frame.
8908
8909 min_qp_i
8910 Minimum video quantizer scale for I frame.
8911
8912 max_qp_p
8913 Maximum video quantizer scale for P frame.
8914
8915 min_qp_p
8916 Minimum video quantizer scale for P frame.
8917
8918 max_qp_b
8919 Maximum video quantizer scale for B frame.
8920
8921 min_qp_b
8922 Minimum video quantizer scale for B frame.
8923
8924 scenario
8925 Provides a hint to encoder about the scenario for the encoding
8926 session.
8927
8928 unknown
8929 displayremoting
8930 videoconference
8931 archive
8932 livestreaming
8933 cameracapture
8934 videosurveillance
8935 gamestreaming
8936 remotegaming
8937 avbr_accuracy
8938 Accuracy of the AVBR ratecontrol (unit of tenth of percent).
8939
8940 avbr_convergence
8941 Convergence of the AVBR ratecontrol (unit of 100 frames)
8942
8943 The parameters avbr_accuracy and avbr_convergence are for the
8944 average variable bitrate control (AVBR) algorithm. The algorithm
8945 focuses on overall encoding quality while meeting the specified
8946 bitrate, target_bitrate, within the accuracy range avbr_accuracy,
8947 after a avbr_Convergence period. This method does not follow HRD
8948 and the instant bitrate is not capped or padded.
8949
8950 skip_frame
8951 Use per-frame metadata "qsv_skip_frame" to skip frame when
8952 encoding. This option defines the usage of this metadata.
8953
8954 no_skip
8955 Frame skipping is disabled.
8956
8957 insert_dummy
8958 Encoder inserts into bitstream frame where all macroblocks are
8959 encoded as skipped.
8960
8961 insert_nothing
8962 Similar to insert_dummy, but encoder inserts nothing into
8963 bitstream. The skipped frames are still used in brc. For
8964 example, gop still include skipped frames, and the frames after
8965 skipped frames will be larger in size.
8966
8967 brc_only
8968 skip_frame metadata indicates the number of missed frames
8969 before the current frame.
8970
8971 MPEG2 Options
8972
8973 These options are used by mpeg2_qsv
8974
8975 profile
8976 unknown
8977 simple
8978 main
8979 high
8980
8981 VP9 Options
8982
8983 These options are used by vp9_qsv
8984
8985 profile
8986 unknown
8987 profile0
8988 profile1
8989 profile2
8990 profile3
8991 tile_cols
8992 Number of columns for tiled encoding (requires libmfx >= 1.29).
8993
8994 tile_rows
8995 Number of rows for tiled encoding (requires libmfx >= 1.29).
8996
8997 AV1 Options
8998
8999 These options are used by av1_qsv (requires libvpl).
9000
9001 profile
9002 unknown
9003 main
9004 tile_cols
9005 Number of columns for tiled encoding.
9006
9007 tile_rows
9008 Number of rows for tiled encoding.
9009
9010 adaptive_i
9011 This flag controls insertion of I frames by the QSV encoder. Turn
9012 ON this flag to allow changing of frame type from P and B to I.
9013
9014 adaptive_b
9015 This flag controls changing of frame type from B to P.
9016
9017 b_strategy
9018 This option controls usage of B frames as reference.
9019
9020 extbrc
9021 Extended bitrate control.
9022
9023 look_ahead_depth
9024 Depth of look ahead in number frames, available when extbrc option
9025 is enabled.
9026
9027 low_delay_brc
9028 Setting this flag turns on or off LowDelayBRC feautre in qsv
9029 plugin, which provides more accurate bitrate control to minimize
9030 the variance of bitstream size frame by frame. Value: -1-default
9031 0-off 1-on
9032
9033 max_frame_size
9034 Set the allowed max size in bytes for each frame. If the frame size
9035 exceeds the limitation, encoder will adjust the QP value to control
9036 the frame size. Invalid in CQP rate control mode.
9037
9038 snow
9039 Options
9040
9041 iterative_dia_size
9042 dia size for the iterative motion estimation
9043
9044 VAAPI encoders
9045 Wrappers for hardware encoders accessible via VAAPI.
9046
9047 These encoders only accept input in VAAPI hardware surfaces. If you
9048 have input in software frames, use the hwupload filter to upload them
9049 to the GPU.
9050
9051 The following standard libavcodec options are used:
9052
9053 • g / gop_size
9054
9055 • bf / max_b_frames
9056
9057 • profile
9058
9059 If not set, this will be determined automatically from the format
9060 of the input frames and the profiles supported by the driver.
9061
9062 • level
9063
9064 • b / bit_rate
9065
9066 • maxrate / rc_max_rate
9067
9068 • bufsize / rc_buffer_size
9069
9070 • rc_init_occupancy / rc_initial_buffer_occupancy
9071
9072 • compression_level
9073
9074 Speed / quality tradeoff: higher values are faster / worse quality.
9075
9076 • q / global_quality
9077
9078 Size / quality tradeoff: higher values are smaller / worse quality.
9079
9080 • qmin
9081
9082 • qmax
9083
9084 • i_qfactor / i_quant_factor
9085
9086 • i_qoffset / i_quant_offset
9087
9088 • b_qfactor / b_quant_factor
9089
9090 • b_qoffset / b_quant_offset
9091
9092 • slices
9093
9094 All encoders support the following options:
9095
9096 low_power
9097 Some drivers/platforms offer a second encoder for some codecs
9098 intended to use less power than the default encoder; setting this
9099 option will attempt to use that encoder. Note that it may support
9100 a reduced feature set, so some other options may not be available
9101 in this mode.
9102
9103 idr_interval
9104 Set the number of normal intra frames between full-refresh (IDR)
9105 frames in open-GOP mode. The intra frames are still IRAPs, but
9106 will not include global headers and may have non-decodable leading
9107 pictures.
9108
9109 b_depth
9110 Set the B-frame reference depth. When set to one (the default),
9111 all B-frames will refer only to P- or I-frames. When set to
9112 greater values multiple layers of B-frames will be present, frames
9113 in each layer only referring to frames in higher layers.
9114
9115 async_depth
9116 Maximum processing parallelism. Increase this to improve single
9117 channel performance. This option doesn't work if driver doesn't
9118 implement vaSyncBuffer function. Please make sure there are enough
9119 hw_frames allocated if a large number of async_depth is used.
9120
9121 max_frame_size
9122 Set the allowed max size in bytes for each frame. If the frame size
9123 exceeds the limitation, encoder will adjust the QP value to control
9124 the frame size. Invalid in CQP rate control mode.
9125
9126 rc_mode
9127 Set the rate control mode to use. A given driver may only support
9128 a subset of modes.
9129
9130 Possible modes:
9131
9132 auto
9133 Choose the mode automatically based on driver support and the
9134 other options. This is the default.
9135
9136 CQP Constant-quality.
9137
9138 CBR Constant-bitrate.
9139
9140 VBR Variable-bitrate.
9141
9142 ICQ Intelligent constant-quality.
9143
9144 QVBR
9145 Quality-defined variable-bitrate.
9146
9147 AVBR
9148 Average variable bitrate.
9149
9150 Each encoder also has its own specific options:
9151
9152 av1_vaapi
9153 profile sets the value of seq_profile. tier sets the value of
9154 seq_tier. level sets the value of seq_level_idx.
9155
9156 tiles
9157 Set the number of tiles to encode the input video with, as
9158 columns x rows. (default is auto, which means use minimal tile
9159 column/row number).
9160
9161 tile_groups
9162 Set tile groups number. All the tiles will be distributed as
9163 evenly as possible to each tile group. (default is 1).
9164
9165 h264_vaapi
9166 profile sets the value of profile_idc and the
9167 constraint_set*_flags. level sets the value of level_idc.
9168
9169 coder
9170 Set entropy encoder (default is cabac). Possible values:
9171
9172 ac
9173 cabac
9174 Use CABAC.
9175
9176 vlc
9177 cavlc
9178 Use CAVLC.
9179
9180 aud Include access unit delimiters in the stream (not included by
9181 default).
9182
9183 sei Set SEI message types to include. Some combination of the
9184 following values:
9185
9186 identifier
9187 Include a user_data_unregistered message containing
9188 information about the encoder.
9189
9190 timing
9191 Include picture timing parameters (buffering_period and
9192 pic_timing messages).
9193
9194 recovery_point
9195 Include recovery points where appropriate (recovery_point
9196 messages).
9197
9198 hevc_vaapi
9199 profile and level set the values of general_profile_idc and
9200 general_level_idc respectively.
9201
9202 aud Include access unit delimiters in the stream (not included by
9203 default).
9204
9205 tier
9206 Set general_tier_flag. This may affect the level chosen for
9207 the stream if it is not explicitly specified.
9208
9209 sei Set SEI message types to include. Some combination of the
9210 following values:
9211
9212 hdr Include HDR metadata if the input frames have it
9213 (mastering_display_colour_volume and content_light_level
9214 messages).
9215
9216 tiles
9217 Set the number of tiles to encode the input video with, as
9218 columns x rows. Larger numbers allow greater parallelism in
9219 both encoding and decoding, but may decrease coding efficiency.
9220
9221 mjpeg_vaapi
9222 Only baseline DCT encoding is supported. The encoder always uses
9223 the standard quantisation and huffman tables - global_quality
9224 scales the standard quantisation table (range 1-100).
9225
9226 For YUV, 4:2:0, 4:2:2 and 4:4:4 subsampling modes are supported.
9227 RGB is also supported, and will create an RGB JPEG.
9228
9229 jfif
9230 Include JFIF header in each frame (not included by default).
9231
9232 huffman
9233 Include standard huffman tables (on by default). Turning this
9234 off will save a few hundred bytes in each output frame, but may
9235 lose compatibility with some JPEG decoders which don't fully
9236 handle MJPEG.
9237
9238 mpeg2_vaapi
9239 profile and level set the value of profile_and_level_indication.
9240
9241 vp8_vaapi
9242 B-frames are not supported.
9243
9244 global_quality sets the q_idx used for non-key frames (range
9245 0-127).
9246
9247 loop_filter_level
9248 loop_filter_sharpness
9249 Manually set the loop filter parameters.
9250
9251 vp9_vaapi
9252 global_quality sets the q_idx used for P-frames (range 0-255).
9253
9254 loop_filter_level
9255 loop_filter_sharpness
9256 Manually set the loop filter parameters.
9257
9258 B-frames are supported, but the output stream is always in encode
9259 order rather than display order. If B-frames are enabled, it may
9260 be necessary to use the vp9_raw_reorder bitstream filter to modify
9261 the output stream to display frames in the correct order.
9262
9263 Only normal frames are produced - the vp9_superframe bitstream
9264 filter may be required to produce a stream usable with all
9265 decoders.
9266
9267 vbn
9268 Vizrt Binary Image encoder.
9269
9270 This format is used by the broadcast vendor Vizrt for quick texture
9271 streaming. Advanced features of the format such as LZW compression of
9272 texture data or generation of mipmaps are not supported.
9273
9274 Options
9275
9276 format string
9277 Sets the texture compression used by the VBN file. Can be dxt1,
9278 dxt5 or raw. Default is dxt5.
9279
9280 vc2
9281 SMPTE VC-2 (previously BBC Dirac Pro). This codec was primarily aimed
9282 at professional broadcasting but since it supports yuv420, yuv422 and
9283 yuv444 at 8 (limited range or full range), 10 or 12 bits, this makes it
9284 suitable for other tasks which require low overhead and low compression
9285 (like screen recording).
9286
9287 Options
9288
9289 b Sets target video bitrate. Usually that's around 1:6 of the
9290 uncompressed video bitrate (e.g. for 1920x1080 50fps yuv422p10
9291 that's around 400Mbps). Higher values (close to the uncompressed
9292 bitrate) turn on lossless compression mode.
9293
9294 field_order
9295 Enables field coding when set (e.g. to tt - top field first) for
9296 interlaced inputs. Should increase compression with interlaced
9297 content as it splits the fields and encodes each separately.
9298
9299 wavelet_depth
9300 Sets the total amount of wavelet transforms to apply, between 1 and
9301 5 (default). Lower values reduce compression and quality. Less
9302 capable decoders may not be able to handle values of wavelet_depth
9303 over 3.
9304
9305 wavelet_type
9306 Sets the transform type. Currently only 5_3 (LeGall) and 9_7
9307 (Deslauriers-Dubuc) are implemented, with 9_7 being the one with
9308 better compression and thus is the default.
9309
9310 slice_width
9311 slice_height
9312 Sets the slice size for each slice. Larger values result in better
9313 compression. For compatibility with other more limited decoders
9314 use slice_width of 32 and slice_height of 8.
9315
9316 tolerance
9317 Sets the undershoot tolerance of the rate control system in
9318 percent. This is to prevent an expensive search from being run.
9319
9320 qm Sets the quantization matrix preset to use by default or when
9321 wavelet_depth is set to 5
9322
9323 - default Uses the default quantization matrix from the
9324 specifications, extended with values for the fifth level. This
9325 provides a good balance between keeping detail and omitting
9326 artifacts.
9327
9328 - flat Use a completely zeroed out quantization matrix. This
9329 increases PSNR but might reduce perception. Use in bogus
9330 benchmarks.
9331
9332 - color Reduces detail but attempts to preserve color at
9333 extremely low bitrates.
9334
9336 dvdsub
9337 This codec encodes the bitmap subtitle format that is used in DVDs.
9338 Typically they are stored in VOBSUB file pairs (*.idx + *.sub), and
9339 they can also be used in Matroska files.
9340
9341 Options
9342
9343 palette
9344 Specify the global palette used by the bitmaps.
9345
9346 The format for this option is a string containing 16 24-bits
9347 hexadecimal numbers (without 0x prefix) separated by commas, for
9348 example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
9349 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
9350 7c127b".
9351
9352 even_rows_fix
9353 When set to 1, enable a work-around that makes the number of pixel
9354 rows even in all subtitles. This fixes a problem with some players
9355 that cut off the bottom row if the number is odd. The work-around
9356 just adds a fully transparent row if needed. The overhead is low,
9357 typically one byte per subtitle on average.
9358
9359 By default, this work-around is disabled.
9360
9362 When you configure your FFmpeg build, all the supported bitstream
9363 filters are enabled by default. You can list all available ones using
9364 the configure option "--list-bsfs".
9365
9366 You can disable all the bitstream filters using the configure option
9367 "--disable-bsfs", and selectively enable any bitstream filter using the
9368 option "--enable-bsf=BSF", or you can disable a particular bitstream
9369 filter using the option "--disable-bsf=BSF".
9370
9371 The option "-bsfs" of the ff* tools will display the list of all the
9372 supported bitstream filters included in your build.
9373
9374 The ff* tools have a -bsf option applied per stream, taking a comma-
9375 separated list of filters, whose parameters follow the filter name
9376 after a '='.
9377
9378 ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
9379
9380 Below is a description of the currently available bitstream filters,
9381 with their parameters, if any.
9382
9383 aac_adtstoasc
9384 Convert MPEG-2/4 AAC ADTS to an MPEG-4 Audio Specific Configuration
9385 bitstream.
9386
9387 This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4 ADTS
9388 header and removes the ADTS header.
9389
9390 This filter is required for example when copying an AAC stream from a
9391 raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
9392 to MOV/MP4 files and related formats such as 3GP or M4A. Please note
9393 that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
9394
9395 av1_metadata
9396 Modify metadata embedded in an AV1 stream.
9397
9398 td Insert or remove temporal delimiter OBUs in all temporal units of
9399 the stream.
9400
9401 insert
9402 Insert a TD at the beginning of every TU which does not already
9403 have one.
9404
9405 remove
9406 Remove the TD from the beginning of every TU which has one.
9407
9408 color_primaries
9409 transfer_characteristics
9410 matrix_coefficients
9411 Set the color description fields in the stream (see AV1 section
9412 6.4.2).
9413
9414 color_range
9415 Set the color range in the stream (see AV1 section 6.4.2; note that
9416 this cannot be set for streams using BT.709 primaries, sRGB
9417 transfer characteristic and identity (RGB) matrix coefficients).
9418
9419 tv Limited range.
9420
9421 pc Full range.
9422
9423 chroma_sample_position
9424 Set the chroma sample location in the stream (see AV1 section
9425 6.4.2). This can only be set for 4:2:0 streams.
9426
9427 vertical
9428 Left position (matching the default in MPEG-2 and H.264).
9429
9430 colocated
9431 Top-left position.
9432
9433 tick_rate
9434 Set the tick rate (time_scale / num_units_in_display_tick) in the
9435 timing info in the sequence header.
9436
9437 num_ticks_per_picture
9438 Set the number of ticks in each picture, to indicate that the
9439 stream has a fixed framerate. Ignored if tick_rate is not also
9440 set.
9441
9442 delete_padding
9443 Deletes Padding OBUs.
9444
9445 chomp
9446 Remove zero padding at the end of a packet.
9447
9448 dca_core
9449 Extract the core from a DCA/DTS stream, dropping extensions such as
9450 DTS-HD.
9451
9452 dump_extra
9453 Add extradata to the beginning of the filtered packets except when said
9454 packets already exactly begin with the extradata that is intended to be
9455 added.
9456
9457 freq
9458 The additional argument specifies which packets should be filtered.
9459 It accepts the values:
9460
9461 k
9462 keyframe
9463 add extradata to all key packets
9464
9465 e
9466 all add extradata to all packets
9467
9468 If not specified it is assumed k.
9469
9470 For example the following ffmpeg command forces a global header (thus
9471 disabling individual packet headers) in the H.264 packets generated by
9472 the "libx264" encoder, but corrects them by adding the header stored in
9473 extradata to the key packets:
9474
9475 ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
9476
9477 dv_error_marker
9478 Blocks in DV which are marked as damaged are replaced by blocks of the
9479 specified color.
9480
9481 color
9482 The color to replace damaged blocks by
9483
9484 sta A 16 bit mask which specifies which of the 16 possible error status
9485 values are to be replaced by colored blocks. 0xFFFE is the default
9486 which replaces all non 0 error status values.
9487
9488 ok No error, no concealment
9489
9490 err Error, No concealment
9491
9492 res Reserved
9493
9494 notok
9495 Error or concealment
9496
9497 notres
9498 Not reserved
9499
9500 Aa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru
9501 The specific error status code
9502
9503 see page 44-46 or section 5.5 of
9504 <http://web.archive.org/web/20060927044735/http://www.smpte.org/smpte_store/standards/pdf/s314m.pdf>
9505
9506 eac3_core
9507 Extract the core from a E-AC-3 stream, dropping extra channels.
9508
9509 extract_extradata
9510 Extract the in-band extradata.
9511
9512 Certain codecs allow the long-term headers (e.g. MPEG-2 sequence
9513 headers, or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either "in-
9514 band" (i.e. as a part of the bitstream containing the coded frames) or
9515 "out of band" (e.g. on the container level). This latter form is called
9516 "extradata" in FFmpeg terminology.
9517
9518 This bitstream filter detects the in-band headers and makes them
9519 available as extradata.
9520
9521 remove
9522 When this option is enabled, the long-term headers are removed from
9523 the bitstream after extraction.
9524
9525 filter_units
9526 Remove units with types in or not in a given set from the stream.
9527
9528 pass_types
9529 List of unit types or ranges of unit types to pass through while
9530 removing all others. This is specified as a '|'-separated list of
9531 unit type values or ranges of values with '-'.
9532
9533 remove_types
9534 Identical to pass_types, except the units in the given set removed
9535 and all others passed through.
9536
9537 Extradata is unchanged by this transformation, but note that if the
9538 stream contains inline parameter sets then the output may be unusable
9539 if they are removed.
9540
9541 For example, to remove all non-VCL NAL units from an H.264 stream:
9542
9543 ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
9544
9545 To remove all AUDs, SEI and filler from an H.265 stream:
9546
9547 ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
9548
9549 hapqa_extract
9550 Extract Rgb or Alpha part of an HAPQA file, without recompression, in
9551 order to create an HAPQ or an HAPAlphaOnly file.
9552
9553 texture
9554 Specifies the texture to keep.
9555
9556 color
9557 alpha
9558
9559 Convert HAPQA to HAPQ
9560
9561 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
9562
9563 Convert HAPQA to HAPAlphaOnly
9564
9565 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
9566
9567 h264_metadata
9568 Modify metadata embedded in an H.264 stream.
9569
9570 aud Insert or remove AUD NAL units in all access units of the stream.
9571
9572 pass
9573 insert
9574 remove
9575
9576 Default is pass.
9577
9578 sample_aspect_ratio
9579 Set the sample aspect ratio of the stream in the VUI parameters.
9580 See H.264 table E-1.
9581
9582 overscan_appropriate_flag
9583 Set whether the stream is suitable for display using overscan or
9584 not (see H.264 section E.2.1).
9585
9586 video_format
9587 video_full_range_flag
9588 Set the video format in the stream (see H.264 section E.2.1 and
9589 table E-2).
9590
9591 colour_primaries
9592 transfer_characteristics
9593 matrix_coefficients
9594 Set the colour description in the stream (see H.264 section E.2.1
9595 and tables E-3, E-4 and E-5).
9596
9597 chroma_sample_loc_type
9598 Set the chroma sample location in the stream (see H.264 section
9599 E.2.1 and figure E-1).
9600
9601 tick_rate
9602 Set the tick rate (time_scale / num_units_in_tick) in the VUI
9603 parameters. This is the smallest time unit representable in the
9604 stream, and in many cases represents the field rate of the stream
9605 (double the frame rate).
9606
9607 fixed_frame_rate_flag
9608 Set whether the stream has fixed framerate - typically this
9609 indicates that the framerate is exactly half the tick rate, but the
9610 exact meaning is dependent on interlacing and the picture structure
9611 (see H.264 section E.2.1 and table E-6).
9612
9613 zero_new_constraint_set_flags
9614 Zero constraint_set4_flag and constraint_set5_flag in the SPS.
9615 These bits were reserved in a previous version of the H.264 spec,
9616 and thus some hardware decoders require these to be zero. The
9617 result of zeroing this is still a valid bitstream.
9618
9619 crop_left
9620 crop_right
9621 crop_top
9622 crop_bottom
9623 Set the frame cropping offsets in the SPS. These values will
9624 replace the current ones if the stream is already cropped.
9625
9626 These fields are set in pixels. Note that some sizes may not be
9627 representable if the chroma is subsampled or the stream is
9628 interlaced (see H.264 section 7.4.2.1.1).
9629
9630 sei_user_data
9631 Insert a string as SEI unregistered user data. The argument must
9632 be of the form UUID+string, where the UUID is as hex digits
9633 possibly separated by hyphens, and the string can be anything.
9634
9635 For example, 086f3693-b7b3-4f2c-9653-21492feee5b8+hello will insert
9636 the string ``hello'' associated with the given UUID.
9637
9638 delete_filler
9639 Deletes both filler NAL units and filler SEI messages.
9640
9641 display_orientation
9642 Insert, extract or remove Display orientation SEI messages. See
9643 H.264 section D.1.27 and D.2.27 for syntax and semantics.
9644
9645 pass
9646 insert
9647 remove
9648 extract
9649
9650 Default is pass.
9651
9652 Insert mode works in conjunction with "rotate" and "flip" options.
9653 Any pre-existing Display orientation messages will be removed in
9654 insert or remove mode. Extract mode attaches the display matrix to
9655 the packet as side data.
9656
9657 rotate
9658 Set rotation in display orientation SEI (anticlockwise angle in
9659 degrees). Range is -360 to +360. Default is NaN.
9660
9661 flip
9662 Set flip in display orientation SEI.
9663
9664 horizontal
9665 vertical
9666
9667 Default is unset.
9668
9669 level
9670 Set the level in the SPS. Refer to H.264 section A.3 and tables
9671 A-1 to A-5.
9672
9673 The argument must be the name of a level (for example, 4.2), a
9674 level_idc value (for example, 42), or the special name auto
9675 indicating that the filter should attempt to guess the level from
9676 the input stream properties.
9677
9678 h264_mp4toannexb
9679 Convert an H.264 bitstream from length prefixed mode to start code
9680 prefixed mode (as defined in the Annex B of the ITU-T H.264
9681 specification).
9682
9683 This is required by some streaming formats, typically the MPEG-2
9684 transport stream format (muxer "mpegts").
9685
9686 For example to remux an MP4 file containing an H.264 stream to mpegts
9687 format with ffmpeg, you can use the command:
9688
9689 ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
9690
9691 Please note that this filter is auto-inserted for MPEG-TS (muxer
9692 "mpegts") and raw H.264 (muxer "h264") output formats.
9693
9694 h264_redundant_pps
9695 This applies a specific fixup to some Blu-ray streams which contain
9696 redundant PPSs modifying irrelevant parameters of the stream which
9697 confuse other transformations which require correct extradata.
9698
9699 hevc_metadata
9700 Modify metadata embedded in an HEVC stream.
9701
9702 aud Insert or remove AUD NAL units in all access units of the stream.
9703
9704 insert
9705 remove
9706 sample_aspect_ratio
9707 Set the sample aspect ratio in the stream in the VUI parameters.
9708
9709 video_format
9710 video_full_range_flag
9711 Set the video format in the stream (see H.265 section E.3.1 and
9712 table E.2).
9713
9714 colour_primaries
9715 transfer_characteristics
9716 matrix_coefficients
9717 Set the colour description in the stream (see H.265 section E.3.1
9718 and tables E.3, E.4 and E.5).
9719
9720 chroma_sample_loc_type
9721 Set the chroma sample location in the stream (see H.265 section
9722 E.3.1 and figure E.1).
9723
9724 tick_rate
9725 Set the tick rate in the VPS and VUI parameters (time_scale /
9726 num_units_in_tick). Combined with num_ticks_poc_diff_one, this can
9727 set a constant framerate in the stream. Note that it is likely to
9728 be overridden by container parameters when the stream is in a
9729 container.
9730
9731 num_ticks_poc_diff_one
9732 Set poc_proportional_to_timing_flag in VPS and VUI and use this
9733 value to set num_ticks_poc_diff_one_minus1 (see H.265 sections
9734 7.4.3.1 and E.3.1). Ignored if tick_rate is not also set.
9735
9736 crop_left
9737 crop_right
9738 crop_top
9739 crop_bottom
9740 Set the conformance window cropping offsets in the SPS. These
9741 values will replace the current ones if the stream is already
9742 cropped.
9743
9744 These fields are set in pixels. Note that some sizes may not be
9745 representable if the chroma is subsampled (H.265 section
9746 7.4.3.2.1).
9747
9748 level
9749 Set the level in the VPS and SPS. See H.265 section A.4 and tables
9750 A.6 and A.7.
9751
9752 The argument must be the name of a level (for example, 5.1), a
9753 general_level_idc value (for example, 153 for level 5.1), or the
9754 special name auto indicating that the filter should attempt to
9755 guess the level from the input stream properties.
9756
9757 hevc_mp4toannexb
9758 Convert an HEVC/H.265 bitstream from length prefixed mode to start code
9759 prefixed mode (as defined in the Annex B of the ITU-T H.265
9760 specification).
9761
9762 This is required by some streaming formats, typically the MPEG-2
9763 transport stream format (muxer "mpegts").
9764
9765 For example to remux an MP4 file containing an HEVC stream to mpegts
9766 format with ffmpeg, you can use the command:
9767
9768 ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
9769
9770 Please note that this filter is auto-inserted for MPEG-TS (muxer
9771 "mpegts") and raw HEVC/H.265 (muxer "h265" or "hevc") output formats.
9772
9773 imxdump
9774 Modifies the bitstream to fit in MOV and to be usable by the Final Cut
9775 Pro decoder. This filter only applies to the mpeg2video codec, and is
9776 likely not needed for Final Cut Pro 7 and newer with the appropriate
9777 -tag:v.
9778
9779 For example, to remux 30 MB/sec NTSC IMX to MOV:
9780
9781 ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
9782
9783 mjpeg2jpeg
9784 Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
9785
9786 MJPEG is a video codec wherein each video frame is essentially a JPEG
9787 image. The individual frames can be extracted without loss, e.g. by
9788
9789 ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
9790
9791 Unfortunately, these chunks are incomplete JPEG images, because they
9792 lack the DHT segment required for decoding. Quoting from
9793 <http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml>:
9794
9795 Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
9796 commented that "MJPEG, or at least the MJPEG in AVIs having the MJPG
9797 fourcc, is restricted JPEG with a fixed -- and *omitted* -- Huffman
9798 table. The JPEG must be YCbCr colorspace, it must be 4:2:2, and it must
9799 use basic Huffman encoding, not arithmetic or progressive. . . . You
9800 can indeed extract the MJPEG frames and decode them with a regular JPEG
9801 decoder, but you have to prepend the DHT segment to them, or else the
9802 decoder won't have any idea how to decompress the data. The exact table
9803 necessary is given in the OpenDML spec."
9804
9805 This bitstream filter patches the header of frames extracted from an
9806 MJPEG stream (carrying the AVI1 header ID and lacking a DHT segment) to
9807 produce fully qualified JPEG images.
9808
9809 ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
9810 exiftran -i -9 frame*.jpg
9811 ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
9812
9813 mjpegadump
9814 Add an MJPEG A header to the bitstream, to enable decoding by
9815 Quicktime.
9816
9817 mov2textsub
9818 Extract a representable text file from MOV subtitles, stripping the
9819 metadata header from each subtitle packet.
9820
9821 See also the text2movsub filter.
9822
9823 mp3decomp
9824 Decompress non-standard compressed MP3 audio headers.
9825
9826 mpeg2_metadata
9827 Modify metadata embedded in an MPEG-2 stream.
9828
9829 display_aspect_ratio
9830 Set the display aspect ratio in the stream.
9831
9832 The following fixed values are supported:
9833
9834 4/3
9835 16/9
9836 221/100
9837
9838 Any other value will result in square pixels being signalled
9839 instead (see H.262 section 6.3.3 and table 6-3).
9840
9841 frame_rate
9842 Set the frame rate in the stream. This is constructed from a table
9843 of known values combined with a small multiplier and divisor - if
9844 the supplied value is not exactly representable, the nearest
9845 representable value will be used instead (see H.262 section 6.3.3
9846 and table 6-4).
9847
9848 video_format
9849 Set the video format in the stream (see H.262 section 6.3.6 and
9850 table 6-6).
9851
9852 colour_primaries
9853 transfer_characteristics
9854 matrix_coefficients
9855 Set the colour description in the stream (see H.262 section 6.3.6
9856 and tables 6-7, 6-8 and 6-9).
9857
9858 mpeg4_unpack_bframes
9859 Unpack DivX-style packed B-frames.
9860
9861 DivX-style packed B-frames are not valid MPEG-4 and were only a
9862 workaround for the broken Video for Windows subsystem. They use more
9863 space, can cause minor AV sync issues, require more CPU power to decode
9864 (unless the player has some decoded picture queue to compensate the
9865 2,0,2,0 frame per packet style) and cause trouble if copied into a
9866 standard container like mp4 or mpeg-ps/ts, because MPEG-4 decoders may
9867 not be able to decode them, since they are not valid MPEG-4.
9868
9869 For example to fix an AVI file containing an MPEG-4 stream with DivX-
9870 style packed B-frames using ffmpeg, you can use the command:
9871
9872 ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
9873
9874 noise
9875 Damages the contents of packets or simply drops them without damaging
9876 the container. Can be used for fuzzing or testing error
9877 resilience/concealment.
9878
9879 Parameters:
9880
9881 amount
9882 Accepts an expression whose evaluation per-packet determines how
9883 often bytes in that packet will be modified. A value below 0 will
9884 result in a variable frequency. Default is 0 which results in no
9885 modification. However, if neither amount nor drop is specified,
9886 amount will be set to -1. See below for accepted variables.
9887
9888 drop
9889 Accepts an expression evaluated per-packet whose value determines
9890 whether that packet is dropped. Evaluation to a positive value
9891 results in the packet being dropped. Evaluation to a negative value
9892 results in a variable chance of it being dropped, roughly inverse
9893 in proportion to the magnitude of the value. Default is 0 which
9894 results in no drops. See below for accepted variables.
9895
9896 dropamount
9897 Accepts a non-negative integer, which assigns a variable chance of
9898 it being dropped, roughly inverse in proportion to the value.
9899 Default is 0 which results in no drops. This option is kept for
9900 backwards compatibility and is equivalent to setting drop to a
9901 negative value with the same magnitude i.e. "dropamount=4" is the
9902 same as "drop=-4". Ignored if drop is also specified.
9903
9904 Both "amount" and "drop" accept expressions containing the following
9905 variables:
9906
9907 n The index of the packet, starting from zero.
9908
9909 tb The timebase for packet timestamps.
9910
9911 pts Packet presentation timestamp.
9912
9913 dts Packet decoding timestamp.
9914
9915 nopts
9916 Constant representing AV_NOPTS_VALUE.
9917
9918 startpts
9919 First non-AV_NOPTS_VALUE PTS seen in the stream.
9920
9921 startdts
9922 First non-AV_NOPTS_VALUE DTS seen in the stream.
9923
9924 duration
9925 d Packet duration, in timebase units.
9926
9927 pos Packet position in input; may be -1 when unknown or not set.
9928
9929 size
9930 Packet size, in bytes.
9931
9932 key Whether packet is marked as a keyframe.
9933
9934 state
9935 A pseudo random integer, primarily derived from the content of
9936 packet payload.
9937
9938 Examples
9939
9940 Apply modification to every byte but don't drop any packets.
9941
9942 ffmpeg -i INPUT -c copy -bsf noise=1 output.mkv
9943
9944 Drop every video packet not marked as a keyframe after timestamp 30s
9945 but do not modify any of the remaining packets.
9946
9947 ffmpeg -i INPUT -c copy -bsf:v noise=drop='gt(t\,30)*not(key)' output.mkv
9948
9949 Drop one second of audio every 10 seconds and add some random noise to
9950 the rest.
9951
9952 ffmpeg -i INPUT -c copy -bsf:a noise=amount=-1:drop='between(mod(t\,10)\,9\,10)' output.mkv
9953
9954 null
9955 This bitstream filter passes the packets through unchanged.
9956
9957 pcm_rechunk
9958 Repacketize PCM audio to a fixed number of samples per packet or a
9959 fixed packet rate per second. This is similar to the asetnsamples audio
9960 filter but works on audio packets instead of audio frames.
9961
9962 nb_out_samples, n
9963 Set the number of samples per each output audio packet. The number
9964 is intended as the number of samples per each channel. Default
9965 value is 1024.
9966
9967 pad, p
9968 If set to 1, the filter will pad the last audio packet with
9969 silence, so that it will contain the same number of samples (or
9970 roughly the same number of samples, see frame_rate) as the previous
9971 ones. Default value is 1.
9972
9973 frame_rate, r
9974 This option makes the filter output a fixed number of packets per
9975 second instead of a fixed number of samples per packet. If the
9976 audio sample rate is not divisible by the frame rate then the
9977 number of samples will not be constant but will vary slightly so
9978 that each packet will start as close to the frame boundary as
9979 possible. Using this option has precedence over nb_out_samples.
9980
9981 You can generate the well known 1602-1601-1602-1601-1602 pattern of
9982 48kHz audio for NTSC frame rate using the frame_rate option.
9983
9984 ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
9985
9986 pgs_frame_merge
9987 Merge a sequence of PGS Subtitle segments ending with an "end of
9988 display set" segment into a single packet.
9989
9990 This is required by some containers that support PGS subtitles (muxer
9991 "matroska").
9992
9993 prores_metadata
9994 Modify color property metadata embedded in prores stream.
9995
9996 color_primaries
9997 Set the color primaries. Available values are:
9998
9999 auto
10000 Keep the same color primaries property (default).
10001
10002 unknown
10003 bt709
10004 bt470bg
10005 BT601 625
10006
10007 smpte170m
10008 BT601 525
10009
10010 bt2020
10011 smpte431
10012 DCI P3
10013
10014 smpte432
10015 P3 D65
10016
10017 transfer_characteristics
10018 Set the color transfer. Available values are:
10019
10020 auto
10021 Keep the same transfer characteristics property (default).
10022
10023 unknown
10024 bt709
10025 BT 601, BT 709, BT 2020
10026
10027 smpte2084
10028 SMPTE ST 2084
10029
10030 arib-std-b67
10031 ARIB STD-B67
10032
10033 matrix_coefficients
10034 Set the matrix coefficient. Available values are:
10035
10036 auto
10037 Keep the same colorspace property (default).
10038
10039 unknown
10040 bt709
10041 smpte170m
10042 BT 601
10043
10044 bt2020nc
10045
10046 Set Rec709 colorspace for each frame of the file
10047
10048 ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
10049
10050 Set Hybrid Log-Gamma parameters for each frame of the file
10051
10052 ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov
10053
10054 remove_extra
10055 Remove extradata from packets.
10056
10057 It accepts the following parameter:
10058
10059 freq
10060 Set which frame types to remove extradata from.
10061
10062 k Remove extradata from non-keyframes only.
10063
10064 keyframe
10065 Remove extradata from keyframes only.
10066
10067 e, all
10068 Remove extradata from all frames.
10069
10070 setts
10071 Set PTS and DTS in packets.
10072
10073 It accepts the following parameters:
10074
10075 ts
10076 pts
10077 dts Set expressions for PTS, DTS or both.
10078
10079 duration
10080 Set expression for duration.
10081
10082 time_base
10083 Set output time base.
10084
10085 The expressions are evaluated through the eval API and can contain the
10086 following constants:
10087
10088 N The count of the input packet. Starting from 0.
10089
10090 TS The demux timestamp in input in case of "ts" or "dts" option or
10091 presentation timestamp in case of "pts" option.
10092
10093 POS The original position in the file of the packet, or undefined if
10094 undefined for the current packet
10095
10096 DTS The demux timestamp in input.
10097
10098 PTS The presentation timestamp in input.
10099
10100 DURATION
10101 The duration in input.
10102
10103 STARTDTS
10104 The DTS of the first packet.
10105
10106 STARTPTS
10107 The PTS of the first packet.
10108
10109 PREV_INDTS
10110 The previous input DTS.
10111
10112 PREV_INPTS
10113 The previous input PTS.
10114
10115 PREV_INDURATION
10116 The previous input duration.
10117
10118 PREV_OUTDTS
10119 The previous output DTS.
10120
10121 PREV_OUTPTS
10122 The previous output PTS.
10123
10124 PREV_OUTDURATION
10125 The previous output duration.
10126
10127 NEXT_DTS
10128 The next input DTS.
10129
10130 NEXT_PTS
10131 The next input PTS.
10132
10133 NEXT_DURATION
10134 The next input duration.
10135
10136 TB The timebase of stream packet belongs.
10137
10138 TB_OUT
10139 The output timebase.
10140
10141 SR The sample rate of stream packet belongs.
10142
10143 NOPTS
10144 The AV_NOPTS_VALUE constant.
10145
10146 text2movsub
10147 Convert text subtitles to MOV subtitles (as used by the "mov_text"
10148 codec) with metadata headers.
10149
10150 See also the mov2textsub filter.
10151
10152 trace_headers
10153 Log trace output containing all syntax elements in the coded stream
10154 headers (everything above the level of individual coded blocks). This
10155 can be useful for debugging low-level stream issues.
10156
10157 Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending on
10158 the build only a subset of these may be available.
10159
10160 truehd_core
10161 Extract the core from a TrueHD stream, dropping ATMOS data.
10162
10163 vp9_metadata
10164 Modify metadata embedded in a VP9 stream.
10165
10166 color_space
10167 Set the color space value in the frame header. Note that any frame
10168 set to RGB will be implicitly set to PC range and that RGB is
10169 incompatible with profiles 0 and 2.
10170
10171 unknown
10172 bt601
10173 bt709
10174 smpte170
10175 smpte240
10176 bt2020
10177 rgb
10178 color_range
10179 Set the color range value in the frame header. Note that any value
10180 imposed by the color space will take precedence over this value.
10181
10182 tv
10183 pc
10184
10185 vp9_superframe
10186 Merge VP9 invisible (alt-ref) frames back into VP9 superframes. This
10187 fixes merging of split/segmented VP9 streams where the alt-ref frame
10188 was split from its visible counterpart.
10189
10190 vp9_superframe_split
10191 Split VP9 superframes into single frames.
10192
10193 vp9_raw_reorder
10194 Given a VP9 stream with correct timestamps but possibly out of order,
10195 insert additional show-existing-frame packets to correct the ordering.
10196
10198 The libavformat library provides some generic global options, which can
10199 be set on all the muxers and demuxers. In addition each muxer or
10200 demuxer may support so-called private options, which are specific for
10201 that component.
10202
10203 Options may be set by specifying -option value in the FFmpeg tools, or
10204 by setting the value explicitly in the "AVFormatContext" options or
10205 using the libavutil/opt.h API for programmatic use.
10206
10207 The list of supported options follows:
10208
10209 avioflags flags (input/output)
10210 Possible values:
10211
10212 direct
10213 Reduce buffering.
10214
10215 probesize integer (input)
10216 Set probing size in bytes, i.e. the size of the data to analyze to
10217 get stream information. A higher value will enable detecting more
10218 information in case it is dispersed into the stream, but will
10219 increase latency. Must be an integer not lesser than 32. It is
10220 5000000 by default.
10221
10222 max_probe_packets integer (input)
10223 Set the maximum number of buffered packets when probing a codec.
10224 Default is 2500 packets.
10225
10226 packetsize integer (output)
10227 Set packet size.
10228
10229 fflags flags
10230 Set format flags. Some are implemented for a limited number of
10231 formats.
10232
10233 Possible values for input files:
10234
10235 discardcorrupt
10236 Discard corrupted packets.
10237
10238 fastseek
10239 Enable fast, but inaccurate seeks for some formats.
10240
10241 genpts
10242 Generate missing PTS if DTS is present.
10243
10244 igndts
10245 Ignore DTS if PTS is set. Inert when nofillin is set.
10246
10247 ignidx
10248 Ignore index.
10249
10250 nobuffer
10251 Reduce the latency introduced by buffering during initial input
10252 streams analysis.
10253
10254 nofillin
10255 Do not fill in missing values in packet fields that can be
10256 exactly calculated.
10257
10258 noparse
10259 Disable AVParsers, this needs "+nofillin" too.
10260
10261 sortdts
10262 Try to interleave output packets by DTS. At present, available
10263 only for AVIs with an index.
10264
10265 Possible values for output files:
10266
10267 autobsf
10268 Automatically apply bitstream filters as required by the output
10269 format. Enabled by default.
10270
10271 bitexact
10272 Only write platform-, build- and time-independent data. This
10273 ensures that file and data checksums are reproducible and match
10274 between platforms. Its primary use is for regression testing.
10275
10276 flush_packets
10277 Write out packets immediately.
10278
10279 shortest
10280 Stop muxing at the end of the shortest stream. It may be
10281 needed to increase max_interleave_delta to avoid flushing the
10282 longer streams before EOF.
10283
10284 seek2any integer (input)
10285 Allow seeking to non-keyframes on demuxer level when supported if
10286 set to 1. Default is 0.
10287
10288 analyzeduration integer (input)
10289 Specify how many microseconds are analyzed to probe the input. A
10290 higher value will enable detecting more accurate information, but
10291 will increase latency. It defaults to 5,000,000 microseconds = 5
10292 seconds.
10293
10294 cryptokey hexadecimal string (input)
10295 Set decryption key.
10296
10297 indexmem integer (input)
10298 Set max memory used for timestamp index (per stream).
10299
10300 rtbufsize integer (input)
10301 Set max memory used for buffering real-time frames.
10302
10303 fdebug flags (input/output)
10304 Print specific debug info.
10305
10306 Possible values:
10307
10308 ts
10309 max_delay integer (input/output)
10310 Set maximum muxing or demuxing delay in microseconds.
10311
10312 fpsprobesize integer (input)
10313 Set number of frames used to probe fps.
10314
10315 audio_preload integer (output)
10316 Set microseconds by which audio packets should be interleaved
10317 earlier.
10318
10319 chunk_duration integer (output)
10320 Set microseconds for each chunk.
10321
10322 chunk_size integer (output)
10323 Set size in bytes for each chunk.
10324
10325 err_detect, f_err_detect flags (input)
10326 Set error detection flags. "f_err_detect" is deprecated and should
10327 be used only via the ffmpeg tool.
10328
10329 Possible values:
10330
10331 crccheck
10332 Verify embedded CRCs.
10333
10334 bitstream
10335 Detect bitstream specification deviations.
10336
10337 buffer
10338 Detect improper bitstream length.
10339
10340 explode
10341 Abort decoding on minor error detection.
10342
10343 careful
10344 Consider things that violate the spec and have not been seen in
10345 the wild as errors.
10346
10347 compliant
10348 Consider all spec non compliancies as errors.
10349
10350 aggressive
10351 Consider things that a sane encoder should not do as an error.
10352
10353 max_interleave_delta integer (output)
10354 Set maximum buffering duration for interleaving. The duration is
10355 expressed in microseconds, and defaults to 10000000 (10 seconds).
10356
10357 To ensure all the streams are interleaved correctly, libavformat
10358 will wait until it has at least one packet for each stream before
10359 actually writing any packets to the output file. When some streams
10360 are "sparse" (i.e. there are large gaps between successive
10361 packets), this can result in excessive buffering.
10362
10363 This field specifies the maximum difference between the timestamps
10364 of the first and the last packet in the muxing queue, above which
10365 libavformat will output a packet regardless of whether it has
10366 queued a packet for all the streams.
10367
10368 If set to 0, libavformat will continue buffering packets until it
10369 has a packet for each stream, regardless of the maximum timestamp
10370 difference between the buffered packets.
10371
10372 use_wallclock_as_timestamps integer (input)
10373 Use wallclock as timestamps if set to 1. Default is 0.
10374
10375 avoid_negative_ts integer (output)
10376 Possible values:
10377
10378 make_non_negative
10379 Shift timestamps to make them non-negative. Also note that
10380 this affects only leading negative timestamps, and not non-
10381 monotonic negative timestamps.
10382
10383 make_zero
10384 Shift timestamps so that the first timestamp is 0.
10385
10386 auto (default)
10387 Enables shifting when required by the target format.
10388
10389 disabled
10390 Disables shifting of timestamp.
10391
10392 When shifting is enabled, all output timestamps are shifted by the
10393 same amount. Audio, video, and subtitles desynching and relative
10394 timestamp differences are preserved compared to how they would have
10395 been without shifting.
10396
10397 skip_initial_bytes integer (input)
10398 Set number of bytes to skip before reading header and frames if set
10399 to 1. Default is 0.
10400
10401 correct_ts_overflow integer (input)
10402 Correct single timestamp overflows if set to 1. Default is 1.
10403
10404 flush_packets integer (output)
10405 Flush the underlying I/O stream after each packet. Default is -1
10406 (auto), which means that the underlying protocol will decide, 1
10407 enables it, and has the effect of reducing the latency, 0 disables
10408 it and may increase IO throughput in some cases.
10409
10410 output_ts_offset offset (output)
10411 Set the output time offset.
10412
10413 offset must be a time duration specification, see the Time duration
10414 section in the ffmpeg-utils(1) manual.
10415
10416 The offset is added by the muxer to the output timestamps.
10417
10418 Specifying a positive offset means that the corresponding streams
10419 are delayed bt the time duration specified in offset. Default value
10420 is 0 (meaning that no offset is applied).
10421
10422 format_whitelist list (input)
10423 "," separated list of allowed demuxers. By default all are allowed.
10424
10425 dump_separator string (input)
10426 Separator used to separate the fields printed on the command line
10427 about the Stream parameters. For example, to separate the fields
10428 with newlines and indentation:
10429
10430 ffprobe -dump_separator "
10431 " -i ~/videos/matrixbench_mpeg2.mpg
10432
10433 max_streams integer (input)
10434 Specifies the maximum number of streams. This can be used to reject
10435 files that would require too many resources due to a large number
10436 of streams.
10437
10438 skip_estimate_duration_from_pts bool (input)
10439 Skip estimation of input duration when calculated using PTS. At
10440 present, applicable for MPEG-PS and MPEG-TS.
10441
10442 strict, f_strict integer (input/output)
10443 Specify how strictly to follow the standards. "f_strict" is
10444 deprecated and should be used only via the ffmpeg tool.
10445
10446 Possible values:
10447
10448 very
10449 strictly conform to an older more strict version of the spec or
10450 reference software
10451
10452 strict
10453 strictly conform to all the things in the spec no matter what
10454 consequences
10455
10456 normal
10457 unofficial
10458 allow unofficial extensions
10459
10460 experimental
10461 allow non standardized experimental things, experimental
10462 (unfinished/work in progress/not well tested) decoders and
10463 encoders. Note: experimental decoders can pose a security
10464 risk, do not use this for decoding untrusted input.
10465
10466 Format stream specifiers
10467 Format stream specifiers allow selection of one or more streams that
10468 match specific properties.
10469
10470 The exact semantics of stream specifiers is defined by the
10471 avformat_match_stream_specifier() function declared in the
10472 libavformat/avformat.h header and documented in the Stream specifiers
10473 section in the ffmpeg(1) manual.
10474
10476 Demuxers are configured elements in FFmpeg that can read the multimedia
10477 streams from a particular type of file.
10478
10479 When you configure your FFmpeg build, all the supported demuxers are
10480 enabled by default. You can list all available ones using the configure
10481 option "--list-demuxers".
10482
10483 You can disable all the demuxers using the configure option
10484 "--disable-demuxers", and selectively enable a single demuxer with the
10485 option "--enable-demuxer=DEMUXER", or disable it with the option
10486 "--disable-demuxer=DEMUXER".
10487
10488 The option "-demuxers" of the ff* tools will display the list of
10489 enabled demuxers. Use "-formats" to view a combined list of enabled
10490 demuxers and muxers.
10491
10492 The description of some of the currently available demuxers follows.
10493
10494 aa
10495 Audible Format 2, 3, and 4 demuxer.
10496
10497 This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files.
10498
10499 aac
10500 Raw Audio Data Transport Stream AAC demuxer.
10501
10502 This demuxer is used to demux an ADTS input containing a single AAC
10503 stream alongwith any ID3v1/2 or APE tags in it.
10504
10505 apng
10506 Animated Portable Network Graphics demuxer.
10507
10508 This demuxer is used to demux APNG files. All headers, but the PNG
10509 signature, up to (but not including) the first fcTL chunk are
10510 transmitted as extradata. Frames are then split as being all the
10511 chunks between two fcTL ones, or between the last fcTL and IEND chunks.
10512
10513 -ignore_loop bool
10514 Ignore the loop variable in the file if set. Default is enabled.
10515
10516 -max_fps int
10517 Maximum framerate in frames per second. Default of 0 imposes no
10518 limit.
10519
10520 -default_fps int
10521 Default framerate in frames per second when none is specified in
10522 the file (0 meaning as fast as possible). Default is 15.
10523
10524 asf
10525 Advanced Systems Format demuxer.
10526
10527 This demuxer is used to demux ASF files and MMS network streams.
10528
10529 -no_resync_search bool
10530 Do not try to resynchronize by looking for a certain optional start
10531 code.
10532
10533 concat
10534 Virtual concatenation script demuxer.
10535
10536 This demuxer reads a list of files and other directives from a text
10537 file and demuxes them one after the other, as if all their packets had
10538 been muxed together.
10539
10540 The timestamps in the files are adjusted so that the first file starts
10541 at 0 and each next file starts where the previous one finishes. Note
10542 that it is done globally and may cause gaps if all streams do not have
10543 exactly the same length.
10544
10545 All files must have the same streams (same codecs, same time base,
10546 etc.).
10547
10548 The duration of each file is used to adjust the timestamps of the next
10549 file: if the duration is incorrect (because it was computed using the
10550 bit-rate or because the file is truncated, for example), it can cause
10551 artifacts. The "duration" directive can be used to override the
10552 duration stored in each file.
10553
10554 Syntax
10555
10556 The script is a text file in extended-ASCII, with one directive per
10557 line. Empty lines, leading spaces and lines starting with '#' are
10558 ignored. The following directive is recognized:
10559
10560 "file path"
10561 Path to a file to read; special characters and spaces must be
10562 escaped with backslash or single quotes.
10563
10564 All subsequent file-related directives apply to that file.
10565
10566 "ffconcat version 1.0"
10567 Identify the script type and version.
10568
10569 To make FFmpeg recognize the format automatically, this directive
10570 must appear exactly as is (no extra space or byte-order-mark) on
10571 the very first line of the script.
10572
10573 "duration dur"
10574 Duration of the file. This information can be specified from the
10575 file; specifying it here may be more efficient or help if the
10576 information from the file is not available or accurate.
10577
10578 If the duration is set for all files, then it is possible to seek
10579 in the whole concatenated video.
10580
10581 "inpoint timestamp"
10582 In point of the file. When the demuxer opens the file it instantly
10583 seeks to the specified timestamp. Seeking is done so that all
10584 streams can be presented successfully at In point.
10585
10586 This directive works best with intra frame codecs, because for non-
10587 intra frame ones you will usually get extra packets before the
10588 actual In point and the decoded content will most likely contain
10589 frames before In point too.
10590
10591 For each file, packets before the file In point will have
10592 timestamps less than the calculated start timestamp of the file
10593 (negative in case of the first file), and the duration of the files
10594 (if not specified by the "duration" directive) will be reduced
10595 based on their specified In point.
10596
10597 Because of potential packets before the specified In point, packet
10598 timestamps may overlap between two concatenated files.
10599
10600 "outpoint timestamp"
10601 Out point of the file. When the demuxer reaches the specified
10602 decoding timestamp in any of the streams, it handles it as an end
10603 of file condition and skips the current and all the remaining
10604 packets from all streams.
10605
10606 Out point is exclusive, which means that the demuxer will not
10607 output packets with a decoding timestamp greater or equal to Out
10608 point.
10609
10610 This directive works best with intra frame codecs and formats where
10611 all streams are tightly interleaved. For non-intra frame codecs you
10612 will usually get additional packets with presentation timestamp
10613 after Out point therefore the decoded content will most likely
10614 contain frames after Out point too. If your streams are not tightly
10615 interleaved you may not get all the packets from all streams before
10616 Out point and you may only will be able to decode the earliest
10617 stream until Out point.
10618
10619 The duration of the files (if not specified by the "duration"
10620 directive) will be reduced based on their specified Out point.
10621
10622 "file_packet_metadata key=value"
10623 Metadata of the packets of the file. The specified metadata will be
10624 set for each file packet. You can specify this directive multiple
10625 times to add multiple metadata entries. This directive is
10626 deprecated, use "file_packet_meta" instead.
10627
10628 "file_packet_meta key value"
10629 Metadata of the packets of the file. The specified metadata will be
10630 set for each file packet. You can specify this directive multiple
10631 times to add multiple metadata entries.
10632
10633 "option key value"
10634 Option to access, open and probe the file. Can be present multiple
10635 times.
10636
10637 "stream"
10638 Introduce a stream in the virtual file. All subsequent stream-
10639 related directives apply to the last introduced stream. Some
10640 streams properties must be set in order to allow identifying the
10641 matching streams in the subfiles. If no streams are defined in the
10642 script, the streams from the first file are copied.
10643
10644 "exact_stream_id id"
10645 Set the id of the stream. If this directive is given, the string
10646 with the corresponding id in the subfiles will be used. This is
10647 especially useful for MPEG-PS (VOB) files, where the order of the
10648 streams is not reliable.
10649
10650 "stream_meta key value"
10651 Metadata for the stream. Can be present multiple times.
10652
10653 "stream_codec value"
10654 Codec for the stream.
10655
10656 "stream_extradata hex_string"
10657 Extradata for the string, encoded in hexadecimal.
10658
10659 "chapter id start end"
10660 Add a chapter. id is an unique identifier, possibly small and
10661 consecutive.
10662
10663 Options
10664
10665 This demuxer accepts the following option:
10666
10667 safe
10668 If set to 1, reject unsafe file paths and directives. A file path
10669 is considered safe if it does not contain a protocol specification
10670 and is relative and all components only contain characters from the
10671 portable character set (letters, digits, period, underscore and
10672 hyphen) and have no period at the beginning of a component.
10673
10674 If set to 0, any file name is accepted.
10675
10676 The default is 1.
10677
10678 auto_convert
10679 If set to 1, try to perform automatic conversions on packet data to
10680 make the streams concatenable. The default is 1.
10681
10682 Currently, the only conversion is adding the h264_mp4toannexb
10683 bitstream filter to H.264 streams in MP4 format. This is necessary
10684 in particular if there are resolution changes.
10685
10686 segment_time_metadata
10687 If set to 1, every packet will contain the lavf.concat.start_time
10688 and the lavf.concat.duration packet metadata values which are the
10689 start_time and the duration of the respective file segments in the
10690 concatenated output expressed in microseconds. The duration
10691 metadata is only set if it is known based on the concat file. The
10692 default is 0.
10693
10694 Examples
10695
10696 • Use absolute filenames and include some comments:
10697
10698 # my first filename
10699 file /mnt/share/file-1.wav
10700 # my second filename including whitespace
10701 file '/mnt/share/file 2.wav'
10702 # my third filename including whitespace plus single quote
10703 file '/mnt/share/file 3'\''.wav'
10704
10705 • Allow for input format auto-probing, use safe filenames and set the
10706 duration of the first file:
10707
10708 ffconcat version 1.0
10709
10710 file file-1.wav
10711 duration 20.0
10712
10713 file subdir/file-2.wav
10714
10715 dash
10716 Dynamic Adaptive Streaming over HTTP demuxer.
10717
10718 This demuxer presents all AVStreams found in the manifest. By setting
10719 the discard flags on AVStreams the caller can decide which streams to
10720 actually receive. Each stream mirrors the "id" and "bandwidth"
10721 properties from the "<Representation>" as metadata keys named "id" and
10722 "variant_bitrate" respectively.
10723
10724 Options
10725
10726 This demuxer accepts the following option:
10727
10728 cenc_decryption_key
10729 16-byte key, in hex, to decrypt files encrypted using ISO Common
10730 Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
10731
10732 ea
10733 Electronic Arts Multimedia format demuxer.
10734
10735 This format is used by various Electronic Arts games.
10736
10737 Options
10738
10739 merge_alpha bool
10740 Normally the VP6 alpha channel (if exists) is returned as a
10741 secondary video stream, by setting this option you can make the
10742 demuxer return a single video stream which contains the alpha
10743 channel in addition to the ordinary video.
10744
10745 imf
10746 Interoperable Master Format demuxer.
10747
10748 This demuxer presents audio and video streams found in an IMF
10749 Composition.
10750
10751 flv, live_flv, kux
10752 Adobe Flash Video Format demuxer.
10753
10754 This demuxer is used to demux FLV files and RTMP network streams. In
10755 case of live network streams, if you force format, you may use live_flv
10756 option instead of flv to survive timestamp discontinuities. KUX is a
10757 flv variant used on the Youku platform.
10758
10759 ffmpeg -f flv -i myfile.flv ...
10760 ffmpeg -f live_flv -i rtmp://<any.server>/anything/key ....
10761
10762 -flv_metadata bool
10763 Allocate the streams according to the onMetaData array content.
10764
10765 -flv_ignore_prevtag bool
10766 Ignore the size of previous tag value.
10767
10768 -flv_full_metadata bool
10769 Output all context of the onMetadata.
10770
10771 gif
10772 Animated GIF demuxer.
10773
10774 It accepts the following options:
10775
10776 min_delay
10777 Set the minimum valid delay between frames in hundredths of
10778 seconds. Range is 0 to 6000. Default value is 2.
10779
10780 max_gif_delay
10781 Set the maximum valid delay between frames in hundredth of seconds.
10782 Range is 0 to 65535. Default value is 65535 (nearly eleven
10783 minutes), the maximum value allowed by the specification.
10784
10785 default_delay
10786 Set the default delay between frames in hundredths of seconds.
10787 Range is 0 to 6000. Default value is 10.
10788
10789 ignore_loop
10790 GIF files can contain information to loop a certain number of times
10791 (or infinitely). If ignore_loop is set to 1, then the loop setting
10792 from the input will be ignored and looping will not occur. If set
10793 to 0, then looping will occur and will cycle the number of times
10794 according to the GIF. Default value is 1.
10795
10796 For example, with the overlay filter, place an infinitely looping GIF
10797 over another video:
10798
10799 ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv
10800
10801 Note that in the above example the shortest option for overlay filter
10802 is used to end the output video at the length of the shortest input
10803 file, which in this case is input.mp4 as the GIF in this example loops
10804 infinitely.
10805
10806 hls
10807 HLS demuxer
10808
10809 Apple HTTP Live Streaming demuxer.
10810
10811 This demuxer presents all AVStreams from all variant streams. The id
10812 field is set to the bitrate variant index number. By setting the
10813 discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), the
10814 caller can decide which variant streams to actually receive. The total
10815 bitrate of the variant that the stream belongs to is available in a
10816 metadata key named "variant_bitrate".
10817
10818 It accepts the following options:
10819
10820 live_start_index
10821 segment index to start live streams at (negative values are from
10822 the end).
10823
10824 prefer_x_start
10825 prefer to use #EXT-X-START if it's in playlist instead of
10826 live_start_index.
10827
10828 allowed_extensions
10829 ',' separated list of file extensions that hls is allowed to
10830 access.
10831
10832 max_reload
10833 Maximum number of times a insufficient list is attempted to be
10834 reloaded. Default value is 1000.
10835
10836 m3u8_hold_counters
10837 The maximum number of times to load m3u8 when it refreshes without
10838 new segments. Default value is 1000.
10839
10840 http_persistent
10841 Use persistent HTTP connections. Applicable only for HTTP streams.
10842 Enabled by default.
10843
10844 http_multiple
10845 Use multiple HTTP connections for downloading HTTP segments.
10846 Enabled by default for HTTP/1.1 servers.
10847
10848 http_seekable
10849 Use HTTP partial requests for downloading HTTP segments. 0 =
10850 disable, 1 = enable, -1 = auto, Default is auto.
10851
10852 seg_format_options
10853 Set options for the demuxer of media segments using a list of
10854 key=value pairs separated by ":".
10855
10856 seg_max_retry
10857 Maximum number of times to reload a segment on error, useful when
10858 segment skip on network error is not desired. Default value is 0.
10859
10860 image2
10861 Image file demuxer.
10862
10863 This demuxer reads from a list of image files specified by a pattern.
10864 The syntax and meaning of the pattern is specified by the option
10865 pattern_type.
10866
10867 The pattern may contain a suffix which is used to automatically
10868 determine the format of the images contained in the files.
10869
10870 The size, the pixel format, and the format of each image must be the
10871 same for all the files in the sequence.
10872
10873 This demuxer accepts the following options:
10874
10875 framerate
10876 Set the frame rate for the video stream. It defaults to 25.
10877
10878 loop
10879 If set to 1, loop over the input. Default value is 0.
10880
10881 pattern_type
10882 Select the pattern type used to interpret the provided filename.
10883
10884 pattern_type accepts one of the following values.
10885
10886 none
10887 Disable pattern matching, therefore the video will only contain
10888 the specified image. You should use this option if you do not
10889 want to create sequences from multiple images and your
10890 filenames may contain special pattern characters.
10891
10892 sequence
10893 Select a sequence pattern type, used to specify a sequence of
10894 files indexed by sequential numbers.
10895
10896 A sequence pattern may contain the string "%d" or "%0Nd", which
10897 specifies the position of the characters representing a
10898 sequential number in each filename matched by the pattern. If
10899 the form "%d0Nd" is used, the string representing the number in
10900 each filename is 0-padded and N is the total number of 0-padded
10901 digits representing the number. The literal character '%' can
10902 be specified in the pattern with the string "%%".
10903
10904 If the sequence pattern contains "%d" or "%0Nd", the first
10905 filename of the file list specified by the pattern must contain
10906 a number inclusively contained between start_number and
10907 start_number+start_number_range-1, and all the following
10908 numbers must be sequential.
10909
10910 For example the pattern "img-%03d.bmp" will match a sequence of
10911 filenames of the form img-001.bmp, img-002.bmp, ...,
10912 img-010.bmp, etc.; the pattern "i%%m%%g-%d.jpg" will match a
10913 sequence of filenames of the form i%m%g-1.jpg, i%m%g-2.jpg,
10914 ..., i%m%g-10.jpg, etc.
10915
10916 Note that the pattern must not necessarily contain "%d" or
10917 "%0Nd", for example to convert a single image file img.jpeg you
10918 can employ the command:
10919
10920 ffmpeg -i img.jpeg img.png
10921
10922 glob
10923 Select a glob wildcard pattern type.
10924
10925 The pattern is interpreted like a glob() pattern. This is only
10926 selectable if libavformat was compiled with globbing support.
10927
10928 glob_sequence (deprecated, will be removed)
10929 Select a mixed glob wildcard/sequence pattern.
10930
10931 If your version of libavformat was compiled with globbing
10932 support, and the provided pattern contains at least one glob
10933 meta character among "%*?[]{}" that is preceded by an unescaped
10934 "%", the pattern is interpreted like a glob() pattern,
10935 otherwise it is interpreted like a sequence pattern.
10936
10937 All glob special characters "%*?[]{}" must be prefixed with
10938 "%". To escape a literal "%" you shall use "%%".
10939
10940 For example the pattern "foo-%*.jpeg" will match all the
10941 filenames prefixed by "foo-" and terminating with ".jpeg", and
10942 "foo-%?%?%?.jpeg" will match all the filenames prefixed with
10943 "foo-", followed by a sequence of three characters, and
10944 terminating with ".jpeg".
10945
10946 This pattern type is deprecated in favor of glob and sequence.
10947
10948 Default value is glob_sequence.
10949
10950 pixel_format
10951 Set the pixel format of the images to read. If not specified the
10952 pixel format is guessed from the first image file in the sequence.
10953
10954 start_number
10955 Set the index of the file matched by the image file pattern to
10956 start to read from. Default value is 0.
10957
10958 start_number_range
10959 Set the index interval range to check when looking for the first
10960 image file in the sequence, starting from start_number. Default
10961 value is 5.
10962
10963 ts_from_file
10964 If set to 1, will set frame timestamp to modification time of image
10965 file. Note that monotonity of timestamps is not provided: images go
10966 in the same order as without this option. Default value is 0. If
10967 set to 2, will set frame timestamp to the modification time of the
10968 image file in nanosecond precision.
10969
10970 video_size
10971 Set the video size of the images to read. If not specified the
10972 video size is guessed from the first image file in the sequence.
10973
10974 export_path_metadata
10975 If set to 1, will add two extra fields to the metadata found in
10976 input, making them also available for other filters (see drawtext
10977 filter for examples). Default value is 0. The extra fields are
10978 described below:
10979
10980 lavf.image2dec.source_path
10981 Corresponds to the full path to the input file being read.
10982
10983 lavf.image2dec.source_basename
10984 Corresponds to the name of the file being read.
10985
10986 Examples
10987
10988 • Use ffmpeg for creating a video from the images in the file
10989 sequence img-001.jpeg, img-002.jpeg, ..., assuming an input frame
10990 rate of 10 frames per second:
10991
10992 ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
10993
10994 • As above, but start by reading from a file with index 100 in the
10995 sequence:
10996
10997 ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
10998
10999 • Read images matching the "*.png" glob pattern , that is all the
11000 files terminating with the ".png" suffix:
11001
11002 ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv
11003
11004 libgme
11005 The Game Music Emu library is a collection of video game music file
11006 emulators.
11007
11008 See <https://bitbucket.org/mpyne/game-music-emu/overview> for more
11009 information.
11010
11011 It accepts the following options:
11012
11013 track_index
11014 Set the index of which track to demux. The demuxer can only export
11015 one track. Track indexes start at 0. Default is to pick the first
11016 track. Number of tracks is exported as tracks metadata entry.
11017
11018 sample_rate
11019 Set the sampling rate of the exported track. Range is 1000 to
11020 999999. Default is 44100.
11021
11022 max_size (bytes)
11023 The demuxer buffers the entire file into memory. Adjust this value
11024 to set the maximum buffer size, which in turn, acts as a ceiling
11025 for the size of files that can be read. Default is 50 MiB.
11026
11027 libmodplug
11028 ModPlug based module demuxer
11029
11030 See <https://github.com/Konstanty/libmodplug>
11031
11032 It will export one 2-channel 16-bit 44.1 kHz audio stream. Optionally,
11033 a "pal8" 16-color video stream can be exported with or without printed
11034 metadata.
11035
11036 It accepts the following options:
11037
11038 noise_reduction
11039 Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default
11040 is 0.
11041
11042 reverb_depth
11043 Set amount of reverb. Range 0-100. Default is 0.
11044
11045 reverb_delay
11046 Set delay in ms, clamped to 40-250 ms. Default is 0.
11047
11048 bass_amount
11049 Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet)
11050 to 100 (loud). Default is 0.
11051
11052 bass_range
11053 Set cutoff i.e. upper-bound for bass frequencies. Range is 10-100
11054 Hz. Default is 0.
11055
11056 surround_depth
11057 Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100
11058 (heavy). Default is 0.
11059
11060 surround_delay
11061 Set surround delay in ms, clamped to 5-40 ms. Default is 0.
11062
11063 max_size
11064 The demuxer buffers the entire file into memory. Adjust this value
11065 to set the maximum buffer size, which in turn, acts as a ceiling
11066 for the size of files that can be read. Range is 0 to 100 MiB. 0
11067 removes buffer size limit (not recommended). Default is 5 MiB.
11068
11069 video_stream_expr
11070 String which is evaluated using the eval API to assign colors to
11071 the generated video stream. Variables which can be used are "x",
11072 "y", "w", "h", "t", "speed", "tempo", "order", "pattern" and "row".
11073
11074 video_stream
11075 Generate video stream. Can be 1 (on) or 0 (off). Default is 0.
11076
11077 video_stream_w
11078 Set video frame width in 'chars' where one char indicates 8 pixels.
11079 Range is 20-512. Default is 30.
11080
11081 video_stream_h
11082 Set video frame height in 'chars' where one char indicates 8
11083 pixels. Range is 20-512. Default is 30.
11084
11085 video_stream_ptxt
11086 Print metadata on video stream. Includes "speed", "tempo", "order",
11087 "pattern", "row" and "ts" (time in ms). Can be 1 (on) or 0 (off).
11088 Default is 1.
11089
11090 libopenmpt
11091 libopenmpt based module demuxer
11092
11093 See <https://lib.openmpt.org/libopenmpt/> for more information.
11094
11095 Some files have multiple subsongs (tracks) this can be set with the
11096 subsong option.
11097
11098 It accepts the following options:
11099
11100 subsong
11101 Set the subsong index. This can be either 'all', 'auto', or the
11102 index of the subsong. Subsong indexes start at 0. The default is
11103 'auto'.
11104
11105 The default value is to let libopenmpt choose.
11106
11107 layout
11108 Set the channel layout. Valid values are 1, 2, and 4 channel
11109 layouts. The default value is STEREO.
11110
11111 sample_rate
11112 Set the sample rate for libopenmpt to output. Range is from 1000
11113 to INT_MAX. The value default is 48000.
11114
11115 mov/mp4/3gp
11116 Demuxer for Quicktime File Format & ISO/IEC Base Media File Format
11117 (ISO/IEC 14496-12 or MPEG-4 Part 12, ISO/IEC 15444-12 or JPEG 2000 Part
11118 12).
11119
11120 Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism,
11121 ismv, isma, f4v
11122
11123 Options
11124
11125 This demuxer accepts the following options:
11126
11127 enable_drefs
11128 Enable loading of external tracks, disabled by default. Enabling
11129 this can theoretically leak information in some use cases.
11130
11131 use_absolute_path
11132 Allows loading of external tracks via absolute paths, disabled by
11133 default. Enabling this poses a security risk. It should only be
11134 enabled if the source is known to be non-malicious.
11135
11136 seek_streams_individually
11137 When seeking, identify the closest point in each stream
11138 individually and demux packets in that stream from identified
11139 point. This can lead to a different sequence of packets compared to
11140 demuxing linearly from the beginning. Default is true.
11141
11142 ignore_editlist
11143 Ignore any edit list atoms. The demuxer, by default, modifies the
11144 stream index to reflect the timeline described by the edit list.
11145 Default is false.
11146
11147 advanced_editlist
11148 Modify the stream index to reflect the timeline described by the
11149 edit list. "ignore_editlist" must be set to false for this option
11150 to be effective. If both "ignore_editlist" and this option are set
11151 to false, then only the start of the stream index is modified to
11152 reflect initial dwell time or starting timestamp described by the
11153 edit list. Default is true.
11154
11155 ignore_chapters
11156 Don't parse chapters. This includes GoPro 'HiLight' tags/moments.
11157 Note that chapters are only parsed when input is seekable. Default
11158 is false.
11159
11160 use_mfra_for
11161 For seekable fragmented input, set fragment's starting timestamp
11162 from media fragment random access box, if present.
11163
11164 Following options are available:
11165
11166 auto
11167 Auto-detect whether to set mfra timestamps as PTS or DTS
11168 (default)
11169
11170 dts Set mfra timestamps as DTS
11171
11172 pts Set mfra timestamps as PTS
11173
11174 0 Don't use mfra box to set timestamps
11175
11176 use_tfdt
11177 For fragmented input, set fragment's starting timestamp to
11178 "baseMediaDecodeTime" from the "tfdt" box. Default is enabled,
11179 which will prefer to use the "tfdt" box to set DTS. Disable to use
11180 the "earliest_presentation_time" from the "sidx" box. In either
11181 case, the timestamp from the "mfra" box will be used if it's
11182 available and "use_mfra_for" is set to pts or dts.
11183
11184 export_all
11185 Export unrecognized boxes within the udta box as metadata entries.
11186 The first four characters of the box type are set as the key.
11187 Default is false.
11188
11189 export_xmp
11190 Export entire contents of XMP_ box and uuid box as a string with
11191 key "xmp". Note that if "export_all" is set and this option isn't,
11192 the contents of XMP_ box are still exported but with key "XMP_".
11193 Default is false.
11194
11195 activation_bytes
11196 4-byte key required to decrypt Audible AAX and AAX+ files. See
11197 Audible AAX subsection below.
11198
11199 audible_fixed_key
11200 Fixed key used for handling Audible AAX/AAX+ files. It has been
11201 pre-set so should not be necessary to specify.
11202
11203 decryption_key
11204 16-byte key, in hex, to decrypt files encrypted using ISO Common
11205 Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
11206
11207 max_stts_delta
11208 Very high sample deltas written in a trak's stts box may
11209 occasionally be intended but usually they are written in error or
11210 used to store a negative value for dts correction when treated as
11211 signed 32-bit integers. This option lets the user set an upper
11212 limit, beyond which the delta is clamped to 1. Values greater than
11213 the limit if negative when cast to int32 are used to adjust onward
11214 dts.
11215
11216 Unit is the track time scale. Range is 0 to UINT_MAX. Default is
11217 "UINT_MAX - 48000*10" which allows upto a 10 second dts correction
11218 for 48 kHz audio streams while accommodating 99.9% of "uint32"
11219 range.
11220
11221 Audible AAX
11222
11223 Audible AAX files are encrypted M4B files, and they can be decrypted by
11224 specifying a 4 byte activation secret.
11225
11226 ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
11227
11228 mpegts
11229 MPEG-2 transport stream demuxer.
11230
11231 This demuxer accepts the following options:
11232
11233 resync_size
11234 Set size limit for looking up a new synchronization. Default value
11235 is 65536.
11236
11237 skip_unknown_pmt
11238 Skip PMTs for programs not defined in the PAT. Default value is 0.
11239
11240 fix_teletext_pts
11241 Override teletext packet PTS and DTS values with the timestamps
11242 calculated from the PCR of the first program which the teletext
11243 stream is part of and is not discarded. Default value is 1, set
11244 this option to 0 if you want your teletext packet PTS and DTS
11245 values untouched.
11246
11247 ts_packetsize
11248 Output option carrying the raw packet size in bytes. Show the
11249 detected raw packet size, cannot be set by the user.
11250
11251 scan_all_pmts
11252 Scan and combine all PMTs. The value is an integer with value from
11253 -1 to 1 (-1 means automatic setting, 1 means enabled, 0 means
11254 disabled). Default value is -1.
11255
11256 merge_pmt_versions
11257 Re-use existing streams when a PMT's version is updated and
11258 elementary streams move to different PIDs. Default value is 0.
11259
11260 max_packet_size
11261 Set maximum size, in bytes, of packet emitted by the demuxer.
11262 Payloads above this size are split across multiple packets. Range
11263 is 1 to INT_MAX/2. Default is 204800 bytes.
11264
11265 mpjpeg
11266 MJPEG encapsulated in multi-part MIME demuxer.
11267
11268 This demuxer allows reading of MJPEG, where each frame is represented
11269 as a part of multipart/x-mixed-replace stream.
11270
11271 strict_mime_boundary
11272 Default implementation applies a relaxed standard to multi-part
11273 MIME boundary detection, to prevent regression with numerous
11274 existing endpoints not generating a proper MIME MJPEG stream.
11275 Turning this option on by setting it to 1 will result in a stricter
11276 check of the boundary value.
11277
11278 rawvideo
11279 Raw video demuxer.
11280
11281 This demuxer allows one to read raw video data. Since there is no
11282 header specifying the assumed video parameters, the user must specify
11283 them in order to be able to decode the data correctly.
11284
11285 This demuxer accepts the following options:
11286
11287 framerate
11288 Set input video frame rate. Default value is 25.
11289
11290 pixel_format
11291 Set the input video pixel format. Default value is "yuv420p".
11292
11293 video_size
11294 Set the input video size. This value must be specified explicitly.
11295
11296 For example to read a rawvideo file input.raw with ffplay, assuming a
11297 pixel format of "rgb24", a video size of "320x240", and a frame rate of
11298 10 images per second, use the command:
11299
11300 ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw
11301
11302 sbg
11303 SBaGen script demuxer.
11304
11305 This demuxer reads the script language used by SBaGen
11306 <http://uazu.net/sbagen/> to generate binaural beats sessions. A SBG
11307 script looks like that:
11308
11309 -SE
11310 a: 300-2.5/3 440+4.5/0
11311 b: 300-2.5/0 440+4.5/3
11312 off: -
11313 NOW == a
11314 +0:07:00 == b
11315 +0:14:00 == a
11316 +0:21:00 == b
11317 +0:30:00 off
11318
11319 A SBG script can mix absolute and relative timestamps. If the script
11320 uses either only absolute timestamps (including the script start time)
11321 or only relative ones, then its layout is fixed, and the conversion is
11322 straightforward. On the other hand, if the script mixes both kind of
11323 timestamps, then the NOW reference for relative timestamps will be
11324 taken from the current time of day at the time the script is read, and
11325 the script layout will be frozen according to that reference. That
11326 means that if the script is directly played, the actual times will
11327 match the absolute timestamps up to the sound controller's clock
11328 accuracy, but if the user somehow pauses the playback or seeks, all
11329 times will be shifted accordingly.
11330
11331 tedcaptions
11332 JSON captions used for <http://www.ted.com/>.
11333
11334 TED does not provide links to the captions, but they can be guessed
11335 from the page. The file tools/bookmarklets.html from the FFmpeg source
11336 tree contains a bookmarklet to expose them.
11337
11338 This demuxer accepts the following option:
11339
11340 start_time
11341 Set the start time of the TED talk, in milliseconds. The default is
11342 15000 (15s). It is used to sync the captions with the downloadable
11343 videos, because they include a 15s intro.
11344
11345 Example: convert the captions to a format most players understand:
11346
11347 ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
11348
11349 vapoursynth
11350 Vapoursynth wrapper.
11351
11352 Due to security concerns, Vapoursynth scripts will not be autodetected
11353 so the input format has to be forced. For ff* CLI tools, add "-f
11354 vapoursynth" before the input "-i yourscript.vpy".
11355
11356 This demuxer accepts the following option:
11357
11358 max_script_size
11359 The demuxer buffers the entire script into memory. Adjust this
11360 value to set the maximum buffer size, which in turn, acts as a
11361 ceiling for the size of scripts that can be read. Default is 1
11362 MiB.
11363
11365 Muxers are configured elements in FFmpeg which allow writing multimedia
11366 streams to a particular type of file.
11367
11368 When you configure your FFmpeg build, all the supported muxers are
11369 enabled by default. You can list all available muxers using the
11370 configure option "--list-muxers".
11371
11372 You can disable all the muxers with the configure option
11373 "--disable-muxers" and selectively enable / disable single muxers with
11374 the options "--enable-muxer=MUXER" / "--disable-muxer=MUXER".
11375
11376 The option "-muxers" of the ff* tools will display the list of enabled
11377 muxers. Use "-formats" to view a combined list of enabled demuxers and
11378 muxers.
11379
11380 A description of some of the currently available muxers follows.
11381
11382 a64
11383 A64 muxer for Commodore 64 video. Accepts a single "a64_multi" or
11384 "a64_multi5" codec video stream.
11385
11386 adts
11387 Audio Data Transport Stream muxer. It accepts a single AAC stream.
11388
11389 Options
11390
11391 It accepts the following options:
11392
11393 write_id3v2 bool
11394 Enable to write ID3v2.4 tags at the start of the stream. Default is
11395 disabled.
11396
11397 write_apetag bool
11398 Enable to write APE tags at the end of the stream. Default is
11399 disabled.
11400
11401 write_mpeg2 bool
11402 Enable to set MPEG version bit in the ADTS frame header to 1 which
11403 indicates MPEG-2. Default is 0, which indicates MPEG-4.
11404
11405 aiff
11406 Audio Interchange File Format muxer.
11407
11408 Options
11409
11410 It accepts the following options:
11411
11412 write_id3v2
11413 Enable ID3v2 tags writing when set to 1. Default is 0 (disabled).
11414
11415 id3v2_version
11416 Select ID3v2 version to write. Currently only version 3 and 4 (aka.
11417 ID3v2.3 and ID3v2.4) are supported. The default is version 4.
11418
11419 alp
11420 Muxer for audio of High Voltage Software's Lego Racers game. It accepts
11421 a single ADPCM_IMA_ALP stream with no more than 2 channels nor a sample
11422 rate greater than 44100 Hz.
11423
11424 Extensions: tun, pcm
11425
11426 Options
11427
11428 It accepts the following options:
11429
11430 type type
11431 Set file type.
11432
11433 tun Set file type as music. Must have a sample rate of 22050 Hz.
11434
11435 pcm Set file type as sfx.
11436
11437 auto
11438 Set file type as per output file extension. ".pcm" results in
11439 type "pcm" else type "tun" is set. (default)
11440
11441 asf
11442 Advanced Systems Format muxer.
11443
11444 Note that Windows Media Audio (wma) and Windows Media Video (wmv) use
11445 this muxer too.
11446
11447 Options
11448
11449 It accepts the following options:
11450
11451 packet_size
11452 Set the muxer packet size. By tuning this setting you may reduce
11453 data fragmentation or muxer overhead depending on your source.
11454 Default value is 3200, minimum is 100, maximum is 64k.
11455
11456 avi
11457 Audio Video Interleaved muxer.
11458
11459 Options
11460
11461 It accepts the following options:
11462
11463 reserve_index_space
11464 Reserve the specified amount of bytes for the OpenDML master index
11465 of each stream within the file header. By default additional master
11466 indexes are embedded within the data packets if there is no space
11467 left in the first master index and are linked together as a chain
11468 of indexes. This index structure can cause problems for some use
11469 cases, e.g. third-party software strictly relying on the OpenDML
11470 index specification or when file seeking is slow. Reserving enough
11471 index space in the file header avoids these problems.
11472
11473 The required index space depends on the output file size and should
11474 be about 16 bytes per gigabyte. When this option is omitted or set
11475 to zero the necessary index space is guessed.
11476
11477 write_channel_mask
11478 Write the channel layout mask into the audio stream header.
11479
11480 This option is enabled by default. Disabling the channel mask can
11481 be useful in specific scenarios, e.g. when merging multiple audio
11482 streams into one for compatibility with software that only supports
11483 a single audio stream in AVI (see the "amerge" section in the
11484 ffmpeg-filters manual).
11485
11486 flipped_raw_rgb
11487 If set to true, store positive height for raw RGB bitmaps, which
11488 indicates bitmap is stored bottom-up. Note that this option does
11489 not flip the bitmap which has to be done manually beforehand, e.g.
11490 by using the vflip filter. Default is false and indicates bitmap
11491 is stored top down.
11492
11493 chromaprint
11494 Chromaprint fingerprinter.
11495
11496 This muxer feeds audio data to the Chromaprint library, which generates
11497 a fingerprint for the provided audio data. See
11498 <https://acoustid.org/chromaprint>
11499
11500 It takes a single signed native-endian 16-bit raw audio stream of at
11501 most 2 channels.
11502
11503 Options
11504
11505 silence_threshold
11506 Threshold for detecting silence. Range is from -1 to 32767, where
11507 -1 disables silence detection. Silence detection can only be used
11508 with version 3 of the algorithm. Silence detection must be
11509 disabled for use with the AcoustID service. Default is -1.
11510
11511 algorithm
11512 Version of algorithm to fingerprint with. Range is 0 to 4. Version
11513 3 enables silence detection. Default is 1.
11514
11515 fp_format
11516 Format to output the fingerprint as. Accepts the following options:
11517
11518 raw Binary raw fingerprint
11519
11520 compressed
11521 Binary compressed fingerprint
11522
11523 base64
11524 Base64 compressed fingerprint (default)
11525
11526 crc
11527 CRC (Cyclic Redundancy Check) testing format.
11528
11529 This muxer computes and prints the Adler-32 CRC of all the input audio
11530 and video frames. By default audio frames are converted to signed
11531 16-bit raw audio and video frames to raw video before computing the
11532 CRC.
11533
11534 The output of the muxer consists of a single line of the form:
11535 CRC=0xCRC, where CRC is a hexadecimal number 0-padded to 8 digits
11536 containing the CRC for all the decoded input frames.
11537
11538 See also the framecrc muxer.
11539
11540 Examples
11541
11542 For example to compute the CRC of the input, and store it in the file
11543 out.crc:
11544
11545 ffmpeg -i INPUT -f crc out.crc
11546
11547 You can print the CRC to stdout with the command:
11548
11549 ffmpeg -i INPUT -f crc -
11550
11551 You can select the output format of each frame with ffmpeg by
11552 specifying the audio and video codec and format. For example to compute
11553 the CRC of the input audio converted to PCM unsigned 8-bit and the
11554 input video converted to MPEG-2 video, use the command:
11555
11556 ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc -
11557
11558 dash
11559 Dynamic Adaptive Streaming over HTTP (DASH) muxer that creates segments
11560 and manifest files according to the MPEG-DASH standard ISO/IEC
11561 23009-1:2014.
11562
11563 For more information see:
11564
11565 • ISO DASH Specification:
11566 <http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip>
11567
11568 • WebM DASH Specification:
11569 <https://sites.google.com/a/webmproject.org/wiki/adaptive-streaming/webm-dash-specification>
11570
11571 It creates a MPD manifest file and segment files for each stream.
11572
11573 The segment filename might contain pre-defined identifiers used with
11574 SegmentTemplate as defined in section 5.3.9.4.4 of the standard.
11575 Available identifiers are "$RepresentationID$", "$Number$",
11576 "$Bandwidth$" and "$Time$". In addition to the standard identifiers,
11577 an ffmpeg-specific "$ext$" identifier is also supported. When
11578 specified ffmpeg will replace $ext$ in the file name with muxing
11579 format's extensions such as mp4, webm etc.,
11580
11581 ffmpeg -re -i <input> -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \
11582 -b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline \
11583 -profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
11584 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 \
11585 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \
11586 -f dash /path/to/out.mpd
11587
11588 seg_duration duration
11589 Set the segment length in seconds (fractional value can be set).
11590 The value is treated as average segment duration when use_template
11591 is enabled and use_timeline is disabled and as minimum segment
11592 duration for all the other use cases.
11593
11594 frag_duration duration
11595 Set the length in seconds of fragments within segments (fractional
11596 value can be set).
11597
11598 frag_type type
11599 Set the type of interval for fragmentation.
11600
11601 window_size size
11602 Set the maximum number of segments kept in the manifest.
11603
11604 extra_window_size size
11605 Set the maximum number of segments kept outside of the manifest
11606 before removing from disk.
11607
11608 remove_at_exit remove
11609 Enable (1) or disable (0) removal of all segments when finished.
11610
11611 use_template template
11612 Enable (1) or disable (0) use of SegmentTemplate instead of
11613 SegmentList.
11614
11615 use_timeline timeline
11616 Enable (1) or disable (0) use of SegmentTimeline in
11617 SegmentTemplate.
11618
11619 single_file single_file
11620 Enable (1) or disable (0) storing all segments in one file,
11621 accessed using byte ranges.
11622
11623 single_file_name file_name
11624 DASH-templated name to be used for baseURL. Implies single_file set
11625 to "1". In the template, "$ext$" is replaced with the file name
11626 extension specific for the segment format.
11627
11628 init_seg_name init_name
11629 DASH-templated name to used for the initialization segment. Default
11630 is "init-stream$RepresentationID$.$ext$". "$ext$" is replaced with
11631 the file name extension specific for the segment format.
11632
11633 media_seg_name segment_name
11634 DASH-templated name to used for the media segments. Default is
11635 "chunk-stream$RepresentationID$-$Number%05d$.$ext$". "$ext$" is
11636 replaced with the file name extension specific for the segment
11637 format.
11638
11639 utc_timing_url utc_url
11640 URL of the page that will return the UTC timestamp in ISO format.
11641 Example: "https://time.akamai.com/?iso"
11642
11643 method method
11644 Use the given HTTP method to create output files. Generally set to
11645 PUT or POST.
11646
11647 http_user_agent user_agent
11648 Override User-Agent field in HTTP header. Applicable only for HTTP
11649 output.
11650
11651 http_persistent http_persistent
11652 Use persistent HTTP connections. Applicable only for HTTP output.
11653
11654 hls_playlist hls_playlist
11655 Generate HLS playlist files as well. The master playlist is
11656 generated with the filename hls_master_name. One media playlist
11657 file is generated for each stream with filenames media_0.m3u8,
11658 media_1.m3u8, etc.
11659
11660 hls_master_name file_name
11661 HLS master playlist name. Default is "master.m3u8".
11662
11663 streaming streaming
11664 Enable (1) or disable (0) chunk streaming mode of output. In chunk
11665 streaming mode, each frame will be a moof fragment which forms a
11666 chunk.
11667
11668 adaptation_sets adaptation_sets
11669 Assign streams to AdaptationSets. Syntax is "id=x,streams=a,b,c
11670 id=y,streams=d,e" with x and y being the IDs of the adaptation sets
11671 and a,b,c,d and e are the indices of the mapped streams.
11672
11673 To map all video (or audio) streams to an AdaptationSet, "v" (or
11674 "a") can be used as stream identifier instead of IDs.
11675
11676 When no assignment is defined, this defaults to an AdaptationSet
11677 for each stream.
11678
11679 Optional syntax is
11680 "id=x,seg_duration=x,frag_duration=x,frag_type=type,descriptor=descriptor_string,streams=a,b,c
11681 id=y,seg_duration=y,frag_type=type,streams=d,e" and so on,
11682 descriptor is useful to the scheme defined by ISO/IEC
11683 23009-1:2014/Amd.2:2015. For example, -adaptation_sets
11684 "id=0,descriptor=<SupplementalProperty
11685 schemeIdUri=\"urn:mpeg:dash:srd:2014\"
11686 value=\"0,0,0,1,1,2,2\"/>,streams=v". Please note that descriptor
11687 string should be a self-closing xml tag. seg_duration,
11688 frag_duration and frag_type override the global option values for
11689 each adaptation set. For example, -adaptation_sets
11690 "id=0,seg_duration=2,frag_duration=1,frag_type=duration,streams=v
11691 id=1,seg_duration=2,frag_type=none,streams=a" type_id marks an
11692 adaptation set as containing streams meant to be used for Trick
11693 Mode for the referenced adaptation set. For example,
11694 -adaptation_sets "id=0,seg_duration=2,frag_type=none,streams=0
11695 id=1,seg_duration=10,frag_type=none,trick_id=0,streams=1"
11696
11697 timeout timeout
11698 Set timeout for socket I/O operations. Applicable only for HTTP
11699 output.
11700
11701 index_correction index_correction
11702 Enable (1) or Disable (0) segment index correction logic.
11703 Applicable only when use_template is enabled and use_timeline is
11704 disabled.
11705
11706 When enabled, the logic monitors the flow of segment indexes. If a
11707 streams's segment index value is not at the expected real time
11708 position, then the logic corrects that index value.
11709
11710 Typically this logic is needed in live streaming use cases. The
11711 network bandwidth fluctuations are common during long run
11712 streaming. Each fluctuation can cause the segment indexes fall
11713 behind the expected real time position.
11714
11715 format_options options_list
11716 Set container format (mp4/webm) options using a ":" separated list
11717 of key=value parameters. Values containing ":" special characters
11718 must be escaped.
11719
11720 global_sidx global_sidx
11721 Write global SIDX atom. Applicable only for single file, mp4
11722 output, non-streaming mode.
11723
11724 dash_segment_type dash_segment_type
11725 Possible values:
11726
11727 auto
11728 If this flag is set, the dash segment files format will be
11729 selected based on the stream codec. This is the default mode.
11730
11731 mp4 If this flag is set, the dash segment files will be in in
11732 ISOBMFF format.
11733
11734 webm
11735 If this flag is set, the dash segment files will be in in WebM
11736 format.
11737
11738 ignore_io_errors ignore_io_errors
11739 Ignore IO errors during open and write. Useful for long-duration
11740 runs with network output.
11741
11742 lhls lhls
11743 Enable Low-latency HLS(LHLS). Adds #EXT-X-PREFETCH tag with current
11744 segment's URI. hls.js player folks are trying to standardize an
11745 open LHLS spec. The draft spec is available in
11746 https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md
11747 This option tries to comply with the above open spec. It enables
11748 streaming and hls_playlist options automatically. This is an
11749 experimental feature.
11750
11751 Note: This is not Apple's version LHLS. See
11752 <https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis>
11753
11754 ldash ldash
11755 Enable Low-latency Dash by constraining the presence and values of
11756 some elements.
11757
11758 master_m3u8_publish_rate master_m3u8_publish_rate
11759 Publish master playlist repeatedly every after specified number of
11760 segment intervals.
11761
11762 write_prft write_prft
11763 Write Producer Reference Time elements on supported streams. This
11764 also enables writing prft boxes in the underlying muxer. Applicable
11765 only when the utc_url option is enabled. It's set to auto by
11766 default, in which case the muxer will attempt to enable it only in
11767 modes that require it.
11768
11769 mpd_profile mpd_profile
11770 Set one or more manifest profiles.
11771
11772 http_opts http_opts
11773 A :-separated list of key=value options to pass to the underlying
11774 HTTP protocol. Applicable only for HTTP output.
11775
11776 target_latency target_latency
11777 Set an intended target latency in seconds (fractional value can be
11778 set) for serving. Applicable only when streaming and write_prft
11779 options are enabled. This is an informative fields clients can use
11780 to measure the latency of the service.
11781
11782 min_playback_rate min_playback_rate
11783 Set the minimum playback rate indicated as appropriate for the
11784 purposes of automatically adjusting playback latency and buffer
11785 occupancy during normal playback by clients.
11786
11787 max_playback_rate max_playback_rate
11788 Set the maximum playback rate indicated as appropriate for the
11789 purposes of automatically adjusting playback latency and buffer
11790 occupancy during normal playback by clients.
11791
11792 update_period update_period
11793 Set the mpd update period ,for dynamic content.
11794 The unit is second.
11795
11796 fifo
11797 The fifo pseudo-muxer allows the separation of encoding and muxing by
11798 using first-in-first-out queue and running the actual muxer in a
11799 separate thread. This is especially useful in combination with the tee
11800 muxer and can be used to send data to several destinations with
11801 different reliability/writing speed/latency.
11802
11803 API users should be aware that callback functions (interrupt_callback,
11804 io_open and io_close) used within its AVFormatContext must be thread-
11805 safe.
11806
11807 The behavior of the fifo muxer if the queue fills up or if the output
11808 fails is selectable,
11809
11810 • output can be transparently restarted with configurable delay
11811 between retries based on real time or time of the processed stream.
11812
11813 • encoding can be blocked during temporary failure, or continue
11814 transparently dropping packets in case fifo queue fills up.
11815
11816 fifo_format
11817 Specify the format name. Useful if it cannot be guessed from the
11818 output name suffix.
11819
11820 queue_size
11821 Specify size of the queue (number of packets). Default value is 60.
11822
11823 format_opts
11824 Specify format options for the underlying muxer. Muxer options can
11825 be specified as a list of key=value pairs separated by ':'.
11826
11827 drop_pkts_on_overflow bool
11828 If set to 1 (true), in case the fifo queue fills up, packets will
11829 be dropped rather than blocking the encoder. This makes it possible
11830 to continue streaming without delaying the input, at the cost of
11831 omitting part of the stream. By default this option is set to 0
11832 (false), so in such cases the encoder will be blocked until the
11833 muxer processes some of the packets and none of them is lost.
11834
11835 attempt_recovery bool
11836 If failure occurs, attempt to recover the output. This is
11837 especially useful when used with network output, since it makes it
11838 possible to restart streaming transparently. By default this
11839 option is set to 0 (false).
11840
11841 max_recovery_attempts
11842 Sets maximum number of successive unsuccessful recovery attempts
11843 after which the output fails permanently. By default this option is
11844 set to 0 (unlimited).
11845
11846 recovery_wait_time duration
11847 Waiting time before the next recovery attempt after previous
11848 unsuccessful recovery attempt. Default value is 5 seconds.
11849
11850 recovery_wait_streamtime bool
11851 If set to 0 (false), the real time is used when waiting for the
11852 recovery attempt (i.e. the recovery will be attempted after at
11853 least recovery_wait_time seconds). If set to 1 (true), the time of
11854 the processed stream is taken into account instead (i.e. the
11855 recovery will be attempted after at least recovery_wait_time
11856 seconds of the stream is omitted). By default, this option is set
11857 to 0 (false).
11858
11859 recover_any_error bool
11860 If set to 1 (true), recovery will be attempted regardless of type
11861 of the error causing the failure. By default this option is set to
11862 0 (false) and in case of certain (usually permanent) errors the
11863 recovery is not attempted even when attempt_recovery is set to 1.
11864
11865 restart_with_keyframe bool
11866 Specify whether to wait for the keyframe after recovering from
11867 queue overflow or failure. This option is set to 0 (false) by
11868 default.
11869
11870 timeshift duration
11871 Buffer the specified amount of packets and delay writing the
11872 output. Note that queue_size must be big enough to store the
11873 packets for timeshift. At the end of the input the fifo buffer is
11874 flushed at realtime speed.
11875
11876 Examples
11877
11878 • Stream something to rtmp server, continue processing the stream at
11879 real-time rate even in case of temporary failure (network outage)
11880 and attempt to recover streaming every second indefinitely.
11881
11882 ffmpeg -re -i ... -c:v libx264 -c:a aac -f fifo -fifo_format flv -map 0:v -map 0:a
11883 -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 rtmp://example.com/live/stream_name
11884
11885 flv
11886 Adobe Flash Video Format muxer.
11887
11888 This muxer accepts the following options:
11889
11890 flvflags flags
11891 Possible values:
11892
11893 aac_seq_header_detect
11894 Place AAC sequence header based on audio stream data.
11895
11896 no_sequence_end
11897 Disable sequence end tag.
11898
11899 no_metadata
11900 Disable metadata tag.
11901
11902 no_duration_filesize
11903 Disable duration and filesize in metadata when they are equal
11904 to zero at the end of stream. (Be used to non-seekable living
11905 stream).
11906
11907 add_keyframe_index
11908 Used to facilitate seeking; particularly for HTTP pseudo
11909 streaming.
11910
11911 framecrc
11912 Per-packet CRC (Cyclic Redundancy Check) testing format.
11913
11914 This muxer computes and prints the Adler-32 CRC for each audio and
11915 video packet. By default audio frames are converted to signed 16-bit
11916 raw audio and video frames to raw video before computing the CRC.
11917
11918 The output of the muxer consists of a line for each audio and video
11919 packet of the form:
11920
11921 <stream_index>, <packet_dts>, <packet_pts>, <packet_duration>, <packet_size>, 0x<CRC>
11922
11923 CRC is a hexadecimal number 0-padded to 8 digits containing the CRC of
11924 the packet.
11925
11926 Examples
11927
11928 For example to compute the CRC of the audio and video frames in INPUT,
11929 converted to raw audio and video packets, and store it in the file
11930 out.crc:
11931
11932 ffmpeg -i INPUT -f framecrc out.crc
11933
11934 To print the information to stdout, use the command:
11935
11936 ffmpeg -i INPUT -f framecrc -
11937
11938 With ffmpeg, you can select the output format to which the audio and
11939 video frames are encoded before computing the CRC for each packet by
11940 specifying the audio and video codec. For example, to compute the CRC
11941 of each decoded input audio frame converted to PCM unsigned 8-bit and
11942 of each decoded input video frame converted to MPEG-2 video, use the
11943 command:
11944
11945 ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc -
11946
11947 See also the crc muxer.
11948
11949 framehash
11950 Per-packet hash testing format.
11951
11952 This muxer computes and prints a cryptographic hash for each audio and
11953 video packet. This can be used for packet-by-packet equality checks
11954 without having to individually do a binary comparison on each.
11955
11956 By default audio frames are converted to signed 16-bit raw audio and
11957 video frames to raw video before computing the hash, but the output of
11958 explicit conversions to other codecs can also be used. It uses the
11959 SHA-256 cryptographic hash function by default, but supports several
11960 other algorithms.
11961
11962 The output of the muxer consists of a line for each audio and video
11963 packet of the form:
11964
11965 <stream_index>, <packet_dts>, <packet_pts>, <packet_duration>, <packet_size>, <hash>
11966
11967 hash is a hexadecimal number representing the computed hash for the
11968 packet.
11969
11970 hash algorithm
11971 Use the cryptographic hash function specified by the string
11972 algorithm. Supported values include "MD5", "murmur3", "RIPEMD128",
11973 "RIPEMD160", "RIPEMD256", "RIPEMD320", "SHA160", "SHA224", "SHA256"
11974 (default), "SHA512/224", "SHA512/256", "SHA384", "SHA512", "CRC32"
11975 and "adler32".
11976
11977 Examples
11978
11979 To compute the SHA-256 hash of the audio and video frames in INPUT,
11980 converted to raw audio and video packets, and store it in the file
11981 out.sha256:
11982
11983 ffmpeg -i INPUT -f framehash out.sha256
11984
11985 To print the information to stdout, using the MD5 hash function, use
11986 the command:
11987
11988 ffmpeg -i INPUT -f framehash -hash md5 -
11989
11990 See also the hash muxer.
11991
11992 framemd5
11993 Per-packet MD5 testing format.
11994
11995 This is a variant of the framehash muxer. Unlike that muxer, it
11996 defaults to using the MD5 hash function.
11997
11998 Examples
11999
12000 To compute the MD5 hash of the audio and video frames in INPUT,
12001 converted to raw audio and video packets, and store it in the file
12002 out.md5:
12003
12004 ffmpeg -i INPUT -f framemd5 out.md5
12005
12006 To print the information to stdout, use the command:
12007
12008 ffmpeg -i INPUT -f framemd5 -
12009
12010 See also the framehash and md5 muxers.
12011
12012 gif
12013 Animated GIF muxer.
12014
12015 It accepts the following options:
12016
12017 loop
12018 Set the number of times to loop the output. Use -1 for no loop, 0
12019 for looping indefinitely (default).
12020
12021 final_delay
12022 Force the delay (expressed in centiseconds) after the last frame.
12023 Each frame ends with a delay until the next frame. The default is
12024 -1, which is a special value to tell the muxer to re-use the
12025 previous delay. In case of a loop, you might want to customize this
12026 value to mark a pause for instance.
12027
12028 For example, to encode a gif looping 10 times, with a 5 seconds delay
12029 between the loops:
12030
12031 ffmpeg -i INPUT -loop 10 -final_delay 500 out.gif
12032
12033 Note 1: if you wish to extract the frames into separate GIF files, you
12034 need to force the image2 muxer:
12035
12036 ffmpeg -i INPUT -c:v gif -f image2 "out%d.gif"
12037
12038 Note 2: the GIF format has a very large time base: the delay between
12039 two frames can therefore not be smaller than one centi second.
12040
12041 hash
12042 Hash testing format.
12043
12044 This muxer computes and prints a cryptographic hash of all the input
12045 audio and video frames. This can be used for equality checks without
12046 having to do a complete binary comparison.
12047
12048 By default audio frames are converted to signed 16-bit raw audio and
12049 video frames to raw video before computing the hash, but the output of
12050 explicit conversions to other codecs can also be used. Timestamps are
12051 ignored. It uses the SHA-256 cryptographic hash function by default,
12052 but supports several other algorithms.
12053
12054 The output of the muxer consists of a single line of the form:
12055 algo=hash, where algo is a short string representing the hash function
12056 used, and hash is a hexadecimal number representing the computed hash.
12057
12058 hash algorithm
12059 Use the cryptographic hash function specified by the string
12060 algorithm. Supported values include "MD5", "murmur3", "RIPEMD128",
12061 "RIPEMD160", "RIPEMD256", "RIPEMD320", "SHA160", "SHA224", "SHA256"
12062 (default), "SHA512/224", "SHA512/256", "SHA384", "SHA512", "CRC32"
12063 and "adler32".
12064
12065 Examples
12066
12067 To compute the SHA-256 hash of the input converted to raw audio and
12068 video, and store it in the file out.sha256:
12069
12070 ffmpeg -i INPUT -f hash out.sha256
12071
12072 To print an MD5 hash to stdout use the command:
12073
12074 ffmpeg -i INPUT -f hash -hash md5 -
12075
12076 See also the framehash muxer.
12077
12078 hls
12079 Apple HTTP Live Streaming muxer that segments MPEG-TS according to the
12080 HTTP Live Streaming (HLS) specification.
12081
12082 It creates a playlist file, and one or more segment files. The output
12083 filename specifies the playlist filename.
12084
12085 By default, the muxer creates a file for each segment produced. These
12086 files have the same name as the playlist, followed by a sequential
12087 number and a .ts extension.
12088
12089 Make sure to require a closed GOP when encoding and to set the GOP size
12090 to fit your segment time constraint.
12091
12092 For example, to convert an input file with ffmpeg:
12093
12094 ffmpeg -i in.mkv -c:v h264 -flags +cgop -g 30 -hls_time 1 out.m3u8
12095
12096 This example will produce the playlist, out.m3u8, and segment files:
12097 out0.ts, out1.ts, out2.ts, etc.
12098
12099 See also the segment muxer, which provides a more generic and flexible
12100 implementation of a segmenter, and can be used to perform HLS
12101 segmentation.
12102
12103 Options
12104
12105 This muxer supports the following options:
12106
12107 hls_init_time duration
12108 Set the initial target segment length. Default value is 0.
12109
12110 duration must be a time duration specification, see the Time
12111 duration section in the ffmpeg-utils(1) manual.
12112
12113 Segment will be cut on the next key frame after this time has
12114 passed on the first m3u8 list. After the initial playlist is
12115 filled ffmpeg will cut segments at duration equal to "hls_time"
12116
12117 hls_time duration
12118 Set the target segment length. Default value is 2.
12119
12120 duration must be a time duration specification, see the Time
12121 duration section in the ffmpeg-utils(1) manual. Segment will be
12122 cut on the next key frame after this time has passed.
12123
12124 hls_list_size size
12125 Set the maximum number of playlist entries. If set to 0 the list
12126 file will contain all the segments. Default value is 5.
12127
12128 hls_delete_threshold size
12129 Set the number of unreferenced segments to keep on disk before
12130 "hls_flags delete_segments" deletes them. Increase this to allow
12131 continue clients to download segments which were recently
12132 referenced in the playlist. Default value is 1, meaning segments
12133 older than "hls_list_size+1" will be deleted.
12134
12135 hls_start_number_source
12136 Start the playlist sequence number ("#EXT-X-MEDIA-SEQUENCE")
12137 according to the specified source. Unless "hls_flags single_file"
12138 is set, it also specifies source of starting sequence numbers of
12139 segment and subtitle filenames. In any case, if "hls_flags
12140 append_list" is set and read playlist sequence number is greater
12141 than the specified start sequence number, then that value will be
12142 used as start value.
12143
12144 It accepts the following values:
12145
12146 generic (default)
12147 Set the starting sequence numbers according to start_number
12148 option value.
12149
12150 epoch
12151 The start number will be the seconds since epoch (1970-01-01
12152 00:00:00)
12153
12154 epoch_us
12155 The start number will be the microseconds since epoch
12156 (1970-01-01 00:00:00)
12157
12158 datetime
12159 The start number will be based on the current date/time as
12160 YYYYmmddHHMMSS. e.g. 20161231235759.
12161
12162 start_number number
12163 Start the playlist sequence number ("#EXT-X-MEDIA-SEQUENCE") from
12164 the specified number when hls_start_number_source value is generic.
12165 (This is the default case.) Unless "hls_flags single_file" is set,
12166 it also specifies starting sequence numbers of segment and subtitle
12167 filenames. Default value is 0.
12168
12169 hls_allow_cache allowcache
12170 Explicitly set whether the client MAY (1) or MUST NOT (0) cache
12171 media segments.
12172
12173 hls_base_url baseurl
12174 Append baseurl to every entry in the playlist. Useful to generate
12175 playlists with absolute paths.
12176
12177 Note that the playlist sequence number must be unique for each
12178 segment and it is not to be confused with the segment filename
12179 sequence number which can be cyclic, for example if the wrap option
12180 is specified.
12181
12182 hls_segment_filename filename
12183 Set the segment filename. Unless "hls_flags single_file" is set,
12184 filename is used as a string format with the segment number:
12185
12186 ffmpeg -i in.nut -hls_segment_filename 'file%03d.ts' out.m3u8
12187
12188 This example will produce the playlist, out.m3u8, and segment
12189 files: file000.ts, file001.ts, file002.ts, etc.
12190
12191 filename may contain full path or relative path specification, but
12192 only the file name part without any path info will be contained in
12193 the m3u8 segment list. Should a relative path be specified, the
12194 path of the created segment files will be relative to the current
12195 working directory. When strftime_mkdir is set, the whole expanded
12196 value of filename will be written into the m3u8 segment list.
12197
12198 When "var_stream_map" is set with two or more variant streams, the
12199 filename pattern must contain the string "%v", this string
12200 specifies the position of variant stream index in the generated
12201 segment file names.
12202
12203 ffmpeg -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \
12204 -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \
12205 -hls_segment_filename 'file_%v_%03d.ts' out_%v.m3u8
12206
12207 This example will produce the playlists segment file sets:
12208 file_0_000.ts, file_0_001.ts, file_0_002.ts, etc. and
12209 file_1_000.ts, file_1_001.ts, file_1_002.ts, etc.
12210
12211 The string "%v" may be present in the filename or in the last
12212 directory name containing the file, but only in one of them.
12213 (Additionally, %v may appear multiple times in the last sub-
12214 directory or filename.) If the string %v is present in the
12215 directory name, then sub-directories are created after expanding
12216 the directory name pattern. This enables creation of segments
12217 corresponding to different variant streams in subdirectories.
12218
12219 ffmpeg -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \
12220 -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \
12221 -hls_segment_filename 'vs%v/file_%03d.ts' vs%v/out.m3u8
12222
12223 This example will produce the playlists segment file sets:
12224 vs0/file_000.ts, vs0/file_001.ts, vs0/file_002.ts, etc. and
12225 vs1/file_000.ts, vs1/file_001.ts, vs1/file_002.ts, etc.
12226
12227 strftime
12228 Use strftime() on filename to expand the segment filename with
12229 localtime. The segment number is also available in this mode, but
12230 to use it, you need to specify second_level_segment_index hls_flag
12231 and %%d will be the specifier.
12232
12233 ffmpeg -i in.nut -strftime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' out.m3u8
12234
12235 This example will produce the playlist, out.m3u8, and segment
12236 files: file-20160215-1455569023.ts, file-20160215-1455569024.ts,
12237 etc. Note: On some systems/environments, the %s specifier is not
12238 available. See
12239 strftime() documentation.
12240
12241 ffmpeg -i in.nut -strftime 1 -hls_flags second_level_segment_index -hls_segment_filename 'file-%Y%m%d-%%04d.ts' out.m3u8
12242
12243 This example will produce the playlist, out.m3u8, and segment
12244 files: file-20160215-0001.ts, file-20160215-0002.ts, etc.
12245
12246 strftime_mkdir
12247 Used together with -strftime_mkdir, it will create all
12248 subdirectories which is expanded in filename.
12249
12250 ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename '%Y%m%d/file-%Y%m%d-%s.ts' out.m3u8
12251
12252 This example will create a directory 201560215 (if it does not
12253 exist), and then produce the playlist, out.m3u8, and segment files:
12254 20160215/file-20160215-1455569023.ts,
12255 20160215/file-20160215-1455569024.ts, etc.
12256
12257 ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename '%Y/%m/%d/file-%Y%m%d-%s.ts' out.m3u8
12258
12259 This example will create a directory hierarchy 2016/02/15 (if any
12260 of them do not exist), and then produce the playlist, out.m3u8, and
12261 segment files: 2016/02/15/file-20160215-1455569023.ts,
12262 2016/02/15/file-20160215-1455569024.ts, etc.
12263
12264 hls_segment_options options_list
12265 Set output format options using a :-separated list of key=value
12266 parameters. Values containing ":" special characters must be
12267 escaped.
12268
12269 hls_key_info_file key_info_file
12270 Use the information in key_info_file for segment encryption. The
12271 first line of key_info_file specifies the key URI written to the
12272 playlist. The key URL is used to access the encryption key during
12273 playback. The second line specifies the path to the key file used
12274 to obtain the key during the encryption process. The key file is
12275 read as a single packed array of 16 octets in binary format. The
12276 optional third line specifies the initialization vector (IV) as a
12277 hexadecimal string to be used instead of the segment sequence
12278 number (default) for encryption. Changes to key_info_file will
12279 result in segment encryption with the new key/IV and an entry in
12280 the playlist for the new key URI/IV if "hls_flags periodic_rekey"
12281 is enabled.
12282
12283 Key info file format:
12284
12285 <key URI>
12286 <key file path>
12287 <IV> (optional)
12288
12289 Example key URIs:
12290
12291 http://server/file.key
12292 /path/to/file.key
12293 file.key
12294
12295 Example key file paths:
12296
12297 file.key
12298 /path/to/file.key
12299
12300 Example IV:
12301
12302 0123456789ABCDEF0123456789ABCDEF
12303
12304 Key info file example:
12305
12306 http://server/file.key
12307 /path/to/file.key
12308 0123456789ABCDEF0123456789ABCDEF
12309
12310 Example shell script:
12311
12312 #!/bin/sh
12313 BASE_URL=${1:-'.'}
12314 openssl rand 16 > file.key
12315 echo $BASE_URL/file.key > file.keyinfo
12316 echo file.key >> file.keyinfo
12317 echo $(openssl rand -hex 16) >> file.keyinfo
12318 ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \
12319 -hls_key_info_file file.keyinfo out.m3u8
12320
12321 -hls_enc enc
12322 Enable (1) or disable (0) the AES128 encryption. When enabled
12323 every segment generated is encrypted and the encryption key is
12324 saved as playlist name.key.
12325
12326 -hls_enc_key key
12327 16-octet key to encrypt the segments, by default it is randomly
12328 generated.
12329
12330 -hls_enc_key_url keyurl
12331 If set, keyurl is prepended instead of baseurl to the key filename
12332 in the playlist.
12333
12334 -hls_enc_iv iv
12335 16-octet initialization vector for every segment instead of the
12336 autogenerated ones.
12337
12338 hls_segment_type flags
12339 Possible values:
12340
12341 mpegts
12342 Output segment files in MPEG-2 Transport Stream format. This is
12343 compatible with all HLS versions.
12344
12345 fmp4
12346 Output segment files in fragmented MP4 format, similar to MPEG-
12347 DASH. fmp4 files may be used in HLS version 7 and above.
12348
12349 hls_fmp4_init_filename filename
12350 Set filename to the fragment files header file, default filename is
12351 init.mp4.
12352
12353 Use "-strftime 1" on filename to expand the segment filename with
12354 localtime.
12355
12356 ffmpeg -i in.nut -hls_segment_type fmp4 -strftime 1 -hls_fmp4_init_filename "%s_init.mp4" out.m3u8
12357
12358 This will produce init like this 1602678741_init.mp4
12359
12360 hls_fmp4_init_resend
12361 Resend init file after m3u8 file refresh every time, default is 0.
12362
12363 When "var_stream_map" is set with two or more variant streams, the
12364 filename pattern must contain the string "%v", this string
12365 specifies the position of variant stream index in the generated
12366 init file names. The string "%v" may be present in the filename or
12367 in the last directory name containing the file. If the string is
12368 present in the directory name, then sub-directories are created
12369 after expanding the directory name pattern. This enables creation
12370 of init files corresponding to different variant streams in
12371 subdirectories.
12372
12373 hls_flags flags
12374 Possible values:
12375
12376 single_file
12377 If this flag is set, the muxer will store all segments in a
12378 single MPEG-TS file, and will use byte ranges in the playlist.
12379 HLS playlists generated with this way will have the version
12380 number 4. For example:
12381
12382 ffmpeg -i in.nut -hls_flags single_file out.m3u8
12383
12384 Will produce the playlist, out.m3u8, and a single segment file,
12385 out.ts.
12386
12387 delete_segments
12388 Segment files removed from the playlist are deleted after a
12389 period of time equal to the duration of the segment plus the
12390 duration of the playlist.
12391
12392 append_list
12393 Append new segments into the end of old segment list, and
12394 remove the "#EXT-X-ENDLIST" from the old segment list.
12395
12396 round_durations
12397 Round the duration info in the playlist file segment info to
12398 integer values, instead of using floating point. If there are
12399 no other features requiring higher HLS versions be used, then
12400 this will allow ffmpeg to output a HLS version 2 m3u8.
12401
12402 discont_start
12403 Add the "#EXT-X-DISCONTINUITY" tag to the playlist, before the
12404 first segment's information.
12405
12406 omit_endlist
12407 Do not append the "EXT-X-ENDLIST" tag at the end of the
12408 playlist.
12409
12410 periodic_rekey
12411 The file specified by "hls_key_info_file" will be checked
12412 periodically and detect updates to the encryption info. Be sure
12413 to replace this file atomically, including the file containing
12414 the AES encryption key.
12415
12416 independent_segments
12417 Add the "#EXT-X-INDEPENDENT-SEGMENTS" to playlists that has
12418 video segments and when all the segments of that playlist are
12419 guaranteed to start with a Key frame.
12420
12421 iframes_only
12422 Add the "#EXT-X-I-FRAMES-ONLY" to playlists that has video
12423 segments and can play only I-frames in the "#EXT-X-BYTERANGE"
12424 mode.
12425
12426 split_by_time
12427 Allow segments to start on frames other than keyframes. This
12428 improves behavior on some players when the time between
12429 keyframes is inconsistent, but may make things worse on others,
12430 and can cause some oddities during seeking. This flag should be
12431 used with the "hls_time" option.
12432
12433 program_date_time
12434 Generate "EXT-X-PROGRAM-DATE-TIME" tags.
12435
12436 second_level_segment_index
12437 Makes it possible to use segment indexes as %%d in
12438 hls_segment_filename expression besides date/time values when
12439 strftime is on. To get fixed width numbers with trailing
12440 zeroes, %%0xd format is available where x is the required
12441 width.
12442
12443 second_level_segment_size
12444 Makes it possible to use segment sizes (counted in bytes) as
12445 %%s in hls_segment_filename expression besides date/time values
12446 when strftime is on. To get fixed width numbers with trailing
12447 zeroes, %%0xs format is available where x is the required
12448 width.
12449
12450 second_level_segment_duration
12451 Makes it possible to use segment duration (calculated in
12452 microseconds) as %%t in hls_segment_filename expression besides
12453 date/time values when strftime is on. To get fixed width
12454 numbers with trailing zeroes, %%0xt format is available where x
12455 is the required width.
12456
12457 ffmpeg -i sample.mpeg \
12458 -f hls -hls_time 3 -hls_list_size 5 \
12459 -hls_flags second_level_segment_index+second_level_segment_size+second_level_segment_duration \
12460 -strftime 1 -strftime_mkdir 1 -hls_segment_filename "segment_%Y%m%d%H%M%S_%%04d_%%08s_%%013t.ts" stream.m3u8
12461
12462 This will produce segments like this:
12463 segment_20170102194334_0003_00122200_0000003000000.ts,
12464 segment_20170102194334_0004_00120072_0000003000000.ts etc.
12465
12466 temp_file
12467 Write segment data to filename.tmp and rename to filename only
12468 once the segment is complete. A webserver serving up segments
12469 can be configured to reject requests to *.tmp to prevent access
12470 to in-progress segments before they have been added to the m3u8
12471 playlist. This flag also affects how m3u8 playlist files are
12472 created. If this flag is set, all playlist files will written
12473 into temporary file and renamed after they are complete,
12474 similarly as segments are handled. But playlists with "file"
12475 protocol and with type ("hls_playlist_type") other than "vod"
12476 are always written into temporary file regardless of this flag.
12477 Master playlist files ("master_pl_name"), if any, with "file"
12478 protocol, are always written into temporary file regardless of
12479 this flag if "master_pl_publish_rate" value is other than zero.
12480
12481 hls_playlist_type event
12482 Emit "#EXT-X-PLAYLIST-TYPE:EVENT" in the m3u8 header. Forces
12483 hls_list_size to 0; the playlist can only be appended to.
12484
12485 hls_playlist_type vod
12486 Emit "#EXT-X-PLAYLIST-TYPE:VOD" in the m3u8 header. Forces
12487 hls_list_size to 0; the playlist must not change.
12488
12489 method
12490 Use the given HTTP method to create the hls files.
12491
12492 ffmpeg -re -i in.ts -f hls -method PUT http://example.com/live/out.m3u8
12493
12494 This example will upload all the mpegts segment files to the HTTP
12495 server using the HTTP PUT method, and update the m3u8 files every
12496 "refresh" times using the same method. Note that the HTTP server
12497 must support the given method for uploading files.
12498
12499 http_user_agent
12500 Override User-Agent field in HTTP header. Applicable only for HTTP
12501 output.
12502
12503 var_stream_map
12504 Map string which specifies how to group the audio, video and
12505 subtitle streams into different variant streams. The variant stream
12506 groups are separated by space. Expected string format is like this
12507 "a:0,v:0 a:1,v:1 ....". Here a:, v:, s: are the keys to specify
12508 audio, video and subtitle streams respectively. Allowed values are
12509 0 to 9 (limited just based on practical usage).
12510
12511 When there are two or more variant streams, the output filename
12512 pattern must contain the string "%v", this string specifies the
12513 position of variant stream index in the output media playlist
12514 filenames. The string "%v" may be present in the filename or in the
12515 last directory name containing the file. If the string is present
12516 in the directory name, then sub-directories are created after
12517 expanding the directory name pattern. This enables creation of
12518 variant streams in subdirectories.
12519
12520 ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \
12521 -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \
12522 http://example.com/live/out_%v.m3u8
12523
12524 This example creates two hls variant streams. The first variant
12525 stream will contain video stream of bitrate 1000k and audio stream
12526 of bitrate 64k and the second variant stream will contain video
12527 stream of bitrate 256k and audio stream of bitrate 32k. Here, two
12528 media playlist with file names out_0.m3u8 and out_1.m3u8 will be
12529 created. If you want something meaningful text instead of indexes
12530 in result names, you may specify names for each or some of the
12531 variants as in the following example.
12532
12533 ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \
12534 -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0,name:my_hd v:1,a:1,name:my_sd" \
12535 http://example.com/live/out_%v.m3u8
12536
12537 This example creates two hls variant streams as in the previous
12538 one. But here, the two media playlist with file names
12539 out_my_hd.m3u8 and out_my_sd.m3u8 will be created.
12540
12541 ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k \
12542 -map 0:v -map 0:a -map 0:v -f hls -var_stream_map "v:0 a:0 v:1" \
12543 http://example.com/live/out_%v.m3u8
12544
12545 This example creates three hls variant streams. The first variant
12546 stream will be a video only stream with video bitrate 1000k, the
12547 second variant stream will be an audio only stream with bitrate 64k
12548 and the third variant stream will be a video only stream with
12549 bitrate 256k. Here, three media playlist with file names
12550 out_0.m3u8, out_1.m3u8 and out_2.m3u8 will be created.
12551
12552 ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \
12553 -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \
12554 http://example.com/live/vs_%v/out.m3u8
12555
12556 This example creates the variant streams in subdirectories. Here,
12557 the first media playlist is created at
12558 http://example.com/live/vs_0/out.m3u8 and the second one at
12559 http://example.com/live/vs_1/out.m3u8.
12560
12561 ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k -b:v:1 3000k \
12562 -map 0:a -map 0:a -map 0:v -map 0:v -f hls \
12563 -var_stream_map "a:0,agroup:aud_low a:1,agroup:aud_high v:0,agroup:aud_low v:1,agroup:aud_high" \
12564 -master_pl_name master.m3u8 \
12565 http://example.com/live/out_%v.m3u8
12566
12567 This example creates two audio only and two video only variant
12568 streams. In addition to the #EXT-X-STREAM-INF tag for each variant
12569 stream in the master playlist, #EXT-X-MEDIA tag is also added for
12570 the two audio only variant streams and they are mapped to the two
12571 video only variant streams with audio group names 'aud_low' and
12572 'aud_high'.
12573
12574 By default, a single hls variant containing all the encoded streams
12575 is created.
12576
12577 ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \
12578 -map 0:a -map 0:a -map 0:v -f hls \
12579 -var_stream_map "a:0,agroup:aud_low,default:yes a:1,agroup:aud_low v:0,agroup:aud_low" \
12580 -master_pl_name master.m3u8 \
12581 http://example.com/live/out_%v.m3u8
12582
12583 This example creates two audio only and one video only variant
12584 streams. In addition to the #EXT-X-STREAM-INF tag for each variant
12585 stream in the master playlist, #EXT-X-MEDIA tag is also added for
12586 the two audio only variant streams and they are mapped to the one
12587 video only variant streams with audio group name 'aud_low', and the
12588 audio group have default stat is NO or YES.
12589
12590 By default, a single hls variant containing all the encoded streams
12591 is created.
12592
12593 ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \
12594 -map 0:a -map 0:a -map 0:v -f hls \
12595 -var_stream_map "a:0,agroup:aud_low,default:yes,language:ENG a:1,agroup:aud_low,language:CHN v:0,agroup:aud_low" \
12596 -master_pl_name master.m3u8 \
12597 http://example.com/live/out_%v.m3u8
12598
12599 This example creates two audio only and one video only variant
12600 streams. In addition to the #EXT-X-STREAM-INF tag for each variant
12601 stream in the master playlist, #EXT-X-MEDIA tag is also added for
12602 the two audio only variant streams and they are mapped to the one
12603 video only variant streams with audio group name 'aud_low', and the
12604 audio group have default stat is NO or YES, and one audio have and
12605 language is named ENG, the other audio language is named CHN.
12606
12607 By default, a single hls variant containing all the encoded streams
12608 is created.
12609
12610 ffmpeg -y -i input_with_subtitle.mkv \
12611 -b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \
12612 -b:a:0 256k \
12613 -c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0 -map 0:s:0 \
12614 -f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle" \
12615 -master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \
12616 10 -master_pl_publish_rate 10 -hls_flags \
12617 delete_segments+discont_start+split_by_time ./tmp/video.m3u8
12618
12619 This example adds "#EXT-X-MEDIA" tag with "TYPE=SUBTITLES" in the
12620 master playlist with webvtt subtitle group name 'subtitle'. Please
12621 make sure the input file has one text subtitle stream at least.
12622
12623 cc_stream_map
12624 Map string which specifies different closed captions groups and
12625 their attributes. The closed captions stream groups are separated
12626 by space. Expected string format is like this "ccgroup:<group
12627 name>,instreamid:<INSTREAM-ID>,language:<language code> ....".
12628 'ccgroup' and 'instreamid' are mandatory attributes. 'language' is
12629 an optional attribute. The closed captions groups configured using
12630 this option are mapped to different variant streams by providing
12631 the same 'ccgroup' name in the "var_stream_map" string. If
12632 "var_stream_map" is not set, then the first available ccgroup in
12633 "cc_stream_map" is mapped to the output variant stream. The
12634 examples for these two use cases are given below.
12635
12636 ffmpeg -re -i in.ts -b:v 1000k -b:a 64k -a53cc 1 -f hls \
12637 -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" \
12638 -master_pl_name master.m3u8 \
12639 http://example.com/live/out.m3u8
12640
12641 This example adds "#EXT-X-MEDIA" tag with "TYPE=CLOSED-CAPTIONS" in
12642 the master playlist with group name 'cc', language 'en' (english)
12643 and INSTREAM-ID 'CC1'. Also, it adds "CLOSED-CAPTIONS" attribute
12644 with group name 'cc' for the output variant stream.
12645
12646 ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \
12647 -a53cc:0 1 -a53cc:1 1\
12648 -map 0:v -map 0:a -map 0:v -map 0:a -f hls \
12649 -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en ccgroup:cc,instreamid:CC2,language:sp" \
12650 -var_stream_map "v:0,a:0,ccgroup:cc v:1,a:1,ccgroup:cc" \
12651 -master_pl_name master.m3u8 \
12652 http://example.com/live/out_%v.m3u8
12653
12654 This example adds two "#EXT-X-MEDIA" tags with
12655 "TYPE=CLOSED-CAPTIONS" in the master playlist for the INSTREAM-IDs
12656 'CC1' and 'CC2'. Also, it adds "CLOSED-CAPTIONS" attribute with
12657 group name 'cc' for the two output variant streams.
12658
12659 master_pl_name
12660 Create HLS master playlist with the given name.
12661
12662 ffmpeg -re -i in.ts -f hls -master_pl_name master.m3u8 http://example.com/live/out.m3u8
12663
12664 This example creates HLS master playlist with name master.m3u8 and
12665 it is published at http://example.com/live/
12666
12667 master_pl_publish_rate
12668 Publish master play list repeatedly every after specified number of
12669 segment intervals.
12670
12671 ffmpeg -re -i in.ts -f hls -master_pl_name master.m3u8 \
12672 -hls_time 2 -master_pl_publish_rate 30 http://example.com/live/out.m3u8
12673
12674 This example creates HLS master playlist with name master.m3u8 and
12675 keep publishing it repeatedly every after 30 segments i.e. every
12676 after 60s.
12677
12678 http_persistent
12679 Use persistent HTTP connections. Applicable only for HTTP output.
12680
12681 timeout
12682 Set timeout for socket I/O operations. Applicable only for HTTP
12683 output.
12684
12685 -ignore_io_errors
12686 Ignore IO errors during open, write and delete. Useful for long-
12687 duration runs with network output.
12688
12689 headers
12690 Set custom HTTP headers, can override built in default headers.
12691 Applicable only for HTTP output.
12692
12693 ico
12694 ICO file muxer.
12695
12696 Microsoft's icon file format (ICO) has some strict limitations that
12697 should be noted:
12698
12699 • Size cannot exceed 256 pixels in any dimension
12700
12701 • Only BMP and PNG images can be stored
12702
12703 • If a BMP image is used, it must be one of the following pixel
12704 formats:
12705
12706 BMP Bit Depth FFmpeg Pixel Format
12707 1bit pal8
12708 4bit pal8
12709 8bit pal8
12710 16bit rgb555le
12711 24bit bgr24
12712 32bit bgra
12713
12714 • If a BMP image is used, it must use the BITMAPINFOHEADER DIB header
12715
12716 • If a PNG image is used, it must use the rgba pixel format
12717
12718 image2
12719 Image file muxer.
12720
12721 The image file muxer writes video frames to image files.
12722
12723 The output filenames are specified by a pattern, which can be used to
12724 produce sequentially numbered series of files. The pattern may contain
12725 the string "%d" or "%0Nd", this string specifies the position of the
12726 characters representing a numbering in the filenames. If the form
12727 "%0Nd" is used, the string representing the number in each filename is
12728 0-padded to N digits. The literal character '%' can be specified in the
12729 pattern with the string "%%".
12730
12731 If the pattern contains "%d" or "%0Nd", the first filename of the file
12732 list specified will contain the number 1, all the following numbers
12733 will be sequential.
12734
12735 The pattern may contain a suffix which is used to automatically
12736 determine the format of the image files to write.
12737
12738 For example the pattern "img-%03d.bmp" will specify a sequence of
12739 filenames of the form img-001.bmp, img-002.bmp, ..., img-010.bmp, etc.
12740 The pattern "img%%-%d.jpg" will specify a sequence of filenames of the
12741 form img%-1.jpg, img%-2.jpg, ..., img%-10.jpg, etc.
12742
12743 The image muxer supports the .Y.U.V image file format. This format is
12744 special in that that each image frame consists of three files, for each
12745 of the YUV420P components. To read or write this image file format,
12746 specify the name of the '.Y' file. The muxer will automatically open
12747 the '.U' and '.V' files as required.
12748
12749 Options
12750
12751 frame_pts
12752 If set to 1, expand the filename with pts from pkt->pts. Default
12753 value is 0.
12754
12755 start_number
12756 Start the sequence from the specified number. Default value is 1.
12757
12758 update
12759 If set to 1, the filename will always be interpreted as just a
12760 filename, not a pattern, and the corresponding file will be
12761 continuously overwritten with new images. Default value is 0.
12762
12763 strftime
12764 If set to 1, expand the filename with date and time information
12765 from strftime(). Default value is 0.
12766
12767 atomic_writing
12768 Write output to a temporary file, which is renamed to target
12769 filename once writing is completed. Default is disabled.
12770
12771 protocol_opts options_list
12772 Set protocol options as a :-separated list of key=value parameters.
12773 Values containing the ":" special character must be escaped.
12774
12775 Examples
12776
12777 The following example shows how to use ffmpeg for creating a sequence
12778 of files img-001.jpeg, img-002.jpeg, ..., taking one image every second
12779 from the input video:
12780
12781 ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg'
12782
12783 Note that with ffmpeg, if the format is not specified with the "-f"
12784 option and the output filename specifies an image file format, the
12785 image2 muxer is automatically selected, so the previous command can be
12786 written as:
12787
12788 ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg'
12789
12790 Note also that the pattern must not necessarily contain "%d" or "%0Nd",
12791 for example to create a single image file img.jpeg from the start of
12792 the input video you can employ the command:
12793
12794 ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg
12795
12796 The strftime option allows you to expand the filename with date and
12797 time information. Check the documentation of the strftime() function
12798 for the syntax.
12799
12800 For example to generate image files from the strftime()
12801 "%Y-%m-%d_%H-%M-%S" pattern, the following ffmpeg command can be used:
12802
12803 ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg"
12804
12805 You can set the file name with current frame's PTS:
12806
12807 ffmpeg -f v4l2 -r 1 -i /dev/video0 -copyts -f image2 -frame_pts true %d.jpg"
12808
12809 A more complex example is to publish contents of your desktop directly
12810 to a WebDAV server every second:
12811
12812 ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts method=PUT http://example.com/desktop.jpg
12813
12814 matroska
12815 Matroska container muxer.
12816
12817 This muxer implements the matroska and webm container specs.
12818
12819 Metadata
12820
12821 The recognized metadata settings in this muxer are:
12822
12823 title
12824 Set title name provided to a single track. This gets mapped to the
12825 FileDescription element for a stream written as attachment.
12826
12827 language
12828 Specify the language of the track in the Matroska languages form.
12829
12830 The language can be either the 3 letters bibliographic ISO-639-2
12831 (ISO 639-2/B) form (like "fre" for French), or a language code
12832 mixed with a country code for specialities in languages (like "fre-
12833 ca" for Canadian French).
12834
12835 stereo_mode
12836 Set stereo 3D video layout of two views in a single video track.
12837
12838 The following values are recognized:
12839
12840 mono
12841 video is not stereo
12842
12843 left_right
12844 Both views are arranged side by side, Left-eye view is on the
12845 left
12846
12847 bottom_top
12848 Both views are arranged in top-bottom orientation, Left-eye
12849 view is at bottom
12850
12851 top_bottom
12852 Both views are arranged in top-bottom orientation, Left-eye
12853 view is on top
12854
12855 checkerboard_rl
12856 Each view is arranged in a checkerboard interleaved pattern,
12857 Left-eye view being first
12858
12859 checkerboard_lr
12860 Each view is arranged in a checkerboard interleaved pattern,
12861 Right-eye view being first
12862
12863 row_interleaved_rl
12864 Each view is constituted by a row based interleaving, Right-eye
12865 view is first row
12866
12867 row_interleaved_lr
12868 Each view is constituted by a row based interleaving, Left-eye
12869 view is first row
12870
12871 col_interleaved_rl
12872 Both views are arranged in a column based interleaving manner,
12873 Right-eye view is first column
12874
12875 col_interleaved_lr
12876 Both views are arranged in a column based interleaving manner,
12877 Left-eye view is first column
12878
12879 anaglyph_cyan_red
12880 All frames are in anaglyph format viewable through red-cyan
12881 filters
12882
12883 right_left
12884 Both views are arranged side by side, Right-eye view is on the
12885 left
12886
12887 anaglyph_green_magenta
12888 All frames are in anaglyph format viewable through green-
12889 magenta filters
12890
12891 block_lr
12892 Both eyes laced in one Block, Left-eye view is first
12893
12894 block_rl
12895 Both eyes laced in one Block, Right-eye view is first
12896
12897 For example a 3D WebM clip can be created using the following command
12898 line:
12899
12900 ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
12901
12902 Options
12903
12904 This muxer supports the following options:
12905
12906 reserve_index_space
12907 By default, this muxer writes the index for seeking (called cues in
12908 Matroska terms) at the end of the file, because it cannot know in
12909 advance how much space to leave for the index at the beginning of
12910 the file. However for some use cases -- e.g. streaming where
12911 seeking is possible but slow -- it is useful to put the index at
12912 the beginning of the file.
12913
12914 If this option is set to a non-zero value, the muxer will reserve a
12915 given amount of space in the file header and then try to write the
12916 cues there when the muxing finishes. If the reserved space does not
12917 suffice, no Cues will be written, the file will be finalized and
12918 writing the trailer will return an error. A safe size for most use
12919 cases should be about 50kB per hour of video.
12920
12921 Note that cues are only written if the output is seekable and this
12922 option will have no effect if it is not.
12923
12924 cues_to_front
12925 If set, the muxer will write the index at the beginning of the file
12926 by shifting the main data if necessary. This can be combined with
12927 reserve_index_space in which case the data is only shifted if the
12928 initially reserved space turns out to be insufficient.
12929
12930 This option is ignored if the output is unseekable.
12931
12932 default_mode
12933 This option controls how the FlagDefault of the output tracks will
12934 be set. It influences which tracks players should play by default.
12935 The default mode is passthrough.
12936
12937 infer
12938 Every track with disposition default will have the FlagDefault
12939 set. Additionally, for each type of track (audio, video or
12940 subtitle), if no track with disposition default of this type
12941 exists, then the first track of this type will be marked as
12942 default (if existing). This ensures that the default flag is
12943 set in a sensible way even if the input originated from
12944 containers that lack the concept of default tracks.
12945
12946 infer_no_subs
12947 This mode is the same as infer except that if no subtitle track
12948 with disposition default exists, no subtitle track will be
12949 marked as default.
12950
12951 passthrough
12952 In this mode the FlagDefault is set if and only if the
12953 AV_DISPOSITION_DEFAULT flag is set in the disposition of the
12954 corresponding stream.
12955
12956 flipped_raw_rgb
12957 If set to true, store positive height for raw RGB bitmaps, which
12958 indicates bitmap is stored bottom-up. Note that this option does
12959 not flip the bitmap which has to be done manually beforehand, e.g.
12960 by using the vflip filter. Default is false and indicates bitmap
12961 is stored top down.
12962
12963 md5
12964 MD5 testing format.
12965
12966 This is a variant of the hash muxer. Unlike that muxer, it defaults to
12967 using the MD5 hash function.
12968
12969 Examples
12970
12971 To compute the MD5 hash of the input converted to raw audio and video,
12972 and store it in the file out.md5:
12973
12974 ffmpeg -i INPUT -f md5 out.md5
12975
12976 You can print the MD5 to stdout with the command:
12977
12978 ffmpeg -i INPUT -f md5 -
12979
12980 See also the hash and framemd5 muxers.
12981
12982 mov, mp4, ismv
12983 MOV/MP4/ISMV (Smooth Streaming) muxer.
12984
12985 The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 file
12986 has all the metadata about all packets stored in one location (written
12987 at the end of the file, it can be moved to the start for better
12988 playback by adding faststart to the movflags, or using the qt-faststart
12989 tool). A fragmented file consists of a number of fragments, where
12990 packets and metadata about these packets are stored together. Writing a
12991 fragmented file has the advantage that the file is decodable even if
12992 the writing is interrupted (while a normal MOV/MP4 is undecodable if it
12993 is not properly finished), and it requires less memory when writing
12994 very long files (since writing normal MOV/MP4 files stores info about
12995 every single packet in memory until the file is closed). The downside
12996 is that it is less compatible with other applications.
12997
12998 Options
12999
13000 Fragmentation is enabled by setting one of the AVOptions that define
13001 how to cut the file into fragments:
13002
13003 -moov_size bytes
13004 Reserves space for the moov atom at the beginning of the file
13005 instead of placing the moov atom at the end. If the space reserved
13006 is insufficient, muxing will fail.
13007
13008 -movflags frag_keyframe
13009 Start a new fragment at each video keyframe.
13010
13011 -frag_duration duration
13012 Create fragments that are duration microseconds long.
13013
13014 -frag_size size
13015 Create fragments that contain up to size bytes of payload data.
13016
13017 -movflags frag_custom
13018 Allow the caller to manually choose when to cut fragments, by
13019 calling "av_write_frame(ctx, NULL)" to write a fragment with the
13020 packets written so far. (This is only useful with other
13021 applications integrating libavformat, not from ffmpeg.)
13022
13023 -min_frag_duration duration
13024 Don't create fragments that are shorter than duration microseconds
13025 long.
13026
13027 If more than one condition is specified, fragments are cut when one of
13028 the specified conditions is fulfilled. The exception to this is
13029 "-min_frag_duration", which has to be fulfilled for any of the other
13030 conditions to apply.
13031
13032 Additionally, the way the output file is written can be adjusted
13033 through a few other options:
13034
13035 -movflags empty_moov
13036 Write an initial moov atom directly at the start of the file,
13037 without describing any samples in it. Generally, an mdat/moov pair
13038 is written at the start of the file, as a normal MOV/MP4 file,
13039 containing only a short portion of the file. With this option set,
13040 there is no initial mdat atom, and the moov atom only describes the
13041 tracks but has a zero duration.
13042
13043 This option is implicitly set when writing ismv (Smooth Streaming)
13044 files.
13045
13046 -movflags separate_moof
13047 Write a separate moof (movie fragment) atom for each track.
13048 Normally, packets for all tracks are written in a moof atom (which
13049 is slightly more efficient), but with this option set, the muxer
13050 writes one moof/mdat pair for each track, making it easier to
13051 separate tracks.
13052
13053 This option is implicitly set when writing ismv (Smooth Streaming)
13054 files.
13055
13056 -movflags skip_sidx
13057 Skip writing of sidx atom. When bitrate overhead due to sidx atom
13058 is high, this option could be used for cases where sidx atom is not
13059 mandatory. When global_sidx flag is enabled, this option will be
13060 ignored.
13061
13062 -movflags faststart
13063 Run a second pass moving the index (moov atom) to the beginning of
13064 the file. This operation can take a while, and will not work in
13065 various situations such as fragmented output, thus it is not
13066 enabled by default.
13067
13068 -movflags rtphint
13069 Add RTP hinting tracks to the output file.
13070
13071 -movflags disable_chpl
13072 Disable Nero chapter markers (chpl atom). Normally, both Nero
13073 chapters and a QuickTime chapter track are written to the file.
13074 With this option set, only the QuickTime chapter track will be
13075 written. Nero chapters can cause failures when the file is
13076 reprocessed with certain tagging programs, like mp3Tag 2.61a and
13077 iTunes 11.3, most likely other versions are affected as well.
13078
13079 -movflags omit_tfhd_offset
13080 Do not write any absolute base_data_offset in tfhd atoms. This
13081 avoids tying fragments to absolute byte positions in the
13082 file/streams.
13083
13084 -movflags default_base_moof
13085 Similarly to the omit_tfhd_offset, this flag avoids writing the
13086 absolute base_data_offset field in tfhd atoms, but does so by using
13087 the new default-base-is-moof flag instead. This flag is new from
13088 14496-12:2012. This may make the fragments easier to parse in
13089 certain circumstances (avoiding basing track fragment location
13090 calculations on the implicit end of the previous track fragment).
13091
13092 -write_tmcd
13093 Specify "on" to force writing a timecode track, "off" to disable it
13094 and "auto" to write a timecode track only for mov and mp4 output
13095 (default).
13096
13097 -movflags negative_cts_offsets
13098 Enables utilization of version 1 of the CTTS box, in which the CTS
13099 offsets can be negative. This enables the initial sample to have
13100 DTS/CTS of zero, and reduces the need for edit lists for some cases
13101 such as video tracks with B-frames. Additionally, eases conformance
13102 with the DASH-IF interoperability guidelines.
13103
13104 This option is implicitly set when writing ismv (Smooth Streaming)
13105 files.
13106
13107 -write_btrt bool
13108 Force or disable writing bitrate box inside stsd box of a track.
13109 The box contains decoding buffer size (in bytes), maximum bitrate
13110 and average bitrate for the track. The box will be skipped if none
13111 of these values can be computed. Default is -1 or "auto", which
13112 will write the box only in MP4 mode.
13113
13114 -write_prft
13115 Write producer time reference box (PRFT) with a specified time
13116 source for the NTP field in the PRFT box. Set value as wallclock to
13117 specify timesource as wallclock time and pts to specify timesource
13118 as input packets' PTS values.
13119
13120 Setting value to pts is applicable only for a live encoding use
13121 case, where PTS values are set as as wallclock time at the source.
13122 For example, an encoding use case with decklink capture source
13123 where video_pts and audio_pts are set to abs_wallclock.
13124
13125 -empty_hdlr_name bool
13126 Enable to skip writing the name inside a "hdlr" box. Default is
13127 "false".
13128
13129 -movie_timescale scale
13130 Set the timescale written in the movie header box ("mvhd"). Range
13131 is 1 to INT_MAX. Default is 1000.
13132
13133 -video_track_timescale scale
13134 Set the timescale used for video tracks. Range is 0 to INT_MAX. If
13135 set to 0, the timescale is automatically set based on the native
13136 stream time base. Default is 0.
13137
13138 Example
13139
13140 Smooth Streaming content can be pushed in real time to a publishing
13141 point on IIS with this muxer. Example:
13142
13143 ffmpeg -re <<normal input/transcoding options>> -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
13144
13145 mp3
13146 The MP3 muxer writes a raw MP3 stream with the following optional
13147 features:
13148
13149 • An ID3v2 metadata header at the beginning (enabled by default).
13150 Versions 2.3 and 2.4 are supported, the "id3v2_version" private
13151 option controls which one is used (3 or 4). Setting "id3v2_version"
13152 to 0 disables the ID3v2 header completely.
13153
13154 The muxer supports writing attached pictures (APIC frames) to the
13155 ID3v2 header. The pictures are supplied to the muxer in form of a
13156 video stream with a single packet. There can be any number of those
13157 streams, each will correspond to a single APIC frame. The stream
13158 metadata tags title and comment map to APIC description and picture
13159 type respectively. See <http://id3.org/id3v2.4.0-frames> for
13160 allowed picture types.
13161
13162 Note that the APIC frames must be written at the beginning, so the
13163 muxer will buffer the audio frames until it gets all the pictures.
13164 It is therefore advised to provide the pictures as soon as possible
13165 to avoid excessive buffering.
13166
13167 • A Xing/LAME frame right after the ID3v2 header (if present). It is
13168 enabled by default, but will be written only if the output is
13169 seekable. The "write_xing" private option can be used to disable
13170 it. The frame contains various information that may be useful to
13171 the decoder, like the audio duration or encoder delay.
13172
13173 • A legacy ID3v1 tag at the end of the file (disabled by default). It
13174 may be enabled with the "write_id3v1" private option, but as its
13175 capabilities are very limited, its usage is not recommended.
13176
13177 Examples:
13178
13179 Write an mp3 with an ID3v2.3 header and an ID3v1 footer:
13180
13181 ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3
13182
13183 To attach a picture to an mp3 file select both the audio and the
13184 picture stream with "map":
13185
13186 ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1
13187 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
13188
13189 Write a "clean" MP3 without any extra features:
13190
13191 ffmpeg -i input.wav -write_xing 0 -id3v2_version 0 out.mp3
13192
13193 mpegts
13194 MPEG transport stream muxer.
13195
13196 This muxer implements ISO 13818-1 and part of ETSI EN 300 468.
13197
13198 The recognized metadata settings in mpegts muxer are "service_provider"
13199 and "service_name". If they are not set the default for
13200 "service_provider" is FFmpeg and the default for "service_name" is
13201 Service01.
13202
13203 Options
13204
13205 The muxer options are:
13206
13207 mpegts_transport_stream_id integer
13208 Set the transport_stream_id. This identifies a transponder in DVB.
13209 Default is 0x0001.
13210
13211 mpegts_original_network_id integer
13212 Set the original_network_id. This is unique identifier of a network
13213 in DVB. Its main use is in the unique identification of a service
13214 through the path Original_Network_ID, Transport_Stream_ID. Default
13215 is 0x0001.
13216
13217 mpegts_service_id integer
13218 Set the service_id, also known as program in DVB. Default is
13219 0x0001.
13220
13221 mpegts_service_type integer
13222 Set the program service_type. Default is "digital_tv". Accepts the
13223 following options:
13224
13225 hex_value
13226 Any hexadecimal value between 0x01 and 0xff as defined in ETSI
13227 300 468.
13228
13229 digital_tv
13230 Digital TV service.
13231
13232 digital_radio
13233 Digital Radio service.
13234
13235 teletext
13236 Teletext service.
13237
13238 advanced_codec_digital_radio
13239 Advanced Codec Digital Radio service.
13240
13241 mpeg2_digital_hdtv
13242 MPEG2 Digital HDTV service.
13243
13244 advanced_codec_digital_sdtv
13245 Advanced Codec Digital SDTV service.
13246
13247 advanced_codec_digital_hdtv
13248 Advanced Codec Digital HDTV service.
13249
13250 mpegts_pmt_start_pid integer
13251 Set the first PID for PMTs. Default is 0x1000, minimum is 0x0020,
13252 maximum is 0x1ffa. This option has no effect in m2ts mode where the
13253 PMT PID is fixed 0x0100.
13254
13255 mpegts_start_pid integer
13256 Set the first PID for elementary streams. Default is 0x0100,
13257 minimum is 0x0020, maximum is 0x1ffa. This option has no effect in
13258 m2ts mode where the elementary stream PIDs are fixed.
13259
13260 mpegts_m2ts_mode boolean
13261 Enable m2ts mode if set to 1. Default value is -1 which disables
13262 m2ts mode.
13263
13264 muxrate integer
13265 Set a constant muxrate. Default is VBR.
13266
13267 pes_payload_size integer
13268 Set minimum PES packet payload in bytes. Default is 2930.
13269
13270 mpegts_flags flags
13271 Set mpegts flags. Accepts the following options:
13272
13273 resend_headers
13274 Reemit PAT/PMT before writing the next packet.
13275
13276 latm
13277 Use LATM packetization for AAC.
13278
13279 pat_pmt_at_frames
13280 Reemit PAT and PMT at each video frame.
13281
13282 system_b
13283 Conform to System B (DVB) instead of System A (ATSC).
13284
13285 initial_discontinuity
13286 Mark the initial packet of each stream as discontinuity.
13287
13288 nit Emit NIT table.
13289
13290 omit_rai
13291 Disable writing of random access indicator.
13292
13293 mpegts_copyts boolean
13294 Preserve original timestamps, if value is set to 1. Default value
13295 is -1, which results in shifting timestamps so that they start from
13296 0.
13297
13298 omit_video_pes_length boolean
13299 Omit the PES packet length for video packets. Default is 1 (true).
13300
13301 pcr_period integer
13302 Override the default PCR retransmission time in milliseconds.
13303 Default is -1 which means that the PCR interval will be determined
13304 automatically: 20 ms is used for CBR streams, the highest multiple
13305 of the frame duration which is less than 100 ms is used for VBR
13306 streams.
13307
13308 pat_period duration
13309 Maximum time in seconds between PAT/PMT tables. Default is 0.1.
13310
13311 sdt_period duration
13312 Maximum time in seconds between SDT tables. Default is 0.5.
13313
13314 nit_period duration
13315 Maximum time in seconds between NIT tables. Default is 0.5.
13316
13317 tables_version integer
13318 Set PAT, PMT, SDT and NIT version (default 0, valid values are from
13319 0 to 31, inclusively). This option allows updating stream
13320 structure so that standard consumer may detect the change. To do
13321 so, reopen output "AVFormatContext" (in case of API usage) or
13322 restart ffmpeg instance, cyclically changing tables_version value:
13323
13324 ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111
13325 ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111
13326 ...
13327 ffmpeg -i source3.ts -codec copy -f mpegts -tables_version 31 udp://1.1.1.1:1111
13328 ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111
13329 ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111
13330 ...
13331
13332 Example
13333
13334 ffmpeg -i file.mpg -c copy \
13335 -mpegts_original_network_id 0x1122 \
13336 -mpegts_transport_stream_id 0x3344 \
13337 -mpegts_service_id 0x5566 \
13338 -mpegts_pmt_start_pid 0x1500 \
13339 -mpegts_start_pid 0x150 \
13340 -metadata service_provider="Some provider" \
13341 -metadata service_name="Some Channel" \
13342 out.ts
13343
13344 mxf, mxf_d10, mxf_opatom
13345 MXF muxer.
13346
13347 Options
13348
13349 The muxer options are:
13350
13351 store_user_comments bool
13352 Set if user comments should be stored if available or never. IRT
13353 D-10 does not allow user comments. The default is thus to write
13354 them for mxf and mxf_opatom but not for mxf_d10
13355
13356 null
13357 Null muxer.
13358
13359 This muxer does not generate any output file, it is mainly useful for
13360 testing or benchmarking purposes.
13361
13362 For example to benchmark decoding with ffmpeg you can use the command:
13363
13364 ffmpeg -benchmark -i INPUT -f null out.null
13365
13366 Note that the above command does not read or write the out.null file,
13367 but specifying the output file is required by the ffmpeg syntax.
13368
13369 Alternatively you can write the command as:
13370
13371 ffmpeg -benchmark -i INPUT -f null -
13372
13373 nut
13374 -syncpoints flags
13375 Change the syncpoint usage in nut:
13376
13377 default use the normal low-overhead seeking aids.
13378 none do not use the syncpoints at all, reducing the overhead but
13379 making the stream non-seekable;
13380 Use of this option is not recommended, as the resulting files are very damage
13381 sensitive and seeking is not possible. Also in general the overhead from
13382 syncpoints is negligible. Note, -C<write_index> 0 can be used to disable
13383 all growing data tables, allowing to mux endless streams with limited memory
13384 and without these disadvantages.
13385
13386 timestamped extend the syncpoint with a wallclock field.
13387
13388 The none and timestamped flags are experimental.
13389
13390 -write_index bool
13391 Write index at the end, the default is to write an index.
13392
13393 ffmpeg -i INPUT -f_strict experimental -syncpoints none - | processor
13394
13395 ogg
13396 Ogg container muxer.
13397
13398 -page_duration duration
13399 Preferred page duration, in microseconds. The muxer will attempt to
13400 create pages that are approximately duration microseconds long.
13401 This allows the user to compromise between seek granularity and
13402 container overhead. The default is 1 second. A value of 0 will fill
13403 all segments, making pages as large as possible. A value of 1 will
13404 effectively use 1 packet-per-page in most situations, giving a
13405 small seek granularity at the cost of additional container
13406 overhead.
13407
13408 -serial_offset value
13409 Serial value from which to set the streams serial number. Setting
13410 it to different and sufficiently large values ensures that the
13411 produced ogg files can be safely chained.
13412
13413 raw muxers
13414 Raw muxers accept a single stream matching the designated codec. They
13415 do not store timestamps or metadata. The recognized extension is the
13416 same as the muxer name unless indicated otherwise.
13417
13418 ac3
13419
13420 Dolby Digital, also known as AC-3, audio.
13421
13422 adx
13423
13424 CRI Middleware ADX audio.
13425
13426 This muxer will write out the total sample count near the start of the
13427 first packet when the output is seekable and the count can be stored in
13428 32 bits.
13429
13430 aptx
13431
13432 aptX (Audio Processing Technology for Bluetooth) audio.
13433
13434 aptx_hd
13435
13436 aptX HD (Audio Processing Technology for Bluetooth) audio.
13437
13438 Extensions: aptxhd
13439
13440 avs2
13441
13442 AVS2-P2/IEEE1857.4 video.
13443
13444 Extensions: avs, avs2
13445
13446 cavsvideo
13447
13448 Chinese AVS (Audio Video Standard) video.
13449
13450 Extensions: cavs
13451
13452 codec2raw
13453
13454 Codec 2 audio.
13455
13456 No extension is registered so format name has to be supplied e.g. with
13457 the ffmpeg CLI tool "-f codec2raw".
13458
13459 data
13460
13461 Data muxer accepts a single stream with any codec of any type. The
13462 input stream has to be selected using the "-map" option with the ffmpeg
13463 CLI tool.
13464
13465 No extension is registered so format name has to be supplied e.g. with
13466 the ffmpeg CLI tool "-f data".
13467
13468 dirac
13469
13470 BBC Dirac video. The Dirac Pro codec is a subset and is standardized as
13471 SMPTE VC-2.
13472
13473 Extensions: drc, vc2
13474
13475 dnxhd
13476
13477 Avid DNxHD video. It is standardized as SMPTE VC-3. Accepts DNxHR
13478 streams.
13479
13480 Extensions: dnxhd, dnxhr
13481
13482 dts
13483
13484 DTS Coherent Acoustics (DCA) audio.
13485
13486 eac3
13487
13488 Dolby Digital Plus, also known as Enhanced AC-3, audio.
13489
13490 g722
13491
13492 ITU-T G.722 audio.
13493
13494 g723_1
13495
13496 ITU-T G.723.1 audio.
13497
13498 Extensions: tco, rco
13499
13500 g726
13501
13502 ITU-T G.726 big-endian ("left-justified") audio.
13503
13504 No extension is registered so format name has to be supplied e.g. with
13505 the ffmpeg CLI tool "-f g726".
13506
13507 g726le
13508
13509 ITU-T G.726 little-endian ("right-justified") audio.
13510
13511 No extension is registered so format name has to be supplied e.g. with
13512 the ffmpeg CLI tool "-f g726le".
13513
13514 gsm
13515
13516 Global System for Mobile Communications audio.
13517
13518 h261
13519
13520 ITU-T H.261 video.
13521
13522 h263
13523
13524 ITU-T H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 video.
13525
13526 h264
13527
13528 ITU-T H.264 / MPEG-4 Part 10 AVC video. Bitstream shall be converted to
13529 Annex B syntax if it's in length-prefixed mode.
13530
13531 Extensions: h264, 264
13532
13533 hevc
13534
13535 ITU-T H.265 / MPEG-H Part 2 HEVC video. Bitstream shall be converted to
13536 Annex B syntax if it's in length-prefixed mode.
13537
13538 Extensions: hevc, h265, 265
13539
13540 m4v
13541
13542 MPEG-4 Part 2 video.
13543
13544 mjpeg
13545
13546 Motion JPEG video.
13547
13548 Extensions: mjpg, mjpeg
13549
13550 mlp
13551
13552 Meridian Lossless Packing, also known as Packed PCM, audio.
13553
13554 mp2
13555
13556 MPEG-1 Audio Layer II audio.
13557
13558 Extensions: mp2, m2a, mpa
13559
13560 mpeg1video
13561
13562 MPEG-1 Part 2 video.
13563
13564 Extensions: mpg, mpeg, m1v
13565
13566 mpeg2video
13567
13568 ITU-T H.262 / MPEG-2 Part 2 video.
13569
13570 Extensions: m2v
13571
13572 obu
13573
13574 AV1 low overhead Open Bitstream Units muxer. Temporal delimiter OBUs
13575 will be inserted in all temporal units of the stream.
13576
13577 rawvideo
13578
13579 Raw uncompressed video.
13580
13581 Extensions: yuv, rgb
13582
13583 sbc
13584
13585 Bluetooth SIG low-complexity subband codec audio.
13586
13587 Extensions: sbc, msbc
13588
13589 truehd
13590
13591 Dolby TrueHD audio.
13592
13593 Extensions: thd
13594
13595 vc1
13596
13597 SMPTE 421M / VC-1 video.
13598
13599 segment, stream_segment, ssegment
13600 Basic stream segmenter.
13601
13602 This muxer outputs streams to a number of separate files of nearly
13603 fixed duration. Output filename pattern can be set in a fashion similar
13604 to image2, or by using a "strftime" template if the strftime option is
13605 enabled.
13606
13607 "stream_segment" is a variant of the muxer used to write to streaming
13608 output formats, i.e. which do not require global headers, and is
13609 recommended for outputting e.g. to MPEG transport stream segments.
13610 "ssegment" is a shorter alias for "stream_segment".
13611
13612 Every segment starts with a keyframe of the selected reference stream,
13613 which is set through the reference_stream option.
13614
13615 Note that if you want accurate splitting for a video file, you need to
13616 make the input key frames correspond to the exact splitting times
13617 expected by the segmenter, or the segment muxer will start the new
13618 segment with the key frame found next after the specified start time.
13619
13620 The segment muxer works best with a single constant frame rate video.
13621
13622 Optionally it can generate a list of the created segments, by setting
13623 the option segment_list. The list type is specified by the
13624 segment_list_type option. The entry filenames in the segment list are
13625 set by default to the basename of the corresponding segment files.
13626
13627 See also the hls muxer, which provides a more specific implementation
13628 for HLS segmentation.
13629
13630 Options
13631
13632 The segment muxer supports the following options:
13633
13634 increment_tc 1|0
13635 if set to 1, increment timecode between each segment If this is
13636 selected, the input need to have a timecode in the first video
13637 stream. Default value is 0.
13638
13639 reference_stream specifier
13640 Set the reference stream, as specified by the string specifier. If
13641 specifier is set to "auto", the reference is chosen automatically.
13642 Otherwise it must be a stream specifier (see the ``Stream
13643 specifiers'' chapter in the ffmpeg manual) which specifies the
13644 reference stream. The default value is "auto".
13645
13646 segment_format format
13647 Override the inner container format, by default it is guessed by
13648 the filename extension.
13649
13650 segment_format_options options_list
13651 Set output format options using a :-separated list of key=value
13652 parameters. Values containing the ":" special character must be
13653 escaped.
13654
13655 segment_list name
13656 Generate also a listfile named name. If not specified no listfile
13657 is generated.
13658
13659 segment_list_flags flags
13660 Set flags affecting the segment list generation.
13661
13662 It currently supports the following flags:
13663
13664 cache
13665 Allow caching (only affects M3U8 list files).
13666
13667 live
13668 Allow live-friendly file generation.
13669
13670 segment_list_size size
13671 Update the list file so that it contains at most size segments. If
13672 0 the list file will contain all the segments. Default value is 0.
13673
13674 segment_list_entry_prefix prefix
13675 Prepend prefix to each entry. Useful to generate absolute paths.
13676 By default no prefix is applied.
13677
13678 segment_list_type type
13679 Select the listing format.
13680
13681 The following values are recognized:
13682
13683 flat
13684 Generate a flat list for the created segments, one segment per
13685 line.
13686
13687 csv, ext
13688 Generate a list for the created segments, one segment per line,
13689 each line matching the format (comma-separated values):
13690
13691 <segment_filename>,<segment_start_time>,<segment_end_time>
13692
13693 segment_filename is the name of the output file generated by
13694 the muxer according to the provided pattern. CSV escaping
13695 (according to RFC4180) is applied if required.
13696
13697 segment_start_time and segment_end_time specify the segment
13698 start and end time expressed in seconds.
13699
13700 A list file with the suffix ".csv" or ".ext" will auto-select
13701 this format.
13702
13703 ext is deprecated in favor or csv.
13704
13705 ffconcat
13706 Generate an ffconcat file for the created segments. The
13707 resulting file can be read using the FFmpeg concat demuxer.
13708
13709 A list file with the suffix ".ffcat" or ".ffconcat" will auto-
13710 select this format.
13711
13712 m3u8
13713 Generate an extended M3U8 file, version 3, compliant with
13714 <http://tools.ietf.org/id/draft-pantos-http-live-streaming>.
13715
13716 A list file with the suffix ".m3u8" will auto-select this
13717 format.
13718
13719 If not specified the type is guessed from the list file name
13720 suffix.
13721
13722 segment_time time
13723 Set segment duration to time, the value must be a duration
13724 specification. Default value is "2". See also the segment_times
13725 option.
13726
13727 Note that splitting may not be accurate, unless you force the
13728 reference stream key-frames at the given time. See the introductory
13729 notice and the examples below.
13730
13731 min_seg_duration time
13732 Set minimum segment duration to time, the value must be a duration
13733 specification. This prevents the muxer ending segments at a
13734 duration below this value. Only effective with "segment_time".
13735 Default value is "0".
13736
13737 segment_atclocktime 1|0
13738 If set to "1" split at regular clock time intervals starting from
13739 00:00 o'clock. The time value specified in segment_time is used for
13740 setting the length of the splitting interval.
13741
13742 For example with segment_time set to "900" this makes it possible
13743 to create files at 12:00 o'clock, 12:15, 12:30, etc.
13744
13745 Default value is "0".
13746
13747 segment_clocktime_offset duration
13748 Delay the segment splitting times with the specified duration when
13749 using segment_atclocktime.
13750
13751 For example with segment_time set to "900" and
13752 segment_clocktime_offset set to "300" this makes it possible to
13753 create files at 12:05, 12:20, 12:35, etc.
13754
13755 Default value is "0".
13756
13757 segment_clocktime_wrap_duration duration
13758 Force the segmenter to only start a new segment if a packet reaches
13759 the muxer within the specified duration after the segmenting clock
13760 time. This way you can make the segmenter more resilient to
13761 backward local time jumps, such as leap seconds or transition to
13762 standard time from daylight savings time.
13763
13764 Default is the maximum possible duration which means starting a new
13765 segment regardless of the elapsed time since the last clock time.
13766
13767 segment_time_delta delta
13768 Specify the accuracy time when selecting the start time for a
13769 segment, expressed as a duration specification. Default value is
13770 "0".
13771
13772 When delta is specified a key-frame will start a new segment if its
13773 PTS satisfies the relation:
13774
13775 PTS >= start_time - time_delta
13776
13777 This option is useful when splitting video content, which is always
13778 split at GOP boundaries, in case a key frame is found just before
13779 the specified split time.
13780
13781 In particular may be used in combination with the ffmpeg option
13782 force_key_frames. The key frame times specified by force_key_frames
13783 may not be set accurately because of rounding issues, with the
13784 consequence that a key frame time may result set just before the
13785 specified time. For constant frame rate videos a value of
13786 1/(2*frame_rate) should address the worst case mismatch between the
13787 specified time and the time set by force_key_frames.
13788
13789 segment_times times
13790 Specify a list of split points. times contains a list of comma
13791 separated duration specifications, in increasing order. See also
13792 the segment_time option.
13793
13794 segment_frames frames
13795 Specify a list of split video frame numbers. frames contains a list
13796 of comma separated integer numbers, in increasing order.
13797
13798 This option specifies to start a new segment whenever a reference
13799 stream key frame is found and the sequential number (starting from
13800 0) of the frame is greater or equal to the next value in the list.
13801
13802 segment_wrap limit
13803 Wrap around segment index once it reaches limit.
13804
13805 segment_start_number number
13806 Set the sequence number of the first segment. Defaults to 0.
13807
13808 strftime 1|0
13809 Use the "strftime" function to define the name of the new segments
13810 to write. If this is selected, the output segment name must contain
13811 a "strftime" function template. Default value is 0.
13812
13813 break_non_keyframes 1|0
13814 If enabled, allow segments to start on frames other than keyframes.
13815 This improves behavior on some players when the time between
13816 keyframes is inconsistent, but may make things worse on others, and
13817 can cause some oddities during seeking. Defaults to 0.
13818
13819 reset_timestamps 1|0
13820 Reset timestamps at the beginning of each segment, so that each
13821 segment will start with near-zero timestamps. It is meant to ease
13822 the playback of the generated segments. May not work with some
13823 combinations of muxers/codecs. It is set to 0 by default.
13824
13825 initial_offset offset
13826 Specify timestamp offset to apply to the output packet timestamps.
13827 The argument must be a time duration specification, and defaults to
13828 0.
13829
13830 write_empty_segments 1|0
13831 If enabled, write an empty segment if there are no packets during
13832 the period a segment would usually span. Otherwise, the segment
13833 will be filled with the next packet written. Defaults to 0.
13834
13835 Make sure to require a closed GOP when encoding and to set the GOP size
13836 to fit your segment time constraint.
13837
13838 Examples
13839
13840 • Remux the content of file in.mkv to a list of segments out-000.nut,
13841 out-001.nut, etc., and write the list of generated segments to
13842 out.list:
13843
13844 ffmpeg -i in.mkv -codec hevc -flags +cgop -g 60 -map 0 -f segment -segment_list out.list out%03d.nut
13845
13846 • Segment input and set output format options for the output
13847 segments:
13848
13849 ffmpeg -i in.mkv -f segment -segment_time 10 -segment_format_options movflags=+faststart out%03d.mp4
13850
13851 • Segment the input file according to the split points specified by
13852 the segment_times option:
13853
13854 ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 out%03d.nut
13855
13856 • Use the ffmpeg force_key_frames option to force key frames in the
13857 input at the specified location, together with the segment option
13858 segment_time_delta to account for possible roundings operated when
13859 setting key frame times.
13860
13861 ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 \
13862 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 -segment_time_delta 0.05 out%03d.nut
13863
13864 In order to force key frames on the input file, transcoding is
13865 required.
13866
13867 • Segment the input file by splitting the input file according to the
13868 frame numbers sequence specified with the segment_frames option:
13869
13870 ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut
13871
13872 • Convert the in.mkv to TS segments using the "libx264" and "aac"
13873 encoders:
13874
13875 ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a aac -f ssegment -segment_list out.list out%03d.ts
13876
13877 • Segment the input file, and create an M3U8 live playlist (can be
13878 used as live HLS source):
13879
13880 ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 \
13881 -segment_list_flags +live -segment_time 10 out%03d.mkv
13882
13883 smoothstreaming
13884 Smooth Streaming muxer generates a set of files (Manifest, chunks)
13885 suitable for serving with conventional web server.
13886
13887 window_size
13888 Specify the number of fragments kept in the manifest. Default 0
13889 (keep all).
13890
13891 extra_window_size
13892 Specify the number of fragments kept outside of the manifest before
13893 removing from disk. Default 5.
13894
13895 lookahead_count
13896 Specify the number of lookahead fragments. Default 2.
13897
13898 min_frag_duration
13899 Specify the minimum fragment duration (in microseconds). Default
13900 5000000.
13901
13902 remove_at_exit
13903 Specify whether to remove all fragments when finished. Default 0
13904 (do not remove).
13905
13906 streamhash
13907 Per stream hash testing format.
13908
13909 This muxer computes and prints a cryptographic hash of all the input
13910 frames, on a per-stream basis. This can be used for equality checks
13911 without having to do a complete binary comparison.
13912
13913 By default audio frames are converted to signed 16-bit raw audio and
13914 video frames to raw video before computing the hash, but the output of
13915 explicit conversions to other codecs can also be used. Timestamps are
13916 ignored. It uses the SHA-256 cryptographic hash function by default,
13917 but supports several other algorithms.
13918
13919 The output of the muxer consists of one line per stream of the form:
13920 streamindex,streamtype,algo=hash, where streamindex is the index of the
13921 mapped stream, streamtype is a single character indicating the type of
13922 stream, algo is a short string representing the hash function used, and
13923 hash is a hexadecimal number representing the computed hash.
13924
13925 hash algorithm
13926 Use the cryptographic hash function specified by the string
13927 algorithm. Supported values include "MD5", "murmur3", "RIPEMD128",
13928 "RIPEMD160", "RIPEMD256", "RIPEMD320", "SHA160", "SHA224", "SHA256"
13929 (default), "SHA512/224", "SHA512/256", "SHA384", "SHA512", "CRC32"
13930 and "adler32".
13931
13932 Examples
13933
13934 To compute the SHA-256 hash of the input converted to raw audio and
13935 video, and store it in the file out.sha256:
13936
13937 ffmpeg -i INPUT -f streamhash out.sha256
13938
13939 To print an MD5 hash to stdout use the command:
13940
13941 ffmpeg -i INPUT -f streamhash -hash md5 -
13942
13943 See also the hash and framehash muxers.
13944
13945 tee
13946 The tee muxer can be used to write the same data to several outputs,
13947 such as files or streams. It can be used, for example, to stream a
13948 video over a network and save it to disk at the same time.
13949
13950 It is different from specifying several outputs to the ffmpeg command-
13951 line tool. With the tee muxer, the audio and video data will be encoded
13952 only once. With conventional multiple outputs, multiple encoding
13953 operations in parallel are initiated, which can be a very expensive
13954 process. The tee muxer is not useful when using the libavformat API
13955 directly because it is then possible to feed the same packets to
13956 several muxers directly.
13957
13958 Since the tee muxer does not represent any particular output format,
13959 ffmpeg cannot auto-select output streams. So all streams intended for
13960 output must be specified using "-map". See the examples below.
13961
13962 Some encoders may need different options depending on the output
13963 format; the auto-detection of this can not work with the tee muxer, so
13964 they need to be explicitly specified. The main example is the
13965 global_header flag.
13966
13967 The slave outputs are specified in the file name given to the muxer,
13968 separated by '|'. If any of the slave name contains the '|' separator,
13969 leading or trailing spaces or any special character, those must be
13970 escaped (see the "Quoting and escaping" section in the ffmpeg-utils(1)
13971 manual).
13972
13973 Options
13974
13975 use_fifo bool
13976 If set to 1, slave outputs will be processed in separate threads
13977 using the fifo muxer. This allows to compensate for different
13978 speed/latency/reliability of outputs and setup transparent
13979 recovery. By default this feature is turned off.
13980
13981 fifo_options
13982 Options to pass to fifo pseudo-muxer instances. See fifo.
13983
13984 Muxer options can be specified for each slave by prepending them as a
13985 list of key=value pairs separated by ':', between square brackets. If
13986 the options values contain a special character or the ':' separator,
13987 they must be escaped; note that this is a second level escaping.
13988
13989 The following special options are also recognized:
13990
13991 f Specify the format name. Required if it cannot be guessed from the
13992 output URL.
13993
13994 bsfs[/spec]
13995 Specify a list of bitstream filters to apply to the specified
13996 output.
13997
13998 It is possible to specify to which streams a given bitstream filter
13999 applies, by appending a stream specifier to the option separated by
14000 "/". spec must be a stream specifier (see Format stream
14001 specifiers).
14002
14003 If the stream specifier is not specified, the bitstream filters
14004 will be applied to all streams in the output. This will cause that
14005 output operation to fail if the output contains streams to which
14006 the bitstream filter cannot be applied e.g. "h264_mp4toannexb"
14007 being applied to an output containing an audio stream.
14008
14009 Options for a bitstream filter must be specified in the form of
14010 "opt=value".
14011
14012 Several bitstream filters can be specified, separated by ",".
14013
14014 use_fifo bool
14015 This allows to override tee muxer use_fifo option for individual
14016 slave muxer.
14017
14018 fifo_options
14019 This allows to override tee muxer fifo_options for individual slave
14020 muxer. See fifo.
14021
14022 select
14023 Select the streams that should be mapped to the slave output,
14024 specified by a stream specifier. If not specified, this defaults to
14025 all the mapped streams. This will cause that output operation to
14026 fail if the output format does not accept all mapped streams.
14027
14028 You may use multiple stream specifiers separated by commas (",")
14029 e.g.: "a:0,v"
14030
14031 onfail
14032 Specify behaviour on output failure. This can be set to either
14033 "abort" (which is default) or "ignore". "abort" will cause whole
14034 process to fail in case of failure on this slave output. "ignore"
14035 will ignore failure on this output, so other outputs will continue
14036 without being affected.
14037
14038 Examples
14039
14040 • Encode something and both archive it in a WebM file and stream it
14041 as MPEG-TS over UDP:
14042
14043 ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
14044 "archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
14045
14046 • As above, but continue streaming even if output to local file fails
14047 (for example local drive fills up):
14048
14049 ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
14050 "[onfail=ignore]archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
14051
14052 • Use ffmpeg to encode the input, and send the output to three
14053 different destinations. The "dump_extra" bitstream filter is used
14054 to add extradata information to all the output video keyframes
14055 packets, as requested by the MPEG-TS format. The select option is
14056 applied to out.aac in order to make it contain only audio packets.
14057
14058 ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac
14059 -f tee "[bsfs/v=dump_extra=freq=keyframe]out.ts|[movflags=+faststart]out.mp4|[select=a]out.aac"
14060
14061 • As above, but select only stream "a:1" for the audio output. Note
14062 that a second level escaping must be performed, as ":" is a special
14063 character used to separate options.
14064
14065 ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac
14066 -f tee "[bsfs/v=dump_extra=freq=keyframe]out.ts|[movflags=+faststart]out.mp4|[select=\'a:1\']out.aac"
14067
14068 webm_chunk
14069 WebM Live Chunk Muxer.
14070
14071 This muxer writes out WebM headers and chunks as separate files which
14072 can be consumed by clients that support WebM Live streams via DASH.
14073
14074 Options
14075
14076 This muxer supports the following options:
14077
14078 chunk_start_index
14079 Index of the first chunk (defaults to 0).
14080
14081 header
14082 Filename of the header where the initialization data will be
14083 written.
14084
14085 audio_chunk_duration
14086 Duration of each audio chunk in milliseconds (defaults to 5000).
14087
14088 Example
14089
14090 ffmpeg -f v4l2 -i /dev/video0 \
14091 -f alsa -i hw:0 \
14092 -map 0:0 \
14093 -c:v libvpx-vp9 \
14094 -s 640x360 -keyint_min 30 -g 30 \
14095 -f webm_chunk \
14096 -header webm_live_video_360.hdr \
14097 -chunk_start_index 1 \
14098 webm_live_video_360_%d.chk \
14099 -map 1:0 \
14100 -c:a libvorbis \
14101 -b:a 128k \
14102 -f webm_chunk \
14103 -header webm_live_audio_128.hdr \
14104 -chunk_start_index 1 \
14105 -audio_chunk_duration 1000 \
14106 webm_live_audio_128_%d.chk
14107
14108 webm_dash_manifest
14109 WebM DASH Manifest muxer.
14110
14111 This muxer implements the WebM DASH Manifest specification to generate
14112 the DASH manifest XML. It also supports manifest generation for DASH
14113 live streams.
14114
14115 For more information see:
14116
14117 • WebM DASH Specification:
14118 <https://sites.google.com/a/webmproject.org/wiki/adaptive-streaming/webm-dash-specification>
14119
14120 • ISO DASH Specification:
14121 <http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip>
14122
14123 Options
14124
14125 This muxer supports the following options:
14126
14127 adaptation_sets
14128 This option has the following syntax: "id=x,streams=a,b,c
14129 id=y,streams=d,e" where x and y are the unique identifiers of the
14130 adaptation sets and a,b,c,d and e are the indices of the
14131 corresponding audio and video streams. Any number of adaptation
14132 sets can be added using this option.
14133
14134 live
14135 Set this to 1 to create a live stream DASH Manifest. Default: 0.
14136
14137 chunk_start_index
14138 Start index of the first chunk. This will go in the startNumber
14139 attribute of the SegmentTemplate element in the manifest. Default:
14140 0.
14141
14142 chunk_duration_ms
14143 Duration of each chunk in milliseconds. This will go in the
14144 duration attribute of the SegmentTemplate element in the manifest.
14145 Default: 1000.
14146
14147 utc_timing_url
14148 URL of the page that will return the UTC timestamp in ISO format.
14149 This will go in the value attribute of the UTCTiming element in the
14150 manifest. Default: None.
14151
14152 time_shift_buffer_depth
14153 Smallest time (in seconds) shifting buffer for which any
14154 Representation is guaranteed to be available. This will go in the
14155 timeShiftBufferDepth attribute of the MPD element. Default: 60.
14156
14157 minimum_update_period
14158 Minimum update period (in seconds) of the manifest. This will go in
14159 the minimumUpdatePeriod attribute of the MPD element. Default: 0.
14160
14161 Example
14162
14163 ffmpeg -f webm_dash_manifest -i video1.webm \
14164 -f webm_dash_manifest -i video2.webm \
14165 -f webm_dash_manifest -i audio1.webm \
14166 -f webm_dash_manifest -i audio2.webm \
14167 -map 0 -map 1 -map 2 -map 3 \
14168 -c copy \
14169 -f webm_dash_manifest \
14170 -adaptation_sets "id=0,streams=0,1 id=1,streams=2,3" \
14171 manifest.xml
14172
14174 FFmpeg is able to dump metadata from media files into a simple
14175 UTF-8-encoded INI-like text file and then load it back using the
14176 metadata muxer/demuxer.
14177
14178 The file format is as follows:
14179
14180 1. A file consists of a header and a number of metadata tags divided
14181 into sections, each on its own line.
14182
14183 2. The header is a ;FFMETADATA string, followed by a version number
14184 (now 1).
14185
14186 3. Metadata tags are of the form key=value
14187
14188 4. Immediately after header follows global metadata
14189
14190 5. After global metadata there may be sections with
14191 per-stream/per-chapter metadata.
14192
14193 6. A section starts with the section name in uppercase (i.e. STREAM or
14194 CHAPTER) in brackets ([, ]) and ends with next section or end of
14195 file.
14196
14197 7. At the beginning of a chapter section there may be an optional
14198 timebase to be used for start/end values. It must be in form
14199 TIMEBASE=num/den, where num and den are integers. If the timebase
14200 is missing then start/end times are assumed to be in nanoseconds.
14201
14202 Next a chapter section must contain chapter start and end times in
14203 form START=num, END=num, where num is a positive integer.
14204
14205 8. Empty lines and lines starting with ; or # are ignored.
14206
14207 9. Metadata keys or values containing special characters (=, ;, #, \
14208 and a newline) must be escaped with a backslash \.
14209
14210 10. Note that whitespace in metadata (e.g. foo = bar) is considered to
14211 be a part of the tag (in the example above key is foo , value is
14212 bar).
14213
14214 A ffmetadata file might look like this:
14215
14216 ;FFMETADATA1
14217 title=bike\\shed
14218 ;this is a comment
14219 artist=FFmpeg troll team
14220
14221 [CHAPTER]
14222 TIMEBASE=1/1000
14223 START=0
14224 #chapter ends at 0:01:00
14225 END=60000
14226 title=chapter \#1
14227 [STREAM]
14228 title=multi\
14229 line
14230
14231 By using the ffmetadata muxer and demuxer it is possible to extract
14232 metadata from an input file to an ffmetadata file, and then transcode
14233 the file into an output file with the edited ffmetadata file.
14234
14235 Extracting an ffmetadata file with ffmpeg goes as follows:
14236
14237 ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
14238
14239 Reinserting edited metadata information from the FFMETADATAFILE file
14240 can be done as:
14241
14242 ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
14243
14245 The libavformat library provides some generic global options, which can
14246 be set on all the protocols. In addition each protocol may support so-
14247 called private options, which are specific for that component.
14248
14249 Options may be set by specifying -option value in the FFmpeg tools, or
14250 by setting the value explicitly in the "AVFormatContext" options or
14251 using the libavutil/opt.h API for programmatic use.
14252
14253 The list of supported options follows:
14254
14255 protocol_whitelist list (input)
14256 Set a ","-separated list of allowed protocols. "ALL" matches all
14257 protocols. Protocols prefixed by "-" are disabled. All protocols
14258 are allowed by default but protocols used by an another protocol
14259 (nested protocols) are restricted to a per protocol subset.
14260
14262 Protocols are configured elements in FFmpeg that enable access to
14263 resources that require specific protocols.
14264
14265 When you configure your FFmpeg build, all the supported protocols are
14266 enabled by default. You can list all available ones using the configure
14267 option "--list-protocols".
14268
14269 You can disable all the protocols using the configure option
14270 "--disable-protocols", and selectively enable a protocol using the
14271 option "--enable-protocol=PROTOCOL", or you can disable a particular
14272 protocol using the option "--disable-protocol=PROTOCOL".
14273
14274 The option "-protocols" of the ff* tools will display the list of
14275 supported protocols.
14276
14277 All protocols accept the following options:
14278
14279 rw_timeout
14280 Maximum time to wait for (network) read/write operations to
14281 complete, in microseconds.
14282
14283 A description of the currently available protocols follows.
14284
14285 amqp
14286 Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker
14287 based publish-subscribe communication protocol.
14288
14289 FFmpeg must be compiled with --enable-librabbitmq to support AMQP. A
14290 separate AMQP broker must also be run. An example open-source AMQP
14291 broker is RabbitMQ.
14292
14293 After starting the broker, an FFmpeg client may stream data to the
14294 broker using the command:
14295
14296 ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]
14297
14298 Where hostname and port (default is 5672) is the address of the broker.
14299 The client may also set a user/password for authentication. The default
14300 for both fields is "guest". Name of virtual host on broker can be set
14301 with vhost. The default value is "/".
14302
14303 Muliple subscribers may stream from the broker using the command:
14304
14305 ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]
14306
14307 In RabbitMQ all data published to the broker flows through a specific
14308 exchange, and each subscribing client has an assigned queue/buffer.
14309 When a packet arrives at an exchange, it may be copied to a client's
14310 queue depending on the exchange and routing_key fields.
14311
14312 The following options are supported:
14313
14314 exchange
14315 Sets the exchange to use on the broker. RabbitMQ has several
14316 predefined exchanges: "amq.direct" is the default exchange, where
14317 the publisher and subscriber must have a matching routing_key;
14318 "amq.fanout" is the same as a broadcast operation (i.e. the data is
14319 forwarded to all queues on the fanout exchange independent of the
14320 routing_key); and "amq.topic" is similar to "amq.direct", but
14321 allows for more complex pattern matching (refer to the RabbitMQ
14322 documentation).
14323
14324 routing_key
14325 Sets the routing key. The default value is "amqp". The routing key
14326 is used on the "amq.direct" and "amq.topic" exchanges to decide
14327 whether packets are written to the queue of a subscriber.
14328
14329 pkt_size
14330 Maximum size of each packet sent/received to the broker. Default is
14331 131072. Minimum is 4096 and max is any large value (representable
14332 by an int). When receiving packets, this sets an internal buffer
14333 size in FFmpeg. It should be equal to or greater than the size of
14334 the published packets to the broker. Otherwise the received message
14335 may be truncated causing decoding errors.
14336
14337 connection_timeout
14338 The timeout in seconds during the initial connection to the broker.
14339 The default value is rw_timeout, or 5 seconds if rw_timeout is not
14340 set.
14341
14342 delivery_mode mode
14343 Sets the delivery mode of each message sent to broker. The
14344 following values are accepted:
14345
14346 persistent
14347 Delivery mode set to "persistent" (2). This is the default
14348 value. Messages may be written to the broker's disk depending
14349 on its setup.
14350
14351 non-persistent
14352 Delivery mode set to "non-persistent" (1). Messages will stay
14353 in broker's memory unless the broker is under memory pressure.
14354
14355 async
14356 Asynchronous data filling wrapper for input stream.
14357
14358 Fill data in a background thread, to decouple I/O operation from demux
14359 thread.
14360
14361 async:<URL>
14362 async:http://host/resource
14363 async:cache:http://host/resource
14364
14365 bluray
14366 Read BluRay playlist.
14367
14368 The accepted options are:
14369
14370 angle
14371 BluRay angle
14372
14373 chapter
14374 Start chapter (1...N)
14375
14376 playlist
14377 Playlist to read (BDMV/PLAYLIST/?????.mpls)
14378
14379 Examples:
14380
14381 Read longest playlist from BluRay mounted to /mnt/bluray:
14382
14383 bluray:/mnt/bluray
14384
14385 Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start
14386 from chapter 2:
14387
14388 -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
14389
14390 cache
14391 Caching wrapper for input stream.
14392
14393 Cache the input stream to temporary file. It brings seeking capability
14394 to live streams.
14395
14396 The accepted options are:
14397
14398 read_ahead_limit
14399 Amount in bytes that may be read ahead when seeking isn't
14400 supported. Range is -1 to INT_MAX. -1 for unlimited. Default is
14401 65536.
14402
14403 URL Syntax is
14404
14405 cache:<URL>
14406
14407 concat
14408 Physical concatenation protocol.
14409
14410 Read and seek from many resources in sequence as if they were a unique
14411 resource.
14412
14413 A URL accepted by this protocol has the syntax:
14414
14415 concat:<URL1>|<URL2>|...|<URLN>
14416
14417 where URL1, URL2, ..., URLN are the urls of the resource to be
14418 concatenated, each one possibly specifying a distinct protocol.
14419
14420 For example to read a sequence of files split1.mpeg, split2.mpeg,
14421 split3.mpeg with ffplay use the command:
14422
14423 ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
14424
14425 Note that you may need to escape the character "|" which is special for
14426 many shells.
14427
14428 concatf
14429 Physical concatenation protocol using a line break delimited list of
14430 resources.
14431
14432 Read and seek from many resources in sequence as if they were a unique
14433 resource.
14434
14435 A URL accepted by this protocol has the syntax:
14436
14437 concatf:<URL>
14438
14439 where URL is the url containing a line break delimited list of
14440 resources to be concatenated, each one possibly specifying a distinct
14441 protocol. Special characters must be escaped with backslash or single
14442 quotes. See the "Quoting and escaping" section in the ffmpeg-utils(1)
14443 manual.
14444
14445 For example to read a sequence of files split1.mpeg, split2.mpeg,
14446 split3.mpeg listed in separate lines within a file split.txt with
14447 ffplay use the command:
14448
14449 ffplay concatf:split.txt
14450
14451 Where split.txt contains the lines:
14452
14453 split1.mpeg
14454 split2.mpeg
14455 split3.mpeg
14456
14457 crypto
14458 AES-encrypted stream reading protocol.
14459
14460 The accepted options are:
14461
14462 key Set the AES decryption key binary block from given hexadecimal
14463 representation.
14464
14465 iv Set the AES decryption initialization vector binary block from
14466 given hexadecimal representation.
14467
14468 Accepted URL formats:
14469
14470 crypto:<URL>
14471 crypto+<URL>
14472
14473 data
14474 Data in-line in the URI. See
14475 <http://en.wikipedia.org/wiki/Data_URI_scheme>.
14476
14477 For example, to convert a GIF file given inline with ffmpeg:
14478
14479 ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
14480
14481 fd
14482 File descriptor access protocol.
14483
14484 The accepted syntax is:
14485
14486 fd: -fd <file_descriptor>
14487
14488 If fd is not specified, by default the stdout file descriptor will be
14489 used for writing, stdin for reading. Unlike the pipe protocol, fd
14490 protocol has seek support if it corresponding to a regular file. fd
14491 protocol doesn't support pass file descriptor via URL for security.
14492
14493 This protocol accepts the following options:
14494
14495 blocksize
14496 Set I/O operation maximum block size, in bytes. Default value is
14497 "INT_MAX", which results in not limiting the requested block size.
14498 Setting this value reasonably low improves user termination request
14499 reaction time, which is valuable if data transmission is slow.
14500
14501 fd Set file descriptor.
14502
14503 file
14504 File access protocol.
14505
14506 Read from or write to a file.
14507
14508 A file URL can have the form:
14509
14510 file:<filename>
14511
14512 where filename is the path of the file to read.
14513
14514 An URL that does not have a protocol prefix will be assumed to be a
14515 file URL. Depending on the build, an URL that looks like a Windows path
14516 with the drive letter at the beginning will also be assumed to be a
14517 file URL (usually not the case in builds for unix-like systems).
14518
14519 For example to read from a file input.mpeg with ffmpeg use the command:
14520
14521 ffmpeg -i file:input.mpeg output.mpeg
14522
14523 This protocol accepts the following options:
14524
14525 truncate
14526 Truncate existing files on write, if set to 1. A value of 0
14527 prevents truncating. Default value is 1.
14528
14529 blocksize
14530 Set I/O operation maximum block size, in bytes. Default value is
14531 "INT_MAX", which results in not limiting the requested block size.
14532 Setting this value reasonably low improves user termination request
14533 reaction time, which is valuable for files on slow medium.
14534
14535 follow
14536 If set to 1, the protocol will retry reading at the end of the
14537 file, allowing reading files that still are being written. In order
14538 for this to terminate, you either need to use the rw_timeout
14539 option, or use the interrupt callback (for API users).
14540
14541 seekable
14542 Controls if seekability is advertised on the file. 0 means non-
14543 seekable, -1 means auto (seekable for normal files, non-seekable
14544 for named pipes).
14545
14546 Many demuxers handle seekable and non-seekable resources
14547 differently, overriding this might speed up opening certain files
14548 at the cost of losing some features (e.g. accurate seeking).
14549
14550 ftp
14551 FTP (File Transfer Protocol).
14552
14553 Read from or write to remote resources using FTP protocol.
14554
14555 Following syntax is required.
14556
14557 ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
14558
14559 This protocol accepts the following options.
14560
14561 timeout
14562 Set timeout in microseconds of socket I/O operations used by the
14563 underlying low level operation. By default it is set to -1, which
14564 means that the timeout is not specified.
14565
14566 ftp-user
14567 Set a user to be used for authenticating to the FTP server. This is
14568 overridden by the user in the FTP URL.
14569
14570 ftp-password
14571 Set a password to be used for authenticating to the FTP server.
14572 This is overridden by the password in the FTP URL, or by ftp-
14573 anonymous-password if no user is set.
14574
14575 ftp-anonymous-password
14576 Password used when login as anonymous user. Typically an e-mail
14577 address should be used.
14578
14579 ftp-write-seekable
14580 Control seekability of connection during encoding. If set to 1 the
14581 resource is supposed to be seekable, if set to 0 it is assumed not
14582 to be seekable. Default value is 0.
14583
14584 NOTE: Protocol can be used as output, but it is recommended to not do
14585 it, unless special care is taken (tests, customized server
14586 configuration etc.). Different FTP servers behave in different way
14587 during seek operation. ff* tools may produce incomplete content due to
14588 server limitations.
14589
14590 gopher
14591 Gopher protocol.
14592
14593 gophers
14594 Gophers protocol.
14595
14596 The Gopher protocol with TLS encapsulation.
14597
14598 hls
14599 Read Apple HTTP Live Streaming compliant segmented stream as a uniform
14600 one. The M3U8 playlists describing the segments can be remote HTTP
14601 resources or local files, accessed using the standard file protocol.
14602 The nested protocol is declared by specifying "+proto" after the hls
14603 URI scheme name, where proto is either "file" or "http".
14604
14605 hls+http://host/path/to/remote/resource.m3u8
14606 hls+file://path/to/local/resource.m3u8
14607
14608 Using this protocol is discouraged - the hls demuxer should work just
14609 as well (if not, please report the issues) and is more complete. To
14610 use the hls demuxer instead, simply use the direct URLs to the m3u8
14611 files.
14612
14613 http
14614 HTTP (Hyper Text Transfer Protocol).
14615
14616 This protocol accepts the following options:
14617
14618 seekable
14619 Control seekability of connection. If set to 1 the resource is
14620 supposed to be seekable, if set to 0 it is assumed not to be
14621 seekable, if set to -1 it will try to autodetect if it is seekable.
14622 Default value is -1.
14623
14624 chunked_post
14625 If set to 1 use chunked Transfer-Encoding for posts, default is 1.
14626
14627 content_type
14628 Set a specific content type for the POST messages or for listen
14629 mode.
14630
14631 http_proxy
14632 set HTTP proxy to tunnel through e.g. http://example.com:1234
14633
14634 headers
14635 Set custom HTTP headers, can override built in default headers. The
14636 value must be a string encoding the headers.
14637
14638 multiple_requests
14639 Use persistent connections if set to 1, default is 0.
14640
14641 post_data
14642 Set custom HTTP post data.
14643
14644 referer
14645 Set the Referer header. Include 'Referer: URL' header in HTTP
14646 request.
14647
14648 user_agent
14649 Override the User-Agent header. If not specified the protocol will
14650 use a string describing the libavformat build. ("Lavf/<version>")
14651
14652 reconnect_at_eof
14653 If set then eof is treated like an error and causes reconnection,
14654 this is useful for live / endless streams.
14655
14656 reconnect_streamed
14657 If set then even streamed/non seekable streams will be reconnected
14658 on errors.
14659
14660 reconnect_on_network_error
14661 Reconnect automatically in case of TCP/TLS errors during connect.
14662
14663 reconnect_on_http_error
14664 A comma separated list of HTTP status codes to reconnect on. The
14665 list can include specific status codes (e.g. '503') or the strings
14666 '4xx' / '5xx'.
14667
14668 reconnect_delay_max
14669 Sets the maximum delay in seconds after which to give up
14670 reconnecting
14671
14672 mime_type
14673 Export the MIME type.
14674
14675 http_version
14676 Exports the HTTP response version number. Usually "1.0" or "1.1".
14677
14678 icy If set to 1 request ICY (SHOUTcast) metadata from the server. If
14679 the server supports this, the metadata has to be retrieved by the
14680 application by reading the icy_metadata_headers and
14681 icy_metadata_packet options. The default is 1.
14682
14683 icy_metadata_headers
14684 If the server supports ICY metadata, this contains the ICY-specific
14685 HTTP reply headers, separated by newline characters.
14686
14687 icy_metadata_packet
14688 If the server supports ICY metadata, and icy was set to 1, this
14689 contains the last non-empty metadata packet sent by the server. It
14690 should be polled in regular intervals by applications interested in
14691 mid-stream metadata updates.
14692
14693 cookies
14694 Set the cookies to be sent in future requests. The format of each
14695 cookie is the same as the value of a Set-Cookie HTTP response
14696 field. Multiple cookies can be delimited by a newline character.
14697
14698 offset
14699 Set initial byte offset.
14700
14701 end_offset
14702 Try to limit the request to bytes preceding this offset.
14703
14704 method
14705 When used as a client option it sets the HTTP method for the
14706 request.
14707
14708 When used as a server option it sets the HTTP method that is going
14709 to be expected from the client(s). If the expected and the
14710 received HTTP method do not match the client will be given a Bad
14711 Request response. When unset the HTTP method is not checked for
14712 now. This will be replaced by autodetection in the future.
14713
14714 listen
14715 If set to 1 enables experimental HTTP server. This can be used to
14716 send data when used as an output option, or read data from a client
14717 with HTTP POST when used as an input option. If set to 2 enables
14718 experimental multi-client HTTP server. This is not yet implemented
14719 in ffmpeg.c and thus must not be used as a command line option.
14720
14721 # Server side (sending):
14722 ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<server>:<port>
14723
14724 # Client side (receiving):
14725 ffmpeg -i http://<server>:<port> -c copy somefile.ogg
14726
14727 # Client can also be done with wget:
14728 wget http://<server>:<port> -O somefile.ogg
14729
14730 # Server side (receiving):
14731 ffmpeg -listen 1 -i http://<server>:<port> -c copy somefile.ogg
14732
14733 # Client side (sending):
14734 ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<server>:<port>
14735
14736 # Client can also be done with wget:
14737 wget --post-file=somefile.ogg http://<server>:<port>
14738
14739 send_expect_100
14740 Send an Expect: 100-continue header for POST. If set to 1 it will
14741 send, if set to 0 it won't, if set to -1 it will try to send if it
14742 is applicable. Default value is -1.
14743
14744 auth_type
14745 Set HTTP authentication type. No option for Digest, since this
14746 method requires getting nonce parameters from the server first and
14747 can't be used straight away like Basic.
14748
14749 none
14750 Choose the HTTP authentication type automatically. This is the
14751 default.
14752
14753 basic
14754 Choose the HTTP basic authentication.
14755
14756 Basic authentication sends a Base64-encoded string that
14757 contains a user name and password for the client. Base64 is not
14758 a form of encryption and should be considered the same as
14759 sending the user name and password in clear text (Base64 is a
14760 reversible encoding). If a resource needs to be protected,
14761 strongly consider using an authentication scheme other than
14762 basic authentication. HTTPS/TLS should be used with basic
14763 authentication. Without these additional security
14764 enhancements, basic authentication should not be used to
14765 protect sensitive or valuable information.
14766
14767 HTTP Cookies
14768
14769 Some HTTP requests will be denied unless cookie values are passed in
14770 with the request. The cookies option allows these cookies to be
14771 specified. At the very least, each cookie must specify a value along
14772 with a path and domain. HTTP requests that match both the domain and
14773 path will automatically include the cookie value in the HTTP Cookie
14774 header field. Multiple cookies can be delimited by a newline.
14775
14776 The required syntax to play a stream specifying a cookie is:
14777
14778 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
14779
14780 Icecast
14781 Icecast protocol (stream to Icecast servers)
14782
14783 This protocol accepts the following options:
14784
14785 ice_genre
14786 Set the stream genre.
14787
14788 ice_name
14789 Set the stream name.
14790
14791 ice_description
14792 Set the stream description.
14793
14794 ice_url
14795 Set the stream website URL.
14796
14797 ice_public
14798 Set if the stream should be public. The default is 0 (not public).
14799
14800 user_agent
14801 Override the User-Agent header. If not specified a string of the
14802 form "Lavf/<version>" will be used.
14803
14804 password
14805 Set the Icecast mountpoint password.
14806
14807 content_type
14808 Set the stream content type. This must be set if it is different
14809 from audio/mpeg.
14810
14811 legacy_icecast
14812 This enables support for Icecast versions < 2.4.0, that do not
14813 support the HTTP PUT method but the SOURCE method.
14814
14815 tls Establish a TLS (HTTPS) connection to Icecast.
14816
14817 icecast://[<username>[:<password>]@]<server>:<port>/<mountpoint>
14818
14819 ipfs
14820 InterPlanetary File System (IPFS) protocol support. One can access
14821 files stored on the IPFS network through so-called gateways. These are
14822 http(s) endpoints. This protocol wraps the IPFS native protocols
14823 (ipfs:// and ipns://) to be sent to such a gateway. Users can (and
14824 should) host their own node which means this protocol will use one's
14825 local gateway to access files on the IPFS network.
14826
14827 This protocol accepts the following options:
14828
14829 gateway
14830 Defines the gateway to use. When not set, the protocol will first
14831 try locating the local gateway by looking at $IPFS_GATEWAY,
14832 $IPFS_PATH and "$HOME/.ipfs/", in that order.
14833
14834 One can use this protocol in 2 ways. Using IPFS:
14835
14836 ffplay ipfs://<hash>
14837
14838 Or the IPNS protocol (IPNS is mutable IPFS):
14839
14840 ffplay ipns://<hash>
14841
14842 mmst
14843 MMS (Microsoft Media Server) protocol over TCP.
14844
14845 mmsh
14846 MMS (Microsoft Media Server) protocol over HTTP.
14847
14848 The required syntax is:
14849
14850 mmsh://<server>[:<port>][/<app>][/<playpath>]
14851
14852 md5
14853 MD5 output protocol.
14854
14855 Computes the MD5 hash of the data to be written, and on close writes
14856 this to the designated output or stdout if none is specified. It can be
14857 used to test muxers without writing an actual file.
14858
14859 Some examples follow.
14860
14861 # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
14862 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
14863
14864 # Write the MD5 hash of the encoded AVI file to stdout.
14865 ffmpeg -i input.flv -f avi -y md5:
14866
14867 Note that some formats (typically MOV) require the output protocol to
14868 be seekable, so they will fail with the MD5 output protocol.
14869
14870 pipe
14871 UNIX pipe access protocol.
14872
14873 Read and write from UNIX pipes.
14874
14875 The accepted syntax is:
14876
14877 pipe:[<number>]
14878
14879 If fd isn't specified, number is the number corresponding to the file
14880 descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).
14881 If number is not specified, by default the stdout file descriptor will
14882 be used for writing, stdin for reading.
14883
14884 For example to read from stdin with ffmpeg:
14885
14886 cat test.wav | ffmpeg -i pipe:0
14887 # ...this is the same as...
14888 cat test.wav | ffmpeg -i pipe:
14889
14890 For writing to stdout with ffmpeg:
14891
14892 ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
14893 # ...this is the same as...
14894 ffmpeg -i test.wav -f avi pipe: | cat > test.avi
14895
14896 This protocol accepts the following options:
14897
14898 blocksize
14899 Set I/O operation maximum block size, in bytes. Default value is
14900 "INT_MAX", which results in not limiting the requested block size.
14901 Setting this value reasonably low improves user termination request
14902 reaction time, which is valuable if data transmission is slow.
14903
14904 fd Set file descriptor.
14905
14906 Note that some formats (typically MOV), require the output protocol to
14907 be seekable, so they will fail with the pipe output protocol.
14908
14909 prompeg
14910 Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
14911
14912 The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction
14913 mechanism for MPEG-2 Transport Streams sent over RTP.
14914
14915 This protocol must be used in conjunction with the "rtp_mpegts" muxer
14916 and the "rtp" protocol.
14917
14918 The required syntax is:
14919
14920 -f rtp_mpegts -fec prompeg=<option>=<val>... rtp://<hostname>:<port>
14921
14922 The destination UDP ports are "port + 2" for the column FEC stream and
14923 "port + 4" for the row FEC stream.
14924
14925 This protocol accepts the following options:
14926
14927 l=n The number of columns (4-20, LxD <= 100)
14928
14929 d=n The number of rows (4-20, LxD <= 100)
14930
14931 Example usage:
14932
14933 -f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<hostname>:<port>
14934
14935 rist
14936 Reliable Internet Streaming Transport protocol
14937
14938 The accepted options are:
14939
14940 rist_profile
14941 Supported values:
14942
14943 simple
14944 main
14945 This one is default.
14946
14947 advanced
14948 buffer_size
14949 Set internal RIST buffer size in milliseconds for retransmission of
14950 data. Default value is 0 which means the librist default (1 sec).
14951 Maximum value is 30 seconds.
14952
14953 fifo_size
14954 Size of the librist receiver output fifo in number of packets. This
14955 must be a power of 2. Defaults to 8192 (vs the librist default of
14956 1024).
14957
14958 overrun_nonfatal=1|0
14959 Survive in case of librist fifo buffer overrun. Default value is 0.
14960
14961 pkt_size
14962 Set maximum packet size for sending data. 1316 by default.
14963
14964 log_level
14965 Set loglevel for RIST logging messages. You only need to set this
14966 if you explicitly want to enable debug level messages or packet
14967 loss simulation, otherwise the regular loglevel is respected.
14968
14969 secret
14970 Set override of encryption secret, by default is unset.
14971
14972 encryption
14973 Set encryption type, by default is disabled. Acceptable values are
14974 128 and 256.
14975
14976 rtmp
14977 Real-Time Messaging Protocol.
14978
14979 The Real-Time Messaging Protocol (RTMP) is used for streaming
14980 multimedia content across a TCP/IP network.
14981
14982 The required syntax is:
14983
14984 rtmp://[<username>:<password>@]<server>[:<port>][/<app>][/<instance>][/<playpath>]
14985
14986 The accepted parameters are:
14987
14988 username
14989 An optional username (mostly for publishing).
14990
14991 password
14992 An optional password (mostly for publishing).
14993
14994 server
14995 The address of the RTMP server.
14996
14997 port
14998 The number of the TCP port to use (by default is 1935).
14999
15000 app It is the name of the application to access. It usually corresponds
15001 to the path where the application is installed on the RTMP server
15002 (e.g. /ondemand/, /flash/live/, etc.). You can override the value
15003 parsed from the URI through the "rtmp_app" option, too.
15004
15005 playpath
15006 It is the path or name of the resource to play with reference to
15007 the application specified in app, may be prefixed by "mp4:". You
15008 can override the value parsed from the URI through the
15009 "rtmp_playpath" option, too.
15010
15011 listen
15012 Act as a server, listening for an incoming connection.
15013
15014 timeout
15015 Maximum time to wait for the incoming connection. Implies listen.
15016
15017 Additionally, the following parameters can be set via command line
15018 options (or in code via "AVOption"s):
15019
15020 rtmp_app
15021 Name of application to connect on the RTMP server. This option
15022 overrides the parameter specified in the URI.
15023
15024 rtmp_buffer
15025 Set the client buffer time in milliseconds. The default is 3000.
15026
15027 rtmp_conn
15028 Extra arbitrary AMF connection parameters, parsed from a string,
15029 e.g. like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0". Each
15030 value is prefixed by a single character denoting the type, B for
15031 Boolean, N for number, S for string, O for object, or Z for null,
15032 followed by a colon. For Booleans the data must be either 0 or 1
15033 for FALSE or TRUE, respectively. Likewise for Objects the data
15034 must be 0 or 1 to end or begin an object, respectively. Data items
15035 in subobjects may be named, by prefixing the type with 'N' and
15036 specifying the name before the value (i.e. "NB:myFlag:1"). This
15037 option may be used multiple times to construct arbitrary AMF
15038 sequences.
15039
15040 rtmp_flashver
15041 Version of the Flash plugin used to run the SWF player. The default
15042 is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0
15043 (compatible; <libavformat version>).)
15044
15045 rtmp_flush_interval
15046 Number of packets flushed in the same request (RTMPT only). The
15047 default is 10.
15048
15049 rtmp_live
15050 Specify that the media is a live stream. No resuming or seeking in
15051 live streams is possible. The default value is "any", which means
15052 the subscriber first tries to play the live stream specified in the
15053 playpath. If a live stream of that name is not found, it plays the
15054 recorded stream. The other possible values are "live" and
15055 "recorded".
15056
15057 rtmp_pageurl
15058 URL of the web page in which the media was embedded. By default no
15059 value will be sent.
15060
15061 rtmp_playpath
15062 Stream identifier to play or to publish. This option overrides the
15063 parameter specified in the URI.
15064
15065 rtmp_subscribe
15066 Name of live stream to subscribe to. By default no value will be
15067 sent. It is only sent if the option is specified or if rtmp_live
15068 is set to live.
15069
15070 rtmp_swfhash
15071 SHA256 hash of the decompressed SWF file (32 bytes).
15072
15073 rtmp_swfsize
15074 Size of the decompressed SWF file, required for SWFVerification.
15075
15076 rtmp_swfurl
15077 URL of the SWF player for the media. By default no value will be
15078 sent.
15079
15080 rtmp_swfverify
15081 URL to player swf file, compute hash/size automatically.
15082
15083 rtmp_tcurl
15084 URL of the target stream. Defaults to proto://host[:port]/app.
15085
15086 tcp_nodelay=1|0
15087 Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
15088
15089 Remark: Writing to the socket is currently not optimized to
15090 minimize system calls and reduces the efficiency / effect of
15091 TCP_NODELAY.
15092
15093 For example to read with ffplay a multimedia resource named "sample"
15094 from the application "vod" from an RTMP server "myserver":
15095
15096 ffplay rtmp://myserver/vod/sample
15097
15098 To publish to a password protected server, passing the playpath and app
15099 names separately:
15100
15101 ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
15102
15103 rtmpe
15104 Encrypted Real-Time Messaging Protocol.
15105
15106 The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
15107 streaming multimedia content within standard cryptographic primitives,
15108 consisting of Diffie-Hellman key exchange and HMACSHA256, generating a
15109 pair of RC4 keys.
15110
15111 rtmps
15112 Real-Time Messaging Protocol over a secure SSL connection.
15113
15114 The Real-Time Messaging Protocol (RTMPS) is used for streaming
15115 multimedia content across an encrypted connection.
15116
15117 rtmpt
15118 Real-Time Messaging Protocol tunneled through HTTP.
15119
15120 The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
15121 for streaming multimedia content within HTTP requests to traverse
15122 firewalls.
15123
15124 rtmpte
15125 Encrypted Real-Time Messaging Protocol tunneled through HTTP.
15126
15127 The Encrypted Real-Time Messaging Protocol tunneled through HTTP
15128 (RTMPTE) is used for streaming multimedia content within HTTP requests
15129 to traverse firewalls.
15130
15131 rtmpts
15132 Real-Time Messaging Protocol tunneled through HTTPS.
15133
15134 The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is
15135 used for streaming multimedia content within HTTPS requests to traverse
15136 firewalls.
15137
15138 libsmbclient
15139 libsmbclient permits one to manipulate CIFS/SMB network resources.
15140
15141 Following syntax is required.
15142
15143 smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
15144
15145 This protocol accepts the following options.
15146
15147 timeout
15148 Set timeout in milliseconds of socket I/O operations used by the
15149 underlying low level operation. By default it is set to -1, which
15150 means that the timeout is not specified.
15151
15152 truncate
15153 Truncate existing files on write, if set to 1. A value of 0
15154 prevents truncating. Default value is 1.
15155
15156 workgroup
15157 Set the workgroup used for making connections. By default workgroup
15158 is not specified.
15159
15160 For more information see: <http://www.samba.org/>.
15161
15162 libssh
15163 Secure File Transfer Protocol via libssh
15164
15165 Read from or write to remote resources using SFTP protocol.
15166
15167 Following syntax is required.
15168
15169 sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
15170
15171 This protocol accepts the following options.
15172
15173 timeout
15174 Set timeout of socket I/O operations used by the underlying low
15175 level operation. By default it is set to -1, which means that the
15176 timeout is not specified.
15177
15178 truncate
15179 Truncate existing files on write, if set to 1. A value of 0
15180 prevents truncating. Default value is 1.
15181
15182 private_key
15183 Specify the path of the file containing private key to use during
15184 authorization. By default libssh searches for keys in the ~/.ssh/
15185 directory.
15186
15187 Example: Play a file stored on remote server.
15188
15189 ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
15190
15191 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
15192 Real-Time Messaging Protocol and its variants supported through
15193 librtmp.
15194
15195 Requires the presence of the librtmp headers and library during
15196 configuration. You need to explicitly configure the build with
15197 "--enable-librtmp". If enabled this will replace the native RTMP
15198 protocol.
15199
15200 This protocol provides most client functions and a few server functions
15201 needed to support RTMP, RTMP tunneled in HTTP (RTMPT), encrypted RTMP
15202 (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled variants of these
15203 encrypted types (RTMPTE, RTMPTS).
15204
15205 The required syntax is:
15206
15207 <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
15208
15209 where rtmp_proto is one of the strings "rtmp", "rtmpt", "rtmpe",
15210 "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
15211 server, port, app and playpath have the same meaning as specified for
15212 the RTMP native protocol. options contains a list of space-separated
15213 options of the form key=val.
15214
15215 See the librtmp manual page (man 3 librtmp) for more information.
15216
15217 For example, to stream a file in real-time to an RTMP server using
15218 ffmpeg:
15219
15220 ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
15221
15222 To play the same stream using ffplay:
15223
15224 ffplay "rtmp://myserver/live/mystream live=1"
15225
15226 rtp
15227 Real-time Transport Protocol.
15228
15229 The required syntax for an RTP URL is:
15230 rtp://hostname[:port][?option=val...]
15231
15232 port specifies the RTP port to use.
15233
15234 The following URL options are supported:
15235
15236 ttl=n
15237 Set the TTL (Time-To-Live) value (for multicast only).
15238
15239 rtcpport=n
15240 Set the remote RTCP port to n.
15241
15242 localrtpport=n
15243 Set the local RTP port to n.
15244
15245 localrtcpport=n'
15246 Set the local RTCP port to n.
15247
15248 pkt_size=n
15249 Set max packet size (in bytes) to n.
15250
15251 buffer_size=size
15252 Set the maximum UDP socket buffer size in bytes.
15253
15254 connect=0|1
15255 Do a connect() on the UDP socket (if set to 1) or not (if set to
15256 0).
15257
15258 sources=ip[,ip]
15259 List allowed source IP addresses.
15260
15261 block=ip[,ip]
15262 List disallowed (blocked) source IP addresses.
15263
15264 write_to_source=0|1
15265 Send packets to the source address of the latest received packet
15266 (if set to 1) or to a default remote address (if set to 0).
15267
15268 localport=n
15269 Set the local RTP port to n.
15270
15271 localaddr=addr
15272 Local IP address of a network interface used for sending packets or
15273 joining multicast groups.
15274
15275 timeout=n
15276 Set timeout (in microseconds) of socket I/O operations to n.
15277
15278 This is a deprecated option. Instead, localrtpport should be used.
15279
15280 Important notes:
15281
15282 1. If rtcpport is not set the RTCP port will be set to the RTP port
15283 value plus 1.
15284
15285 2. If localrtpport (the local RTP port) is not set any available port
15286 will be used for the local RTP and RTCP ports.
15287
15288 3. If localrtcpport (the local RTCP port) is not set it will be set to
15289 the local RTP port value plus 1.
15290
15291 rtsp
15292 Real-Time Streaming Protocol.
15293
15294 RTSP is not technically a protocol handler in libavformat, it is a
15295 demuxer and muxer. The demuxer supports both normal RTSP (with data
15296 transferred over RTP; this is used by e.g. Apple and Microsoft) and
15297 Real-RTSP (with data transferred over RDT).
15298
15299 The muxer can be used to send a stream using RTSP ANNOUNCE to a server
15300 supporting it (currently Darwin Streaming Server and Mischa
15301 Spiegelmock's <https://github.com/revmischa/rtsp-server>).
15302
15303 The required syntax for a RTSP url is:
15304
15305 rtsp://<hostname>[:<port>]/<path>
15306
15307 Options can be set on the ffmpeg/ffplay command line, or set in code
15308 via "AVOption"s or in "avformat_open_input".
15309
15310 Muxer
15311
15312 The following options are supported.
15313
15314 rtsp_transport
15315 Set RTSP transport protocols.
15316
15317 It accepts the following values:
15318
15319 udp Use UDP as lower transport protocol.
15320
15321 tcp Use TCP (interleaving within the RTSP control channel) as lower
15322 transport protocol.
15323
15324 Default value is 0.
15325
15326 rtsp_flags
15327 Set RTSP flags.
15328
15329 The following values are accepted:
15330
15331 latm
15332 Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC.
15333
15334 rfc2190
15335 Use RFC 2190 packetization instead of RFC 4629 for H.263.
15336
15337 skip_rtcp
15338 Don't send RTCP sender reports.
15339
15340 h264_mode0
15341 Use mode 0 for H.264 in RTP.
15342
15343 send_bye
15344 Send RTCP BYE packets when finishing.
15345
15346 Default value is 0.
15347
15348 min_port
15349 Set minimum local UDP port. Default value is 5000.
15350
15351 max_port
15352 Set maximum local UDP port. Default value is 65000.
15353
15354 buffer_size
15355 Set the maximum socket buffer size in bytes.
15356
15357 pkt_size
15358 Set max send packet size (in bytes). Default value is 1472.
15359
15360 Demuxer
15361
15362 The following options are supported.
15363
15364 initial_pause
15365 Do not start playing the stream immediately if set to 1. Default
15366 value is 0.
15367
15368 rtsp_transport
15369 Set RTSP transport protocols.
15370
15371 It accepts the following values:
15372
15373 udp Use UDP as lower transport protocol.
15374
15375 tcp Use TCP (interleaving within the RTSP control channel) as lower
15376 transport protocol.
15377
15378 udp_multicast
15379 Use UDP multicast as lower transport protocol.
15380
15381 http
15382 Use HTTP tunneling as lower transport protocol, which is useful
15383 for passing proxies.
15384
15385 https
15386 Use HTTPs tunneling as lower transport protocol, which is
15387 useful for passing proxies and widely used for security
15388 consideration.
15389
15390 Multiple lower transport protocols may be specified, in that case
15391 they are tried one at a time (if the setup of one fails, the next
15392 one is tried). For the muxer, only the tcp and udp options are
15393 supported.
15394
15395 rtsp_flags
15396 Set RTSP flags.
15397
15398 The following values are accepted:
15399
15400 filter_src
15401 Accept packets only from negotiated peer address and port.
15402
15403 listen
15404 Act as a server, listening for an incoming connection.
15405
15406 prefer_tcp
15407 Try TCP for RTP transport first, if TCP is available as RTSP
15408 RTP transport.
15409
15410 satip_raw
15411 Export raw MPEG-TS stream instead of demuxing. The flag will
15412 simply write out the raw stream, with the original PAT/PMT/PIDs
15413 intact.
15414
15415 Default value is none.
15416
15417 allowed_media_types
15418 Set media types to accept from the server.
15419
15420 The following flags are accepted:
15421
15422 video
15423 audio
15424 data
15425 subtitle
15426
15427 By default it accepts all media types.
15428
15429 min_port
15430 Set minimum local UDP port. Default value is 5000.
15431
15432 max_port
15433 Set maximum local UDP port. Default value is 65000.
15434
15435 listen_timeout
15436 Set maximum timeout (in seconds) to establish an initial
15437 connection. Setting listen_timeout > 0 sets rtsp_flags to listen.
15438 Default is -1 which means an infinite timeout when listen mode is
15439 set.
15440
15441 reorder_queue_size
15442 Set number of packets to buffer for handling of reordered packets.
15443
15444 timeout
15445 Set socket TCP I/O timeout in microseconds.
15446
15447 user_agent
15448 Override User-Agent header. If not specified, it defaults to the
15449 libavformat identifier string.
15450
15451 buffer_size
15452 Set the maximum socket buffer size in bytes.
15453
15454 When receiving data over UDP, the demuxer tries to reorder received
15455 packets (since they may arrive out of order, or packets may get lost
15456 totally). This can be disabled by setting the maximum demuxing delay to
15457 zero (via the "max_delay" field of AVFormatContext).
15458
15459 When watching multi-bitrate Real-RTSP streams with ffplay, the streams
15460 to display can be chosen with "-vst" n and "-ast" n for video and audio
15461 respectively, and can be switched on the fly by pressing "v" and "a".
15462
15463 Examples
15464
15465 The following examples all make use of the ffplay and ffmpeg tools.
15466
15467 • Watch a stream over UDP, with a max reordering delay of 0.5
15468 seconds:
15469
15470 ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
15471
15472 • Watch a stream tunneled over HTTP:
15473
15474 ffplay -rtsp_transport http rtsp://server/video.mp4
15475
15476 • Send a stream in realtime to a RTSP server, for others to watch:
15477
15478 ffmpeg -re -i <input> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
15479
15480 • Receive a stream in realtime:
15481
15482 ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <output>
15483
15484 sap
15485 Session Announcement Protocol (RFC 2974). This is not technically a
15486 protocol handler in libavformat, it is a muxer and demuxer. It is used
15487 for signalling of RTP streams, by announcing the SDP for the streams
15488 regularly on a separate port.
15489
15490 Muxer
15491
15492 The syntax for a SAP url given to the muxer is:
15493
15494 sap://<destination>[:<port>][?<options>]
15495
15496 The RTP packets are sent to destination on port port, or to port 5004
15497 if no port is specified. options is a "&"-separated list. The
15498 following options are supported:
15499
15500 announce_addr=address
15501 Specify the destination IP address for sending the announcements
15502 to. If omitted, the announcements are sent to the commonly used
15503 SAP announcement multicast address 224.2.127.254 (sap.mcast.net),
15504 or ff0e::2:7ffe if destination is an IPv6 address.
15505
15506 announce_port=port
15507 Specify the port to send the announcements on, defaults to 9875 if
15508 not specified.
15509
15510 ttl=ttl
15511 Specify the time to live value for the announcements and RTP
15512 packets, defaults to 255.
15513
15514 same_port=0|1
15515 If set to 1, send all RTP streams on the same port pair. If zero
15516 (the default), all streams are sent on unique ports, with each
15517 stream on a port 2 numbers higher than the previous. VLC/Live555
15518 requires this to be set to 1, to be able to receive the stream.
15519 The RTP stack in libavformat for receiving requires all streams to
15520 be sent on unique ports.
15521
15522 Example command lines follow.
15523
15524 To broadcast a stream on the local subnet, for watching in VLC:
15525
15526 ffmpeg -re -i <input> -f sap sap://224.0.0.255?same_port=1
15527
15528 Similarly, for watching in ffplay:
15529
15530 ffmpeg -re -i <input> -f sap sap://224.0.0.255
15531
15532 And for watching in ffplay, over IPv6:
15533
15534 ffmpeg -re -i <input> -f sap sap://[ff0e::1:2:3:4]
15535
15536 Demuxer
15537
15538 The syntax for a SAP url given to the demuxer is:
15539
15540 sap://[<address>][:<port>]
15541
15542 address is the multicast address to listen for announcements on, if
15543 omitted, the default 224.2.127.254 (sap.mcast.net) is used. port is the
15544 port that is listened on, 9875 if omitted.
15545
15546 The demuxers listens for announcements on the given address and port.
15547 Once an announcement is received, it tries to receive that particular
15548 stream.
15549
15550 Example command lines follow.
15551
15552 To play back the first stream announced on the normal SAP multicast
15553 address:
15554
15555 ffplay sap://
15556
15557 To play back the first stream announced on one the default IPv6 SAP
15558 multicast address:
15559
15560 ffplay sap://[ff0e::2:7ffe]
15561
15562 sctp
15563 Stream Control Transmission Protocol.
15564
15565 The accepted URL syntax is:
15566
15567 sctp://<host>:<port>[?<options>]
15568
15569 The protocol accepts the following options:
15570
15571 listen
15572 If set to any value, listen for an incoming connection. Outgoing
15573 connection is done by default.
15574
15575 max_streams
15576 Set the maximum number of streams. By default no limit is set.
15577
15578 srt
15579 Haivision Secure Reliable Transport Protocol via libsrt.
15580
15581 The supported syntax for a SRT URL is:
15582
15583 srt://<hostname>:<port>[?<options>]
15584
15585 options contains a list of &-separated options of the form key=val.
15586
15587 or
15588
15589 <options> srt://<hostname>:<port>
15590
15591 options contains a list of '-key val' options.
15592
15593 This protocol accepts the following options.
15594
15595 connect_timeout=milliseconds
15596 Connection timeout; SRT cannot connect for RTT > 1500 msec (2
15597 handshake exchanges) with the default connect timeout of 3 seconds.
15598 This option applies to the caller and rendezvous connection modes.
15599 The connect timeout is 10 times the value set for the rendezvous
15600 mode (which can be used as a workaround for this connection problem
15601 with earlier versions).
15602
15603 ffs=bytes
15604 Flight Flag Size (Window Size), in bytes. FFS is actually an
15605 internal parameter and you should set it to not less than
15606 recv_buffer_size and mss. The default value is relatively large,
15607 therefore unless you set a very large receiver buffer, you do not
15608 need to change this option. Default value is 25600.
15609
15610 inputbw=bytes/seconds
15611 Sender nominal input rate, in bytes per seconds. Used along with
15612 oheadbw, when maxbw is set to relative (0), to calculate maximum
15613 sending rate when recovery packets are sent along with the main
15614 media stream: inputbw * (100 + oheadbw) / 100 if inputbw is not set
15615 while maxbw is set to relative (0), the actual input rate is
15616 evaluated inside the library. Default value is 0.
15617
15618 iptos=tos
15619 IP Type of Service. Applies to sender only. Default value is 0xB8.
15620
15621 ipttl=ttl
15622 IP Time To Live. Applies to sender only. Default value is 64.
15623
15624 latency=microseconds
15625 Timestamp-based Packet Delivery Delay. Used to absorb bursts of
15626 missed packet retransmissions. This flag sets both rcvlatency and
15627 peerlatency to the same value. Note that prior to version 1.3.0
15628 this is the only flag to set the latency, however this is
15629 effectively equivalent to setting peerlatency, when side is sender
15630 and rcvlatency when side is receiver, and the bidirectional stream
15631 sending is not supported.
15632
15633 listen_timeout=microseconds
15634 Set socket listen timeout.
15635
15636 maxbw=bytes/seconds
15637 Maximum sending bandwidth, in bytes per seconds. -1 infinite
15638 (CSRTCC limit is 30mbps) 0 relative to input rate (see inputbw) >0
15639 absolute limit value Default value is 0 (relative)
15640
15641 mode=caller|listener|rendezvous
15642 Connection mode. caller opens client connection. listener starts
15643 server to listen for incoming connections. rendezvous use Rendez-
15644 Vous connection mode. Default value is caller.
15645
15646 mss=bytes
15647 Maximum Segment Size, in bytes. Used for buffer allocation and rate
15648 calculation using a packet counter assuming fully filled packets.
15649 The smallest MSS between the peers is used. This is 1500 by default
15650 in the overall internet. This is the maximum size of the UDP
15651 packet and can be only decreased, unless you have some unusual
15652 dedicated network settings. Default value is 1500.
15653
15654 nakreport=1|0
15655 If set to 1, Receiver will send `UMSG_LOSSREPORT` messages
15656 periodically until a lost packet is retransmitted or intentionally
15657 dropped. Default value is 1.
15658
15659 oheadbw=percents
15660 Recovery bandwidth overhead above input rate, in percents. See
15661 inputbw. Default value is 25%.
15662
15663 passphrase=string
15664 HaiCrypt Encryption/Decryption Passphrase string, length from 10 to
15665 79 characters. The passphrase is the shared secret between the
15666 sender and the receiver. It is used to generate the Key Encrypting
15667 Key using PBKDF2 (Password-Based Key Derivation Function). It is
15668 used only if pbkeylen is non-zero. It is used on the receiver only
15669 if the received data is encrypted. The configured passphrase
15670 cannot be recovered (write-only).
15671
15672 enforced_encryption=1|0
15673 If true, both connection parties must have the same password set
15674 (including empty, that is, with no encryption). If the password
15675 doesn't match or only one side is unencrypted, the connection is
15676 rejected. Default is true.
15677
15678 kmrefreshrate=packets
15679 The number of packets to be transmitted after which the encryption
15680 key is switched to a new key. Default is -1. -1 means auto
15681 (0x1000000 in srt library). The range for this option is integers
15682 in the 0 - "INT_MAX".
15683
15684 kmpreannounce=packets
15685 The interval between when a new encryption key is sent and when
15686 switchover occurs. This value also applies to the subsequent
15687 interval between when switchover occurs and when the old encryption
15688 key is decommissioned. Default is -1. -1 means auto (0x1000 in srt
15689 library). The range for this option is integers in the 0 -
15690 "INT_MAX".
15691
15692 snddropdelay=microseconds
15693 The sender's extra delay before dropping packets. This delay is
15694 added to the default drop delay time interval value.
15695
15696 Special value -1: Do not drop packets on the sender at all.
15697
15698 payload_size=bytes
15699 Sets the maximum declared size of a packet transferred during the
15700 single call to the sending function in Live mode. Use 0 if this
15701 value isn't used (which is default in file mode). Default is -1
15702 (automatic), which typically means MPEG-TS; if you are going to use
15703 SRT to send any different kind of payload, such as, for example,
15704 wrapping a live stream in very small frames, then you can use a
15705 bigger maximum frame size, though not greater than 1456 bytes.
15706
15707 pkt_size=bytes
15708 Alias for payload_size.
15709
15710 peerlatency=microseconds
15711 The latency value (as described in rcvlatency) that is set by the
15712 sender side as a minimum value for the receiver.
15713
15714 pbkeylen=bytes
15715 Sender encryption key length, in bytes. Only can be set to 0, 16,
15716 24 and 32. Enable sender encryption if not 0. Not required on
15717 receiver (set to 0), key size obtained from sender in HaiCrypt
15718 handshake. Default value is 0.
15719
15720 rcvlatency=microseconds
15721 The time that should elapse since the moment when the packet was
15722 sent and the moment when it's delivered to the receiver application
15723 in the receiving function. This time should be a buffer time large
15724 enough to cover the time spent for sending, unexpectedly extended
15725 RTT time, and the time needed to retransmit the lost UDP packet.
15726 The effective latency value will be the maximum of this options'
15727 value and the value of peerlatency set by the peer side. Before
15728 version 1.3.0 this option is only available as latency.
15729
15730 recv_buffer_size=bytes
15731 Set UDP receive buffer size, expressed in bytes.
15732
15733 send_buffer_size=bytes
15734 Set UDP send buffer size, expressed in bytes.
15735
15736 timeout=microseconds
15737 Set raise error timeouts for read, write and connect operations.
15738 Note that the SRT library has internal timeouts which can be
15739 controlled separately, the value set here is only a cap on those.
15740
15741 tlpktdrop=1|0
15742 Too-late Packet Drop. When enabled on receiver, it skips missing
15743 packets that have not been delivered in time and delivers the
15744 following packets to the application when their time-to-play has
15745 come. It also sends a fake ACK to the sender. When enabled on
15746 sender and enabled on the receiving peer, the sender drops the
15747 older packets that have no chance of being delivered in time. It
15748 was automatically enabled in the sender if the receiver supports
15749 it.
15750
15751 sndbuf=bytes
15752 Set send buffer size, expressed in bytes.
15753
15754 rcvbuf=bytes
15755 Set receive buffer size, expressed in bytes.
15756
15757 Receive buffer must not be greater than ffs.
15758
15759 lossmaxttl=packets
15760 The value up to which the Reorder Tolerance may grow. When Reorder
15761 Tolerance is > 0, then packet loss report is delayed until that
15762 number of packets come in. Reorder Tolerance increases every time a
15763 "belated" packet has come, but it wasn't due to retransmission
15764 (that is, when UDP packets tend to come out of order), with the
15765 difference between the latest sequence and this packet's sequence,
15766 and not more than the value of this option. By default it's 0,
15767 which means that this mechanism is turned off, and the loss report
15768 is always sent immediately upon experiencing a "gap" in sequences.
15769
15770 minversion
15771 The minimum SRT version that is required from the peer. A
15772 connection to a peer that does not satisfy the minimum version
15773 requirement will be rejected.
15774
15775 The version format in hex is 0xXXYYZZ for x.y.z in human readable
15776 form.
15777
15778 streamid=string
15779 A string limited to 512 characters that can be set on the socket
15780 prior to connecting. This stream ID will be able to be retrieved by
15781 the listener side from the socket that is returned from srt_accept
15782 and was connected by a socket with that set stream ID. SRT does not
15783 enforce any special interpretation of the contents of this string.
15784 This option doesn’t make sense in Rendezvous connection; the result
15785 might be that simply one side will override the value from the
15786 other side and it’s the matter of luck which one would win
15787
15788 srt_streamid=string
15789 Alias for streamid to avoid conflict with ffmpeg command line
15790 option.
15791
15792 smoother=live|file
15793 The type of Smoother used for the transmission for that socket,
15794 which is responsible for the transmission and congestion control.
15795 The Smoother type must be exactly the same on both connecting
15796 parties, otherwise the connection is rejected.
15797
15798 messageapi=1|0
15799 When set, this socket uses the Message API, otherwise it uses
15800 Buffer API. Note that in live mode (see transtype) there’s only
15801 message API available. In File mode you can chose to use one of two
15802 modes:
15803
15804 Stream API (default, when this option is false). In this mode you
15805 may send as many data as you wish with one sending instruction, or
15806 even use dedicated functions that read directly from a file. The
15807 internal facility will take care of any speed and congestion
15808 control. When receiving, you can also receive as many data as
15809 desired, the data not extracted will be waiting for the next call.
15810 There is no boundary between data portions in the Stream mode.
15811
15812 Message API. In this mode your single sending instruction passes
15813 exactly one piece of data that has boundaries (a message). Contrary
15814 to Live mode, this message may span across multiple UDP packets and
15815 the only size limitation is that it shall fit as a whole in the
15816 sending buffer. The receiver shall use as large buffer as necessary
15817 to receive the message, otherwise the message will not be given up.
15818 When the message is not complete (not all packets received or there
15819 was a packet loss) it will not be given up.
15820
15821 transtype=live|file
15822 Sets the transmission type for the socket, in particular, setting
15823 this option sets multiple other parameters to their default values
15824 as required for a particular transmission type.
15825
15826 live: Set options as for live transmission. In this mode, you
15827 should send by one sending instruction only so many data that fit
15828 in one UDP packet, and limited to the value defined first in
15829 payload_size (1316 is default in this mode). There is no speed
15830 control in this mode, only the bandwidth control, if configured, in
15831 order to not exceed the bandwidth with the overhead transmission
15832 (retransmitted and control packets).
15833
15834 file: Set options as for non-live transmission. See messageapi for
15835 further explanations
15836
15837 linger=seconds
15838 The number of seconds that the socket waits for unsent data when
15839 closing. Default is -1. -1 means auto (off with 0 seconds in live
15840 mode, on with 180 seconds in file mode). The range for this option
15841 is integers in the 0 - "INT_MAX".
15842
15843 tsbpd=1|0
15844 When true, use Timestamp-based Packet Delivery mode. The default
15845 behavior depends on the transmission type: enabled in live mode,
15846 disabled in file mode.
15847
15848 For more information see: <https://github.com/Haivision/srt>.
15849
15850 srtp
15851 Secure Real-time Transport Protocol.
15852
15853 The accepted options are:
15854
15855 srtp_in_suite
15856 srtp_out_suite
15857 Select input and output encoding suites.
15858
15859 Supported values:
15860
15861 AES_CM_128_HMAC_SHA1_80
15862 SRTP_AES128_CM_HMAC_SHA1_80
15863 AES_CM_128_HMAC_SHA1_32
15864 SRTP_AES128_CM_HMAC_SHA1_32
15865 srtp_in_params
15866 srtp_out_params
15867 Set input and output encoding parameters, which are expressed by a
15868 base64-encoded representation of a binary block. The first 16 bytes
15869 of this binary block are used as master key, the following 14 bytes
15870 are used as master salt.
15871
15872 subfile
15873 Virtually extract a segment of a file or another stream. The
15874 underlying stream must be seekable.
15875
15876 Accepted options:
15877
15878 start
15879 Start offset of the extracted segment, in bytes.
15880
15881 end End offset of the extracted segment, in bytes. If set to 0,
15882 extract till end of file.
15883
15884 Examples:
15885
15886 Extract a chapter from a DVD VOB file (start and end sectors obtained
15887 externally and multiplied by 2048):
15888
15889 subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
15890
15891 Play an AVI file directly from a TAR archive:
15892
15893 subfile,,start,183241728,end,366490624,,:archive.tar
15894
15895 Play a MPEG-TS file from start offset till end:
15896
15897 subfile,,start,32815239,end,0,,:video.ts
15898
15899 tee
15900 Writes the output to multiple protocols. The individual outputs are
15901 separated by |
15902
15903 tee:file://path/to/local/this.avi|file://path/to/local/that.avi
15904
15905 tcp
15906 Transmission Control Protocol.
15907
15908 The required syntax for a TCP url is:
15909
15910 tcp://<hostname>:<port>[?<options>]
15911
15912 options contains a list of &-separated options of the form key=val.
15913
15914 The list of supported options follows.
15915
15916 listen=2|1|0
15917 Listen for an incoming connection. 0 disables listen, 1 enables
15918 listen in single client mode, 2 enables listen in multi-client
15919 mode. Default value is 0.
15920
15921 timeout=microseconds
15922 Set raise error timeout, expressed in microseconds.
15923
15924 This option is only relevant in read mode: if no data arrived in
15925 more than this time interval, raise error.
15926
15927 listen_timeout=milliseconds
15928 Set listen timeout, expressed in milliseconds.
15929
15930 recv_buffer_size=bytes
15931 Set receive buffer size, expressed bytes.
15932
15933 send_buffer_size=bytes
15934 Set send buffer size, expressed bytes.
15935
15936 tcp_nodelay=1|0
15937 Set TCP_NODELAY to disable Nagle's algorithm. Default value is 0.
15938
15939 Remark: Writing to the socket is currently not optimized to
15940 minimize system calls and reduces the efficiency / effect of
15941 TCP_NODELAY.
15942
15943 tcp_mss=bytes
15944 Set maximum segment size for outgoing TCP packets, expressed in
15945 bytes.
15946
15947 The following example shows how to setup a listening TCP connection
15948 with ffmpeg, which is then accessed with ffplay:
15949
15950 ffmpeg -i <input> -f <format> tcp://<hostname>:<port>?listen
15951 ffplay tcp://<hostname>:<port>
15952
15953 tls
15954 Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
15955
15956 The required syntax for a TLS/SSL url is:
15957
15958 tls://<hostname>:<port>[?<options>]
15959
15960 The following parameters can be set via command line options (or in
15961 code via "AVOption"s):
15962
15963 ca_file, cafile=filename
15964 A file containing certificate authority (CA) root certificates to
15965 treat as trusted. If the linked TLS library contains a default this
15966 might not need to be specified for verification to work, but not
15967 all libraries and setups have defaults built in. The file must be
15968 in OpenSSL PEM format.
15969
15970 tls_verify=1|0
15971 If enabled, try to verify the peer that we are communicating with.
15972 Note, if using OpenSSL, this currently only makes sure that the
15973 peer certificate is signed by one of the root certificates in the
15974 CA database, but it does not validate that the certificate actually
15975 matches the host name we are trying to connect to. (With other
15976 backends, the host name is validated as well.)
15977
15978 This is disabled by default since it requires a CA database to be
15979 provided by the caller in many cases.
15980
15981 cert_file, cert=filename
15982 A file containing a certificate to use in the handshake with the
15983 peer. (When operating as server, in listen mode, this is more
15984 often required by the peer, while client certificates only are
15985 mandated in certain setups.)
15986
15987 key_file, key=filename
15988 A file containing the private key for the certificate.
15989
15990 listen=1|0
15991 If enabled, listen for connections on the provided port, and assume
15992 the server role in the handshake instead of the client role.
15993
15994 http_proxy
15995 The HTTP proxy to tunnel through, e.g. "http://example.com:1234".
15996 The proxy must support the CONNECT method.
15997
15998 Example command lines:
15999
16000 To create a TLS/SSL server that serves an input stream.
16001
16002 ffmpeg -i <input> -f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
16003
16004 To play back a stream from the TLS/SSL server using ffplay:
16005
16006 ffplay tls://<hostname>:<port>
16007
16008 udp
16009 User Datagram Protocol.
16010
16011 The required syntax for an UDP URL is:
16012
16013 udp://<hostname>:<port>[?<options>]
16014
16015 options contains a list of &-separated options of the form key=val.
16016
16017 In case threading is enabled on the system, a circular buffer is used
16018 to store the incoming data, which allows one to reduce loss of data due
16019 to UDP socket buffer overruns. The fifo_size and overrun_nonfatal
16020 options are related to this buffer.
16021
16022 The list of supported options follows.
16023
16024 buffer_size=size
16025 Set the UDP maximum socket buffer size in bytes. This is used to
16026 set either the receive or send buffer size, depending on what the
16027 socket is used for. Default is 32 KB for output, 384 KB for input.
16028 See also fifo_size.
16029
16030 bitrate=bitrate
16031 If set to nonzero, the output will have the specified constant
16032 bitrate if the input has enough packets to sustain it.
16033
16034 burst_bits=bits
16035 When using bitrate this specifies the maximum number of bits in
16036 packet bursts.
16037
16038 localport=port
16039 Override the local UDP port to bind with.
16040
16041 localaddr=addr
16042 Local IP address of a network interface used for sending packets or
16043 joining multicast groups.
16044
16045 pkt_size=size
16046 Set the size in bytes of UDP packets.
16047
16048 reuse=1|0
16049 Explicitly allow or disallow reusing UDP sockets.
16050
16051 ttl=ttl
16052 Set the time to live value (for multicast only).
16053
16054 connect=1|0
16055 Initialize the UDP socket with connect(). In this case, the
16056 destination address can't be changed with ff_udp_set_remote_url
16057 later. If the destination address isn't known at the start, this
16058 option can be specified in ff_udp_set_remote_url, too. This allows
16059 finding out the source address for the packets with getsockname,
16060 and makes writes return with AVERROR(ECONNREFUSED) if "destination
16061 unreachable" is received. For receiving, this gives the benefit of
16062 only receiving packets from the specified peer address/port.
16063
16064 sources=address[,address]
16065 Only receive packets sent from the specified addresses. In case of
16066 multicast, also subscribe to multicast traffic coming from these
16067 addresses only.
16068
16069 block=address[,address]
16070 Ignore packets sent from the specified addresses. In case of
16071 multicast, also exclude the source addresses in the multicast
16072 subscription.
16073
16074 fifo_size=units
16075 Set the UDP receiving circular buffer size, expressed as a number
16076 of packets with size of 188 bytes. If not specified defaults to
16077 7*4096.
16078
16079 overrun_nonfatal=1|0
16080 Survive in case of UDP receiving circular buffer overrun. Default
16081 value is 0.
16082
16083 timeout=microseconds
16084 Set raise error timeout, expressed in microseconds.
16085
16086 This option is only relevant in read mode: if no data arrived in
16087 more than this time interval, raise error.
16088
16089 broadcast=1|0
16090 Explicitly allow or disallow UDP broadcasting.
16091
16092 Note that broadcasting may not work properly on networks having a
16093 broadcast storm protection.
16094
16095 Examples
16096
16097 • Use ffmpeg to stream over UDP to a remote endpoint:
16098
16099 ffmpeg -i <input> -f <format> udp://<hostname>:<port>
16100
16101 • Use ffmpeg to stream in mpegts format over UDP using 188 sized UDP
16102 packets, using a large input buffer:
16103
16104 ffmpeg -i <input> -f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
16105
16106 • Use ffmpeg to receive over UDP from a remote endpoint:
16107
16108 ffmpeg -i udp://[<multicast-address>]:<port> ...
16109
16110 unix
16111 Unix local socket
16112
16113 The required syntax for a Unix socket URL is:
16114
16115 unix://<filepath>
16116
16117 The following parameters can be set via command line options (or in
16118 code via "AVOption"s):
16119
16120 timeout
16121 Timeout in ms.
16122
16123 listen
16124 Create the Unix socket in listening mode.
16125
16126 zmq
16127 ZeroMQ asynchronous messaging using the libzmq library.
16128
16129 This library supports unicast streaming to multiple clients without
16130 relying on an external server.
16131
16132 The required syntax for streaming or connecting to a stream is:
16133
16134 zmq:tcp://ip-address:port
16135
16136 Example: Create a localhost stream on port 5555:
16137
16138 ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
16139
16140 Multiple clients may connect to the stream using:
16141
16142 ffplay zmq:tcp://127.0.0.1:5555
16143
16144 Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub
16145 pattern. The server side binds to a port and publishes data. Clients
16146 connect to the server (via IP address/port) and subscribe to the
16147 stream. The order in which the server and client start generally does
16148 not matter.
16149
16150 ffmpeg must be compiled with the --enable-libzmq option to support this
16151 protocol.
16152
16153 Options can be set on the ffmpeg/ffplay command line. The following
16154 options are supported:
16155
16156 pkt_size
16157 Forces the maximum packet size for sending/receiving data. The
16158 default value is 131,072 bytes. On the server side, this sets the
16159 maximum size of sent packets via ZeroMQ. On the clients, it sets an
16160 internal buffer size for receiving packets. Note that pkt_size on
16161 the clients should be equal to or greater than pkt_size on the
16162 server. Otherwise the received message may be truncated causing
16163 decoding errors.
16164
16166 The libavdevice library provides the same interface as libavformat.
16167 Namely, an input device is considered like a demuxer, and an output
16168 device like a muxer, and the interface and generic device options are
16169 the same provided by libavformat (see the ffmpeg-formats manual).
16170
16171 In addition each input or output device may support so-called private
16172 options, which are specific for that component.
16173
16174 Options may be set by specifying -option value in the FFmpeg tools, or
16175 by setting the value explicitly in the device "AVFormatContext" options
16176 or using the libavutil/opt.h API for programmatic use.
16177
16179 Input devices are configured elements in FFmpeg which enable accessing
16180 the data coming from a multimedia device attached to your system.
16181
16182 When you configure your FFmpeg build, all the supported input devices
16183 are enabled by default. You can list all available ones using the
16184 configure option "--list-indevs".
16185
16186 You can disable all the input devices using the configure option
16187 "--disable-indevs", and selectively enable an input device using the
16188 option "--enable-indev=INDEV", or you can disable a particular input
16189 device using the option "--disable-indev=INDEV".
16190
16191 The option "-devices" of the ff* tools will display the list of
16192 supported input devices.
16193
16194 A description of the currently available input devices follows.
16195
16196 alsa
16197 ALSA (Advanced Linux Sound Architecture) input device.
16198
16199 To enable this input device during configuration you need libasound
16200 installed on your system.
16201
16202 This device allows capturing from an ALSA device. The name of the
16203 device to capture has to be an ALSA card identifier.
16204
16205 An ALSA identifier has the syntax:
16206
16207 hw:<CARD>[,<DEV>[,<SUBDEV>]]
16208
16209 where the DEV and SUBDEV components are optional.
16210
16211 The three arguments (in order: CARD,DEV,SUBDEV) specify card number or
16212 identifier, device number and subdevice number (-1 means any).
16213
16214 To see the list of cards currently recognized by your system check the
16215 files /proc/asound/cards and /proc/asound/devices.
16216
16217 For example to capture with ffmpeg from an ALSA device with card id 0,
16218 you may run the command:
16219
16220 ffmpeg -f alsa -i hw:0 alsaout.wav
16221
16222 For more information see:
16223 <http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html>
16224
16225 Options
16226
16227 sample_rate
16228 Set the sample rate in Hz. Default is 48000.
16229
16230 channels
16231 Set the number of channels. Default is 2.
16232
16233 android_camera
16234 Android camera input device.
16235
16236 This input devices uses the Android Camera2 NDK API which is available
16237 on devices with API level 24+. The availability of android_camera is
16238 autodetected during configuration.
16239
16240 This device allows capturing from all cameras on an Android device,
16241 which are integrated into the Camera2 NDK API.
16242
16243 The available cameras are enumerated internally and can be selected
16244 with the camera_index parameter. The input file string is discarded.
16245
16246 Generally the back facing camera has index 0 while the front facing
16247 camera has index 1.
16248
16249 Options
16250
16251 video_size
16252 Set the video size given as a string such as 640x480 or hd720.
16253 Falls back to the first available configuration reported by Android
16254 if requested video size is not available or by default.
16255
16256 framerate
16257 Set the video framerate. Falls back to the first available
16258 configuration reported by Android if requested framerate is not
16259 available or by default (-1).
16260
16261 camera_index
16262 Set the index of the camera to use. Default is 0.
16263
16264 input_queue_size
16265 Set the maximum number of frames to buffer. Default is 5.
16266
16267 avfoundation
16268 AVFoundation input device.
16269
16270 AVFoundation is the currently recommended framework by Apple for
16271 streamgrabbing on OSX >= 10.7 as well as on iOS.
16272
16273 The input filename has to be given in the following syntax:
16274
16275 -i "[[VIDEO]:[AUDIO]]"
16276
16277 The first entry selects the video input while the latter selects the
16278 audio input. The stream has to be specified by the device name or the
16279 device index as shown by the device list. Alternatively, the video
16280 and/or audio input device can be chosen by index using the
16281
16282 B<-video_device_index E<lt>INDEXE<gt>>
16283
16284 and/or
16285
16286 B<-audio_device_index E<lt>INDEXE<gt>>
16287
16288 , overriding any device name or index given in the input filename.
16289
16290 All available devices can be enumerated by using -list_devices true,
16291 listing all device names and corresponding indices.
16292
16293 There are two device name aliases:
16294
16295 "default"
16296 Select the AVFoundation default device of the corresponding type.
16297
16298 "none"
16299 Do not record the corresponding media type. This is equivalent to
16300 specifying an empty device name or index.
16301
16302 Options
16303
16304 AVFoundation supports the following options:
16305
16306 -list_devices <TRUE|FALSE>
16307 If set to true, a list of all available input devices is given
16308 showing all device names and indices.
16309
16310 -video_device_index <INDEX>
16311 Specify the video device by its index. Overrides anything given in
16312 the input filename.
16313
16314 -audio_device_index <INDEX>
16315 Specify the audio device by its index. Overrides anything given in
16316 the input filename.
16317
16318 -pixel_format <FORMAT>
16319 Request the video device to use a specific pixel format. If the
16320 specified format is not supported, a list of available formats is
16321 given and the first one in this list is used instead. Available
16322 pixel formats are: "monob, rgb555be, rgb555le, rgb565be, rgb565le,
16323 rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
16324 bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16,
16325 yuv422p10, yuv444p10,
16326 yuv420p, nv12, yuyv422, gray"
16327
16328 -framerate
16329 Set the grabbing frame rate. Default is "ntsc", corresponding to a
16330 frame rate of "30000/1001".
16331
16332 -video_size
16333 Set the video frame size.
16334
16335 -capture_cursor
16336 Capture the mouse pointer. Default is 0.
16337
16338 -capture_mouse_clicks
16339 Capture the screen mouse clicks. Default is 0.
16340
16341 -capture_raw_data
16342 Capture the raw device data. Default is 0. Using this option may
16343 result in receiving the underlying data delivered to the
16344 AVFoundation framework. E.g. for muxed devices that sends raw DV
16345 data to the framework (like tape-based camcorders), setting this
16346 option to false results in extracted video frames captured in the
16347 designated pixel format only. Setting this option to true results
16348 in receiving the raw DV stream untouched.
16349
16350 Examples
16351
16352 • Print the list of AVFoundation supported devices and exit:
16353
16354 $ ffmpeg -f avfoundation -list_devices true -i ""
16355
16356 • Record video from video device 0 and audio from audio device 0 into
16357 out.avi:
16358
16359 $ ffmpeg -f avfoundation -i "0:0" out.avi
16360
16361 • Record video from video device 2 and audio from audio device 1 into
16362 out.avi:
16363
16364 $ ffmpeg -f avfoundation -video_device_index 2 -i ":1" out.avi
16365
16366 • Record video from the system default video device using the pixel
16367 format bgr0 and do not record any audio into out.avi:
16368
16369 $ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi
16370
16371 • Record raw DV data from a suitable input device and write the
16372 output into out.dv:
16373
16374 $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv
16375
16376 bktr
16377 BSD video input device.
16378
16379 Options
16380
16381 framerate
16382 Set the frame rate.
16383
16384 video_size
16385 Set the video frame size. Default is "vga".
16386
16387 standard
16388 Available values are:
16389
16390 pal
16391 ntsc
16392 secam
16393 paln
16394 palm
16395 ntscj
16396
16397 decklink
16398 The decklink input device provides capture capabilities for Blackmagic
16399 DeckLink devices.
16400
16401 To enable this input device, you need the Blackmagic DeckLink SDK and
16402 you need to configure with the appropriate "--extra-cflags" and
16403 "--extra-ldflags". On Windows, you need to run the IDL files through
16404 widl.
16405
16406 DeckLink is very picky about the formats it supports. Pixel format of
16407 the input can be set with raw_format. Framerate and video size must be
16408 determined for your device with -list_formats 1. Audio sample rate is
16409 always 48 kHz and the number of channels can be 2, 8 or 16. Note that
16410 all audio channels are bundled in one single audio track.
16411
16412 Options
16413
16414 list_devices
16415 If set to true, print a list of devices and exit. Defaults to
16416 false. This option is deprecated, please use the "-sources" option
16417 of ffmpeg to list the available input devices.
16418
16419 list_formats
16420 If set to true, print a list of supported formats and exit.
16421 Defaults to false.
16422
16423 format_code <FourCC>
16424 This sets the input video format to the format given by the FourCC.
16425 To see the supported values of your device(s) use list_formats.
16426 Note that there is a FourCC 'pal ' that can also be used as pal (3
16427 letters). Default behavior is autodetection of the input video
16428 format, if the hardware supports it.
16429
16430 raw_format
16431 Set the pixel format of the captured video. Available values are:
16432
16433 auto
16434 This is the default which means 8-bit YUV 422 or 8-bit ARGB if
16435 format autodetection is used, 8-bit YUV 422 otherwise.
16436
16437 uyvy422
16438 8-bit YUV 422.
16439
16440 yuv422p10
16441 10-bit YUV 422.
16442
16443 argb
16444 8-bit RGB.
16445
16446 bgra
16447 8-bit RGB.
16448
16449 rgb10
16450 10-bit RGB.
16451
16452 teletext_lines
16453 If set to nonzero, an additional teletext stream will be captured
16454 from the vertical ancillary data. Both SD PAL (576i) and HD (1080i
16455 or 1080p) sources are supported. In case of HD sources, OP47
16456 packets are decoded.
16457
16458 This option is a bitmask of the SD PAL VBI lines captured,
16459 specifically lines 6 to 22, and lines 318 to 335. Line 6 is the LSB
16460 in the mask. Selected lines which do not contain teletext
16461 information will be ignored. You can use the special all constant
16462 to select all possible lines, or standard to skip lines 6, 318 and
16463 319, which are not compatible with all receivers.
16464
16465 For SD sources, ffmpeg needs to be compiled with
16466 "--enable-libzvbi". For HD sources, on older (pre-4K) DeckLink card
16467 models you have to capture in 10 bit mode.
16468
16469 channels
16470 Defines number of audio channels to capture. Must be 2, 8 or 16.
16471 Defaults to 2.
16472
16473 duplex_mode
16474 Sets the decklink device duplex/profile mode. Must be unset, half,
16475 full, one_sub_device_full, one_sub_device_half,
16476 two_sub_device_full, four_sub_device_half Defaults to unset.
16477
16478 Note: DeckLink SDK 11.0 have replaced the duplex property by a
16479 profile property. For the DeckLink Duo 2 and DeckLink Quad 2, a
16480 profile is shared between any 2 sub-devices that utilize the same
16481 connectors. For the DeckLink 8K Pro, a profile is shared between
16482 all 4 sub-devices. So DeckLink 8K Pro support four profiles.
16483
16484 Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
16485 one_sub_device_full, one_sub_device_half, two_sub_device_full,
16486 four_sub_device_half
16487
16488 Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: half,
16489 full
16490
16491 timecode_format
16492 Timecode type to include in the frame and video stream metadata.
16493 Must be none, rp188vitc, rp188vitc2, rp188ltc, rp188hfr, rp188any,
16494 vitc, vitc2, or serial. Defaults to none (not included).
16495
16496 In order to properly support 50/60 fps timecodes, the ordering of
16497 the queried timecode types for rp188any is HFR, VITC1, VITC2 and
16498 LTC for >30 fps content. Note that this is slightly different to
16499 the ordering used by the DeckLink API, which is HFR, VITC1, LTC,
16500 VITC2.
16501
16502 video_input
16503 Sets the video input source. Must be unset, sdi, hdmi, optical_sdi,
16504 component, composite or s_video. Defaults to unset.
16505
16506 audio_input
16507 Sets the audio input source. Must be unset, embedded, aes_ebu,
16508 analog, analog_xlr, analog_rca or microphone. Defaults to unset.
16509
16510 video_pts
16511 Sets the video packet timestamp source. Must be video, audio,
16512 reference, wallclock or abs_wallclock. Defaults to video.
16513
16514 audio_pts
16515 Sets the audio packet timestamp source. Must be video, audio,
16516 reference, wallclock or abs_wallclock. Defaults to audio.
16517
16518 draw_bars
16519 If set to true, color bars are drawn in the event of a signal loss.
16520 Defaults to true.
16521
16522 queue_size
16523 Sets maximum input buffer size in bytes. If the buffering reaches
16524 this value, incoming frames will be dropped. Defaults to
16525 1073741824.
16526
16527 audio_depth
16528 Sets the audio sample bit depth. Must be 16 or 32. Defaults to 16.
16529
16530 decklink_copyts
16531 If set to true, timestamps are forwarded as they are without
16532 removing the initial offset. Defaults to false.
16533
16534 timestamp_align
16535 Capture start time alignment in seconds. If set to nonzero, input
16536 frames are dropped till the system timestamp aligns with configured
16537 value. Alignment difference of up to one frame duration is
16538 tolerated. This is useful for maintaining input synchronization
16539 across N different hardware devices deployed for 'N-way'
16540 redundancy. The system time of different hardware devices should be
16541 synchronized with protocols such as NTP or PTP, before using this
16542 option. Note that this method is not foolproof. In some border
16543 cases input synchronization may not happen due to thread scheduling
16544 jitters in the OS. Either sync could go wrong by 1 frame or in a
16545 rarer case timestamp_align seconds. Defaults to 0.
16546
16547 wait_for_tc (bool)
16548 Drop frames till a frame with timecode is received. Sometimes
16549 serial timecode isn't received with the first input frame. If that
16550 happens, the stored stream timecode will be inaccurate. If this
16551 option is set to true, input frames are dropped till a frame with
16552 timecode is received. Option timecode_format must be specified.
16553 Defaults to false.
16554
16555 enable_klv(bool)
16556 If set to true, extracts KLV data from VANC and outputs KLV
16557 packets. KLV VANC packets are joined based on MID and PSC fields
16558 and aggregated into one KLV packet. Defaults to false.
16559
16560 Examples
16561
16562 • List input devices:
16563
16564 ffmpeg -sources decklink
16565
16566 • List supported formats:
16567
16568 ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
16569
16570 • Capture video clip at 1080i50:
16571
16572 ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
16573
16574 • Capture video clip at 1080i50 10 bit:
16575
16576 ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
16577
16578 • Capture video clip at 1080i50 with 16 audio channels:
16579
16580 ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
16581
16582 dshow
16583 Windows DirectShow input device.
16584
16585 DirectShow support is enabled when FFmpeg is built with the mingw-w64
16586 project. Currently only audio and video devices are supported.
16587
16588 Multiple devices may be opened as separate inputs, but they may also be
16589 opened on the same input, which should improve synchronism between
16590 them.
16591
16592 The input name should be in the format:
16593
16594 <TYPE>=<NAME>[:<TYPE>=<NAME>]
16595
16596 where TYPE can be either audio or video, and NAME is the device's name
16597 or alternative name..
16598
16599 Options
16600
16601 If no options are specified, the device's defaults are used. If the
16602 device does not support the requested options, it will fail to open.
16603
16604 video_size
16605 Set the video size in the captured video.
16606
16607 framerate
16608 Set the frame rate in the captured video.
16609
16610 sample_rate
16611 Set the sample rate (in Hz) of the captured audio.
16612
16613 sample_size
16614 Set the sample size (in bits) of the captured audio.
16615
16616 channels
16617 Set the number of channels in the captured audio.
16618
16619 list_devices
16620 If set to true, print a list of devices and exit.
16621
16622 list_options
16623 If set to true, print a list of selected device's options and exit.
16624
16625 video_device_number
16626 Set video device number for devices with the same name (starts at
16627 0, defaults to 0).
16628
16629 audio_device_number
16630 Set audio device number for devices with the same name (starts at
16631 0, defaults to 0).
16632
16633 pixel_format
16634 Select pixel format to be used by DirectShow. This may only be set
16635 when the video codec is not set or set to rawvideo.
16636
16637 audio_buffer_size
16638 Set audio device buffer size in milliseconds (which can directly
16639 impact latency, depending on the device). Defaults to using the
16640 audio device's default buffer size (typically some multiple of
16641 500ms). Setting this value too low can degrade performance. See
16642 also
16643 <http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx>
16644
16645 video_pin_name
16646 Select video capture pin to use by name or alternative name.
16647
16648 audio_pin_name
16649 Select audio capture pin to use by name or alternative name.
16650
16651 crossbar_video_input_pin_number
16652 Select video input pin number for crossbar device. This will be
16653 routed to the crossbar device's Video Decoder output pin. Note
16654 that changing this value can affect future invocations (sets a new
16655 default) until system reboot occurs.
16656
16657 crossbar_audio_input_pin_number
16658 Select audio input pin number for crossbar device. This will be
16659 routed to the crossbar device's Audio Decoder output pin. Note
16660 that changing this value can affect future invocations (sets a new
16661 default) until system reboot occurs.
16662
16663 show_video_device_dialog
16664 If set to true, before capture starts, popup a display dialog to
16665 the end user, allowing them to change video filter properties and
16666 configurations manually. Note that for crossbar devices, adjusting
16667 values in this dialog may be needed at times to toggle between PAL
16668 (25 fps) and NTSC (29.97) input frame rates, sizes, interlacing,
16669 etc. Changing these values can enable different scan rates/frame
16670 rates and avoiding green bars at the bottom, flickering scan lines,
16671 etc. Note that with some devices, changing these properties can
16672 also affect future invocations (sets new defaults) until system
16673 reboot occurs.
16674
16675 show_audio_device_dialog
16676 If set to true, before capture starts, popup a display dialog to
16677 the end user, allowing them to change audio filter properties and
16678 configurations manually.
16679
16680 show_video_crossbar_connection_dialog
16681 If set to true, before capture starts, popup a display dialog to
16682 the end user, allowing them to manually modify crossbar pin
16683 routings, when it opens a video device.
16684
16685 show_audio_crossbar_connection_dialog
16686 If set to true, before capture starts, popup a display dialog to
16687 the end user, allowing them to manually modify crossbar pin
16688 routings, when it opens an audio device.
16689
16690 show_analog_tv_tuner_dialog
16691 If set to true, before capture starts, popup a display dialog to
16692 the end user, allowing them to manually modify TV channels and
16693 frequencies.
16694
16695 show_analog_tv_tuner_audio_dialog
16696 If set to true, before capture starts, popup a display dialog to
16697 the end user, allowing them to manually modify TV audio (like mono
16698 vs. stereo, Language A,B or C).
16699
16700 audio_device_load
16701 Load an audio capture filter device from file instead of searching
16702 it by name. It may load additional parameters too, if the filter
16703 supports the serialization of its properties to. To use this an
16704 audio capture source has to be specified, but it can be anything
16705 even fake one.
16706
16707 audio_device_save
16708 Save the currently used audio capture filter device and its
16709 parameters (if the filter supports it) to a file. If a file with
16710 the same name exists it will be overwritten.
16711
16712 video_device_load
16713 Load a video capture filter device from file instead of searching
16714 it by name. It may load additional parameters too, if the filter
16715 supports the serialization of its properties to. To use this a
16716 video capture source has to be specified, but it can be anything
16717 even fake one.
16718
16719 video_device_save
16720 Save the currently used video capture filter device and its
16721 parameters (if the filter supports it) to a file. If a file with
16722 the same name exists it will be overwritten.
16723
16724 use_video_device_timestamps
16725 If set to false, the timestamp for video frames will be derived
16726 from the wallclock instead of the timestamp provided by the capture
16727 device. This allows working around devices that provide unreliable
16728 timestamps.
16729
16730 Examples
16731
16732 • Print the list of DirectShow supported devices and exit:
16733
16734 $ ffmpeg -list_devices true -f dshow -i dummy
16735
16736 • Open video device Camera:
16737
16738 $ ffmpeg -f dshow -i video="Camera"
16739
16740 • Open second video device with name Camera:
16741
16742 $ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
16743
16744 • Open video device Camera and audio device Microphone:
16745
16746 $ ffmpeg -f dshow -i video="Camera":audio="Microphone"
16747
16748 • Print the list of supported options in selected device and exit:
16749
16750 $ ffmpeg -list_options true -f dshow -i video="Camera"
16751
16752 • Specify pin names to capture by name or alternative name, specify
16753 alternative device name:
16754
16755 $ 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"
16756
16757 • Configure a crossbar device, specifying crossbar pins, allow user
16758 to adjust video capture properties at startup:
16759
16760 $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
16761 -crossbar_audio_input_pin_number 3 -i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture"
16762
16763 fbdev
16764 Linux framebuffer input device.
16765
16766 The Linux framebuffer is a graphic hardware-independent abstraction
16767 layer to show graphics on a computer monitor, typically on the console.
16768 It is accessed through a file device node, usually /dev/fb0.
16769
16770 For more detailed information read the file
16771 Documentation/fb/framebuffer.txt included in the Linux source tree.
16772
16773 See also <http://linux-fbdev.sourceforge.net/>, and fbset(1).
16774
16775 To record from the framebuffer device /dev/fb0 with ffmpeg:
16776
16777 ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
16778
16779 You can take a single screenshot image with the command:
16780
16781 ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
16782
16783 Options
16784
16785 framerate
16786 Set the frame rate. Default is 25.
16787
16788 gdigrab
16789 Win32 GDI-based screen capture device.
16790
16791 This device allows you to capture a region of the display on Windows.
16792
16793 There are two options for the input filename:
16794
16795 desktop
16796
16797 or
16798
16799 title=<window_title>
16800
16801 The first option will capture the entire desktop, or a fixed region of
16802 the desktop. The second option will instead capture the contents of a
16803 single window, regardless of its position on the screen.
16804
16805 For example, to grab the entire desktop using ffmpeg:
16806
16807 ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
16808
16809 Grab a 640x480 region at position "10,20":
16810
16811 ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
16812
16813 Grab the contents of the window named "Calculator"
16814
16815 ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
16816
16817 Options
16818
16819 draw_mouse
16820 Specify whether to draw the mouse pointer. Use the value 0 to not
16821 draw the pointer. Default value is 1.
16822
16823 framerate
16824 Set the grabbing frame rate. Default value is "ntsc", corresponding
16825 to a frame rate of "30000/1001".
16826
16827 show_region
16828 Show grabbed region on screen.
16829
16830 If show_region is specified with 1, then the grabbing region will
16831 be indicated on screen. With this option, it is easy to know what
16832 is being grabbed if only a portion of the screen is grabbed.
16833
16834 Note that show_region is incompatible with grabbing the contents of
16835 a single window.
16836
16837 For example:
16838
16839 ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
16840
16841 video_size
16842 Set the video frame size. The default is to capture the full screen
16843 if desktop is selected, or the full window size if
16844 title=window_title is selected.
16845
16846 offset_x
16847 When capturing a region with video_size, set the distance from the
16848 left edge of the screen or desktop.
16849
16850 Note that the offset calculation is from the top left corner of the
16851 primary monitor on Windows. If you have a monitor positioned to the
16852 left of your primary monitor, you will need to use a negative
16853 offset_x value to move the region to that monitor.
16854
16855 offset_y
16856 When capturing a region with video_size, set the distance from the
16857 top edge of the screen or desktop.
16858
16859 Note that the offset calculation is from the top left corner of the
16860 primary monitor on Windows. If you have a monitor positioned above
16861 your primary monitor, you will need to use a negative offset_y
16862 value to move the region to that monitor.
16863
16864 iec61883
16865 FireWire DV/HDV input device using libiec61883.
16866
16867 To enable this input device, you need libiec61883, libraw1394 and
16868 libavc1394 installed on your system. Use the configure option
16869 "--enable-libiec61883" to compile with the device enabled.
16870
16871 The iec61883 capture device supports capturing from a video device
16872 connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
16873 FireWire stack (juju). This is the default DV/HDV input method in Linux
16874 Kernel 2.6.37 and later, since the old FireWire stack was removed.
16875
16876 Specify the FireWire port to be used as input file, or "auto" to choose
16877 the first port connected.
16878
16879 Options
16880
16881 dvtype
16882 Override autodetection of DV/HDV. This should only be used if auto
16883 detection does not work, or if usage of a different device type
16884 should be prohibited. Treating a DV device as HDV (or vice versa)
16885 will not work and result in undefined behavior. The values auto,
16886 dv and hdv are supported.
16887
16888 dvbuffer
16889 Set maximum size of buffer for incoming data, in frames. For DV,
16890 this is an exact value. For HDV, it is not frame exact, since HDV
16891 does not have a fixed frame size.
16892
16893 dvguid
16894 Select the capture device by specifying its GUID. Capturing will
16895 only be performed from the specified device and fails if no device
16896 with the given GUID is found. This is useful to select the input if
16897 multiple devices are connected at the same time. Look at
16898 /sys/bus/firewire/devices to find out the GUIDs.
16899
16900 Examples
16901
16902 • Grab and show the input of a FireWire DV/HDV device.
16903
16904 ffplay -f iec61883 -i auto
16905
16906 • Grab and record the input of a FireWire DV/HDV device, using a
16907 packet buffer of 100000 packets if the source is HDV.
16908
16909 ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
16910
16911 jack
16912 JACK input device.
16913
16914 To enable this input device during configuration you need libjack
16915 installed on your system.
16916
16917 A JACK input device creates one or more JACK writable clients, one for
16918 each audio channel, with name client_name:input_N, where client_name is
16919 the name provided by the application, and N is a number which
16920 identifies the channel. Each writable client will send the acquired
16921 data to the FFmpeg input device.
16922
16923 Once you have created one or more JACK readable clients, you need to
16924 connect them to one or more JACK writable clients.
16925
16926 To connect or disconnect JACK clients you can use the jack_connect and
16927 jack_disconnect programs, or do it through a graphical interface, for
16928 example with qjackctl.
16929
16930 To list the JACK clients and their properties you can invoke the
16931 command jack_lsp.
16932
16933 Follows an example which shows how to capture a JACK readable client
16934 with ffmpeg.
16935
16936 # Create a JACK writable client with name "ffmpeg".
16937 $ ffmpeg -f jack -i ffmpeg -y out.wav
16938
16939 # Start the sample jack_metro readable client.
16940 $ jack_metro -b 120 -d 0.2 -f 4000
16941
16942 # List the current JACK clients.
16943 $ jack_lsp -c
16944 system:capture_1
16945 system:capture_2
16946 system:playback_1
16947 system:playback_2
16948 ffmpeg:input_1
16949 metro:120_bpm
16950
16951 # Connect metro to the ffmpeg writable client.
16952 $ jack_connect metro:120_bpm ffmpeg:input_1
16953
16954 For more information read: <http://jackaudio.org/>
16955
16956 Options
16957
16958 channels
16959 Set the number of channels. Default is 2.
16960
16961 kmsgrab
16962 KMS video input device.
16963
16964 Captures the KMS scanout framebuffer associated with a specified CRTC
16965 or plane as a DRM object that can be passed to other hardware
16966 functions.
16967
16968 Requires either DRM master or CAP_SYS_ADMIN to run.
16969
16970 If you don't understand what all of that means, you probably don't want
16971 this. Look at x11grab instead.
16972
16973 Options
16974
16975 device
16976 DRM device to capture on. Defaults to /dev/dri/card0.
16977
16978 format
16979 Pixel format of the framebuffer. This can be autodetected if you
16980 are running Linux 5.7 or later, but needs to be provided for
16981 earlier versions. Defaults to bgr0, which is the most common
16982 format used by the Linux console and Xorg X server.
16983
16984 format_modifier
16985 Format modifier to signal on output frames. This is necessary to
16986 import correctly into some APIs. It can be autodetected if you are
16987 running Linux 5.7 or later, but will need to be provided explicitly
16988 when needed in earlier versions. See the libdrm documentation for
16989 possible values.
16990
16991 crtc_id
16992 KMS CRTC ID to define the capture source. The first active plane
16993 on the given CRTC will be used.
16994
16995 plane_id
16996 KMS plane ID to define the capture source. Defaults to the first
16997 active plane found if neither crtc_id nor plane_id are specified.
16998
16999 framerate
17000 Framerate to capture at. This is not synchronised to any page
17001 flipping or framebuffer changes - it just defines the interval at
17002 which the framebuffer is sampled. Sampling faster than the
17003 framebuffer update rate will generate independent frames with the
17004 same content. Defaults to 30.
17005
17006 Examples
17007
17008 • Capture from the first active plane, download the result to normal
17009 frames and encode. This will only work if the framebuffer is both
17010 linear and mappable - if not, the result may be scrambled or fail
17011 to download.
17012
17013 ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
17014
17015 • Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert
17016 to NV12 and encode as H.264.
17017
17018 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
17019
17020 • To capture only part of a plane the output can be cropped - this
17021 can be used to capture a single window, as long as it has a known
17022 absolute position and size. For example, to capture and encode the
17023 middle quarter of a 1920x1080 plane:
17024
17025 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
17026
17027 lavfi
17028 Libavfilter input virtual device.
17029
17030 This input device reads data from the open output pads of a libavfilter
17031 filtergraph.
17032
17033 For each filtergraph open output, the input device will create a
17034 corresponding stream which is mapped to the generated output. Currently
17035 only video data is supported. The filtergraph is specified through the
17036 option graph.
17037
17038 Options
17039
17040 graph
17041 Specify the filtergraph to use as input. Each video open output
17042 must be labelled by a unique string of the form "outN", where N is
17043 a number starting from 0 corresponding to the mapped input stream
17044 generated by the device. The first unlabelled output is
17045 automatically assigned to the "out0" label, but all the others need
17046 to be specified explicitly.
17047
17048 The suffix "+subcc" can be appended to the output label to create
17049 an extra stream with the closed captions packets attached to that
17050 output (experimental; only for EIA-608 / CEA-708 for now). The
17051 subcc streams are created after all the normal streams, in the
17052 order of the corresponding stream. For example, if there is
17053 "out19+subcc", "out7+subcc" and up to "out42", the stream #43 is
17054 subcc for stream #7 and stream #44 is subcc for stream #19.
17055
17056 If not specified defaults to the filename specified for the input
17057 device.
17058
17059 graph_file
17060 Set the filename of the filtergraph to be read and sent to the
17061 other filters. Syntax of the filtergraph is the same as the one
17062 specified by the option graph.
17063
17064 dumpgraph
17065 Dump graph to stderr.
17066
17067 Examples
17068
17069 • Create a color video stream and play it back with ffplay:
17070
17071 ffplay -f lavfi -graph "color=c=pink [out0]" dummy
17072
17073 • As the previous example, but use filename for specifying the graph
17074 description, and omit the "out0" label:
17075
17076 ffplay -f lavfi color=c=pink
17077
17078 • Create three different video test filtered sources and play them:
17079
17080 ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
17081
17082 • Read an audio stream from a file using the amovie source and play
17083 it back with ffplay:
17084
17085 ffplay -f lavfi "amovie=test.wav"
17086
17087 • Read an audio stream and a video stream and play it back with
17088 ffplay:
17089
17090 ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
17091
17092 • Dump decoded frames to images and closed captions to a file
17093 (experimental):
17094
17095 ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
17096
17097 libcdio
17098 Audio-CD input device based on libcdio.
17099
17100 To enable this input device during configuration you need libcdio
17101 installed on your system. It requires the configure option
17102 "--enable-libcdio".
17103
17104 This device allows playing and grabbing from an Audio-CD.
17105
17106 For example to copy with ffmpeg the entire Audio-CD in /dev/sr0, you
17107 may run the command:
17108
17109 ffmpeg -f libcdio -i /dev/sr0 cd.wav
17110
17111 Options
17112
17113 speed
17114 Set drive reading speed. Default value is 0.
17115
17116 The speed is specified CD-ROM speed units. The speed is set through
17117 the libcdio "cdio_cddap_speed_set" function. On many CD-ROM drives,
17118 specifying a value too large will result in using the fastest
17119 speed.
17120
17121 paranoia_mode
17122 Set paranoia recovery mode flags. It accepts one of the following
17123 values:
17124
17125 disable
17126 verify
17127 overlap
17128 neverskip
17129 full
17130
17131 Default value is disable.
17132
17133 For more information about the available recovery modes, consult
17134 the paranoia project documentation.
17135
17136 libdc1394
17137 IIDC1394 input device, based on libdc1394 and libraw1394.
17138
17139 Requires the configure option "--enable-libdc1394".
17140
17141 Options
17142
17143 framerate
17144 Set the frame rate. Default is "ntsc", corresponding to a frame
17145 rate of "30000/1001".
17146
17147 pixel_format
17148 Select the pixel format. Default is "uyvy422".
17149
17150 video_size
17151 Set the video size given as a string such as "640x480" or "hd720".
17152 Default is "qvga".
17153
17154 openal
17155 The OpenAL input device provides audio capture on all systems with a
17156 working OpenAL 1.1 implementation.
17157
17158 To enable this input device during configuration, you need OpenAL
17159 headers and libraries installed on your system, and need to configure
17160 FFmpeg with "--enable-openal".
17161
17162 OpenAL headers and libraries should be provided as part of your OpenAL
17163 implementation, or as an additional download (an SDK). Depending on
17164 your installation you may need to specify additional flags via the
17165 "--extra-cflags" and "--extra-ldflags" for allowing the build system to
17166 locate the OpenAL headers and libraries.
17167
17168 An incomplete list of OpenAL implementations follows:
17169
17170 Creative
17171 The official Windows implementation, providing hardware
17172 acceleration with supported devices and software fallback. See
17173 <http://openal.org/>.
17174
17175 OpenAL Soft
17176 Portable, open source (LGPL) software implementation. Includes
17177 backends for the most common sound APIs on the Windows, Linux,
17178 Solaris, and BSD operating systems. See
17179 <http://kcat.strangesoft.net/openal.html>.
17180
17181 Apple
17182 OpenAL is part of Core Audio, the official Mac OS X Audio
17183 interface. See
17184 <http://developer.apple.com/technologies/mac/audio-and-video.html>
17185
17186 This device allows one to capture from an audio input device handled
17187 through OpenAL.
17188
17189 You need to specify the name of the device to capture in the provided
17190 filename. If the empty string is provided, the device will
17191 automatically select the default device. You can get the list of the
17192 supported devices by using the option list_devices.
17193
17194 Options
17195
17196 channels
17197 Set the number of channels in the captured audio. Only the values 1
17198 (monaural) and 2 (stereo) are currently supported. Defaults to 2.
17199
17200 sample_size
17201 Set the sample size (in bits) of the captured audio. Only the
17202 values 8 and 16 are currently supported. Defaults to 16.
17203
17204 sample_rate
17205 Set the sample rate (in Hz) of the captured audio. Defaults to
17206 44.1k.
17207
17208 list_devices
17209 If set to true, print a list of devices and exit. Defaults to
17210 false.
17211
17212 Examples
17213
17214 Print the list of OpenAL supported devices and exit:
17215
17216 $ ffmpeg -list_devices true -f openal -i dummy out.ogg
17217
17218 Capture from the OpenAL device DR-BT101 via PulseAudio:
17219
17220 $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
17221
17222 Capture from the default device (note the empty string '' as filename):
17223
17224 $ ffmpeg -f openal -i '' out.ogg
17225
17226 Capture from two devices simultaneously, writing to two different
17227 files, within the same ffmpeg command:
17228
17229 $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
17230
17231 Note: not all OpenAL implementations support multiple simultaneous
17232 capture - try the latest OpenAL Soft if the above does not work.
17233
17234 oss
17235 Open Sound System input device.
17236
17237 The filename to provide to the input device is the device node
17238 representing the OSS input device, and is usually set to /dev/dsp.
17239
17240 For example to grab from /dev/dsp using ffmpeg use the command:
17241
17242 ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
17243
17244 For more information about OSS see:
17245 <http://manuals.opensound.com/usersguide/dsp.html>
17246
17247 Options
17248
17249 sample_rate
17250 Set the sample rate in Hz. Default is 48000.
17251
17252 channels
17253 Set the number of channels. Default is 2.
17254
17255 pulse
17256 PulseAudio input device.
17257
17258 To enable this output device you need to configure FFmpeg with
17259 "--enable-libpulse".
17260
17261 The filename to provide to the input device is a source device or the
17262 string "default"
17263
17264 To list the PulseAudio source devices and their properties you can
17265 invoke the command pactl list sources.
17266
17267 More information about PulseAudio can be found on
17268 <http://www.pulseaudio.org>.
17269
17270 Options
17271
17272 server
17273 Connect to a specific PulseAudio server, specified by an IP
17274 address. Default server is used when not provided.
17275
17276 name
17277 Specify the application name PulseAudio will use when showing
17278 active clients, by default it is the "LIBAVFORMAT_IDENT" string.
17279
17280 stream_name
17281 Specify the stream name PulseAudio will use when showing active
17282 streams, by default it is "record".
17283
17284 sample_rate
17285 Specify the samplerate in Hz, by default 48kHz is used.
17286
17287 channels
17288 Specify the channels in use, by default 2 (stereo) is set.
17289
17290 frame_size
17291 This option does nothing and is deprecated.
17292
17293 fragment_size
17294 Specify the size in bytes of the minimal buffering fragment in
17295 PulseAudio, it will affect the audio latency. By default it is set
17296 to 50 ms amount of data.
17297
17298 wallclock
17299 Set the initial PTS using the current time. Default is 1.
17300
17301 Examples
17302
17303 Record a stream from default device:
17304
17305 ffmpeg -f pulse -i default /tmp/pulse.wav
17306
17307 sndio
17308 sndio input device.
17309
17310 To enable this input device during configuration you need libsndio
17311 installed on your system.
17312
17313 The filename to provide to the input device is the device node
17314 representing the sndio input device, and is usually set to /dev/audio0.
17315
17316 For example to grab from /dev/audio0 using ffmpeg use the command:
17317
17318 ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
17319
17320 Options
17321
17322 sample_rate
17323 Set the sample rate in Hz. Default is 48000.
17324
17325 channels
17326 Set the number of channels. Default is 2.
17327
17328 video4linux2, v4l2
17329 Video4Linux2 input video device.
17330
17331 "v4l2" can be used as alias for "video4linux2".
17332
17333 If FFmpeg is built with v4l-utils support (by using the
17334 "--enable-libv4l2" configure option), it is possible to use it with the
17335 "-use_libv4l2" input device option.
17336
17337 The name of the device to grab is a file device node, usually Linux
17338 systems tend to automatically create such nodes when the device (e.g.
17339 an USB webcam) is plugged into the system, and has a name of the kind
17340 /dev/videoN, where N is a number associated to the device.
17341
17342 Video4Linux2 devices usually support a limited set of widthxheight
17343 sizes and frame rates. You can check which are supported using
17344 -list_formats all for Video4Linux2 devices. Some devices, like TV
17345 cards, support one or more standards. It is possible to list all the
17346 supported standards using -list_standards all.
17347
17348 The time base for the timestamps is 1 microsecond. Depending on the
17349 kernel version and configuration, the timestamps may be derived from
17350 the real time clock (origin at the Unix Epoch) or the monotonic clock
17351 (origin usually at boot time, unaffected by NTP or manual changes to
17352 the clock). The -timestamps abs or -ts abs option can be used to force
17353 conversion into the real time clock.
17354
17355 Some usage examples of the video4linux2 device with ffmpeg and ffplay:
17356
17357 • List supported formats for a video4linux2 device:
17358
17359 ffplay -f video4linux2 -list_formats all /dev/video0
17360
17361 • Grab and show the input of a video4linux2 device:
17362
17363 ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
17364
17365 • Grab and record the input of a video4linux2 device, leave the frame
17366 rate and size as previously set:
17367
17368 ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
17369
17370 For more information about Video4Linux, check <http://linuxtv.org/>.
17371
17372 Options
17373
17374 standard
17375 Set the standard. Must be the name of a supported standard. To get
17376 a list of the supported standards, use the list_standards option.
17377
17378 channel
17379 Set the input channel number. Default to -1, which means using the
17380 previously selected channel.
17381
17382 video_size
17383 Set the video frame size. The argument must be a string in the form
17384 WIDTHxHEIGHT or a valid size abbreviation.
17385
17386 pixel_format
17387 Select the pixel format (only valid for raw video input).
17388
17389 input_format
17390 Set the preferred pixel format (for raw video) or a codec name.
17391 This option allows one to select the input format, when several are
17392 available.
17393
17394 framerate
17395 Set the preferred video frame rate.
17396
17397 list_formats
17398 List available formats (supported pixel formats, codecs, and frame
17399 sizes) and exit.
17400
17401 Available values are:
17402
17403 all Show all available (compressed and non-compressed) formats.
17404
17405 raw Show only raw video (non-compressed) formats.
17406
17407 compressed
17408 Show only compressed formats.
17409
17410 list_standards
17411 List supported standards and exit.
17412
17413 Available values are:
17414
17415 all Show all supported standards.
17416
17417 timestamps, ts
17418 Set type of timestamps for grabbed frames.
17419
17420 Available values are:
17421
17422 default
17423 Use timestamps from the kernel.
17424
17425 abs Use absolute timestamps (wall clock).
17426
17427 mono2abs
17428 Force conversion from monotonic to absolute timestamps.
17429
17430 Default value is "default".
17431
17432 use_libv4l2
17433 Use libv4l2 (v4l-utils) conversion functions. Default is 0.
17434
17435 vfwcap
17436 VfW (Video for Windows) capture input device.
17437
17438 The filename passed as input is the capture driver number, ranging from
17439 0 to 9. You may use "list" as filename to print a list of drivers. Any
17440 other filename will be interpreted as device number 0.
17441
17442 Options
17443
17444 video_size
17445 Set the video frame size.
17446
17447 framerate
17448 Set the grabbing frame rate. Default value is "ntsc", corresponding
17449 to a frame rate of "30000/1001".
17450
17451 x11grab
17452 X11 video input device.
17453
17454 To enable this input device during configuration you need libxcb
17455 installed on your system. It will be automatically detected during
17456 configuration.
17457
17458 This device allows one to capture a region of an X11 display.
17459
17460 The filename passed as input has the syntax:
17461
17462 [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
17463
17464 hostname:display_number.screen_number specifies the X11 display name of
17465 the screen to grab from. hostname can be omitted, and defaults to
17466 "localhost". The environment variable DISPLAY contains the default
17467 display name.
17468
17469 x_offset and y_offset specify the offsets of the grabbed area with
17470 respect to the top-left border of the X11 screen. They default to 0.
17471
17472 Check the X11 documentation (e.g. man X) for more detailed information.
17473
17474 Use the xdpyinfo program for getting basic information about the
17475 properties of your X11 display (e.g. grep for "name" or "dimensions").
17476
17477 For example to grab from :0.0 using ffmpeg:
17478
17479 ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
17480
17481 Grab at position "10,20":
17482
17483 ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
17484
17485 Options
17486
17487 select_region
17488 Specify whether to select the grabbing area graphically using the
17489 pointer. A value of 1 prompts the user to select the grabbing area
17490 graphically by clicking and dragging. A single click with no
17491 dragging will select the whole screen. A region with zero width or
17492 height will also select the whole screen. This option overwrites
17493 the video_size, grab_x, and grab_y options. Default value is 0.
17494
17495 draw_mouse
17496 Specify whether to draw the mouse pointer. A value of 0 specifies
17497 not to draw the pointer. Default value is 1.
17498
17499 follow_mouse
17500 Make the grabbed area follow the mouse. The argument can be
17501 "centered" or a number of pixels PIXELS.
17502
17503 When it is specified with "centered", the grabbing region follows
17504 the mouse pointer and keeps the pointer at the center of region;
17505 otherwise, the region follows only when the mouse pointer reaches
17506 within PIXELS (greater than zero) to the edge of region.
17507
17508 For example:
17509
17510 ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
17511
17512 To follow only when the mouse pointer reaches within 100 pixels to
17513 edge:
17514
17515 ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
17516
17517 framerate
17518 Set the grabbing frame rate. Default value is "ntsc", corresponding
17519 to a frame rate of "30000/1001".
17520
17521 show_region
17522 Show grabbed region on screen.
17523
17524 If show_region is specified with 1, then the grabbing region will
17525 be indicated on screen. With this option, it is easy to know what
17526 is being grabbed if only a portion of the screen is grabbed.
17527
17528 region_border
17529 Set the region border thickness if -show_region 1 is used. Range
17530 is 1 to 128 and default is 3 (XCB-based x11grab only).
17531
17532 For example:
17533
17534 ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
17535
17536 With follow_mouse:
17537
17538 ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
17539
17540 window_id
17541 Grab this window, instead of the whole screen. Default value is 0,
17542 which maps to the whole screen (root window).
17543
17544 The id of a window can be found using the xwininfo program,
17545 possibly with options -tree and -root.
17546
17547 If the window is later enlarged, the new area is not recorded.
17548 Video ends when the window is closed, unmapped (i.e., iconified) or
17549 shrunk beyond the video size (which defaults to the initial window
17550 size).
17551
17552 This option disables options follow_mouse and select_region.
17553
17554 video_size
17555 Set the video frame size. Default is the full desktop or window.
17556
17557 grab_x
17558 grab_y
17559 Set the grabbing region coordinates. They are expressed as offset
17560 from the top left corner of the X11 window and correspond to the
17561 x_offset and y_offset parameters in the device name. The default
17562 value for both options is 0.
17563
17565 Output devices are configured elements in FFmpeg that can write
17566 multimedia data to an output device attached to your system.
17567
17568 When you configure your FFmpeg build, all the supported output devices
17569 are enabled by default. You can list all available ones using the
17570 configure option "--list-outdevs".
17571
17572 You can disable all the output devices using the configure option
17573 "--disable-outdevs", and selectively enable an output device using the
17574 option "--enable-outdev=OUTDEV", or you can disable a particular input
17575 device using the option "--disable-outdev=OUTDEV".
17576
17577 The option "-devices" of the ff* tools will display the list of enabled
17578 output devices.
17579
17580 A description of the currently available output devices follows.
17581
17582 alsa
17583 ALSA (Advanced Linux Sound Architecture) output device.
17584
17585 Examples
17586
17587 • Play a file on default ALSA device:
17588
17589 ffmpeg -i INPUT -f alsa default
17590
17591 • Play a file on soundcard 1, audio device 7:
17592
17593 ffmpeg -i INPUT -f alsa hw:1,7
17594
17595 AudioToolbox
17596 AudioToolbox output device.
17597
17598 Allows native output to CoreAudio devices on OSX.
17599
17600 The output filename can be empty (or "-") to refer to the default
17601 system output device or a number that refers to the device index as
17602 shown using: "-list_devices true".
17603
17604 Alternatively, the audio input device can be chosen by index using the
17605
17606 B<-audio_device_index E<lt>INDEXE<gt>>
17607
17608 , overriding any device name or index given in the input filename.
17609
17610 All available devices can be enumerated by using -list_devices true,
17611 listing all device names, UIDs and corresponding indices.
17612
17613 Options
17614
17615 AudioToolbox supports the following options:
17616
17617 -audio_device_index <INDEX>
17618 Specify the audio device by its index. Overrides anything given in
17619 the output filename.
17620
17621 Examples
17622
17623 • Print the list of supported devices and output a sine wave to the
17624 default device:
17625
17626 $ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -list_devices true -
17627
17628 • Output a sine wave to the device with the index 2, overriding any
17629 output filename:
17630
17631 $ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -audio_device_index 2 -
17632
17633 caca
17634 CACA output device.
17635
17636 This output device allows one to show a video stream in CACA window.
17637 Only one CACA window is allowed per application, so you can have only
17638 one instance of this output device in an application.
17639
17640 To enable this output device you need to configure FFmpeg with
17641 "--enable-libcaca". libcaca is a graphics library that outputs text
17642 instead of pixels.
17643
17644 For more information about libcaca, check:
17645 <http://caca.zoy.org/wiki/libcaca>
17646
17647 Options
17648
17649 window_title
17650 Set the CACA window title, if not specified default to the filename
17651 specified for the output device.
17652
17653 window_size
17654 Set the CACA window size, can be a string of the form widthxheight
17655 or a video size abbreviation. If not specified it defaults to the
17656 size of the input video.
17657
17658 driver
17659 Set display driver.
17660
17661 algorithm
17662 Set dithering algorithm. Dithering is necessary because the picture
17663 being rendered has usually far more colours than the available
17664 palette. The accepted values are listed with "-list_dither
17665 algorithms".
17666
17667 antialias
17668 Set antialias method. Antialiasing smoothens the rendered image and
17669 avoids the commonly seen staircase effect. The accepted values are
17670 listed with "-list_dither antialiases".
17671
17672 charset
17673 Set which characters are going to be used when rendering text. The
17674 accepted values are listed with "-list_dither charsets".
17675
17676 color
17677 Set color to be used when rendering text. The accepted values are
17678 listed with "-list_dither colors".
17679
17680 list_drivers
17681 If set to true, print a list of available drivers and exit.
17682
17683 list_dither
17684 List available dither options related to the argument. The
17685 argument must be one of "algorithms", "antialiases", "charsets",
17686 "colors".
17687
17688 Examples
17689
17690 • The following command shows the ffmpeg output is an CACA window,
17691 forcing its size to 80x25:
17692
17693 ffmpeg -i INPUT -c:v rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
17694
17695 • Show the list of available drivers and exit:
17696
17697 ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
17698
17699 • Show the list of available dither colors and exit:
17700
17701 ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
17702
17703 decklink
17704 The decklink output device provides playback capabilities for
17705 Blackmagic DeckLink devices.
17706
17707 To enable this output device, you need the Blackmagic DeckLink SDK and
17708 you need to configure with the appropriate "--extra-cflags" and
17709 "--extra-ldflags". On Windows, you need to run the IDL files through
17710 widl.
17711
17712 DeckLink is very picky about the formats it supports. Pixel format is
17713 always uyvy422, framerate, field order and video size must be
17714 determined for your device with -list_formats 1. Audio sample rate is
17715 always 48 kHz.
17716
17717 Options
17718
17719 list_devices
17720 If set to true, print a list of devices and exit. Defaults to
17721 false. This option is deprecated, please use the "-sinks" option of
17722 ffmpeg to list the available output devices.
17723
17724 list_formats
17725 If set to true, print a list of supported formats and exit.
17726 Defaults to false.
17727
17728 preroll
17729 Amount of time to preroll video in seconds. Defaults to 0.5.
17730
17731 duplex_mode
17732 Sets the decklink device duplex/profile mode. Must be unset, half,
17733 full, one_sub_device_full, one_sub_device_half,
17734 two_sub_device_full, four_sub_device_half Defaults to unset.
17735
17736 Note: DeckLink SDK 11.0 have replaced the duplex property by a
17737 profile property. For the DeckLink Duo 2 and DeckLink Quad 2, a
17738 profile is shared between any 2 sub-devices that utilize the same
17739 connectors. For the DeckLink 8K Pro, a profile is shared between
17740 all 4 sub-devices. So DeckLink 8K Pro support four profiles.
17741
17742 Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
17743 one_sub_device_full, one_sub_device_half, two_sub_device_full,
17744 four_sub_device_half
17745
17746 Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: half,
17747 full
17748
17749 timing_offset
17750 Sets the genlock timing pixel offset on the used output. Defaults
17751 to unset.
17752
17753 link
17754 Sets the SDI video link configuration on the used output. Must be
17755 unset, single link SDI, dual link SDI or quad link SDI. Defaults
17756 to unset.
17757
17758 sqd Enable Square Division Quad Split mode for Quad-link SDI output.
17759 Must be unset, true or false. Defaults to unset.
17760
17761 level_a
17762 Enable SMPTE Level A mode on the used output. Must be unset, true
17763 or false. Defaults to unset.
17764
17765 Examples
17766
17767 • List output devices:
17768
17769 ffmpeg -sinks decklink
17770
17771 • List supported formats:
17772
17773 ffmpeg -i test.avi -f decklink -list_formats 1 'DeckLink Mini Monitor'
17774
17775 • Play video clip:
17776
17777 ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 'DeckLink Mini Monitor'
17778
17779 • Play video clip with non-standard framerate or video size:
17780
17781 ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink Mini Monitor'
17782
17783 fbdev
17784 Linux framebuffer output device.
17785
17786 The Linux framebuffer is a graphic hardware-independent abstraction
17787 layer to show graphics on a computer monitor, typically on the console.
17788 It is accessed through a file device node, usually /dev/fb0.
17789
17790 For more detailed information read the file
17791 Documentation/fb/framebuffer.txt included in the Linux source tree.
17792
17793 Options
17794
17795 xoffset
17796 yoffset
17797 Set x/y coordinate of top left corner. Default is 0.
17798
17799 Examples
17800
17801 Play a file on framebuffer device /dev/fb0. Required pixel format
17802 depends on current framebuffer settings.
17803
17804 ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0
17805
17806 See also <http://linux-fbdev.sourceforge.net/>, and fbset(1).
17807
17808 opengl
17809 OpenGL output device.
17810
17811 To enable this output device you need to configure FFmpeg with
17812 "--enable-opengl".
17813
17814 This output device allows one to render to OpenGL context. Context may
17815 be provided by application or default SDL window is created.
17816
17817 When device renders to external context, application must implement
17818 handlers for following messages: "AV_DEV_TO_APP_CREATE_WINDOW_BUFFER" -
17819 create OpenGL context on current thread.
17820 "AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER" - make OpenGL context current.
17821 "AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER" - swap buffers.
17822 "AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER" - destroy OpenGL context.
17823 Application is also required to inform a device about current
17824 resolution by sending "AV_APP_TO_DEV_WINDOW_SIZE" message.
17825
17826 Options
17827
17828 background
17829 Set background color. Black is a default.
17830
17831 no_window
17832 Disables default SDL window when set to non-zero value.
17833 Application must provide OpenGL context and both "window_size_cb"
17834 and "window_swap_buffers_cb" callbacks when set.
17835
17836 window_title
17837 Set the SDL window title, if not specified default to the filename
17838 specified for the output device. Ignored when no_window is set.
17839
17840 window_size
17841 Set preferred window size, can be a string of the form widthxheight
17842 or a video size abbreviation. If not specified it defaults to the
17843 size of the input video, downscaled according to the aspect ratio.
17844 Mostly usable when no_window is not set.
17845
17846 Examples
17847
17848 Play a file on SDL window using OpenGL rendering:
17849
17850 ffmpeg -i INPUT -f opengl "window title"
17851
17852 oss
17853 OSS (Open Sound System) output device.
17854
17855 pulse
17856 PulseAudio output device.
17857
17858 To enable this output device you need to configure FFmpeg with
17859 "--enable-libpulse".
17860
17861 More information about PulseAudio can be found on
17862 <http://www.pulseaudio.org>
17863
17864 Options
17865
17866 server
17867 Connect to a specific PulseAudio server, specified by an IP
17868 address. Default server is used when not provided.
17869
17870 name
17871 Specify the application name PulseAudio will use when showing
17872 active clients, by default it is the "LIBAVFORMAT_IDENT" string.
17873
17874 stream_name
17875 Specify the stream name PulseAudio will use when showing active
17876 streams, by default it is set to the specified output name.
17877
17878 device
17879 Specify the device to use. Default device is used when not
17880 provided. List of output devices can be obtained with command
17881 pactl list sinks.
17882
17883 buffer_size
17884 buffer_duration
17885 Control the size and duration of the PulseAudio buffer. A small
17886 buffer gives more control, but requires more frequent updates.
17887
17888 buffer_size specifies size in bytes while buffer_duration specifies
17889 duration in milliseconds.
17890
17891 When both options are provided then the highest value is used
17892 (duration is recalculated to bytes using stream parameters). If
17893 they are set to 0 (which is default), the device will use the
17894 default PulseAudio duration value. By default PulseAudio set buffer
17895 duration to around 2 seconds.
17896
17897 prebuf
17898 Specify pre-buffering size in bytes. The server does not start with
17899 playback before at least prebuf bytes are available in the buffer.
17900 By default this option is initialized to the same value as
17901 buffer_size or buffer_duration (whichever is bigger).
17902
17903 minreq
17904 Specify minimum request size in bytes. The server does not request
17905 less than minreq bytes from the client, instead waits until the
17906 buffer is free enough to request more bytes at once. It is
17907 recommended to not set this option, which will initialize this to a
17908 value that is deemed sensible by the server.
17909
17910 Examples
17911
17912 Play a file on default device on default server:
17913
17914 ffmpeg -i INPUT -f pulse "stream name"
17915
17916 sdl
17917 SDL (Simple DirectMedia Layer) output device.
17918
17919 "sdl2" can be used as alias for "sdl".
17920
17921 This output device allows one to show a video stream in an SDL window.
17922 Only one SDL window is allowed per application, so you can have only
17923 one instance of this output device in an application.
17924
17925 To enable this output device you need libsdl installed on your system
17926 when configuring your build.
17927
17928 For more information about SDL, check: <http://www.libsdl.org/>
17929
17930 Options
17931
17932 window_title
17933 Set the SDL window title, if not specified default to the filename
17934 specified for the output device.
17935
17936 icon_title
17937 Set the name of the iconified SDL window, if not specified it is
17938 set to the same value of window_title.
17939
17940 window_size
17941 Set the SDL window size, can be a string of the form widthxheight
17942 or a video size abbreviation. If not specified it defaults to the
17943 size of the input video, downscaled according to the aspect ratio.
17944
17945 window_x
17946 window_y
17947 Set the position of the window on the screen.
17948
17949 window_fullscreen
17950 Set fullscreen mode when non-zero value is provided. Default value
17951 is zero.
17952
17953 window_enable_quit
17954 Enable quit action (using window button or keyboard key) when non-
17955 zero value is provided. Default value is 1 (enable quit action)
17956
17957 Interactive commands
17958
17959 The window created by the device can be controlled through the
17960 following interactive commands.
17961
17962 q, ESC
17963 Quit the device immediately.
17964
17965 Examples
17966
17967 The following command shows the ffmpeg output is an SDL window, forcing
17968 its size to the qcif format:
17969
17970 ffmpeg -i INPUT -c:v rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
17971
17972 sndio
17973 sndio audio output device.
17974
17975 v4l2
17976 Video4Linux2 output device.
17977
17978 xv
17979 XV (XVideo) output device.
17980
17981 This output device allows one to show a video stream in a X Window
17982 System window.
17983
17984 Options
17985
17986 display_name
17987 Specify the hardware display name, which determines the display and
17988 communications domain to be used.
17989
17990 The display name or DISPLAY environment variable can be a string in
17991 the format hostname[:number[.screen_number]].
17992
17993 hostname specifies the name of the host machine on which the
17994 display is physically attached. number specifies the number of the
17995 display server on that host machine. screen_number specifies the
17996 screen to be used on that server.
17997
17998 If unspecified, it defaults to the value of the DISPLAY environment
17999 variable.
18000
18001 For example, "dual-headed:0.1" would specify screen 1 of display 0
18002 on the machine named ``dual-headed''.
18003
18004 Check the X11 specification for more detailed information about the
18005 display name format.
18006
18007 window_id
18008 When set to non-zero value then device doesn't create new window,
18009 but uses existing one with provided window_id. By default this
18010 options is set to zero and device creates its own window.
18011
18012 window_size
18013 Set the created window size, can be a string of the form
18014 widthxheight or a video size abbreviation. If not specified it
18015 defaults to the size of the input video. Ignored when window_id is
18016 set.
18017
18018 window_x
18019 window_y
18020 Set the X and Y window offsets for the created window. They are
18021 both set to 0 by default. The values may be ignored by the window
18022 manager. Ignored when window_id is set.
18023
18024 window_title
18025 Set the window title, if not specified default to the filename
18026 specified for the output device. Ignored when window_id is set.
18027
18028 For more information about XVideo see <http://www.x.org/>.
18029
18030 Examples
18031
18032 • Decode, display and encode video input with ffmpeg at the same
18033 time:
18034
18035 ffmpeg -i INPUT OUTPUT -f xv display
18036
18037 • Decode and display the input video to multiple X11 windows:
18038
18039 ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
18040
18042 The audio resampler supports the following named options.
18043
18044 Options may be set by specifying -option value in the FFmpeg tools,
18045 option=value for the aresample filter, by setting the value explicitly
18046 in the "SwrContext" options or using the libavutil/opt.h API for
18047 programmatic use.
18048
18049 uchl, used_chlayout
18050 Set used input channel layout. Default is unset. This option is
18051 only used for special remapping.
18052
18053 isr, in_sample_rate
18054 Set the input sample rate. Default value is 0.
18055
18056 osr, out_sample_rate
18057 Set the output sample rate. Default value is 0.
18058
18059 isf, in_sample_fmt
18060 Specify the input sample format. It is set by default to "none".
18061
18062 osf, out_sample_fmt
18063 Specify the output sample format. It is set by default to "none".
18064
18065 tsf, internal_sample_fmt
18066 Set the internal sample format. Default value is "none". This will
18067 automatically be chosen when it is not explicitly set.
18068
18069 ichl, in_chlayout
18070 ochl, out_chlayout
18071 Set the input/output channel layout.
18072
18073 See the Channel Layout section in the ffmpeg-utils(1) manual for
18074 the required syntax.
18075
18076 clev, center_mix_level
18077 Set the center mix level. It is a value expressed in deciBel, and
18078 must be in the interval [-32,32].
18079
18080 slev, surround_mix_level
18081 Set the surround mix level. It is a value expressed in deciBel, and
18082 must be in the interval [-32,32].
18083
18084 lfe_mix_level
18085 Set LFE mix into non LFE level. It is used when there is a LFE
18086 input but no LFE output. It is a value expressed in deciBel, and
18087 must be in the interval [-32,32].
18088
18089 rmvol, rematrix_volume
18090 Set rematrix volume. Default value is 1.0.
18091
18092 rematrix_maxval
18093 Set maximum output value for rematrixing. This can be used to
18094 prevent clipping vs. preventing volume reduction. A value of 1.0
18095 prevents clipping.
18096
18097 flags, swr_flags
18098 Set flags used by the converter. Default value is 0.
18099
18100 It supports the following individual flags:
18101
18102 res force resampling, this flag forces resampling to be used even
18103 when the input and output sample rates match.
18104
18105 dither_scale
18106 Set the dither scale. Default value is 1.
18107
18108 dither_method
18109 Set dither method. Default value is 0.
18110
18111 Supported values:
18112
18113 rectangular
18114 select rectangular dither
18115
18116 triangular
18117 select triangular dither
18118
18119 triangular_hp
18120 select triangular dither with high pass
18121
18122 lipshitz
18123 select Lipshitz noise shaping dither.
18124
18125 shibata
18126 select Shibata noise shaping dither.
18127
18128 low_shibata
18129 select low Shibata noise shaping dither.
18130
18131 high_shibata
18132 select high Shibata noise shaping dither.
18133
18134 f_weighted
18135 select f-weighted noise shaping dither
18136
18137 modified_e_weighted
18138 select modified-e-weighted noise shaping dither
18139
18140 improved_e_weighted
18141 select improved-e-weighted noise shaping dither
18142
18143 resampler
18144 Set resampling engine. Default value is swr.
18145
18146 Supported values:
18147
18148 swr select the native SW Resampler; filter options precision and
18149 cheby are not applicable in this case.
18150
18151 soxr
18152 select the SoX Resampler (where available); compensation, and
18153 filter options filter_size, phase_shift, exact_rational,
18154 filter_type & kaiser_beta, are not applicable in this case.
18155
18156 filter_size
18157 For swr only, set resampling filter size, default value is 32.
18158
18159 phase_shift
18160 For swr only, set resampling phase shift, default value is 10, and
18161 must be in the interval [0,30].
18162
18163 linear_interp
18164 Use linear interpolation when enabled (the default). Disable it if
18165 you want to preserve speed instead of quality when exact_rational
18166 fails.
18167
18168 exact_rational
18169 For swr only, when enabled, try to use exact phase_count based on
18170 input and output sample rate. However, if it is larger than "1 <<
18171 phase_shift", the phase_count will be "1 << phase_shift" as
18172 fallback. Default is enabled.
18173
18174 cutoff
18175 Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must
18176 be a float value between 0 and 1. Default value is 0.97 with swr,
18177 and 0.91 with soxr (which, with a sample-rate of 44100, preserves
18178 the entire audio band to 20kHz).
18179
18180 precision
18181 For soxr only, the precision in bits to which the resampled signal
18182 will be calculated. The default value of 20 (which, with suitable
18183 dithering, is appropriate for a destination bit-depth of 16) gives
18184 SoX's 'High Quality'; a value of 28 gives SoX's 'Very High
18185 Quality'.
18186
18187 cheby
18188 For soxr only, selects passband rolloff none (Chebyshev) & higher-
18189 precision approximation for 'irrational' ratios. Default value is
18190 0.
18191
18192 async
18193 For swr only, simple 1 parameter audio sync to timestamps using
18194 stretching, squeezing, filling and trimming. Setting this to 1 will
18195 enable filling and trimming, larger values represent the maximum
18196 amount in samples that the data may be stretched or squeezed for
18197 each second. Default value is 0, thus no compensation is applied
18198 to make the samples match the audio timestamps.
18199
18200 first_pts
18201 For swr only, assume the first pts should be this value. The time
18202 unit is 1 / sample rate. This allows for padding/trimming at the
18203 start of stream. By default, no assumption is made about the first
18204 frame's expected pts, so no padding or trimming is done. For
18205 example, this could be set to 0 to pad the beginning with silence
18206 if an audio stream starts after the video stream or to trim any
18207 samples with a negative pts due to encoder delay.
18208
18209 min_comp
18210 For swr only, set the minimum difference between timestamps and
18211 audio data (in seconds) to trigger stretching/squeezing/filling or
18212 trimming of the data to make it match the timestamps. The default
18213 is that stretching/squeezing/filling and trimming is disabled
18214 (min_comp = "FLT_MAX").
18215
18216 min_hard_comp
18217 For swr only, set the minimum difference between timestamps and
18218 audio data (in seconds) to trigger adding/dropping samples to make
18219 it match the timestamps. This option effectively is a threshold to
18220 select between hard (trim/fill) and soft (squeeze/stretch)
18221 compensation. Note that all compensation is by default disabled
18222 through min_comp. The default is 0.1.
18223
18224 comp_duration
18225 For swr only, set duration (in seconds) over which data is
18226 stretched/squeezed to make it match the timestamps. Must be a non-
18227 negative double float value, default value is 1.0.
18228
18229 max_soft_comp
18230 For swr only, set maximum factor by which data is
18231 stretched/squeezed to make it match the timestamps. Must be a non-
18232 negative double float value, default value is 0.
18233
18234 matrix_encoding
18235 Select matrixed stereo encoding.
18236
18237 It accepts the following values:
18238
18239 none
18240 select none
18241
18242 dolby
18243 select Dolby
18244
18245 dplii
18246 select Dolby Pro Logic II
18247
18248 Default value is "none".
18249
18250 filter_type
18251 For swr only, select resampling filter type. This only affects
18252 resampling operations.
18253
18254 It accepts the following values:
18255
18256 cubic
18257 select cubic
18258
18259 blackman_nuttall
18260 select Blackman Nuttall windowed sinc
18261
18262 kaiser
18263 select Kaiser windowed sinc
18264
18265 kaiser_beta
18266 For swr only, set Kaiser window beta value. Must be a double float
18267 value in the interval [2,16], default value is 9.
18268
18269 output_sample_bits
18270 For swr only, set number of used output sample bits for dithering.
18271 Must be an integer in the interval [0,64], default value is 0,
18272 which means it's not used.
18273
18275 The video scaler supports the following named options.
18276
18277 Options may be set by specifying -option value in the FFmpeg tools,
18278 with a few API-only exceptions noted below. For programmatic use, they
18279 can be set explicitly in the "SwsContext" options or through the
18280 libavutil/opt.h API.
18281
18282 sws_flags
18283 Set the scaler flags. This is also used to set the scaling
18284 algorithm. Only a single algorithm should be selected. Default
18285 value is bicubic.
18286
18287 It accepts the following values:
18288
18289 fast_bilinear
18290 Select fast bilinear scaling algorithm.
18291
18292 bilinear
18293 Select bilinear scaling algorithm.
18294
18295 bicubic
18296 Select bicubic scaling algorithm.
18297
18298 experimental
18299 Select experimental scaling algorithm.
18300
18301 neighbor
18302 Select nearest neighbor rescaling algorithm.
18303
18304 area
18305 Select averaging area rescaling algorithm.
18306
18307 bicublin
18308 Select bicubic scaling algorithm for the luma component,
18309 bilinear for chroma components.
18310
18311 gauss
18312 Select Gaussian rescaling algorithm.
18313
18314 sinc
18315 Select sinc rescaling algorithm.
18316
18317 lanczos
18318 Select Lanczos rescaling algorithm. The default width (alpha)
18319 is 3 and can be changed by setting "param0".
18320
18321 spline
18322 Select natural bicubic spline rescaling algorithm.
18323
18324 print_info
18325 Enable printing/debug logging.
18326
18327 accurate_rnd
18328 Enable accurate rounding.
18329
18330 full_chroma_int
18331 Enable full chroma interpolation.
18332
18333 full_chroma_inp
18334 Select full chroma input.
18335
18336 bitexact
18337 Enable bitexact output.
18338
18339 srcw (API only)
18340 Set source width.
18341
18342 srch (API only)
18343 Set source height.
18344
18345 dstw (API only)
18346 Set destination width.
18347
18348 dsth (API only)
18349 Set destination height.
18350
18351 src_format (API only)
18352 Set source pixel format (must be expressed as an integer).
18353
18354 dst_format (API only)
18355 Set destination pixel format (must be expressed as an integer).
18356
18357 src_range (boolean)
18358 If value is set to 1, indicates source is full range. Default value
18359 is 0, which indicates source is limited range.
18360
18361 dst_range (boolean)
18362 If value is set to 1, enable full range for destination. Default
18363 value is 0, which enables limited range.
18364
18365 param0, param1
18366 Set scaling algorithm parameters. The specified values are specific
18367 of some scaling algorithms and ignored by others. The specified
18368 values are floating point number values.
18369
18370 sws_dither
18371 Set the dithering algorithm. Accepts one of the following values.
18372 Default value is auto.
18373
18374 auto
18375 automatic choice
18376
18377 none
18378 no dithering
18379
18380 bayer
18381 bayer dither
18382
18383 ed error diffusion dither
18384
18385 a_dither
18386 arithmetic dither, based using addition
18387
18388 x_dither
18389 arithmetic dither, based using xor (more random/less apparent
18390 patterning that a_dither).
18391
18392 alphablend
18393 Set the alpha blending to use when the input has alpha but the
18394 output does not. Default value is none.
18395
18396 uniform_color
18397 Blend onto a uniform background color
18398
18399 checkerboard
18400 Blend onto a checkerboard
18401
18402 none
18403 No blending
18404
18406 Filtering in FFmpeg is enabled through the libavfilter library.
18407
18408 In libavfilter, a filter can have multiple inputs and multiple outputs.
18409 To illustrate the sorts of things that are possible, we consider the
18410 following filtergraph.
18411
18412 [main]
18413 input --> split ---------------------> overlay --> output
18414 | ^
18415 |[tmp] [flip]|
18416 +-----> crop --> vflip -------+
18417
18418 This filtergraph splits the input stream in two streams, then sends one
18419 stream through the crop filter and the vflip filter, before merging it
18420 back with the other stream by overlaying it on top. You can use the
18421 following command to achieve this:
18422
18423 ffmpeg -i INPUT -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
18424
18425 The result will be that the top half of the video is mirrored onto the
18426 bottom half of the output video.
18427
18428 Filters in the same linear chain are separated by commas, and distinct
18429 linear chains of filters are separated by semicolons. In our example,
18430 crop,vflip are in one linear chain, split and overlay are separately in
18431 another. The points where the linear chains join are labelled by names
18432 enclosed in square brackets. In the example, the split filter generates
18433 two outputs that are associated to the labels [main] and [tmp].
18434
18435 The stream sent to the second output of split, labelled as [tmp], is
18436 processed through the crop filter, which crops away the lower half part
18437 of the video, and then vertically flipped. The overlay filter takes in
18438 input the first unchanged output of the split filter (which was
18439 labelled as [main]), and overlay on its lower half the output generated
18440 by the crop,vflip filterchain.
18441
18442 Some filters take in input a list of parameters: they are specified
18443 after the filter name and an equal sign, and are separated from each
18444 other by a colon.
18445
18446 There exist so-called source filters that do not have an audio/video
18447 input, and sink filters that will not have audio/video output.
18448
18450 The graph2dot program included in the FFmpeg tools directory can be
18451 used to parse a filtergraph description and issue a corresponding
18452 textual representation in the dot language.
18453
18454 Invoke the command:
18455
18456 graph2dot -h
18457
18458 to see how to use graph2dot.
18459
18460 You can then pass the dot description to the dot program (from the
18461 graphviz suite of programs) and obtain a graphical representation of
18462 the filtergraph.
18463
18464 For example the sequence of commands:
18465
18466 echo <GRAPH_DESCRIPTION> | \
18467 tools/graph2dot -o graph.tmp && \
18468 dot -Tpng graph.tmp -o graph.png && \
18469 display graph.png
18470
18471 can be used to create and display an image representing the graph
18472 described by the GRAPH_DESCRIPTION string. Note that this string must
18473 be a complete self-contained graph, with its inputs and outputs
18474 explicitly defined. For example if your command line is of the form:
18475
18476 ffmpeg -i infile -vf scale=640:360 outfile
18477
18478 your GRAPH_DESCRIPTION string will need to be of the form:
18479
18480 nullsrc,scale=640:360,nullsink
18481
18482 you may also need to set the nullsrc parameters and add a format filter
18483 in order to simulate a specific input file.
18484
18486 A filtergraph is a directed graph of connected filters. It can contain
18487 cycles, and there can be multiple links between a pair of filters. Each
18488 link has one input pad on one side connecting it to one filter from
18489 which it takes its input, and one output pad on the other side
18490 connecting it to one filter accepting its output.
18491
18492 Each filter in a filtergraph is an instance of a filter class
18493 registered in the application, which defines the features and the
18494 number of input and output pads of the filter.
18495
18496 A filter with no input pads is called a "source", and a filter with no
18497 output pads is called a "sink".
18498
18499 Filtergraph syntax
18500 A filtergraph has a textual representation, which is recognized by the
18501 -filter/-vf/-af and -filter_complex options in ffmpeg and -vf/-af in
18502 ffplay, and by the avfilter_graph_parse_ptr() function defined in
18503 libavfilter/avfilter.h.
18504
18505 A filterchain consists of a sequence of connected filters, each one
18506 connected to the previous one in the sequence. A filterchain is
18507 represented by a list of ","-separated filter descriptions.
18508
18509 A filtergraph consists of a sequence of filterchains. A sequence of
18510 filterchains is represented by a list of ";"-separated filterchain
18511 descriptions.
18512
18513 A filter is represented by a string of the form:
18514 [in_link_1]...[in_link_N]filter_name@id=arguments[out_link_1]...[out_link_M]
18515
18516 filter_name is the name of the filter class of which the described
18517 filter is an instance of, and has to be the name of one of the filter
18518 classes registered in the program optionally followed by "@id". The
18519 name of the filter class is optionally followed by a string
18520 "=arguments".
18521
18522 arguments is a string which contains the parameters used to initialize
18523 the filter instance. It may have one of two forms:
18524
18525 • A ':'-separated list of key=value pairs.
18526
18527 • A ':'-separated list of value. In this case, the keys are assumed
18528 to be the option names in the order they are declared. E.g. the
18529 "fade" filter declares three options in this order -- type,
18530 start_frame and nb_frames. Then the parameter list in:0:30 means
18531 that the value in is assigned to the option type, 0 to start_frame
18532 and 30 to nb_frames.
18533
18534 • A ':'-separated list of mixed direct value and long key=value
18535 pairs. The direct value must precede the key=value pairs, and
18536 follow the same constraints order of the previous point. The
18537 following key=value pairs can be set in any preferred order.
18538
18539 If the option value itself is a list of items (e.g. the "format" filter
18540 takes a list of pixel formats), the items in the list are usually
18541 separated by |.
18542
18543 The list of arguments can be quoted using the character ' as initial
18544 and ending mark, and the character \ for escaping the characters within
18545 the quoted text; otherwise the argument string is considered terminated
18546 when the next special character (belonging to the set []=;,) is
18547 encountered.
18548
18549 A special syntax implemented in the ffmpeg CLI tool allows loading
18550 option values from files. This is done be prepending a slash '/' to the
18551 option name, then the supplied value is interpreted as a path from
18552 which the actual value is loaded. E.g.
18553
18554 ffmpeg -i <INPUT> -vf drawtext=/text=/tmp/some_text <OUTPUT>
18555
18556 will load the text to be drawn from /tmp/some_text. API users wishing
18557 to implement a similar feature should use the
18558 "avfilter_graph_segment_*()" functions together with custom IO code.
18559
18560 The name and arguments of the filter are optionally preceded and
18561 followed by a list of link labels. A link label allows one to name a
18562 link and associate it to a filter output or input pad. The preceding
18563 labels in_link_1 ... in_link_N, are associated to the filter input
18564 pads, the following labels out_link_1 ... out_link_M, are associated to
18565 the output pads.
18566
18567 When two link labels with the same name are found in the filtergraph, a
18568 link between the corresponding input and output pad is created.
18569
18570 If an output pad is not labelled, it is linked by default to the first
18571 unlabelled input pad of the next filter in the filterchain. For
18572 example in the filterchain
18573
18574 nullsrc, split[L1], [L2]overlay, nullsink
18575
18576 the split filter instance has two output pads, and the overlay filter
18577 instance two input pads. The first output pad of split is labelled
18578 "L1", the first input pad of overlay is labelled "L2", and the second
18579 output pad of split is linked to the second input pad of overlay, which
18580 are both unlabelled.
18581
18582 In a filter description, if the input label of the first filter is not
18583 specified, "in" is assumed; if the output label of the last filter is
18584 not specified, "out" is assumed.
18585
18586 In a complete filterchain all the unlabelled filter input and output
18587 pads must be connected. A filtergraph is considered valid if all the
18588 filter input and output pads of all the filterchains are connected.
18589
18590 Libavfilter will automatically insert scale filters where format
18591 conversion is required. It is possible to specify swscale flags for
18592 those automatically inserted scalers by prepending "sws_flags=flags;"
18593 to the filtergraph description.
18594
18595 Here is a BNF description of the filtergraph syntax:
18596
18597 <NAME> ::= sequence of alphanumeric characters and '_'
18598 <FILTER_NAME> ::= <NAME>["@"<NAME>]
18599 <LINKLABEL> ::= "[" <NAME> "]"
18600 <LINKLABELS> ::= <LINKLABEL> [<LINKLABELS>]
18601 <FILTER_ARGUMENTS> ::= sequence of chars (possibly quoted)
18602 <FILTER> ::= [<LINKLABELS>] <FILTER_NAME> ["=" <FILTER_ARGUMENTS>] [<LINKLABELS>]
18603 <FILTERCHAIN> ::= <FILTER> [,<FILTERCHAIN>]
18604 <FILTERGRAPH> ::= [sws_flags=<flags>;] <FILTERCHAIN> [;<FILTERGRAPH>]
18605
18606 Notes on filtergraph escaping
18607 Filtergraph description composition entails several levels of escaping.
18608 See the "Quoting and escaping" section in the ffmpeg-utils(1) manual
18609 for more information about the employed escaping procedure.
18610
18611 A first level escaping affects the content of each filter option value,
18612 which may contain the special character ":" used to separate values, or
18613 one of the escaping characters "\'".
18614
18615 A second level escaping affects the whole filter description, which may
18616 contain the escaping characters "\'" or the special characters "[],;"
18617 used by the filtergraph description.
18618
18619 Finally, when you specify a filtergraph on a shell commandline, you
18620 need to perform a third level escaping for the shell special characters
18621 contained within it.
18622
18623 For example, consider the following string to be embedded in the
18624 drawtext filter description text value:
18625
18626 this is a 'string': may contain one, or more, special characters
18627
18628 This string contains the "'" special escaping character, and the ":"
18629 special character, so it needs to be escaped in this way:
18630
18631 text=this is a \'string\'\: may contain one, or more, special characters
18632
18633 A second level of escaping is required when embedding the filter
18634 description in a filtergraph description, in order to escape all the
18635 filtergraph special characters. Thus the example above becomes:
18636
18637 drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
18638
18639 (note that in addition to the "\'" escaping special characters, also
18640 "," needs to be escaped).
18641
18642 Finally an additional level of escaping is needed when writing the
18643 filtergraph description in a shell command, which depends on the
18644 escaping rules of the adopted shell. For example, assuming that "\" is
18645 special and needs to be escaped with another "\", the previous string
18646 will finally result in:
18647
18648 -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters"
18649
18651 Some filters support a generic enable option. For the filters
18652 supporting timeline editing, this option can be set to an expression
18653 which is evaluated before sending a frame to the filter. If the
18654 evaluation is non-zero, the filter will be enabled, otherwise the frame
18655 will be sent unchanged to the next filter in the filtergraph.
18656
18657 The expression accepts the following values:
18658
18659 t timestamp expressed in seconds, NAN if the input timestamp is
18660 unknown
18661
18662 n sequential number of the input frame, starting from 0
18663
18664 pos the position in the file of the input frame, NAN if unknown
18665
18666 w
18667 h width and height of the input frame if video
18668
18669 Additionally, these filters support an enable command that can be used
18670 to re-define the expression.
18671
18672 Like any other filtering option, the enable option follows the same
18673 rules.
18674
18675 For example, to enable a blur filter (smartblur) from 10 seconds to 3
18676 minutes, and a curves filter starting at 3 seconds:
18677
18678 smartblur = enable='between(t,10,3*60)',
18679 curves = enable='gte(t,3)' : preset=cross_process
18680
18681 See "ffmpeg -filters" to view which filters have timeline support.
18682
18684 Some options can be changed during the operation of the filter using a
18685 command. These options are marked 'T' on the output of ffmpeg -h
18686 filter=<name of filter>. The name of the command is the name of the
18687 option and the argument is the new value.
18688
18690 Some filters with several inputs support a common set of options.
18691 These options can only be set by name, not with the short notation.
18692
18693 eof_action
18694 The action to take when EOF is encountered on the secondary input;
18695 it accepts one of the following values:
18696
18697 repeat
18698 Repeat the last frame (the default).
18699
18700 endall
18701 End both streams.
18702
18703 pass
18704 Pass the main input through.
18705
18706 shortest
18707 If set to 1, force the output to terminate when the shortest input
18708 terminates. Default value is 0.
18709
18710 repeatlast
18711 If set to 1, force the filter to extend the last frame of secondary
18712 streams until the end of the primary stream. A value of 0 disables
18713 this behavior. Default value is 1.
18714
18715 ts_sync_mode
18716 How strictly to sync streams based on secondary input timestamps;
18717 it accepts one of the following values:
18718
18719 default
18720 Frame from secondary input with the nearest lower or equal
18721 timestamp to the primary input frame.
18722
18723 nearest
18724 Frame from secondary input with the absolute nearest timestamp
18725 to the primary input frame.
18726
18728 When you configure your FFmpeg build, you can disable any of the
18729 existing filters using "--disable-filters". The configure output will
18730 show the audio filters included in your build.
18731
18732 Below is a description of the currently available audio filters.
18733
18734 acompressor
18735 A compressor is mainly used to reduce the dynamic range of a signal.
18736 Especially modern music is mostly compressed at a high ratio to improve
18737 the overall loudness. It's done to get the highest attention of a
18738 listener, "fatten" the sound and bring more "power" to the track. If a
18739 signal is compressed too much it may sound dull or "dead" afterwards or
18740 it may start to "pump" (which could be a powerful effect but can also
18741 destroy a track completely). The right compression is the key to reach
18742 a professional sound and is the high art of mixing and mastering.
18743 Because of its complex settings it may take a long time to get the
18744 right feeling for this kind of effect.
18745
18746 Compression is done by detecting the volume above a chosen level
18747 "threshold" and dividing it by the factor set with "ratio". So if you
18748 set the threshold to -12dB and your signal reaches -6dB a ratio of 2:1
18749 will result in a signal at -9dB. Because an exact manipulation of the
18750 signal would cause distortion of the waveform the reduction can be
18751 levelled over the time. This is done by setting "Attack" and "Release".
18752 "attack" determines how long the signal has to rise above the threshold
18753 before any reduction will occur and "release" sets the time the signal
18754 has to fall below the threshold to reduce the reduction again. Shorter
18755 signals than the chosen attack time will be left untouched. The
18756 overall reduction of the signal can be made up afterwards with the
18757 "makeup" setting. So compressing the peaks of a signal about 6dB and
18758 raising the makeup to this level results in a signal twice as loud than
18759 the source. To gain a softer entry in the compression the "knee"
18760 flattens the hard edge at the threshold in the range of the chosen
18761 decibels.
18762
18763 The filter accepts the following options:
18764
18765 level_in
18766 Set input gain. Default is 1. Range is between 0.015625 and 64.
18767
18768 mode
18769 Set mode of compressor operation. Can be "upward" or "downward".
18770 Default is "downward".
18771
18772 threshold
18773 If a signal of stream rises above this level it will affect the
18774 gain reduction. By default it is 0.125. Range is between
18775 0.00097563 and 1.
18776
18777 ratio
18778 Set a ratio by which the signal is reduced. 1:2 means that if the
18779 level rose 4dB above the threshold, it will be only 2dB above after
18780 the reduction. Default is 2. Range is between 1 and 20.
18781
18782 attack
18783 Amount of milliseconds the signal has to rise above the threshold
18784 before gain reduction starts. Default is 20. Range is between 0.01
18785 and 2000.
18786
18787 release
18788 Amount of milliseconds the signal has to fall below the threshold
18789 before reduction is decreased again. Default is 250. Range is
18790 between 0.01 and 9000.
18791
18792 makeup
18793 Set the amount by how much signal will be amplified after
18794 processing. Default is 1. Range is from 1 to 64.
18795
18796 knee
18797 Curve the sharp knee around the threshold to enter gain reduction
18798 more softly. Default is 2.82843. Range is between 1 and 8.
18799
18800 link
18801 Choose if the "average" level between all channels of input stream
18802 or the louder("maximum") channel of input stream affects the
18803 reduction. Default is "average".
18804
18805 detection
18806 Should the exact signal be taken in case of "peak" or an RMS one in
18807 case of "rms". Default is "rms" which is mostly smoother.
18808
18809 mix How much to use compressed signal in output. Default is 1. Range
18810 is between 0 and 1.
18811
18812 Commands
18813
18814 This filter supports the all above options as commands.
18815
18816 acontrast
18817 Simple audio dynamic range compression/expansion filter.
18818
18819 The filter accepts the following options:
18820
18821 contrast
18822 Set contrast. Default is 33. Allowed range is between 0 and 100.
18823
18824 acopy
18825 Copy the input audio source unchanged to the output. This is mainly
18826 useful for testing purposes.
18827
18828 acrossfade
18829 Apply cross fade from one input audio stream to another input audio
18830 stream. The cross fade is applied for specified duration near the end
18831 of first stream.
18832
18833 The filter accepts the following options:
18834
18835 nb_samples, ns
18836 Specify the number of samples for which the cross fade effect has
18837 to last. At the end of the cross fade effect the first input audio
18838 will be completely silent. Default is 44100.
18839
18840 duration, d
18841 Specify the duration of the cross fade effect. See the Time
18842 duration section in the ffmpeg-utils(1) manual for the accepted
18843 syntax. By default the duration is determined by nb_samples. If
18844 set this option is used instead of nb_samples.
18845
18846 overlap, o
18847 Should first stream end overlap with second stream start. Default
18848 is enabled.
18849
18850 curve1
18851 Set curve for cross fade transition for first stream.
18852
18853 curve2
18854 Set curve for cross fade transition for second stream.
18855
18856 For description of available curve types see afade filter
18857 description.
18858
18859 Examples
18860
18861 • Cross fade from one input to another:
18862
18863 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
18864
18865 • Cross fade from one input to another but without overlapping:
18866
18867 ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
18868
18869 acrossover
18870 Split audio stream into several bands.
18871
18872 This filter splits audio stream into two or more frequency ranges.
18873 Summing all streams back will give flat output.
18874
18875 The filter accepts the following options:
18876
18877 split
18878 Set split frequencies. Those must be positive and increasing.
18879
18880 order
18881 Set filter order for each band split. This controls filter roll-off
18882 or steepness of filter transfer function. Available values are:
18883
18884 2nd 12 dB per octave.
18885
18886 4th 24 dB per octave.
18887
18888 6th 36 dB per octave.
18889
18890 8th 48 dB per octave.
18891
18892 10th
18893 60 dB per octave.
18894
18895 12th
18896 72 dB per octave.
18897
18898 14th
18899 84 dB per octave.
18900
18901 16th
18902 96 dB per octave.
18903
18904 18th
18905 108 dB per octave.
18906
18907 20th
18908 120 dB per octave.
18909
18910 Default is 4th.
18911
18912 level
18913 Set input gain level. Allowed range is from 0 to 1. Default value
18914 is 1.
18915
18916 gains
18917 Set output gain for each band. Default value is 1 for all bands.
18918
18919 precision
18920 Set which precision to use when processing samples.
18921
18922 auto
18923 Auto pick internal sample format depending on other filters.
18924
18925 float
18926 Always use single-floating point precision sample format.
18927
18928 double
18929 Always use double-floating point precision sample format.
18930
18931 Default value is "auto".
18932
18933 Examples
18934
18935 • Split input audio stream into two bands (low and high) with split
18936 frequency of 1500 Hz, each band will be in separate stream:
18937
18938 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
18939
18940 • Same as above, but with higher filter order:
18941
18942 ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
18943
18944 • Same as above, but also with additional middle band (frequencies
18945 between 1500 and 8000):
18946
18947 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
18948
18949 acrusher
18950 Reduce audio bit resolution.
18951
18952 This filter is bit crusher with enhanced functionality. A bit crusher
18953 is used to audibly reduce number of bits an audio signal is sampled
18954 with. This doesn't change the bit depth at all, it just produces the
18955 effect. Material reduced in bit depth sounds more harsh and "digital".
18956 This filter is able to even round to continuous values instead of
18957 discrete bit depths. Additionally it has a D/C offset which results in
18958 different crushing of the lower and the upper half of the signal. An
18959 Anti-Aliasing setting is able to produce "softer" crushing sounds.
18960
18961 Another feature of this filter is the logarithmic mode. This setting
18962 switches from linear distances between bits to logarithmic ones. The
18963 result is a much more "natural" sounding crusher which doesn't gate low
18964 signals for example. The human ear has a logarithmic perception, so
18965 this kind of crushing is much more pleasant. Logarithmic crushing is
18966 also able to get anti-aliased.
18967
18968 The filter accepts the following options:
18969
18970 level_in
18971 Set level in.
18972
18973 level_out
18974 Set level out.
18975
18976 bits
18977 Set bit reduction.
18978
18979 mix Set mixing amount.
18980
18981 mode
18982 Can be linear: "lin" or logarithmic: "log".
18983
18984 dc Set DC.
18985
18986 aa Set anti-aliasing.
18987
18988 samples
18989 Set sample reduction.
18990
18991 lfo Enable LFO. By default disabled.
18992
18993 lforange
18994 Set LFO range.
18995
18996 lforate
18997 Set LFO rate.
18998
18999 Commands
19000
19001 This filter supports the all above options as commands.
19002
19003 acue
19004 Delay audio filtering until a given wallclock timestamp. See the cue
19005 filter.
19006
19007 adeclick
19008 Remove impulsive noise from input audio.
19009
19010 Samples detected as impulsive noise are replaced by interpolated
19011 samples using autoregressive modelling.
19012
19013 window, w
19014 Set window size, in milliseconds. Allowed range is from 10 to 100.
19015 Default value is 55 milliseconds. This sets size of window which
19016 will be processed at once.
19017
19018 overlap, o
19019 Set window overlap, in percentage of window size. Allowed range is
19020 from 50 to 95. Default value is 75 percent. Setting this to a very
19021 high value increases impulsive noise removal but makes whole
19022 process much slower.
19023
19024 arorder, a
19025 Set autoregression order, in percentage of window size. Allowed
19026 range is from 0 to 25. Default value is 2 percent. This option also
19027 controls quality of interpolated samples using neighbour good
19028 samples.
19029
19030 threshold, t
19031 Set threshold value. Allowed range is from 1 to 100. Default value
19032 is 2. This controls the strength of impulsive noise which is going
19033 to be removed. The lower value, the more samples will be detected
19034 as impulsive noise.
19035
19036 burst, b
19037 Set burst fusion, in percentage of window size. Allowed range is 0
19038 to 10. Default value is 2. If any two samples detected as noise
19039 are spaced less than this value then any sample between those two
19040 samples will be also detected as noise.
19041
19042 method, m
19043 Set overlap method.
19044
19045 It accepts the following values:
19046
19047 add, a
19048 Select overlap-add method. Even not interpolated samples are
19049 slightly changed with this method.
19050
19051 save, s
19052 Select overlap-save method. Not interpolated samples remain
19053 unchanged.
19054
19055 Default value is "a".
19056
19057 adeclip
19058 Remove clipped samples from input audio.
19059
19060 Samples detected as clipped are replaced by interpolated samples using
19061 autoregressive modelling.
19062
19063 window, w
19064 Set window size, in milliseconds. Allowed range is from 10 to 100.
19065 Default value is 55 milliseconds. This sets size of window which
19066 will be processed at once.
19067
19068 overlap, o
19069 Set window overlap, in percentage of window size. Allowed range is
19070 from 50 to 95. Default value is 75 percent.
19071
19072 arorder, a
19073 Set autoregression order, in percentage of window size. Allowed
19074 range is from 0 to 25. Default value is 8 percent. This option also
19075 controls quality of interpolated samples using neighbour good
19076 samples.
19077
19078 threshold, t
19079 Set threshold value. Allowed range is from 1 to 100. Default value
19080 is 10. Higher values make clip detection less aggressive.
19081
19082 hsize, n
19083 Set size of histogram used to detect clips. Allowed range is from
19084 100 to 9999. Default value is 1000. Higher values make clip
19085 detection less aggressive.
19086
19087 method, m
19088 Set overlap method.
19089
19090 It accepts the following values:
19091
19092 add, a
19093 Select overlap-add method. Even not interpolated samples are
19094 slightly changed with this method.
19095
19096 save, s
19097 Select overlap-save method. Not interpolated samples remain
19098 unchanged.
19099
19100 Default value is "a".
19101
19102 adecorrelate
19103 Apply decorrelation to input audio stream.
19104
19105 The filter accepts the following options:
19106
19107 stages
19108 Set decorrelation stages of filtering. Allowed range is from 1 to
19109 16. Default value is 6.
19110
19111 seed
19112 Set random seed used for setting delay in samples across channels.
19113
19114 adelay
19115 Delay one or more audio channels.
19116
19117 Samples in delayed channel are filled with silence.
19118
19119 The filter accepts the following option:
19120
19121 delays
19122 Set list of delays in milliseconds for each channel separated by
19123 '|'. Unused delays will be silently ignored. If number of given
19124 delays is smaller than number of channels all remaining channels
19125 will not be delayed. If you want to delay exact number of samples,
19126 append 'S' to number. If you want instead to delay in seconds,
19127 append 's' to number.
19128
19129 all Use last set delay for all remaining channels. By default is
19130 disabled. This option if enabled changes how option "delays" is
19131 interpreted.
19132
19133 Examples
19134
19135 • Delay first channel by 1.5 seconds, the third channel by 0.5
19136 seconds and leave the second channel (and any other channels that
19137 may be present) unchanged.
19138
19139 adelay=1500|0|500
19140
19141 • Delay second channel by 500 samples, the third channel by 700
19142 samples and leave the first channel (and any other channels that
19143 may be present) unchanged.
19144
19145 adelay=0|500S|700S
19146
19147 • Delay all channels by same number of samples:
19148
19149 adelay=delays=64S:all=1
19150
19151 adenorm
19152 Remedy denormals in audio by adding extremely low-level noise.
19153
19154 This filter shall be placed before any filter that can produce
19155 denormals.
19156
19157 A description of the accepted parameters follows.
19158
19159 level
19160 Set level of added noise in dB. Default is -351. Allowed range is
19161 from -451 to -90.
19162
19163 type
19164 Set type of added noise.
19165
19166 dc Add DC signal.
19167
19168 ac Add AC signal.
19169
19170 square
19171 Add square signal.
19172
19173 pulse
19174 Add pulse signal.
19175
19176 Default is "dc".
19177
19178 Commands
19179
19180 This filter supports the all above options as commands.
19181
19182 aderivative, aintegral
19183 Compute derivative/integral of audio stream.
19184
19185 Applying both filters one after another produces original audio.
19186
19187 adrc
19188 Apply spectral dynamic range controller filter to input audio stream.
19189
19190 A description of the accepted options follows.
19191
19192 transfer
19193 Set the transfer expression.
19194
19195 The expression can contain the following constants:
19196
19197 ch current channel number
19198
19199 sn current sample number
19200
19201 nb_channels
19202 number of channels
19203
19204 t timestamp expressed in seconds
19205
19206 sr sample rate
19207
19208 p current frequency power value, in dB
19209
19210 f current frequency in Hz
19211
19212 Default value is "p".
19213
19214 attack
19215 Set the attack in milliseconds. Default is 50 milliseconds.
19216 Allowed range is from 1 to 1000 milliseconds.
19217
19218 release
19219 Set the release in milliseconds. Default is 100 milliseconds.
19220 Allowed range is from 5 to 2000 milliseconds.
19221
19222 channels
19223 Set which channels to filter, by default "all" channels in audio
19224 stream are filtered.
19225
19226 Commands
19227
19228 This filter supports the all above options as commands.
19229
19230 Examples
19231
19232 • Apply spectral compression to all frequencies with threshold of -50
19233 dB and 1:6 ratio:
19234
19235 adrc=transfer='if(gt(p,-50),-50+(p-(-50))/6,p)':attack=50:release=100
19236
19237 • Similar to above but with 1:2 ratio and filtering only front center
19238 channel:
19239
19240 adrc=transfer='if(gt(p,-50),-50+(p-(-50))/2,p)':attack=50:release=100:channels=FC
19241
19242 • Apply spectral noise gate to all frequencies with threshold of -85
19243 dB and with short attack time and short release time:
19244
19245 adrc=transfer='if(lte(p,-85),p-800,p)':attack=1:release=5
19246
19247 • Apply spectral expansion to all frequencies with threshold of -10
19248 dB and 1:2 ratio:
19249
19250 adrc=transfer='if(lt(p,-10),-10+(p-(-10))*2,p)':attack=50:release=100
19251
19252 • Apply limiter to max -60 dB to all frequencies, with attack of 2 ms
19253 and release of 10 ms:
19254
19255 adrc=transfer='min(p,-60)':attack=2:release=10
19256
19257 adynamicequalizer
19258 Apply dynamic equalization to input audio stream.
19259
19260 A description of the accepted options follows.
19261
19262 threshold
19263 Set the detection threshold used to trigger equalization.
19264 Threshold detection is using bandpass filter. Default value is 0.
19265 Allowed range is from 0 to 100.
19266
19267 dfrequency
19268 Set the detection frequency in Hz used for bandpass filter used to
19269 trigger equalization. Default value is 1000 Hz. Allowed range is
19270 between 2 and 1000000 Hz.
19271
19272 dqfactor
19273 Set the detection resonance factor for bandpass filter used to
19274 trigger equalization. Default value is 1. Allowed range is from
19275 0.001 to 1000.
19276
19277 tfrequency
19278 Set the target frequency of equalization filter. Default value is
19279 1000 Hz. Allowed range is between 2 and 1000000 Hz.
19280
19281 tqfactor
19282 Set the target resonance factor for target equalization filter.
19283 Default value is 1. Allowed range is from 0.001 to 1000.
19284
19285 attack
19286 Set the amount of milliseconds the signal from detection has to
19287 rise above the detection threshold before equalization starts.
19288 Default is 20. Allowed range is between 1 and 2000.
19289
19290 release
19291 Set the amount of milliseconds the signal from detection has to
19292 fall below the detection threshold before equalization ends.
19293 Default is 200. Allowed range is between 1 and 2000.
19294
19295 ratio
19296 Set the ratio by which the equalization gain is raised. Default is
19297 1. Allowed range is between 0 and 30.
19298
19299 makeup
19300 Set the makeup offset by which the equalization gain is raised.
19301 Default is 0. Allowed range is between 0 and 100.
19302
19303 range
19304 Set the max allowed cut/boost amount. Default is 50. Allowed range
19305 is from 1 to 200.
19306
19307 mode
19308 Set the mode of filter operation, can be one of the following:
19309
19310 listen
19311 Output only isolated bandpass signal.
19312
19313 cut Cut frequencies above detection threshold.
19314
19315 boost
19316 Boost frequencies bellow detection threshold.
19317
19318 Default mode is cut.
19319
19320 tftype
19321 Set the type of target filter, can be one of the following:
19322
19323 bell
19324 lowshelf
19325 highshelf
19326
19327 Default type is bell.
19328
19329 direction
19330 Set processing direction relative to threshold.
19331
19332 downward
19333 Boost/Cut if threshold is higher/lower than detected volume.
19334
19335 upward
19336 Boost/Cut if threshold is lower/higher than detected volume.
19337
19338 Default direction is downward.
19339
19340 auto
19341 Automatically gather threshold from detection filter. By default is
19342 disabled. This option is useful to detect threshold in certain
19343 time frame of input audio stream, in such case option value is
19344 changed at runtime.
19345
19346 Available values are:
19347
19348 disabled
19349 Disable using automatically gathered threshold value.
19350
19351 off Stop picking threshold value.
19352
19353 on Start picking threshold value.
19354
19355 Commands
19356
19357 This filter supports the all above options as commands.
19358
19359 adynamicsmooth
19360 Apply dynamic smoothing to input audio stream.
19361
19362 A description of the accepted options follows.
19363
19364 sensitivity
19365 Set an amount of sensitivity to frequency fluctations. Default is
19366 2. Allowed range is from 0 to 1e+06.
19367
19368 basefreq
19369 Set a base frequency for smoothing. Default value is 22050.
19370 Allowed range is from 2 to 1e+06.
19371
19372 Commands
19373
19374 This filter supports the all above options as commands.
19375
19376 aecho
19377 Apply echoing to the input audio.
19378
19379 Echoes are reflected sound and can occur naturally amongst mountains
19380 (and sometimes large buildings) when talking or shouting; digital echo
19381 effects emulate this behaviour and are often used to help fill out the
19382 sound of a single instrument or vocal. The time difference between the
19383 original signal and the reflection is the "delay", and the loudness of
19384 the reflected signal is the "decay". Multiple echoes can have
19385 different delays and decays.
19386
19387 A description of the accepted parameters follows.
19388
19389 in_gain
19390 Set input gain of reflected signal. Default is 0.6.
19391
19392 out_gain
19393 Set output gain of reflected signal. Default is 0.3.
19394
19395 delays
19396 Set list of time intervals in milliseconds between original signal
19397 and reflections separated by '|'. Allowed range for each "delay" is
19398 "(0 - 90000.0]". Default is 1000.
19399
19400 decays
19401 Set list of loudness of reflected signals separated by '|'.
19402 Allowed range for each "decay" is "(0 - 1.0]". Default is 0.5.
19403
19404 Examples
19405
19406 • Make it sound as if there are twice as many instruments as are
19407 actually playing:
19408
19409 aecho=0.8:0.88:60:0.4
19410
19411 • If delay is very short, then it sounds like a (metallic) robot
19412 playing music:
19413
19414 aecho=0.8:0.88:6:0.4
19415
19416 • A longer delay will sound like an open air concert in the
19417 mountains:
19418
19419 aecho=0.8:0.9:1000:0.3
19420
19421 • Same as above but with one more mountain:
19422
19423 aecho=0.8:0.9:1000|1800:0.3|0.25
19424
19425 aemphasis
19426 Audio emphasis filter creates or restores material directly taken from
19427 LPs or emphased CDs with different filter curves. E.g. to store music
19428 on vinyl the signal has to be altered by a filter first to even out the
19429 disadvantages of this recording medium. Once the material is played
19430 back the inverse filter has to be applied to restore the distortion of
19431 the frequency response.
19432
19433 The filter accepts the following options:
19434
19435 level_in
19436 Set input gain.
19437
19438 level_out
19439 Set output gain.
19440
19441 mode
19442 Set filter mode. For restoring material use "reproduction" mode,
19443 otherwise use "production" mode. Default is "reproduction" mode.
19444
19445 type
19446 Set filter type. Selects medium. Can be one of the following:
19447
19448 col select Columbia.
19449
19450 emi select EMI.
19451
19452 bsi select BSI (78RPM).
19453
19454 riaa
19455 select RIAA.
19456
19457 cd select Compact Disc (CD).
19458
19459 50fm
19460 select 50µs (FM).
19461
19462 75fm
19463 select 75µs (FM).
19464
19465 50kf
19466 select 50µs (FM-KF).
19467
19468 75kf
19469 select 75µs (FM-KF).
19470
19471 Commands
19472
19473 This filter supports the all above options as commands.
19474
19475 aeval
19476 Modify an audio signal according to the specified expressions.
19477
19478 This filter accepts one or more expressions (one for each channel),
19479 which are evaluated and used to modify a corresponding audio signal.
19480
19481 It accepts the following parameters:
19482
19483 exprs
19484 Set the '|'-separated expressions list for each separate channel.
19485 If the number of input channels is greater than the number of
19486 expressions, the last specified expression is used for the
19487 remaining output channels.
19488
19489 channel_layout, c
19490 Set output channel layout. If not specified, the channel layout is
19491 specified by the number of expressions. If set to same, it will use
19492 by default the same input channel layout.
19493
19494 Each expression in exprs can contain the following constants and
19495 functions:
19496
19497 ch channel number of the current expression
19498
19499 n number of the evaluated sample, starting from 0
19500
19501 s sample rate
19502
19503 t time of the evaluated sample expressed in seconds
19504
19505 nb_in_channels
19506 nb_out_channels
19507 input and output number of channels
19508
19509 val(CH)
19510 the value of input channel with number CH
19511
19512 Note: this filter is slow. For faster processing you should use a
19513 dedicated filter.
19514
19515 Examples
19516
19517 • Half volume:
19518
19519 aeval=val(ch)/2:c=same
19520
19521 • Invert phase of the second channel:
19522
19523 aeval=val(0)|-val(1)
19524
19525 aexciter
19526 An exciter is used to produce high sound that is not present in the
19527 original signal. This is done by creating harmonic distortions of the
19528 signal which are restricted in range and added to the original signal.
19529 An Exciter raises the upper end of an audio signal without simply
19530 raising the higher frequencies like an equalizer would do to create a
19531 more "crisp" or "brilliant" sound.
19532
19533 The filter accepts the following options:
19534
19535 level_in
19536 Set input level prior processing of signal. Allowed range is from
19537 0 to 64. Default value is 1.
19538
19539 level_out
19540 Set output level after processing of signal. Allowed range is from
19541 0 to 64. Default value is 1.
19542
19543 amount
19544 Set the amount of harmonics added to original signal. Allowed
19545 range is from 0 to 64. Default value is 1.
19546
19547 drive
19548 Set the amount of newly created harmonics. Allowed range is from
19549 0.1 to 10. Default value is 8.5.
19550
19551 blend
19552 Set the octave of newly created harmonics. Allowed range is from
19553 -10 to 10. Default value is 0.
19554
19555 freq
19556 Set the lower frequency limit of producing harmonics in Hz.
19557 Allowed range is from 2000 to 12000 Hz. Default is 7500 Hz.
19558
19559 ceil
19560 Set the upper frequency limit of producing harmonics. Allowed
19561 range is from 9999 to 20000 Hz. If value is lower than 10000 Hz no
19562 limit is applied.
19563
19564 listen
19565 Mute the original signal and output only added harmonics. By
19566 default is disabled.
19567
19568 Commands
19569
19570 This filter supports the all above options as commands.
19571
19572 afade
19573 Apply fade-in/out effect to input audio.
19574
19575 A description of the accepted parameters follows.
19576
19577 type, t
19578 Specify the effect type, can be either "in" for fade-in, or "out"
19579 for a fade-out effect. Default is "in".
19580
19581 start_sample, ss
19582 Specify the number of the start sample for starting to apply the
19583 fade effect. Default is 0.
19584
19585 nb_samples, ns
19586 Specify the number of samples for which the fade effect has to
19587 last. At the end of the fade-in effect the output audio will have
19588 the same volume as the input audio, at the end of the fade-out
19589 transition the output audio will be silence. Default is 44100.
19590
19591 start_time, st
19592 Specify the start time of the fade effect. Default is 0. The value
19593 must be specified as a time duration; see the Time duration section
19594 in the ffmpeg-utils(1) manual for the accepted syntax. If set this
19595 option is used instead of start_sample.
19596
19597 duration, d
19598 Specify the duration of the fade effect. See the Time duration
19599 section in the ffmpeg-utils(1) manual for the accepted syntax. At
19600 the end of the fade-in effect the output audio will have the same
19601 volume as the input audio, at the end of the fade-out transition
19602 the output audio will be silence. By default the duration is
19603 determined by nb_samples. If set this option is used instead of
19604 nb_samples.
19605
19606 curve
19607 Set curve for fade transition.
19608
19609 It accepts the following values:
19610
19611 tri select triangular, linear slope (default)
19612
19613 qsin
19614 select quarter of sine wave
19615
19616 hsin
19617 select half of sine wave
19618
19619 esin
19620 select exponential sine wave
19621
19622 log select logarithmic
19623
19624 ipar
19625 select inverted parabola
19626
19627 qua select quadratic
19628
19629 cub select cubic
19630
19631 squ select square root
19632
19633 cbr select cubic root
19634
19635 par select parabola
19636
19637 exp select exponential
19638
19639 iqsin
19640 select inverted quarter of sine wave
19641
19642 ihsin
19643 select inverted half of sine wave
19644
19645 dese
19646 select double-exponential seat
19647
19648 desi
19649 select double-exponential sigmoid
19650
19651 losi
19652 select logistic sigmoid
19653
19654 sinc
19655 select sine cardinal function
19656
19657 isinc
19658 select inverted sine cardinal function
19659
19660 nofade
19661 no fade applied
19662
19663 silence
19664 Set the initial gain for fade-in or final gain for fade-out.
19665 Default value is 0.0.
19666
19667 unity
19668 Set the initial gain for fade-out or final gain for fade-in.
19669 Default value is 1.0.
19670
19671 Commands
19672
19673 This filter supports the all above options as commands.
19674
19675 Examples
19676
19677 • Fade in first 15 seconds of audio:
19678
19679 afade=t=in:ss=0:d=15
19680
19681 • Fade out last 25 seconds of a 900 seconds audio:
19682
19683 afade=t=out:st=875:d=25
19684
19685 afftdn
19686 Denoise audio samples with FFT.
19687
19688 A description of the accepted parameters follows.
19689
19690 noise_reduction, nr
19691 Set the noise reduction in dB, allowed range is 0.01 to 97.
19692 Default value is 12 dB.
19693
19694 noise_floor, nf
19695 Set the noise floor in dB, allowed range is -80 to -20. Default
19696 value is -50 dB.
19697
19698 noise_type, nt
19699 Set the noise type.
19700
19701 It accepts the following values:
19702
19703 white, w
19704 Select white noise.
19705
19706 vinyl, v
19707 Select vinyl noise.
19708
19709 shellac, s
19710 Select shellac noise.
19711
19712 custom, c
19713 Select custom noise, defined in "bn" option.
19714
19715 Default value is white noise.
19716
19717 band_noise, bn
19718 Set custom band noise profile for every one of 15 bands. Bands are
19719 separated by ' ' or '|'.
19720
19721 residual_floor, rf
19722 Set the residual floor in dB, allowed range is -80 to -20. Default
19723 value is -38 dB.
19724
19725 track_noise, tn
19726 Enable noise floor tracking. By default is disabled. With this
19727 enabled, noise floor is automatically adjusted.
19728
19729 track_residual, tr
19730 Enable residual tracking. By default is disabled.
19731
19732 output_mode, om
19733 Set the output mode.
19734
19735 It accepts the following values:
19736
19737 input, i
19738 Pass input unchanged.
19739
19740 output, o
19741 Pass noise filtered out.
19742
19743 noise, n
19744 Pass only noise.
19745
19746 Default value is output.
19747
19748 adaptivity, ad
19749 Set the adaptivity factor, used how fast to adapt gains adjustments
19750 per each frequency bin. Value 0 enables instant adaptation, while
19751 higher values react much slower. Allowed range is from 0 to 1.
19752 Default value is 0.5.
19753
19754 floor_offset, fo
19755 Set the noise floor offset factor. This option is used to adjust
19756 offset applied to measured noise floor. It is only effective when
19757 noise floor tracking is enabled. Allowed range is from -2.0 to
19758 2.0. Default value is 1.0.
19759
19760 noise_link, nl
19761 Set the noise link used for multichannel audio.
19762
19763 It accepts the following values:
19764
19765 none
19766 Use unchanged channel's noise floor.
19767
19768 min Use measured min noise floor of all channels.
19769
19770 max Use measured max noise floor of all channels.
19771
19772 average
19773 Use measured average noise floor of all channels.
19774
19775 Default value is min.
19776
19777 band_multiplier, bm
19778 Set the band multiplier factor, used how much to spread bands
19779 across frequency bins. Allowed range is from 0.2 to 5. Default
19780 value is 1.25.
19781
19782 sample_noise, sn
19783 Toggle capturing and measurement of noise profile from input audio.
19784
19785 It accepts the following values:
19786
19787 start, begin
19788 Start sample noise capture.
19789
19790 stop, end
19791 Stop sample noise capture and measure new noise band profile.
19792
19793 Default value is "none".
19794
19795 gain_smooth, gs
19796 Set gain smooth spatial radius, used to smooth gains applied to
19797 each frequency bin. Useful to reduce random music noise artefacts.
19798 Higher values increases smoothing of gains. Allowed range is from
19799 0 to 50. Default value is 0.
19800
19801 Commands
19802
19803 This filter supports the some above mentioned options as commands.
19804
19805 Examples
19806
19807 • Reduce white noise by 10dB, and use previously measured noise floor
19808 of -40dB:
19809
19810 afftdn=nr=10:nf=-40
19811
19812 • Reduce white noise by 10dB, also set initial noise floor to -80dB
19813 and enable automatic tracking of noise floor so noise floor will
19814 gradually change during processing:
19815
19816 afftdn=nr=10:nf=-80:tn=1
19817
19818 • Reduce noise by 20dB, using noise floor of -40dB and using commands
19819 to take noise profile of first 0.4 seconds of input audio:
19820
19821 asendcmd=0.0 afftdn sn start,asendcmd=0.4 afftdn sn stop,afftdn=nr=20:nf=-40
19822
19823 afftfilt
19824 Apply arbitrary expressions to samples in frequency domain.
19825
19826 real
19827 Set frequency domain real expression for each separate channel
19828 separated by '|'. Default is "re". If the number of input channels
19829 is greater than the number of expressions, the last specified
19830 expression is used for the remaining output channels.
19831
19832 imag
19833 Set frequency domain imaginary expression for each separate channel
19834 separated by '|'. Default is "im".
19835
19836 Each expression in real and imag can contain the following
19837 constants and functions:
19838
19839 sr sample rate
19840
19841 b current frequency bin number
19842
19843 nb number of available bins
19844
19845 ch channel number of the current expression
19846
19847 chs number of channels
19848
19849 pts current frame pts
19850
19851 re current real part of frequency bin of current channel
19852
19853 im current imaginary part of frequency bin of current channel
19854
19855 real(b, ch)
19856 Return the value of real part of frequency bin at location
19857 (bin,channel)
19858
19859 imag(b, ch)
19860 Return the value of imaginary part of frequency bin at location
19861 (bin,channel)
19862
19863 win_size
19864 Set window size. Allowed range is from 16 to 131072. Default is
19865 4096
19866
19867 win_func
19868 Set window function.
19869
19870 It accepts the following values:
19871
19872 rect
19873 bartlett
19874 hann, hanning
19875 hamming
19876 blackman
19877 welch
19878 flattop
19879 bharris
19880 bnuttall
19881 bhann
19882 sine
19883 nuttall
19884 lanczos
19885 gauss
19886 tukey
19887 dolph
19888 cauchy
19889 parzen
19890 poisson
19891 bohman
19892 kaiser
19893
19894 Default is "hann".
19895
19896 overlap
19897 Set window overlap. If set to 1, the recommended overlap for
19898 selected window function will be picked. Default is 0.75.
19899
19900 Examples
19901
19902 • Leave almost only low frequencies in audio:
19903
19904 afftfilt="'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'"
19905
19906 • Apply robotize effect:
19907
19908 afftfilt="real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75"
19909
19910 • Apply whisper effect:
19911
19912 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"
19913
19914 • Apply phase shift:
19915
19916 afftfilt="real=re*cos(1)-im*sin(1):imag=re*sin(1)+im*cos(1)"
19917
19918 afir
19919 Apply an arbitrary Finite Impulse Response filter.
19920
19921 This filter is designed for applying long FIR filters, up to 60 seconds
19922 long.
19923
19924 It can be used as component for digital crossover filters, room
19925 equalization, cross talk cancellation, wavefield synthesis,
19926 auralization, ambiophonics, ambisonics and spatialization.
19927
19928 This filter uses the streams higher than first one as FIR coefficients.
19929 If the non-first stream holds a single channel, it will be used for all
19930 input channels in the first stream, otherwise the number of channels in
19931 the non-first stream must be same as the number of channels in the
19932 first stream.
19933
19934 It accepts the following parameters:
19935
19936 dry Set dry gain. This sets input gain.
19937
19938 wet Set wet gain. This sets final output gain.
19939
19940 length
19941 Set Impulse Response filter length. Default is 1, which means whole
19942 IR is processed.
19943
19944 gtype
19945 Enable applying gain measured from power of IR.
19946
19947 Set which approach to use for auto gain measurement.
19948
19949 none
19950 Do not apply any gain.
19951
19952 peak
19953 select peak gain, very conservative approach. This is default
19954 value.
19955
19956 dc select DC gain, limited application.
19957
19958 gn select gain to noise approach, this is most popular one.
19959
19960 ac select AC gain.
19961
19962 rms select RMS gain.
19963
19964 irgain
19965 Set gain to be applied to IR coefficients before filtering.
19966 Allowed range is 0 to 1. This gain is applied after any gain
19967 applied with gtype option.
19968
19969 irfmt
19970 Set format of IR stream. Can be "mono" or "input". Default is
19971 "input".
19972
19973 maxir
19974 Set max allowed Impulse Response filter duration in seconds.
19975 Default is 30 seconds. Allowed range is 0.1 to 60 seconds.
19976
19977 response
19978 Show IR frequency response, magnitude(magenta), phase(green) and
19979 group delay(yellow) in additional video stream. By default it is
19980 disabled.
19981
19982 channel
19983 Set for which IR channel to display frequency response. By default
19984 is first channel displayed. This option is used only when response
19985 is enabled.
19986
19987 size
19988 Set video stream size. This option is used only when response is
19989 enabled.
19990
19991 rate
19992 Set video stream frame rate. This option is used only when response
19993 is enabled.
19994
19995 minp
19996 Set minimal partition size used for convolution. Default is 8192.
19997 Allowed range is from 1 to 65536. Lower values decreases latency
19998 at cost of higher CPU usage.
19999
20000 maxp
20001 Set maximal partition size used for convolution. Default is 8192.
20002 Allowed range is from 8 to 65536. Lower values may increase CPU
20003 usage.
20004
20005 nbirs
20006 Set number of input impulse responses streams which will be
20007 switchable at runtime. Allowed range is from 1 to 32. Default is
20008 1.
20009
20010 ir Set IR stream which will be used for convolution, starting from 0,
20011 should always be lower than supplied value by "nbirs" option.
20012 Default is 0. This option can be changed at runtime via commands.
20013
20014 precision
20015 Set which precision to use when processing samples.
20016
20017 auto
20018 Auto pick internal sample format depending on other filters.
20019
20020 float
20021 Always use single-floating point precision sample format.
20022
20023 double
20024 Always use double-floating point precision sample format.
20025
20026 Default value is auto.
20027
20028 Examples
20029
20030 • Apply reverb to stream using mono IR file as second input, complete
20031 command using ffmpeg:
20032
20033 ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
20034
20035 • Apply true stereo processing given input stereo stream, and two
20036 stereo impulse responses for left and right channel, the impulse
20037 response files are files with names l_ir.wav and r_ir.wav:
20038
20039 "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"
20040
20041 aformat
20042 Set output format constraints for the input audio. The framework will
20043 negotiate the most appropriate format to minimize conversions.
20044
20045 It accepts the following parameters:
20046
20047 sample_fmts, f
20048 A '|'-separated list of requested sample formats.
20049
20050 sample_rates, r
20051 A '|'-separated list of requested sample rates.
20052
20053 channel_layouts, cl
20054 A '|'-separated list of requested channel layouts.
20055
20056 See the Channel Layout section in the ffmpeg-utils(1) manual for
20057 the required syntax.
20058
20059 If a parameter is omitted, all values are allowed.
20060
20061 Force the output to either unsigned 8-bit or signed 16-bit stereo
20062
20063 aformat=sample_fmts=u8|s16:channel_layouts=stereo
20064
20065 afreqshift
20066 Apply frequency shift to input audio samples.
20067
20068 The filter accepts the following options:
20069
20070 shift
20071 Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
20072 Default value is 0.0.
20073
20074 level
20075 Set output gain applied to final output. Allowed range is from 0.0
20076 to 1.0. Default value is 1.0.
20077
20078 order
20079 Set filter order used for filtering. Allowed range is from 1 to 16.
20080 Default value is 8.
20081
20082 Commands
20083
20084 This filter supports the all above options as commands.
20085
20086 afwtdn
20087 Reduce broadband noise from input samples using Wavelets.
20088
20089 A description of the accepted options follows.
20090
20091 sigma
20092 Set the noise sigma, allowed range is from 0 to 1. Default value
20093 is 0. This option controls strength of denoising applied to input
20094 samples. Most useful way to set this option is via decibels, eg.
20095 -45dB.
20096
20097 levels
20098 Set the number of wavelet levels of decomposition. Allowed range
20099 is from 1 to 12. Default value is 10. Setting this too low make
20100 denoising performance very poor.
20101
20102 wavet
20103 Set wavelet type for decomposition of input frame. They are sorted
20104 by number of coefficients, from lowest to highest. More
20105 coefficients means worse filtering speed, but overall better
20106 quality. Available wavelets are:
20107
20108 sym2
20109 sym4
20110 rbior68
20111 deb10
20112 sym10
20113 coif5
20114 bl3
20115 percent
20116 Set percent of full denoising. Allowed range is from 0 to 100
20117 percent. Default value is 85 percent or partial denoising.
20118
20119 profile
20120 If enabled, first input frame will be used as noise profile. If
20121 first frame samples contain non-noise performance will be very
20122 poor.
20123
20124 adaptive
20125 If enabled, input frames are analyzed for presence of noise. If
20126 noise is detected with high possibility then input frame profile
20127 will be used for processing following frames, until new noise frame
20128 is detected.
20129
20130 samples
20131 Set size of single frame in number of samples. Allowed range is
20132 from 512 to 65536. Default frame size is 8192 samples.
20133
20134 softness
20135 Set softness applied inside thresholding function. Allowed range is
20136 from 0 to 10. Default softness is 1.
20137
20138 Commands
20139
20140 This filter supports the all above options as commands.
20141
20142 agate
20143 A gate is mainly used to reduce lower parts of a signal. This kind of
20144 signal processing reduces disturbing noise between useful signals.
20145
20146 Gating is done by detecting the volume below a chosen level threshold
20147 and dividing it by the factor set with ratio. The bottom of the noise
20148 floor is set via range. Because an exact manipulation of the signal
20149 would cause distortion of the waveform the reduction can be levelled
20150 over time. This is done by setting attack and release.
20151
20152 attack determines how long the signal has to fall below the threshold
20153 before any reduction will occur and release sets the time the signal
20154 has to rise above the threshold to reduce the reduction again. Shorter
20155 signals than the chosen attack time will be left untouched.
20156
20157 level_in
20158 Set input level before filtering. Default is 1. Allowed range is
20159 from 0.015625 to 64.
20160
20161 mode
20162 Set the mode of operation. Can be "upward" or "downward". Default
20163 is "downward". If set to "upward" mode, higher parts of signal will
20164 be amplified, expanding dynamic range in upward direction.
20165 Otherwise, in case of "downward" lower parts of signal will be
20166 reduced.
20167
20168 range
20169 Set the level of gain reduction when the signal is below the
20170 threshold. Default is 0.06125. Allowed range is from 0 to 1.
20171 Setting this to 0 disables reduction and then filter behaves like
20172 expander.
20173
20174 threshold
20175 If a signal rises above this level the gain reduction is released.
20176 Default is 0.125. Allowed range is from 0 to 1.
20177
20178 ratio
20179 Set a ratio by which the signal is reduced. Default is 2. Allowed
20180 range is from 1 to 9000.
20181
20182 attack
20183 Amount of milliseconds the signal has to rise above the threshold
20184 before gain reduction stops. Default is 20 milliseconds. Allowed
20185 range is from 0.01 to 9000.
20186
20187 release
20188 Amount of milliseconds the signal has to fall below the threshold
20189 before the reduction is increased again. Default is 250
20190 milliseconds. Allowed range is from 0.01 to 9000.
20191
20192 makeup
20193 Set amount of amplification of signal after processing. Default is
20194 1. Allowed range is from 1 to 64.
20195
20196 knee
20197 Curve the sharp knee around the threshold to enter gain reduction
20198 more softly. Default is 2.828427125. Allowed range is from 1 to 8.
20199
20200 detection
20201 Choose if exact signal should be taken for detection or an RMS like
20202 one. Default is "rms". Can be "peak" or "rms".
20203
20204 link
20205 Choose if the average level between all channels or the louder
20206 channel affects the reduction. Default is "average". Can be
20207 "average" or "maximum".
20208
20209 Commands
20210
20211 This filter supports the all above options as commands.
20212
20213 aiir
20214 Apply an arbitrary Infinite Impulse Response filter.
20215
20216 It accepts the following parameters:
20217
20218 zeros, z
20219 Set B/numerator/zeros/reflection coefficients.
20220
20221 poles, p
20222 Set A/denominator/poles/ladder coefficients.
20223
20224 gains, k
20225 Set channels gains.
20226
20227 dry_gain
20228 Set input gain.
20229
20230 wet_gain
20231 Set output gain.
20232
20233 format, f
20234 Set coefficients format.
20235
20236 ll lattice-ladder function
20237
20238 sf analog transfer function
20239
20240 tf digital transfer function
20241
20242 zp Z-plane zeros/poles, cartesian (default)
20243
20244 pr Z-plane zeros/poles, polar radians
20245
20246 pd Z-plane zeros/poles, polar degrees
20247
20248 sp S-plane zeros/poles
20249
20250 process, r
20251 Set type of processing.
20252
20253 d direct processing
20254
20255 s serial processing
20256
20257 p parallel processing
20258
20259 precision, e
20260 Set filtering precision.
20261
20262 dbl double-precision floating-point (default)
20263
20264 flt single-precision floating-point
20265
20266 i32 32-bit integers
20267
20268 i16 16-bit integers
20269
20270 normalize, n
20271 Normalize filter coefficients, by default is enabled. Enabling it
20272 will normalize magnitude response at DC to 0dB.
20273
20274 mix How much to use filtered signal in output. Default is 1. Range is
20275 between 0 and 1.
20276
20277 response
20278 Show IR frequency response, magnitude(magenta), phase(green) and
20279 group delay(yellow) in additional video stream. By default it is
20280 disabled.
20281
20282 channel
20283 Set for which IR channel to display frequency response. By default
20284 is first channel displayed. This option is used only when response
20285 is enabled.
20286
20287 size
20288 Set video stream size. This option is used only when response is
20289 enabled.
20290
20291 Coefficients in "tf" and "sf" format are separated by spaces and are in
20292 ascending order.
20293
20294 Coefficients in "zp" format are separated by spaces and order of
20295 coefficients doesn't matter. Coefficients in "zp" format are complex
20296 numbers with i imaginary unit.
20297
20298 Different coefficients and gains can be provided for every channel, in
20299 such case use '|' to separate coefficients or gains. Last provided
20300 coefficients will be used for all remaining channels.
20301
20302 Examples
20303
20304 • Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample
20305 rate:
20306
20307 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
20308
20309 • Same as above but in "zp" format:
20310
20311 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
20312
20313 • Apply 3-rd order analog normalized Butterworth low-pass filter,
20314 using analog transfer function format:
20315
20316 aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
20317
20318 alimiter
20319 The limiter prevents an input signal from rising over a desired
20320 threshold. This limiter uses lookahead technology to prevent your
20321 signal from distorting. It means that there is a small delay after the
20322 signal is processed. Keep in mind that the delay it produces is the
20323 attack time you set.
20324
20325 The filter accepts the following options:
20326
20327 level_in
20328 Set input gain. Default is 1.
20329
20330 level_out
20331 Set output gain. Default is 1.
20332
20333 limit
20334 Don't let signals above this level pass the limiter. Default is 1.
20335
20336 attack
20337 The limiter will reach its attenuation level in this amount of time
20338 in milliseconds. Default is 5 milliseconds.
20339
20340 release
20341 Come back from limiting to attenuation 1.0 in this amount of
20342 milliseconds. Default is 50 milliseconds.
20343
20344 asc When gain reduction is always needed ASC takes care of releasing to
20345 an average reduction level rather than reaching a reduction of 0 in
20346 the release time.
20347
20348 asc_level
20349 Select how much the release time is affected by ASC, 0 means nearly
20350 no changes in release time while 1 produces higher release times.
20351
20352 level
20353 Auto level output signal. Default is enabled. This normalizes
20354 audio back to 0dB if enabled.
20355
20356 latency
20357 Compensate the delay introduced by using the lookahead buffer set
20358 with attack parameter. Also flush the valid audio data in the
20359 lookahead buffer when the stream hits EOF.
20360
20361 Depending on picked setting it is recommended to upsample input 2x or
20362 4x times with aresample before applying this filter.
20363
20364 allpass
20365 Apply a two-pole all-pass filter with central frequency (in Hz)
20366 frequency, and filter-width width. An all-pass filter changes the
20367 audio's frequency to phase relationship without changing its frequency
20368 to amplitude relationship.
20369
20370 The filter accepts the following options:
20371
20372 frequency, f
20373 Set frequency in Hz.
20374
20375 width_type, t
20376 Set method to specify band-width of filter.
20377
20378 h Hz
20379
20380 q Q-Factor
20381
20382 o octave
20383
20384 s slope
20385
20386 k kHz
20387
20388 width, w
20389 Specify the band-width of a filter in width_type units.
20390
20391 mix, m
20392 How much to use filtered signal in output. Default is 1. Range is
20393 between 0 and 1.
20394
20395 channels, c
20396 Specify which channels to filter, by default all available are
20397 filtered.
20398
20399 normalize, n
20400 Normalize biquad coefficients, by default is disabled. Enabling it
20401 will normalize magnitude response at DC to 0dB.
20402
20403 order, o
20404 Set the filter order, can be 1 or 2. Default is 2.
20405
20406 transform, a
20407 Set transform type of IIR filter.
20408
20409 di
20410 dii
20411 tdi
20412 tdii
20413 latt
20414 svf
20415 zdf
20416 precision, r
20417 Set precison of filtering.
20418
20419 auto
20420 Pick automatic sample format depending on surround filters.
20421
20422 s16 Always use signed 16-bit.
20423
20424 s32 Always use signed 32-bit.
20425
20426 f32 Always use float 32-bit.
20427
20428 f64 Always use float 64-bit.
20429
20430 Commands
20431
20432 This filter supports the following commands:
20433
20434 frequency, f
20435 Change allpass frequency. Syntax for the command is : "frequency"
20436
20437 width_type, t
20438 Change allpass width_type. Syntax for the command is :
20439 "width_type"
20440
20441 width, w
20442 Change allpass width. Syntax for the command is : "width"
20443
20444 mix, m
20445 Change allpass mix. Syntax for the command is : "mix"
20446
20447 aloop
20448 Loop audio samples.
20449
20450 The filter accepts the following options:
20451
20452 loop
20453 Set the number of loops. Setting this value to -1 will result in
20454 infinite loops. Default is 0.
20455
20456 size
20457 Set maximal number of samples. Default is 0.
20458
20459 start
20460 Set first sample of loop. Default is 0.
20461
20462 amerge
20463 Merge two or more audio streams into a single multi-channel stream.
20464
20465 The filter accepts the following options:
20466
20467 inputs
20468 Set the number of inputs. Default is 2.
20469
20470 If the channel layouts of the inputs are disjoint, and therefore
20471 compatible, the channel layout of the output will be set accordingly
20472 and the channels will be reordered as necessary. If the channel layouts
20473 of the inputs are not disjoint, the output will have all the channels
20474 of the first input then all the channels of the second input, in that
20475 order, and the channel layout of the output will be the default value
20476 corresponding to the total number of channels.
20477
20478 For example, if the first input is in 2.1 (FL+FR+LF) and the second
20479 input is FC+BL+BR, then the output will be in 5.1, with the channels in
20480 the following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of
20481 the first input, b1 is the first channel of the second input).
20482
20483 On the other hand, if both input are in stereo, the output channels
20484 will be in the default order: a1, a2, b1, b2, and the channel layout
20485 will be arbitrarily set to 4.0, which may or may not be the expected
20486 value.
20487
20488 All inputs must have the same sample rate, and format.
20489
20490 If inputs do not have the same duration, the output will stop with the
20491 shortest.
20492
20493 Examples
20494
20495 • Merge two mono files into a stereo stream:
20496
20497 amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
20498
20499 • Multiple merges assuming 1 video stream and 6 audio streams in
20500 input.mkv:
20501
20502 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
20503
20504 amix
20505 Mixes multiple audio inputs into a single output.
20506
20507 Note that this filter only supports float samples (the amerge and pan
20508 audio filters support many formats). If the amix input has integer
20509 samples then aresample will be automatically inserted to perform the
20510 conversion to float samples.
20511
20512 It accepts the following parameters:
20513
20514 inputs
20515 The number of inputs. If unspecified, it defaults to 2.
20516
20517 duration
20518 How to determine the end-of-stream.
20519
20520 longest
20521 The duration of the longest input. (default)
20522
20523 shortest
20524 The duration of the shortest input.
20525
20526 first
20527 The duration of the first input.
20528
20529 dropout_transition
20530 The transition time, in seconds, for volume renormalization when an
20531 input stream ends. The default value is 2 seconds.
20532
20533 weights
20534 Specify weight of each input audio stream as a sequence of numbers
20535 separated by a space. If fewer weights are specified compared to
20536 number of inputs, the last weight is assigned to the remaining
20537 inputs. Default weight for each input is 1.
20538
20539 normalize
20540 Always scale inputs instead of only doing summation of samples.
20541 Beware of heavy clipping if inputs are not normalized prior or
20542 after filtering by this filter if this option is disabled. By
20543 default is enabled.
20544
20545 Examples
20546
20547 • This will mix 3 input audio streams to a single output with the
20548 same duration as the first input and a dropout transition time of 3
20549 seconds:
20550
20551 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
20552
20553 • This will mix one vocal and one music input audio stream to a
20554 single output with the same duration as the longest input. The
20555 music will have quarter the weight as the vocals, and the inputs
20556 are not normalized:
20557
20558 ffmpeg -i VOCALS -i MUSIC -filter_complex amix=inputs=2:duration=longest:dropout_transition=0:weights="1 0.25":normalize=0 OUTPUT
20559
20560 Commands
20561
20562 This filter supports the following commands:
20563
20564 weights
20565 normalize
20566 Syntax is same as option with same name.
20567
20568 amultiply
20569 Multiply first audio stream with second audio stream and store result
20570 in output audio stream. Multiplication is done by multiplying each
20571 sample from first stream with sample at same position from second
20572 stream.
20573
20574 With this element-wise multiplication one can create amplitude fades
20575 and amplitude modulations.
20576
20577 anequalizer
20578 High-order parametric multiband equalizer for each channel.
20579
20580 It accepts the following parameters:
20581
20582 params
20583 This option string is in format: "cchn f=cf w=w g=g t=f | ..."
20584 Each equalizer band is separated by '|'.
20585
20586 chn Set channel number to which equalization will be applied. If
20587 input doesn't have that channel the entry is ignored.
20588
20589 f Set central frequency for band. If input doesn't have that
20590 frequency the entry is ignored.
20591
20592 w Set band width in Hertz.
20593
20594 g Set band gain in dB.
20595
20596 t Set filter type for band, optional, can be:
20597
20598 0 Butterworth, this is default.
20599
20600 1 Chebyshev type 1.
20601
20602 2 Chebyshev type 2.
20603
20604 curves
20605 With this option activated frequency response of anequalizer is
20606 displayed in video stream.
20607
20608 size
20609 Set video stream size. Only useful if curves option is activated.
20610
20611 mgain
20612 Set max gain that will be displayed. Only useful if curves option
20613 is activated. Setting this to a reasonable value makes it possible
20614 to display gain which is derived from neighbour bands which are too
20615 close to each other and thus produce higher gain when both are
20616 activated.
20617
20618 fscale
20619 Set frequency scale used to draw frequency response in video
20620 output. Can be linear or logarithmic. Default is logarithmic.
20621
20622 colors
20623 Set color for each channel curve which is going to be displayed in
20624 video stream. This is list of color names separated by space or by
20625 '|'. Unrecognised or missing colors will be replaced by white
20626 color.
20627
20628 Examples
20629
20630 • Lower gain by 10 of central frequency 200Hz and width 100 Hz for
20631 first 2 channels using Chebyshev type 1 filter:
20632
20633 anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
20634
20635 Commands
20636
20637 This filter supports the following commands:
20638
20639 change
20640 Alter existing filter parameters. Syntax for the commands is :
20641 "fN|f=freq|w=width|g=gain"
20642
20643 fN is existing filter number, starting from 0, if no such filter is
20644 available error is returned. freq set new frequency parameter.
20645 width set new width parameter in Hertz. gain set new gain
20646 parameter in dB.
20647
20648 Full filter invocation with asendcmd may look like this:
20649 asendcmd=c='4.0 anequalizer change
20650 0|f=200|w=50|g=1',anequalizer=...
20651
20652 anlmdn
20653 Reduce broadband noise in audio samples using Non-Local Means
20654 algorithm.
20655
20656 Each sample is adjusted by looking for other samples with similar
20657 contexts. This context similarity is defined by comparing their
20658 surrounding patches of size p. Patches are searched in an area of r
20659 around the sample.
20660
20661 The filter accepts the following options:
20662
20663 strength, s
20664 Set denoising strength. Allowed range is from 0.00001 to 10000.
20665 Default value is 0.00001.
20666
20667 patch, p
20668 Set patch radius duration. Allowed range is from 1 to 100
20669 milliseconds. Default value is 2 milliseconds.
20670
20671 research, r
20672 Set research radius duration. Allowed range is from 2 to 300
20673 milliseconds. Default value is 6 milliseconds.
20674
20675 output, o
20676 Set the output mode.
20677
20678 It accepts the following values:
20679
20680 i Pass input unchanged.
20681
20682 o Pass noise filtered out.
20683
20684 n Pass only noise.
20685
20686 Default value is o.
20687
20688 smooth, m
20689 Set smooth factor. Default value is 11. Allowed range is from 1 to
20690 1000.
20691
20692 Commands
20693
20694 This filter supports the all above options as commands.
20695
20696 anlmf, anlms
20697 Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first
20698 audio stream using the second audio stream.
20699
20700 This adaptive filter is used to mimic a desired filter by finding the
20701 filter coefficients that relate to producing the least mean square of
20702 the error signal (difference between the desired, 2nd input audio
20703 stream and the actual signal, the 1st input audio stream).
20704
20705 A description of the accepted options follows.
20706
20707 order
20708 Set filter order.
20709
20710 mu Set filter mu.
20711
20712 eps Set the filter eps.
20713
20714 leakage
20715 Set the filter leakage.
20716
20717 out_mode
20718 It accepts the following values:
20719
20720 i Pass the 1st input.
20721
20722 d Pass the 2nd input.
20723
20724 o Pass filtered samples.
20725
20726 n Pass difference between desired and filtered samples.
20727
20728 Default value is o.
20729
20730 Examples
20731
20732 • One of many usages of this filter is noise reduction, input audio
20733 is filtered with same samples that are delayed by fixed amount, one
20734 such example for stereo audio is:
20735
20736 asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
20737
20738 Commands
20739
20740 This filter supports the same commands as options, excluding option
20741 "order".
20742
20743 anull
20744 Pass the audio source unchanged to the output.
20745
20746 apad
20747 Pad the end of an audio stream with silence.
20748
20749 This can be used together with ffmpeg -shortest to extend audio streams
20750 to the same length as the video stream.
20751
20752 A description of the accepted options follows.
20753
20754 packet_size
20755 Set silence packet size. Default value is 4096.
20756
20757 pad_len
20758 Set the number of samples of silence to add to the end. After the
20759 value is reached, the stream is terminated. This option is mutually
20760 exclusive with whole_len.
20761
20762 whole_len
20763 Set the minimum total number of samples in the output audio stream.
20764 If the value is longer than the input audio length, silence is
20765 added to the end, until the value is reached. This option is
20766 mutually exclusive with pad_len.
20767
20768 pad_dur
20769 Specify the duration of samples of silence to add. See the Time
20770 duration section in the ffmpeg-utils(1) manual for the accepted
20771 syntax. Used only if set to non-negative value.
20772
20773 whole_dur
20774 Specify the minimum total duration in the output audio stream. See
20775 the Time duration section in the ffmpeg-utils(1) manual for the
20776 accepted syntax. Used only if set to non-negative value. If the
20777 value is longer than the input audio length, silence is added to
20778 the end, until the value is reached. This option is mutually
20779 exclusive with pad_dur
20780
20781 If neither the pad_len nor the whole_len nor pad_dur nor whole_dur
20782 option is set, the filter will add silence to the end of the input
20783 stream indefinitely.
20784
20785 Note that for ffmpeg 4.4 and earlier a zero pad_dur or whole_dur also
20786 caused the filter to add silence indefinitely.
20787
20788 Examples
20789
20790 • Add 1024 samples of silence to the end of the input:
20791
20792 apad=pad_len=1024
20793
20794 • Make sure the audio output will contain at least 10000 samples, pad
20795 the input with silence if required:
20796
20797 apad=whole_len=10000
20798
20799 • Use ffmpeg to pad the audio input with silence, so that the video
20800 stream will always result the shortest and will be converted until
20801 the end in the output file when using the shortest option:
20802
20803 ffmpeg -i VIDEO -i AUDIO -filter_complex "[1:0]apad" -shortest OUTPUT
20804
20805 aphaser
20806 Add a phasing effect to the input audio.
20807
20808 A phaser filter creates series of peaks and troughs in the frequency
20809 spectrum. The position of the peaks and troughs are modulated so that
20810 they vary over time, creating a sweeping effect.
20811
20812 A description of the accepted parameters follows.
20813
20814 in_gain
20815 Set input gain. Default is 0.4.
20816
20817 out_gain
20818 Set output gain. Default is 0.74
20819
20820 delay
20821 Set delay in milliseconds. Default is 3.0.
20822
20823 decay
20824 Set decay. Default is 0.4.
20825
20826 speed
20827 Set modulation speed in Hz. Default is 0.5.
20828
20829 type
20830 Set modulation type. Default is triangular.
20831
20832 It accepts the following values:
20833
20834 triangular, t
20835 sinusoidal, s
20836
20837 aphaseshift
20838 Apply phase shift to input audio samples.
20839
20840 The filter accepts the following options:
20841
20842 shift
20843 Specify phase shift. Allowed range is from -1.0 to 1.0. Default
20844 value is 0.0.
20845
20846 level
20847 Set output gain applied to final output. Allowed range is from 0.0
20848 to 1.0. Default value is 1.0.
20849
20850 order
20851 Set filter order used for filtering. Allowed range is from 1 to 16.
20852 Default value is 8.
20853
20854 Commands
20855
20856 This filter supports the all above options as commands.
20857
20858 apsyclip
20859 Apply Psychoacoustic clipper to input audio stream.
20860
20861 The filter accepts the following options:
20862
20863 level_in
20864 Set input gain. By default it is 1. Range is [0.015625 - 64].
20865
20866 level_out
20867 Set output gain. By default it is 1. Range is [0.015625 - 64].
20868
20869 clip
20870 Set the clipping start value. Default value is 0dBFS or 1.
20871
20872 diff
20873 Output only difference samples, useful to hear introduced
20874 distortions. By default is disabled.
20875
20876 adaptive
20877 Set strength of adaptive distortion applied. Default value is 0.5.
20878 Allowed range is from 0 to 1.
20879
20880 iterations
20881 Set number of iterations of psychoacoustic clipper. Allowed range
20882 is from 1 to 20. Default value is 10.
20883
20884 level
20885 Auto level output signal. Default is disabled. This normalizes
20886 audio back to 0dBFS if enabled.
20887
20888 Commands
20889
20890 This filter supports the all above options as commands.
20891
20892 apulsator
20893 Audio pulsator is something between an autopanner and a tremolo. But
20894 it can produce funny stereo effects as well. Pulsator changes the
20895 volume of the left and right channel based on a LFO (low frequency
20896 oscillator) with different waveforms and shifted phases. This filter
20897 have the ability to define an offset between left and right channel. An
20898 offset of 0 means that both LFO shapes match each other. The left and
20899 right channel are altered equally - a conventional tremolo. An offset
20900 of 50% means that the shape of the right channel is exactly shifted in
20901 phase (or moved backwards about half of the frequency) - pulsator acts
20902 as an autopanner. At 1 both curves match again. Every setting in
20903 between moves the phase shift gapless between all stages and produces
20904 some "bypassing" sounds with sine and triangle waveforms. The more you
20905 set the offset near 1 (starting from the 0.5) the faster the signal
20906 passes from the left to the right speaker.
20907
20908 The filter accepts the following options:
20909
20910 level_in
20911 Set input gain. By default it is 1. Range is [0.015625 - 64].
20912
20913 level_out
20914 Set output gain. By default it is 1. Range is [0.015625 - 64].
20915
20916 mode
20917 Set waveform shape the LFO will use. Can be one of: sine, triangle,
20918 square, sawup or sawdown. Default is sine.
20919
20920 amount
20921 Set modulation. Define how much of original signal is affected by
20922 the LFO.
20923
20924 offset_l
20925 Set left channel offset. Default is 0. Allowed range is [0 - 1].
20926
20927 offset_r
20928 Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
20929
20930 width
20931 Set pulse width. Default is 1. Allowed range is [0 - 2].
20932
20933 timing
20934 Set possible timing mode. Can be one of: bpm, ms or hz. Default is
20935 hz.
20936
20937 bpm Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if
20938 timing is set to bpm.
20939
20940 ms Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if
20941 timing is set to ms.
20942
20943 hz Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100].
20944 Only used if timing is set to hz.
20945
20946 aresample
20947 Resample the input audio to the specified parameters, using the
20948 libswresample library. If none are specified then the filter will
20949 automatically convert between its input and output.
20950
20951 This filter is also able to stretch/squeeze the audio data to make it
20952 match the timestamps or to inject silence / cut out audio to make it
20953 match the timestamps, do a combination of both or do neither.
20954
20955 The filter accepts the syntax [sample_rate:]resampler_options, where
20956 sample_rate expresses a sample rate and resampler_options is a list of
20957 key=value pairs, separated by ":". See the "Resampler Options" section
20958 in the ffmpeg-resampler(1) manual for the complete list of supported
20959 options.
20960
20961 Examples
20962
20963 • Resample the input audio to 44100Hz:
20964
20965 aresample=44100
20966
20967 • Stretch/squeeze samples to the given timestamps, with a maximum of
20968 1000 samples per second compensation:
20969
20970 aresample=async=1000
20971
20972 areverse
20973 Reverse an audio clip.
20974
20975 Warning: This filter requires memory to buffer the entire clip, so
20976 trimming is suggested.
20977
20978 Examples
20979
20980 • Take the first 5 seconds of a clip, and reverse it.
20981
20982 atrim=end=5,areverse
20983
20984 arnndn
20985 Reduce noise from speech using Recurrent Neural Networks.
20986
20987 This filter accepts the following options:
20988
20989 model, m
20990 Set train model file to load. This option is always required.
20991
20992 mix Set how much to mix filtered samples into final output. Allowed
20993 range is from -1 to 1. Default value is 1. Negative values are
20994 special, they set how much to keep filtered noise in the final
20995 filter output. Set this option to -1 to hear actual noise removed
20996 from input signal.
20997
20998 Commands
20999
21000 This filter supports the all above options as commands.
21001
21002 asdr
21003 Measure Audio Signal-to-Distortion Ratio.
21004
21005 This filter takes two audio streams for input, and outputs first audio
21006 stream. Results are in dB per channel at end of either input.
21007
21008 asetnsamples
21009 Set the number of samples per each output audio frame.
21010
21011 The last output packet may contain a different number of samples, as
21012 the filter will flush all the remaining samples when the input audio
21013 signals its end.
21014
21015 The filter accepts the following options:
21016
21017 nb_out_samples, n
21018 Set the number of frames per each output audio frame. The number is
21019 intended as the number of samples per each channel. Default value
21020 is 1024.
21021
21022 pad, p
21023 If set to 1, the filter will pad the last audio frame with zeroes,
21024 so that the last frame will contain the same number of samples as
21025 the previous ones. Default value is 1.
21026
21027 For example, to set the number of per-frame samples to 1234 and disable
21028 padding for the last frame, use:
21029
21030 asetnsamples=n=1234:p=0
21031
21032 asetrate
21033 Set the sample rate without altering the PCM data. This will result in
21034 a change of speed and pitch.
21035
21036 The filter accepts the following options:
21037
21038 sample_rate, r
21039 Set the output sample rate. Default is 44100 Hz.
21040
21041 ashowinfo
21042 Show a line containing various information for each input audio frame.
21043 The input audio is not modified.
21044
21045 The shown line contains a sequence of key/value pairs of the form
21046 key:value.
21047
21048 The following values are shown in the output:
21049
21050 n The (sequential) number of the input frame, starting from 0.
21051
21052 pts The presentation timestamp of the input frame, in time base units;
21053 the time base depends on the filter input pad, and is usually
21054 1/sample_rate.
21055
21056 pts_time
21057 The presentation timestamp of the input frame in seconds.
21058
21059 pos position of the frame in the input stream, -1 if this information
21060 in unavailable and/or meaningless (for example in case of synthetic
21061 audio)
21062
21063 fmt The sample format.
21064
21065 chlayout
21066 The channel layout.
21067
21068 rate
21069 The sample rate for the audio frame.
21070
21071 nb_samples
21072 The number of samples (per channel) in the frame.
21073
21074 checksum
21075 The Adler-32 checksum (printed in hexadecimal) of the audio data.
21076 For planar audio, the data is treated as if all the planes were
21077 concatenated.
21078
21079 plane_checksums
21080 A list of Adler-32 checksums for each data plane.
21081
21082 asoftclip
21083 Apply audio soft clipping.
21084
21085 Soft clipping is a type of distortion effect where the amplitude of a
21086 signal is saturated along a smooth curve, rather than the abrupt shape
21087 of hard-clipping.
21088
21089 This filter accepts the following options:
21090
21091 type
21092 Set type of soft-clipping.
21093
21094 It accepts the following values:
21095
21096 hard
21097 tanh
21098 atan
21099 cubic
21100 exp
21101 alg
21102 quintic
21103 sin
21104 erf
21105 threshold
21106 Set threshold from where to start clipping. Default value is 0dB or
21107 1.
21108
21109 output
21110 Set gain applied to output. Default value is 0dB or 1.
21111
21112 param
21113 Set additional parameter which controls sigmoid function.
21114
21115 oversample
21116 Set oversampling factor.
21117
21118 Commands
21119
21120 This filter supports the all above options as commands.
21121
21122 aspectralstats
21123 Display frequency domain statistical information about the audio
21124 channels. Statistics are calculated and stored as metadata for each
21125 audio channel and for each audio frame.
21126
21127 It accepts the following option:
21128
21129 win_size
21130 Set the window length in samples. Default value is 2048. Allowed
21131 range is from 32 to 65536.
21132
21133 win_func
21134 Set window function.
21135
21136 It accepts the following values:
21137
21138 rect
21139 bartlett
21140 hann, hanning
21141 hamming
21142 blackman
21143 welch
21144 flattop
21145 bharris
21146 bnuttall
21147 bhann
21148 sine
21149 nuttall
21150 lanczos
21151 gauss
21152 tukey
21153 dolph
21154 cauchy
21155 parzen
21156 poisson
21157 bohman
21158 kaiser
21159
21160 Default is "hann".
21161
21162 overlap
21163 Set window overlap. Allowed range is from 0 to 1. Default value is
21164 0.5.
21165
21166 measure
21167 Select the parameters which are measured. The metadata keys can be
21168 used as flags, default is all which measures everything. none
21169 disables all measurement.
21170
21171 A list of each metadata key follows:
21172
21173 mean
21174 variance
21175 centroid
21176 spread
21177 skewness
21178 kurtosis
21179 entropy
21180 flatness
21181 crest
21182 flux
21183 slope
21184 decrease
21185 rolloff
21186
21187 asr
21188 Automatic Speech Recognition
21189
21190 This filter uses PocketSphinx for speech recognition. To enable
21191 compilation of this filter, you need to configure FFmpeg with
21192 "--enable-pocketsphinx".
21193
21194 It accepts the following options:
21195
21196 rate
21197 Set sampling rate of input audio. Defaults is 16000. This need to
21198 match speech models, otherwise one will get poor results.
21199
21200 hmm Set dictionary containing acoustic model files.
21201
21202 dict
21203 Set pronunciation dictionary.
21204
21205 lm Set language model file.
21206
21207 lmctl
21208 Set language model set.
21209
21210 lmname
21211 Set which language model to use.
21212
21213 logfn
21214 Set output for log messages.
21215
21216 The filter exports recognized speech as the frame metadata
21217 "lavfi.asr.text".
21218
21219 astats
21220 Display time domain statistical information about the audio channels.
21221 Statistics are calculated and displayed for each audio channel and,
21222 where applicable, an overall figure is also given.
21223
21224 It accepts the following option:
21225
21226 length
21227 Short window length in seconds, used for peak and trough RMS
21228 measurement. Default is 0.05 (50 milliseconds). Allowed range is
21229 "[0 - 10]".
21230
21231 metadata
21232 Set metadata injection. All the metadata keys are prefixed with
21233 "lavfi.astats.X", where "X" is channel number starting from 1 or
21234 string "Overall". Default is disabled.
21235
21236 Available keys for each channel are: Bit_depth Crest_factor
21237 DC_offset Dynamic_range Entropy Flat_factor Max_difference
21238 Max_level Mean_difference Min_difference Min_level Noise_floor
21239 Noise_floor_count Number_of_Infs Number_of_NaNs Number_of_denormals
21240 Peak_count Peak_level RMS_difference RMS_peak RMS_trough
21241 Zero_crossings Zero_crossings_rate
21242
21243 and for "Overall": Bit_depth DC_offset Entropy Flat_factor
21244 Max_difference Max_level Mean_difference Min_difference Min_level
21245 Noise_floor Noise_floor_count Number_of_Infs Number_of_NaNs
21246 Number_of_denormals Number_of_samples Peak_count Peak_level
21247 RMS_difference RMS_level RMS_peak RMS_trough
21248
21249 For example, a full key looks like "lavfi.astats.1.DC_offset" or
21250 "lavfi.astats.Overall.Peak_count".
21251
21252 Read below for the description of the keys.
21253
21254 reset
21255 Set the number of frames over which cumulative stats are calculated
21256 before being reset. Default is disabled.
21257
21258 measure_perchannel
21259 Select the parameters which are measured per channel. The metadata
21260 keys can be used as flags, default is all which measures
21261 everything. none disables all per channel measurement.
21262
21263 measure_overall
21264 Select the parameters which are measured overall. The metadata keys
21265 can be used as flags, default is all which measures everything.
21266 none disables all overall measurement.
21267
21268 A description of the measure keys follow:
21269
21270 none
21271 no measures
21272
21273 all all measures
21274
21275 Bit_depth
21276 overall bit depth of audio, i.e. number of bits used for each
21277 sample
21278
21279 Crest_factor
21280 standard ratio of peak to RMS level (note: not in dB)
21281
21282 DC_offset
21283 mean amplitude displacement from zero
21284
21285 Dynamic_range
21286 measured dynamic range of audio in dB
21287
21288 Entropy
21289 entropy measured across whole audio, entropy of value near 1.0 is
21290 typically measured for white noise
21291
21292 Flat_factor
21293 flatness (i.e. consecutive samples with the same value) of the
21294 signal at its peak levels (i.e. either Min_level or Max_level)
21295
21296 Max_difference
21297 maximal difference between two consecutive samples
21298
21299 Max_level
21300 maximal sample level
21301
21302 Mean_difference
21303 mean difference between two consecutive samples, i.e. the average
21304 of each difference between two consecutive samples
21305
21306 Min_difference
21307 minimal difference between two consecutive samples
21308
21309 Min_level
21310 minimal sample level
21311
21312 Noise_floor
21313 minimum local peak measured in dBFS over a short window
21314
21315 Noise_floor_count
21316 number of occasions (not the number of samples) that the signal
21317 attained Noise floor
21318
21319 Number_of_Infs
21320 number of samples with an infinite value
21321
21322 Number_of_NaNs
21323 number of samples with a NaN (not a number) value
21324
21325 Number_of_denormals
21326 number of samples with a subnormal value
21327
21328 Number_of_samples
21329 number of samples
21330
21331 Peak_count
21332 number of occasions (not the number of samples) that the signal
21333 attained either Min_level or Max_level
21334
21335 Peak_level
21336 standard peak level measured in dBFS
21337
21338 RMS_difference
21339 Root Mean Square difference between two consecutive samples
21340
21341 RMS_level
21342 standard RMS level measured in dBFS
21343
21344 RMS_peak
21345 RMS_trough
21346 peak and trough values for RMS level measured over a short window,
21347 measured in dBFS.
21348
21349 Zero crossings
21350 number of points where the waveform crosses the zero level axis
21351
21352 Zero crossings rate
21353 rate of Zero crossings and number of audio samples
21354
21355 asubboost
21356 Boost subwoofer frequencies.
21357
21358 The filter accepts the following options:
21359
21360 dry Set dry gain, how much of original signal is kept. Allowed range is
21361 from 0 to 1. Default value is 1.0.
21362
21363 wet Set wet gain, how much of filtered signal is kept. Allowed range is
21364 from 0 to 1. Default value is 1.0.
21365
21366 boost
21367 Set max boost factor. Allowed range is from 1 to 12. Default value
21368 is 2.
21369
21370 decay
21371 Set delay line decay gain value. Allowed range is from 0 to 1.
21372 Default value is 0.0.
21373
21374 feedback
21375 Set delay line feedback gain value. Allowed range is from 0 to 1.
21376 Default value is 0.9.
21377
21378 cutoff
21379 Set cutoff frequency in Hertz. Allowed range is 50 to 900. Default
21380 value is 100.
21381
21382 slope
21383 Set slope amount for cutoff frequency. Allowed range is 0.0001 to
21384 1. Default value is 0.5.
21385
21386 delay
21387 Set delay. Allowed range is from 1 to 100. Default value is 20.
21388
21389 channels
21390 Set the channels to process. Default value is all available.
21391
21392 Commands
21393
21394 This filter supports the all above options as commands.
21395
21396 asubcut
21397 Cut subwoofer frequencies.
21398
21399 This filter allows to set custom, steeper roll off than highpass
21400 filter, and thus is able to more attenuate frequency content in stop-
21401 band.
21402
21403 The filter accepts the following options:
21404
21405 cutoff
21406 Set cutoff frequency in Hertz. Allowed range is 2 to 200. Default
21407 value is 20.
21408
21409 order
21410 Set filter order. Available values are from 3 to 20. Default value
21411 is 10.
21412
21413 level
21414 Set input gain level. Allowed range is from 0 to 1. Default value
21415 is 1.
21416
21417 Commands
21418
21419 This filter supports the all above options as commands.
21420
21421 asupercut
21422 Cut super frequencies.
21423
21424 The filter accepts the following options:
21425
21426 cutoff
21427 Set cutoff frequency in Hertz. Allowed range is 20000 to 192000.
21428 Default value is 20000.
21429
21430 order
21431 Set filter order. Available values are from 3 to 20. Default value
21432 is 10.
21433
21434 level
21435 Set input gain level. Allowed range is from 0 to 1. Default value
21436 is 1.
21437
21438 Commands
21439
21440 This filter supports the all above options as commands.
21441
21442 asuperpass
21443 Apply high order Butterworth band-pass filter.
21444
21445 The filter accepts the following options:
21446
21447 centerf
21448 Set center frequency in Hertz. Allowed range is 2 to 999999.
21449 Default value is 1000.
21450
21451 order
21452 Set filter order. Available values are from 4 to 20. Default value
21453 is 4.
21454
21455 qfactor
21456 Set Q-factor. Allowed range is from 0.01 to 100. Default value is
21457 1.
21458
21459 level
21460 Set input gain level. Allowed range is from 0 to 2. Default value
21461 is 1.
21462
21463 Commands
21464
21465 This filter supports the all above options as commands.
21466
21467 asuperstop
21468 Apply high order Butterworth band-stop filter.
21469
21470 The filter accepts the following options:
21471
21472 centerf
21473 Set center frequency in Hertz. Allowed range is 2 to 999999.
21474 Default value is 1000.
21475
21476 order
21477 Set filter order. Available values are from 4 to 20. Default value
21478 is 4.
21479
21480 qfactor
21481 Set Q-factor. Allowed range is from 0.01 to 100. Default value is
21482 1.
21483
21484 level
21485 Set input gain level. Allowed range is from 0 to 2. Default value
21486 is 1.
21487
21488 Commands
21489
21490 This filter supports the all above options as commands.
21491
21492 atempo
21493 Adjust audio tempo.
21494
21495 The filter accepts exactly one parameter, the audio tempo. If not
21496 specified then the filter will assume nominal 1.0 tempo. Tempo must be
21497 in the [0.5, 100.0] range.
21498
21499 Note that tempo greater than 2 will skip some samples rather than blend
21500 them in. If for any reason this is a concern it is always possible to
21501 daisy-chain several instances of atempo to achieve the desired product
21502 tempo.
21503
21504 Examples
21505
21506 • Slow down audio to 80% tempo:
21507
21508 atempo=0.8
21509
21510 • To speed up audio to 300% tempo:
21511
21512 atempo=3
21513
21514 • To speed up audio to 300% tempo by daisy-chaining two atempo
21515 instances:
21516
21517 atempo=sqrt(3),atempo=sqrt(3)
21518
21519 Commands
21520
21521 This filter supports the following commands:
21522
21523 tempo
21524 Change filter tempo scale factor. Syntax for the command is :
21525 "tempo"
21526
21527 atilt
21528 Apply spectral tilt filter to audio stream.
21529
21530 This filter apply any spectral roll-off slope over any specified
21531 frequency band.
21532
21533 The filter accepts the following options:
21534
21535 freq
21536 Set central frequency of tilt in Hz. Default is 10000 Hz.
21537
21538 slope
21539 Set slope direction of tilt. Default is 0. Allowed range is from -1
21540 to 1.
21541
21542 width
21543 Set width of tilt. Default is 1000. Allowed range is from 100 to
21544 10000.
21545
21546 order
21547 Set order of tilt filter.
21548
21549 level
21550 Set input volume level. Allowed range is from 0 to 4. Defalt is 1.
21551
21552 Commands
21553
21554 This filter supports the all above options as commands.
21555
21556 atrim
21557 Trim the input so that the output contains one continuous subpart of
21558 the input.
21559
21560 It accepts the following parameters:
21561
21562 start
21563 Timestamp (in seconds) of the start of the section to keep. I.e.
21564 the audio sample with the timestamp start will be the first sample
21565 in the output.
21566
21567 end Specify time of the first audio sample that will be dropped, i.e.
21568 the audio sample immediately preceding the one with the timestamp
21569 end will be the last sample in the output.
21570
21571 start_pts
21572 Same as start, except this option sets the start timestamp in
21573 samples instead of seconds.
21574
21575 end_pts
21576 Same as end, except this option sets the end timestamp in samples
21577 instead of seconds.
21578
21579 duration
21580 The maximum duration of the output in seconds.
21581
21582 start_sample
21583 The number of the first sample that should be output.
21584
21585 end_sample
21586 The number of the first sample that should be dropped.
21587
21588 start, end, and duration are expressed as time duration specifications;
21589 see the Time duration section in the ffmpeg-utils(1) manual.
21590
21591 Note that the first two sets of the start/end options and the duration
21592 option look at the frame timestamp, while the _sample options simply
21593 count the samples that pass through the filter. So start/end_pts and
21594 start/end_sample will give different results when the timestamps are
21595 wrong, inexact or do not start at zero. Also note that this filter does
21596 not modify the timestamps. If you wish to have the output timestamps
21597 start at zero, insert the asetpts filter after the atrim filter.
21598
21599 If multiple start or end options are set, this filter tries to be
21600 greedy and keep all samples that match at least one of the specified
21601 constraints. To keep only the part that matches all the constraints at
21602 once, chain multiple atrim filters.
21603
21604 The defaults are such that all the input is kept. So it is possible to
21605 set e.g. just the end values to keep everything before the specified
21606 time.
21607
21608 Examples:
21609
21610 • Drop everything except the second minute of input:
21611
21612 ffmpeg -i INPUT -af atrim=60:120
21613
21614 • Keep only the first 1000 samples:
21615
21616 ffmpeg -i INPUT -af atrim=end_sample=1000
21617
21618 axcorrelate
21619 Calculate normalized windowed cross-correlation between two input audio
21620 streams.
21621
21622 Resulted samples are always between -1 and 1 inclusive. If result is 1
21623 it means two input samples are highly correlated in that selected
21624 segment. Result 0 means they are not correlated at all. If result is
21625 -1 it means two input samples are out of phase, which means they cancel
21626 each other.
21627
21628 The filter accepts the following options:
21629
21630 size
21631 Set size of segment over which cross-correlation is calculated.
21632 Default is 256. Allowed range is from 2 to 131072.
21633
21634 algo
21635 Set algorithm for cross-correlation. Can be "slow" or "fast".
21636 Default is "slow". Fast algorithm assumes mean values over any
21637 given segment are always zero and thus need much less calculations
21638 to make. This is generally not true, but is valid for typical
21639 audio streams.
21640
21641 Examples
21642
21643 • Calculate correlation between channels in stereo audio stream:
21644
21645 ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
21646
21647 bandpass
21648 Apply a two-pole Butterworth band-pass filter with central frequency
21649 frequency, and (3dB-point) band-width width. The csg option selects a
21650 constant skirt gain (peak gain = Q) instead of the default: constant
21651 0dB peak gain. The filter roll off at 6dB per octave (20dB per
21652 decade).
21653
21654 The filter accepts the following options:
21655
21656 frequency, f
21657 Set the filter's central frequency. Default is 3000.
21658
21659 csg Constant skirt gain if set to 1. Defaults to 0.
21660
21661 width_type, t
21662 Set method to specify band-width of filter.
21663
21664 h Hz
21665
21666 q Q-Factor
21667
21668 o octave
21669
21670 s slope
21671
21672 k kHz
21673
21674 width, w
21675 Specify the band-width of a filter in width_type units.
21676
21677 mix, m
21678 How much to use filtered signal in output. Default is 1. Range is
21679 between 0 and 1.
21680
21681 channels, c
21682 Specify which channels to filter, by default all available are
21683 filtered.
21684
21685 normalize, n
21686 Normalize biquad coefficients, by default is disabled. Enabling it
21687 will normalize magnitude response at DC to 0dB.
21688
21689 transform, a
21690 Set transform type of IIR filter.
21691
21692 di
21693 dii
21694 tdi
21695 tdii
21696 latt
21697 svf
21698 zdf
21699 precision, r
21700 Set precison of filtering.
21701
21702 auto
21703 Pick automatic sample format depending on surround filters.
21704
21705 s16 Always use signed 16-bit.
21706
21707 s32 Always use signed 32-bit.
21708
21709 f32 Always use float 32-bit.
21710
21711 f64 Always use float 64-bit.
21712
21713 block_size, b
21714 Set block size used for reverse IIR processing. If this value is
21715 set to high enough value (higher than impulse response length
21716 truncated when reaches near zero values) filtering will become
21717 linear phase otherwise if not big enough it will just produce nasty
21718 artifacts.
21719
21720 Note that filter delay will be exactly this many samples when set
21721 to non-zero value.
21722
21723 Commands
21724
21725 This filter supports the following commands:
21726
21727 frequency, f
21728 Change bandpass frequency. Syntax for the command is : "frequency"
21729
21730 width_type, t
21731 Change bandpass width_type. Syntax for the command is :
21732 "width_type"
21733
21734 width, w
21735 Change bandpass width. Syntax for the command is : "width"
21736
21737 mix, m
21738 Change bandpass mix. Syntax for the command is : "mix"
21739
21740 bandreject
21741 Apply a two-pole Butterworth band-reject filter with central frequency
21742 frequency, and (3dB-point) band-width width. The filter roll off at
21743 6dB per octave (20dB per decade).
21744
21745 The filter accepts the following options:
21746
21747 frequency, f
21748 Set the filter's central frequency. Default is 3000.
21749
21750 width_type, t
21751 Set method to specify band-width of filter.
21752
21753 h Hz
21754
21755 q Q-Factor
21756
21757 o octave
21758
21759 s slope
21760
21761 k kHz
21762
21763 width, w
21764 Specify the band-width of a filter in width_type units.
21765
21766 mix, m
21767 How much to use filtered signal in output. Default is 1. Range is
21768 between 0 and 1.
21769
21770 channels, c
21771 Specify which channels to filter, by default all available are
21772 filtered.
21773
21774 normalize, n
21775 Normalize biquad coefficients, by default is disabled. Enabling it
21776 will normalize magnitude response at DC to 0dB.
21777
21778 transform, a
21779 Set transform type of IIR filter.
21780
21781 di
21782 dii
21783 tdi
21784 tdii
21785 latt
21786 svf
21787 zdf
21788 precision, r
21789 Set precison of filtering.
21790
21791 auto
21792 Pick automatic sample format depending on surround filters.
21793
21794 s16 Always use signed 16-bit.
21795
21796 s32 Always use signed 32-bit.
21797
21798 f32 Always use float 32-bit.
21799
21800 f64 Always use float 64-bit.
21801
21802 block_size, b
21803 Set block size used for reverse IIR processing. If this value is
21804 set to high enough value (higher than impulse response length
21805 truncated when reaches near zero values) filtering will become
21806 linear phase otherwise if not big enough it will just produce nasty
21807 artifacts.
21808
21809 Note that filter delay will be exactly this many samples when set
21810 to non-zero value.
21811
21812 Commands
21813
21814 This filter supports the following commands:
21815
21816 frequency, f
21817 Change bandreject frequency. Syntax for the command is :
21818 "frequency"
21819
21820 width_type, t
21821 Change bandreject width_type. Syntax for the command is :
21822 "width_type"
21823
21824 width, w
21825 Change bandreject width. Syntax for the command is : "width"
21826
21827 mix, m
21828 Change bandreject mix. Syntax for the command is : "mix"
21829
21830 bass, lowshelf
21831 Boost or cut the bass (lower) frequencies of the audio using a two-pole
21832 shelving filter with a response similar to that of a standard hi-fi's
21833 tone-controls. This is also known as shelving equalisation (EQ).
21834
21835 The filter accepts the following options:
21836
21837 gain, g
21838 Give the gain at 0 Hz. Its useful range is about -20 (for a large
21839 cut) to +20 (for a large boost). Beware of clipping when using a
21840 positive gain.
21841
21842 frequency, f
21843 Set the filter's central frequency and so can be used to extend or
21844 reduce the frequency range to be boosted or cut. The default value
21845 is 100 Hz.
21846
21847 width_type, t
21848 Set method to specify band-width of filter.
21849
21850 h Hz
21851
21852 q Q-Factor
21853
21854 o octave
21855
21856 s slope
21857
21858 k kHz
21859
21860 width, w
21861 Determine how steep is the filter's shelf transition.
21862
21863 poles, p
21864 Set number of poles. Default is 2.
21865
21866 mix, m
21867 How much to use filtered signal in output. Default is 1. Range is
21868 between 0 and 1.
21869
21870 channels, c
21871 Specify which channels to filter, by default all available are
21872 filtered.
21873
21874 normalize, n
21875 Normalize biquad coefficients, by default is disabled. Enabling it
21876 will normalize magnitude response at DC to 0dB.
21877
21878 transform, a
21879 Set transform type of IIR filter.
21880
21881 di
21882 dii
21883 tdi
21884 tdii
21885 latt
21886 svf
21887 zdf
21888 precision, r
21889 Set precison of filtering.
21890
21891 auto
21892 Pick automatic sample format depending on surround filters.
21893
21894 s16 Always use signed 16-bit.
21895
21896 s32 Always use signed 32-bit.
21897
21898 f32 Always use float 32-bit.
21899
21900 f64 Always use float 64-bit.
21901
21902 block_size, b
21903 Set block size used for reverse IIR processing. If this value is
21904 set to high enough value (higher than impulse response length
21905 truncated when reaches near zero values) filtering will become
21906 linear phase otherwise if not big enough it will just produce nasty
21907 artifacts.
21908
21909 Note that filter delay will be exactly this many samples when set
21910 to non-zero value.
21911
21912 Commands
21913
21914 This filter supports the following commands:
21915
21916 frequency, f
21917 Change bass frequency. Syntax for the command is : "frequency"
21918
21919 width_type, t
21920 Change bass width_type. Syntax for the command is : "width_type"
21921
21922 width, w
21923 Change bass width. Syntax for the command is : "width"
21924
21925 gain, g
21926 Change bass gain. Syntax for the command is : "gain"
21927
21928 mix, m
21929 Change bass mix. Syntax for the command is : "mix"
21930
21931 biquad
21932 Apply a biquad IIR filter with the given coefficients. Where b0, b1,
21933 b2 and a0, a1, a2 are the numerator and denominator coefficients
21934 respectively. and channels, c specify which channels to filter, by
21935 default all available are filtered.
21936
21937 Commands
21938
21939 This filter supports the following commands:
21940
21941 a0
21942 a1
21943 a2
21944 b0
21945 b1
21946 b2 Change biquad parameter. Syntax for the command is : "value"
21947
21948 mix, m
21949 How much to use filtered signal in output. Default is 1. Range is
21950 between 0 and 1.
21951
21952 channels, c
21953 Specify which channels to filter, by default all available are
21954 filtered.
21955
21956 normalize, n
21957 Normalize biquad coefficients, by default is disabled. Enabling it
21958 will normalize magnitude response at DC to 0dB.
21959
21960 transform, a
21961 Set transform type of IIR filter.
21962
21963 di
21964 dii
21965 tdi
21966 tdii
21967 latt
21968 svf
21969 zdf
21970 precision, r
21971 Set precison of filtering.
21972
21973 auto
21974 Pick automatic sample format depending on surround filters.
21975
21976 s16 Always use signed 16-bit.
21977
21978 s32 Always use signed 32-bit.
21979
21980 f32 Always use float 32-bit.
21981
21982 f64 Always use float 64-bit.
21983
21984 block_size, b
21985 Set block size used for reverse IIR processing. If this value is
21986 set to high enough value (higher than impulse response length
21987 truncated when reaches near zero values) filtering will become
21988 linear phase otherwise if not big enough it will just produce nasty
21989 artifacts.
21990
21991 Note that filter delay will be exactly this many samples when set
21992 to non-zero value.
21993
21994 bs2b
21995 Bauer stereo to binaural transformation, which improves headphone
21996 listening of stereo audio records.
21997
21998 To enable compilation of this filter you need to configure FFmpeg with
21999 "--enable-libbs2b".
22000
22001 It accepts the following parameters:
22002
22003 profile
22004 Pre-defined crossfeed level.
22005
22006 default
22007 Default level (fcut=700, feed=50).
22008
22009 cmoy
22010 Chu Moy circuit (fcut=700, feed=60).
22011
22012 jmeier
22013 Jan Meier circuit (fcut=650, feed=95).
22014
22015 fcut
22016 Cut frequency (in Hz).
22017
22018 feed
22019 Feed level (in Hz).
22020
22021 channelmap
22022 Remap input channels to new locations.
22023
22024 It accepts the following parameters:
22025
22026 map Map channels from input to output. The argument is a '|'-separated
22027 list of mappings, each in the "in_channel-out_channel" or
22028 in_channel form. in_channel can be either the name of the input
22029 channel (e.g. FL for front left) or its index in the input channel
22030 layout. out_channel is the name of the output channel or its index
22031 in the output channel layout. If out_channel is not given then it
22032 is implicitly an index, starting with zero and increasing by one
22033 for each mapping.
22034
22035 channel_layout
22036 The channel layout of the output stream.
22037
22038 If no mapping is present, the filter will implicitly map input channels
22039 to output channels, preserving indices.
22040
22041 Examples
22042
22043 • For example, assuming a 5.1+downmix input MOV file,
22044
22045 ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
22046
22047 will create an output WAV file tagged as stereo from the downmix
22048 channels of the input.
22049
22050 • To fix a 5.1 WAV improperly encoded in AAC's native channel order
22051
22052 ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
22053
22054 channelsplit
22055 Split each channel from an input audio stream into a separate output
22056 stream.
22057
22058 It accepts the following parameters:
22059
22060 channel_layout
22061 The channel layout of the input stream. The default is "stereo".
22062
22063 channels
22064 A channel layout describing the channels to be extracted as
22065 separate output streams or "all" to extract each input channel as a
22066 separate stream. The default is "all".
22067
22068 Choosing channels not present in channel layout in the input will
22069 result in an error.
22070
22071 Examples
22072
22073 • For example, assuming a stereo input MP3 file,
22074
22075 ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
22076
22077 will create an output Matroska file with two audio streams, one
22078 containing only the left channel and the other the right channel.
22079
22080 • Split a 5.1 WAV file into per-channel files:
22081
22082 ffmpeg -i in.wav -filter_complex
22083 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
22084 -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
22085 front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
22086 side_right.wav
22087
22088 • Extract only LFE from a 5.1 WAV file:
22089
22090 ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
22091 -map '[LFE]' lfe.wav
22092
22093 chorus
22094 Add a chorus effect to the audio.
22095
22096 Can make a single vocal sound like a chorus, but can also be applied to
22097 instrumentation.
22098
22099 Chorus resembles an echo effect with a short delay, but whereas with
22100 echo the delay is constant, with chorus, it is varied using using
22101 sinusoidal or triangular modulation. The modulation depth defines the
22102 range the modulated delay is played before or after the delay. Hence
22103 the delayed sound will sound slower or faster, that is the delayed
22104 sound tuned around the original one, like in a chorus where some vocals
22105 are slightly off key.
22106
22107 It accepts the following parameters:
22108
22109 in_gain
22110 Set input gain. Default is 0.4.
22111
22112 out_gain
22113 Set output gain. Default is 0.4.
22114
22115 delays
22116 Set delays. A typical delay is around 40ms to 60ms.
22117
22118 decays
22119 Set decays.
22120
22121 speeds
22122 Set speeds.
22123
22124 depths
22125 Set depths.
22126
22127 Examples
22128
22129 • A single delay:
22130
22131 chorus=0.7:0.9:55:0.4:0.25:2
22132
22133 • Two delays:
22134
22135 chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
22136
22137 • Fuller sounding chorus with three delays:
22138
22139 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
22140
22141 compand
22142 Compress or expand the audio's dynamic range.
22143
22144 It accepts the following parameters:
22145
22146 attacks
22147 decays
22148 A list of times in seconds for each channel over which the
22149 instantaneous level of the input signal is averaged to determine
22150 its volume. attacks refers to increase of volume and decays refers
22151 to decrease of volume. For most situations, the attack time
22152 (response to the audio getting louder) should be shorter than the
22153 decay time, because the human ear is more sensitive to sudden loud
22154 audio than sudden soft audio. A typical value for attack is 0.3
22155 seconds and a typical value for decay is 0.8 seconds. If specified
22156 number of attacks & decays is lower than number of channels, the
22157 last set attack/decay will be used for all remaining channels.
22158
22159 points
22160 A list of points for the transfer function, specified in dB
22161 relative to the maximum possible signal amplitude. Each key points
22162 list must be defined using the following syntax:
22163 "x0/y0|x1/y1|x2/y2|...." or "x0/y0 x1/y1 x2/y2 ...."
22164
22165 The input values must be in strictly increasing order but the
22166 transfer function does not have to be monotonically rising. The
22167 point "0/0" is assumed but may be overridden (by "0/out-dBn").
22168 Typical values for the transfer function are "-70/-70|-60/-20|1/0".
22169
22170 soft-knee
22171 Set the curve radius in dB for all joints. It defaults to 0.01.
22172
22173 gain
22174 Set the additional gain in dB to be applied at all points on the
22175 transfer function. This allows for easy adjustment of the overall
22176 gain. It defaults to 0.
22177
22178 volume
22179 Set an initial volume, in dB, to be assumed for each channel when
22180 filtering starts. This permits the user to supply a nominal level
22181 initially, so that, for example, a very large gain is not applied
22182 to initial signal levels before the companding has begun to
22183 operate. A typical value for audio which is initially quiet is -90
22184 dB. It defaults to 0.
22185
22186 delay
22187 Set a delay, in seconds. The input audio is analyzed immediately,
22188 but audio is delayed before being fed to the volume adjuster.
22189 Specifying a delay approximately equal to the attack/decay times
22190 allows the filter to effectively operate in predictive rather than
22191 reactive mode. It defaults to 0.
22192
22193 Examples
22194
22195 • Make music with both quiet and loud passages suitable for listening
22196 to in a noisy environment:
22197
22198 compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
22199
22200 Another example for audio with whisper and explosion parts:
22201
22202 compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
22203
22204 • A noise gate for when the noise is at a lower level than the
22205 signal:
22206
22207 compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
22208
22209 • Here is another noise gate, this time for when the noise is at a
22210 higher level than the signal (making it, in some ways, similar to
22211 squelch):
22212
22213 compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
22214
22215 • 2:1 compression starting at -6dB:
22216
22217 compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
22218
22219 • 2:1 compression starting at -9dB:
22220
22221 compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
22222
22223 • 2:1 compression starting at -12dB:
22224
22225 compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
22226
22227 • 2:1 compression starting at -18dB:
22228
22229 compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
22230
22231 • 3:1 compression starting at -15dB:
22232
22233 compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
22234
22235 • Compressor/Gate:
22236
22237 compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
22238
22239 • Expander:
22240
22241 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
22242
22243 • Hard limiter at -6dB:
22244
22245 compand=attacks=0:points=-80/-80|-6/-6|20/-6
22246
22247 • Hard limiter at -12dB:
22248
22249 compand=attacks=0:points=-80/-80|-12/-12|20/-12
22250
22251 • Hard noise gate at -35 dB:
22252
22253 compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
22254
22255 • Soft limiter:
22256
22257 compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
22258
22259 compensationdelay
22260 Compensation Delay Line is a metric based delay to compensate differing
22261 positions of microphones or speakers.
22262
22263 For example, you have recorded guitar with two microphones placed in
22264 different locations. Because the front of sound wave has fixed speed in
22265 normal conditions, the phasing of microphones can vary and depends on
22266 their location and interposition. The best sound mix can be achieved
22267 when these microphones are in phase (synchronized). Note that a
22268 distance of ~30 cm between microphones makes one microphone capture the
22269 signal in antiphase to the other microphone. That makes the final mix
22270 sound moody. This filter helps to solve phasing problems by adding
22271 different delays to each microphone track and make them synchronized.
22272
22273 The best result can be reached when you take one track as base and
22274 synchronize other tracks one by one with it. Remember that
22275 synchronization/delay tolerance depends on sample rate, too. Higher
22276 sample rates will give more tolerance.
22277
22278 The filter accepts the following parameters:
22279
22280 mm Set millimeters distance. This is compensation distance for fine
22281 tuning. Default is 0.
22282
22283 cm Set cm distance. This is compensation distance for tightening
22284 distance setup. Default is 0.
22285
22286 m Set meters distance. This is compensation distance for hard
22287 distance setup. Default is 0.
22288
22289 dry Set dry amount. Amount of unprocessed (dry) signal. Default is 0.
22290
22291 wet Set wet amount. Amount of processed (wet) signal. Default is 1.
22292
22293 temp
22294 Set temperature in degrees Celsius. This is the temperature of the
22295 environment. Default is 20.
22296
22297 Commands
22298
22299 This filter supports the all above options as commands.
22300
22301 crossfeed
22302 Apply headphone crossfeed filter.
22303
22304 Crossfeed is the process of blending the left and right channels of
22305 stereo audio recording. It is mainly used to reduce extreme stereo
22306 separation of low frequencies.
22307
22308 The intent is to produce more speaker like sound to the listener.
22309
22310 The filter accepts the following options:
22311
22312 strength
22313 Set strength of crossfeed. Default is 0.2. Allowed range is from 0
22314 to 1. This sets gain of low shelf filter for side part of stereo
22315 image. Default is -6dB. Max allowed is -30db when strength is set
22316 to 1.
22317
22318 range
22319 Set soundstage wideness. Default is 0.5. Allowed range is from 0 to
22320 1. This sets cut off frequency of low shelf filter. Default is cut
22321 off near 1550 Hz. With range set to 1 cut off frequency is set to
22322 2100 Hz.
22323
22324 slope
22325 Set curve slope of low shelf filter. Default is 0.5. Allowed range
22326 is from 0.01 to 1.
22327
22328 level_in
22329 Set input gain. Default is 0.9.
22330
22331 level_out
22332 Set output gain. Default is 1.
22333
22334 block_size
22335 Set block size used for reverse IIR processing. If this value is
22336 set to high enough value (higher than impulse response length
22337 truncated when reaches near zero values) filtering will become
22338 linear phase otherwise if not big enough it will just produce nasty
22339 artifacts.
22340
22341 Note that filter delay will be exactly this many samples when set
22342 to non-zero value.
22343
22344 Commands
22345
22346 This filter supports the all above options as commands.
22347
22348 crystalizer
22349 Simple algorithm for audio noise sharpening.
22350
22351 This filter linearly increases differences betweeen each audio sample.
22352
22353 The filter accepts the following options:
22354
22355 i Sets the intensity of effect (default: 2.0). Must be in range
22356 between -10.0 to 0 (unchanged sound) to 10.0 (maximum effect). To
22357 inverse filtering use negative value.
22358
22359 c Enable clipping. By default is enabled.
22360
22361 Commands
22362
22363 This filter supports the all above options as commands.
22364
22365 dcshift
22366 Apply a DC shift to the audio.
22367
22368 This can be useful to remove a DC offset (caused perhaps by a hardware
22369 problem in the recording chain) from the audio. The effect of a DC
22370 offset is reduced headroom and hence volume. The astats filter can be
22371 used to determine if a signal has a DC offset.
22372
22373 shift
22374 Set the DC shift, allowed range is [-1, 1]. It indicates the amount
22375 to shift the audio.
22376
22377 limitergain
22378 Optional. It should have a value much less than 1 (e.g. 0.05 or
22379 0.02) and is used to prevent clipping.
22380
22381 deesser
22382 Apply de-essing to the audio samples.
22383
22384 i Set intensity for triggering de-essing. Allowed range is from 0 to
22385 1. Default is 0.
22386
22387 m Set amount of ducking on treble part of sound. Allowed range is
22388 from 0 to 1. Default is 0.5.
22389
22390 f How much of original frequency content to keep when de-essing.
22391 Allowed range is from 0 to 1. Default is 0.5.
22392
22393 s Set the output mode.
22394
22395 It accepts the following values:
22396
22397 i Pass input unchanged.
22398
22399 o Pass ess filtered out.
22400
22401 e Pass only ess.
22402
22403 Default value is o.
22404
22405 dialoguenhance
22406 Enhance dialogue in stereo audio.
22407
22408 This filter accepts stereo input and produce surround (3.0) channels
22409 output. The newly produced front center channel have enhanced speech
22410 dialogue originally available in both stereo channels. This filter
22411 outputs front left and front right channels same as available in stereo
22412 input.
22413
22414 The filter accepts the following options:
22415
22416 original
22417 Set the original center factor to keep in front center channel
22418 output. Allowed range is from 0 to 1. Default value is 1.
22419
22420 enhance
22421 Set the dialogue enhance factor to put in front center channel
22422 output. Allowed range is from 0 to 3. Default value is 1.
22423
22424 voice
22425 Set the voice detection factor. Allowed range is from 2 to 32.
22426 Default value is 2.
22427
22428 Commands
22429
22430 This filter supports the all above options as commands.
22431
22432 drmeter
22433 Measure audio dynamic range.
22434
22435 DR values of 14 and higher is found in very dynamic material. DR of 8
22436 to 13 is found in transition material. And anything less that 8 have
22437 very poor dynamics and is very compressed.
22438
22439 The filter accepts the following options:
22440
22441 length
22442 Set window length in seconds used to split audio into segments of
22443 equal length. Default is 3 seconds.
22444
22445 dynaudnorm
22446 Dynamic Audio Normalizer.
22447
22448 This filter applies a certain amount of gain to the input audio in
22449 order to bring its peak magnitude to a target level (e.g. 0 dBFS).
22450 However, in contrast to more "simple" normalization algorithms, the
22451 Dynamic Audio Normalizer *dynamically* re-adjusts the gain factor to
22452 the input audio. This allows for applying extra gain to the "quiet"
22453 sections of the audio while avoiding distortions or clipping the "loud"
22454 sections. In other words: The Dynamic Audio Normalizer will "even out"
22455 the volume of quiet and loud sections, in the sense that the volume of
22456 each section is brought to the same target level. Note, however, that
22457 the Dynamic Audio Normalizer achieves this goal *without* applying
22458 "dynamic range compressing". It will retain 100% of the dynamic range
22459 *within* each section of the audio file.
22460
22461 framelen, f
22462 Set the frame length in milliseconds. In range from 10 to 8000
22463 milliseconds. Default is 500 milliseconds. The Dynamic Audio
22464 Normalizer processes the input audio in small chunks, referred to
22465 as frames. This is required, because a peak magnitude has no
22466 meaning for just a single sample value. Instead, we need to
22467 determine the peak magnitude for a contiguous sequence of sample
22468 values. While a "standard" normalizer would simply use the peak
22469 magnitude of the complete file, the Dynamic Audio Normalizer
22470 determines the peak magnitude individually for each frame. The
22471 length of a frame is specified in milliseconds. By default, the
22472 Dynamic Audio Normalizer uses a frame length of 500 milliseconds,
22473 which has been found to give good results with most files. Note
22474 that the exact frame length, in number of samples, will be
22475 determined automatically, based on the sampling rate of the
22476 individual input audio file.
22477
22478 gausssize, g
22479 Set the Gaussian filter window size. In range from 3 to 301, must
22480 be odd number. Default is 31. Probably the most important
22481 parameter of the Dynamic Audio Normalizer is the "window size" of
22482 the Gaussian smoothing filter. The filter's window size is
22483 specified in frames, centered around the current frame. For the
22484 sake of simplicity, this must be an odd number. Consequently, the
22485 default value of 31 takes into account the current frame, as well
22486 as the 15 preceding frames and the 15 subsequent frames. Using a
22487 larger window results in a stronger smoothing effect and thus in
22488 less gain variation, i.e. slower gain adaptation. Conversely, using
22489 a smaller window results in a weaker smoothing effect and thus in
22490 more gain variation, i.e. faster gain adaptation. In other words,
22491 the more you increase this value, the more the Dynamic Audio
22492 Normalizer will behave like a "traditional" normalization filter.
22493 On the contrary, the more you decrease this value, the more the
22494 Dynamic Audio Normalizer will behave like a dynamic range
22495 compressor.
22496
22497 peak, p
22498 Set the target peak value. This specifies the highest permissible
22499 magnitude level for the normalized audio input. This filter will
22500 try to approach the target peak magnitude as closely as possible,
22501 but at the same time it also makes sure that the normalized signal
22502 will never exceed the peak magnitude. A frame's maximum local gain
22503 factor is imposed directly by the target peak magnitude. The
22504 default value is 0.95 and thus leaves a headroom of 5%*. It is not
22505 recommended to go above this value.
22506
22507 maxgain, m
22508 Set the maximum gain factor. In range from 1.0 to 100.0. Default is
22509 10.0. The Dynamic Audio Normalizer determines the maximum possible
22510 (local) gain factor for each input frame, i.e. the maximum gain
22511 factor that does not result in clipping or distortion. The maximum
22512 gain factor is determined by the frame's highest magnitude sample.
22513 However, the Dynamic Audio Normalizer additionally bounds the
22514 frame's maximum gain factor by a predetermined (global) maximum
22515 gain factor. This is done in order to avoid excessive gain factors
22516 in "silent" or almost silent frames. By default, the maximum gain
22517 factor is 10.0, For most inputs the default value should be
22518 sufficient and it usually is not recommended to increase this
22519 value. Though, for input with an extremely low overall volume
22520 level, it may be necessary to allow even higher gain factors. Note,
22521 however, that the Dynamic Audio Normalizer does not simply apply a
22522 "hard" threshold (i.e. cut off values above the threshold).
22523 Instead, a "sigmoid" threshold function will be applied. This way,
22524 the gain factors will smoothly approach the threshold value, but
22525 never exceed that value.
22526
22527 targetrms, r
22528 Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 -
22529 disabled. By default, the Dynamic Audio Normalizer performs "peak"
22530 normalization. This means that the maximum local gain factor for
22531 each frame is defined (only) by the frame's highest magnitude
22532 sample. This way, the samples can be amplified as much as possible
22533 without exceeding the maximum signal level, i.e. without clipping.
22534 Optionally, however, the Dynamic Audio Normalizer can also take
22535 into account the frame's root mean square, abbreviated RMS. In
22536 electrical engineering, the RMS is commonly used to determine the
22537 power of a time-varying signal. It is therefore considered that the
22538 RMS is a better approximation of the "perceived loudness" than just
22539 looking at the signal's peak magnitude. Consequently, by adjusting
22540 all frames to a constant RMS value, a uniform "perceived loudness"
22541 can be established. If a target RMS value has been specified, a
22542 frame's local gain factor is defined as the factor that would
22543 result in exactly that RMS value. Note, however, that the maximum
22544 local gain factor is still restricted by the frame's highest
22545 magnitude sample, in order to prevent clipping.
22546
22547 coupling, n
22548 Enable channels coupling. By default is enabled. By default, the
22549 Dynamic Audio Normalizer will amplify all channels by the same
22550 amount. This means the same gain factor will be applied to all
22551 channels, i.e. the maximum possible gain factor is determined by
22552 the "loudest" channel. However, in some recordings, it may happen
22553 that the volume of the different channels is uneven, e.g. one
22554 channel may be "quieter" than the other one(s). In this case, this
22555 option can be used to disable the channel coupling. This way, the
22556 gain factor will be determined independently for each channel,
22557 depending only on the individual channel's highest magnitude
22558 sample. This allows for harmonizing the volume of the different
22559 channels.
22560
22561 correctdc, c
22562 Enable DC bias correction. By default is disabled. An audio signal
22563 (in the time domain) is a sequence of sample values. In the
22564 Dynamic Audio Normalizer these sample values are represented in the
22565 -1.0 to 1.0 range, regardless of the original input format.
22566 Normally, the audio signal, or "waveform", should be centered
22567 around the zero point. That means if we calculate the mean value
22568 of all samples in a file, or in a single frame, then the result
22569 should be 0.0 or at least very close to that value. If, however,
22570 there is a significant deviation of the mean value from 0.0, in
22571 either positive or negative direction, this is referred to as a DC
22572 bias or DC offset. Since a DC bias is clearly undesirable, the
22573 Dynamic Audio Normalizer provides optional DC bias correction.
22574 With DC bias correction enabled, the Dynamic Audio Normalizer will
22575 determine the mean value, or "DC correction" offset, of each input
22576 frame and subtract that value from all of the frame's sample values
22577 which ensures those samples are centered around 0.0 again. Also, in
22578 order to avoid "gaps" at the frame boundaries, the DC correction
22579 offset values will be interpolated smoothly between neighbouring
22580 frames.
22581
22582 altboundary, b
22583 Enable alternative boundary mode. By default is disabled. The
22584 Dynamic Audio Normalizer takes into account a certain neighbourhood
22585 around each frame. This includes the preceding frames as well as
22586 the subsequent frames. However, for the "boundary" frames, located
22587 at the very beginning and at the very end of the audio file, not
22588 all neighbouring frames are available. In particular, for the first
22589 few frames in the audio file, the preceding frames are not known.
22590 And, similarly, for the last few frames in the audio file, the
22591 subsequent frames are not known. Thus, the question arises which
22592 gain factors should be assumed for the missing frames in the
22593 "boundary" region. The Dynamic Audio Normalizer implements two
22594 modes to deal with this situation. The default boundary mode
22595 assumes a gain factor of exactly 1.0 for the missing frames,
22596 resulting in a smooth "fade in" and "fade out" at the beginning and
22597 at the end of the input, respectively.
22598
22599 compress, s
22600 Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
22601 By default, the Dynamic Audio Normalizer does not apply
22602 "traditional" compression. This means that signal peaks will not be
22603 pruned and thus the full dynamic range will be retained within each
22604 local neighbourhood. However, in some cases it may be desirable to
22605 combine the Dynamic Audio Normalizer's normalization algorithm with
22606 a more "traditional" compression. For this purpose, the Dynamic
22607 Audio Normalizer provides an optional compression (thresholding)
22608 function. If (and only if) the compression feature is enabled, all
22609 input frames will be processed by a soft knee thresholding function
22610 prior to the actual normalization process. Put simply, the
22611 thresholding function is going to prune all samples whose magnitude
22612 exceeds a certain threshold value. However, the Dynamic Audio
22613 Normalizer does not simply apply a fixed threshold value. Instead,
22614 the threshold value will be adjusted for each individual frame. In
22615 general, smaller parameters result in stronger compression, and
22616 vice versa. Values below 3.0 are not recommended, because audible
22617 distortion may appear.
22618
22619 threshold, t
22620 Set the target threshold value. This specifies the lowest
22621 permissible magnitude level for the audio input which will be
22622 normalized. If input frame volume is above this value frame will
22623 be normalized. Otherwise frame may not be normalized at all. The
22624 default value is set to 0, which means all input frames will be
22625 normalized. This option is mostly useful if digital noise is not
22626 wanted to be amplified.
22627
22628 channels, h
22629 Specify which channels to filter, by default all available channels
22630 are filtered.
22631
22632 overlap, o
22633 Specify overlap for frames. If set to 0 (default) no frame
22634 overlapping is done. Using >0 and <1 values will make less
22635 conservative gain adjustments, like when framelen option is set to
22636 smaller value, if framelen option value is compensated for non-zero
22637 overlap then gain adjustments will be smoother across time compared
22638 to zero overlap case.
22639
22640 curve, v
22641 Specify the peak mapping curve expression which is going to be used
22642 when calculating gain applied to frames. The max output frame gain
22643 will still be limited by other options mentioned previously for
22644 this filter.
22645
22646 The expression can contain the following constants:
22647
22648 ch current channel number
22649
22650 sn current sample number
22651
22652 nb_channels
22653 number of channels
22654
22655 t timestamp expressed in seconds
22656
22657 sr sample rate
22658
22659 p current frame peak value
22660
22661 Commands
22662
22663 This filter supports the all above options as commands.
22664
22665 earwax
22666 Make audio easier to listen to on headphones.
22667
22668 This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio
22669 so that when listened to on headphones the stereo image is moved from
22670 inside your head (standard for headphones) to outside and in front of
22671 the listener (standard for speakers).
22672
22673 Ported from SoX.
22674
22675 equalizer
22676 Apply a two-pole peaking equalisation (EQ) filter. With this filter,
22677 the signal-level at and around a selected frequency can be increased or
22678 decreased, whilst (unlike bandpass and bandreject filters) that at all
22679 other frequencies is unchanged.
22680
22681 In order to produce complex equalisation curves, this filter can be
22682 given several times, each with a different central frequency.
22683
22684 The filter accepts the following options:
22685
22686 frequency, f
22687 Set the filter's central frequency in Hz.
22688
22689 width_type, t
22690 Set method to specify band-width of filter.
22691
22692 h Hz
22693
22694 q Q-Factor
22695
22696 o octave
22697
22698 s slope
22699
22700 k kHz
22701
22702 width, w
22703 Specify the band-width of a filter in width_type units.
22704
22705 gain, g
22706 Set the required gain or attenuation in dB. Beware of clipping
22707 when using a positive gain.
22708
22709 mix, m
22710 How much to use filtered signal in output. Default is 1. Range is
22711 between 0 and 1.
22712
22713 channels, c
22714 Specify which channels to filter, by default all available are
22715 filtered.
22716
22717 normalize, n
22718 Normalize biquad coefficients, by default is disabled. Enabling it
22719 will normalize magnitude response at DC to 0dB.
22720
22721 transform, a
22722 Set transform type of IIR filter.
22723
22724 di
22725 dii
22726 tdi
22727 tdii
22728 latt
22729 svf
22730 zdf
22731 precision, r
22732 Set precison of filtering.
22733
22734 auto
22735 Pick automatic sample format depending on surround filters.
22736
22737 s16 Always use signed 16-bit.
22738
22739 s32 Always use signed 32-bit.
22740
22741 f32 Always use float 32-bit.
22742
22743 f64 Always use float 64-bit.
22744
22745 block_size, b
22746 Set block size used for reverse IIR processing. If this value is
22747 set to high enough value (higher than impulse response length
22748 truncated when reaches near zero values) filtering will become
22749 linear phase otherwise if not big enough it will just produce nasty
22750 artifacts.
22751
22752 Note that filter delay will be exactly this many samples when set
22753 to non-zero value.
22754
22755 Examples
22756
22757 • Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
22758
22759 equalizer=f=1000:t=h:width=200:g=-10
22760
22761 • Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz
22762 with Q 2:
22763
22764 equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
22765
22766 Commands
22767
22768 This filter supports the following commands:
22769
22770 frequency, f
22771 Change equalizer frequency. Syntax for the command is :
22772 "frequency"
22773
22774 width_type, t
22775 Change equalizer width_type. Syntax for the command is :
22776 "width_type"
22777
22778 width, w
22779 Change equalizer width. Syntax for the command is : "width"
22780
22781 gain, g
22782 Change equalizer gain. Syntax for the command is : "gain"
22783
22784 mix, m
22785 Change equalizer mix. Syntax for the command is : "mix"
22786
22787 extrastereo
22788 Linearly increases the difference between left and right channels which
22789 adds some sort of "live" effect to playback.
22790
22791 The filter accepts the following options:
22792
22793 m Sets the difference coefficient (default: 2.5). 0.0 means mono
22794 sound (average of both channels), with 1.0 sound will be unchanged,
22795 with -1.0 left and right channels will be swapped.
22796
22797 c Enable clipping. By default is enabled.
22798
22799 Commands
22800
22801 This filter supports the all above options as commands.
22802
22803 firequalizer
22804 Apply FIR Equalization using arbitrary frequency response.
22805
22806 The filter accepts the following option:
22807
22808 gain
22809 Set gain curve equation (in dB). The expression can contain
22810 variables:
22811
22812 f the evaluated frequency
22813
22814 sr sample rate
22815
22816 ch channel number, set to 0 when multichannels evaluation is
22817 disabled
22818
22819 chid
22820 channel id, see libavutil/channel_layout.h, set to the first
22821 channel id when multichannels evaluation is disabled
22822
22823 chs number of channels
22824
22825 chlayout
22826 channel_layout, see libavutil/channel_layout.h
22827
22828 and functions:
22829
22830 gain_interpolate(f)
22831 interpolate gain on frequency f based on gain_entry
22832
22833 cubic_interpolate(f)
22834 same as gain_interpolate, but smoother
22835
22836 This option is also available as command. Default is
22837 gain_interpolate(f).
22838
22839 gain_entry
22840 Set gain entry for gain_interpolate function. The expression can
22841 contain functions:
22842
22843 entry(f, g)
22844 store gain entry at frequency f with value g
22845
22846 This option is also available as command.
22847
22848 delay
22849 Set filter delay in seconds. Higher value means more accurate.
22850 Default is 0.01.
22851
22852 accuracy
22853 Set filter accuracy in Hz. Lower value means more accurate.
22854 Default is 5.
22855
22856 wfunc
22857 Set window function. Acceptable values are:
22858
22859 rectangular
22860 rectangular window, useful when gain curve is already smooth
22861
22862 hann
22863 hann window (default)
22864
22865 hamming
22866 hamming window
22867
22868 blackman
22869 blackman window
22870
22871 nuttall3
22872 3-terms continuous 1st derivative nuttall window
22873
22874 mnuttall3
22875 minimum 3-terms discontinuous nuttall window
22876
22877 nuttall
22878 4-terms continuous 1st derivative nuttall window
22879
22880 bnuttall
22881 minimum 4-terms discontinuous nuttall (blackman-nuttall) window
22882
22883 bharris
22884 blackman-harris window
22885
22886 tukey
22887 tukey window
22888
22889 fixed
22890 If enabled, use fixed number of audio samples. This improves speed
22891 when filtering with large delay. Default is disabled.
22892
22893 multi
22894 Enable multichannels evaluation on gain. Default is disabled.
22895
22896 zero_phase
22897 Enable zero phase mode by subtracting timestamp to compensate
22898 delay. Default is disabled.
22899
22900 scale
22901 Set scale used by gain. Acceptable values are:
22902
22903 linlin
22904 linear frequency, linear gain
22905
22906 linlog
22907 linear frequency, logarithmic (in dB) gain (default)
22908
22909 loglin
22910 logarithmic (in octave scale where 20 Hz is 0) frequency,
22911 linear gain
22912
22913 loglog
22914 logarithmic frequency, logarithmic gain
22915
22916 dumpfile
22917 Set file for dumping, suitable for gnuplot.
22918
22919 dumpscale
22920 Set scale for dumpfile. Acceptable values are same with scale
22921 option. Default is linlog.
22922
22923 fft2
22924 Enable 2-channel convolution using complex FFT. This improves speed
22925 significantly. Default is disabled.
22926
22927 min_phase
22928 Enable minimum phase impulse response. Default is disabled.
22929
22930 Examples
22931
22932 • lowpass at 1000 Hz:
22933
22934 firequalizer=gain='if(lt(f,1000), 0, -INF)'
22935
22936 • lowpass at 1000 Hz with gain_entry:
22937
22938 firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
22939
22940 • custom equalization:
22941
22942 firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
22943
22944 • higher delay with zero phase to compensate delay:
22945
22946 firequalizer=delay=0.1:fixed=on:zero_phase=on
22947
22948 • lowpass on left channel, highpass on right channel:
22949
22950 firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
22951 :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
22952
22953 flanger
22954 Apply a flanging effect to the audio.
22955
22956 The filter accepts the following options:
22957
22958 delay
22959 Set base delay in milliseconds. Range from 0 to 30. Default value
22960 is 0.
22961
22962 depth
22963 Set added sweep delay in milliseconds. Range from 0 to 10. Default
22964 value is 2.
22965
22966 regen
22967 Set percentage regeneration (delayed signal feedback). Range from
22968 -95 to 95. Default value is 0.
22969
22970 width
22971 Set percentage of delayed signal mixed with original. Range from 0
22972 to 100. Default value is 71.
22973
22974 speed
22975 Set sweeps per second (Hz). Range from 0.1 to 10. Default value is
22976 0.5.
22977
22978 shape
22979 Set swept wave shape, can be triangular or sinusoidal. Default
22980 value is sinusoidal.
22981
22982 phase
22983 Set swept wave percentage-shift for multi channel. Range from 0 to
22984 100. Default value is 25.
22985
22986 interp
22987 Set delay-line interpolation, linear or quadratic. Default is
22988 linear.
22989
22990 haas
22991 Apply Haas effect to audio.
22992
22993 Note that this makes most sense to apply on mono signals. With this
22994 filter applied to mono signals it give some directionality and
22995 stretches its stereo image.
22996
22997 The filter accepts the following options:
22998
22999 level_in
23000 Set input level. By default is 1, or 0dB
23001
23002 level_out
23003 Set output level. By default is 1, or 0dB.
23004
23005 side_gain
23006 Set gain applied to side part of signal. By default is 1.
23007
23008 middle_source
23009 Set kind of middle source. Can be one of the following:
23010
23011 left
23012 Pick left channel.
23013
23014 right
23015 Pick right channel.
23016
23017 mid Pick middle part signal of stereo image.
23018
23019 side
23020 Pick side part signal of stereo image.
23021
23022 middle_phase
23023 Change middle phase. By default is disabled.
23024
23025 left_delay
23026 Set left channel delay. By default is 2.05 milliseconds.
23027
23028 left_balance
23029 Set left channel balance. By default is -1.
23030
23031 left_gain
23032 Set left channel gain. By default is 1.
23033
23034 left_phase
23035 Change left phase. By default is disabled.
23036
23037 right_delay
23038 Set right channel delay. By defaults is 2.12 milliseconds.
23039
23040 right_balance
23041 Set right channel balance. By default is 1.
23042
23043 right_gain
23044 Set right channel gain. By default is 1.
23045
23046 right_phase
23047 Change right phase. By default is enabled.
23048
23049 hdcd
23050 Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM
23051 stream with embedded HDCD codes is expanded into a 20-bit PCM stream.
23052
23053 The filter supports the Peak Extend and Low-level Gain Adjustment
23054 features of HDCD, and detects the Transient Filter flag.
23055
23056 ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
23057
23058 When using the filter with wav, note the default encoding for wav is
23059 16-bit, so the resulting 20-bit stream will be truncated back to
23060 16-bit. Use something like -acodec pcm_s24le after the filter to get
23061 24-bit PCM output.
23062
23063 ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
23064 ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
23065
23066 The filter accepts the following options:
23067
23068 disable_autoconvert
23069 Disable any automatic format conversion or resampling in the filter
23070 graph.
23071
23072 process_stereo
23073 Process the stereo channels together. If target_gain does not match
23074 between channels, consider it invalid and use the last valid
23075 target_gain.
23076
23077 cdt_ms
23078 Set the code detect timer period in ms.
23079
23080 force_pe
23081 Always extend peaks above -3dBFS even if PE isn't signaled.
23082
23083 analyze_mode
23084 Replace audio with a solid tone and adjust the amplitude to signal
23085 some specific aspect of the decoding process. The output file can
23086 be loaded in an audio editor alongside the original to aid
23087 analysis.
23088
23089 "analyze_mode=pe:force_pe=true" can be used to see all samples
23090 above the PE level.
23091
23092 Modes are:
23093
23094 0, off
23095 Disabled
23096
23097 1, lle
23098 Gain adjustment level at each sample
23099
23100 2, pe
23101 Samples where peak extend occurs
23102
23103 3, cdt
23104 Samples where the code detect timer is active
23105
23106 4, tgm
23107 Samples where the target gain does not match between channels
23108
23109 headphone
23110 Apply head-related transfer functions (HRTFs) to create virtual
23111 loudspeakers around the user for binaural listening via headphones.
23112 The HRIRs are provided via additional streams, for each channel one
23113 stereo input stream is needed.
23114
23115 The filter accepts the following options:
23116
23117 map Set mapping of input streams for convolution. The argument is a
23118 '|'-separated list of channel names in order as they are given as
23119 additional stream inputs for filter. This also specify number of
23120 input streams. Number of input streams must be not less than number
23121 of channels in first stream plus one.
23122
23123 gain
23124 Set gain applied to audio. Value is in dB. Default is 0.
23125
23126 type
23127 Set processing type. Can be time or freq. time is processing audio
23128 in time domain which is slow. freq is processing audio in
23129 frequency domain which is fast. Default is freq.
23130
23131 lfe Set custom gain for LFE channels. Value is in dB. Default is 0.
23132
23133 size
23134 Set size of frame in number of samples which will be processed at
23135 once. Default value is 1024. Allowed range is from 1024 to 96000.
23136
23137 hrir
23138 Set format of hrir stream. Default value is stereo. Alternative
23139 value is multich. If value is set to stereo, number of additional
23140 streams should be greater or equal to number of input channels in
23141 first input stream. Also each additional stream should have stereo
23142 number of channels. If value is set to multich, number of
23143 additional streams should be exactly one. Also number of input
23144 channels of additional stream should be equal or greater than twice
23145 number of channels of first input stream.
23146
23147 Examples
23148
23149 • Full example using wav files as coefficients with amovie filters
23150 for 7.1 downmix, each amovie filter use stereo file with IR
23151 coefficients as input. The files give coefficients for each
23152 position of virtual loudspeaker:
23153
23154 ffmpeg -i input.wav
23155 -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"
23156 output.wav
23157
23158 • Full example using wav files as coefficients with amovie filters
23159 for 7.1 downmix, but now in multich hrir format.
23160
23161 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"
23162 output.wav
23163
23164 highpass
23165 Apply a high-pass filter with 3dB point frequency. The filter can be
23166 either single-pole, or double-pole (the default). The filter roll off
23167 at 6dB per pole per octave (20dB per pole per decade).
23168
23169 The filter accepts the following options:
23170
23171 frequency, f
23172 Set frequency in Hz. Default is 3000.
23173
23174 poles, p
23175 Set number of poles. Default is 2.
23176
23177 width_type, t
23178 Set method to specify band-width of filter.
23179
23180 h Hz
23181
23182 q Q-Factor
23183
23184 o octave
23185
23186 s slope
23187
23188 k kHz
23189
23190 width, w
23191 Specify the band-width of a filter in width_type units. Applies
23192 only to double-pole filter. The default is 0.707q and gives a
23193 Butterworth response.
23194
23195 mix, m
23196 How much to use filtered signal in output. Default is 1. Range is
23197 between 0 and 1.
23198
23199 channels, c
23200 Specify which channels to filter, by default all available are
23201 filtered.
23202
23203 normalize, n
23204 Normalize biquad coefficients, by default is disabled. Enabling it
23205 will normalize magnitude response at DC to 0dB.
23206
23207 transform, a
23208 Set transform type of IIR filter.
23209
23210 di
23211 dii
23212 tdi
23213 tdii
23214 latt
23215 svf
23216 zdf
23217 precision, r
23218 Set precison of filtering.
23219
23220 auto
23221 Pick automatic sample format depending on surround filters.
23222
23223 s16 Always use signed 16-bit.
23224
23225 s32 Always use signed 32-bit.
23226
23227 f32 Always use float 32-bit.
23228
23229 f64 Always use float 64-bit.
23230
23231 block_size, b
23232 Set block size used for reverse IIR processing. If this value is
23233 set to high enough value (higher than impulse response length
23234 truncated when reaches near zero values) filtering will become
23235 linear phase otherwise if not big enough it will just produce nasty
23236 artifacts.
23237
23238 Note that filter delay will be exactly this many samples when set
23239 to non-zero value.
23240
23241 Commands
23242
23243 This filter supports the following commands:
23244
23245 frequency, f
23246 Change highpass frequency. Syntax for the command is : "frequency"
23247
23248 width_type, t
23249 Change highpass width_type. Syntax for the command is :
23250 "width_type"
23251
23252 width, w
23253 Change highpass width. Syntax for the command is : "width"
23254
23255 mix, m
23256 Change highpass mix. Syntax for the command is : "mix"
23257
23258 join
23259 Join multiple input streams into one multi-channel stream.
23260
23261 It accepts the following parameters:
23262
23263 inputs
23264 The number of input streams. It defaults to 2.
23265
23266 channel_layout
23267 The desired output channel layout. It defaults to stereo.
23268
23269 map Map channels from inputs to output. The argument is a '|'-separated
23270 list of mappings, each in the "input_idx.in_channel-out_channel"
23271 form. input_idx is the 0-based index of the input stream.
23272 in_channel can be either the name of the input channel (e.g. FL for
23273 front left) or its index in the specified input stream. out_channel
23274 is the name of the output channel.
23275
23276 The filter will attempt to guess the mappings when they are not
23277 specified explicitly. It does so by first trying to find an unused
23278 matching input channel and if that fails it picks the first unused
23279 input channel.
23280
23281 Join 3 inputs (with properly set channel layouts):
23282
23283 ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
23284
23285 Build a 5.1 output from 6 single-channel streams:
23286
23287 ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
23288 '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'
23289 out
23290
23291 ladspa
23292 Load a LADSPA (Linux Audio Developer's Simple Plugin API) plugin.
23293
23294 To enable compilation of this filter you need to configure FFmpeg with
23295 "--enable-ladspa".
23296
23297 file, f
23298 Specifies the name of LADSPA plugin library to load. If the
23299 environment variable LADSPA_PATH is defined, the LADSPA plugin is
23300 searched in each one of the directories specified by the colon
23301 separated list in LADSPA_PATH, otherwise in the standard LADSPA
23302 paths, which are in this order: HOME/.ladspa/lib/,
23303 /usr/local/lib/ladspa/, /usr/lib/ladspa/.
23304
23305 plugin, p
23306 Specifies the plugin within the library. Some libraries contain
23307 only one plugin, but others contain many of them. If this is not
23308 set filter will list all available plugins within the specified
23309 library.
23310
23311 controls, c
23312 Set the '|' separated list of controls which are zero or more
23313 floating point values that determine the behavior of the loaded
23314 plugin (for example delay, threshold or gain). Controls need to be
23315 defined using the following syntax:
23316 c0=value0|c1=value1|c2=value2|..., where valuei is the value set on
23317 the i-th control. Alternatively they can be also defined using the
23318 following syntax: value0|value1|value2|..., where valuei is the
23319 value set on the i-th control. If controls is set to "help", all
23320 available controls and their valid ranges are printed.
23321
23322 sample_rate, s
23323 Specify the sample rate, default to 44100. Only used if plugin have
23324 zero inputs.
23325
23326 nb_samples, n
23327 Set the number of samples per channel per each output frame,
23328 default is 1024. Only used if plugin have zero inputs.
23329
23330 duration, d
23331 Set the minimum duration of the sourced audio. See the Time
23332 duration section in the ffmpeg-utils(1) manual for the accepted
23333 syntax. Note that the resulting duration may be greater than the
23334 specified duration, as the generated audio is always cut at the end
23335 of a complete frame. If not specified, or the expressed duration
23336 is negative, the audio is supposed to be generated forever. Only
23337 used if plugin have zero inputs.
23338
23339 latency, l
23340 Enable latency compensation, by default is disabled. Only used if
23341 plugin have inputs.
23342
23343 Examples
23344
23345 • List all available plugins within amp (LADSPA example plugin)
23346 library:
23347
23348 ladspa=file=amp
23349
23350 • List all available controls and their valid ranges for "vcf_notch"
23351 plugin from "VCF" library:
23352
23353 ladspa=f=vcf:p=vcf_notch:c=help
23354
23355 • Simulate low quality audio equipment using "Computer Music Toolkit"
23356 (CMT) plugin library:
23357
23358 ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
23359
23360 • Add reverberation to the audio using TAP-plugins (Tom's Audio
23361 Processing plugins):
23362
23363 ladspa=file=tap_reverb:tap_reverb
23364
23365 • Generate white noise, with 0.2 amplitude:
23366
23367 ladspa=file=cmt:noise_source_white:c=c0=.2
23368
23369 • Generate 20 bpm clicks using plugin "C* Click - Metronome" from the
23370 "C* Audio Plugin Suite" (CAPS) library:
23371
23372 ladspa=file=caps:Click:c=c1=20'
23373
23374 • Apply "C* Eq10X2 - Stereo 10-band equaliser" effect:
23375
23376 ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
23377
23378 • Increase volume by 20dB using fast lookahead limiter from Steve
23379 Harris "SWH Plugins" collection:
23380
23381 ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
23382
23383 • Attenuate low frequencies using Multiband EQ from Steve Harris "SWH
23384 Plugins" collection:
23385
23386 ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
23387
23388 • Reduce stereo image using "Narrower" from the "C* Audio Plugin
23389 Suite" (CAPS) library:
23390
23391 ladspa=caps:Narrower
23392
23393 • Another white noise, now using "C* Audio Plugin Suite" (CAPS)
23394 library:
23395
23396 ladspa=caps:White:.2
23397
23398 • Some fractal noise, using "C* Audio Plugin Suite" (CAPS) library:
23399
23400 ladspa=caps:Fractal:c=c1=1
23401
23402 • Dynamic volume normalization using "VLevel" plugin:
23403
23404 ladspa=vlevel-ladspa:vlevel_mono
23405
23406 Commands
23407
23408 This filter supports the following commands:
23409
23410 cN Modify the N-th control value.
23411
23412 If the specified value is not valid, it is ignored and prior one is
23413 kept.
23414
23415 loudnorm
23416 EBU R128 loudness normalization. Includes both dynamic and linear
23417 normalization modes. Support for both single pass (livestreams, files)
23418 and double pass (files) modes. This algorithm can target IL, LRA, and
23419 maximum true peak. In dynamic mode, to accurately detect true peaks,
23420 the audio stream will be upsampled to 192 kHz. Use the "-ar" option or
23421 "aresample" filter to explicitly set an output sample rate.
23422
23423 The filter accepts the following options:
23424
23425 I, i
23426 Set integrated loudness target. Range is -70.0 - -5.0. Default
23427 value is -24.0.
23428
23429 LRA, lra
23430 Set loudness range target. Range is 1.0 - 50.0. Default value is
23431 7.0.
23432
23433 TP, tp
23434 Set maximum true peak. Range is -9.0 - +0.0. Default value is
23435 -2.0.
23436
23437 measured_I, measured_i
23438 Measured IL of input file. Range is -99.0 - +0.0.
23439
23440 measured_LRA, measured_lra
23441 Measured LRA of input file. Range is 0.0 - 99.0.
23442
23443 measured_TP, measured_tp
23444 Measured true peak of input file. Range is -99.0 - +99.0.
23445
23446 measured_thresh
23447 Measured threshold of input file. Range is -99.0 - +0.0.
23448
23449 offset
23450 Set offset gain. Gain is applied before the true-peak limiter.
23451 Range is -99.0 - +99.0. Default is +0.0.
23452
23453 linear
23454 Normalize by linearly scaling the source audio. "measured_I",
23455 "measured_LRA", "measured_TP", and "measured_thresh" must all be
23456 specified. Target LRA shouldn't be lower than source LRA and the
23457 change in integrated loudness shouldn't result in a true peak which
23458 exceeds the target TP. If any of these conditions aren't met,
23459 normalization mode will revert to dynamic. Options are "true" or
23460 "false". Default is "true".
23461
23462 dual_mono
23463 Treat mono input files as "dual-mono". If a mono file is intended
23464 for playback on a stereo system, its EBU R128 measurement will be
23465 perceptually incorrect. If set to "true", this option will
23466 compensate for this effect. Multi-channel input files are not
23467 affected by this option. Options are true or false. Default is
23468 false.
23469
23470 print_format
23471 Set print format for stats. Options are summary, json, or none.
23472 Default value is none.
23473
23474 lowpass
23475 Apply a low-pass filter with 3dB point frequency. The filter can be
23476 either single-pole or double-pole (the default). The filter roll off
23477 at 6dB per pole per octave (20dB per pole per decade).
23478
23479 The filter accepts the following options:
23480
23481 frequency, f
23482 Set frequency in Hz. Default is 500.
23483
23484 poles, p
23485 Set number of poles. Default is 2.
23486
23487 width_type, t
23488 Set method to specify band-width of filter.
23489
23490 h Hz
23491
23492 q Q-Factor
23493
23494 o octave
23495
23496 s slope
23497
23498 k kHz
23499
23500 width, w
23501 Specify the band-width of a filter in width_type units. Applies
23502 only to double-pole filter. The default is 0.707q and gives a
23503 Butterworth response.
23504
23505 mix, m
23506 How much to use filtered signal in output. Default is 1. Range is
23507 between 0 and 1.
23508
23509 channels, c
23510 Specify which channels to filter, by default all available are
23511 filtered.
23512
23513 normalize, n
23514 Normalize biquad coefficients, by default is disabled. Enabling it
23515 will normalize magnitude response at DC to 0dB.
23516
23517 transform, a
23518 Set transform type of IIR filter.
23519
23520 di
23521 dii
23522 tdi
23523 tdii
23524 latt
23525 svf
23526 zdf
23527 precision, r
23528 Set precison of filtering.
23529
23530 auto
23531 Pick automatic sample format depending on surround filters.
23532
23533 s16 Always use signed 16-bit.
23534
23535 s32 Always use signed 32-bit.
23536
23537 f32 Always use float 32-bit.
23538
23539 f64 Always use float 64-bit.
23540
23541 block_size, b
23542 Set block size used for reverse IIR processing. If this value is
23543 set to high enough value (higher than impulse response length
23544 truncated when reaches near zero values) filtering will become
23545 linear phase otherwise if not big enough it will just produce nasty
23546 artifacts.
23547
23548 Note that filter delay will be exactly this many samples when set
23549 to non-zero value.
23550
23551 Examples
23552
23553 • Lowpass only LFE channel, it LFE is not present it does nothing:
23554
23555 lowpass=c=LFE
23556
23557 Commands
23558
23559 This filter supports the following commands:
23560
23561 frequency, f
23562 Change lowpass frequency. Syntax for the command is : "frequency"
23563
23564 width_type, t
23565 Change lowpass width_type. Syntax for the command is :
23566 "width_type"
23567
23568 width, w
23569 Change lowpass width. Syntax for the command is : "width"
23570
23571 mix, m
23572 Change lowpass mix. Syntax for the command is : "mix"
23573
23574 lv2
23575 Load a LV2 (LADSPA Version 2) plugin.
23576
23577 To enable compilation of this filter you need to configure FFmpeg with
23578 "--enable-lv2".
23579
23580 plugin, p
23581 Specifies the plugin URI. You may need to escape ':'.
23582
23583 controls, c
23584 Set the '|' separated list of controls which are zero or more
23585 floating point values that determine the behavior of the loaded
23586 plugin (for example delay, threshold or gain). If controls is set
23587 to "help", all available controls and their valid ranges are
23588 printed.
23589
23590 sample_rate, s
23591 Specify the sample rate, default to 44100. Only used if plugin have
23592 zero inputs.
23593
23594 nb_samples, n
23595 Set the number of samples per channel per each output frame,
23596 default is 1024. Only used if plugin have zero inputs.
23597
23598 duration, d
23599 Set the minimum duration of the sourced audio. See the Time
23600 duration section in the ffmpeg-utils(1) manual for the accepted
23601 syntax. Note that the resulting duration may be greater than the
23602 specified duration, as the generated audio is always cut at the end
23603 of a complete frame. If not specified, or the expressed duration
23604 is negative, the audio is supposed to be generated forever. Only
23605 used if plugin have zero inputs.
23606
23607 Examples
23608
23609 • Apply bass enhancer plugin from Calf:
23610
23611 lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
23612
23613 • Apply vinyl plugin from Calf:
23614
23615 lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
23616
23617 • Apply bit crusher plugin from ArtyFX:
23618
23619 lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
23620
23621 Commands
23622
23623 This filter supports all options that are exported by plugin as
23624 commands.
23625
23626 mcompand
23627 Multiband Compress or expand the audio's dynamic range.
23628
23629 The input audio is divided into bands using 4th order Linkwitz-Riley
23630 IIRs. This is akin to the crossover of a loudspeaker, and results in
23631 flat frequency response when absent compander action.
23632
23633 It accepts the following parameters:
23634
23635 args
23636 This option syntax is: attack,decay,[attack,decay..] soft-knee
23637 points crossover_frequency [delay [initial_volume [gain]]] |
23638 attack,decay ... For explanation of each item refer to compand
23639 filter documentation.
23640
23641 pan
23642 Mix channels with specific gain levels. The filter accepts the output
23643 channel layout followed by a set of channels definitions.
23644
23645 This filter is also designed to efficiently remap the channels of an
23646 audio stream.
23647
23648 The filter accepts parameters of the form: "l|outdef|outdef|..."
23649
23650 l output channel layout or number of channels
23651
23652 outdef
23653 output channel specification, of the form:
23654 "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
23655
23656 out_name
23657 output channel to define, either a channel name (FL, FR, etc.) or a
23658 channel number (c0, c1, etc.)
23659
23660 gain
23661 multiplicative coefficient for the channel, 1 leaving the volume
23662 unchanged
23663
23664 in_name
23665 input channel to use, see out_name for details; it is not possible
23666 to mix named and numbered input channels
23667
23668 If the `=' in a channel specification is replaced by `<', then the
23669 gains for that specification will be renormalized so that the total is
23670 1, thus avoiding clipping noise.
23671
23672 Mixing examples
23673
23674 For example, if you want to down-mix from stereo to mono, but with a
23675 bigger factor for the left channel:
23676
23677 pan=1c|c0=0.9*c0+0.1*c1
23678
23679 A customized down-mix to stereo that works automatically for 3-, 4-, 5-
23680 and 7-channels surround:
23681
23682 pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR
23683
23684 Note that ffmpeg integrates a default down-mix (and up-mix) system that
23685 should be preferred (see "-ac" option) unless you have very specific
23686 needs.
23687
23688 Remapping examples
23689
23690 The channel remapping will be effective if, and only if:
23691
23692 *<gain coefficients are zeroes or ones,>
23693 *<only one input per channel output,>
23694
23695 If all these conditions are satisfied, the filter will notify the user
23696 ("Pure channel mapping detected"), and use an optimized and lossless
23697 method to do the remapping.
23698
23699 For example, if you have a 5.1 source and want a stereo audio stream by
23700 dropping the extra channels:
23701
23702 pan="stereo| c0=FL | c1=FR"
23703
23704 Given the same source, you can also switch front left and front right
23705 channels and keep the input channel layout:
23706
23707 pan="5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5"
23708
23709 If the input is a stereo audio stream, you can mute the front left
23710 channel (and still keep the stereo channel layout) with:
23711
23712 pan="stereo|c1=c1"
23713
23714 Still with a stereo audio stream input, you can copy the right channel
23715 in both front left and right:
23716
23717 pan="stereo| c0=FR | c1=FR"
23718
23719 replaygain
23720 ReplayGain scanner filter. This filter takes an audio stream as an
23721 input and outputs it unchanged. At end of filtering it displays
23722 "track_gain" and "track_peak".
23723
23724 resample
23725 Convert the audio sample format, sample rate and channel layout. It is
23726 not meant to be used directly.
23727
23728 rubberband
23729 Apply time-stretching and pitch-shifting with librubberband.
23730
23731 To enable compilation of this filter, you need to configure FFmpeg with
23732 "--enable-librubberband".
23733
23734 The filter accepts the following options:
23735
23736 tempo
23737 Set tempo scale factor.
23738
23739 pitch
23740 Set pitch scale factor.
23741
23742 transients
23743 Set transients detector. Possible values are:
23744
23745 crisp
23746 mixed
23747 smooth
23748 detector
23749 Set detector. Possible values are:
23750
23751 compound
23752 percussive
23753 soft
23754 phase
23755 Set phase. Possible values are:
23756
23757 laminar
23758 independent
23759 window
23760 Set processing window size. Possible values are:
23761
23762 standard
23763 short
23764 long
23765 smoothing
23766 Set smoothing. Possible values are:
23767
23768 off
23769 on
23770 formant
23771 Enable formant preservation when shift pitching. Possible values
23772 are:
23773
23774 shifted
23775 preserved
23776 pitchq
23777 Set pitch quality. Possible values are:
23778
23779 quality
23780 speed
23781 consistency
23782 channels
23783 Set channels. Possible values are:
23784
23785 apart
23786 together
23787
23788 Commands
23789
23790 This filter supports the following commands:
23791
23792 tempo
23793 Change filter tempo scale factor. Syntax for the command is :
23794 "tempo"
23795
23796 pitch
23797 Change filter pitch scale factor. Syntax for the command is :
23798 "pitch"
23799
23800 sidechaincompress
23801 This filter acts like normal compressor but has the ability to compress
23802 detected signal using second input signal. It needs two input streams
23803 and returns one output stream. First input stream will be processed
23804 depending on second stream signal. The filtered signal then can be
23805 filtered with other filters in later stages of processing. See pan and
23806 amerge filter.
23807
23808 The filter accepts the following options:
23809
23810 level_in
23811 Set input gain. Default is 1. Range is between 0.015625 and 64.
23812
23813 mode
23814 Set mode of compressor operation. Can be "upward" or "downward".
23815 Default is "downward".
23816
23817 threshold
23818 If a signal of second stream raises above this level it will affect
23819 the gain reduction of first stream. By default is 0.125. Range is
23820 between 0.00097563 and 1.
23821
23822 ratio
23823 Set a ratio about which the signal is reduced. 1:2 means that if
23824 the level raised 4dB above the threshold, it will be only 2dB above
23825 after the reduction. Default is 2. Range is between 1 and 20.
23826
23827 attack
23828 Amount of milliseconds the signal has to rise above the threshold
23829 before gain reduction starts. Default is 20. Range is between 0.01
23830 and 2000.
23831
23832 release
23833 Amount of milliseconds the signal has to fall below the threshold
23834 before reduction is decreased again. Default is 250. Range is
23835 between 0.01 and 9000.
23836
23837 makeup
23838 Set the amount by how much signal will be amplified after
23839 processing. Default is 1. Range is from 1 to 64.
23840
23841 knee
23842 Curve the sharp knee around the threshold to enter gain reduction
23843 more softly. Default is 2.82843. Range is between 1 and 8.
23844
23845 link
23846 Choose if the "average" level between all channels of side-chain
23847 stream or the louder("maximum") channel of side-chain stream
23848 affects the reduction. Default is "average".
23849
23850 detection
23851 Should the exact signal be taken in case of "peak" or an RMS one in
23852 case of "rms". Default is "rms" which is mainly smoother.
23853
23854 level_sc
23855 Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
23856
23857 mix How much to use compressed signal in output. Default is 1. Range
23858 is between 0 and 1.
23859
23860 Commands
23861
23862 This filter supports the all above options as commands.
23863
23864 Examples
23865
23866 • Full ffmpeg example taking 2 audio inputs, 1st input to be
23867 compressed depending on the signal of 2nd input and later
23868 compressed signal to be merged with 2nd input:
23869
23870 ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge"
23871
23872 sidechaingate
23873 A sidechain gate acts like a normal (wideband) gate but has the ability
23874 to filter the detected signal before sending it to the gain reduction
23875 stage. Normally a gate uses the full range signal to detect a level
23876 above the threshold. For example: If you cut all lower frequencies
23877 from your sidechain signal the gate will decrease the volume of your
23878 track only if not enough highs appear. With this technique you are able
23879 to reduce the resonation of a natural drum or remove "rumbling" of
23880 muted strokes from a heavily distorted guitar. It needs two input
23881 streams and returns one output stream. First input stream will be
23882 processed depending on second stream signal.
23883
23884 The filter accepts the following options:
23885
23886 level_in
23887 Set input level before filtering. Default is 1. Allowed range is
23888 from 0.015625 to 64.
23889
23890 mode
23891 Set the mode of operation. Can be "upward" or "downward". Default
23892 is "downward". If set to "upward" mode, higher parts of signal will
23893 be amplified, expanding dynamic range in upward direction.
23894 Otherwise, in case of "downward" lower parts of signal will be
23895 reduced.
23896
23897 range
23898 Set the level of gain reduction when the signal is below the
23899 threshold. Default is 0.06125. Allowed range is from 0 to 1.
23900 Setting this to 0 disables reduction and then filter behaves like
23901 expander.
23902
23903 threshold
23904 If a signal rises above this level the gain reduction is released.
23905 Default is 0.125. Allowed range is from 0 to 1.
23906
23907 ratio
23908 Set a ratio about which the signal is reduced. Default is 2.
23909 Allowed range is from 1 to 9000.
23910
23911 attack
23912 Amount of milliseconds the signal has to rise above the threshold
23913 before gain reduction stops. Default is 20 milliseconds. Allowed
23914 range is from 0.01 to 9000.
23915
23916 release
23917 Amount of milliseconds the signal has to fall below the threshold
23918 before the reduction is increased again. Default is 250
23919 milliseconds. Allowed range is from 0.01 to 9000.
23920
23921 makeup
23922 Set amount of amplification of signal after processing. Default is
23923 1. Allowed range is from 1 to 64.
23924
23925 knee
23926 Curve the sharp knee around the threshold to enter gain reduction
23927 more softly. Default is 2.828427125. Allowed range is from 1 to 8.
23928
23929 detection
23930 Choose if exact signal should be taken for detection or an RMS like
23931 one. Default is rms. Can be peak or rms.
23932
23933 link
23934 Choose if the average level between all channels or the louder
23935 channel affects the reduction. Default is average. Can be average
23936 or maximum.
23937
23938 level_sc
23939 Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
23940
23941 Commands
23942
23943 This filter supports the all above options as commands.
23944
23945 silencedetect
23946 Detect silence in an audio stream.
23947
23948 This filter logs a message when it detects that the input audio volume
23949 is less or equal to a noise tolerance value for a duration greater or
23950 equal to the minimum detected noise duration.
23951
23952 The printed times and duration are expressed in seconds. The
23953 "lavfi.silence_start" or "lavfi.silence_start.X" metadata key is set on
23954 the first frame whose timestamp equals or exceeds the detection
23955 duration and it contains the timestamp of the first frame of the
23956 silence.
23957
23958 The "lavfi.silence_duration" or "lavfi.silence_duration.X" and
23959 "lavfi.silence_end" or "lavfi.silence_end.X" metadata keys are set on
23960 the first frame after the silence. If mono is enabled, and each channel
23961 is evaluated separately, the ".X" suffixed keys are used, and "X"
23962 corresponds to the channel number.
23963
23964 The filter accepts the following options:
23965
23966 noise, n
23967 Set noise tolerance. Can be specified in dB (in case "dB" is
23968 appended to the specified value) or amplitude ratio. Default is
23969 -60dB, or 0.001.
23970
23971 duration, d
23972 Set silence duration until notification (default is 2 seconds). See
23973 the Time duration section in the ffmpeg-utils(1) manual for the
23974 accepted syntax.
23975
23976 mono, m
23977 Process each channel separately, instead of combined. By default is
23978 disabled.
23979
23980 Examples
23981
23982 • Detect 5 seconds of silence with -50dB noise tolerance:
23983
23984 silencedetect=n=-50dB:d=5
23985
23986 • Complete example with ffmpeg to detect silence with 0.0001 noise
23987 tolerance in silence.mp3:
23988
23989 ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
23990
23991 silenceremove
23992 Remove silence from the beginning, middle or end of the audio.
23993
23994 The filter accepts the following options:
23995
23996 start_periods
23997 This value is used to indicate if audio should be trimmed at
23998 beginning of the audio. A value of zero indicates no silence should
23999 be trimmed from the beginning. When specifying a non-zero value, it
24000 trims audio up until it finds non-silence. Normally, when trimming
24001 silence from beginning of audio the start_periods will be 1 but it
24002 can be increased to higher values to trim all audio up to specific
24003 count of non-silence periods. Default value is 0.
24004
24005 start_duration
24006 Specify the amount of time that non-silence must be detected before
24007 it stops trimming audio. By increasing the duration, bursts of
24008 noises can be treated as silence and trimmed off. Default value is
24009 0.
24010
24011 start_threshold
24012 This indicates what sample value should be treated as silence. For
24013 digital audio, a value of 0 may be fine but for audio recorded from
24014 analog, you may wish to increase the value to account for
24015 background noise. Can be specified in dB (in case "dB" is appended
24016 to the specified value) or amplitude ratio. Default value is 0.
24017
24018 start_silence
24019 Specify max duration of silence at beginning that will be kept
24020 after trimming. Default is 0, which is equal to trimming all
24021 samples detected as silence.
24022
24023 start_mode
24024 Specify mode of detection of silence end in start of multi-channel
24025 audio. Can be any or all. Default is any. With any, any sample
24026 that is detected as non-silence will cause stopped trimming of
24027 silence. With all, only if all channels are detected as non-
24028 silence will cause stopped trimming of silence.
24029
24030 stop_periods
24031 Set the count for trimming silence from the end of audio. To
24032 remove silence from the middle of a file, specify a stop_periods
24033 that is negative. This value is then treated as a positive value
24034 and is used to indicate the effect should restart processing as
24035 specified by start_periods, making it suitable for removing periods
24036 of silence in the middle of the audio. Default value is 0.
24037
24038 stop_duration
24039 Specify a duration of silence that must exist before audio is not
24040 copied any more. By specifying a higher duration, silence that is
24041 wanted can be left in the audio. Default value is 0.
24042
24043 stop_threshold
24044 This is the same as start_threshold but for trimming silence from
24045 the end of audio. Can be specified in dB (in case "dB" is appended
24046 to the specified value) or amplitude ratio. Default value is 0.
24047
24048 stop_silence
24049 Specify max duration of silence at end that will be kept after
24050 trimming. Default is 0, which is equal to trimming all samples
24051 detected as silence.
24052
24053 stop_mode
24054 Specify mode of detection of silence start in end of multi-channel
24055 audio. Can be any or all. Default is any. With any, any sample
24056 that is detected as non-silence will cause stopped trimming of
24057 silence. With all, only if all channels are detected as non-
24058 silence will cause stopped trimming of silence.
24059
24060 detection
24061 Set how is silence detected. Can be "rms" or "peak". Second is
24062 faster and works better with digital silence which is exactly 0.
24063 Default value is "rms".
24064
24065 window
24066 Set duration in number of seconds used to calculate size of window
24067 in number of samples for detecting silence. Default value is 0.02.
24068 Allowed range is from 0 to 10.
24069
24070 Examples
24071
24072 • The following example shows how this filter can be used to start a
24073 recording that does not contain the delay at the start which
24074 usually occurs between pressing the record button and the start of
24075 the performance:
24076
24077 silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
24078
24079 • Trim all silence encountered from beginning to end where there is
24080 more than 1 second of silence in audio:
24081
24082 silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
24083
24084 • Trim all digital silence samples, using peak detection, from
24085 beginning to end where there is more than 0 samples of digital
24086 silence in audio and digital silence is detected in all channels at
24087 same positions in stream:
24088
24089 silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
24090
24091 sofalizer
24092 SOFAlizer uses head-related transfer functions (HRTFs) to create
24093 virtual loudspeakers around the user for binaural listening via
24094 headphones (audio formats up to 9 channels supported). The HRTFs are
24095 stored in SOFA files (see <http://www.sofacoustics.org/> for a
24096 database). SOFAlizer is developed at the Acoustics Research Institute
24097 (ARI) of the Austrian Academy of Sciences.
24098
24099 To enable compilation of this filter you need to configure FFmpeg with
24100 "--enable-libmysofa".
24101
24102 The filter accepts the following options:
24103
24104 sofa
24105 Set the SOFA file used for rendering.
24106
24107 gain
24108 Set gain applied to audio. Value is in dB. Default is 0.
24109
24110 rotation
24111 Set rotation of virtual loudspeakers in deg. Default is 0.
24112
24113 elevation
24114 Set elevation of virtual speakers in deg. Default is 0.
24115
24116 radius
24117 Set distance in meters between loudspeakers and the listener with
24118 near-field HRTFs. Default is 1.
24119
24120 type
24121 Set processing type. Can be time or freq. time is processing audio
24122 in time domain which is slow. freq is processing audio in
24123 frequency domain which is fast. Default is freq.
24124
24125 speakers
24126 Set custom positions of virtual loudspeakers. Syntax for this
24127 option is: <CH> <AZIM> <ELEV>[|<CH> <AZIM> <ELEV>|...]. Each
24128 virtual loudspeaker is described with short channel name following
24129 with azimuth and elevation in degrees. Each virtual loudspeaker
24130 description is separated by '|'. For example to override front
24131 left and front right channel positions use: 'speakers=FL 45 15|FR
24132 345 15'. Descriptions with unrecognised channel names are ignored.
24133
24134 lfegain
24135 Set custom gain for LFE channels. Value is in dB. Default is 0.
24136
24137 framesize
24138 Set custom frame size in number of samples. Default is 1024.
24139 Allowed range is from 1024 to 96000. Only used if option type is
24140 set to freq.
24141
24142 normalize
24143 Should all IRs be normalized upon importing SOFA file. By default
24144 is enabled.
24145
24146 interpolate
24147 Should nearest IRs be interpolated with neighbor IRs if exact
24148 position does not match. By default is disabled.
24149
24150 minphase
24151 Minphase all IRs upon loading of SOFA file. By default is disabled.
24152
24153 anglestep
24154 Set neighbor search angle step. Only used if option interpolate is
24155 enabled.
24156
24157 radstep
24158 Set neighbor search radius step. Only used if option interpolate is
24159 enabled.
24160
24161 Examples
24162
24163 • Using ClubFritz6 sofa file:
24164
24165 sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
24166
24167 • Using ClubFritz12 sofa file and bigger radius with small rotation:
24168
24169 sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
24170
24171 • Similar as above but with custom speaker positions for front left,
24172 front right, back left and back right and also with custom gain:
24173
24174 "sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28"
24175
24176 speechnorm
24177 Speech Normalizer.
24178
24179 This filter expands or compresses each half-cycle of audio samples
24180 (local set of samples all above or all below zero and between two
24181 nearest zero crossings) depending on threshold value, so audio reaches
24182 target peak value under conditions controlled by below options.
24183
24184 The filter accepts the following options:
24185
24186 peak, p
24187 Set the expansion target peak value. This specifies the highest
24188 allowed absolute amplitude level for the normalized audio input.
24189 Default value is 0.95. Allowed range is from 0.0 to 1.0.
24190
24191 expansion, e
24192 Set the maximum expansion factor. Allowed range is from 1.0 to
24193 50.0. Default value is 2.0. This option controls maximum local
24194 half-cycle of samples expansion. The maximum expansion would be
24195 such that local peak value reaches target peak value but never to
24196 surpass it and that ratio between new and previous peak value does
24197 not surpass this option value.
24198
24199 compression, c
24200 Set the maximum compression factor. Allowed range is from 1.0 to
24201 50.0. Default value is 2.0. This option controls maximum local
24202 half-cycle of samples compression. This option is used only if
24203 threshold option is set to value greater than 0.0, then in such
24204 cases when local peak is lower or same as value set by threshold
24205 all samples belonging to that peak's half-cycle will be compressed
24206 by current compression factor.
24207
24208 threshold, t
24209 Set the threshold value. Default value is 0.0. Allowed range is
24210 from 0.0 to 1.0. This option specifies which half-cycles of
24211 samples will be compressed and which will be expanded. Any half-
24212 cycle samples with their local peak value below or same as this
24213 option value will be compressed by current compression factor,
24214 otherwise, if greater than threshold value they will be expanded
24215 with expansion factor so that it could reach peak target value but
24216 never surpass it.
24217
24218 raise, r
24219 Set the expansion raising amount per each half-cycle of samples.
24220 Default value is 0.001. Allowed range is from 0.0 to 1.0. This
24221 controls how fast expansion factor is raised per each new half-
24222 cycle until it reaches expansion value. Setting this options too
24223 high may lead to distortions.
24224
24225 fall, f
24226 Set the compression raising amount per each half-cycle of samples.
24227 Default value is 0.001. Allowed range is from 0.0 to 1.0. This
24228 controls how fast compression factor is raised per each new half-
24229 cycle until it reaches compression value.
24230
24231 channels, h
24232 Specify which channels to filter, by default all available channels
24233 are filtered.
24234
24235 invert, i
24236 Enable inverted filtering, by default is disabled. This inverts
24237 interpretation of threshold option. When enabled any half-cycle of
24238 samples with their local peak value below or same as threshold
24239 option will be expanded otherwise it will be compressed.
24240
24241 link, l
24242 Link channels when calculating gain applied to each filtered
24243 channel sample, by default is disabled. When disabled each
24244 filtered channel gain calculation is independent, otherwise when
24245 this option is enabled the minimum of all possible gains for each
24246 filtered channel is used.
24247
24248 rms, m
24249 Set the expansion target RMS value. This specifies the highest
24250 allowed RMS level for the normalized audio input. Default value is
24251 0.0, thus disabled. Allowed range is from 0.0 to 1.0.
24252
24253 Commands
24254
24255 This filter supports the all above options as commands.
24256
24257 Examples
24258
24259 • Weak and slow amplification:
24260
24261 speechnorm=e=3:r=0.00001:l=1
24262
24263 • Moderate and slow amplification:
24264
24265 speechnorm=e=6.25:r=0.00001:l=1
24266
24267 • Strong and fast amplification:
24268
24269 speechnorm=e=12.5:r=0.0001:l=1
24270
24271 • Very strong and fast amplification:
24272
24273 speechnorm=e=25:r=0.0001:l=1
24274
24275 • Extreme and fast amplification:
24276
24277 speechnorm=e=50:r=0.0001:l=1
24278
24279 stereotools
24280 This filter has some handy utilities to manage stereo signals, for
24281 converting M/S stereo recordings to L/R signal while having control
24282 over the parameters or spreading the stereo image of master track.
24283
24284 The filter accepts the following options:
24285
24286 level_in
24287 Set input level before filtering for both channels. Defaults is 1.
24288 Allowed range is from 0.015625 to 64.
24289
24290 level_out
24291 Set output level after filtering for both channels. Defaults is 1.
24292 Allowed range is from 0.015625 to 64.
24293
24294 balance_in
24295 Set input balance between both channels. Default is 0. Allowed
24296 range is from -1 to 1.
24297
24298 balance_out
24299 Set output balance between both channels. Default is 0. Allowed
24300 range is from -1 to 1.
24301
24302 softclip
24303 Enable softclipping. Results in analog distortion instead of harsh
24304 digital 0dB clipping. Disabled by default.
24305
24306 mutel
24307 Mute the left channel. Disabled by default.
24308
24309 muter
24310 Mute the right channel. Disabled by default.
24311
24312 phasel
24313 Change the phase of the left channel. Disabled by default.
24314
24315 phaser
24316 Change the phase of the right channel. Disabled by default.
24317
24318 mode
24319 Set stereo mode. Available values are:
24320
24321 lr>lr
24322 Left/Right to Left/Right, this is default.
24323
24324 lr>ms
24325 Left/Right to Mid/Side.
24326
24327 ms>lr
24328 Mid/Side to Left/Right.
24329
24330 lr>ll
24331 Left/Right to Left/Left.
24332
24333 lr>rr
24334 Left/Right to Right/Right.
24335
24336 lr>l+r
24337 Left/Right to Left + Right.
24338
24339 lr>rl
24340 Left/Right to Right/Left.
24341
24342 ms>ll
24343 Mid/Side to Left/Left.
24344
24345 ms>rr
24346 Mid/Side to Right/Right.
24347
24348 ms>rl
24349 Mid/Side to Right/Left.
24350
24351 lr>l-r
24352 Left/Right to Left - Right.
24353
24354 slev
24355 Set level of side signal. Default is 1. Allowed range is from
24356 0.015625 to 64.
24357
24358 sbal
24359 Set balance of side signal. Default is 0. Allowed range is from -1
24360 to 1.
24361
24362 mlev
24363 Set level of the middle signal. Default is 1. Allowed range is
24364 from 0.015625 to 64.
24365
24366 mpan
24367 Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
24368
24369 base
24370 Set stereo base between mono and inversed channels. Default is 0.
24371 Allowed range is from -1 to 1.
24372
24373 delay
24374 Set delay in milliseconds how much to delay left from right channel
24375 and vice versa. Default is 0. Allowed range is from -20 to 20.
24376
24377 sclevel
24378 Set S/C level. Default is 1. Allowed range is from 1 to 100.
24379
24380 phase
24381 Set the stereo phase in degrees. Default is 0. Allowed range is
24382 from 0 to 360.
24383
24384 bmode_in, bmode_out
24385 Set balance mode for balance_in/balance_out option.
24386
24387 Can be one of the following:
24388
24389 balance
24390 Classic balance mode. Attenuate one channel at time. Gain is
24391 raised up to 1.
24392
24393 amplitude
24394 Similar as classic mode above but gain is raised up to 2.
24395
24396 power
24397 Equal power distribution, from -6dB to +6dB range.
24398
24399 Commands
24400
24401 This filter supports the all above options as commands.
24402
24403 Examples
24404
24405 • Apply karaoke like effect:
24406
24407 stereotools=mlev=0.015625
24408
24409 • Convert M/S signal to L/R:
24410
24411 "stereotools=mode=ms>lr"
24412
24413 stereowiden
24414 This filter enhance the stereo effect by suppressing signal common to
24415 both channels and by delaying the signal of left into right and vice
24416 versa, thereby widening the stereo effect.
24417
24418 The filter accepts the following options:
24419
24420 delay
24421 Time in milliseconds of the delay of left signal into right and
24422 vice versa. Default is 20 milliseconds.
24423
24424 feedback
24425 Amount of gain in delayed signal into right and vice versa. Gives a
24426 delay effect of left signal in right output and vice versa which
24427 gives widening effect. Default is 0.3.
24428
24429 crossfeed
24430 Cross feed of left into right with inverted phase. This helps in
24431 suppressing the mono. If the value is 1 it will cancel all the
24432 signal common to both channels. Default is 0.3.
24433
24434 drymix
24435 Set level of input signal of original channel. Default is 0.8.
24436
24437 Commands
24438
24439 This filter supports the all above options except "delay" as commands.
24440
24441 superequalizer
24442 Apply 18 band equalizer.
24443
24444 The filter accepts the following options:
24445
24446 1b Set 65Hz band gain.
24447
24448 2b Set 92Hz band gain.
24449
24450 3b Set 131Hz band gain.
24451
24452 4b Set 185Hz band gain.
24453
24454 5b Set 262Hz band gain.
24455
24456 6b Set 370Hz band gain.
24457
24458 7b Set 523Hz band gain.
24459
24460 8b Set 740Hz band gain.
24461
24462 9b Set 1047Hz band gain.
24463
24464 10b Set 1480Hz band gain.
24465
24466 11b Set 2093Hz band gain.
24467
24468 12b Set 2960Hz band gain.
24469
24470 13b Set 4186Hz band gain.
24471
24472 14b Set 5920Hz band gain.
24473
24474 15b Set 8372Hz band gain.
24475
24476 16b Set 11840Hz band gain.
24477
24478 17b Set 16744Hz band gain.
24479
24480 18b Set 20000Hz band gain.
24481
24482 surround
24483 Apply audio surround upmix filter.
24484
24485 This filter allows to produce multichannel output from audio stream.
24486
24487 The filter accepts the following options:
24488
24489 chl_out
24490 Set output channel layout. By default, this is 5.1.
24491
24492 See the Channel Layout section in the ffmpeg-utils(1) manual for
24493 the required syntax.
24494
24495 chl_in
24496 Set input channel layout. By default, this is stereo.
24497
24498 See the Channel Layout section in the ffmpeg-utils(1) manual for
24499 the required syntax.
24500
24501 level_in
24502 Set input volume level. By default, this is 1.
24503
24504 level_out
24505 Set output volume level. By default, this is 1.
24506
24507 lfe Enable LFE channel output if output channel layout has it. By
24508 default, this is enabled.
24509
24510 lfe_low
24511 Set LFE low cut off frequency. By default, this is 128 Hz.
24512
24513 lfe_high
24514 Set LFE high cut off frequency. By default, this is 256 Hz.
24515
24516 lfe_mode
24517 Set LFE mode, can be add or sub. Default is add. In add mode, LFE
24518 channel is created from input audio and added to output. In sub
24519 mode, LFE channel is created from input audio and added to output
24520 but also all non-LFE output channels are subtracted with output LFE
24521 channel.
24522
24523 smooth
24524 Set temporal smoothness strength, used to gradually change factors
24525 when transforming stereo sound in time. Allowed range is from 0.0
24526 to 1.0. Useful to improve output quality with focus option values
24527 greater than 0.0. Default is 0.0. Only values inside this range
24528 and without edges are effective.
24529
24530 angle
24531 Set angle of stereo surround transform, Allowed range is from 0 to
24532 360. Default is 90.
24533
24534 focus
24535 Set focus of stereo surround transform, Allowed range is from -1 to
24536 1. Default is 0.
24537
24538 fc_in
24539 Set front center input volume. By default, this is 1.
24540
24541 fc_out
24542 Set front center output volume. By default, this is 1.
24543
24544 fl_in
24545 Set front left input volume. By default, this is 1.
24546
24547 fl_out
24548 Set front left output volume. By default, this is 1.
24549
24550 fr_in
24551 Set front right input volume. By default, this is 1.
24552
24553 fr_out
24554 Set front right output volume. By default, this is 1.
24555
24556 sl_in
24557 Set side left input volume. By default, this is 1.
24558
24559 sl_out
24560 Set side left output volume. By default, this is 1.
24561
24562 sr_in
24563 Set side right input volume. By default, this is 1.
24564
24565 sr_out
24566 Set side right output volume. By default, this is 1.
24567
24568 bl_in
24569 Set back left input volume. By default, this is 1.
24570
24571 bl_out
24572 Set back left output volume. By default, this is 1.
24573
24574 br_in
24575 Set back right input volume. By default, this is 1.
24576
24577 br_out
24578 Set back right output volume. By default, this is 1.
24579
24580 bc_in
24581 Set back center input volume. By default, this is 1.
24582
24583 bc_out
24584 Set back center output volume. By default, this is 1.
24585
24586 lfe_in
24587 Set LFE input volume. By default, this is 1.
24588
24589 lfe_out
24590 Set LFE output volume. By default, this is 1.
24591
24592 allx
24593 Set spread usage of stereo image across X axis for all channels.
24594 Allowed range is from -1 to 15. By default this value is negative
24595 -1, and thus unused.
24596
24597 ally
24598 Set spread usage of stereo image across Y axis for all channels.
24599 Allowed range is from -1 to 15. By default this value is negative
24600 -1, and thus unused.
24601
24602 fcx, flx, frx, blx, brx, slx, srx, bcx
24603 Set spread usage of stereo image across X axis for each channel.
24604 Allowed range is from 0.06 to 15. By default this value is 0.5.
24605
24606 fcy, fly, fry, bly, bry, sly, sry, bcy
24607 Set spread usage of stereo image across Y axis for each channel.
24608 Allowed range is from 0.06 to 15. By default this value is 0.5.
24609
24610 win_size
24611 Set window size. Allowed range is from 1024 to 65536. Default size
24612 is 4096.
24613
24614 win_func
24615 Set window function.
24616
24617 It accepts the following values:
24618
24619 rect
24620 bartlett
24621 hann, hanning
24622 hamming
24623 blackman
24624 welch
24625 flattop
24626 bharris
24627 bnuttall
24628 bhann
24629 sine
24630 nuttall
24631 lanczos
24632 gauss
24633 tukey
24634 dolph
24635 cauchy
24636 parzen
24637 poisson
24638 bohman
24639 kaiser
24640
24641 Default is "hann".
24642
24643 overlap
24644 Set window overlap. If set to 1, the recommended overlap for
24645 selected window function will be picked. Default is 0.5.
24646
24647 tiltshelf
24648 Boost or cut the lower frequencies and cut or boost higher frequencies
24649 of the audio using a two-pole shelving filter with a response similar
24650 to that of a standard hi-fi's tone-controls. This is also known as
24651 shelving equalisation (EQ).
24652
24653 The filter accepts the following options:
24654
24655 gain, g
24656 Give the gain at 0 Hz. Its useful range is about -20 (for a large
24657 cut) to +20 (for a large boost). Beware of clipping when using a
24658 positive gain.
24659
24660 frequency, f
24661 Set the filter's central frequency and so can be used to extend or
24662 reduce the frequency range to be boosted or cut. The default value
24663 is 3000 Hz.
24664
24665 width_type, t
24666 Set method to specify band-width of filter.
24667
24668 h Hz
24669
24670 q Q-Factor
24671
24672 o octave
24673
24674 s slope
24675
24676 k kHz
24677
24678 width, w
24679 Determine how steep is the filter's shelf transition.
24680
24681 poles, p
24682 Set number of poles. Default is 2.
24683
24684 mix, m
24685 How much to use filtered signal in output. Default is 1. Range is
24686 between 0 and 1.
24687
24688 channels, c
24689 Specify which channels to filter, by default all available are
24690 filtered.
24691
24692 normalize, n
24693 Normalize biquad coefficients, by default is disabled. Enabling it
24694 will normalize magnitude response at DC to 0dB.
24695
24696 transform, a
24697 Set transform type of IIR filter.
24698
24699 di
24700 dii
24701 tdi
24702 tdii
24703 latt
24704 svf
24705 zdf
24706 precision, r
24707 Set precison of filtering.
24708
24709 auto
24710 Pick automatic sample format depending on surround filters.
24711
24712 s16 Always use signed 16-bit.
24713
24714 s32 Always use signed 32-bit.
24715
24716 f32 Always use float 32-bit.
24717
24718 f64 Always use float 64-bit.
24719
24720 block_size, b
24721 Set block size used for reverse IIR processing. If this value is
24722 set to high enough value (higher than impulse response length
24723 truncated when reaches near zero values) filtering will become
24724 linear phase otherwise if not big enough it will just produce nasty
24725 artifacts.
24726
24727 Note that filter delay will be exactly this many samples when set
24728 to non-zero value.
24729
24730 Commands
24731
24732 This filter supports some options as commands.
24733
24734 treble, highshelf
24735 Boost or cut treble (upper) frequencies of the audio using a two-pole
24736 shelving filter with a response similar to that of a standard hi-fi's
24737 tone-controls. This is also known as shelving equalisation (EQ).
24738
24739 The filter accepts the following options:
24740
24741 gain, g
24742 Give the gain at whichever is the lower of ~22 kHz and the Nyquist
24743 frequency. Its useful range is about -20 (for a large cut) to +20
24744 (for a large boost). Beware of clipping when using a positive gain.
24745
24746 frequency, f
24747 Set the filter's central frequency and so can be used to extend or
24748 reduce the frequency range to be boosted or cut. The default value
24749 is 3000 Hz.
24750
24751 width_type, t
24752 Set method to specify band-width of filter.
24753
24754 h Hz
24755
24756 q Q-Factor
24757
24758 o octave
24759
24760 s slope
24761
24762 k kHz
24763
24764 width, w
24765 Determine how steep is the filter's shelf transition.
24766
24767 poles, p
24768 Set number of poles. Default is 2.
24769
24770 mix, m
24771 How much to use filtered signal in output. Default is 1. Range is
24772 between 0 and 1.
24773
24774 channels, c
24775 Specify which channels to filter, by default all available are
24776 filtered.
24777
24778 normalize, n
24779 Normalize biquad coefficients, by default is disabled. Enabling it
24780 will normalize magnitude response at DC to 0dB.
24781
24782 transform, a
24783 Set transform type of IIR filter.
24784
24785 di
24786 dii
24787 tdi
24788 tdii
24789 latt
24790 svf
24791 zdf
24792 precision, r
24793 Set precison of filtering.
24794
24795 auto
24796 Pick automatic sample format depending on surround filters.
24797
24798 s16 Always use signed 16-bit.
24799
24800 s32 Always use signed 32-bit.
24801
24802 f32 Always use float 32-bit.
24803
24804 f64 Always use float 64-bit.
24805
24806 block_size, b
24807 Set block size used for reverse IIR processing. If this value is
24808 set to high enough value (higher than impulse response length
24809 truncated when reaches near zero values) filtering will become
24810 linear phase otherwise if not big enough it will just produce nasty
24811 artifacts.
24812
24813 Note that filter delay will be exactly this many samples when set
24814 to non-zero value.
24815
24816 Commands
24817
24818 This filter supports the following commands:
24819
24820 frequency, f
24821 Change treble frequency. Syntax for the command is : "frequency"
24822
24823 width_type, t
24824 Change treble width_type. Syntax for the command is : "width_type"
24825
24826 width, w
24827 Change treble width. Syntax for the command is : "width"
24828
24829 gain, g
24830 Change treble gain. Syntax for the command is : "gain"
24831
24832 mix, m
24833 Change treble mix. Syntax for the command is : "mix"
24834
24835 tremolo
24836 Sinusoidal amplitude modulation.
24837
24838 The filter accepts the following options:
24839
24840 f Modulation frequency in Hertz. Modulation frequencies in the
24841 subharmonic range (20 Hz or lower) will result in a tremolo effect.
24842 This filter may also be used as a ring modulator by specifying a
24843 modulation frequency higher than 20 Hz. Range is 0.1 - 20000.0.
24844 Default value is 5.0 Hz.
24845
24846 d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default
24847 value is 0.5.
24848
24849 vibrato
24850 Sinusoidal phase modulation.
24851
24852 The filter accepts the following options:
24853
24854 f Modulation frequency in Hertz. Range is 0.1 - 20000.0. Default
24855 value is 5.0 Hz.
24856
24857 d Depth of modulation as a percentage. Range is 0.0 - 1.0. Default
24858 value is 0.5.
24859
24860 virtualbass
24861 Apply audio Virtual Bass filter.
24862
24863 This filter accepts stereo input and produce stereo with LFE (2.1)
24864 channels output. The newly produced LFE channel have enhanced virtual
24865 bass originally obtained from both stereo channels. This filter
24866 outputs front left and front right channels unchanged as available in
24867 stereo input.
24868
24869 The filter accepts the following options:
24870
24871 cutoff
24872 Set the virtual bass cutoff frequency. Default value is 250 Hz.
24873 Allowed range is from 100 to 500 Hz.
24874
24875 strength
24876 Set the virtual bass strength. Allowed range is from 0.5 to 3.
24877 Default value is 3.
24878
24879 volume
24880 Adjust the input audio volume.
24881
24882 It accepts the following parameters:
24883
24884 volume
24885 Set audio volume expression.
24886
24887 Output values are clipped to the maximum value.
24888
24889 The output audio volume is given by the relation:
24890
24891 <output_volume> = <volume> * <input_volume>
24892
24893 The default value for volume is "1.0".
24894
24895 precision
24896 This parameter represents the mathematical precision.
24897
24898 It determines which input sample formats will be allowed, which
24899 affects the precision of the volume scaling.
24900
24901 fixed
24902 8-bit fixed-point; this limits input sample format to U8, S16,
24903 and S32.
24904
24905 float
24906 32-bit floating-point; this limits input sample format to FLT.
24907 (default)
24908
24909 double
24910 64-bit floating-point; this limits input sample format to DBL.
24911
24912 replaygain
24913 Choose the behaviour on encountering ReplayGain side data in input
24914 frames.
24915
24916 drop
24917 Remove ReplayGain side data, ignoring its contents (the
24918 default).
24919
24920 ignore
24921 Ignore ReplayGain side data, but leave it in the frame.
24922
24923 track
24924 Prefer the track gain, if present.
24925
24926 album
24927 Prefer the album gain, if present.
24928
24929 replaygain_preamp
24930 Pre-amplification gain in dB to apply to the selected replaygain
24931 gain.
24932
24933 Default value for replaygain_preamp is 0.0.
24934
24935 replaygain_noclip
24936 Prevent clipping by limiting the gain applied.
24937
24938 Default value for replaygain_noclip is 1.
24939
24940 eval
24941 Set when the volume expression is evaluated.
24942
24943 It accepts the following values:
24944
24945 once
24946 only evaluate expression once during the filter initialization,
24947 or when the volume command is sent
24948
24949 frame
24950 evaluate expression for each incoming frame
24951
24952 Default value is once.
24953
24954 The volume expression can contain the following parameters.
24955
24956 n frame number (starting at zero)
24957
24958 nb_channels
24959 number of channels
24960
24961 nb_consumed_samples
24962 number of samples consumed by the filter
24963
24964 nb_samples
24965 number of samples in the current frame
24966
24967 pos original frame position in the file
24968
24969 pts frame PTS
24970
24971 sample_rate
24972 sample rate
24973
24974 startpts
24975 PTS at start of stream
24976
24977 startt
24978 time at start of stream
24979
24980 t frame time
24981
24982 tb timestamp timebase
24983
24984 volume
24985 last set volume value
24986
24987 Note that when eval is set to once only the sample_rate and tb
24988 variables are available, all other variables will evaluate to NAN.
24989
24990 Commands
24991
24992 This filter supports the following commands:
24993
24994 volume
24995 Modify the volume expression. The command accepts the same syntax
24996 of the corresponding option.
24997
24998 If the specified expression is not valid, it is kept at its current
24999 value.
25000
25001 Examples
25002
25003 • Halve the input audio volume:
25004
25005 volume=volume=0.5
25006 volume=volume=1/2
25007 volume=volume=-6.0206dB
25008
25009 In all the above example the named key for volume can be omitted,
25010 for example like in:
25011
25012 volume=0.5
25013
25014 • Increase input audio power by 6 decibels using fixed-point
25015 precision:
25016
25017 volume=volume=6dB:precision=fixed
25018
25019 • Fade volume after time 10 with an annihilation period of 5 seconds:
25020
25021 volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
25022
25023 volumedetect
25024 Detect the volume of the input video.
25025
25026 The filter has no parameters. It supports only 16-bit signed integer
25027 samples, so the input will be converted when needed. Statistics about
25028 the volume will be printed in the log when the input stream end is
25029 reached.
25030
25031 In particular it will show the mean volume (root mean square), maximum
25032 volume (on a per-sample basis), and the beginning of a histogram of the
25033 registered volume values (from the maximum value to a cumulated 1/1000
25034 of the samples).
25035
25036 All volumes are in decibels relative to the maximum PCM value.
25037
25038 Examples
25039
25040 Here is an excerpt of the output:
25041
25042 [Parsed_volumedetect_0 0xa23120] mean_volume: -27 dB
25043 [Parsed_volumedetect_0 0xa23120] max_volume: -4 dB
25044 [Parsed_volumedetect_0 0xa23120] histogram_4db: 6
25045 [Parsed_volumedetect_0 0xa23120] histogram_5db: 62
25046 [Parsed_volumedetect_0 0xa23120] histogram_6db: 286
25047 [Parsed_volumedetect_0 0xa23120] histogram_7db: 1042
25048 [Parsed_volumedetect_0 0xa23120] histogram_8db: 2551
25049 [Parsed_volumedetect_0 0xa23120] histogram_9db: 4609
25050 [Parsed_volumedetect_0 0xa23120] histogram_10db: 8409
25051
25052 It means that:
25053
25054 • The mean square energy is approximately -27 dB, or 10^-2.7.
25055
25056 • The largest sample is at -4 dB, or more precisely between -4 dB and
25057 -5 dB.
25058
25059 • There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
25060
25061 In other words, raising the volume by +4 dB does not cause any
25062 clipping, raising it by +5 dB causes clipping for 6 samples, etc.
25063
25065 Below is a description of the currently available audio sources.
25066
25067 abuffer
25068 Buffer audio frames, and make them available to the filter chain.
25069
25070 This source is mainly intended for a programmatic use, in particular
25071 through the interface defined in libavfilter/buffersrc.h.
25072
25073 It accepts the following parameters:
25074
25075 time_base
25076 The timebase which will be used for timestamps of submitted frames.
25077 It must be either a floating-point number or in
25078 numerator/denominator form.
25079
25080 sample_rate
25081 The sample rate of the incoming audio buffers.
25082
25083 sample_fmt
25084 The sample format of the incoming audio buffers. Either a sample
25085 format name or its corresponding integer representation from the
25086 enum AVSampleFormat in libavutil/samplefmt.h
25087
25088 channel_layout
25089 The channel layout of the incoming audio buffers. Either a channel
25090 layout name from channel_layout_map in libavutil/channel_layout.c
25091 or its corresponding integer representation from the AV_CH_LAYOUT_*
25092 macros in libavutil/channel_layout.h
25093
25094 channels
25095 The number of channels of the incoming audio buffers. If both
25096 channels and channel_layout are specified, then they must be
25097 consistent.
25098
25099 Examples
25100
25101 abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
25102
25103 will instruct the source to accept planar 16bit signed stereo at
25104 44100Hz. Since the sample format with name "s16p" corresponds to the
25105 number 6 and the "stereo" channel layout corresponds to the value 0x3,
25106 this is equivalent to:
25107
25108 abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
25109
25110 aevalsrc
25111 Generate an audio signal specified by an expression.
25112
25113 This source accepts in input one or more expressions (one for each
25114 channel), which are evaluated and used to generate a corresponding
25115 audio signal.
25116
25117 This source accepts the following options:
25118
25119 exprs
25120 Set the '|'-separated expressions list for each separate channel.
25121 In case the channel_layout option is not specified, the selected
25122 channel layout depends on the number of provided expressions.
25123 Otherwise the last specified expression is applied to the remaining
25124 output channels.
25125
25126 channel_layout, c
25127 Set the channel layout. The number of channels in the specified
25128 layout must be equal to the number of specified expressions.
25129
25130 duration, d
25131 Set the minimum duration of the sourced audio. See the Time
25132 duration section in the ffmpeg-utils(1) manual for the accepted
25133 syntax. Note that the resulting duration may be greater than the
25134 specified duration, as the generated audio is always cut at the end
25135 of a complete frame.
25136
25137 If not specified, or the expressed duration is negative, the audio
25138 is supposed to be generated forever.
25139
25140 nb_samples, n
25141 Set the number of samples per channel per each output frame,
25142 default to 1024.
25143
25144 sample_rate, s
25145 Specify the sample rate, default to 44100.
25146
25147 Each expression in exprs can contain the following constants:
25148
25149 n number of the evaluated sample, starting from 0
25150
25151 t time of the evaluated sample expressed in seconds, starting from 0
25152
25153 s sample rate
25154
25155 Examples
25156
25157 • Generate silence:
25158
25159 aevalsrc=0
25160
25161 • Generate a sin signal with frequency of 440 Hz, set sample rate to
25162 8000 Hz:
25163
25164 aevalsrc="sin(440*2*PI*t):s=8000"
25165
25166 • Generate a two channels signal, specify the channel layout (Front
25167 Center + Back Center) explicitly:
25168
25169 aevalsrc="sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC"
25170
25171 • Generate white noise:
25172
25173 aevalsrc="-2+random(0)"
25174
25175 • Generate an amplitude modulated signal:
25176
25177 aevalsrc="sin(10*2*PI*t)*sin(880*2*PI*t)"
25178
25179 • Generate 2.5 Hz binaural beats on a 360 Hz carrier:
25180
25181 aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)"
25182
25183 afdelaysrc
25184 Generate a fractional delay FIR coefficients.
25185
25186 The resulting stream can be used with afir filter for filtering the
25187 audio signal.
25188
25189 The filter accepts the following options:
25190
25191 delay, d
25192 Set the fractional delay. Default is 0.
25193
25194 sample_rate, r
25195 Set the sample rate, default is 44100.
25196
25197 nb_samples, n
25198 Set the number of samples per each frame. Default is 1024.
25199
25200 taps, t
25201 Set the number of filter coefficents in output audio stream.
25202 Default value is 0.
25203
25204 channel_layout, c
25205 Specifies the channel layout, and can be a string representing a
25206 channel layout. The default value of channel_layout is "stereo".
25207
25208 afirsrc
25209 Generate a FIR coefficients using frequency sampling method.
25210
25211 The resulting stream can be used with afir filter for filtering the
25212 audio signal.
25213
25214 The filter accepts the following options:
25215
25216 taps, t
25217 Set number of filter coefficents in output audio stream. Default
25218 value is 1025.
25219
25220 frequency, f
25221 Set frequency points from where magnitude and phase are set. This
25222 must be in non decreasing order, and first element must be 0, while
25223 last element must be 1. Elements are separated by white spaces.
25224
25225 magnitude, m
25226 Set magnitude value for every frequency point set by frequency.
25227 Number of values must be same as number of frequency points.
25228 Values are separated by white spaces.
25229
25230 phase, p
25231 Set phase value for every frequency point set by frequency. Number
25232 of values must be same as number of frequency points. Values are
25233 separated by white spaces.
25234
25235 sample_rate, r
25236 Set sample rate, default is 44100.
25237
25238 nb_samples, n
25239 Set number of samples per each frame. Default is 1024.
25240
25241 win_func, w
25242 Set window function. Default is blackman.
25243
25244 anullsrc
25245 The null audio source, return unprocessed audio frames. It is mainly
25246 useful as a template and to be employed in analysis / debugging tools,
25247 or as the source for filters which ignore the input data (for example
25248 the sox synth filter).
25249
25250 This source accepts the following options:
25251
25252 channel_layout, cl
25253 Specifies the channel layout, and can be either an integer or a
25254 string representing a channel layout. The default value of
25255 channel_layout is "stereo".
25256
25257 Check the channel_layout_map definition in
25258 libavutil/channel_layout.c for the mapping between strings and
25259 channel layout values.
25260
25261 sample_rate, r
25262 Specifies the sample rate, and defaults to 44100.
25263
25264 nb_samples, n
25265 Set the number of samples per requested frames.
25266
25267 duration, d
25268 Set the duration of the sourced audio. See the Time duration
25269 section in the ffmpeg-utils(1) manual for the accepted syntax.
25270
25271 If not specified, or the expressed duration is negative, the audio
25272 is supposed to be generated forever.
25273
25274 Examples
25275
25276 • Set the sample rate to 48000 Hz and the channel layout to
25277 AV_CH_LAYOUT_MONO.
25278
25279 anullsrc=r=48000:cl=4
25280
25281 • Do the same operation with a more obvious syntax:
25282
25283 anullsrc=r=48000:cl=mono
25284
25285 All the parameters need to be explicitly defined.
25286
25287 flite
25288 Synthesize a voice utterance using the libflite library.
25289
25290 To enable compilation of this filter you need to configure FFmpeg with
25291 "--enable-libflite".
25292
25293 Note that versions of the flite library prior to 2.0 are not thread-
25294 safe.
25295
25296 The filter accepts the following options:
25297
25298 list_voices
25299 If set to 1, list the names of the available voices and exit
25300 immediately. Default value is 0.
25301
25302 nb_samples, n
25303 Set the maximum number of samples per frame. Default value is 512.
25304
25305 textfile
25306 Set the filename containing the text to speak.
25307
25308 text
25309 Set the text to speak.
25310
25311 voice, v
25312 Set the voice to use for the speech synthesis. Default value is
25313 "kal". See also the list_voices option.
25314
25315 Examples
25316
25317 • Read from file speech.txt, and synthesize the text using the
25318 standard flite voice:
25319
25320 flite=textfile=speech.txt
25321
25322 • Read the specified text selecting the "slt" voice:
25323
25324 flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
25325
25326 • Input text to ffmpeg:
25327
25328 ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
25329
25330 • Make ffplay speak the specified text, using "flite" and the "lavfi"
25331 device:
25332
25333 ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
25334
25335 For more information about libflite, check:
25336 <http://www.festvox.org/flite/>
25337
25338 anoisesrc
25339 Generate a noise audio signal.
25340
25341 The filter accepts the following options:
25342
25343 sample_rate, r
25344 Specify the sample rate. Default value is 48000 Hz.
25345
25346 amplitude, a
25347 Specify the amplitude (0.0 - 1.0) of the generated audio stream.
25348 Default value is 1.0.
25349
25350 duration, d
25351 Specify the duration of the generated audio stream. Not specifying
25352 this option results in noise with an infinite length.
25353
25354 color, colour, c
25355 Specify the color of noise. Available noise colors are white, pink,
25356 brown, blue, violet and velvet. Default color is white.
25357
25358 seed, s
25359 Specify a value used to seed the PRNG.
25360
25361 nb_samples, n
25362 Set the number of samples per each output frame, default is 1024.
25363
25364 Examples
25365
25366 • Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate
25367 and an amplitude of 0.5:
25368
25369 anoisesrc=d=60:c=pink:r=44100:a=0.5
25370
25371 hilbert
25372 Generate odd-tap Hilbert transform FIR coefficients.
25373
25374 The resulting stream can be used with afir filter for phase-shifting
25375 the signal by 90 degrees.
25376
25377 This is used in many matrix coding schemes and for analytic signal
25378 generation. The process is often written as a multiplication by i (or
25379 j), the imaginary unit.
25380
25381 The filter accepts the following options:
25382
25383 sample_rate, s
25384 Set sample rate, default is 44100.
25385
25386 taps, t
25387 Set length of FIR filter, default is 22051.
25388
25389 nb_samples, n
25390 Set number of samples per each frame.
25391
25392 win_func, w
25393 Set window function to be used when generating FIR coefficients.
25394
25395 sinc
25396 Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or
25397 band-reject FIR coefficients.
25398
25399 The resulting stream can be used with afir filter for filtering the
25400 audio signal.
25401
25402 The filter accepts the following options:
25403
25404 sample_rate, r
25405 Set sample rate, default is 44100.
25406
25407 nb_samples, n
25408 Set number of samples per each frame. Default is 1024.
25409
25410 hp Set high-pass frequency. Default is 0.
25411
25412 lp Set low-pass frequency. Default is 0. If high-pass frequency is
25413 lower than low-pass frequency and low-pass frequency is higher than
25414 0 then filter will create band-pass filter coefficients, otherwise
25415 band-reject filter coefficients.
25416
25417 phase
25418 Set filter phase response. Default is 50. Allowed range is from 0
25419 to 100.
25420
25421 beta
25422 Set Kaiser window beta.
25423
25424 att Set stop-band attenuation. Default is 120dB, allowed range is from
25425 40 to 180 dB.
25426
25427 round
25428 Enable rounding, by default is disabled.
25429
25430 hptaps
25431 Set number of taps for high-pass filter.
25432
25433 lptaps
25434 Set number of taps for low-pass filter.
25435
25436 sine
25437 Generate an audio signal made of a sine wave with amplitude 1/8.
25438
25439 The audio signal is bit-exact.
25440
25441 The filter accepts the following options:
25442
25443 frequency, f
25444 Set the carrier frequency. Default is 440 Hz.
25445
25446 beep_factor, b
25447 Enable a periodic beep every second with frequency beep_factor
25448 times the carrier frequency. Default is 0, meaning the beep is
25449 disabled.
25450
25451 sample_rate, r
25452 Specify the sample rate, default is 44100.
25453
25454 duration, d
25455 Specify the duration of the generated audio stream.
25456
25457 samples_per_frame
25458 Set the number of samples per output frame.
25459
25460 The expression can contain the following constants:
25461
25462 n The (sequential) number of the output audio frame, starting
25463 from 0.
25464
25465 pts The PTS (Presentation TimeStamp) of the output audio frame,
25466 expressed in TB units.
25467
25468 t The PTS of the output audio frame, expressed in seconds.
25469
25470 TB The timebase of the output audio frames.
25471
25472 Default is 1024.
25473
25474 Examples
25475
25476 • Generate a simple 440 Hz sine wave:
25477
25478 sine
25479
25480 • Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5
25481 seconds:
25482
25483 sine=220:4:d=5
25484 sine=f=220:b=4:d=5
25485 sine=frequency=220:beep_factor=4:duration=5
25486
25487 • Generate a 1 kHz sine wave following "1602,1601,1602,1601,1602"
25488 NTSC pattern:
25489
25490 sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
25491
25493 Below is a description of the currently available audio sinks.
25494
25495 abuffersink
25496 Buffer audio frames, and make them available to the end of filter
25497 chain.
25498
25499 This sink is mainly intended for programmatic use, in particular
25500 through the interface defined in libavfilter/buffersink.h or the
25501 options system.
25502
25503 It accepts a pointer to an AVABufferSinkContext structure, which
25504 defines the incoming buffers' formats, to be passed as the opaque
25505 parameter to "avfilter_init_filter" for initialization.
25506
25507 anullsink
25508 Null audio sink; do absolutely nothing with the input audio. It is
25509 mainly useful as a template and for use in analysis / debugging tools.
25510
25512 When you configure your FFmpeg build, you can disable any of the
25513 existing filters using "--disable-filters". The configure output will
25514 show the video filters included in your build.
25515
25516 Below is a description of the currently available video filters.
25517
25518 addroi
25519 Mark a region of interest in a video frame.
25520
25521 The frame data is passed through unchanged, but metadata is attached to
25522 the frame indicating regions of interest which can affect the behaviour
25523 of later encoding. Multiple regions can be marked by applying the
25524 filter multiple times.
25525
25526 x Region distance in pixels from the left edge of the frame.
25527
25528 y Region distance in pixels from the top edge of the frame.
25529
25530 w Region width in pixels.
25531
25532 h Region height in pixels.
25533
25534 The parameters x, y, w and h are expressions, and may contain the
25535 following variables:
25536
25537 iw Width of the input frame.
25538
25539 ih Height of the input frame.
25540
25541 qoffset
25542 Quantisation offset to apply within the region.
25543
25544 This must be a real value in the range -1 to +1. A value of zero
25545 indicates no quality change. A negative value asks for better
25546 quality (less quantisation), while a positive value asks for worse
25547 quality (greater quantisation).
25548
25549 The range is calibrated so that the extreme values indicate the
25550 largest possible offset - if the rest of the frame is encoded with
25551 the worst possible quality, an offset of -1 indicates that this
25552 region should be encoded with the best possible quality anyway.
25553 Intermediate values are then interpolated in some codec-dependent
25554 way.
25555
25556 For example, in 10-bit H.264 the quantisation parameter varies
25557 between -12 and 51. A typical qoffset value of -1/10 therefore
25558 indicates that this region should be encoded with a QP around one-
25559 tenth of the full range better than the rest of the frame. So, if
25560 most of the frame were to be encoded with a QP of around 30, this
25561 region would get a QP of around 24 (an offset of approximately
25562 -1/10 * (51 - -12) = -6.3). An extreme value of -1 would indicate
25563 that this region should be encoded with the best possible quality
25564 regardless of the treatment of the rest of the frame - that is,
25565 should be encoded at a QP of -12.
25566
25567 clear
25568 If set to true, remove any existing regions of interest marked on
25569 the frame before adding the new one.
25570
25571 Examples
25572
25573 • Mark the centre quarter of the frame as interesting.
25574
25575 addroi=iw/4:ih/4:iw/2:ih/2:-1/10
25576
25577 • Mark the 100-pixel-wide region on the left edge of the frame as
25578 very uninteresting (to be encoded at much lower quality than the
25579 rest of the frame).
25580
25581 addroi=0:0:100:ih:+1/5
25582
25583 alphaextract
25584 Extract the alpha component from the input as a grayscale video. This
25585 is especially useful with the alphamerge filter.
25586
25587 alphamerge
25588 Add or replace the alpha component of the primary input with the
25589 grayscale value of a second input. This is intended for use with
25590 alphaextract to allow the transmission or storage of frame sequences
25591 that have alpha in a format that doesn't support an alpha channel.
25592
25593 For example, to reconstruct full frames from a normal YUV-encoded video
25594 and a separate video created with alphaextract, you might use:
25595
25596 movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
25597
25598 amplify
25599 Amplify differences between current pixel and pixels of adjacent frames
25600 in same pixel location.
25601
25602 This filter accepts the following options:
25603
25604 radius
25605 Set frame radius. Default is 2. Allowed range is from 1 to 63. For
25606 example radius of 3 will instruct filter to calculate average of 7
25607 frames.
25608
25609 factor
25610 Set factor to amplify difference. Default is 2. Allowed range is
25611 from 0 to 65535.
25612
25613 threshold
25614 Set threshold for difference amplification. Any difference greater
25615 or equal to this value will not alter source pixel. Default is 10.
25616 Allowed range is from 0 to 65535.
25617
25618 tolerance
25619 Set tolerance for difference amplification. Any difference lower to
25620 this value will not alter source pixel. Default is 0. Allowed
25621 range is from 0 to 65535.
25622
25623 low Set lower limit for changing source pixel. Default is 65535.
25624 Allowed range is from 0 to 65535. This option controls maximum
25625 possible value that will decrease source pixel value.
25626
25627 high
25628 Set high limit for changing source pixel. Default is 65535. Allowed
25629 range is from 0 to 65535. This option controls maximum possible
25630 value that will increase source pixel value.
25631
25632 planes
25633 Set which planes to filter. Default is all. Allowed range is from 0
25634 to 15.
25635
25636 Commands
25637
25638 This filter supports the following commands that corresponds to option
25639 of same name:
25640
25641 factor
25642 threshold
25643 tolerance
25644 low
25645 high
25646 planes
25647
25648 ass
25649 Same as the subtitles filter, except that it doesn't require libavcodec
25650 and libavformat to work. On the other hand, it is limited to ASS
25651 (Advanced Substation Alpha) subtitles files.
25652
25653 This filter accepts the following option in addition to the common
25654 options from the subtitles filter:
25655
25656 shaping
25657 Set the shaping engine
25658
25659 Available values are:
25660
25661 auto
25662 The default libass shaping engine, which is the best available.
25663
25664 simple
25665 Fast, font-agnostic shaper that can do only substitutions
25666
25667 complex
25668 Slower shaper using OpenType for substitutions and positioning
25669
25670 The default is "auto".
25671
25672 atadenoise
25673 Apply an Adaptive Temporal Averaging Denoiser to the video input.
25674
25675 The filter accepts the following options:
25676
25677 0a Set threshold A for 1st plane. Default is 0.02. Valid range is 0
25678 to 0.3.
25679
25680 0b Set threshold B for 1st plane. Default is 0.04. Valid range is 0
25681 to 5.
25682
25683 1a Set threshold A for 2nd plane. Default is 0.02. Valid range is 0
25684 to 0.3.
25685
25686 1b Set threshold B for 2nd plane. Default is 0.04. Valid range is 0
25687 to 5.
25688
25689 2a Set threshold A for 3rd plane. Default is 0.02. Valid range is 0
25690 to 0.3.
25691
25692 2b Set threshold B for 3rd plane. Default is 0.04. Valid range is 0
25693 to 5.
25694
25695 Threshold A is designed to react on abrupt changes in the input
25696 signal and threshold B is designed to react on continuous changes
25697 in the input signal.
25698
25699 s Set number of frames filter will use for averaging. Default is 9.
25700 Must be odd number in range [5, 129].
25701
25702 p Set what planes of frame filter will use for averaging. Default is
25703 all.
25704
25705 a Set what variant of algorithm filter will use for averaging.
25706 Default is "p" parallel. Alternatively can be set to "s" serial.
25707
25708 Parallel can be faster then serial, while other way around is never
25709 true. Parallel will abort early on first change being greater then
25710 thresholds, while serial will continue processing other side of
25711 frames if they are equal or below thresholds.
25712
25713 0s
25714 1s
25715 2s Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
25716 Valid range is from 0 to 32767. This options controls weight for
25717 each pixel in radius defined by size. Default value means every
25718 pixel have same weight. Setting this option to 0 effectively
25719 disables filtering.
25720
25721 Commands
25722
25723 This filter supports same commands as options except option "s". The
25724 command accepts the same syntax of the corresponding option.
25725
25726 avgblur
25727 Apply average blur filter.
25728
25729 The filter accepts the following options:
25730
25731 sizeX
25732 Set horizontal radius size.
25733
25734 planes
25735 Set which planes to filter. By default all planes are filtered.
25736
25737 sizeY
25738 Set vertical radius size, if zero it will be same as "sizeX".
25739 Default is 0.
25740
25741 Commands
25742
25743 This filter supports same commands as options. The command accepts the
25744 same syntax of the corresponding option.
25745
25746 If the specified expression is not valid, it is kept at its current
25747 value.
25748
25749 backgroundkey
25750 Turns a static background into transparency.
25751
25752 The filter accepts the following option:
25753
25754 threshold
25755 Threshold for scene change detection.
25756
25757 similarity
25758 Similarity percentage with the background.
25759
25760 blend
25761 Set the blend amount for pixels that are not similar.
25762
25763 Commands
25764
25765 This filter supports the all above options as commands.
25766
25767 bbox
25768 Compute the bounding box for the non-black pixels in the input frame
25769 luminance plane.
25770
25771 This filter computes the bounding box containing all the pixels with a
25772 luminance value greater than the minimum allowed value. The parameters
25773 describing the bounding box are printed on the filter log.
25774
25775 The filter accepts the following option:
25776
25777 min_val
25778 Set the minimal luminance value. Default is 16.
25779
25780 Commands
25781
25782 This filter supports the all above options as commands.
25783
25784 bilateral
25785 Apply bilateral filter, spatial smoothing while preserving edges.
25786
25787 The filter accepts the following options:
25788
25789 sigmaS
25790 Set sigma of gaussian function to calculate spatial weight.
25791 Allowed range is 0 to 512. Default is 0.1.
25792
25793 sigmaR
25794 Set sigma of gaussian function to calculate range weight. Allowed
25795 range is 0 to 1. Default is 0.1.
25796
25797 planes
25798 Set planes to filter. Default is first only.
25799
25800 Commands
25801
25802 This filter supports the all above options as commands.
25803
25804 bilateral_cuda
25805 CUDA accelerated bilateral filter, an edge preserving filter. This
25806 filter is mathematically accurate thanks to the use of GPU
25807 acceleration. For best output quality, use one to one chroma
25808 subsampling, i.e. yuv444p format.
25809
25810 The filter accepts the following options:
25811
25812 sigmaS
25813 Set sigma of gaussian function to calculate spatial weight, also
25814 called sigma space. Allowed range is 0.1 to 512. Default is 0.1.
25815
25816 sigmaR
25817 Set sigma of gaussian function to calculate color range weight,
25818 also called sigma color. Allowed range is 0.1 to 512. Default is
25819 0.1.
25820
25821 window_size
25822 Set window size of the bilateral function to determine the number
25823 of neighbours to loop on. If the number entered is even, one will
25824 be added automatically. Allowed range is 1 to 255. Default is 1.
25825
25826 Examples
25827
25828 • Apply the bilateral filter on a video.
25829
25830 ./ffmpeg -v verbose \
25831 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 \
25832 -init_hw_device cuda \
25833 -filter_complex \
25834 " \
25835 [0:v]scale_cuda=format=yuv444p[scaled_video];
25836 [scaled_video]bilateral_cuda=window_size=9:sigmaS=3.0:sigmaR=50.0" \
25837 -an -sn -c:v h264_nvenc -cq 20 out.mp4
25838
25839 bitplanenoise
25840 Show and measure bit plane noise.
25841
25842 The filter accepts the following options:
25843
25844 bitplane
25845 Set which plane to analyze. Default is 1.
25846
25847 filter
25848 Filter out noisy pixels from "bitplane" set above. Default is
25849 disabled.
25850
25851 blackdetect
25852 Detect video intervals that are (almost) completely black. Can be
25853 useful to detect chapter transitions, commercials, or invalid
25854 recordings.
25855
25856 The filter outputs its detection analysis to both the log as well as
25857 frame metadata. If a black segment of at least the specified minimum
25858 duration is found, a line with the start and end timestamps as well as
25859 duration is printed to the log with level "info". In addition, a log
25860 line with level "debug" is printed per frame showing the black amount
25861 detected for that frame.
25862
25863 The filter also attaches metadata to the first frame of a black segment
25864 with key "lavfi.black_start" and to the first frame after the black
25865 segment ends with key "lavfi.black_end". The value is the frame's
25866 timestamp. This metadata is added regardless of the minimum duration
25867 specified.
25868
25869 The filter accepts the following options:
25870
25871 black_min_duration, d
25872 Set the minimum detected black duration expressed in seconds. It
25873 must be a non-negative floating point number.
25874
25875 Default value is 2.0.
25876
25877 picture_black_ratio_th, pic_th
25878 Set the threshold for considering a picture "black". Express the
25879 minimum value for the ratio:
25880
25881 <nb_black_pixels> / <nb_pixels>
25882
25883 for which a picture is considered black. Default value is 0.98.
25884
25885 pixel_black_th, pix_th
25886 Set the threshold for considering a pixel "black".
25887
25888 The threshold expresses the maximum pixel luminance value for which
25889 a pixel is considered "black". The provided value is scaled
25890 according to the following equation:
25891
25892 <absolute_threshold> = <luminance_minimum_value> + <pixel_black_th> * <luminance_range_size>
25893
25894 luminance_range_size and luminance_minimum_value depend on the
25895 input video format, the range is [0-255] for YUV full-range formats
25896 and [16-235] for YUV non full-range formats.
25897
25898 Default value is 0.10.
25899
25900 The following example sets the maximum pixel threshold to the minimum
25901 value, and detects only black intervals of 2 or more seconds:
25902
25903 blackdetect=d=2:pix_th=0.00
25904
25905 blackframe
25906 Detect frames that are (almost) completely black. Can be useful to
25907 detect chapter transitions or commercials. Output lines consist of the
25908 frame number of the detected frame, the percentage of blackness, the
25909 position in the file if known or -1 and the timestamp in seconds.
25910
25911 In order to display the output lines, you need to set the loglevel at
25912 least to the AV_LOG_INFO value.
25913
25914 This filter exports frame metadata "lavfi.blackframe.pblack". The
25915 value represents the percentage of pixels in the picture that are below
25916 the threshold value.
25917
25918 It accepts the following parameters:
25919
25920 amount
25921 The percentage of the pixels that have to be below the threshold;
25922 it defaults to 98.
25923
25924 threshold, thresh
25925 The threshold below which a pixel value is considered black; it
25926 defaults to 32.
25927
25928 blend
25929 Blend two video frames into each other.
25930
25931 The "blend" filter takes two input streams and outputs one stream, the
25932 first input is the "top" layer and second input is "bottom" layer. By
25933 default, the output terminates when the longest input terminates.
25934
25935 The "tblend" (time blend) filter takes two consecutive frames from one
25936 single stream, and outputs the result obtained by blending the new
25937 frame on top of the old frame.
25938
25939 A description of the accepted options follows.
25940
25941 c0_mode
25942 c1_mode
25943 c2_mode
25944 c3_mode
25945 all_mode
25946 Set blend mode for specific pixel component or all pixel components
25947 in case of all_mode. Default value is "normal".
25948
25949 Available values for component modes are:
25950
25951 addition
25952 and
25953 average
25954 bleach
25955 burn
25956 darken
25957 difference
25958 divide
25959 dodge
25960 exclusion
25961 extremity
25962 freeze
25963 geometric
25964 glow
25965 grainextract
25966 grainmerge
25967 hardlight
25968 hardmix
25969 hardoverlay
25970 harmonic
25971 heat
25972 interpolate
25973 lighten
25974 linearlight
25975 multiply
25976 multiply128
25977 negation
25978 normal
25979 or
25980 overlay
25981 phoenix
25982 pinlight
25983 reflect
25984 screen
25985 softdifference
25986 softlight
25987 stain
25988 subtract
25989 vividlight
25990 xor
25991 c0_opacity
25992 c1_opacity
25993 c2_opacity
25994 c3_opacity
25995 all_opacity
25996 Set blend opacity for specific pixel component or all pixel
25997 components in case of all_opacity. Only used in combination with
25998 pixel component blend modes.
25999
26000 c0_expr
26001 c1_expr
26002 c2_expr
26003 c3_expr
26004 all_expr
26005 Set blend expression for specific pixel component or all pixel
26006 components in case of all_expr. Note that related mode options will
26007 be ignored if those are set.
26008
26009 The expressions can use the following variables:
26010
26011 N The sequential number of the filtered frame, starting from 0.
26012
26013 X
26014 Y the coordinates of the current sample
26015
26016 W
26017 H the width and height of currently filtered plane
26018
26019 SW
26020 SH Width and height scale for the plane being filtered. It is the
26021 ratio between the dimensions of the current plane to the luma
26022 plane, e.g. for a "yuv420p" frame, the values are "1,1" for the
26023 luma plane and "0.5,0.5" for the chroma planes.
26024
26025 T Time of the current frame, expressed in seconds.
26026
26027 TOP, A
26028 Value of pixel component at current location for first video
26029 frame (top layer).
26030
26031 BOTTOM, B
26032 Value of pixel component at current location for second video
26033 frame (bottom layer).
26034
26035 The "blend" filter also supports the framesync options.
26036
26037 Examples
26038
26039 • Apply transition from bottom layer to top layer in first 10
26040 seconds:
26041
26042 blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
26043
26044 • Apply linear horizontal transition from top layer to bottom layer:
26045
26046 blend=all_expr='A*(X/W)+B*(1-X/W)'
26047
26048 • Apply 1x1 checkerboard effect:
26049
26050 blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
26051
26052 • Apply uncover left effect:
26053
26054 blend=all_expr='if(gte(N*SW+X,W),A,B)'
26055
26056 • Apply uncover down effect:
26057
26058 blend=all_expr='if(gte(Y-N*SH,0),A,B)'
26059
26060 • Apply uncover up-left effect:
26061
26062 blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
26063
26064 • Split diagonally video and shows top and bottom layer on each side:
26065
26066 blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
26067
26068 • Display differences between the current and the previous frame:
26069
26070 tblend=all_mode=grainextract
26071
26072 Commands
26073
26074 This filter supports same commands as options.
26075
26076 blockdetect
26077 Determines blockiness of frames without altering the input frames.
26078
26079 Based on Remco Muijs and Ihor Kirenko: "A no-reference blocking
26080 artifact measure for adaptive video processing." 2005 13th European
26081 signal processing conference.
26082
26083 The filter accepts the following options:
26084
26085 period_min
26086 period_max
26087 Set minimum and maximum values for determining pixel grids
26088 (periods). Default values are [3,24].
26089
26090 planes
26091 Set planes to filter. Default is first only.
26092
26093 Examples
26094
26095 • Determine blockiness for the first plane and search for periods
26096 within [8,32]:
26097
26098 blockdetect=period_min=8:period_max=32:planes=1
26099
26100 blurdetect
26101 Determines blurriness of frames without altering the input frames.
26102
26103 Based on Marziliano, Pina, et al. "A no-reference perceptual blur
26104 metric." Allows for a block-based abbreviation.
26105
26106 The filter accepts the following options:
26107
26108 low
26109 high
26110 Set low and high threshold values used by the Canny thresholding
26111 algorithm.
26112
26113 The high threshold selects the "strong" edge pixels, which are then
26114 connected through 8-connectivity with the "weak" edge pixels
26115 selected by the low threshold.
26116
26117 low and high threshold values must be chosen in the range [0,1],
26118 and low should be lesser or equal to high.
26119
26120 Default value for low is "20/255", and default value for high is
26121 "50/255".
26122
26123 radius
26124 Define the radius to search around an edge pixel for local maxima.
26125
26126 block_pct
26127 Determine blurriness only for the most significant blocks, given in
26128 percentage.
26129
26130 block_width
26131 Determine blurriness for blocks of width block_width. If set to any
26132 value smaller 1, no blocks are used and the whole image is
26133 processed as one no matter of block_height.
26134
26135 block_height
26136 Determine blurriness for blocks of height block_height. If set to
26137 any value smaller 1, no blocks are used and the whole image is
26138 processed as one no matter of block_width.
26139
26140 planes
26141 Set planes to filter. Default is first only.
26142
26143 Examples
26144
26145 • Determine blur for 80% of most significant 32x32 blocks:
26146
26147 blurdetect=block_width=32:block_height=32:block_pct=80
26148
26149 bm3d
26150 Denoise frames using Block-Matching 3D algorithm.
26151
26152 The filter accepts the following options.
26153
26154 sigma
26155 Set denoising strength. Default value is 1. Allowed range is from
26156 0 to 999.9. The denoising algorithm is very sensitive to sigma, so
26157 adjust it according to the source.
26158
26159 block
26160 Set local patch size. This sets dimensions in 2D.
26161
26162 bstep
26163 Set sliding step for processing blocks. Default value is 4.
26164 Allowed range is from 1 to 64. Smaller values allows processing
26165 more reference blocks and is slower.
26166
26167 group
26168 Set maximal number of similar blocks for 3rd dimension. Default
26169 value is 1. When set to 1, no block matching is done. Larger
26170 values allows more blocks in single group. Allowed range is from 1
26171 to 256.
26172
26173 range
26174 Set radius for search block matching. Default is 9. Allowed range
26175 is from 1 to INT32_MAX.
26176
26177 mstep
26178 Set step between two search locations for block matching. Default
26179 is 1. Allowed range is from 1 to 64. Smaller is slower.
26180
26181 thmse
26182 Set threshold of mean square error for block matching. Valid range
26183 is 0 to INT32_MAX.
26184
26185 hdthr
26186 Set thresholding parameter for hard thresholding in 3D transformed
26187 domain. Larger values results in stronger hard-thresholding
26188 filtering in frequency domain.
26189
26190 estim
26191 Set filtering estimation mode. Can be "basic" or "final". Default
26192 is "basic".
26193
26194 ref If enabled, filter will use 2nd stream for block matching. Default
26195 is disabled for "basic" value of estim option, and always enabled
26196 if value of estim is "final".
26197
26198 planes
26199 Set planes to filter. Default is all available except alpha.
26200
26201 Examples
26202
26203 • Basic filtering with bm3d:
26204
26205 bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
26206
26207 • Same as above, but filtering only luma:
26208
26209 bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
26210
26211 • Same as above, but with both estimation modes:
26212
26213 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
26214
26215 • Same as above, but prefilter with nlmeans filter instead:
26216
26217 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
26218
26219 boxblur
26220 Apply a boxblur algorithm to the input video.
26221
26222 It accepts the following parameters:
26223
26224 luma_radius, lr
26225 luma_power, lp
26226 chroma_radius, cr
26227 chroma_power, cp
26228 alpha_radius, ar
26229 alpha_power, ap
26230
26231 A description of the accepted options follows.
26232
26233 luma_radius, lr
26234 chroma_radius, cr
26235 alpha_radius, ar
26236 Set an expression for the box radius in pixels used for blurring
26237 the corresponding input plane.
26238
26239 The radius value must be a non-negative number, and must not be
26240 greater than the value of the expression "min(w,h)/2" for the luma
26241 and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
26242
26243 Default value for luma_radius is "2". If not specified,
26244 chroma_radius and alpha_radius default to the corresponding value
26245 set for luma_radius.
26246
26247 The expressions can contain the following constants:
26248
26249 w
26250 h The input width and height in pixels.
26251
26252 cw
26253 ch The input chroma image width and height in pixels.
26254
26255 hsub
26256 vsub
26257 The horizontal and vertical chroma subsample values. For
26258 example, for the pixel format "yuv422p", hsub is 2 and vsub is
26259 1.
26260
26261 luma_power, lp
26262 chroma_power, cp
26263 alpha_power, ap
26264 Specify how many times the boxblur filter is applied to the
26265 corresponding plane.
26266
26267 Default value for luma_power is 2. If not specified, chroma_power
26268 and alpha_power default to the corresponding value set for
26269 luma_power.
26270
26271 A value of 0 will disable the effect.
26272
26273 Examples
26274
26275 • Apply a boxblur filter with the luma, chroma, and alpha radii set
26276 to 2:
26277
26278 boxblur=luma_radius=2:luma_power=1
26279 boxblur=2:1
26280
26281 • Set the luma radius to 2, and alpha and chroma radius to 0:
26282
26283 boxblur=2:1:cr=0:ar=0
26284
26285 • Set the luma and chroma radii to a fraction of the video dimension:
26286
26287 boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
26288
26289 bwdif
26290 Deinterlace the input video ("bwdif" stands for "Bob Weaver
26291 Deinterlacing Filter").
26292
26293 Motion adaptive deinterlacing based on yadif with the use of w3fdif and
26294 cubic interpolation algorithms. It accepts the following parameters:
26295
26296 mode
26297 The interlacing mode to adopt. It accepts one of the following
26298 values:
26299
26300 0, send_frame
26301 Output one frame for each frame.
26302
26303 1, send_field
26304 Output one frame for each field.
26305
26306 The default value is "send_field".
26307
26308 parity
26309 The picture field parity assumed for the input interlaced video. It
26310 accepts one of the following values:
26311
26312 0, tff
26313 Assume the top field is first.
26314
26315 1, bff
26316 Assume the bottom field is first.
26317
26318 -1, auto
26319 Enable automatic detection of field parity.
26320
26321 The default value is "auto". If the interlacing is unknown or the
26322 decoder does not export this information, top field first will be
26323 assumed.
26324
26325 deint
26326 Specify which frames to deinterlace. Accepts one of the following
26327 values:
26328
26329 0, all
26330 Deinterlace all frames.
26331
26332 1, interlaced
26333 Only deinterlace frames marked as interlaced.
26334
26335 The default value is "all".
26336
26337 cas
26338 Apply Contrast Adaptive Sharpen filter to video stream.
26339
26340 The filter accepts the following options:
26341
26342 strength
26343 Set the sharpening strength. Default value is 0.
26344
26345 planes
26346 Set planes to filter. Default value is to filter all planes except
26347 alpha plane.
26348
26349 Commands
26350
26351 This filter supports same commands as options.
26352
26353 chromahold
26354 Remove all color information for all colors except for certain one.
26355
26356 The filter accepts the following options:
26357
26358 color
26359 The color which will not be replaced with neutral chroma.
26360
26361 similarity
26362 Similarity percentage with the above color. 0.01 matches only the
26363 exact key color, while 1.0 matches everything.
26364
26365 blend
26366 Blend percentage. 0.0 makes pixels either fully gray, or not gray
26367 at all. Higher values result in more preserved color.
26368
26369 yuv Signals that the color passed is already in YUV instead of RGB.
26370
26371 Literal colors like "green" or "red" don't make sense with this
26372 enabled anymore. This can be used to pass exact YUV values as
26373 hexadecimal numbers.
26374
26375 Commands
26376
26377 This filter supports same commands as options. The command accepts the
26378 same syntax of the corresponding option.
26379
26380 If the specified expression is not valid, it is kept at its current
26381 value.
26382
26383 chromakey
26384 YUV colorspace color/chroma keying.
26385
26386 The filter accepts the following options:
26387
26388 color
26389 The color which will be replaced with transparency.
26390
26391 similarity
26392 Similarity percentage with the key color.
26393
26394 0.01 matches only the exact key color, while 1.0 matches
26395 everything.
26396
26397 blend
26398 Blend percentage.
26399
26400 0.0 makes pixels either fully transparent, or not transparent at
26401 all.
26402
26403 Higher values result in semi-transparent pixels, with a higher
26404 transparency the more similar the pixels color is to the key color.
26405
26406 yuv Signals that the color passed is already in YUV instead of RGB.
26407
26408 Literal colors like "green" or "red" don't make sense with this
26409 enabled anymore. This can be used to pass exact YUV values as
26410 hexadecimal numbers.
26411
26412 Commands
26413
26414 This filter supports same commands as options. The command accepts the
26415 same syntax of the corresponding option.
26416
26417 If the specified expression is not valid, it is kept at its current
26418 value.
26419
26420 Examples
26421
26422 • Make every green pixel in the input image transparent:
26423
26424 ffmpeg -i input.png -vf chromakey=green out.png
26425
26426 • Overlay a greenscreen-video on top of a static black background.
26427
26428 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
26429
26430 chromakey_cuda
26431 CUDA accelerated YUV colorspace color/chroma keying.
26432
26433 This filter works like normal chromakey filter but operates on CUDA
26434 frames. for more details and parameters see chromakey.
26435
26436 Examples
26437
26438 • Make all the green pixels in the input video transparent and use it
26439 as an overlay for another video:
26440
26441 ./ffmpeg \
26442 -hwaccel cuda -hwaccel_output_format cuda -i input_green.mp4 \
26443 -hwaccel cuda -hwaccel_output_format cuda -i base_video.mp4 \
26444 -init_hw_device cuda \
26445 -filter_complex \
26446 " \
26447 [0:v]chromakey_cuda=0x25302D:0.1:0.12:1[overlay_video]; \
26448 [1:v]scale_cuda=format=yuv420p[base]; \
26449 [base][overlay_video]overlay_cuda" \
26450 -an -sn -c:v h264_nvenc -cq 20 output.mp4
26451
26452 • Process two software sources, explicitly uploading the frames:
26453
26454 ./ffmpeg -init_hw_device cuda=cuda -filter_hw_device cuda \
26455 -f lavfi -i color=size=800x600:color=white,format=yuv420p \
26456 -f lavfi -i yuvtestsrc=size=200x200,format=yuv420p \
26457 -filter_complex \
26458 " \
26459 [0]hwupload[under]; \
26460 [1]hwupload,chromakey_cuda=green:0.1:0.12[over]; \
26461 [under][over]overlay_cuda" \
26462 -c:v hevc_nvenc -cq 18 -preset slow output.mp4
26463
26464 chromanr
26465 Reduce chrominance noise.
26466
26467 The filter accepts the following options:
26468
26469 thres
26470 Set threshold for averaging chrominance values. Sum of absolute
26471 difference of Y, U and V pixel components of current pixel and
26472 neighbour pixels lower than this threshold will be used in
26473 averaging. Luma component is left unchanged and is copied to
26474 output. Default value is 30. Allowed range is from 1 to 200.
26475
26476 sizew
26477 Set horizontal radius of rectangle used for averaging. Allowed
26478 range is from 1 to 100. Default value is 5.
26479
26480 sizeh
26481 Set vertical radius of rectangle used for averaging. Allowed range
26482 is from 1 to 100. Default value is 5.
26483
26484 stepw
26485 Set horizontal step when averaging. Default value is 1. Allowed
26486 range is from 1 to 50. Mostly useful to speed-up filtering.
26487
26488 steph
26489 Set vertical step when averaging. Default value is 1. Allowed
26490 range is from 1 to 50. Mostly useful to speed-up filtering.
26491
26492 threy
26493 Set Y threshold for averaging chrominance values. Set finer
26494 control for max allowed difference between Y components of current
26495 pixel and neigbour pixels. Default value is 200. Allowed range is
26496 from 1 to 200.
26497
26498 threu
26499 Set U threshold for averaging chrominance values. Set finer
26500 control for max allowed difference between U components of current
26501 pixel and neigbour pixels. Default value is 200. Allowed range is
26502 from 1 to 200.
26503
26504 threv
26505 Set V threshold for averaging chrominance values. Set finer
26506 control for max allowed difference between V components of current
26507 pixel and neigbour pixels. Default value is 200. Allowed range is
26508 from 1 to 200.
26509
26510 distance
26511 Set distance type used in calculations.
26512
26513 manhattan
26514 Absolute difference.
26515
26516 euclidean
26517 Difference squared.
26518
26519 Default distance type is manhattan.
26520
26521 Commands
26522
26523 This filter supports same commands as options. The command accepts the
26524 same syntax of the corresponding option.
26525
26526 chromashift
26527 Shift chroma pixels horizontally and/or vertically.
26528
26529 The filter accepts the following options:
26530
26531 cbh Set amount to shift chroma-blue horizontally.
26532
26533 cbv Set amount to shift chroma-blue vertically.
26534
26535 crh Set amount to shift chroma-red horizontally.
26536
26537 crv Set amount to shift chroma-red vertically.
26538
26539 edge
26540 Set edge mode, can be smear, default, or warp.
26541
26542 Commands
26543
26544 This filter supports the all above options as commands.
26545
26546 ciescope
26547 Display CIE color diagram with pixels overlaid onto it.
26548
26549 The filter accepts the following options:
26550
26551 system
26552 Set color system.
26553
26554 ntsc, 470m
26555 ebu, 470bg
26556 smpte
26557 240m
26558 apple
26559 widergb
26560 cie1931
26561 rec709, hdtv
26562 uhdtv, rec2020
26563 dcip3
26564 cie Set CIE system.
26565
26566 xyy
26567 ucs
26568 luv
26569 gamuts
26570 Set what gamuts to draw.
26571
26572 See "system" option for available values.
26573
26574 size, s
26575 Set ciescope size, by default set to 512.
26576
26577 intensity, i
26578 Set intensity used to map input pixel values to CIE diagram.
26579
26580 contrast
26581 Set contrast used to draw tongue colors that are out of active
26582 color system gamut.
26583
26584 corrgamma
26585 Correct gamma displayed on scope, by default enabled.
26586
26587 showwhite
26588 Show white point on CIE diagram, by default disabled.
26589
26590 gamma
26591 Set input gamma. Used only with XYZ input color space.
26592
26593 fill
26594 Fill with CIE colors. By default is enabled.
26595
26596 codecview
26597 Visualize information exported by some codecs.
26598
26599 Some codecs can export information through frames using side-data or
26600 other means. For example, some MPEG based codecs export motion vectors
26601 through the export_mvs flag in the codec flags2 option.
26602
26603 The filter accepts the following option:
26604
26605 block
26606 Display block partition structure using the luma plane.
26607
26608 mv Set motion vectors to visualize.
26609
26610 Available flags for mv are:
26611
26612 pf forward predicted MVs of P-frames
26613
26614 bf forward predicted MVs of B-frames
26615
26616 bb backward predicted MVs of B-frames
26617
26618 qp Display quantization parameters using the chroma planes.
26619
26620 mv_type, mvt
26621 Set motion vectors type to visualize. Includes MVs from all frames
26622 unless specified by frame_type option.
26623
26624 Available flags for mv_type are:
26625
26626 fp forward predicted MVs
26627
26628 bp backward predicted MVs
26629
26630 frame_type, ft
26631 Set frame type to visualize motion vectors of.
26632
26633 Available flags for frame_type are:
26634
26635 if intra-coded frames (I-frames)
26636
26637 pf predicted frames (P-frames)
26638
26639 bf bi-directionally predicted frames (B-frames)
26640
26641 Examples
26642
26643 • Visualize forward predicted MVs of all frames using ffplay:
26644
26645 ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
26646
26647 • Visualize multi-directionals MVs of P and B-Frames using ffplay:
26648
26649 ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
26650
26651 colorbalance
26652 Modify intensity of primary colors (red, green and blue) of input
26653 frames.
26654
26655 The filter allows an input frame to be adjusted in the shadows,
26656 midtones or highlights regions for the red-cyan, green-magenta or blue-
26657 yellow balance.
26658
26659 A positive adjustment value shifts the balance towards the primary
26660 color, a negative value towards the complementary color.
26661
26662 The filter accepts the following options:
26663
26664 rs
26665 gs
26666 bs Adjust red, green and blue shadows (darkest pixels).
26667
26668 rm
26669 gm
26670 bm Adjust red, green and blue midtones (medium pixels).
26671
26672 rh
26673 gh
26674 bh Adjust red, green and blue highlights (brightest pixels).
26675
26676 Allowed ranges for options are "[-1.0, 1.0]". Defaults are 0.
26677
26678 pl Preserve lightness when changing color balance. Default is
26679 disabled.
26680
26681 Examples
26682
26683 • Add red color cast to shadows:
26684
26685 colorbalance=rs=.3
26686
26687 Commands
26688
26689 This filter supports the all above options as commands.
26690
26691 colorcontrast
26692 Adjust color contrast between RGB components.
26693
26694 The filter accepts the following options:
26695
26696 rc Set the red-cyan contrast. Defaults is 0.0. Allowed range is from
26697 -1.0 to 1.0.
26698
26699 gm Set the green-magenta contrast. Defaults is 0.0. Allowed range is
26700 from -1.0 to 1.0.
26701
26702 by Set the blue-yellow contrast. Defaults is 0.0. Allowed range is
26703 from -1.0 to 1.0.
26704
26705 rcw
26706 gmw
26707 byw Set the weight of each "rc", "gm", "by" option value. Default value
26708 is 0.0. Allowed range is from 0.0 to 1.0. If all weights are 0.0
26709 filtering is disabled.
26710
26711 pl Set the amount of preserving lightness. Default value is 0.0.
26712 Allowed range is from 0.0 to 1.0.
26713
26714 Commands
26715
26716 This filter supports the all above options as commands.
26717
26718 colorcorrect
26719 Adjust color white balance selectively for blacks and whites. This
26720 filter operates in YUV colorspace.
26721
26722 The filter accepts the following options:
26723
26724 rl Set the red shadow spot. Allowed range is from -1.0 to 1.0.
26725 Default value is 0.
26726
26727 bl Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
26728 Default value is 0.
26729
26730 rh Set the red highlight spot. Allowed range is from -1.0 to 1.0.
26731 Default value is 0.
26732
26733 bh Set the red highlight spot. Allowed range is from -1.0 to 1.0.
26734 Default value is 0.
26735
26736 saturation
26737 Set the amount of saturation. Allowed range is from -3.0 to 3.0.
26738 Default value is 1.
26739
26740 analyze
26741 If set to anything other than "manual" it will analyze every frame
26742 and use derived parameters for filtering output frame.
26743
26744 Possible values are:
26745
26746 manual
26747 average
26748 minmax
26749 median
26750
26751 Default value is "manual".
26752
26753 Commands
26754
26755 This filter supports the all above options as commands.
26756
26757 colorchannelmixer
26758 Adjust video input frames by re-mixing color channels.
26759
26760 This filter modifies a color channel by adding the values associated to
26761 the other channels of the same pixels. For example if the value to
26762 modify is red, the output value will be:
26763
26764 <red>=<red>*<rr> + <blue>*<rb> + <green>*<rg> + <alpha>*<ra>
26765
26766 The filter accepts the following options:
26767
26768 rr
26769 rg
26770 rb
26771 ra Adjust contribution of input red, green, blue and alpha channels
26772 for output red channel. Default is 1 for rr, and 0 for rg, rb and
26773 ra.
26774
26775 gr
26776 gg
26777 gb
26778 ga Adjust contribution of input red, green, blue and alpha channels
26779 for output green channel. Default is 1 for gg, and 0 for gr, gb
26780 and ga.
26781
26782 br
26783 bg
26784 bb
26785 ba Adjust contribution of input red, green, blue and alpha channels
26786 for output blue channel. Default is 1 for bb, and 0 for br, bg and
26787 ba.
26788
26789 ar
26790 ag
26791 ab
26792 aa Adjust contribution of input red, green, blue and alpha channels
26793 for output alpha channel. Default is 1 for aa, and 0 for ar, ag
26794 and ab.
26795
26796 Allowed ranges for options are "[-2.0, 2.0]".
26797
26798 pc Set preserve color mode. The accepted values are:
26799
26800 none
26801 Disable color preserving, this is default.
26802
26803 lum Preserve luminance.
26804
26805 max Preserve max value of RGB triplet.
26806
26807 avg Preserve average value of RGB triplet.
26808
26809 sum Preserve sum value of RGB triplet.
26810
26811 nrm Preserve normalized value of RGB triplet.
26812
26813 pwr Preserve power value of RGB triplet.
26814
26815 pa Set the preserve color amount when changing colors. Allowed range
26816 is from "[0.0, 1.0]". Default is 0.0, thus disabled.
26817
26818 Examples
26819
26820 • Convert source to grayscale:
26821
26822 colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
26823
26824 • Simulate sepia tones:
26825
26826 colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
26827
26828 Commands
26829
26830 This filter supports the all above options as commands.
26831
26832 colorize
26833 Overlay a solid color on the video stream.
26834
26835 The filter accepts the following options:
26836
26837 hue Set the color hue. Allowed range is from 0 to 360. Default value
26838 is 0.
26839
26840 saturation
26841 Set the color saturation. Allowed range is from 0 to 1. Default
26842 value is 0.5.
26843
26844 lightness
26845 Set the color lightness. Allowed range is from 0 to 1. Default
26846 value is 0.5.
26847
26848 mix Set the mix of source lightness. By default is set to 1.0. Allowed
26849 range is from 0.0 to 1.0.
26850
26851 Commands
26852
26853 This filter supports the all above options as commands.
26854
26855 colorkey
26856 RGB colorspace color keying. This filter operates on 8-bit RGB format
26857 frames by setting the alpha component of each pixel which falls within
26858 the similarity radius of the key color to 0. The alpha value for pixels
26859 outside the similarity radius depends on the value of the blend option.
26860
26861 The filter accepts the following options:
26862
26863 color
26864 Set the color for which alpha will be set to 0 (full transparency).
26865 See "Color" section in the ffmpeg-utils manual. Default is
26866 "black".
26867
26868 similarity
26869 Set the radius from the key color within which other colors also
26870 have full transparency. The computed distance is related to the
26871 unit fractional distance in 3D space between the RGB values of the
26872 key color and the pixel's color. Range is 0.01 to 1.0. 0.01 matches
26873 within a very small radius around the exact key color, while 1.0
26874 matches everything. Default is 0.01.
26875
26876 blend
26877 Set how the alpha value for pixels that fall outside the similarity
26878 radius is computed. 0.0 makes pixels either fully transparent or
26879 fully opaque. Higher values result in semi-transparent pixels,
26880 with greater transparency the more similar the pixel color is to
26881 the key color. Range is 0.0 to 1.0. Default is 0.0.
26882
26883 Examples
26884
26885 • Make every green pixel in the input image transparent:
26886
26887 ffmpeg -i input.png -vf colorkey=green out.png
26888
26889 • Overlay a greenscreen-video on top of a static background image.
26890
26891 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
26892
26893 Commands
26894
26895 This filter supports same commands as options. The command accepts the
26896 same syntax of the corresponding option.
26897
26898 If the specified expression is not valid, it is kept at its current
26899 value.
26900
26901 colorhold
26902 Remove all color information for all RGB colors except for certain one.
26903
26904 The filter accepts the following options:
26905
26906 color
26907 The color which will not be replaced with neutral gray.
26908
26909 similarity
26910 Similarity percentage with the above color. 0.01 matches only the
26911 exact key color, while 1.0 matches everything.
26912
26913 blend
26914 Blend percentage. 0.0 makes pixels fully gray. Higher values
26915 result in more preserved color.
26916
26917 Commands
26918
26919 This filter supports same commands as options. The command accepts the
26920 same syntax of the corresponding option.
26921
26922 If the specified expression is not valid, it is kept at its current
26923 value.
26924
26925 colorlevels
26926 Adjust video input frames using levels.
26927
26928 The filter accepts the following options:
26929
26930 rimin
26931 gimin
26932 bimin
26933 aimin
26934 Adjust red, green, blue and alpha input black point. Allowed
26935 ranges for options are "[-1.0, 1.0]". Defaults are 0.
26936
26937 rimax
26938 gimax
26939 bimax
26940 aimax
26941 Adjust red, green, blue and alpha input white point. Allowed
26942 ranges for options are "[-1.0, 1.0]". Defaults are 1.
26943
26944 Input levels are used to lighten highlights (bright tones), darken
26945 shadows (dark tones), change the balance of bright and dark tones.
26946
26947 romin
26948 gomin
26949 bomin
26950 aomin
26951 Adjust red, green, blue and alpha output black point. Allowed
26952 ranges for options are "[0, 1.0]". Defaults are 0.
26953
26954 romax
26955 gomax
26956 bomax
26957 aomax
26958 Adjust red, green, blue and alpha output white point. Allowed
26959 ranges for options are "[0, 1.0]". Defaults are 1.
26960
26961 Output levels allows manual selection of a constrained output level
26962 range.
26963
26964 preserve
26965 Set preserve color mode. The accepted values are:
26966
26967 none
26968 Disable color preserving, this is default.
26969
26970 lum Preserve luminance.
26971
26972 max Preserve max value of RGB triplet.
26973
26974 avg Preserve average value of RGB triplet.
26975
26976 sum Preserve sum value of RGB triplet.
26977
26978 nrm Preserve normalized value of RGB triplet.
26979
26980 pwr Preserve power value of RGB triplet.
26981
26982 Examples
26983
26984 • Make video output darker:
26985
26986 colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
26987
26988 • Increase contrast:
26989
26990 colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
26991
26992 • Make video output lighter:
26993
26994 colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
26995
26996 • Increase brightness:
26997
26998 colorlevels=romin=0.5:gomin=0.5:bomin=0.5
26999
27000 Commands
27001
27002 This filter supports the all above options as commands.
27003
27004 colormap
27005 Apply custom color maps to video stream.
27006
27007 This filter needs three input video streams. First stream is video
27008 stream that is going to be filtered out. Second and third video stream
27009 specify color patches for source color to target color mapping.
27010
27011 The filter accepts the following options:
27012
27013 patch_size
27014 Set the source and target video stream patch size in pixels.
27015
27016 nb_patches
27017 Set the max number of used patches from source and target video
27018 stream. Default value is number of patches available in additional
27019 video streams. Max allowed number of patches is 64.
27020
27021 type
27022 Set the adjustments used for target colors. Can be "relative" or
27023 "absolute". Defaults is "absolute".
27024
27025 kernel
27026 Set the kernel used to measure color differences between mapped
27027 colors.
27028
27029 The accepted values are:
27030
27031 euclidean
27032 weuclidean
27033
27034 Default is "euclidean".
27035
27036 colormatrix
27037 Convert color matrix.
27038
27039 The filter accepts the following options:
27040
27041 src
27042 dst Specify the source and destination color matrix. Both values must
27043 be specified.
27044
27045 The accepted values are:
27046
27047 bt709
27048 BT.709
27049
27050 fcc FCC
27051
27052 bt601
27053 BT.601
27054
27055 bt470
27056 BT.470
27057
27058 bt470bg
27059 BT.470BG
27060
27061 smpte170m
27062 SMPTE-170M
27063
27064 smpte240m
27065 SMPTE-240M
27066
27067 bt2020
27068 BT.2020
27069
27070 For example to convert from BT.601 to SMPTE-240M, use the command:
27071
27072 colormatrix=bt601:smpte240m
27073
27074 colorspace
27075 Convert colorspace, transfer characteristics or color primaries. Input
27076 video needs to have an even size.
27077
27078 The filter accepts the following options:
27079
27080 all Specify all color properties at once.
27081
27082 The accepted values are:
27083
27084 bt470m
27085 BT.470M
27086
27087 bt470bg
27088 BT.470BG
27089
27090 bt601-6-525
27091 BT.601-6 525
27092
27093 bt601-6-625
27094 BT.601-6 625
27095
27096 bt709
27097 BT.709
27098
27099 smpte170m
27100 SMPTE-170M
27101
27102 smpte240m
27103 SMPTE-240M
27104
27105 bt2020
27106 BT.2020
27107
27108 space
27109 Specify output colorspace.
27110
27111 The accepted values are:
27112
27113 bt709
27114 BT.709
27115
27116 fcc FCC
27117
27118 bt470bg
27119 BT.470BG or BT.601-6 625
27120
27121 smpte170m
27122 SMPTE-170M or BT.601-6 525
27123
27124 smpte240m
27125 SMPTE-240M
27126
27127 ycgco
27128 YCgCo
27129
27130 bt2020ncl
27131 BT.2020 with non-constant luminance
27132
27133 trc Specify output transfer characteristics.
27134
27135 The accepted values are:
27136
27137 bt709
27138 BT.709
27139
27140 bt470m
27141 BT.470M
27142
27143 bt470bg
27144 BT.470BG
27145
27146 gamma22
27147 Constant gamma of 2.2
27148
27149 gamma28
27150 Constant gamma of 2.8
27151
27152 smpte170m
27153 SMPTE-170M, BT.601-6 625 or BT.601-6 525
27154
27155 smpte240m
27156 SMPTE-240M
27157
27158 srgb
27159 SRGB
27160
27161 iec61966-2-1
27162 iec61966-2-1
27163
27164 iec61966-2-4
27165 iec61966-2-4
27166
27167 xvycc
27168 xvycc
27169
27170 bt2020-10
27171 BT.2020 for 10-bits content
27172
27173 bt2020-12
27174 BT.2020 for 12-bits content
27175
27176 primaries
27177 Specify output color primaries.
27178
27179 The accepted values are:
27180
27181 bt709
27182 BT.709
27183
27184 bt470m
27185 BT.470M
27186
27187 bt470bg
27188 BT.470BG or BT.601-6 625
27189
27190 smpte170m
27191 SMPTE-170M or BT.601-6 525
27192
27193 smpte240m
27194 SMPTE-240M
27195
27196 film
27197 film
27198
27199 smpte431
27200 SMPTE-431
27201
27202 smpte432
27203 SMPTE-432
27204
27205 bt2020
27206 BT.2020
27207
27208 jedec-p22
27209 JEDEC P22 phosphors
27210
27211 range
27212 Specify output color range.
27213
27214 The accepted values are:
27215
27216 tv TV (restricted) range
27217
27218 mpeg
27219 MPEG (restricted) range
27220
27221 pc PC (full) range
27222
27223 jpeg
27224 JPEG (full) range
27225
27226 format
27227 Specify output color format.
27228
27229 The accepted values are:
27230
27231 yuv420p
27232 YUV 4:2:0 planar 8-bits
27233
27234 yuv420p10
27235 YUV 4:2:0 planar 10-bits
27236
27237 yuv420p12
27238 YUV 4:2:0 planar 12-bits
27239
27240 yuv422p
27241 YUV 4:2:2 planar 8-bits
27242
27243 yuv422p10
27244 YUV 4:2:2 planar 10-bits
27245
27246 yuv422p12
27247 YUV 4:2:2 planar 12-bits
27248
27249 yuv444p
27250 YUV 4:4:4 planar 8-bits
27251
27252 yuv444p10
27253 YUV 4:4:4 planar 10-bits
27254
27255 yuv444p12
27256 YUV 4:4:4 planar 12-bits
27257
27258 fast
27259 Do a fast conversion, which skips gamma/primary correction. This
27260 will take significantly less CPU, but will be mathematically
27261 incorrect. To get output compatible with that produced by the
27262 colormatrix filter, use fast=1.
27263
27264 dither
27265 Specify dithering mode.
27266
27267 The accepted values are:
27268
27269 none
27270 No dithering
27271
27272 fsb Floyd-Steinberg dithering
27273
27274 wpadapt
27275 Whitepoint adaptation mode.
27276
27277 The accepted values are:
27278
27279 bradford
27280 Bradford whitepoint adaptation
27281
27282 vonkries
27283 von Kries whitepoint adaptation
27284
27285 identity
27286 identity whitepoint adaptation (i.e. no whitepoint adaptation)
27287
27288 iall
27289 Override all input properties at once. Same accepted values as all.
27290
27291 ispace
27292 Override input colorspace. Same accepted values as space.
27293
27294 iprimaries
27295 Override input color primaries. Same accepted values as primaries.
27296
27297 itrc
27298 Override input transfer characteristics. Same accepted values as
27299 trc.
27300
27301 irange
27302 Override input color range. Same accepted values as range.
27303
27304 The filter converts the transfer characteristics, color space and color
27305 primaries to the specified user values. The output value, if not
27306 specified, is set to a default value based on the "all" property. If
27307 that property is also not specified, the filter will log an error. The
27308 output color range and format default to the same value as the input
27309 color range and format. The input transfer characteristics, color
27310 space, color primaries and color range should be set on the input data.
27311 If any of these are missing, the filter will log an error and no
27312 conversion will take place.
27313
27314 For example to convert the input to SMPTE-240M, use the command:
27315
27316 colorspace=smpte240m
27317
27318 colorspace_cuda
27319 CUDA accelerated implementation of the colorspace filter.
27320
27321 It is by no means feature complete compared to the software colorspace
27322 filter, and at the current time only supports color range conversion
27323 between jpeg/full and mpeg/limited range.
27324
27325 The filter accepts the following options:
27326
27327 range
27328 Specify output color range.
27329
27330 The accepted values are:
27331
27332 tv TV (restricted) range
27333
27334 mpeg
27335 MPEG (restricted) range
27336
27337 pc PC (full) range
27338
27339 jpeg
27340 JPEG (full) range
27341
27342 colortemperature
27343 Adjust color temperature in video to simulate variations in ambient
27344 color temperature.
27345
27346 The filter accepts the following options:
27347
27348 temperature
27349 Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
27350 Default value is 6500 K.
27351
27352 mix Set mixing with filtered output. Allowed range is from 0 to 1.
27353 Default value is 1.
27354
27355 pl Set the amount of preserving lightness. Allowed range is from 0 to
27356 1. Default value is 0.
27357
27358 Commands
27359
27360 This filter supports same commands as options.
27361
27362 convolution
27363 Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49
27364 elements.
27365
27366 The filter accepts the following options:
27367
27368 0m
27369 1m
27370 2m
27371 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49
27372 signed integers in square mode, and from 1 to 49 odd number of
27373 signed integers in row mode.
27374
27375 0rdiv
27376 1rdiv
27377 2rdiv
27378 3rdiv
27379 Set multiplier for calculated value for each plane. If unset or 0,
27380 it will be sum of all matrix elements.
27381
27382 0bias
27383 1bias
27384 2bias
27385 3bias
27386 Set bias for each plane. This value is added to the result of the
27387 multiplication. Useful for making the overall image brighter or
27388 darker. Default is 0.0.
27389
27390 0mode
27391 1mode
27392 2mode
27393 3mode
27394 Set matrix mode for each plane. Can be square, row or column.
27395 Default is square.
27396
27397 Commands
27398
27399 This filter supports the all above options as commands.
27400
27401 Examples
27402
27403 • Apply sharpen:
27404
27405 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"
27406
27407 • Apply blur:
27408
27409 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"
27410
27411 • Apply edge enhance:
27412
27413 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"
27414
27415 • Apply edge detect:
27416
27417 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"
27418
27419 • Apply laplacian edge detector which includes diagonals:
27420
27421 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"
27422
27423 • Apply emboss:
27424
27425 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"
27426
27427 convolve
27428 Apply 2D convolution of video stream in frequency domain using second
27429 stream as impulse.
27430
27431 The filter accepts the following options:
27432
27433 planes
27434 Set which planes to process.
27435
27436 impulse
27437 Set which impulse video frames will be processed, can be first or
27438 all. Default is all.
27439
27440 The "convolve" filter also supports the framesync options.
27441
27442 copy
27443 Copy the input video source unchanged to the output. This is mainly
27444 useful for testing purposes.
27445
27446 coreimage
27447 Video filtering on GPU using Apple's CoreImage API on OSX.
27448
27449 Hardware acceleration is based on an OpenGL context. Usually, this
27450 means it is processed by video hardware. However, software-based OpenGL
27451 implementations exist which means there is no guarantee for hardware
27452 processing. It depends on the respective OSX.
27453
27454 There are many filters and image generators provided by Apple that come
27455 with a large variety of options. The filter has to be referenced by its
27456 name along with its options.
27457
27458 The coreimage filter accepts the following options:
27459
27460 list_filters
27461 List all available filters and generators along with all their
27462 respective options as well as possible minimum and maximum values
27463 along with the default values.
27464
27465 list_filters=true
27466
27467 filter
27468 Specify all filters by their respective name and options. Use
27469 list_filters to determine all valid filter names and options.
27470 Numerical options are specified by a float value and are
27471 automatically clamped to their respective value range. Vector and
27472 color options have to be specified by a list of space separated
27473 float values. Character escaping has to be done. A special option
27474 name "default" is available to use default options for a filter.
27475
27476 It is required to specify either "default" or at least one of the
27477 filter options. All omitted options are used with their default
27478 values. The syntax of the filter string is as follows:
27479
27480 filter=<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...][#<NAME>@<OPTION>=<VALUE>[@<OPTION>=<VALUE>][@...]][#...]
27481
27482 output_rect
27483 Specify a rectangle where the output of the filter chain is copied
27484 into the input image. It is given by a list of space separated
27485 float values:
27486
27487 output_rect=x\ y\ width\ height
27488
27489 If not given, the output rectangle equals the dimensions of the
27490 input image. The output rectangle is automatically cropped at the
27491 borders of the input image. Negative values are valid for each
27492 component.
27493
27494 output_rect=25\ 25\ 100\ 100
27495
27496 Several filters can be chained for successive processing without GPU-
27497 HOST transfers allowing for fast processing of complex filter chains.
27498 Currently, only filters with zero (generators) or exactly one (filters)
27499 input image and one output image are supported. Also, transition
27500 filters are not yet usable as intended.
27501
27502 Some filters generate output images with additional padding depending
27503 on the respective filter kernel. The padding is automatically removed
27504 to ensure the filter output has the same size as the input image.
27505
27506 For image generators, the size of the output image is determined by the
27507 previous output image of the filter chain or the input image of the
27508 whole filterchain, respectively. The generators do not use the pixel
27509 information of this image to generate their output. However, the
27510 generated output is blended onto this image, resulting in partial or
27511 complete coverage of the output image.
27512
27513 The coreimagesrc video source can be used for generating input images
27514 which are directly fed into the filter chain. By using it, providing
27515 input images by another video source or an input video is not required.
27516
27517 Examples
27518
27519 • List all filters available:
27520
27521 coreimage=list_filters=true
27522
27523 • Use the CIBoxBlur filter with default options to blur an image:
27524
27525 coreimage=filter=CIBoxBlur@default
27526
27527 • Use a filter chain with CISepiaTone at default values and
27528 CIVignetteEffect with its center at 100x100 and a radius of 50
27529 pixels:
27530
27531 coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
27532
27533 • Use nullsrc and CIQRCodeGenerator to create a QR code for the
27534 FFmpeg homepage, given as complete and escaped command-line for
27535 Apple's standard bash shell:
27536
27537 ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
27538
27539 corr
27540 Obtain the correlation between two input videos.
27541
27542 This filter takes two input videos.
27543
27544 Both input videos must have the same resolution and pixel format for
27545 this filter to work correctly. Also it assumes that both inputs have
27546 the same number of frames, which are compared one by one.
27547
27548 The obtained per component, average, min and max correlation is printed
27549 through the logging system.
27550
27551 The filter stores the calculated correlation of each frame in frame
27552 metadata.
27553
27554 This filter also supports the framesync options.
27555
27556 In the below example the input file main.mpg being processed is
27557 compared with the reference file ref.mpg.
27558
27559 ffmpeg -i main.mpg -i ref.mpg -lavfi corr -f null -
27560
27561 cover_rect
27562 Cover a rectangular object
27563
27564 It accepts the following options:
27565
27566 cover
27567 Filepath of the optional cover image, needs to be in yuv420.
27568
27569 mode
27570 Set covering mode.
27571
27572 It accepts the following values:
27573
27574 cover
27575 cover it by the supplied image
27576
27577 blur
27578 cover it by interpolating the surrounding pixels
27579
27580 Default value is blur.
27581
27582 Examples
27583
27584 • Cover a rectangular object by the supplied image of a given video
27585 using ffmpeg:
27586
27587 ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
27588
27589 crop
27590 Crop the input video to given dimensions.
27591
27592 It accepts the following parameters:
27593
27594 w, out_w
27595 The width of the output video. It defaults to "iw". This
27596 expression is evaluated only once during the filter configuration,
27597 or when the w or out_w command is sent.
27598
27599 h, out_h
27600 The height of the output video. It defaults to "ih". This
27601 expression is evaluated only once during the filter configuration,
27602 or when the h or out_h command is sent.
27603
27604 x The horizontal position, in the input video, of the left edge of
27605 the output video. It defaults to "(in_w-out_w)/2". This expression
27606 is evaluated per-frame.
27607
27608 y The vertical position, in the input video, of the top edge of the
27609 output video. It defaults to "(in_h-out_h)/2". This expression is
27610 evaluated per-frame.
27611
27612 keep_aspect
27613 If set to 1 will force the output display aspect ratio to be the
27614 same of the input, by changing the output sample aspect ratio. It
27615 defaults to 0.
27616
27617 exact
27618 Enable exact cropping. If enabled, subsampled videos will be
27619 cropped at exact width/height/x/y as specified and will not be
27620 rounded to nearest smaller value. It defaults to 0.
27621
27622 The out_w, out_h, x, y parameters are expressions containing the
27623 following constants:
27624
27625 x
27626 y The computed values for x and y. They are evaluated for each new
27627 frame.
27628
27629 in_w
27630 in_h
27631 The input width and height.
27632
27633 iw
27634 ih These are the same as in_w and in_h.
27635
27636 out_w
27637 out_h
27638 The output (cropped) width and height.
27639
27640 ow
27641 oh These are the same as out_w and out_h.
27642
27643 a same as iw / ih
27644
27645 sar input sample aspect ratio
27646
27647 dar input display aspect ratio, it is the same as (iw / ih) * sar
27648
27649 hsub
27650 vsub
27651 horizontal and vertical chroma subsample values. For example for
27652 the pixel format "yuv422p" hsub is 2 and vsub is 1.
27653
27654 n The number of the input frame, starting from 0.
27655
27656 pos the position in the file of the input frame, NAN if unknown
27657
27658 t The timestamp expressed in seconds. It's NAN if the input timestamp
27659 is unknown.
27660
27661 The expression for out_w may depend on the value of out_h, and the
27662 expression for out_h may depend on out_w, but they cannot depend on x
27663 and y, as x and y are evaluated after out_w and out_h.
27664
27665 The x and y parameters specify the expressions for the position of the
27666 top-left corner of the output (non-cropped) area. They are evaluated
27667 for each frame. If the evaluated value is not valid, it is approximated
27668 to the nearest valid value.
27669
27670 The expression for x may depend on y, and the expression for y may
27671 depend on x.
27672
27673 Examples
27674
27675 • Crop area with size 100x100 at position (12,34).
27676
27677 crop=100:100:12:34
27678
27679 Using named options, the example above becomes:
27680
27681 crop=w=100:h=100:x=12:y=34
27682
27683 • Crop the central input area with size 100x100:
27684
27685 crop=100:100
27686
27687 • Crop the central input area with size 2/3 of the input video:
27688
27689 crop=2/3*in_w:2/3*in_h
27690
27691 • Crop the input video central square:
27692
27693 crop=out_w=in_h
27694 crop=in_h
27695
27696 • Delimit the rectangle with the top-left corner placed at position
27697 100:100 and the right-bottom corner corresponding to the right-
27698 bottom corner of the input image.
27699
27700 crop=in_w-100:in_h-100:100:100
27701
27702 • Crop 10 pixels from the left and right borders, and 20 pixels from
27703 the top and bottom borders
27704
27705 crop=in_w-2*10:in_h-2*20
27706
27707 • Keep only the bottom right quarter of the input image:
27708
27709 crop=in_w/2:in_h/2:in_w/2:in_h/2
27710
27711 • Crop height for getting Greek harmony:
27712
27713 crop=in_w:1/PHI*in_w
27714
27715 • Apply trembling effect:
27716
27717 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)
27718
27719 • Apply erratic camera effect depending on timestamp:
27720
27721 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)"
27722
27723 • Set x depending on the value of y:
27724
27725 crop=in_w/2:in_h/2:y:10+10*sin(n/10)
27726
27727 Commands
27728
27729 This filter supports the following commands:
27730
27731 w, out_w
27732 h, out_h
27733 x
27734 y Set width/height of the output video and the horizontal/vertical
27735 position in the input video. The command accepts the same syntax
27736 of the corresponding option.
27737
27738 If the specified expression is not valid, it is kept at its current
27739 value.
27740
27741 cropdetect
27742 Auto-detect the crop size.
27743
27744 It calculates the necessary cropping parameters and prints the
27745 recommended parameters via the logging system. The detected dimensions
27746 correspond to the non-black or video area of the input video according
27747 to mode.
27748
27749 It accepts the following parameters:
27750
27751 mode
27752 Depending on mode crop detection is based on either the mere black
27753 value of surrounding pixels or a combination of motion vectors and
27754 edge pixels.
27755
27756 black
27757 Detect black pixels surrounding the playing video. For fine
27758 control use option limit.
27759
27760 mvedges
27761 Detect the playing video by the motion vectors inside the video
27762 and scanning for edge pixels typically forming the border of a
27763 playing video.
27764
27765 limit
27766 Set higher black value threshold, which can be optionally specified
27767 from nothing (0) to everything (255 for 8-bit based formats). An
27768 intensity value greater to the set value is considered non-black.
27769 It defaults to 24. You can also specify a value between 0.0 and
27770 1.0 which will be scaled depending on the bitdepth of the pixel
27771 format.
27772
27773 round
27774 The value which the width/height should be divisible by. It
27775 defaults to 16. The offset is automatically adjusted to center the
27776 video. Use 2 to get only even dimensions (needed for 4:2:2 video).
27777 16 is best when encoding to most video codecs.
27778
27779 skip
27780 Set the number of initial frames for which evaluation is skipped.
27781 Default is 2. Range is 0 to INT_MAX.
27782
27783 reset_count, reset
27784 Set the counter that determines after how many frames cropdetect
27785 will reset the previously detected largest video area and start
27786 over to detect the current optimal crop area. Default value is 0.
27787
27788 This can be useful when channel logos distort the video area. 0
27789 indicates 'never reset', and returns the largest area encountered
27790 during playback.
27791
27792 mv_threshold
27793 Set motion in pixel units as threshold for motion detection. It
27794 defaults to 8.
27795
27796 low
27797 high
27798 Set low and high threshold values used by the Canny thresholding
27799 algorithm.
27800
27801 The high threshold selects the "strong" edge pixels, which are then
27802 connected through 8-connectivity with the "weak" edge pixels
27803 selected by the low threshold.
27804
27805 low and high threshold values must be chosen in the range [0,1],
27806 and low should be lesser or equal to high.
27807
27808 Default value for low is "5/255", and default value for high is
27809 "15/255".
27810
27811 Examples
27812
27813 • Find video area surrounded by black borders:
27814
27815 ffmpeg -i file.mp4 -vf cropdetect,metadata=mode=print -f null -
27816
27817 • Find an embedded video area, generate motion vectors beforehand:
27818
27819 ffmpeg -i file.mp4 -vf mestimate,cropdetect=mode=mvedges,metadata=mode=print -f null -
27820
27821 • Find an embedded video area, use motion vectors from decoder:
27822
27823 ffmpeg -flags2 +export_mvs -i file.mp4 -vf cropdetect=mode=mvedges,metadata=mode=print -f null -
27824
27825 Commands
27826
27827 This filter supports the following commands:
27828
27829 limit
27830 The command accepts the same syntax of the corresponding option.
27831 If the specified expression is not valid, it is kept at its current
27832 value.
27833
27834 cue
27835 Delay video filtering until a given wallclock timestamp. The filter
27836 first passes on preroll amount of frames, then it buffers at most
27837 buffer amount of frames and waits for the cue. After reaching the cue
27838 it forwards the buffered frames and also any subsequent frames coming
27839 in its input.
27840
27841 The filter can be used synchronize the output of multiple ffmpeg
27842 processes for realtime output devices like decklink. By putting the
27843 delay in the filtering chain and pre-buffering frames the process can
27844 pass on data to output almost immediately after the target wallclock
27845 timestamp is reached.
27846
27847 Perfect frame accuracy cannot be guaranteed, but the result is good
27848 enough for some use cases.
27849
27850 cue The cue timestamp expressed in a UNIX timestamp in microseconds.
27851 Default is 0.
27852
27853 preroll
27854 The duration of content to pass on as preroll expressed in seconds.
27855 Default is 0.
27856
27857 buffer
27858 The maximum duration of content to buffer before waiting for the
27859 cue expressed in seconds. Default is 0.
27860
27861 curves
27862 Apply color adjustments using curves.
27863
27864 This filter is similar to the Adobe Photoshop and GIMP curves tools.
27865 Each component (red, green and blue) has its values defined by N key
27866 points tied from each other using a smooth curve. The x-axis represents
27867 the pixel values from the input frame, and the y-axis the new pixel
27868 values to be set for the output frame.
27869
27870 By default, a component curve is defined by the two points (0;0) and
27871 (1;1). This creates a straight line where each original pixel value is
27872 "adjusted" to its own value, which means no change to the image.
27873
27874 The filter allows you to redefine these two points and add some more. A
27875 new curve will be define to pass smoothly through all these new
27876 coordinates. The new defined points needs to be strictly increasing
27877 over the x-axis, and their x and y values must be in the [0;1]
27878 interval. The curve is formed by using a natural or monotonic cubic
27879 spline interpolation, depending on the interp option (default:
27880 "natural"). The "natural" spline produces a smoother curve in general
27881 while the monotonic ("pchip") spline guarantees the transitions between
27882 the specified points to be monotonic. If the computed curves happened
27883 to go outside the vector spaces, the values will be clipped
27884 accordingly.
27885
27886 The filter accepts the following options:
27887
27888 preset
27889 Select one of the available color presets. This option can be used
27890 in addition to the r, g, b parameters; in this case, the later
27891 options takes priority on the preset values. Available presets
27892 are:
27893
27894 none
27895 color_negative
27896 cross_process
27897 darker
27898 increase_contrast
27899 lighter
27900 linear_contrast
27901 medium_contrast
27902 negative
27903 strong_contrast
27904 vintage
27905
27906 Default is "none".
27907
27908 master, m
27909 Set the master key points. These points will define a second pass
27910 mapping. It is sometimes called a "luminance" or "value" mapping.
27911 It can be used with r, g, b or all since it acts like a post-
27912 processing LUT.
27913
27914 red, r
27915 Set the key points for the red component.
27916
27917 green, g
27918 Set the key points for the green component.
27919
27920 blue, b
27921 Set the key points for the blue component.
27922
27923 all Set the key points for all components (not including master). Can
27924 be used in addition to the other key points component options. In
27925 this case, the unset component(s) will fallback on this all
27926 setting.
27927
27928 psfile
27929 Specify a Photoshop curves file (".acv") to import the settings
27930 from.
27931
27932 plot
27933 Save Gnuplot script of the curves in specified file.
27934
27935 interp
27936 Specify the kind of interpolation. Available algorithms are:
27937
27938 natural
27939 Natural cubic spline using a piece-wise cubic polynomial that
27940 is twice continuously differentiable.
27941
27942 pchip
27943 Monotonic cubic spline using a piecewise cubic Hermite
27944 interpolating polynomial (PCHIP).
27945
27946 To avoid some filtergraph syntax conflicts, each key points list need
27947 to be defined using the following syntax: "x0/y0 x1/y1 x2/y2 ...".
27948
27949 Commands
27950
27951 This filter supports same commands as options.
27952
27953 Examples
27954
27955 • Increase slightly the middle level of blue:
27956
27957 curves=blue='0/0 0.5/0.58 1/1'
27958
27959 • Vintage effect:
27960
27961 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'
27962
27963 Here we obtain the following coordinates for each components:
27964
27965 red "(0;0.11) (0.42;0.51) (1;0.95)"
27966
27967 green
27968 "(0;0) (0.50;0.48) (1;1)"
27969
27970 blue
27971 "(0;0.22) (0.49;0.44) (1;0.80)"
27972
27973 • The previous example can also be achieved with the associated
27974 built-in preset:
27975
27976 curves=preset=vintage
27977
27978 • Or simply:
27979
27980 curves=vintage
27981
27982 • Use a Photoshop preset and redefine the points of the green
27983 component:
27984
27985 curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
27986
27987 • Check out the curves of the "cross_process" profile using ffmpeg
27988 and gnuplot:
27989
27990 ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
27991 gnuplot -p /tmp/curves.plt
27992
27993 datascope
27994 Video data analysis filter.
27995
27996 This filter shows hexadecimal pixel values of part of video.
27997
27998 The filter accepts the following options:
27999
28000 size, s
28001 Set output video size.
28002
28003 x Set x offset from where to pick pixels.
28004
28005 y Set y offset from where to pick pixels.
28006
28007 mode
28008 Set scope mode, can be one of the following:
28009
28010 mono
28011 Draw hexadecimal pixel values with white color on black
28012 background.
28013
28014 color
28015 Draw hexadecimal pixel values with input video pixel color on
28016 black background.
28017
28018 color2
28019 Draw hexadecimal pixel values on color background picked from
28020 input video, the text color is picked in such way so its always
28021 visible.
28022
28023 axis
28024 Draw rows and columns numbers on left and top of video.
28025
28026 opacity
28027 Set background opacity.
28028
28029 format
28030 Set display number format. Can be "hex", or "dec". Default is
28031 "hex".
28032
28033 components
28034 Set pixel components to display. By default all pixel components
28035 are displayed.
28036
28037 Commands
28038
28039 This filter supports same commands as options excluding "size" option.
28040
28041 dblur
28042 Apply Directional blur filter.
28043
28044 The filter accepts the following options:
28045
28046 angle
28047 Set angle of directional blur. Default is 45.
28048
28049 radius
28050 Set radius of directional blur. Default is 5.
28051
28052 planes
28053 Set which planes to filter. By default all planes are filtered.
28054
28055 Commands
28056
28057 This filter supports same commands as options. The command accepts the
28058 same syntax of the corresponding option.
28059
28060 If the specified expression is not valid, it is kept at its current
28061 value.
28062
28063 dctdnoiz
28064 Denoise frames using 2D DCT (frequency domain filtering).
28065
28066 This filter is not designed for real time.
28067
28068 The filter accepts the following options:
28069
28070 sigma, s
28071 Set the noise sigma constant.
28072
28073 This sigma defines a hard threshold of "3 * sigma"; every DCT
28074 coefficient (absolute value) below this threshold with be dropped.
28075
28076 If you need a more advanced filtering, see expr.
28077
28078 Default is 0.
28079
28080 overlap
28081 Set number overlapping pixels for each block. Since the filter can
28082 be slow, you may want to reduce this value, at the cost of a less
28083 effective filter and the risk of various artefacts.
28084
28085 If the overlapping value doesn't permit processing the whole input
28086 width or height, a warning will be displayed and according borders
28087 won't be denoised.
28088
28089 Default value is blocksize-1, which is the best possible setting.
28090
28091 expr, e
28092 Set the coefficient factor expression.
28093
28094 For each coefficient of a DCT block, this expression will be
28095 evaluated as a multiplier value for the coefficient.
28096
28097 If this is option is set, the sigma option will be ignored.
28098
28099 The absolute value of the coefficient can be accessed through the c
28100 variable.
28101
28102 n Set the blocksize using the number of bits. "1<<n" defines the
28103 blocksize, which is the width and height of the processed blocks.
28104
28105 The default value is 3 (8x8) and can be raised to 4 for a blocksize
28106 of 16x16. Note that changing this setting has huge consequences on
28107 the speed processing. Also, a larger block size does not
28108 necessarily means a better de-noising.
28109
28110 Examples
28111
28112 Apply a denoise with a sigma of 4.5:
28113
28114 dctdnoiz=4.5
28115
28116 The same operation can be achieved using the expression system:
28117
28118 dctdnoiz=e='gte(c, 4.5*3)'
28119
28120 Violent denoise using a block size of "16x16":
28121
28122 dctdnoiz=15:n=4
28123
28124 deband
28125 Remove banding artifacts from input video. It works by replacing
28126 banded pixels with average value of referenced pixels.
28127
28128 The filter accepts the following options:
28129
28130 1thr
28131 2thr
28132 3thr
28133 4thr
28134 Set banding detection threshold for each plane. Default is 0.02.
28135 Valid range is 0.00003 to 0.5. If difference between current pixel
28136 and reference pixel is less than threshold, it will be considered
28137 as banded.
28138
28139 range, r
28140 Banding detection range in pixels. Default is 16. If positive,
28141 random number in range 0 to set value will be used. If negative,
28142 exact absolute value will be used. The range defines square of
28143 four pixels around current pixel.
28144
28145 direction, d
28146 Set direction in radians from which four pixel will be compared. If
28147 positive, random direction from 0 to set direction will be picked.
28148 If negative, exact of absolute value will be picked. For example
28149 direction 0, -PI or -2*PI radians will pick only pixels on same row
28150 and -PI/2 will pick only pixels on same column.
28151
28152 blur, b
28153 If enabled, current pixel is compared with average value of all
28154 four surrounding pixels. The default is enabled. If disabled
28155 current pixel is compared with all four surrounding pixels. The
28156 pixel is considered banded if only all four differences with
28157 surrounding pixels are less than threshold.
28158
28159 coupling, c
28160 If enabled, current pixel is changed if and only if all pixel
28161 components are banded, e.g. banding detection threshold is
28162 triggered for all color components. The default is disabled.
28163
28164 Commands
28165
28166 This filter supports the all above options as commands.
28167
28168 deblock
28169 Remove blocking artifacts from input video.
28170
28171 The filter accepts the following options:
28172
28173 filter
28174 Set filter type, can be weak or strong. Default is strong. This
28175 controls what kind of deblocking is applied.
28176
28177 block
28178 Set size of block, allowed range is from 4 to 512. Default is 8.
28179
28180 alpha
28181 beta
28182 gamma
28183 delta
28184 Set blocking detection thresholds. Allowed range is 0 to 1.
28185 Defaults are: 0.098 for alpha and 0.05 for the rest. Using higher
28186 threshold gives more deblocking strength. Setting alpha controls
28187 threshold detection at exact edge of block. Remaining options
28188 controls threshold detection near the edge. Each one for
28189 below/above or left/right. Setting any of those to 0 disables
28190 deblocking.
28191
28192 planes
28193 Set planes to filter. Default is to filter all available planes.
28194
28195 Examples
28196
28197 • Deblock using weak filter and block size of 4 pixels.
28198
28199 deblock=filter=weak:block=4
28200
28201 • Deblock using strong filter, block size of 4 pixels and custom
28202 thresholds for deblocking more edges.
28203
28204 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
28205
28206 • Similar as above, but filter only first plane.
28207
28208 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
28209
28210 • Similar as above, but filter only second and third plane.
28211
28212 deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
28213
28214 Commands
28215
28216 This filter supports the all above options as commands.
28217
28218 decimate
28219 Drop duplicated frames at regular intervals.
28220
28221 The filter accepts the following options:
28222
28223 cycle
28224 Set the number of frames from which one will be dropped. Setting
28225 this to N means one frame in every batch of N frames will be
28226 dropped. Default is 5.
28227
28228 dupthresh
28229 Set the threshold for duplicate detection. If the difference metric
28230 for a frame is less than or equal to this value, then it is
28231 declared as duplicate. Default is 1.1
28232
28233 scthresh
28234 Set scene change threshold. Default is 15.
28235
28236 blockx
28237 blocky
28238 Set the size of the x and y-axis blocks used during metric
28239 calculations. Larger blocks give better noise suppression, but
28240 also give worse detection of small movements. Must be a power of
28241 two. Default is 32.
28242
28243 ppsrc
28244 Mark main input as a pre-processed input and activate clean source
28245 input stream. This allows the input to be pre-processed with
28246 various filters to help the metrics calculation while keeping the
28247 frame selection lossless. When set to 1, the first stream is for
28248 the pre-processed input, and the second stream is the clean source
28249 from where the kept frames are chosen. Default is 0.
28250
28251 chroma
28252 Set whether or not chroma is considered in the metric calculations.
28253 Default is 1.
28254
28255 mixed
28256 Set whether or not the input only partially contains content to be
28257 decimated. Default is "false". If enabled video output stream
28258 will be in variable frame rate.
28259
28260 deconvolve
28261 Apply 2D deconvolution of video stream in frequency domain using second
28262 stream as impulse.
28263
28264 The filter accepts the following options:
28265
28266 planes
28267 Set which planes to process.
28268
28269 impulse
28270 Set which impulse video frames will be processed, can be first or
28271 all. Default is all.
28272
28273 noise
28274 Set noise when doing divisions. Default is 0.0000001. Useful when
28275 width and height are not same and not power of 2 or if stream prior
28276 to convolving had noise.
28277
28278 The "deconvolve" filter also supports the framesync options.
28279
28280 dedot
28281 Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from
28282 video.
28283
28284 It accepts the following options:
28285
28286 m Set mode of operation. Can be combination of dotcrawl for cross-
28287 luminance reduction and/or rainbows for cross-color reduction.
28288
28289 lt Set spatial luma threshold. Lower values increases reduction of
28290 cross-luminance.
28291
28292 tl Set tolerance for temporal luma. Higher values increases reduction
28293 of cross-luminance.
28294
28295 tc Set tolerance for chroma temporal variation. Higher values
28296 increases reduction of cross-color.
28297
28298 ct Set temporal chroma threshold. Lower values increases reduction of
28299 cross-color.
28300
28301 deflate
28302 Apply deflate effect to the video.
28303
28304 This filter replaces the pixel by the local(3x3) average by taking into
28305 account only values lower than the pixel.
28306
28307 It accepts the following options:
28308
28309 threshold0
28310 threshold1
28311 threshold2
28312 threshold3
28313 Limit the maximum change for each plane, default is 65535. If 0,
28314 plane will remain unchanged.
28315
28316 Commands
28317
28318 This filter supports the all above options as commands.
28319
28320 deflicker
28321 Remove temporal frame luminance variations.
28322
28323 It accepts the following options:
28324
28325 size, s
28326 Set moving-average filter size in frames. Default is 5. Allowed
28327 range is 2 - 129.
28328
28329 mode, m
28330 Set averaging mode to smooth temporal luminance variations.
28331
28332 Available values are:
28333
28334 am Arithmetic mean
28335
28336 gm Geometric mean
28337
28338 hm Harmonic mean
28339
28340 qm Quadratic mean
28341
28342 cm Cubic mean
28343
28344 pm Power mean
28345
28346 median
28347 Median
28348
28349 bypass
28350 Do not actually modify frame. Useful when one only wants metadata.
28351
28352 dejudder
28353 Remove judder produced by partially interlaced telecined content.
28354
28355 Judder can be introduced, for instance, by pullup filter. If the
28356 original source was partially telecined content then the output of
28357 "pullup,dejudder" will have a variable frame rate. May change the
28358 recorded frame rate of the container. Aside from that change, this
28359 filter will not affect constant frame rate video.
28360
28361 The option available in this filter is:
28362
28363 cycle
28364 Specify the length of the window over which the judder repeats.
28365
28366 Accepts any integer greater than 1. Useful values are:
28367
28368 4 If the original was telecined from 24 to 30 fps (Film to NTSC).
28369
28370 5 If the original was telecined from 25 to 30 fps (PAL to NTSC).
28371
28372 20 If a mixture of the two.
28373
28374 The default is 4.
28375
28376 delogo
28377 Suppress a TV station logo by a simple interpolation of the surrounding
28378 pixels. Just set a rectangle covering the logo and watch it disappear
28379 (and sometimes something even uglier appear - your mileage may vary).
28380
28381 It accepts the following parameters:
28382
28383 x
28384 y Specify the top left corner coordinates of the logo. They must be
28385 specified.
28386
28387 w
28388 h Specify the width and height of the logo to clear. They must be
28389 specified.
28390
28391 show
28392 When set to 1, a green rectangle is drawn on the screen to simplify
28393 finding the right x, y, w, and h parameters. The default value is
28394 0.
28395
28396 The rectangle is drawn on the outermost pixels which will be
28397 (partly) replaced with interpolated values. The values of the next
28398 pixels immediately outside this rectangle in each direction will be
28399 used to compute the interpolated pixel values inside the rectangle.
28400
28401 Examples
28402
28403 • Set a rectangle covering the area with top left corner coordinates
28404 0,0 and size 100x77:
28405
28406 delogo=x=0:y=0:w=100:h=77
28407
28408 derain
28409 Remove the rain in the input image/video by applying the derain methods
28410 based on convolutional neural networks. Supported models:
28411
28412 • Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
28413 See
28414 <http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf>.
28415
28416 Training as well as model generation scripts are provided in the
28417 repository at <https://github.com/XueweiMeng/derain_filter.git>.
28418
28419 Native model files (.model) can be generated from TensorFlow model
28420 files (.pb) by using tools/python/convert.py
28421
28422 The filter accepts the following options:
28423
28424 filter_type
28425 Specify which filter to use. This option accepts the following
28426 values:
28427
28428 derain
28429 Derain filter. To conduct derain filter, you need to use a
28430 derain model.
28431
28432 dehaze
28433 Dehaze filter. To conduct dehaze filter, you need to use a
28434 dehaze model.
28435
28436 Default value is derain.
28437
28438 dnn_backend
28439 Specify which DNN backend to use for model loading and execution.
28440 This option accepts the following values:
28441
28442 native
28443 Native implementation of DNN loading and execution.
28444
28445 tensorflow
28446 TensorFlow backend. To enable this backend you need to install
28447 the TensorFlow for C library (see
28448 <https://www.tensorflow.org/install/lang_c>) and configure
28449 FFmpeg with "--enable-libtensorflow"
28450
28451 Default value is native.
28452
28453 model
28454 Set path to model file specifying network architecture and its
28455 parameters. Note that different backends use different file
28456 formats. TensorFlow and native backend can load files for only its
28457 format.
28458
28459 To get full functionality (such as async execution), please use the
28460 dnn_processing filter.
28461
28462 deshake
28463 Attempt to fix small changes in horizontal and/or vertical shift. This
28464 filter helps remove camera shake from hand-holding a camera, bumping a
28465 tripod, moving on a vehicle, etc.
28466
28467 The filter accepts the following options:
28468
28469 x
28470 y
28471 w
28472 h Specify a rectangular area where to limit the search for motion
28473 vectors. If desired the search for motion vectors can be limited
28474 to a rectangular area of the frame defined by its top left corner,
28475 width and height. These parameters have the same meaning as the
28476 drawbox filter which can be used to visualise the position of the
28477 bounding box.
28478
28479 This is useful when simultaneous movement of subjects within the
28480 frame might be confused for camera motion by the motion vector
28481 search.
28482
28483 If any or all of x, y, w and h are set to -1 then the full frame is
28484 used. This allows later options to be set without specifying the
28485 bounding box for the motion vector search.
28486
28487 Default - search the whole frame.
28488
28489 rx
28490 ry Specify the maximum extent of movement in x and y directions in the
28491 range 0-64 pixels. Default 16.
28492
28493 edge
28494 Specify how to generate pixels to fill blanks at the edge of the
28495 frame. Available values are:
28496
28497 blank, 0
28498 Fill zeroes at blank locations
28499
28500 original, 1
28501 Original image at blank locations
28502
28503 clamp, 2
28504 Extruded edge value at blank locations
28505
28506 mirror, 3
28507 Mirrored edge at blank locations
28508
28509 Default value is mirror.
28510
28511 blocksize
28512 Specify the blocksize to use for motion search. Range 4-128 pixels,
28513 default 8.
28514
28515 contrast
28516 Specify the contrast threshold for blocks. Only blocks with more
28517 than the specified contrast (difference between darkest and
28518 lightest pixels) will be considered. Range 1-255, default 125.
28519
28520 search
28521 Specify the search strategy. Available values are:
28522
28523 exhaustive, 0
28524 Set exhaustive search
28525
28526 less, 1
28527 Set less exhaustive search.
28528
28529 Default value is exhaustive.
28530
28531 filename
28532 If set then a detailed log of the motion search is written to the
28533 specified file.
28534
28535 despill
28536 Remove unwanted contamination of foreground colors, caused by reflected
28537 color of greenscreen or bluescreen.
28538
28539 This filter accepts the following options:
28540
28541 type
28542 Set what type of despill to use.
28543
28544 mix Set how spillmap will be generated.
28545
28546 expand
28547 Set how much to get rid of still remaining spill.
28548
28549 red Controls amount of red in spill area.
28550
28551 green
28552 Controls amount of green in spill area. Should be -1 for
28553 greenscreen.
28554
28555 blue
28556 Controls amount of blue in spill area. Should be -1 for
28557 bluescreen.
28558
28559 brightness
28560 Controls brightness of spill area, preserving colors.
28561
28562 alpha
28563 Modify alpha from generated spillmap.
28564
28565 Commands
28566
28567 This filter supports the all above options as commands.
28568
28569 detelecine
28570 Apply an exact inverse of the telecine operation. It requires a
28571 predefined pattern specified using the pattern option which must be the
28572 same as that passed to the telecine filter.
28573
28574 This filter accepts the following options:
28575
28576 first_field
28577 top, t
28578 top field first
28579
28580 bottom, b
28581 bottom field first The default value is "top".
28582
28583 pattern
28584 A string of numbers representing the pulldown pattern you wish to
28585 apply. The default value is 23.
28586
28587 start_frame
28588 A number representing position of the first frame with respect to
28589 the telecine pattern. This is to be used if the stream is cut. The
28590 default value is 0.
28591
28592 dilation
28593 Apply dilation effect to the video.
28594
28595 This filter replaces the pixel by the local(3x3) maximum.
28596
28597 It accepts the following options:
28598
28599 threshold0
28600 threshold1
28601 threshold2
28602 threshold3
28603 Limit the maximum change for each plane, default is 65535. If 0,
28604 plane will remain unchanged.
28605
28606 coordinates
28607 Flag which specifies the pixel to refer to. Default is 255 i.e. all
28608 eight pixels are used.
28609
28610 Flags to local 3x3 coordinates maps like this:
28611
28612 1 2 3
28613 4 5
28614 6 7 8
28615
28616 Commands
28617
28618 This filter supports the all above options as commands.
28619
28620 displace
28621 Displace pixels as indicated by second and third input stream.
28622
28623 It takes three input streams and outputs one stream, the first input is
28624 the source, and second and third input are displacement maps.
28625
28626 The second input specifies how much to displace pixels along the
28627 x-axis, while the third input specifies how much to displace pixels
28628 along the y-axis. If one of displacement map streams terminates, last
28629 frame from that displacement map will be used.
28630
28631 Note that once generated, displacements maps can be reused over and
28632 over again.
28633
28634 A description of the accepted options follows.
28635
28636 edge
28637 Set displace behavior for pixels that are out of range.
28638
28639 Available values are:
28640
28641 blank
28642 Missing pixels are replaced by black pixels.
28643
28644 smear
28645 Adjacent pixels will spread out to replace missing pixels.
28646
28647 wrap
28648 Out of range pixels are wrapped so they point to pixels of
28649 other side.
28650
28651 mirror
28652 Out of range pixels will be replaced with mirrored pixels.
28653
28654 Default is smear.
28655
28656 Examples
28657
28658 • Add ripple effect to rgb input of video size hd720:
28659
28660 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
28661
28662 • Add wave effect to rgb input of video size hd720:
28663
28664 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
28665
28666 dnn_classify
28667 Do classification with deep neural networks based on bounding boxes.
28668
28669 The filter accepts the following options:
28670
28671 dnn_backend
28672 Specify which DNN backend to use for model loading and execution.
28673 This option accepts only openvino now, tensorflow backends will be
28674 added.
28675
28676 model
28677 Set path to model file specifying network architecture and its
28678 parameters. Note that different backends use different file
28679 formats.
28680
28681 input
28682 Set the input name of the dnn network.
28683
28684 output
28685 Set the output name of the dnn network.
28686
28687 confidence
28688 Set the confidence threshold (default: 0.5).
28689
28690 labels
28691 Set path to label file specifying the mapping between label id and
28692 name. Each label name is written in one line, tailing spaces and
28693 empty lines are skipped. The first line is the name of label id 0,
28694 and the second line is the name of label id 1, etc. The label id
28695 is considered as name if the label file is not provided.
28696
28697 backend_configs
28698 Set the configs to be passed into backend
28699
28700 For tensorflow backend, you can set its configs with sess_config
28701 options, please use tools/python/tf_sess_config.py to get the
28702 configs for your system.
28703
28704 dnn_detect
28705 Do object detection with deep neural networks.
28706
28707 The filter accepts the following options:
28708
28709 dnn_backend
28710 Specify which DNN backend to use for model loading and execution.
28711 This option accepts only openvino now, tensorflow backends will be
28712 added.
28713
28714 model
28715 Set path to model file specifying network architecture and its
28716 parameters. Note that different backends use different file
28717 formats.
28718
28719 input
28720 Set the input name of the dnn network.
28721
28722 output
28723 Set the output name of the dnn network.
28724
28725 confidence
28726 Set the confidence threshold (default: 0.5).
28727
28728 labels
28729 Set path to label file specifying the mapping between label id and
28730 name. Each label name is written in one line, tailing spaces and
28731 empty lines are skipped. The first line is the name of label id 0
28732 (usually it is 'background'), and the second line is the name of
28733 label id 1, etc. The label id is considered as name if the label
28734 file is not provided.
28735
28736 backend_configs
28737 Set the configs to be passed into backend. To use async execution,
28738 set async (default: set). Roll back to sync execution if the
28739 backend does not support async.
28740
28741 dnn_processing
28742 Do image processing with deep neural networks. It works together with
28743 another filter which converts the pixel format of the Frame to what the
28744 dnn network requires.
28745
28746 The filter accepts the following options:
28747
28748 dnn_backend
28749 Specify which DNN backend to use for model loading and execution.
28750 This option accepts the following values:
28751
28752 native
28753 Native implementation of DNN loading and execution.
28754
28755 tensorflow
28756 TensorFlow backend. To enable this backend you need to install
28757 the TensorFlow for C library (see
28758 <https://www.tensorflow.org/install/lang_c>) and configure
28759 FFmpeg with "--enable-libtensorflow"
28760
28761 openvino
28762 OpenVINO backend. To enable this backend you need to build and
28763 install the OpenVINO for C library (see
28764 <https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md>)
28765 and configure FFmpeg with "--enable-libopenvino"
28766 (--extra-cflags=-I... --extra-ldflags=-L... might be needed if
28767 the header files and libraries are not installed into system
28768 path)
28769
28770 Default value is native.
28771
28772 model
28773 Set path to model file specifying network architecture and its
28774 parameters. Note that different backends use different file
28775 formats. TensorFlow, OpenVINO and native backend can load files for
28776 only its format.
28777
28778 Native model file (.model) can be generated from TensorFlow model
28779 file (.pb) by using tools/python/convert.py
28780
28781 input
28782 Set the input name of the dnn network.
28783
28784 output
28785 Set the output name of the dnn network.
28786
28787 backend_configs
28788 Set the configs to be passed into backend. To use async execution,
28789 set async (default: set). Roll back to sync execution if the
28790 backend does not support async.
28791
28792 For tensorflow backend, you can set its configs with sess_config
28793 options, please use tools/python/tf_sess_config.py to get the
28794 configs of TensorFlow backend for your system.
28795
28796 Examples
28797
28798 • Remove rain in rgb24 frame with can.pb (see derain filter):
28799
28800 ./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg
28801
28802 • Halve the pixel value of the frame with format gray32f:
28803
28804 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
28805
28806 • Handle the Y channel with srcnn.pb (see sr filter) for frame with
28807 yuv420p (planar YUV formats supported):
28808
28809 ./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
28810
28811 • Handle the Y channel with espcn.pb (see sr filter), which changes
28812 frame size, for format yuv420p (planar YUV formats supported),
28813 please use tools/python/tf_sess_config.py to get the configs of
28814 TensorFlow backend for your system.
28815
28816 ./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
28817
28818 drawbox
28819 Draw a colored box on the input image.
28820
28821 It accepts the following parameters:
28822
28823 x
28824 y The expressions which specify the top left corner coordinates of
28825 the box. It defaults to 0.
28826
28827 width, w
28828 height, h
28829 The expressions which specify the width and height of the box; if 0
28830 they are interpreted as the input width and height. It defaults to
28831 0.
28832
28833 color, c
28834 Specify the color of the box to write. For the general syntax of
28835 this option, check the "Color" section in the ffmpeg-utils manual.
28836 If the special value "invert" is used, the box edge color is the
28837 same as the video with inverted luma.
28838
28839 thickness, t
28840 The expression which sets the thickness of the box edge. A value
28841 of "fill" will create a filled box. Default value is 3.
28842
28843 See below for the list of accepted constants.
28844
28845 replace
28846 Applicable if the input has alpha. With value 1, the pixels of the
28847 painted box will overwrite the video's color and alpha pixels.
28848 Default is 0, which composites the box onto the input, leaving the
28849 video's alpha intact.
28850
28851 The parameters for x, y, w and h and t are expressions containing the
28852 following constants:
28853
28854 dar The input display aspect ratio, it is the same as (w / h) * sar.
28855
28856 hsub
28857 vsub
28858 horizontal and vertical chroma subsample values. For example for
28859 the pixel format "yuv422p" hsub is 2 and vsub is 1.
28860
28861 in_h, ih
28862 in_w, iw
28863 The input width and height.
28864
28865 sar The input sample aspect ratio.
28866
28867 x
28868 y The x and y offset coordinates where the box is drawn.
28869
28870 w
28871 h The width and height of the drawn box.
28872
28873 box_source
28874 Box source can be set as side_data_detection_bboxes if you want to
28875 use box data in detection bboxes of side data.
28876
28877 If box_source is set, the x, y, width and height will be ignored
28878 and still use box data in detection bboxes of side data. So please
28879 do not use this parameter if you were not sure about the box
28880 source.
28881
28882 t The thickness of the drawn box.
28883
28884 These constants allow the x, y, w, h and t expressions to refer to
28885 each other, so you may for example specify "y=x/dar" or "h=w/dar".
28886
28887 Examples
28888
28889 • Draw a black box around the edge of the input image:
28890
28891 drawbox
28892
28893 • Draw a box with color red and an opacity of 50%:
28894
28895 drawbox=10:20:200:60:red@0.5
28896
28897 The previous example can be specified as:
28898
28899 drawbox=x=10:y=20:w=200:h=60:color=red@0.5
28900
28901 • Fill the box with pink color:
28902
28903 drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
28904
28905 • Draw a 2-pixel red 2.40:1 mask:
28906
28907 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
28908
28909 Commands
28910
28911 This filter supports same commands as options. The command accepts the
28912 same syntax of the corresponding option.
28913
28914 If the specified expression is not valid, it is kept at its current
28915 value.
28916
28917 drawgraph
28918 Draw a graph using input video metadata.
28919
28920 It accepts the following parameters:
28921
28922 m1 Set 1st frame metadata key from which metadata values will be used
28923 to draw a graph.
28924
28925 fg1 Set 1st foreground color expression.
28926
28927 m2 Set 2nd frame metadata key from which metadata values will be used
28928 to draw a graph.
28929
28930 fg2 Set 2nd foreground color expression.
28931
28932 m3 Set 3rd frame metadata key from which metadata values will be used
28933 to draw a graph.
28934
28935 fg3 Set 3rd foreground color expression.
28936
28937 m4 Set 4th frame metadata key from which metadata values will be used
28938 to draw a graph.
28939
28940 fg4 Set 4th foreground color expression.
28941
28942 min Set minimal value of metadata value.
28943
28944 max Set maximal value of metadata value.
28945
28946 bg Set graph background color. Default is white.
28947
28948 mode
28949 Set graph mode.
28950
28951 Available values for mode is:
28952
28953 bar
28954 dot
28955 line
28956
28957 Default is "line".
28958
28959 slide
28960 Set slide mode.
28961
28962 Available values for slide is:
28963
28964 frame
28965 Draw new frame when right border is reached.
28966
28967 replace
28968 Replace old columns with new ones.
28969
28970 scroll
28971 Scroll from right to left.
28972
28973 rscroll
28974 Scroll from left to right.
28975
28976 picture
28977 Draw single picture.
28978
28979 Default is "frame".
28980
28981 size
28982 Set size of graph video. For the syntax of this option, check the
28983 "Video size" section in the ffmpeg-utils manual. The default value
28984 is "900x256".
28985
28986 rate, r
28987 Set the output frame rate. Default value is 25.
28988
28989 The foreground color expressions can use the following variables:
28990
28991 MIN Minimal value of metadata value.
28992
28993 MAX Maximal value of metadata value.
28994
28995 VAL Current metadata key value.
28996
28997 The color is defined as 0xAABBGGRR.
28998
28999 Example using metadata from signalstats filter:
29000
29001 signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
29002
29003 Example using metadata from ebur128 filter:
29004
29005 ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
29006
29007 drawgrid
29008 Draw a grid on the input image.
29009
29010 It accepts the following parameters:
29011
29012 x
29013 y The expressions which specify the coordinates of some point of grid
29014 intersection (meant to configure offset). Both default to 0.
29015
29016 width, w
29017 height, h
29018 The expressions which specify the width and height of the grid
29019 cell, if 0 they are interpreted as the input width and height,
29020 respectively, minus "thickness", so image gets framed. Default to
29021 0.
29022
29023 color, c
29024 Specify the color of the grid. For the general syntax of this
29025 option, check the "Color" section in the ffmpeg-utils manual. If
29026 the special value "invert" is used, the grid color is the same as
29027 the video with inverted luma.
29028
29029 thickness, t
29030 The expression which sets the thickness of the grid line. Default
29031 value is 1.
29032
29033 See below for the list of accepted constants.
29034
29035 replace
29036 Applicable if the input has alpha. With 1 the pixels of the painted
29037 grid will overwrite the video's color and alpha pixels. Default is
29038 0, which composites the grid onto the input, leaving the video's
29039 alpha intact.
29040
29041 The parameters for x, y, w and h and t are expressions containing the
29042 following constants:
29043
29044 dar The input display aspect ratio, it is the same as (w / h) * sar.
29045
29046 hsub
29047 vsub
29048 horizontal and vertical chroma subsample values. For example for
29049 the pixel format "yuv422p" hsub is 2 and vsub is 1.
29050
29051 in_h, ih
29052 in_w, iw
29053 The input grid cell width and height.
29054
29055 sar The input sample aspect ratio.
29056
29057 x
29058 y The x and y coordinates of some point of grid intersection (meant
29059 to configure offset).
29060
29061 w
29062 h The width and height of the drawn cell.
29063
29064 t The thickness of the drawn cell.
29065
29066 These constants allow the x, y, w, h and t expressions to refer to
29067 each other, so you may for example specify "y=x/dar" or "h=w/dar".
29068
29069 Examples
29070
29071 • Draw a grid with cell 100x100 pixels, thickness 2 pixels, with
29072 color red and an opacity of 50%:
29073
29074 drawgrid=width=100:height=100:thickness=2:color=red@0.5
29075
29076 • Draw a white 3x3 grid with an opacity of 50%:
29077
29078 drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
29079
29080 Commands
29081
29082 This filter supports same commands as options. The command accepts the
29083 same syntax of the corresponding option.
29084
29085 If the specified expression is not valid, it is kept at its current
29086 value.
29087
29088 drawtext
29089 Draw a text string or text from a specified file on top of a video,
29090 using the libfreetype library.
29091
29092 To enable compilation of this filter, you need to configure FFmpeg with
29093 "--enable-libfreetype". To enable default font fallback and the font
29094 option you need to configure FFmpeg with "--enable-libfontconfig". To
29095 enable the text_shaping option, you need to configure FFmpeg with
29096 "--enable-libfribidi".
29097
29098 Syntax
29099
29100 It accepts the following parameters:
29101
29102 box Used to draw a box around text using the background color. The
29103 value must be either 1 (enable) or 0 (disable). The default value
29104 of box is 0.
29105
29106 boxborderw
29107 Set the width of the border to be drawn around the box using
29108 boxcolor. The default value of boxborderw is 0.
29109
29110 boxcolor
29111 The color to be used for drawing box around text. For the syntax of
29112 this option, check the "Color" section in the ffmpeg-utils manual.
29113
29114 The default value of boxcolor is "white".
29115
29116 line_spacing
29117 Set the line spacing in pixels of the border to be drawn around the
29118 box using box. The default value of line_spacing is 0.
29119
29120 borderw
29121 Set the width of the border to be drawn around the text using
29122 bordercolor. The default value of borderw is 0.
29123
29124 bordercolor
29125 Set the color to be used for drawing border around text. For the
29126 syntax of this option, check the "Color" section in the ffmpeg-
29127 utils manual.
29128
29129 The default value of bordercolor is "black".
29130
29131 expansion
29132 Select how the text is expanded. Can be either "none", "strftime"
29133 (deprecated) or "normal" (default). See the drawtext_expansion,
29134 Text expansion section below for details.
29135
29136 basetime
29137 Set a start time for the count. Value is in microseconds. Only
29138 applied in the deprecated strftime expansion mode. To emulate in
29139 normal expansion mode use the "pts" function, supplying the start
29140 time (in seconds) as the second argument.
29141
29142 fix_bounds
29143 If true, check and fix text coords to avoid clipping.
29144
29145 fontcolor
29146 The color to be used for drawing fonts. For the syntax of this
29147 option, check the "Color" section in the ffmpeg-utils manual.
29148
29149 The default value of fontcolor is "black".
29150
29151 fontcolor_expr
29152 String which is expanded the same way as text to obtain dynamic
29153 fontcolor value. By default this option has empty value and is not
29154 processed. When this option is set, it overrides fontcolor option.
29155
29156 font
29157 The font family to be used for drawing text. By default Sans.
29158
29159 fontfile
29160 The font file to be used for drawing text. The path must be
29161 included. This parameter is mandatory if the fontconfig support is
29162 disabled.
29163
29164 alpha
29165 Draw the text applying alpha blending. The value can be a number
29166 between 0.0 and 1.0. The expression accepts the same variables x,
29167 y as well. The default value is 1. Please see fontcolor_expr.
29168
29169 fontsize
29170 The font size to be used for drawing text. The default value of
29171 fontsize is 16.
29172
29173 text_shaping
29174 If set to 1, attempt to shape the text (for example, reverse the
29175 order of right-to-left text and join Arabic characters) before
29176 drawing it. Otherwise, just draw the text exactly as given. By
29177 default 1 (if supported).
29178
29179 ft_load_flags
29180 The flags to be used for loading the fonts.
29181
29182 The flags map the corresponding flags supported by libfreetype, and
29183 are a combination of the following values:
29184
29185 default
29186 no_scale
29187 no_hinting
29188 render
29189 no_bitmap
29190 vertical_layout
29191 force_autohint
29192 crop_bitmap
29193 pedantic
29194 ignore_global_advance_width
29195 no_recurse
29196 ignore_transform
29197 monochrome
29198 linear_design
29199 no_autohint
29200
29201 Default value is "default".
29202
29203 For more information consult the documentation for the FT_LOAD_*
29204 libfreetype flags.
29205
29206 shadowcolor
29207 The color to be used for drawing a shadow behind the drawn text.
29208 For the syntax of this option, check the "Color" section in the
29209 ffmpeg-utils manual.
29210
29211 The default value of shadowcolor is "black".
29212
29213 shadowx
29214 shadowy
29215 The x and y offsets for the text shadow position with respect to
29216 the position of the text. They can be either positive or negative
29217 values. The default value for both is "0".
29218
29219 start_number
29220 The starting frame number for the n/frame_num variable. The default
29221 value is "0".
29222
29223 tabsize
29224 The size in number of spaces to use for rendering the tab. Default
29225 value is 4.
29226
29227 timecode
29228 Set the initial timecode representation in "hh:mm:ss[:;.]ff"
29229 format. It can be used with or without text parameter.
29230 timecode_rate option must be specified.
29231
29232 timecode_rate, rate, r
29233 Set the timecode frame rate (timecode only). Value will be rounded
29234 to nearest integer. Minimum value is "1". Drop-frame timecode is
29235 supported for frame rates 30 & 60.
29236
29237 tc24hmax
29238 If set to 1, the output of the timecode option will wrap around at
29239 24 hours. Default is 0 (disabled).
29240
29241 text
29242 The text string to be drawn. The text must be a sequence of UTF-8
29243 encoded characters. This parameter is mandatory if no file is
29244 specified with the parameter textfile.
29245
29246 textfile
29247 A text file containing text to be drawn. The text must be a
29248 sequence of UTF-8 encoded characters.
29249
29250 This parameter is mandatory if no text string is specified with the
29251 parameter text.
29252
29253 If both text and textfile are specified, an error is thrown.
29254
29255 text_source
29256 Text source should be set as side_data_detection_bboxes if you want
29257 to use text data in detection bboxes of side data.
29258
29259 If text source is set, text and textfile will be ignored and still
29260 use text data in detection bboxes of side data. So please do not
29261 use this parameter if you are not sure about the text source.
29262
29263 reload
29264 The textfile will be reloaded at specified frame interval. Be sure
29265 to update textfile atomically, or it may be read partially, or even
29266 fail. Range is 0 to INT_MAX. Default is 0.
29267
29268 x
29269 y The expressions which specify the offsets where text will be drawn
29270 within the video frame. They are relative to the top/left border of
29271 the output image.
29272
29273 The default value of x and y is "0".
29274
29275 See below for the list of accepted constants and functions.
29276
29277 The parameters for x and y are expressions containing the following
29278 constants and functions:
29279
29280 dar input display aspect ratio, it is the same as (w / h) * sar
29281
29282 hsub
29283 vsub
29284 horizontal and vertical chroma subsample values. For example for
29285 the pixel format "yuv422p" hsub is 2 and vsub is 1.
29286
29287 line_h, lh
29288 the height of each text line
29289
29290 main_h, h, H
29291 the input height
29292
29293 main_w, w, W
29294 the input width
29295
29296 max_glyph_a, ascent
29297 the maximum distance from the baseline to the highest/upper grid
29298 coordinate used to place a glyph outline point, for all the
29299 rendered glyphs. It is a positive value, due to the grid's
29300 orientation with the Y axis upwards.
29301
29302 max_glyph_d, descent
29303 the maximum distance from the baseline to the lowest grid
29304 coordinate used to place a glyph outline point, for all the
29305 rendered glyphs. This is a negative value, due to the grid's
29306 orientation, with the Y axis upwards.
29307
29308 max_glyph_h
29309 maximum glyph height, that is the maximum height for all the glyphs
29310 contained in the rendered text, it is equivalent to ascent -
29311 descent.
29312
29313 max_glyph_w
29314 maximum glyph width, that is the maximum width for all the glyphs
29315 contained in the rendered text
29316
29317 n the number of input frame, starting from 0
29318
29319 rand(min, max)
29320 return a random number included between min and max
29321
29322 sar The input sample aspect ratio.
29323
29324 t timestamp expressed in seconds, NAN if the input timestamp is
29325 unknown
29326
29327 text_h, th
29328 the height of the rendered text
29329
29330 text_w, tw
29331 the width of the rendered text
29332
29333 x
29334 y the x and y offset coordinates where the text is drawn.
29335
29336 These parameters allow the x and y expressions to refer to each
29337 other, so you can for example specify "y=x/dar".
29338
29339 pict_type
29340 A one character description of the current frame's picture type.
29341
29342 pkt_pos
29343 The current packet's position in the input file or stream (in
29344 bytes, from the start of the input). A value of -1 indicates this
29345 info is not available.
29346
29347 duration
29348 The current packet's duration, in seconds.
29349
29350 pkt_size
29351 The current packet's size (in bytes).
29352
29353 Text expansion
29354
29355 If expansion is set to "strftime", the filter recognizes strftime()
29356 sequences in the provided text and expands them accordingly. Check the
29357 documentation of strftime(). This feature is deprecated.
29358
29359 If expansion is set to "none", the text is printed verbatim.
29360
29361 If expansion is set to "normal" (which is the default), the following
29362 expansion mechanism is used.
29363
29364 The backslash character \, followed by any character, always expands to
29365 the second character.
29366
29367 Sequences of the form "%{...}" are expanded. The text between the
29368 braces is a function name, possibly followed by arguments separated by
29369 ':'. If the arguments contain special characters or delimiters (':' or
29370 '}'), they should be escaped.
29371
29372 Note that they probably must also be escaped as the value for the text
29373 option in the filter argument string and as the filter argument in the
29374 filtergraph description, and possibly also for the shell, that makes up
29375 to four levels of escaping; using a text file avoids these problems.
29376
29377 The following functions are available:
29378
29379 expr, e
29380 The expression evaluation result.
29381
29382 It must take one argument specifying the expression to be
29383 evaluated, which accepts the same constants and functions as the x
29384 and y values. Note that not all constants should be used, for
29385 example the text size is not known when evaluating the expression,
29386 so the constants text_w and text_h will have an undefined value.
29387
29388 expr_int_format, eif
29389 Evaluate the expression's value and output as formatted integer.
29390
29391 The first argument is the expression to be evaluated, just as for
29392 the expr function. The second argument specifies the output
29393 format. Allowed values are x, X, d and u. They are treated exactly
29394 as in the "printf" function. The third parameter is optional and
29395 sets the number of positions taken by the output. It can be used
29396 to add padding with zeros from the left.
29397
29398 gmtime
29399 The time at which the filter is running, expressed in UTC. It can
29400 accept an argument: a strftime() format string. The format string
29401 is extended to support the variable %[1-6]N which prints fractions
29402 of the second with optionally specified number of digits.
29403
29404 localtime
29405 The time at which the filter is running, expressed in the local
29406 time zone. It can accept an argument: a strftime() format string.
29407 The format string is extended to support the variable %[1-6]N which
29408 prints fractions of the second with optionally specified number of
29409 digits.
29410
29411 metadata
29412 Frame metadata. Takes one or two arguments.
29413
29414 The first argument is mandatory and specifies the metadata key.
29415
29416 The second argument is optional and specifies a default value, used
29417 when the metadata key is not found or empty.
29418
29419 Available metadata can be identified by inspecting entries starting
29420 with TAG included within each frame section printed by running
29421 "ffprobe -show_frames".
29422
29423 String metadata generated in filters leading to the drawtext filter
29424 are also available.
29425
29426 n, frame_num
29427 The frame number, starting from 0.
29428
29429 pict_type
29430 A one character description of the current picture type.
29431
29432 pts The timestamp of the current frame. It can take up to three
29433 arguments.
29434
29435 The first argument is the format of the timestamp; it defaults to
29436 "flt" for seconds as a decimal number with microsecond accuracy;
29437 "hms" stands for a formatted [-]HH:MM:SS.mmm timestamp with
29438 millisecond accuracy. "gmtime" stands for the timestamp of the
29439 frame formatted as UTC time; "localtime" stands for the timestamp
29440 of the frame formatted as local time zone time.
29441
29442 The second argument is an offset added to the timestamp.
29443
29444 If the format is set to "hms", a third argument "24HH" may be
29445 supplied to present the hour part of the formatted timestamp in 24h
29446 format (00-23).
29447
29448 If the format is set to "localtime" or "gmtime", a third argument
29449 may be supplied: a strftime() format string. By default, YYYY-MM-
29450 DD HH:MM:SS format will be used.
29451
29452 Commands
29453
29454 This filter supports altering parameters via commands:
29455
29456 reinit
29457 Alter existing filter parameters.
29458
29459 Syntax for the argument is the same as for filter invocation, e.g.
29460
29461 fontsize=56:fontcolor=green:text='Hello World'
29462
29463 Full filter invocation with sendcmd would look like this:
29464
29465 sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
29466
29467 If the entire argument can't be parsed or applied as valid values then
29468 the filter will continue with its existing parameters.
29469
29470 Examples
29471
29472 • Draw "Test Text" with font FreeSerif, using the default values for
29473 the optional parameters.
29474
29475 drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'"
29476
29477 • Draw 'Test Text' with font FreeSerif of size 24 at position x=100
29478 and y=50 (counting from the top-left corner of the screen), text is
29479 yellow with a red box around it. Both the text and the box have an
29480 opacity of 20%.
29481
29482 drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
29483 x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2"
29484
29485 Note that the double quotes are not necessary if spaces are not
29486 used within the parameter list.
29487
29488 • Show the text at the center of the video frame:
29489
29490 drawtext="fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2"
29491
29492 • Show the text at a random position, switching to a new position
29493 every 30 seconds:
29494
29495 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)"
29496
29497 • Show a text line sliding from right to left in the last row of the
29498 video frame. The file LONG_LINE is assumed to contain a single line
29499 with no newlines.
29500
29501 drawtext="fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t"
29502
29503 • Show the content of file CREDITS off the bottom of the frame and
29504 scroll up.
29505
29506 drawtext="fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t"
29507
29508 • Draw a single green letter "g", at the center of the input video.
29509 The glyph baseline is placed at half screen height.
29510
29511 drawtext="fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent"
29512
29513 • Show text for 1 second every 3 seconds:
29514
29515 drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'"
29516
29517 • Use fontconfig to set the font. Note that the colons need to be
29518 escaped.
29519
29520 drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
29521
29522 • Draw "Test Text" with font size dependent on height of the video.
29523
29524 drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)"
29525
29526 • Print the date of a real-time encoding (see strftime(3)):
29527
29528 drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
29529
29530 • Show text fading in and out (appearing/disappearing):
29531
29532 #!/bin/sh
29533 DS=1.0 # display start
29534 DE=10.0 # display end
29535 FID=1.5 # fade in duration
29536 FOD=5 # fade out duration
29537 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 }"
29538
29539 • Horizontally align multiple separate texts. Note that max_glyph_a
29540 and the fontsize value are included in the y offset.
29541
29542 drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
29543 drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
29544
29545 • Plot special lavf.image2dec.source_basename metadata onto each
29546 frame if such metadata exists. Otherwise, plot the string "NA".
29547 Note that image2 demuxer must have option -export_path_metadata 1
29548 for the special metadata fields to be available for filters.
29549
29550 drawtext="fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10"
29551
29552 For more information about libfreetype, check:
29553 <http://www.freetype.org/>.
29554
29555 For more information about fontconfig, check:
29556 <http://freedesktop.org/software/fontconfig/fontconfig-user.html>.
29557
29558 For more information about libfribidi, check: <http://fribidi.org/>.
29559
29560 edgedetect
29561 Detect and draw edges. The filter uses the Canny Edge Detection
29562 algorithm.
29563
29564 The filter accepts the following options:
29565
29566 low
29567 high
29568 Set low and high threshold values used by the Canny thresholding
29569 algorithm.
29570
29571 The high threshold selects the "strong" edge pixels, which are then
29572 connected through 8-connectivity with the "weak" edge pixels
29573 selected by the low threshold.
29574
29575 low and high threshold values must be chosen in the range [0,1],
29576 and low should be lesser or equal to high.
29577
29578 Default value for low is "20/255", and default value for high is
29579 "50/255".
29580
29581 mode
29582 Define the drawing mode.
29583
29584 wires
29585 Draw white/gray wires on black background.
29586
29587 colormix
29588 Mix the colors to create a paint/cartoon effect.
29589
29590 canny
29591 Apply Canny edge detector on all selected planes.
29592
29593 Default value is wires.
29594
29595 planes
29596 Select planes for filtering. By default all available planes are
29597 filtered.
29598
29599 Examples
29600
29601 • Standard edge detection with custom values for the hysteresis
29602 thresholding:
29603
29604 edgedetect=low=0.1:high=0.4
29605
29606 • Painting effect without thresholding:
29607
29608 edgedetect=mode=colormix:high=0
29609
29610 elbg
29611 Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
29612
29613 For each input image, the filter will compute the optimal mapping from
29614 the input to the output given the codebook length, that is the number
29615 of distinct output colors.
29616
29617 This filter accepts the following options.
29618
29619 codebook_length, l
29620 Set codebook length. The value must be a positive integer, and
29621 represents the number of distinct output colors. Default value is
29622 256.
29623
29624 nb_steps, n
29625 Set the maximum number of iterations to apply for computing the
29626 optimal mapping. The higher the value the better the result and the
29627 higher the computation time. Default value is 1.
29628
29629 seed, s
29630 Set a random seed, must be an integer included between 0 and
29631 UINT32_MAX. If not specified, or if explicitly set to -1, the
29632 filter will try to use a good random seed on a best effort basis.
29633
29634 pal8
29635 Set pal8 output pixel format. This option does not work with
29636 codebook length greater than 256. Default is disabled.
29637
29638 use_alpha
29639 Include alpha values in the quantization calculation. Allows
29640 creating palettized output images (e.g. PNG8) with multiple alpha
29641 smooth blending.
29642
29643 entropy
29644 Measure graylevel entropy in histogram of color channels of video
29645 frames.
29646
29647 It accepts the following parameters:
29648
29649 mode
29650 Can be either normal or diff. Default is normal.
29651
29652 diff mode measures entropy of histogram delta values, absolute
29653 differences between neighbour histogram values.
29654
29655 epx
29656 Apply the EPX magnification filter which is designed for pixel art.
29657
29658 It accepts the following option:
29659
29660 n Set the scaling dimension: 2 for "2xEPX", 3 for "3xEPX". Default
29661 is 3.
29662
29663 eq
29664 Set brightness, contrast, saturation and approximate gamma adjustment.
29665
29666 The filter accepts the following options:
29667
29668 contrast
29669 Set the contrast expression. The value must be a float value in
29670 range -1000.0 to 1000.0. The default value is "1".
29671
29672 brightness
29673 Set the brightness expression. The value must be a float value in
29674 range -1.0 to 1.0. The default value is "0".
29675
29676 saturation
29677 Set the saturation expression. The value must be a float in range
29678 0.0 to 3.0. The default value is "1".
29679
29680 gamma
29681 Set the gamma expression. The value must be a float in range 0.1 to
29682 10.0. The default value is "1".
29683
29684 gamma_r
29685 Set the gamma expression for red. The value must be a float in
29686 range 0.1 to 10.0. The default value is "1".
29687
29688 gamma_g
29689 Set the gamma expression for green. The value must be a float in
29690 range 0.1 to 10.0. The default value is "1".
29691
29692 gamma_b
29693 Set the gamma expression for blue. The value must be a float in
29694 range 0.1 to 10.0. The default value is "1".
29695
29696 gamma_weight
29697 Set the gamma weight expression. It can be used to reduce the
29698 effect of a high gamma value on bright image areas, e.g. keep them
29699 from getting overamplified and just plain white. The value must be
29700 a float in range 0.0 to 1.0. A value of 0.0 turns the gamma
29701 correction all the way down while 1.0 leaves it at its full
29702 strength. Default is "1".
29703
29704 eval
29705 Set when the expressions for brightness, contrast, saturation and
29706 gamma expressions are evaluated.
29707
29708 It accepts the following values:
29709
29710 init
29711 only evaluate expressions once during the filter initialization
29712 or when a command is processed
29713
29714 frame
29715 evaluate expressions for each incoming frame
29716
29717 Default value is init.
29718
29719 The expressions accept the following parameters:
29720
29721 n frame count of the input frame starting from 0
29722
29723 pos byte position of the corresponding packet in the input file, NAN if
29724 unspecified
29725
29726 r frame rate of the input video, NAN if the input frame rate is
29727 unknown
29728
29729 t timestamp expressed in seconds, NAN if the input timestamp is
29730 unknown
29731
29732 Commands
29733
29734 The filter supports the following commands:
29735
29736 contrast
29737 Set the contrast expression.
29738
29739 brightness
29740 Set the brightness expression.
29741
29742 saturation
29743 Set the saturation expression.
29744
29745 gamma
29746 Set the gamma expression.
29747
29748 gamma_r
29749 Set the gamma_r expression.
29750
29751 gamma_g
29752 Set gamma_g expression.
29753
29754 gamma_b
29755 Set gamma_b expression.
29756
29757 gamma_weight
29758 Set gamma_weight expression.
29759
29760 The command accepts the same syntax of the corresponding option.
29761
29762 If the specified expression is not valid, it is kept at its current
29763 value.
29764
29765 erosion
29766 Apply erosion effect to the video.
29767
29768 This filter replaces the pixel by the local(3x3) minimum.
29769
29770 It accepts the following options:
29771
29772 threshold0
29773 threshold1
29774 threshold2
29775 threshold3
29776 Limit the maximum change for each plane, default is 65535. If 0,
29777 plane will remain unchanged.
29778
29779 coordinates
29780 Flag which specifies the pixel to refer to. Default is 255 i.e. all
29781 eight pixels are used.
29782
29783 Flags to local 3x3 coordinates maps like this:
29784
29785 1 2 3
29786 4 5
29787 6 7 8
29788
29789 Commands
29790
29791 This filter supports the all above options as commands.
29792
29793 estdif
29794 Deinterlace the input video ("estdif" stands for "Edge Slope Tracing
29795 Deinterlacing Filter").
29796
29797 Spatial only filter that uses edge slope tracing algorithm to
29798 interpolate missing lines. It accepts the following parameters:
29799
29800 mode
29801 The interlacing mode to adopt. It accepts one of the following
29802 values:
29803
29804 frame
29805 Output one frame for each frame.
29806
29807 field
29808 Output one frame for each field.
29809
29810 The default value is "field".
29811
29812 parity
29813 The picture field parity assumed for the input interlaced video. It
29814 accepts one of the following values:
29815
29816 tff Assume the top field is first.
29817
29818 bff Assume the bottom field is first.
29819
29820 auto
29821 Enable automatic detection of field parity.
29822
29823 The default value is "auto". If the interlacing is unknown or the
29824 decoder does not export this information, top field first will be
29825 assumed.
29826
29827 deint
29828 Specify which frames to deinterlace. Accepts one of the following
29829 values:
29830
29831 all Deinterlace all frames.
29832
29833 interlaced
29834 Only deinterlace frames marked as interlaced.
29835
29836 The default value is "all".
29837
29838 rslope
29839 Specify the search radius for edge slope tracing. Default value is
29840 1. Allowed range is from 1 to 15.
29841
29842 redge
29843 Specify the search radius for best edge matching. Default value is
29844 2. Allowed range is from 0 to 15.
29845
29846 ecost
29847 Specify the edge cost for edge matching. Default value is 1.0.
29848 Allowed range is from 0 to 9.
29849
29850 mcost
29851 Specify the middle cost for edge matching. Default value is 0.5.
29852 Allowed range is from 0 to 1.
29853
29854 dcost
29855 Specify the distance cost for edge matching. Default value is 0.5.
29856 Allowed range is from 0 to 1.
29857
29858 interp
29859 Specify the interpolation used. Default is 4-point interpolation.
29860 It accepts one of the following values:
29861
29862 2p Two-point interpolation.
29863
29864 4p Four-point interpolation.
29865
29866 6p Six-point interpolation.
29867
29868 Commands
29869
29870 This filter supports same commands as options.
29871
29872 exposure
29873 Adjust exposure of the video stream.
29874
29875 The filter accepts the following options:
29876
29877 exposure
29878 Set the exposure correction in EV. Allowed range is from -3.0 to
29879 3.0 EV Default value is 0 EV.
29880
29881 black
29882 Set the black level correction. Allowed range is from -1.0 to 1.0.
29883 Default value is 0.
29884
29885 Commands
29886
29887 This filter supports same commands as options.
29888
29889 extractplanes
29890 Extract color channel components from input video stream into separate
29891 grayscale video streams.
29892
29893 The filter accepts the following option:
29894
29895 planes
29896 Set plane(s) to extract.
29897
29898 Available values for planes are:
29899
29900 y
29901 u
29902 v
29903 a
29904 r
29905 g
29906 b
29907
29908 Choosing planes not available in the input will result in an error.
29909 That means you cannot select "r", "g", "b" planes with "y", "u",
29910 "v" planes at same time.
29911
29912 Examples
29913
29914 • Extract luma, u and v color channel component from input video
29915 frame into 3 grayscale outputs:
29916
29917 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
29918
29919 fade
29920 Apply a fade-in/out effect to the input video.
29921
29922 It accepts the following parameters:
29923
29924 type, t
29925 The effect type can be either "in" for a fade-in, or "out" for a
29926 fade-out effect. Default is "in".
29927
29928 start_frame, s
29929 Specify the number of the frame to start applying the fade effect
29930 at. Default is 0.
29931
29932 nb_frames, n
29933 The number of frames that the fade effect lasts. At the end of the
29934 fade-in effect, the output video will have the same intensity as
29935 the input video. At the end of the fade-out transition, the output
29936 video will be filled with the selected color. Default is 25.
29937
29938 alpha
29939 If set to 1, fade only alpha channel, if one exists on the input.
29940 Default value is 0.
29941
29942 start_time, st
29943 Specify the timestamp (in seconds) of the frame to start to apply
29944 the fade effect. If both start_frame and start_time are specified,
29945 the fade will start at whichever comes last. Default is 0.
29946
29947 duration, d
29948 The number of seconds for which the fade effect has to last. At the
29949 end of the fade-in effect the output video will have the same
29950 intensity as the input video, at the end of the fade-out transition
29951 the output video will be filled with the selected color. If both
29952 duration and nb_frames are specified, duration is used. Default is
29953 0 (nb_frames is used by default).
29954
29955 color, c
29956 Specify the color of the fade. Default is "black".
29957
29958 Examples
29959
29960 • Fade in the first 30 frames of video:
29961
29962 fade=in:0:30
29963
29964 The command above is equivalent to:
29965
29966 fade=t=in:s=0:n=30
29967
29968 • Fade out the last 45 frames of a 200-frame video:
29969
29970 fade=out:155:45
29971 fade=type=out:start_frame=155:nb_frames=45
29972
29973 • Fade in the first 25 frames and fade out the last 25 frames of a
29974 1000-frame video:
29975
29976 fade=in:0:25, fade=out:975:25
29977
29978 • Make the first 5 frames yellow, then fade in from frame 5-24:
29979
29980 fade=in:5:20:color=yellow
29981
29982 • Fade in alpha over first 25 frames of video:
29983
29984 fade=in:0:25:alpha=1
29985
29986 • Make the first 5.5 seconds black, then fade in for 0.5 seconds:
29987
29988 fade=t=in:st=5.5:d=0.5
29989
29990 feedback
29991 Apply feedback video filter.
29992
29993 This filter pass cropped input frames to 2nd output. From there it can
29994 be filtered with other video filters. After filter receives frame from
29995 2nd input, that frame is combined on top of original frame from 1st
29996 input and passed to 1st output.
29997
29998 The typical usage is filter only part of frame.
29999
30000 The filter accepts the following options:
30001
30002 x
30003 y Set the top left crop position.
30004
30005 w
30006 h Set the crop size.
30007
30008 Examples
30009
30010 • Blur only top left rectangular part of video frame size 100x100
30011 with gblur filter.
30012
30013 [in][blurin]feedback=x=0:y=0:w=100:h=100[out][blurout];[blurout]gblur=8[blurin]
30014
30015 • Draw black box on top left part of video frame of size 100x100 with
30016 drawbox filter.
30017
30018 [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]
30019
30020 fftdnoiz
30021 Denoise frames using 3D FFT (frequency domain filtering).
30022
30023 The filter accepts the following options:
30024
30025 sigma
30026 Set the noise sigma constant. This sets denoising strength.
30027 Default value is 1. Allowed range is from 0 to 30. Using very high
30028 sigma with low overlap may give blocking artifacts.
30029
30030 amount
30031 Set amount of denoising. By default all detected noise is reduced.
30032 Default value is 1. Allowed range is from 0 to 1.
30033
30034 block
30035 Set size of block in pixels, Default is 32, can be 8 to 256.
30036
30037 overlap
30038 Set block overlap. Default is 0.5. Allowed range is from 0.2 to
30039 0.8.
30040
30041 method
30042 Set denoising method. Default is "wiener", can also be "hard".
30043
30044 prev
30045 Set number of previous frames to use for denoising. By default is
30046 set to 0.
30047
30048 next
30049 Set number of next frames to to use for denoising. By default is
30050 set to 0.
30051
30052 planes
30053 Set planes which will be filtered, by default are all available
30054 filtered except alpha.
30055
30056 fftfilt
30057 Apply arbitrary expressions to samples in frequency domain
30058
30059 dc_Y
30060 Adjust the dc value (gain) of the luma plane of the image. The
30061 filter accepts an integer value in range 0 to 1000. The default
30062 value is set to 0.
30063
30064 dc_U
30065 Adjust the dc value (gain) of the 1st chroma plane of the image.
30066 The filter accepts an integer value in range 0 to 1000. The default
30067 value is set to 0.
30068
30069 dc_V
30070 Adjust the dc value (gain) of the 2nd chroma plane of the image.
30071 The filter accepts an integer value in range 0 to 1000. The default
30072 value is set to 0.
30073
30074 weight_Y
30075 Set the frequency domain weight expression for the luma plane.
30076
30077 weight_U
30078 Set the frequency domain weight expression for the 1st chroma
30079 plane.
30080
30081 weight_V
30082 Set the frequency domain weight expression for the 2nd chroma
30083 plane.
30084
30085 eval
30086 Set when the expressions are evaluated.
30087
30088 It accepts the following values:
30089
30090 init
30091 Only evaluate expressions once during the filter
30092 initialization.
30093
30094 frame
30095 Evaluate expressions for each incoming frame.
30096
30097 Default value is init.
30098
30099 The filter accepts the following variables:
30100
30101 X
30102 Y The coordinates of the current sample.
30103
30104 W
30105 H The width and height of the image.
30106
30107 N The number of input frame, starting from 0.
30108
30109 WS
30110 HS The size of FFT array for horizontal and vertical processing.
30111
30112 Examples
30113
30114 • High-pass:
30115
30116 fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
30117
30118 • Low-pass:
30119
30120 fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
30121
30122 • Sharpen:
30123
30124 fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
30125
30126 • Blur:
30127
30128 fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
30129
30130 field
30131 Extract a single field from an interlaced image using stride arithmetic
30132 to avoid wasting CPU time. The output frames are marked as non-
30133 interlaced.
30134
30135 The filter accepts the following options:
30136
30137 type
30138 Specify whether to extract the top (if the value is 0 or "top") or
30139 the bottom field (if the value is 1 or "bottom").
30140
30141 fieldhint
30142 Create new frames by copying the top and bottom fields from surrounding
30143 frames supplied as numbers by the hint file.
30144
30145 hint
30146 Set file containing hints: absolute/relative frame numbers.
30147
30148 There must be one line for each frame in a clip. Each line must
30149 contain two numbers separated by the comma, optionally followed by
30150 "-" or "+". Numbers supplied on each line of file can not be out
30151 of [N-1,N+1] where N is current frame number for "absolute" mode or
30152 out of [-1, 1] range for "relative" mode. First number tells from
30153 which frame to pick up top field and second number tells from which
30154 frame to pick up bottom field.
30155
30156 If optionally followed by "+" output frame will be marked as
30157 interlaced, else if followed by "-" output frame will be marked as
30158 progressive, else it will be marked same as input frame. If
30159 optionally followed by "t" output frame will use only top field, or
30160 in case of "b" it will use only bottom field. If line starts with
30161 "#" or ";" that line is skipped.
30162
30163 mode
30164 Can be item "absolute" or "relative" or "pattern". Default is
30165 "absolute". The "pattern" mode is same as "relative" mode, except
30166 at last entry of file if there are more frames to process than
30167 "hint" file is seek back to start.
30168
30169 Example of first several lines of "hint" file for "relative" mode:
30170
30171 0,0 - # first frame
30172 1,0 - # second frame, use third's frame top field and second's frame bottom field
30173 1,0 - # third frame, use fourth's frame top field and third's frame bottom field
30174 1,0 -
30175 0,0 -
30176 0,0 -
30177 1,0 -
30178 1,0 -
30179 1,0 -
30180 0,0 -
30181 0,0 -
30182 1,0 -
30183 1,0 -
30184 1,0 -
30185 0,0 -
30186
30187 fieldmatch
30188 Field matching filter for inverse telecine. It is meant to reconstruct
30189 the progressive frames from a telecined stream. The filter does not
30190 drop duplicated frames, so to achieve a complete inverse telecine
30191 "fieldmatch" needs to be followed by a decimation filter such as
30192 decimate in the filtergraph.
30193
30194 The separation of the field matching and the decimation is notably
30195 motivated by the possibility of inserting a de-interlacing filter
30196 fallback between the two. If the source has mixed telecined and real
30197 interlaced content, "fieldmatch" will not be able to match fields for
30198 the interlaced parts. But these remaining combed frames will be marked
30199 as interlaced, and thus can be de-interlaced by a later filter such as
30200 yadif before decimation.
30201
30202 In addition to the various configuration options, "fieldmatch" can take
30203 an optional second stream, activated through the ppsrc option. If
30204 enabled, the frames reconstruction will be based on the fields and
30205 frames from this second stream. This allows the first input to be pre-
30206 processed in order to help the various algorithms of the filter, while
30207 keeping the output lossless (assuming the fields are matched properly).
30208 Typically, a field-aware denoiser, or brightness/contrast adjustments
30209 can help.
30210
30211 Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth
30212 project) and VIVTC/VFM (VapourSynth project). The later is a light
30213 clone of TFM from which "fieldmatch" is based on. While the semantic
30214 and usage are very close, some behaviour and options names can differ.
30215
30216 The decimate filter currently only works for constant frame rate input.
30217 If your input has mixed telecined (30fps) and progressive content with
30218 a lower framerate like 24fps use the following filterchain to produce
30219 the necessary cfr stream:
30220 "dejudder,fps=30000/1001,fieldmatch,decimate".
30221
30222 The filter accepts the following options:
30223
30224 order
30225 Specify the assumed field order of the input stream. Available
30226 values are:
30227
30228 auto
30229 Auto detect parity (use FFmpeg's internal parity value).
30230
30231 bff Assume bottom field first.
30232
30233 tff Assume top field first.
30234
30235 Note that it is sometimes recommended not to trust the parity
30236 announced by the stream.
30237
30238 Default value is auto.
30239
30240 mode
30241 Set the matching mode or strategy to use. pc mode is the safest in
30242 the sense that it won't risk creating jerkiness due to duplicate
30243 frames when possible, but if there are bad edits or blended fields
30244 it will end up outputting combed frames when a good match might
30245 actually exist. On the other hand, pcn_ub mode is the most risky in
30246 terms of creating jerkiness, but will almost always find a good
30247 frame if there is one. The other values are all somewhere in
30248 between pc and pcn_ub in terms of risking jerkiness and creating
30249 duplicate frames versus finding good matches in sections with bad
30250 edits, orphaned fields, blended fields, etc.
30251
30252 More details about p/c/n/u/b are available in p/c/n/u/b meaning
30253 section.
30254
30255 Available values are:
30256
30257 pc 2-way matching (p/c)
30258
30259 pc_n
30260 2-way matching, and trying 3rd match if still combed (p/c + n)
30261
30262 pc_u
30263 2-way matching, and trying 3rd match (same order) if still
30264 combed (p/c + u)
30265
30266 pc_n_ub
30267 2-way matching, trying 3rd match if still combed, and trying
30268 4th/5th matches if still combed (p/c + n + u/b)
30269
30270 pcn 3-way matching (p/c/n)
30271
30272 pcn_ub
30273 3-way matching, and trying 4th/5th matches if all 3 of the
30274 original matches are detected as combed (p/c/n + u/b)
30275
30276 The parenthesis at the end indicate the matches that would be used
30277 for that mode assuming order=tff (and field on auto or top).
30278
30279 In terms of speed pc mode is by far the fastest and pcn_ub is the
30280 slowest.
30281
30282 Default value is pc_n.
30283
30284 ppsrc
30285 Mark the main input stream as a pre-processed input, and enable the
30286 secondary input stream as the clean source to pick the fields from.
30287 See the filter introduction for more details. It is similar to the
30288 clip2 feature from VFM/TFM.
30289
30290 Default value is 0 (disabled).
30291
30292 field
30293 Set the field to match from. It is recommended to set this to the
30294 same value as order unless you experience matching failures with
30295 that setting. In certain circumstances changing the field that is
30296 used to match from can have a large impact on matching performance.
30297 Available values are:
30298
30299 auto
30300 Automatic (same value as order).
30301
30302 bottom
30303 Match from the bottom field.
30304
30305 top Match from the top field.
30306
30307 Default value is auto.
30308
30309 mchroma
30310 Set whether or not chroma is included during the match comparisons.
30311 In most cases it is recommended to leave this enabled. You should
30312 set this to 0 only if your clip has bad chroma problems such as
30313 heavy rainbowing or other artifacts. Setting this to 0 could also
30314 be used to speed things up at the cost of some accuracy.
30315
30316 Default value is 1.
30317
30318 y0
30319 y1 These define an exclusion band which excludes the lines between y0
30320 and y1 from being included in the field matching decision. An
30321 exclusion band can be used to ignore subtitles, a logo, or other
30322 things that may interfere with the matching. y0 sets the starting
30323 scan line and y1 sets the ending line; all lines in between y0 and
30324 y1 (including y0 and y1) will be ignored. Setting y0 and y1 to the
30325 same value will disable the feature. y0 and y1 defaults to 0.
30326
30327 scthresh
30328 Set the scene change detection threshold as a percentage of maximum
30329 change on the luma plane. Good values are in the "[8.0, 14.0]"
30330 range. Scene change detection is only relevant in case
30331 combmatch=sc. The range for scthresh is "[0.0, 100.0]".
30332
30333 Default value is 12.0.
30334
30335 combmatch
30336 When combatch is not none, "fieldmatch" will take into account the
30337 combed scores of matches when deciding what match to use as the
30338 final match. Available values are:
30339
30340 none
30341 No final matching based on combed scores.
30342
30343 sc Combed scores are only used when a scene change is detected.
30344
30345 full
30346 Use combed scores all the time.
30347
30348 Default is sc.
30349
30350 combdbg
30351 Force "fieldmatch" to calculate the combed metrics for certain
30352 matches and print them. This setting is known as micout in TFM/VFM
30353 vocabulary. Available values are:
30354
30355 none
30356 No forced calculation.
30357
30358 pcn Force p/c/n calculations.
30359
30360 pcnub
30361 Force p/c/n/u/b calculations.
30362
30363 Default value is none.
30364
30365 cthresh
30366 This is the area combing threshold used for combed frame detection.
30367 This essentially controls how "strong" or "visible" combing must be
30368 to be detected. Larger values mean combing must be more visible
30369 and smaller values mean combing can be less visible or strong and
30370 still be detected. Valid settings are from -1 (every pixel will be
30371 detected as combed) to 255 (no pixel will be detected as combed).
30372 This is basically a pixel difference value. A good range is "[8,
30373 12]".
30374
30375 Default value is 9.
30376
30377 chroma
30378 Sets whether or not chroma is considered in the combed frame
30379 decision. Only disable this if your source has chroma problems
30380 (rainbowing, etc.) that are causing problems for the combed frame
30381 detection with chroma enabled. Actually, using chroma=0 is usually
30382 more reliable, except for the case where there is chroma only
30383 combing in the source.
30384
30385 Default value is 0.
30386
30387 blockx
30388 blocky
30389 Respectively set the x-axis and y-axis size of the window used
30390 during combed frame detection. This has to do with the size of the
30391 area in which combpel pixels are required to be detected as combed
30392 for a frame to be declared combed. See the combpel parameter
30393 description for more info. Possible values are any number that is
30394 a power of 2 starting at 4 and going up to 512.
30395
30396 Default value is 16.
30397
30398 combpel
30399 The number of combed pixels inside any of the blocky by blockx size
30400 blocks on the frame for the frame to be detected as combed. While
30401 cthresh controls how "visible" the combing must be, this setting
30402 controls "how much" combing there must be in any localized area (a
30403 window defined by the blockx and blocky settings) on the frame.
30404 Minimum value is 0 and maximum is "blocky x blockx" (at which point
30405 no frames will ever be detected as combed). This setting is known
30406 as MI in TFM/VFM vocabulary.
30407
30408 Default value is 80.
30409
30410 p/c/n/u/b meaning
30411
30412 p/c/n
30413
30414 We assume the following telecined stream:
30415
30416 Top fields: 1 2 2 3 4
30417 Bottom fields: 1 2 3 4 4
30418
30419 The numbers correspond to the progressive frame the fields relate to.
30420 Here, the first two frames are progressive, the 3rd and 4th are combed,
30421 and so on.
30422
30423 When "fieldmatch" is configured to run a matching from bottom
30424 (field=bottom) this is how this input stream get transformed:
30425
30426 Input stream:
30427 T 1 2 2 3 4
30428 B 1 2 3 4 4 <-- matching reference
30429
30430 Matches: c c n n c
30431
30432 Output stream:
30433 T 1 2 3 4 4
30434 B 1 2 3 4 4
30435
30436 As a result of the field matching, we can see that some frames get
30437 duplicated. To perform a complete inverse telecine, you need to rely
30438 on a decimation filter after this operation. See for instance the
30439 decimate filter.
30440
30441 The same operation now matching from top fields (field=top) looks like
30442 this:
30443
30444 Input stream:
30445 T 1 2 2 3 4 <-- matching reference
30446 B 1 2 3 4 4
30447
30448 Matches: c c p p c
30449
30450 Output stream:
30451 T 1 2 2 3 4
30452 B 1 2 2 3 4
30453
30454 In these examples, we can see what p, c and n mean; basically, they
30455 refer to the frame and field of the opposite parity:
30456
30457 *<p matches the field of the opposite parity in the previous frame>
30458 *<c matches the field of the opposite parity in the current frame>
30459 *<n matches the field of the opposite parity in the next frame>
30460
30461 u/b
30462
30463 The u and b matching are a bit special in the sense that they match
30464 from the opposite parity flag. In the following examples, we assume
30465 that we are currently matching the 2nd frame (Top:2, bottom:2).
30466 According to the match, a 'x' is placed above and below each matched
30467 fields.
30468
30469 With bottom matching (field=bottom):
30470
30471 Match: c p n b u
30472
30473 x x x x x
30474 Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
30475 Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
30476 x x x x x
30477
30478 Output frames:
30479 2 1 2 2 2
30480 2 2 2 1 3
30481
30482 With top matching (field=top):
30483
30484 Match: c p n b u
30485
30486 x x x x x
30487 Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
30488 Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
30489 x x x x x
30490
30491 Output frames:
30492 2 2 2 1 2
30493 2 1 3 2 2
30494
30495 Examples
30496
30497 Simple IVTC of a top field first telecined stream:
30498
30499 fieldmatch=order=tff:combmatch=none, decimate
30500
30501 Advanced IVTC, with fallback on yadif for still combed frames:
30502
30503 fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
30504
30505 fieldorder
30506 Transform the field order of the input video.
30507
30508 It accepts the following parameters:
30509
30510 order
30511 The output field order. Valid values are tff for top field first or
30512 bff for bottom field first.
30513
30514 The default value is tff.
30515
30516 The transformation is done by shifting the picture content up or down
30517 by one line, and filling the remaining line with appropriate picture
30518 content. This method is consistent with most broadcast field order
30519 converters.
30520
30521 If the input video is not flagged as being interlaced, or it is already
30522 flagged as being of the required output field order, then this filter
30523 does not alter the incoming video.
30524
30525 It is very useful when converting to or from PAL DV material, which is
30526 bottom field first.
30527
30528 For example:
30529
30530 ffmpeg -i in.vob -vf "fieldorder=bff" out.dv
30531
30532 fifo, afifo
30533 Buffer input images and send them when they are requested.
30534
30535 It is mainly useful when auto-inserted by the libavfilter framework.
30536
30537 It does not take parameters.
30538
30539 fillborders
30540 Fill borders of the input video, without changing video stream
30541 dimensions. Sometimes video can have garbage at the four edges and you
30542 may not want to crop video input to keep size multiple of some number.
30543
30544 This filter accepts the following options:
30545
30546 left
30547 Number of pixels to fill from left border.
30548
30549 right
30550 Number of pixels to fill from right border.
30551
30552 top Number of pixels to fill from top border.
30553
30554 bottom
30555 Number of pixels to fill from bottom border.
30556
30557 mode
30558 Set fill mode.
30559
30560 It accepts the following values:
30561
30562 smear
30563 fill pixels using outermost pixels
30564
30565 mirror
30566 fill pixels using mirroring (half sample symmetric)
30567
30568 fixed
30569 fill pixels with constant value
30570
30571 reflect
30572 fill pixels using reflecting (whole sample symmetric)
30573
30574 wrap
30575 fill pixels using wrapping
30576
30577 fade
30578 fade pixels to constant value
30579
30580 margins
30581 fill pixels at top and bottom with weighted averages pixels
30582 near borders
30583
30584 Default is smear.
30585
30586 color
30587 Set color for pixels in fixed or fade mode. Default is black.
30588
30589 Commands
30590
30591 This filter supports same commands as options. The command accepts the
30592 same syntax of the corresponding option.
30593
30594 If the specified expression is not valid, it is kept at its current
30595 value.
30596
30597 find_rect
30598 Find a rectangular object
30599
30600 It accepts the following options:
30601
30602 object
30603 Filepath of the object image, needs to be in gray8.
30604
30605 threshold
30606 Detection threshold, default is 0.5.
30607
30608 mipmaps
30609 Number of mipmaps, default is 3.
30610
30611 xmin, ymin, xmax, ymax
30612 Specifies the rectangle in which to search.
30613
30614 discard
30615 Discard frames where object is not detected. Default is disabled.
30616
30617 Examples
30618
30619 • Cover a rectangular object by the supplied image of a given video
30620 using ffmpeg:
30621
30622 ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
30623
30624 floodfill
30625 Flood area with values of same pixel components with another values.
30626
30627 It accepts the following options:
30628
30629 x Set pixel x coordinate.
30630
30631 y Set pixel y coordinate.
30632
30633 s0 Set source #0 component value.
30634
30635 s1 Set source #1 component value.
30636
30637 s2 Set source #2 component value.
30638
30639 s3 Set source #3 component value.
30640
30641 d0 Set destination #0 component value.
30642
30643 d1 Set destination #1 component value.
30644
30645 d2 Set destination #2 component value.
30646
30647 d3 Set destination #3 component value.
30648
30649 format
30650 Convert the input video to one of the specified pixel formats.
30651 Libavfilter will try to pick one that is suitable as input to the next
30652 filter.
30653
30654 It accepts the following parameters:
30655
30656 pix_fmts
30657 A '|'-separated list of pixel format names, such as
30658 "pix_fmts=yuv420p|monow|rgb24".
30659
30660 Examples
30661
30662 • Convert the input video to the yuv420p format
30663
30664 format=pix_fmts=yuv420p
30665
30666 Convert the input video to any of the formats in the list
30667
30668 format=pix_fmts=yuv420p|yuv444p|yuv410p
30669
30670 fps
30671 Convert the video to specified constant frame rate by duplicating or
30672 dropping frames as necessary.
30673
30674 It accepts the following parameters:
30675
30676 fps The desired output frame rate. It accepts expressions containing
30677 the following constants:
30678
30679 source_fps
30680 The input's frame rate
30681
30682 ntsc
30683 NTSC frame rate of "30000/1001"
30684
30685 pal PAL frame rate of 25.0
30686
30687 film
30688 Film frame rate of 24.0
30689
30690 ntsc_film
30691 NTSC-film frame rate of "24000/1001"
30692
30693 The default is 25.
30694
30695 start_time
30696 Assume the first PTS should be the given value, in seconds. This
30697 allows for padding/trimming at the start of stream. By default, no
30698 assumption is made about the first frame's expected PTS, so no
30699 padding or trimming is done. For example, this could be set to 0
30700 to pad the beginning with duplicates of the first frame if a video
30701 stream starts after the audio stream or to trim any frames with a
30702 negative PTS.
30703
30704 round
30705 Timestamp (PTS) rounding method.
30706
30707 Possible values are:
30708
30709 zero
30710 round towards 0
30711
30712 inf round away from 0
30713
30714 down
30715 round towards -infinity
30716
30717 up round towards +infinity
30718
30719 near
30720 round to nearest
30721
30722 The default is "near".
30723
30724 eof_action
30725 Action performed when reading the last frame.
30726
30727 Possible values are:
30728
30729 round
30730 Use same timestamp rounding method as used for other frames.
30731
30732 pass
30733 Pass through last frame if input duration has not been reached
30734 yet.
30735
30736 The default is "round".
30737
30738 Alternatively, the options can be specified as a flat string:
30739 fps[:start_time[:round]].
30740
30741 See also the setpts filter.
30742
30743 Examples
30744
30745 • A typical usage in order to set the fps to 25:
30746
30747 fps=fps=25
30748
30749 • Sets the fps to 24, using abbreviation and rounding method to round
30750 to nearest:
30751
30752 fps=fps=film:round=near
30753
30754 framepack
30755 Pack two different video streams into a stereoscopic video, setting
30756 proper metadata on supported codecs. The two views should have the same
30757 size and framerate and processing will stop when the shorter video
30758 ends. Please note that you may conveniently adjust view properties with
30759 the scale and fps filters.
30760
30761 It accepts the following parameters:
30762
30763 format
30764 The desired packing format. Supported values are:
30765
30766 sbs The views are next to each other (default).
30767
30768 tab The views are on top of each other.
30769
30770 lines
30771 The views are packed by line.
30772
30773 columns
30774 The views are packed by column.
30775
30776 frameseq
30777 The views are temporally interleaved.
30778
30779 Some examples:
30780
30781 # Convert left and right views into a frame-sequential video
30782 ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
30783
30784 # Convert views into a side-by-side video with the same output resolution as the input
30785 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
30786
30787 framerate
30788 Change the frame rate by interpolating new video output frames from the
30789 source frames.
30790
30791 This filter is not designed to function correctly with interlaced
30792 media. If you wish to change the frame rate of interlaced media then
30793 you are required to deinterlace before this filter and re-interlace
30794 after this filter.
30795
30796 A description of the accepted options follows.
30797
30798 fps Specify the output frames per second. This option can also be
30799 specified as a value alone. The default is 50.
30800
30801 interp_start
30802 Specify the start of a range where the output frame will be created
30803 as a linear interpolation of two frames. The range is [0-255], the
30804 default is 15.
30805
30806 interp_end
30807 Specify the end of a range where the output frame will be created
30808 as a linear interpolation of two frames. The range is [0-255], the
30809 default is 240.
30810
30811 scene
30812 Specify the level at which a scene change is detected as a value
30813 between 0 and 100 to indicate a new scene; a low value reflects a
30814 low probability for the current frame to introduce a new scene,
30815 while a higher value means the current frame is more likely to be
30816 one. The default is 8.2.
30817
30818 flags
30819 Specify flags influencing the filter process.
30820
30821 Available value for flags is:
30822
30823 scene_change_detect, scd
30824 Enable scene change detection using the value of the option
30825 scene. This flag is enabled by default.
30826
30827 framestep
30828 Select one frame every N-th frame.
30829
30830 This filter accepts the following option:
30831
30832 step
30833 Select frame after every "step" frames. Allowed values are
30834 positive integers higher than 0. Default value is 1.
30835
30836 freezedetect
30837 Detect frozen video.
30838
30839 This filter logs a message and sets frame metadata when it detects that
30840 the input video has no significant change in content during a specified
30841 duration. Video freeze detection calculates the mean average absolute
30842 difference of all the components of video frames and compares it to a
30843 noise floor.
30844
30845 The printed times and duration are expressed in seconds. The
30846 "lavfi.freezedetect.freeze_start" metadata key is set on the first
30847 frame whose timestamp equals or exceeds the detection duration and it
30848 contains the timestamp of the first frame of the freeze. The
30849 "lavfi.freezedetect.freeze_duration" and
30850 "lavfi.freezedetect.freeze_end" metadata keys are set on the first
30851 frame after the freeze.
30852
30853 The filter accepts the following options:
30854
30855 noise, n
30856 Set noise tolerance. Can be specified in dB (in case "dB" is
30857 appended to the specified value) or as a difference ratio between 0
30858 and 1. Default is -60dB, or 0.001.
30859
30860 duration, d
30861 Set freeze duration until notification (default is 2 seconds).
30862
30863 freezeframes
30864 Freeze video frames.
30865
30866 This filter freezes video frames using frame from 2nd input.
30867
30868 The filter accepts the following options:
30869
30870 first
30871 Set number of first frame from which to start freeze.
30872
30873 last
30874 Set number of last frame from which to end freeze.
30875
30876 replace
30877 Set number of frame from 2nd input which will be used instead of
30878 replaced frames.
30879
30880 frei0r
30881 Apply a frei0r effect to the input video.
30882
30883 To enable the compilation of this filter, you need to install the
30884 frei0r header and configure FFmpeg with "--enable-frei0r".
30885
30886 It accepts the following parameters:
30887
30888 filter_name
30889 The name of the frei0r effect to load. If the environment variable
30890 FREI0R_PATH is defined, the frei0r effect is searched for in each
30891 of the directories specified by the colon-separated list in
30892 FREI0R_PATH. Otherwise, the standard frei0r paths are searched, in
30893 this order: HOME/.frei0r-1/lib/, /usr/local/lib/frei0r-1/,
30894 /usr/lib/frei0r-1/.
30895
30896 filter_params
30897 A '|'-separated list of parameters to pass to the frei0r effect.
30898
30899 A frei0r effect parameter can be a boolean (its value is either "y" or
30900 "n"), a double, a color (specified as R/G/B, where R, G, and B are
30901 floating point numbers between 0.0 and 1.0, inclusive) or a color
30902 description as specified in the "Color" section in the ffmpeg-utils
30903 manual, a position (specified as X/Y, where X and Y are floating point
30904 numbers) and/or a string.
30905
30906 The number and types of parameters depend on the loaded effect. If an
30907 effect parameter is not specified, the default value is set.
30908
30909 Examples
30910
30911 • Apply the distort0r effect, setting the first two double
30912 parameters:
30913
30914 frei0r=filter_name=distort0r:filter_params=0.5|0.01
30915
30916 • Apply the colordistance effect, taking a color as the first
30917 parameter:
30918
30919 frei0r=colordistance:0.2/0.3/0.4
30920 frei0r=colordistance:violet
30921 frei0r=colordistance:0x112233
30922
30923 • Apply the perspective effect, specifying the top left and top right
30924 image positions:
30925
30926 frei0r=perspective:0.2/0.2|0.8/0.2
30927
30928 For more information, see <http://frei0r.dyne.org>
30929
30930 Commands
30931
30932 This filter supports the filter_params option as commands.
30933
30934 fspp
30935 Apply fast and simple postprocessing. It is a faster version of spp.
30936
30937 It splits (I)DCT into horizontal/vertical passes. Unlike the simple
30938 post- processing filter, one of them is performed once per block, not
30939 per pixel. This allows for much higher speed.
30940
30941 The filter accepts the following options:
30942
30943 quality
30944 Set quality. This option defines the number of levels for
30945 averaging. It accepts an integer in the range 4-5. Default value is
30946 4.
30947
30948 qp Force a constant quantization parameter. It accepts an integer in
30949 range 0-63. If not set, the filter will use the QP from the video
30950 stream (if available).
30951
30952 strength
30953 Set filter strength. It accepts an integer in range -15 to 32.
30954 Lower values mean more details but also more artifacts, while
30955 higher values make the image smoother but also blurrier. Default
30956 value is 0 − PSNR optimal.
30957
30958 use_bframe_qp
30959 Enable the use of the QP from the B-Frames if set to 1. Using this
30960 option may cause flicker since the B-Frames have often larger QP.
30961 Default is 0 (not enabled).
30962
30963 gblur
30964 Apply Gaussian blur filter.
30965
30966 The filter accepts the following options:
30967
30968 sigma
30969 Set horizontal sigma, standard deviation of Gaussian blur. Default
30970 is 0.5.
30971
30972 steps
30973 Set number of steps for Gaussian approximation. Default is 1.
30974
30975 planes
30976 Set which planes to filter. By default all planes are filtered.
30977
30978 sigmaV
30979 Set vertical sigma, if negative it will be same as "sigma".
30980 Default is -1.
30981
30982 Commands
30983
30984 This filter supports same commands as options. The command accepts the
30985 same syntax of the corresponding option.
30986
30987 If the specified expression is not valid, it is kept at its current
30988 value.
30989
30990 geq
30991 Apply generic equation to each pixel.
30992
30993 The filter accepts the following options:
30994
30995 lum_expr, lum
30996 Set the luminance expression.
30997
30998 cb_expr, cb
30999 Set the chrominance blue expression.
31000
31001 cr_expr, cr
31002 Set the chrominance red expression.
31003
31004 alpha_expr, a
31005 Set the alpha expression.
31006
31007 red_expr, r
31008 Set the red expression.
31009
31010 green_expr, g
31011 Set the green expression.
31012
31013 blue_expr, b
31014 Set the blue expression.
31015
31016 The colorspace is selected according to the specified options. If one
31017 of the lum_expr, cb_expr, or cr_expr options is specified, the filter
31018 will automatically select a YCbCr colorspace. If one of the red_expr,
31019 green_expr, or blue_expr options is specified, it will select an RGB
31020 colorspace.
31021
31022 If one of the chrominance expression is not defined, it falls back on
31023 the other one. If no alpha expression is specified it will evaluate to
31024 opaque value. If none of chrominance expressions are specified, they
31025 will evaluate to the luminance expression.
31026
31027 The expressions can use the following variables and functions:
31028
31029 N The sequential number of the filtered frame, starting from 0.
31030
31031 X
31032 Y The coordinates of the current sample.
31033
31034 W
31035 H The width and height of the image.
31036
31037 SW
31038 SH Width and height scale depending on the currently filtered plane.
31039 It is the ratio between the corresponding luma plane number of
31040 pixels and the current plane ones. E.g. for YUV4:2:0 the values are
31041 "1,1" for the luma plane, and "0.5,0.5" for chroma planes.
31042
31043 T Time of the current frame, expressed in seconds.
31044
31045 p(x, y)
31046 Return the value of the pixel at location (x,y) of the current
31047 plane.
31048
31049 lum(x, y)
31050 Return the value of the pixel at location (x,y) of the luminance
31051 plane.
31052
31053 cb(x, y)
31054 Return the value of the pixel at location (x,y) of the blue-
31055 difference chroma plane. Return 0 if there is no such plane.
31056
31057 cr(x, y)
31058 Return the value of the pixel at location (x,y) of the red-
31059 difference chroma plane. Return 0 if there is no such plane.
31060
31061 r(x, y)
31062 g(x, y)
31063 b(x, y)
31064 Return the value of the pixel at location (x,y) of the
31065 red/green/blue component. Return 0 if there is no such component.
31066
31067 alpha(x, y)
31068 Return the value of the pixel at location (x,y) of the alpha plane.
31069 Return 0 if there is no such plane.
31070
31071 psum(x,y), lumsum(x, y), cbsum(x,y), crsum(x,y), rsum(x,y), gsum(x,y),
31072 bsum(x,y), alphasum(x,y)
31073 Sum of sample values in the rectangle from (0,0) to (x,y), this
31074 allows obtaining sums of samples within a rectangle. See the
31075 functions without the sum postfix.
31076
31077 interpolation
31078 Set one of interpolation methods:
31079
31080 nearest, n
31081 bilinear, b
31082
31083 Default is bilinear.
31084
31085 For functions, if x and y are outside the area, the value will be
31086 automatically clipped to the closer edge.
31087
31088 Please note that this filter can use multiple threads in which case
31089 each slice will have its own expression state. If you want to use only
31090 a single expression state because your expressions depend on previous
31091 state then you should limit the number of filter threads to 1.
31092
31093 Examples
31094
31095 • Flip the image horizontally:
31096
31097 geq=p(W-X\,Y)
31098
31099 • Generate a bidimensional sine wave, with angle "PI/3" and a
31100 wavelength of 100 pixels:
31101
31102 geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
31103
31104 • Generate a fancy enigmatic moving light:
31105
31106 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
31107
31108 • Generate a quick emboss effect:
31109
31110 format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
31111
31112 • Modify RGB components depending on pixel position:
31113
31114 geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
31115
31116 • Create a radial gradient that is the same size as the input (also
31117 see the vignette filter):
31118
31119 geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
31120
31121 gradfun
31122 Fix the banding artifacts that are sometimes introduced into nearly
31123 flat regions by truncation to 8-bit color depth. Interpolate the
31124 gradients that should go where the bands are, and dither them.
31125
31126 It is designed for playback only. Do not use it prior to lossy
31127 compression, because compression tends to lose the dither and bring
31128 back the bands.
31129
31130 It accepts the following parameters:
31131
31132 strength
31133 The maximum amount by which the filter will change any one pixel.
31134 This is also the threshold for detecting nearly flat regions.
31135 Acceptable values range from .51 to 64; the default value is 1.2.
31136 Out-of-range values will be clipped to the valid range.
31137
31138 radius
31139 The neighborhood to fit the gradient to. A larger radius makes for
31140 smoother gradients, but also prevents the filter from modifying the
31141 pixels near detailed regions. Acceptable values are 8-32; the
31142 default value is 16. Out-of-range values will be clipped to the
31143 valid range.
31144
31145 Alternatively, the options can be specified as a flat string:
31146 strength[:radius]
31147
31148 Examples
31149
31150 • Apply the filter with a 3.5 strength and radius of 8:
31151
31152 gradfun=3.5:8
31153
31154 • Specify radius, omitting the strength (which will fall-back to the
31155 default value):
31156
31157 gradfun=radius=8
31158
31159 graphmonitor
31160 Show various filtergraph stats.
31161
31162 With this filter one can debug complete filtergraph. Especially issues
31163 with links filling with queued frames.
31164
31165 The filter accepts the following options:
31166
31167 size, s
31168 Set video output size. Default is hd720.
31169
31170 opacity, o
31171 Set video opacity. Default is 0.9. Allowed range is from 0 to 1.
31172
31173 mode, m
31174 Set output mode, can be fulll or compact. In compact mode only
31175 filters with some queued frames have displayed stats.
31176
31177 flags, f
31178 Set flags which enable which stats are shown in video.
31179
31180 Available values for flags are:
31181
31182 queue
31183 Display number of queued frames in each link.
31184
31185 frame_count_in
31186 Display number of frames taken from filter.
31187
31188 frame_count_out
31189 Display number of frames given out from filter.
31190
31191 frame_count_delta
31192 Display delta number of frames between above two values.
31193
31194 pts Display current filtered frame pts.
31195
31196 pts_delta
31197 Display pts delta between current and previous frame.
31198
31199 time
31200 Display current filtered frame time.
31201
31202 time_delta
31203 Display time delta between current and previous frame.
31204
31205 timebase
31206 Display time base for filter link.
31207
31208 format
31209 Display used format for filter link.
31210
31211 size
31212 Display video size or number of audio channels in case of audio
31213 used by filter link.
31214
31215 rate
31216 Display video frame rate or sample rate in case of audio used
31217 by filter link.
31218
31219 eof Display link output status.
31220
31221 sample_count_in
31222 Display number of samples taken from filter.
31223
31224 sample_count_out
31225 Display number of samples given out from filter.
31226
31227 sample_count_delta
31228 Display delta number of samples between above two values.
31229
31230 rate, r
31231 Set upper limit for video rate of output stream, Default value is
31232 25. This guarantee that output video frame rate will not be higher
31233 than this value.
31234
31235 grayworld
31236 A color constancy filter that applies color correction based on the
31237 grayworld assumption
31238
31239 See:
31240 <https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging>
31241
31242 The algorithm uses linear light, so input data should be linearized
31243 beforehand (and possibly correctly tagged).
31244
31245 ffmpeg -i INPUT -vf zscale=transfer=linear,grayworld,zscale=transfer=bt709,format=yuv420p OUTPUT
31246
31247 greyedge
31248 A color constancy variation filter which estimates scene illumination
31249 via grey edge algorithm and corrects the scene colors accordingly.
31250
31251 See: <https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf>
31252
31253 The filter accepts the following options:
31254
31255 difford
31256 The order of differentiation to be applied on the scene. Must be
31257 chosen in the range [0,2] and default value is 1.
31258
31259 minknorm
31260 The Minkowski parameter to be used for calculating the Minkowski
31261 distance. Must be chosen in the range [0,20] and default value is
31262 1. Set to 0 for getting max value instead of calculating Minkowski
31263 distance.
31264
31265 sigma
31266 The standard deviation of Gaussian blur to be applied on the scene.
31267 Must be chosen in the range [0,1024.0] and default value = 1.
31268 floor( sigma * break_off_sigma(3) ) can't be equal to 0 if difford
31269 is greater than 0.
31270
31271 Examples
31272
31273 • Grey Edge:
31274
31275 greyedge=difford=1:minknorm=5:sigma=2
31276
31277 • Max Edge:
31278
31279 greyedge=difford=1:minknorm=0:sigma=2
31280
31281 guided
31282 Apply guided filter for edge-preserving smoothing, dehazing and so on.
31283
31284 The filter accepts the following options:
31285
31286 radius
31287 Set the box radius in pixels. Allowed range is 1 to 20. Default is
31288 3.
31289
31290 eps Set regularization parameter (with square). Allowed range is 0 to
31291 1. Default is 0.01.
31292
31293 mode
31294 Set filter mode. Can be "basic" or "fast". Default is "basic".
31295
31296 sub Set subsampling ratio for "fast" mode. Range is 2 to 64. Default
31297 is 4. No subsampling occurs in "basic" mode.
31298
31299 guidance
31300 Set guidance mode. Can be "off" or "on". Default is "off". If
31301 "off", single input is required. If "on", two inputs of the same
31302 resolution and pixel format are required. The second input serves
31303 as the guidance.
31304
31305 planes
31306 Set planes to filter. Default is first only.
31307
31308 Commands
31309
31310 This filter supports the all above options as commands.
31311
31312 Examples
31313
31314 • Edge-preserving smoothing with guided filter:
31315
31316 ffmpeg -i in.png -vf guided out.png
31317
31318 • Dehazing, structure-transferring filtering, detail enhancement with
31319 guided filter. For the generation of guidance image, refer to
31320 paper "Guided Image Filtering". See:
31321 <http://kaiminghe.com/publications/pami12guidedfilter.pdf>.
31322
31323 ffmpeg -i in.png -i guidance.png -filter_complex guided=guidance=on out.png
31324
31325 haldclut
31326 Apply a Hald CLUT to a video stream.
31327
31328 First input is the video stream to process, and second one is the Hald
31329 CLUT. The Hald CLUT input can be a simple picture or a complete video
31330 stream.
31331
31332 The filter accepts the following options:
31333
31334 clut
31335 Set which CLUT video frames will be processed from second input
31336 stream, can be first or all. Default is all.
31337
31338 shortest
31339 Force termination when the shortest input terminates. Default is 0.
31340
31341 repeatlast
31342 Continue applying the last CLUT after the end of the stream. A
31343 value of 0 disable the filter after the last frame of the CLUT is
31344 reached. Default is 1.
31345
31346 "haldclut" also has the same interpolation options as lut3d (both
31347 filters share the same internals).
31348
31349 This filter also supports the framesync options.
31350
31351 More information about the Hald CLUT can be found on Eskil Steenberg's
31352 website (Hald CLUT author) at
31353 <http://www.quelsolaar.com/technology/clut.html>.
31354
31355 Commands
31356
31357 This filter supports the "interp" option as commands.
31358
31359 Workflow examples
31360
31361 Hald CLUT video stream
31362
31363 Generate an identity Hald CLUT stream altered with various effects:
31364
31365 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
31366
31367 Note: make sure you use a lossless codec.
31368
31369 Then use it with "haldclut" to apply it on some random stream:
31370
31371 ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
31372
31373 The Hald CLUT will be applied to the 10 first seconds (duration of
31374 clut.nut), then the latest picture of that CLUT stream will be applied
31375 to the remaining frames of the "mandelbrot" stream.
31376
31377 Hald CLUT with preview
31378
31379 A Hald CLUT is supposed to be a squared image of "Level*Level*Level" by
31380 "Level*Level*Level" pixels. For a given Hald CLUT, FFmpeg will select
31381 the biggest possible square starting at the top left of the picture.
31382 The remaining padding pixels (bottom or right) will be ignored. This
31383 area can be used to add a preview of the Hald CLUT.
31384
31385 Typically, the following generated Hald CLUT will be supported by the
31386 "haldclut" filter:
31387
31388 ffmpeg -f lavfi -i B<haldclutsrc>=8 -vf "
31389 pad=iw+320 [padded_clut];
31390 smptebars=s=320x256, split [a][b];
31391 [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
31392 [main][b] overlay=W-320" -frames:v 1 clut.png
31393
31394 It contains the original and a preview of the effect of the CLUT: SMPTE
31395 color bars are displayed on the right-top, and below the same color
31396 bars processed by the color changes.
31397
31398 Then, the effect of this Hald CLUT can be visualized with:
31399
31400 ffplay input.mkv -vf "movie=clut.png, [in] haldclut"
31401
31402 hflip
31403 Flip the input video horizontally.
31404
31405 For example, to horizontally flip the input video with ffmpeg:
31406
31407 ffmpeg -i in.avi -vf "hflip" out.avi
31408
31409 histeq
31410 This filter applies a global color histogram equalization on a per-
31411 frame basis.
31412
31413 It can be used to correct video that has a compressed range of pixel
31414 intensities. The filter redistributes the pixel intensities to
31415 equalize their distribution across the intensity range. It may be
31416 viewed as an "automatically adjusting contrast filter". This filter is
31417 useful only for correcting degraded or poorly captured source video.
31418
31419 The filter accepts the following options:
31420
31421 strength
31422 Determine the amount of equalization to be applied. As the
31423 strength is reduced, the distribution of pixel intensities more-
31424 and-more approaches that of the input frame. The value must be a
31425 float number in the range [0,1] and defaults to 0.200.
31426
31427 intensity
31428 Set the maximum intensity that can generated and scale the output
31429 values appropriately. The strength should be set as desired and
31430 then the intensity can be limited if needed to avoid washing-out.
31431 The value must be a float number in the range [0,1] and defaults to
31432 0.210.
31433
31434 antibanding
31435 Set the antibanding level. If enabled the filter will randomly vary
31436 the luminance of output pixels by a small amount to avoid banding
31437 of the histogram. Possible values are "none", "weak" or "strong".
31438 It defaults to "none".
31439
31440 histogram
31441 Compute and draw a color distribution histogram for the input video.
31442
31443 The computed histogram is a representation of the color component
31444 distribution in an image.
31445
31446 Standard histogram displays the color components distribution in an
31447 image. Displays color graph for each color component. Shows
31448 distribution of the Y, U, V, A or R, G, B components, depending on
31449 input format, in the current frame. Below each graph a color component
31450 scale meter is shown.
31451
31452 The filter accepts the following options:
31453
31454 level_height
31455 Set height of level. Default value is 200. Allowed range is [50,
31456 2048].
31457
31458 scale_height
31459 Set height of color scale. Default value is 12. Allowed range is
31460 [0, 40].
31461
31462 display_mode
31463 Set display mode. It accepts the following values:
31464
31465 stack
31466 Per color component graphs are placed below each other.
31467
31468 parade
31469 Per color component graphs are placed side by side.
31470
31471 overlay
31472 Presents information identical to that in the "parade", except
31473 that the graphs representing color components are superimposed
31474 directly over one another.
31475
31476 Default is "stack".
31477
31478 levels_mode
31479 Set mode. Can be either "linear", or "logarithmic". Default is
31480 "linear".
31481
31482 components
31483 Set what color components to display. Default is 7.
31484
31485 fgopacity
31486 Set foreground opacity. Default is 0.7.
31487
31488 bgopacity
31489 Set background opacity. Default is 0.5.
31490
31491 colors_mode
31492 Set colors mode. It accepts the following values:
31493
31494 whiteonblack
31495 blackonwhite
31496 whiteongray
31497 blackongray
31498 coloronblack
31499 coloronwhite
31500 colorongray
31501 blackoncolor
31502 whiteoncolor
31503 grayoncolor
31504
31505 Default is "whiteonblack".
31506
31507 Examples
31508
31509 • Calculate and draw histogram:
31510
31511 ffplay -i input -vf histogram
31512
31513 hqdn3d
31514 This is a high precision/quality 3d denoise filter. It aims to reduce
31515 image noise, producing smooth images and making still images really
31516 still. It should enhance compressibility.
31517
31518 It accepts the following optional parameters:
31519
31520 luma_spatial
31521 A non-negative floating point number which specifies spatial luma
31522 strength. It defaults to 4.0.
31523
31524 chroma_spatial
31525 A non-negative floating point number which specifies spatial chroma
31526 strength. It defaults to 3.0*luma_spatial/4.0.
31527
31528 luma_tmp
31529 A floating point number which specifies luma temporal strength. It
31530 defaults to 6.0*luma_spatial/4.0.
31531
31532 chroma_tmp
31533 A floating point number which specifies chroma temporal strength.
31534 It defaults to luma_tmp*chroma_spatial/luma_spatial.
31535
31536 Commands
31537
31538 This filter supports same commands as options. The command accepts the
31539 same syntax of the corresponding option.
31540
31541 If the specified expression is not valid, it is kept at its current
31542 value.
31543
31544 hwdownload
31545 Download hardware frames to system memory.
31546
31547 The input must be in hardware frames, and the output a non-hardware
31548 format. Not all formats will be supported on the output - it may be
31549 necessary to insert an additional format filter immediately following
31550 in the graph to get the output in a supported format.
31551
31552 hwmap
31553 Map hardware frames to system memory or to another device.
31554
31555 This filter has several different modes of operation; which one is used
31556 depends on the input and output formats:
31557
31558 • Hardware frame input, normal frame output
31559
31560 Map the input frames to system memory and pass them to the output.
31561 If the original hardware frame is later required (for example,
31562 after overlaying something else on part of it), the hwmap filter
31563 can be used again in the next mode to retrieve it.
31564
31565 • Normal frame input, hardware frame output
31566
31567 If the input is actually a software-mapped hardware frame, then
31568 unmap it - that is, return the original hardware frame.
31569
31570 Otherwise, a device must be provided. Create new hardware surfaces
31571 on that device for the output, then map them back to the software
31572 format at the input and give those frames to the preceding filter.
31573 This will then act like the hwupload filter, but may be able to
31574 avoid an additional copy when the input is already in a compatible
31575 format.
31576
31577 • Hardware frame input and output
31578
31579 A device must be supplied for the output, either directly or with
31580 the derive_device option. The input and output devices must be of
31581 different types and compatible - the exact meaning of this is
31582 system-dependent, but typically it means that they must refer to
31583 the same underlying hardware context (for example, refer to the
31584 same graphics card).
31585
31586 If the input frames were originally created on the output device,
31587 then unmap to retrieve the original frames.
31588
31589 Otherwise, map the frames to the output device - create new
31590 hardware frames on the output corresponding to the frames on the
31591 input.
31592
31593 The following additional parameters are accepted:
31594
31595 mode
31596 Set the frame mapping mode. Some combination of:
31597
31598 read
31599 The mapped frame should be readable.
31600
31601 write
31602 The mapped frame should be writeable.
31603
31604 overwrite
31605 The mapping will always overwrite the entire frame.
31606
31607 This may improve performance in some cases, as the original
31608 contents of the frame need not be loaded.
31609
31610 direct
31611 The mapping must not involve any copying.
31612
31613 Indirect mappings to copies of frames are created in some cases
31614 where either direct mapping is not possible or it would have
31615 unexpected properties. Setting this flag ensures that the
31616 mapping is direct and will fail if that is not possible.
31617
31618 Defaults to read+write if not specified.
31619
31620 derive_device type
31621 Rather than using the device supplied at initialisation, instead
31622 derive a new device of type type from the device the input frames
31623 exist on.
31624
31625 reverse
31626 In a hardware to hardware mapping, map in reverse - create frames
31627 in the sink and map them back to the source. This may be necessary
31628 in some cases where a mapping in one direction is required but only
31629 the opposite direction is supported by the devices being used.
31630
31631 This option is dangerous - it may break the preceding filter in
31632 undefined ways if there are any additional constraints on that
31633 filter's output. Do not use it without fully understanding the
31634 implications of its use.
31635
31636 hwupload
31637 Upload system memory frames to hardware surfaces.
31638
31639 The device to upload to must be supplied when the filter is
31640 initialised. If using ffmpeg, select the appropriate device with the
31641 -filter_hw_device option or with the derive_device option. The input
31642 and output devices must be of different types and compatible - the
31643 exact meaning of this is system-dependent, but typically it means that
31644 they must refer to the same underlying hardware context (for example,
31645 refer to the same graphics card).
31646
31647 The following additional parameters are accepted:
31648
31649 derive_device type
31650 Rather than using the device supplied at initialisation, instead
31651 derive a new device of type type from the device the input frames
31652 exist on.
31653
31654 hwupload_cuda
31655 Upload system memory frames to a CUDA device.
31656
31657 It accepts the following optional parameters:
31658
31659 device
31660 The number of the CUDA device to use
31661
31662 hqx
31663 Apply a high-quality magnification filter designed for pixel art. This
31664 filter was originally created by Maxim Stepin.
31665
31666 It accepts the following option:
31667
31668 n Set the scaling dimension: 2 for "hq2x", 3 for "hq3x" and 4 for
31669 "hq4x". Default is 3.
31670
31671 hstack
31672 Stack input videos horizontally.
31673
31674 All streams must be of same pixel format and of same height.
31675
31676 Note that this filter is faster than using overlay and pad filter to
31677 create same output.
31678
31679 The filter accepts the following option:
31680
31681 inputs
31682 Set number of input streams. Default is 2.
31683
31684 shortest
31685 If set to 1, force the output to terminate when the shortest input
31686 terminates. Default value is 0.
31687
31688 hsvhold
31689 Turns a certain HSV range into gray values.
31690
31691 This filter measures color difference between set HSV color in options
31692 and ones measured in video stream. Depending on options, output colors
31693 can be changed to be gray or not.
31694
31695 The filter accepts the following options:
31696
31697 hue Set the hue value which will be used in color difference
31698 calculation. Allowed range is from -360 to 360. Default value is
31699 0.
31700
31701 sat Set the saturation value which will be used in color difference
31702 calculation. Allowed range is from -1 to 1. Default value is 0.
31703
31704 val Set the value which will be used in color difference calculation.
31705 Allowed range is from -1 to 1. Default value is 0.
31706
31707 similarity
31708 Set similarity percentage with the key color. Allowed range is
31709 from 0 to 1. Default value is 0.01.
31710
31711 0.00001 matches only the exact key color, while 1.0 matches
31712 everything.
31713
31714 blend
31715 Blend percentage. Allowed range is from 0 to 1. Default value is
31716 0.
31717
31718 0.0 makes pixels either fully gray, or not gray at all.
31719
31720 Higher values result in more gray pixels, with a higher gray pixel
31721 the more similar the pixels color is to the key color.
31722
31723 hsvkey
31724 Turns a certain HSV range into transparency.
31725
31726 This filter measures color difference between set HSV color in options
31727 and ones measured in video stream. Depending on options, output colors
31728 can be changed to transparent by adding alpha channel.
31729
31730 The filter accepts the following options:
31731
31732 hue Set the hue value which will be used in color difference
31733 calculation. Allowed range is from -360 to 360. Default value is
31734 0.
31735
31736 sat Set the saturation value which will be used in color difference
31737 calculation. Allowed range is from -1 to 1. Default value is 0.
31738
31739 val Set the value which will be used in color difference calculation.
31740 Allowed range is from -1 to 1. Default value is 0.
31741
31742 similarity
31743 Set similarity percentage with the key color. Allowed range is
31744 from 0 to 1. Default value is 0.01.
31745
31746 0.00001 matches only the exact key color, while 1.0 matches
31747 everything.
31748
31749 blend
31750 Blend percentage. Allowed range is from 0 to 1. Default value is
31751 0.
31752
31753 0.0 makes pixels either fully transparent, or not transparent at
31754 all.
31755
31756 Higher values result in semi-transparent pixels, with a higher
31757 transparency the more similar the pixels color is to the key color.
31758
31759 hue
31760 Modify the hue and/or the saturation of the input.
31761
31762 It accepts the following parameters:
31763
31764 h Specify the hue angle as a number of degrees. It accepts an
31765 expression, and defaults to "0".
31766
31767 s Specify the saturation in the [-10,10] range. It accepts an
31768 expression and defaults to "1".
31769
31770 H Specify the hue angle as a number of radians. It accepts an
31771 expression, and defaults to "0".
31772
31773 b Specify the brightness in the [-10,10] range. It accepts an
31774 expression and defaults to "0".
31775
31776 h and H are mutually exclusive, and can't be specified at the same
31777 time.
31778
31779 The b, h, H and s option values are expressions containing the
31780 following constants:
31781
31782 n frame count of the input frame starting from 0
31783
31784 pts presentation timestamp of the input frame expressed in time base
31785 units
31786
31787 r frame rate of the input video, NAN if the input frame rate is
31788 unknown
31789
31790 t timestamp expressed in seconds, NAN if the input timestamp is
31791 unknown
31792
31793 tb time base of the input video
31794
31795 Examples
31796
31797 • Set the hue to 90 degrees and the saturation to 1.0:
31798
31799 hue=h=90:s=1
31800
31801 • Same command but expressing the hue in radians:
31802
31803 hue=H=PI/2:s=1
31804
31805 • Rotate hue and make the saturation swing between 0 and 2 over a
31806 period of 1 second:
31807
31808 hue="H=2*PI*t: s=sin(2*PI*t)+1"
31809
31810 • Apply a 3 seconds saturation fade-in effect starting at 0:
31811
31812 hue="s=min(t/3\,1)"
31813
31814 The general fade-in expression can be written as:
31815
31816 hue="s=min(0\, max((t-START)/DURATION\, 1))"
31817
31818 • Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
31819
31820 hue="s=max(0\, min(1\, (8-t)/3))"
31821
31822 The general fade-out expression can be written as:
31823
31824 hue="s=max(0\, min(1\, (START+DURATION-t)/DURATION))"
31825
31826 Commands
31827
31828 This filter supports the following commands:
31829
31830 b
31831 s
31832 h
31833 H Modify the hue and/or the saturation and/or brightness of the input
31834 video. The command accepts the same syntax of the corresponding
31835 option.
31836
31837 If the specified expression is not valid, it is kept at its current
31838 value.
31839
31840 huesaturation
31841 Apply hue-saturation-intensity adjustments to input video stream.
31842
31843 This filter operates in RGB colorspace.
31844
31845 This filter accepts the following options:
31846
31847 hue Set the hue shift in degrees to apply. Default is 0. Allowed range
31848 is from -180 to 180.
31849
31850 saturation
31851 Set the saturation shift. Default is 0. Allowed range is from -1
31852 to 1.
31853
31854 intensity
31855 Set the intensity shift. Default is 0. Allowed range is from -1 to
31856 1.
31857
31858 colors
31859 Set which primary and complementary colors are going to be
31860 adjusted. This options is set by providing one or multiple values.
31861 This can select multiple colors at once. By default all colors are
31862 selected.
31863
31864 r Adjust reds.
31865
31866 y Adjust yellows.
31867
31868 g Adjust greens.
31869
31870 c Adjust cyans.
31871
31872 b Adjust blues.
31873
31874 m Adjust magentas.
31875
31876 a Adjust all colors.
31877
31878 strength
31879 Set strength of filtering. Allowed range is from 0 to 100. Default
31880 value is 1.
31881
31882 rw, gw, bw
31883 Set weight for each RGB component. Allowed range is from 0 to 1.
31884 By default is set to 0.333, 0.334, 0.333. Those options are used
31885 in saturation and lightess processing.
31886
31887 lightness
31888 Set preserving lightness, by default is disabled. Adjusting hues
31889 can change lightness from original RGB triplet, with this option
31890 enabled lightness is kept at same value.
31891
31892 hysteresis
31893 Grow first stream into second stream by connecting components. This
31894 makes it possible to build more robust edge masks.
31895
31896 This filter accepts the following options:
31897
31898 planes
31899 Set which planes will be processed as bitmap, unprocessed planes
31900 will be copied from first stream. By default value 0xf, all planes
31901 will be processed.
31902
31903 threshold
31904 Set threshold which is used in filtering. If pixel component value
31905 is higher than this value filter algorithm for connecting
31906 components is activated. By default value is 0.
31907
31908 The "hysteresis" filter also supports the framesync options.
31909
31910 iccdetect
31911 Detect the colorspace from an embedded ICC profile (if present), and
31912 update the frame's tags accordingly.
31913
31914 This filter accepts the following options:
31915
31916 force
31917 If true, the frame's existing colorspace tags will always be
31918 overridden by values detected from an ICC profile. Otherwise, they
31919 will only be assigned if they contain "unknown". Enabled by
31920 default.
31921
31922 iccgen
31923 Generate ICC profiles and attach them to frames.
31924
31925 This filter accepts the following options:
31926
31927 color_primaries
31928 color_trc
31929 Configure the colorspace that the ICC profile will be generated
31930 for. The default value of "auto" infers the value from the input
31931 frame's metadata, defaulting to BT.709/sRGB as appropriate.
31932
31933 See the setparams filter for a list of possible values, but note
31934 that "unknown" are not valid values for this filter.
31935
31936 force
31937 If true, an ICC profile will be generated even if it would
31938 overwrite an already existing ICC profile. Disabled by default.
31939
31940 identity
31941 Obtain the identity score between two input videos.
31942
31943 This filter takes two input videos.
31944
31945 Both input videos must have the same resolution and pixel format for
31946 this filter to work correctly. Also it assumes that both inputs have
31947 the same number of frames, which are compared one by one.
31948
31949 The obtained per component, average, min and max identity score is
31950 printed through the logging system.
31951
31952 The filter stores the calculated identity scores of each frame in frame
31953 metadata.
31954
31955 This filter also supports the framesync options.
31956
31957 In the below example the input file main.mpg being processed is
31958 compared with the reference file ref.mpg.
31959
31960 ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
31961
31962 idet
31963 Detect video interlacing type.
31964
31965 This filter tries to detect if the input frames are interlaced,
31966 progressive, top or bottom field first. It will also try to detect
31967 fields that are repeated between adjacent frames (a sign of telecine).
31968
31969 Single frame detection considers only immediately adjacent frames when
31970 classifying each frame. Multiple frame detection incorporates the
31971 classification history of previous frames.
31972
31973 The filter will log these metadata values:
31974
31975 single.current_frame
31976 Detected type of current frame using single-frame detection. One
31977 of: ``tff'' (top field first), ``bff'' (bottom field first),
31978 ``progressive'', or ``undetermined''
31979
31980 single.tff
31981 Cumulative number of frames detected as top field first using
31982 single-frame detection.
31983
31984 multiple.tff
31985 Cumulative number of frames detected as top field first using
31986 multiple-frame detection.
31987
31988 single.bff
31989 Cumulative number of frames detected as bottom field first using
31990 single-frame detection.
31991
31992 multiple.current_frame
31993 Detected type of current frame using multiple-frame detection. One
31994 of: ``tff'' (top field first), ``bff'' (bottom field first),
31995 ``progressive'', or ``undetermined''
31996
31997 multiple.bff
31998 Cumulative number of frames detected as bottom field first using
31999 multiple-frame detection.
32000
32001 single.progressive
32002 Cumulative number of frames detected as progressive using single-
32003 frame detection.
32004
32005 multiple.progressive
32006 Cumulative number of frames detected as progressive using multiple-
32007 frame detection.
32008
32009 single.undetermined
32010 Cumulative number of frames that could not be classified using
32011 single-frame detection.
32012
32013 multiple.undetermined
32014 Cumulative number of frames that could not be classified using
32015 multiple-frame detection.
32016
32017 repeated.current_frame
32018 Which field in the current frame is repeated from the last. One of
32019 ``neither'', ``top'', or ``bottom''.
32020
32021 repeated.neither
32022 Cumulative number of frames with no repeated field.
32023
32024 repeated.top
32025 Cumulative number of frames with the top field repeated from the
32026 previous frame's top field.
32027
32028 repeated.bottom
32029 Cumulative number of frames with the bottom field repeated from the
32030 previous frame's bottom field.
32031
32032 The filter accepts the following options:
32033
32034 intl_thres
32035 Set interlacing threshold.
32036
32037 prog_thres
32038 Set progressive threshold.
32039
32040 rep_thres
32041 Threshold for repeated field detection.
32042
32043 half_life
32044 Number of frames after which a given frame's contribution to the
32045 statistics is halved (i.e., it contributes only 0.5 to its
32046 classification). The default of 0 means that all frames seen are
32047 given full weight of 1.0 forever.
32048
32049 analyze_interlaced_flag
32050 When this is not 0 then idet will use the specified number of
32051 frames to determine if the interlaced flag is accurate, it will not
32052 count undetermined frames. If the flag is found to be accurate it
32053 will be used without any further computations, if it is found to be
32054 inaccurate it will be cleared without any further computations.
32055 This allows inserting the idet filter as a low computational method
32056 to clean up the interlaced flag
32057
32058 il
32059 Deinterleave or interleave fields.
32060
32061 This filter allows one to process interlaced images fields without
32062 deinterlacing them. Deinterleaving splits the input frame into 2 fields
32063 (so called half pictures). Odd lines are moved to the top half of the
32064 output image, even lines to the bottom half. You can process (filter)
32065 them independently and then re-interleave them.
32066
32067 The filter accepts the following options:
32068
32069 luma_mode, l
32070 chroma_mode, c
32071 alpha_mode, a
32072 Available values for luma_mode, chroma_mode and alpha_mode are:
32073
32074 none
32075 Do nothing.
32076
32077 deinterleave, d
32078 Deinterleave fields, placing one above the other.
32079
32080 interleave, i
32081 Interleave fields. Reverse the effect of deinterleaving.
32082
32083 Default value is "none".
32084
32085 luma_swap, ls
32086 chroma_swap, cs
32087 alpha_swap, as
32088 Swap luma/chroma/alpha fields. Exchange even & odd lines. Default
32089 value is 0.
32090
32091 Commands
32092
32093 This filter supports the all above options as commands.
32094
32095 inflate
32096 Apply inflate effect to the video.
32097
32098 This filter replaces the pixel by the local(3x3) average by taking into
32099 account only values higher than the pixel.
32100
32101 It accepts the following options:
32102
32103 threshold0
32104 threshold1
32105 threshold2
32106 threshold3
32107 Limit the maximum change for each plane, default is 65535. If 0,
32108 plane will remain unchanged.
32109
32110 Commands
32111
32112 This filter supports the all above options as commands.
32113
32114 interlace
32115 Simple interlacing filter from progressive contents. This interleaves
32116 upper (or lower) lines from odd frames with lower (or upper) lines from
32117 even frames, halving the frame rate and preserving image height.
32118
32119 Original Original New Frame
32120 Frame 'j' Frame 'j+1' (tff)
32121 ========== =========== ==================
32122 Line 0 --------------------> Frame 'j' Line 0
32123 Line 1 Line 1 ----> Frame 'j+1' Line 1
32124 Line 2 ---------------------> Frame 'j' Line 2
32125 Line 3 Line 3 ----> Frame 'j+1' Line 3
32126 ... ... ...
32127 New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
32128
32129 It accepts the following optional parameters:
32130
32131 scan
32132 This determines whether the interlaced frame is taken from the even
32133 (tff - default) or odd (bff) lines of the progressive frame.
32134
32135 lowpass
32136 Vertical lowpass filter to avoid twitter interlacing and reduce
32137 moire patterns.
32138
32139 0, off
32140 Disable vertical lowpass filter
32141
32142 1, linear
32143 Enable linear filter (default)
32144
32145 2, complex
32146 Enable complex filter. This will slightly less reduce twitter
32147 and moire but better retain detail and subjective sharpness
32148 impression.
32149
32150 kerndeint
32151 Deinterlace input video by applying Donald Graft's adaptive kernel
32152 deinterling. Work on interlaced parts of a video to produce progressive
32153 frames.
32154
32155 The description of the accepted parameters follows.
32156
32157 thresh
32158 Set the threshold which affects the filter's tolerance when
32159 determining if a pixel line must be processed. It must be an
32160 integer in the range [0,255] and defaults to 10. A value of 0 will
32161 result in applying the process on every pixels.
32162
32163 map Paint pixels exceeding the threshold value to white if set to 1.
32164 Default is 0.
32165
32166 order
32167 Set the fields order. Swap fields if set to 1, leave fields alone
32168 if 0. Default is 0.
32169
32170 sharp
32171 Enable additional sharpening if set to 1. Default is 0.
32172
32173 twoway
32174 Enable twoway sharpening if set to 1. Default is 0.
32175
32176 Examples
32177
32178 • Apply default values:
32179
32180 kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
32181
32182 • Enable additional sharpening:
32183
32184 kerndeint=sharp=1
32185
32186 • Paint processed pixels in white:
32187
32188 kerndeint=map=1
32189
32190 kirsch
32191 Apply kirsch operator to input video stream.
32192
32193 The filter accepts the following option:
32194
32195 planes
32196 Set which planes will be processed, unprocessed planes will be
32197 copied. By default value 0xf, all planes will be processed.
32198
32199 scale
32200 Set value which will be multiplied with filtered result.
32201
32202 delta
32203 Set value which will be added to filtered result.
32204
32205 Commands
32206
32207 This filter supports the all above options as commands.
32208
32209 lagfun
32210 Slowly update darker pixels.
32211
32212 This filter makes short flashes of light appear longer. This filter
32213 accepts the following options:
32214
32215 decay
32216 Set factor for decaying. Default is .95. Allowed range is from 0 to
32217 1.
32218
32219 planes
32220 Set which planes to filter. Default is all. Allowed range is from 0
32221 to 15.
32222
32223 Commands
32224
32225 This filter supports the all above options as commands.
32226
32227 lenscorrection
32228 Correct radial lens distortion
32229
32230 This filter can be used to correct for radial distortion as can result
32231 from the use of wide angle lenses, and thereby re-rectify the image. To
32232 find the right parameters one can use tools available for example as
32233 part of opencv or simply trial-and-error. To use opencv use the
32234 calibration sample (under samples/cpp) from the opencv sources and
32235 extract the k1 and k2 coefficients from the resulting matrix.
32236
32237 Note that effectively the same filter is available in the open-source
32238 tools Krita and Digikam from the KDE project.
32239
32240 In contrast to the vignette filter, which can also be used to
32241 compensate lens errors, this filter corrects the distortion of the
32242 image, whereas vignette corrects the brightness distribution, so you
32243 may want to use both filters together in certain cases, though you will
32244 have to take care of ordering, i.e. whether vignetting should be
32245 applied before or after lens correction.
32246
32247 Options
32248
32249 The filter accepts the following options:
32250
32251 cx Relative x-coordinate of the focal point of the image, and thereby
32252 the center of the distortion. This value has a range [0,1] and is
32253 expressed as fractions of the image width. Default is 0.5.
32254
32255 cy Relative y-coordinate of the focal point of the image, and thereby
32256 the center of the distortion. This value has a range [0,1] and is
32257 expressed as fractions of the image height. Default is 0.5.
32258
32259 k1 Coefficient of the quadratic correction term. This value has a
32260 range [-1,1]. 0 means no correction. Default is 0.
32261
32262 k2 Coefficient of the double quadratic correction term. This value has
32263 a range [-1,1]. 0 means no correction. Default is 0.
32264
32265 i Set interpolation type. Can be "nearest" or "bilinear". Default is
32266 "nearest".
32267
32268 fc Specify the color of the unmapped pixels. For the syntax of this
32269 option, check the "Color" section in the ffmpeg-utils manual.
32270 Default color is "black@0".
32271
32272 The formula that generates the correction is:
32273
32274 r_src = r_tgt * (1 + k1 * (r_tgt / r_0)^2 + k2 * (r_tgt / r_0)^4)
32275
32276 where r_0 is halve of the image diagonal and r_src and r_tgt are the
32277 distances from the focal point in the source and target images,
32278 respectively.
32279
32280 Commands
32281
32282 This filter supports the all above options as commands.
32283
32284 lensfun
32285 Apply lens correction via the lensfun library
32286 (<http://lensfun.sourceforge.net/>).
32287
32288 The "lensfun" filter requires the camera make, camera model, and lens
32289 model to apply the lens correction. The filter will load the lensfun
32290 database and query it to find the corresponding camera and lens entries
32291 in the database. As long as these entries can be found with the given
32292 options, the filter can perform corrections on frames. Note that
32293 incomplete strings will result in the filter choosing the best match
32294 with the given options, and the filter will output the chosen camera
32295 and lens models (logged with level "info"). You must provide the make,
32296 camera model, and lens model as they are required.
32297
32298 To obtain a list of available makes and models, leave out one or both
32299 of "make" and "model" options. The filter will send the full list to
32300 the log with level "INFO". The first column is the make and the second
32301 column is the model. To obtain a list of available lenses, set any
32302 values for make and model and leave out the "lens_model" option. The
32303 filter will send the full list of lenses in the log with level "INFO".
32304 The ffmpeg tool will exit after the list is printed.
32305
32306 The filter accepts the following options:
32307
32308 make
32309 The make of the camera (for example, "Canon"). This option is
32310 required.
32311
32312 model
32313 The model of the camera (for example, "Canon EOS 100D"). This
32314 option is required.
32315
32316 lens_model
32317 The model of the lens (for example, "Canon EF-S 18-55mm f/3.5-5.6
32318 IS STM"). This option is required.
32319
32320 db_path
32321 The full path to the lens database folder. If not set, the filter
32322 will attempt to load the database from the install path when the
32323 library was built. Default is unset.
32324
32325 mode
32326 The type of correction to apply. The following values are valid
32327 options:
32328
32329 vignetting
32330 Enables fixing lens vignetting.
32331
32332 geometry
32333 Enables fixing lens geometry. This is the default.
32334
32335 subpixel
32336 Enables fixing chromatic aberrations.
32337
32338 vig_geo
32339 Enables fixing lens vignetting and lens geometry.
32340
32341 vig_subpixel
32342 Enables fixing lens vignetting and chromatic aberrations.
32343
32344 distortion
32345 Enables fixing both lens geometry and chromatic aberrations.
32346
32347 all Enables all possible corrections.
32348
32349 focal_length
32350 The focal length of the image/video (zoom; expected constant for
32351 video). For example, a 18--55mm lens has focal length range of
32352 [18--55], so a value in that range should be chosen when using that
32353 lens. Default 18.
32354
32355 aperture
32356 The aperture of the image/video (expected constant for video). Note
32357 that aperture is only used for vignetting correction. Default 3.5.
32358
32359 focus_distance
32360 The focus distance of the image/video (expected constant for
32361 video). Note that focus distance is only used for vignetting and
32362 only slightly affects the vignetting correction process. If
32363 unknown, leave it at the default value (which is 1000).
32364
32365 scale
32366 The scale factor which is applied after transformation. After
32367 correction the video is no longer necessarily rectangular. This
32368 parameter controls how much of the resulting image is visible. The
32369 value 0 means that a value will be chosen automatically such that
32370 there is little or no unmapped area in the output image. 1.0 means
32371 that no additional scaling is done. Lower values may result in more
32372 of the corrected image being visible, while higher values may avoid
32373 unmapped areas in the output.
32374
32375 target_geometry
32376 The target geometry of the output image/video. The following values
32377 are valid options:
32378
32379 rectilinear (default)
32380 fisheye
32381 panoramic
32382 equirectangular
32383 fisheye_orthographic
32384 fisheye_stereographic
32385 fisheye_equisolid
32386 fisheye_thoby
32387 reverse
32388 Apply the reverse of image correction (instead of correcting
32389 distortion, apply it).
32390
32391 interpolation
32392 The type of interpolation used when correcting distortion. The
32393 following values are valid options:
32394
32395 nearest
32396 linear (default)
32397 lanczos
32398
32399 Examples
32400
32401 • Apply lens correction with make "Canon", camera model "Canon EOS
32402 100D", and lens model "Canon EF-S 18-55mm f/3.5-5.6 IS STM" with
32403 focal length of "18" and aperture of "8.0".
32404
32405 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
32406
32407 • Apply the same as before, but only for the first 5 seconds of
32408 video.
32409
32410 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
32411
32412 libplacebo
32413 Flexible GPU-accelerated processing filter based on libplacebo
32414 (<https://code.videolan.org/videolan/libplacebo>). Note that this
32415 filter currently only accepts Vulkan input frames.
32416
32417 Options
32418
32419 The options for this filter are divided into the following sections:
32420
32421 Output mode
32422
32423 These options control the overall output mode. By default, libplacebo
32424 will try to preserve the source colorimetry and size as best as it can,
32425 but it will apply any embedded film grain, dolby vision metadata or
32426 anamorphic SAR present in source frames.
32427
32428 w
32429 h Set the output video dimension expression. Default value is the
32430 input dimension.
32431
32432 Allows for the same expressions as the scale filter.
32433
32434 format
32435 Set the output format override. If unset (the default), frames will
32436 be output in the same format as the respective input frames.
32437 Otherwise, format conversion will be performed.
32438
32439 force_original_aspect_ratio
32440 force_divisible_by
32441 Work the same as the identical scale filter options.
32442
32443 normalize_sar
32444 If enabled, output frames will always have a pixel aspect ratio of
32445 1:1. This will introduce padding/cropping as necessary. If disabled
32446 (the default), any aspect ratio mismatches, including those from
32447 e.g. anamorphic video sources, are forwarded to the output pixel
32448 aspect ratio.
32449
32450 pad_crop_ratio
32451 Specifies a ratio (between 0.0 and 1.0) between padding and
32452 cropping when the input aspect ratio does not match the output
32453 aspect ratio and normalize_sar is in effect. The default of 0.0
32454 always pads the content with black borders, while a value of 1.0
32455 always crops off parts of the content. Intermediate values are
32456 possible, leading to a mix of the two approaches.
32457
32458 colorspace
32459 color_primaries
32460 color_trc
32461 range
32462 Configure the colorspace that output frames will be delivered in.
32463 The default value of "auto" outputs frames in the same format as
32464 the input frames, leading to no change. For any other value,
32465 conversion will be performed.
32466
32467 See the setparams filter for a list of possible values.
32468
32469 apply_filmgrain
32470 Apply film grain (e.g. AV1 or H.274) if present in source frames,
32471 and strip it from the output. Enabled by default.
32472
32473 apply_dolbyvision
32474 Apply Dolby Vision RPU metadata if present in source frames, and
32475 strip it from the output. Enabled by default. Note that Dolby
32476 Vision will always output BT.2020+PQ, overriding the usual input
32477 frame metadata. These will also be picked as the values of "auto"
32478 for the respective frame output options.
32479
32480 Scaling
32481
32482 The options in this section control how libplacebo performs upscaling
32483 and (if necessary) downscaling. Note that libplacebo will always
32484 internally operate on 4:4:4 content, so any sub-sampled chroma formats
32485 such as "yuv420p" will necessarily be upsampled and downsampled as part
32486 of the rendering process. That means scaling might be in effect even if
32487 the source and destination resolution are the same.
32488
32489 upscaler
32490 downscaler
32491 Configure the filter kernel used for upscaling and downscaling. The
32492 respective defaults are "spline36" and "mitchell". For a full list
32493 of possible values, pass "help" to these options. The most
32494 important values are:
32495
32496 none
32497 Forces the use of built-in GPU texture sampling (typically
32498 bilinear). Extremely fast but poor quality, especially when
32499 downscaling.
32500
32501 bilinear
32502 Bilinear interpolation. Can generally be done for free on GPUs,
32503 except when doing so would lead to aliasing. Fast and low
32504 quality.
32505
32506 nearest
32507 Nearest-neighbour interpolation. Sharp but highly aliasing.
32508
32509 oversample
32510 Algorithm that looks visually similar to nearest-neighbour
32511 interpolation but tries to preserve pixel aspect ratio. Good
32512 for pixel art, since it results in minimal distortion of the
32513 artistic appearance.
32514
32515 lanczos
32516 Standard sinc-sinc interpolation kernel.
32517
32518 spline36
32519 Cubic spline approximation of lanczos. No difference in
32520 performance, but has very slightly less ringing.
32521
32522 ewa_lanczos
32523 Elliptically weighted average version of lanczos, based on a
32524 jinc-sinc kernel. This is also popularly referred to as just
32525 "Jinc scaling". Slow but very high quality.
32526
32527 gaussian
32528 Gaussian kernel. Has certain ideal mathematical properties, but
32529 subjectively very blurry.
32530
32531 mitchell
32532 Cubic BC spline with parameters recommended by Mitchell and
32533 Netravali. Very little ringing.
32534
32535 lut_entries
32536 Configures the size of scaler LUTs, ranging from 1 to 256. The
32537 default of 0 will pick libplacebo's internal default, typically 64.
32538
32539 antiringing
32540 Enables anti-ringing (for non-EWA filters). The value (between 0.0
32541 and 1.0) configures the strength of the anti-ringing algorithm. May
32542 increase aliasing if set too high. Disabled by default.
32543
32544 sigmoid
32545 Enable sigmoidal compression during upscaling. Reduces ringing
32546 slightly. Enabled by default.
32547
32548 Debanding
32549
32550 Libplacebo comes with a built-in debanding filter that is good at
32551 counteracting many common sources of banding and blocking. Turning this
32552 on is highly recommended whenever quality is desired.
32553
32554 deband
32555 Enable (fast) debanding algorithm. Disabled by default.
32556
32557 deband_iterations
32558 Number of deband iterations of the debanding algorithm. Each
32559 iteration is performed with progressively increased radius (and
32560 diminished threshold). Recommended values are in the range 1 to 4.
32561 Defaults to 1.
32562
32563 deband_threshold
32564 Debanding filter strength. Higher numbers lead to more aggressive
32565 debanding. Defaults to 4.0.
32566
32567 deband_radius
32568 Debanding filter radius. A higher radius is better for slow
32569 gradients, while a lower radius is better for steep gradients.
32570 Defaults to 16.0.
32571
32572 deband_grain
32573 Amount of extra output grain to add. Helps hide imperfections.
32574 Defaults to 6.0.
32575
32576 Color adjustment
32577
32578 A collection of subjective color controls. Not very rigorous, so the
32579 exact effect will vary somewhat depending on the input primaries and
32580 colorspace.
32581
32582 brightness
32583 Brightness boost, between -1.0 and 1.0. Defaults to 0.0.
32584
32585 contrast
32586 Contrast gain, between 0.0 and 16.0. Defaults to 1.0.
32587
32588 saturation
32589 Saturation gain, between 0.0 and 16.0. Defaults to 1.0.
32590
32591 hue Hue shift in radians, between -3.14 and 3.14. Defaults to 0.0. This
32592 will rotate the UV subvector, defaulting to BT.709 coefficients for
32593 RGB inputs.
32594
32595 gamma
32596 Gamma adjustment, between 0.0 and 16.0. Defaults to 1.0.
32597
32598 cones
32599 Cone model to use for color blindness simulation. Accepts any
32600 combination of "l", "m" and "s". Here are some examples:
32601
32602 m Deuteranomaly / deuteranopia (affecting 3%-4% of the
32603 population)
32604
32605 l Protanomaly / protanopia (affecting 1%-2% of the population)
32606
32607 l+m Monochromacy (very rare)
32608
32609 l+m+s
32610 Achromatopsy (complete loss of daytime vision, extremely rare)
32611
32612 cone-strength
32613 Gain factor for the cones specified by "cones", between 0.0 and
32614 10.0. A value of 1.0 results in no change to color vision. A value
32615 of 0.0 (the default) simulates complete loss of those cones. Values
32616 above 1.0 result in exaggerating the differences between cones,
32617 which may help compensate for reduced color vision.
32618
32619 Peak detection
32620
32621 To help deal with sources that only have static HDR10 metadata (or no
32622 tagging whatsoever), libplacebo uses its own internal frame analysis
32623 compute shader to analyze source frames and adapt the tone mapping
32624 function in realtime. If this is too slow, or if exactly reproducible
32625 frame-perfect results are needed, it's recommended to turn this feature
32626 off.
32627
32628 peak_detect
32629 Enable HDR peak detection. Ignores static MaxCLL/MaxFALL values in
32630 favor of dynamic detection from the input. Note that the detected
32631 values do not get written back to the output frames, they merely
32632 guide the internal tone mapping process. Enabled by default.
32633
32634 smoothing_period
32635 Peak detection smoothing period, between 0.0 and 1000.0. Higher
32636 values result in peak detection becoming less responsive to changes
32637 in the input. Defaults to 100.0.
32638
32639 minimum_peak
32640 Lower bound on the detected peak (relative to SDR white), between
32641 0.0 and 100.0. Defaults to 1.0.
32642
32643 scene_threshold_low
32644 scene_threshold_high
32645 Lower and upper thresholds for scene change detection. Expressed in
32646 a logarithmic scale between 0.0 and 100.0. Default to 5.5 and 10.0,
32647 respectively. Setting either to a negative value disables this
32648 functionality.
32649
32650 overshoot
32651 Peak smoothing overshoot margin, between 0.0 and 1.0. Provides a
32652 safety margin to prevent clipping as a result of peak smoothing.
32653 Defaults to 0.05, corresponding to a margin of 5%.
32654
32655 Tone mapping
32656
32657 The options in this section control how libplacebo performs tone-
32658 mapping and gamut-mapping when dealing with mismatches between wide-
32659 gamut or HDR content. In general, libplacebo relies on accurate source
32660 tagging and mastering display gamut information to produce the best
32661 results.
32662
32663 intent
32664 Rendering intent to use when adapting between different primary
32665 color gamuts (after tone-mapping).
32666
32667 perceptual
32668 Perceptual gamut mapping. Currently equivalent to relative
32669 colorimetric.
32670
32671 relative
32672 Relative colorimetric. This is the default.
32673
32674 absolute
32675 Absolute colorimetric.
32676
32677 saturation
32678 Saturation mapping. Forcibly stretches the source gamut to the
32679 target gamut.
32680
32681 gamut_mode
32682 How to handle out-of-gamut colors that can occur as a result of
32683 colorimetric gamut mapping.
32684
32685 clip
32686 Do nothing, simply clip out-of-range colors to the RGB volume.
32687 This is the default.
32688
32689 warn
32690 Highlight out-of-gamut pixels (by coloring them pink).
32691
32692 darken
32693 Linearly reduces content brightness to preserves saturated
32694 details, followed by clipping the remaining out-of-gamut
32695 colors. As the name implies, this makes everything darker, but
32696 provides a good balance between preserving details and colors.
32697
32698 desaturate
32699 Hard-desaturates out-of-gamut colors towards white, while
32700 preserving the luminance. Has a tendency to shift colors.
32701
32702 tonemapping
32703 Tone-mapping algorithm to use. Available values are:
32704
32705 auto
32706 Automatic selection based on internal heuristics. This is the
32707 default.
32708
32709 clip
32710 Performs no tone-mapping, just clips out-of-range colors.
32711 Retains perfect color accuracy for in-range colors but
32712 completely destroys out-of-range information. Does not perform
32713 any black point adaptation. Not configurable.
32714
32715 st2094-40
32716 EETF from SMPTE ST 2094-40 Annex B, which applies the Bezier
32717 curves from HDR10+ dynamic metadata based on Bezier curves to
32718 perform tone-mapping. The OOTF used is adjusted based on the
32719 ratio between the targeted and actual display peak luminances.
32720
32721 st2094-10
32722 EETF from SMPTE ST 2094-10 Annex B.2, which takes into account
32723 the input signal average luminance in addition to the
32724 maximum/minimum. The configurable contrast parameter influences
32725 the slope of the linear output segment, defaulting to 1.0 for
32726 no increase/decrease in contrast. Note that this does not
32727 currently include the subjective gain/offset/gamma controls
32728 defined in Annex B.3.
32729
32730 bt.2390
32731 EETF from the ITU-R Report BT.2390, a hermite spline roll-off
32732 with linear segment. The knee point offset is configurable.
32733 Note that this parameter defaults to 1.0, rather than the value
32734 of 0.5 from the ITU-R spec.
32735
32736 bt.2446a
32737 EETF from ITU-R Report BT.2446, method A. Designed for well-
32738 mastered HDR sources. Can be used for both forward and inverse
32739 tone mapping. Not configurable.
32740
32741 spline
32742 Simple spline consisting of two polynomials, joined by a single
32743 pivot point. The parameter gives the pivot point (in PQ
32744 space), defaulting to 0.30. Can be used for both forward and
32745 inverse tone mapping.
32746
32747 reinhard
32748 Simple non-linear, global tone mapping algorithm. The parameter
32749 specifies the local contrast coefficient at the display peak.
32750 Essentially, a parameter of 0.5 implies that the reference
32751 white will be about half as bright as when clipping. Defaults
32752 to 0.5, which results in the simplest formulation of this
32753 function.
32754
32755 mobius
32756 Generalization of the reinhard tone mapping algorithm to
32757 support an additional linear slope near black. The tone mapping
32758 parameter indicates the trade-off between the linear section
32759 and the non-linear section. Essentially, for a given parameter
32760 x, every color value below x will be mapped linearly, while
32761 higher values get non-linearly tone-mapped. Values near 1.0
32762 make this curve behave like "clip", while values near 0.0 make
32763 this curve behave like "reinhard". The default value is 0.3,
32764 which provides a good balance between colorimetric accuracy and
32765 preserving out-of-gamut details.
32766
32767 hable
32768 Piece-wise, filmic tone-mapping algorithm developed by John
32769 Hable for use in Uncharted 2, inspired by a similar tone-
32770 mapping algorithm used by Kodak. Popularized by its use in
32771 video games with HDR rendering. Preserves both dark and bright
32772 details very well, but comes with the drawback of changing the
32773 average brightness quite significantly. This is sort of similar
32774 to "reinhard" with parameter 0.24.
32775
32776 gamma
32777 Fits a gamma (power) function to transfer between the source
32778 and target color spaces, effectively resulting in a perceptual
32779 hard-knee joining two roughly linear sections. This preserves
32780 details at all scales fairly accurately, but can result in an
32781 image with a muted or dull appearance. The parameter is used as
32782 the cutoff point, defaulting to 0.5.
32783
32784 linear
32785 Linearly stretches the input range to the output range, in PQ
32786 space. This will preserve all details accurately, but results
32787 in a significantly different average brightness. Can be used
32788 for inverse tone-mapping in addition to regular tone-mapping.
32789 The parameter can be used as an additional linear gain
32790 coefficient (defaulting to 1.0).
32791
32792 tonemapping_param
32793 For tunable tone mapping functions, this parameter can be used to
32794 fine-tune the curve behavior. Refer to the documentation of
32795 "tonemapping". The default value of 0.0 is replaced by the curve's
32796 preferred default setting.
32797
32798 tonemapping_mode
32799 This option determines how the tone mapping function specified by
32800 "tonemapping" is applied to the colors in a scene. Possible values
32801 are:
32802
32803 auto
32804 Automatic selection based on internal heuristics. This is the
32805 default.
32806
32807 rgb Apply the function per-channel in the RGB colorspace. Per-
32808 channel tone-mapping in RGB. Guarantees no clipping and heavily
32809 desaturates the output, but distorts the colors quite
32810 significantly. Very similar to the "Hollywood" look and feel.
32811
32812 max Tone-mapping is performed on the brightest component found in
32813 the signal. Good at preserving details in highlights, but has a
32814 tendency to crush blacks.
32815
32816 hybrid
32817 Tone-map per-channel for highlights and linearly (luma-based)
32818 for midtones/shadows, based on a fixed gamma 2.4 coefficient
32819 curve.
32820
32821 luma
32822 Tone-map linearly on the luma component (CIE Y), and adjust
32823 (desaturate) the chromaticities to compensate using a simple
32824 constant factor. This is essentially the mode used in ITU-R
32825 BT.2446 method A.
32826
32827 inverse_tonemapping
32828 If enabled, this filter will also attempt stretching SDR signals to
32829 fill HDR output color volumes. Disabled by default.
32830
32831 tonemapping_crosstalk
32832 Extra tone-mapping crosstalk factor, between 0.0 and 0.3. This can
32833 help reduce issues tone-mapping certain bright spectral colors.
32834 Defaults to 0.04.
32835
32836 tonemapping_lut_size
32837 Size of the tone-mapping LUT, between 2 and 1024. Defaults to 256.
32838 Note that this figure is squared when combined with "peak_detect".
32839
32840 Dithering
32841
32842 By default, libplacebo will dither whenever necessary, which includes
32843 rendering to any integer format below 16-bit precision. It's
32844 recommended to always leave this on, since not doing so may result in
32845 visible banding in the output, even if the "debanding" filter is
32846 enabled. If maximum performance is needed, use "ordered_fixed" instead
32847 of disabling dithering.
32848
32849 dithering
32850 Dithering method to use. Accepts the following values:
32851
32852 none
32853 Disables dithering completely. May result in visible banding.
32854
32855 blue
32856 Dither with pseudo-blue noise. This is the default.
32857
32858 ordered
32859 Tunable ordered dither pattern.
32860
32861 ordered_fixed
32862 Faster ordered dither with a fixed size of 6. Texture-less.
32863
32864 white
32865 Dither with white noise. Texture-less.
32866
32867 dither_lut_size
32868 Dither LUT size, as log base2 between 1 and 8. Defaults to 6,
32869 corresponding to a LUT size of "64x64".
32870
32871 dither_temporal
32872 Enables temporal dithering. Disabled by default.
32873
32874 Custom shaders
32875
32876 libplacebo supports a number of custom shaders based on the mpv .hook
32877 GLSL syntax. A collection of such shaders can be found here:
32878 <https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders>
32879
32880 A full description of the mpv shader format is beyond the scope of this
32881 section, but a summary can be found here:
32882 <https://mpv.io/manual/master/#options-glsl-shader>
32883
32884 custom_shader_path
32885 Specifies a path to a custom shader file to load at runtime.
32886
32887 custom_shader_bin
32888 Specifies a complete custom shader as a raw string.
32889
32890 Debugging / performance
32891
32892 All of the options in this section default off. They may be of
32893 assistance when attempting to squeeze the maximum performance at the
32894 cost of quality.
32895
32896 skip_aa
32897 Disable anti-aliasing when downscaling.
32898
32899 polar_cutoff
32900 Truncate polar (EWA) scaler kernels below this absolute magnitude,
32901 between 0.0 and 1.0.
32902
32903 disable_linear
32904 Disable linear light scaling.
32905
32906 disable_builtin
32907 Disable built-in GPU sampling (forces LUT).
32908
32909 disable_fbos
32910 Forcibly disable FBOs, resulting in loss of almost all
32911 functionality, but offering the maximum possible speed.
32912
32913 Commands
32914
32915 This filter supports almost all of the above options as commands.
32916
32917 Examples
32918
32919 • Complete example for how to initialize the Vulkan device, upload
32920 frames to the GPU, perform filter conversion to yuv420p, and
32921 download frames back to the CPU for output. Note that in specific
32922 cases you can get around the need to perform format conversion by
32923 specifying the correct "format" filter option corresponding to the
32924 input frames.
32925
32926 ffmpeg -i $INPUT -init_hw_device vulkan -vf hwupload,libplacebo=format=yuv420p,hwdownload,format=yuv420p $OUTPUT
32927
32928 • Tone-map input to standard gamut BT.709 output:
32929
32930 libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv
32931
32932 • Rescale input to fit into standard 1080p, with high quality
32933 scaling:
32934
32935 libplacebo=w=1920:h=1080:force_original_aspect_ratio=decrease:normalize_sar=true:upscaler=ewa_lanczos:downscaler=ewa_lanczos
32936
32937 • Convert input to standard sRGB JPEG:
32938
32939 libplacebo=format=yuv420p:colorspace=bt470bg:color_primaries=bt709:color_trc=iec61966-2-1:range=pc
32940
32941 • Use higher quality debanding settings:
32942
32943 libplacebo=deband=true:deband_iterations=3:deband_radius=8:deband_threshold=6
32944
32945 • Run this filter on the CPU, on systems with Mesa installed (and
32946 with the most expensive options disabled):
32947
32948 ffmpeg ... -init_hw_device vulkan:llvmpipe ... -vf libplacebo=upscaler=none:downscaler=none:peak_detect=false
32949
32950 • Suppress CPU-based AV1/H.274 film grain application in the decoder,
32951 in favor of doing it with this filter. Note that this is only a
32952 gain if the frames are either already on the GPU, or if you're
32953 using libplacebo for other purposes, since otherwise the VRAM
32954 roundtrip will more than offset any expected speedup.
32955
32956 ffmpeg -export_side_data +film_grain ... -vf libplacebo=apply_filmgrain=true
32957
32958 libvmaf
32959 Calulate the VMAF (Video Multi-Method Assessment Fusion) score for a
32960 reference/distorted pair of input videos.
32961
32962 The first input is the distorted video, and the second input is the
32963 reference video.
32964
32965 The obtained VMAF score is printed through the logging system.
32966
32967 It requires Netflix's vmaf library (libvmaf) as a pre-requisite. After
32968 installing the library it can be enabled using: "./configure
32969 --enable-libvmaf".
32970
32971 The filter has following options:
32972
32973 model
32974 A `|` delimited list of vmaf models. Each model can be configured
32975 with a number of parameters. Default value: "version=vmaf_v0.6.1"
32976
32977 model_path
32978 Deprecated, use model='path=...'.
32979
32980 enable_transform
32981 Deprecated, use model='enable_transform=true'.
32982
32983 phone_model
32984 Deprecated, use model='enable_transform=true'.
32985
32986 enable_conf_interval
32987 Deprecated, use model='enable_conf_interval=true'.
32988
32989 feature
32990 A `|` delimited list of features. Each feature can be configured
32991 with a number of parameters.
32992
32993 psnr
32994 Deprecated, use feature='name=psnr'.
32995
32996 ssim
32997 Deprecated, use feature='name=ssim'.
32998
32999 ms_ssim
33000 Deprecated, use feature='name=ms_ssim'.
33001
33002 log_path
33003 Set the file path to be used to store log files.
33004
33005 log_fmt
33006 Set the format of the log file (xml, json, csv, or sub).
33007
33008 n_threads
33009 Set number of threads to be used when initializing libvmaf.
33010 Default value: 0, no threads.
33011
33012 n_subsample
33013 Set frame subsampling interval to be used.
33014
33015 This filter also supports the framesync options.
33016
33017 Examples
33018
33019 • In the examples below, a distorted video distorted.mpg is compared
33020 with a reference file reference.mpg.
33021
33022 • Basic usage:
33023
33024 ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf=log_path=output.xml -f null -
33025
33026 • Example with multiple models:
33027
33028 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 -
33029
33030 • Example with multiple addtional features:
33031
33032 ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='feature=name=psnr|name=ciede' -f null -
33033
33034 • Example with options and different containers:
33035
33036 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 -
33037
33038 limitdiff
33039 Apply limited difference filter using second and optionally third video
33040 stream.
33041
33042 The filter accepts the following options:
33043
33044 threshold
33045 Set the threshold to use when allowing certain differences between
33046 video streams. Any absolute difference value lower or exact than
33047 this threshold will pick pixel components from first video stream.
33048
33049 elasticity
33050 Set the elasticity of soft thresholding when processing video
33051 streams. This value multiplied with first one sets second
33052 threshold. Any absolute difference value greater or exact than
33053 second threshold will pick pixel components from second video
33054 stream. For values between those two threshold linear interpolation
33055 between first and second video stream will be used.
33056
33057 reference
33058 Enable the reference (third) video stream processing. By default is
33059 disabled. If set, this video stream will be used for calculating
33060 absolute difference with first video stream.
33061
33062 planes
33063 Specify which planes will be processed. Defaults to all available.
33064
33065 Commands
33066
33067 This filter supports the all above options as commands except option
33068 reference.
33069
33070 limiter
33071 Limits the pixel components values to the specified range [min, max].
33072
33073 The filter accepts the following options:
33074
33075 min Lower bound. Defaults to the lowest allowed value for the input.
33076
33077 max Upper bound. Defaults to the highest allowed value for the input.
33078
33079 planes
33080 Specify which planes will be processed. Defaults to all available.
33081
33082 Commands
33083
33084 This filter supports the all above options as commands.
33085
33086 loop
33087 Loop video frames.
33088
33089 The filter accepts the following options:
33090
33091 loop
33092 Set the number of loops. Setting this value to -1 will result in
33093 infinite loops. Default is 0.
33094
33095 size
33096 Set maximal size in number of frames. Default is 0.
33097
33098 start
33099 Set first frame of loop. Default is 0.
33100
33101 Examples
33102
33103 • Loop single first frame infinitely:
33104
33105 loop=loop=-1:size=1:start=0
33106
33107 • Loop single first frame 10 times:
33108
33109 loop=loop=10:size=1:start=0
33110
33111 • Loop 10 first frames 5 times:
33112
33113 loop=loop=5:size=10:start=0
33114
33115 lut1d
33116 Apply a 1D LUT to an input video.
33117
33118 The filter accepts the following options:
33119
33120 file
33121 Set the 1D LUT file name.
33122
33123 Currently supported formats:
33124
33125 cube
33126 Iridas
33127
33128 csp cineSpace
33129
33130 interp
33131 Select interpolation mode.
33132
33133 Available values are:
33134
33135 nearest
33136 Use values from the nearest defined point.
33137
33138 linear
33139 Interpolate values using the linear interpolation.
33140
33141 cosine
33142 Interpolate values using the cosine interpolation.
33143
33144 cubic
33145 Interpolate values using the cubic interpolation.
33146
33147 spline
33148 Interpolate values using the spline interpolation.
33149
33150 Commands
33151
33152 This filter supports the all above options as commands.
33153
33154 lut3d
33155 Apply a 3D LUT to an input video.
33156
33157 The filter accepts the following options:
33158
33159 file
33160 Set the 3D LUT file name.
33161
33162 Currently supported formats:
33163
33164 3dl AfterEffects
33165
33166 cube
33167 Iridas
33168
33169 dat DaVinci
33170
33171 m3d Pandora
33172
33173 csp cineSpace
33174
33175 interp
33176 Select interpolation mode.
33177
33178 Available values are:
33179
33180 nearest
33181 Use values from the nearest defined point.
33182
33183 trilinear
33184 Interpolate values using the 8 points defining a cube.
33185
33186 tetrahedral
33187 Interpolate values using a tetrahedron.
33188
33189 pyramid
33190 Interpolate values using a pyramid.
33191
33192 prism
33193 Interpolate values using a prism.
33194
33195 Commands
33196
33197 This filter supports the "interp" option as commands.
33198
33199 lumakey
33200 Turn certain luma values into transparency.
33201
33202 The filter accepts the following options:
33203
33204 threshold
33205 Set the luma which will be used as base for transparency. Default
33206 value is 0.
33207
33208 tolerance
33209 Set the range of luma values to be keyed out. Default value is
33210 0.01.
33211
33212 softness
33213 Set the range of softness. Default value is 0. Use this to control
33214 gradual transition from zero to full transparency.
33215
33216 Commands
33217
33218 This filter supports same commands as options. The command accepts the
33219 same syntax of the corresponding option.
33220
33221 If the specified expression is not valid, it is kept at its current
33222 value.
33223
33224 lut, lutrgb, lutyuv
33225 Compute a look-up table for binding each pixel component input value to
33226 an output value, and apply it to the input video.
33227
33228 lutyuv applies a lookup table to a YUV input video, lutrgb to an RGB
33229 input video.
33230
33231 These filters accept the following parameters:
33232
33233 c0 set first pixel component expression
33234
33235 c1 set second pixel component expression
33236
33237 c2 set third pixel component expression
33238
33239 c3 set fourth pixel component expression, corresponds to the alpha
33240 component
33241
33242 r set red component expression
33243
33244 g set green component expression
33245
33246 b set blue component expression
33247
33248 a alpha component expression
33249
33250 y set Y/luminance component expression
33251
33252 u set U/Cb component expression
33253
33254 v set V/Cr component expression
33255
33256 Each of them specifies the expression to use for computing the lookup
33257 table for the corresponding pixel component values.
33258
33259 The exact component associated to each of the c* options depends on the
33260 format in input.
33261
33262 The lut filter requires either YUV or RGB pixel formats in input,
33263 lutrgb requires RGB pixel formats in input, and lutyuv requires YUV.
33264
33265 The expressions can contain the following constants and functions:
33266
33267 w
33268 h The input width and height.
33269
33270 val The input value for the pixel component.
33271
33272 clipval
33273 The input value, clipped to the minval-maxval range.
33274
33275 maxval
33276 The maximum value for the pixel component.
33277
33278 minval
33279 The minimum value for the pixel component.
33280
33281 negval
33282 The negated value for the pixel component value, clipped to the
33283 minval-maxval range; it corresponds to the expression
33284 "maxval-clipval+minval".
33285
33286 clip(val)
33287 The computed value in val, clipped to the minval-maxval range.
33288
33289 gammaval(gamma)
33290 The computed gamma correction value of the pixel component value,
33291 clipped to the minval-maxval range. It corresponds to the
33292 expression
33293 "pow((clipval-minval)/(maxval-minval)\,gamma)*(maxval-minval)+minval"
33294
33295 All expressions default to "clipval".
33296
33297 Commands
33298
33299 This filter supports same commands as options.
33300
33301 Examples
33302
33303 • Negate input video:
33304
33305 lutrgb="r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val"
33306 lutyuv="y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val"
33307
33308 The above is the same as:
33309
33310 lutrgb="r=negval:g=negval:b=negval"
33311 lutyuv="y=negval:u=negval:v=negval"
33312
33313 • Negate luminance:
33314
33315 lutyuv=y=negval
33316
33317 • Remove chroma components, turning the video into a graytone image:
33318
33319 lutyuv="u=128:v=128"
33320
33321 • Apply a luma burning effect:
33322
33323 lutyuv="y=2*val"
33324
33325 • Remove green and blue components:
33326
33327 lutrgb="g=0:b=0"
33328
33329 • Set a constant alpha channel value on input:
33330
33331 format=rgba,lutrgb=a="maxval-minval/2"
33332
33333 • Correct luminance gamma by a factor of 0.5:
33334
33335 lutyuv=y=gammaval(0.5)
33336
33337 • Discard least significant bits of luma:
33338
33339 lutyuv=y='bitand(val, 128+64+32)'
33340
33341 • Technicolor like effect:
33342
33343 lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
33344
33345 lut2, tlut2
33346 The "lut2" filter takes two input streams and outputs one stream.
33347
33348 The "tlut2" (time lut2) filter takes two consecutive frames from one
33349 single stream.
33350
33351 This filter accepts the following parameters:
33352
33353 c0 set first pixel component expression
33354
33355 c1 set second pixel component expression
33356
33357 c2 set third pixel component expression
33358
33359 c3 set fourth pixel component expression, corresponds to the alpha
33360 component
33361
33362 d set output bit depth, only available for "lut2" filter. By default
33363 is 0, which means bit depth is automatically picked from first
33364 input format.
33365
33366 The "lut2" filter also supports the framesync options.
33367
33368 Each of them specifies the expression to use for computing the lookup
33369 table for the corresponding pixel component values.
33370
33371 The exact component associated to each of the c* options depends on the
33372 format in inputs.
33373
33374 The expressions can contain the following constants:
33375
33376 w
33377 h The input width and height.
33378
33379 x The first input value for the pixel component.
33380
33381 y The second input value for the pixel component.
33382
33383 bdx The first input video bit depth.
33384
33385 bdy The second input video bit depth.
33386
33387 All expressions default to "x".
33388
33389 Commands
33390
33391 This filter supports the all above options as commands except option
33392 "d".
33393
33394 Examples
33395
33396 • Highlight differences between two RGB video streams:
33397
33398 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)'
33399
33400 • Highlight differences between two YUV video streams:
33401
33402 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)'
33403
33404 • Show max difference between two video streams:
33405
33406 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)))'
33407
33408 maskedclamp
33409 Clamp the first input stream with the second input and third input
33410 stream.
33411
33412 Returns the value of first stream to be between second input stream -
33413 "undershoot" and third input stream + "overshoot".
33414
33415 This filter accepts the following options:
33416
33417 undershoot
33418 Default value is 0.
33419
33420 overshoot
33421 Default value is 0.
33422
33423 planes
33424 Set which planes will be processed as bitmap, unprocessed planes
33425 will be copied from first stream. By default value 0xf, all planes
33426 will be processed.
33427
33428 Commands
33429
33430 This filter supports the all above options as commands.
33431
33432 maskedmax
33433 Merge the second and third input stream into output stream using
33434 absolute differences between second input stream and first input stream
33435 and absolute difference between third input stream and first input
33436 stream. The picked value will be from second input stream if second
33437 absolute difference is greater than first one or from third input
33438 stream otherwise.
33439
33440 This filter accepts the following options:
33441
33442 planes
33443 Set which planes will be processed as bitmap, unprocessed planes
33444 will be copied from first stream. By default value 0xf, all planes
33445 will be processed.
33446
33447 Commands
33448
33449 This filter supports the all above options as commands.
33450
33451 maskedmerge
33452 Merge the first input stream with the second input stream using per
33453 pixel weights in the third input stream.
33454
33455 A value of 0 in the third stream pixel component means that pixel
33456 component from first stream is returned unchanged, while maximum value
33457 (eg. 255 for 8-bit videos) means that pixel component from second
33458 stream is returned unchanged. Intermediate values define the amount of
33459 merging between both input stream's pixel components.
33460
33461 This filter accepts the following options:
33462
33463 planes
33464 Set which planes will be processed as bitmap, unprocessed planes
33465 will be copied from first stream. By default value 0xf, all planes
33466 will be processed.
33467
33468 Commands
33469
33470 This filter supports the all above options as commands.
33471
33472 maskedmin
33473 Merge the second and third input stream into output stream using
33474 absolute differences between second input stream and first input stream
33475 and absolute difference between third input stream and first input
33476 stream. The picked value will be from second input stream if second
33477 absolute difference is less than first one or from third input stream
33478 otherwise.
33479
33480 This filter accepts the following options:
33481
33482 planes
33483 Set which planes will be processed as bitmap, unprocessed planes
33484 will be copied from first stream. By default value 0xf, all planes
33485 will be processed.
33486
33487 Commands
33488
33489 This filter supports the all above options as commands.
33490
33491 maskedthreshold
33492 Pick pixels comparing absolute difference of two video streams with
33493 fixed threshold.
33494
33495 If absolute difference between pixel component of first and second
33496 video stream is equal or lower than user supplied threshold than pixel
33497 component from first video stream is picked, otherwise pixel component
33498 from second video stream is picked.
33499
33500 This filter accepts the following options:
33501
33502 threshold
33503 Set threshold used when picking pixels from absolute difference
33504 from two input video streams.
33505
33506 planes
33507 Set which planes will be processed as bitmap, unprocessed planes
33508 will be copied from second stream. By default value 0xf, all
33509 planes will be processed.
33510
33511 mode
33512 Set mode of filter operation. Can be "abs" or "diff". Default is
33513 "abs".
33514
33515 Commands
33516
33517 This filter supports the all above options as commands.
33518
33519 maskfun
33520 Create mask from input video.
33521
33522 For example it is useful to create motion masks after "tblend" filter.
33523
33524 This filter accepts the following options:
33525
33526 low Set low threshold. Any pixel component lower or exact than this
33527 value will be set to 0.
33528
33529 high
33530 Set high threshold. Any pixel component higher than this value will
33531 be set to max value allowed for current pixel format.
33532
33533 planes
33534 Set planes to filter, by default all available planes are filtered.
33535
33536 fill
33537 Fill all frame pixels with this value.
33538
33539 sum Set max average pixel value for frame. If sum of all pixel
33540 components is higher that this average, output frame will be
33541 completely filled with value set by fill option. Typically useful
33542 for scene changes when used in combination with "tblend" filter.
33543
33544 Commands
33545
33546 This filter supports the all above options as commands.
33547
33548 mcdeint
33549 Apply motion-compensation deinterlacing.
33550
33551 It needs one field per frame as input and must thus be used together
33552 with yadif=1/3 or equivalent.
33553
33554 This filter is only available in ffmpeg version 4.4 or earlier.
33555
33556 This filter accepts the following options:
33557
33558 mode
33559 Set the deinterlacing mode.
33560
33561 It accepts one of the following values:
33562
33563 fast
33564 medium
33565 slow
33566 use iterative motion estimation
33567
33568 extra_slow
33569 like slow, but use multiple reference frames.
33570
33571 Default value is fast.
33572
33573 parity
33574 Set the picture field parity assumed for the input video. It must
33575 be one of the following values:
33576
33577 0, tff
33578 assume top field first
33579
33580 1, bff
33581 assume bottom field first
33582
33583 Default value is bff.
33584
33585 qp Set per-block quantization parameter (QP) used by the internal
33586 encoder.
33587
33588 Higher values should result in a smoother motion vector field but
33589 less optimal individual vectors. Default value is 1.
33590
33591 median
33592 Pick median pixel from certain rectangle defined by radius.
33593
33594 This filter accepts the following options:
33595
33596 radius
33597 Set horizontal radius size. Default value is 1. Allowed range is
33598 integer from 1 to 127.
33599
33600 planes
33601 Set which planes to process. Default is 15, which is all available
33602 planes.
33603
33604 radiusV
33605 Set vertical radius size. Default value is 0. Allowed range is
33606 integer from 0 to 127. If it is 0, value will be picked from
33607 horizontal "radius" option.
33608
33609 percentile
33610 Set median percentile. Default value is 0.5. Default value of 0.5
33611 will pick always median values, while 0 will pick minimum values,
33612 and 1 maximum values.
33613
33614 Commands
33615
33616 This filter supports same commands as options. The command accepts the
33617 same syntax of the corresponding option.
33618
33619 If the specified expression is not valid, it is kept at its current
33620 value.
33621
33622 mergeplanes
33623 Merge color channel components from several video streams.
33624
33625 The filter accepts up to 4 input streams, and merge selected input
33626 planes to the output video.
33627
33628 This filter accepts the following options:
33629
33630 mapping
33631 Set input to output plane mapping. Default is 0.
33632
33633 The mappings is specified as a bitmap. It should be specified as a
33634 hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. 'Aa' describes the
33635 mapping for the first plane of the output stream. 'A' sets the
33636 number of the input stream to use (from 0 to 3), and 'a' the plane
33637 number of the corresponding input to use (from 0 to 3). The rest of
33638 the mappings is similar, 'Bb' describes the mapping for the output
33639 stream second plane, 'Cc' describes the mapping for the output
33640 stream third plane and 'Dd' describes the mapping for the output
33641 stream fourth plane.
33642
33643 format
33644 Set output pixel format. Default is "yuva444p".
33645
33646 map0s
33647 map1s
33648 map2s
33649 map3s
33650 Set input to output stream mapping for output Nth plane. Default is
33651 0.
33652
33653 map0p
33654 map1p
33655 map2p
33656 map3p
33657 Set input to output plane mapping for output Nth plane. Default is
33658 0.
33659
33660 Examples
33661
33662 • Merge three gray video streams of same width and height into single
33663 video stream:
33664
33665 [a0][a1][a2]mergeplanes=0x001020:yuv444p
33666
33667 • Merge 1st yuv444p stream and 2nd gray video stream into yuva444p
33668 video stream:
33669
33670 [a0][a1]mergeplanes=0x00010210:yuva444p
33671
33672 • Swap Y and A plane in yuva444p stream:
33673
33674 format=yuva444p,mergeplanes=0x03010200:yuva444p
33675
33676 • Swap U and V plane in yuv420p stream:
33677
33678 format=yuv420p,mergeplanes=0x000201:yuv420p
33679
33680 • Cast a rgb24 clip to yuv444p:
33681
33682 format=rgb24,mergeplanes=0x000102:yuv444p
33683
33684 mestimate
33685 Estimate and export motion vectors using block matching algorithms.
33686 Motion vectors are stored in frame side data to be used by other
33687 filters.
33688
33689 This filter accepts the following options:
33690
33691 method
33692 Specify the motion estimation method. Accepts one of the following
33693 values:
33694
33695 esa Exhaustive search algorithm.
33696
33697 tss Three step search algorithm.
33698
33699 tdls
33700 Two dimensional logarithmic search algorithm.
33701
33702 ntss
33703 New three step search algorithm.
33704
33705 fss Four step search algorithm.
33706
33707 ds Diamond search algorithm.
33708
33709 hexbs
33710 Hexagon-based search algorithm.
33711
33712 epzs
33713 Enhanced predictive zonal search algorithm.
33714
33715 umh Uneven multi-hexagon search algorithm.
33716
33717 Default value is esa.
33718
33719 mb_size
33720 Macroblock size. Default 16.
33721
33722 search_param
33723 Search parameter. Default 7.
33724
33725 midequalizer
33726 Apply Midway Image Equalization effect using two video streams.
33727
33728 Midway Image Equalization adjusts a pair of images to have the same
33729 histogram, while maintaining their dynamics as much as possible. It's
33730 useful for e.g. matching exposures from a pair of stereo cameras.
33731
33732 This filter has two inputs and one output, which must be of same pixel
33733 format, but may be of different sizes. The output of filter is first
33734 input adjusted with midway histogram of both inputs.
33735
33736 This filter accepts the following option:
33737
33738 planes
33739 Set which planes to process. Default is 15, which is all available
33740 planes.
33741
33742 minterpolate
33743 Convert the video to specified frame rate using motion interpolation.
33744
33745 This filter accepts the following options:
33746
33747 fps Specify the output frame rate. This can be rational e.g.
33748 "60000/1001". Frames are dropped if fps is lower than source fps.
33749 Default 60.
33750
33751 mi_mode
33752 Motion interpolation mode. Following values are accepted:
33753
33754 dup Duplicate previous or next frame for interpolating new ones.
33755
33756 blend
33757 Blend source frames. Interpolated frame is mean of previous and
33758 next frames.
33759
33760 mci Motion compensated interpolation. Following options are
33761 effective when this mode is selected:
33762
33763 mc_mode
33764 Motion compensation mode. Following values are accepted:
33765
33766 obmc
33767 Overlapped block motion compensation.
33768
33769 aobmc
33770 Adaptive overlapped block motion compensation. Window
33771 weighting coefficients are controlled adaptively
33772 according to the reliabilities of the neighboring
33773 motion vectors to reduce oversmoothing.
33774
33775 Default mode is obmc.
33776
33777 me_mode
33778 Motion estimation mode. Following values are accepted:
33779
33780 bidir
33781 Bidirectional motion estimation. Motion vectors are
33782 estimated for each source frame in both forward and
33783 backward directions.
33784
33785 bilat
33786 Bilateral motion estimation. Motion vectors are
33787 estimated directly for interpolated frame.
33788
33789 Default mode is bilat.
33790
33791 me The algorithm to be used for motion estimation. Following
33792 values are accepted:
33793
33794 esa Exhaustive search algorithm.
33795
33796 tss Three step search algorithm.
33797
33798 tdls
33799 Two dimensional logarithmic search algorithm.
33800
33801 ntss
33802 New three step search algorithm.
33803
33804 fss Four step search algorithm.
33805
33806 ds Diamond search algorithm.
33807
33808 hexbs
33809 Hexagon-based search algorithm.
33810
33811 epzs
33812 Enhanced predictive zonal search algorithm.
33813
33814 umh Uneven multi-hexagon search algorithm.
33815
33816 Default algorithm is epzs.
33817
33818 mb_size
33819 Macroblock size. Default 16.
33820
33821 search_param
33822 Motion estimation search parameter. Default 32.
33823
33824 vsbmc
33825 Enable variable-size block motion compensation. Motion
33826 estimation is applied with smaller block sizes at object
33827 boundaries in order to make the them less blur. Default is
33828 0 (disabled).
33829
33830 scd Scene change detection method. Scene change leads motion vectors to
33831 be in random direction. Scene change detection replace interpolated
33832 frames by duplicate ones. May not be needed for other modes.
33833 Following values are accepted:
33834
33835 none
33836 Disable scene change detection.
33837
33838 fdiff
33839 Frame difference. Corresponding pixel values are compared and
33840 if it satisfies scd_threshold scene change is detected.
33841
33842 Default method is fdiff.
33843
33844 scd_threshold
33845 Scene change detection threshold. Default is 10..
33846
33847 mix
33848 Mix several video input streams into one video stream.
33849
33850 A description of the accepted options follows.
33851
33852 inputs
33853 The number of inputs. If unspecified, it defaults to 2.
33854
33855 weights
33856 Specify weight of each input video stream as sequence. Each weight
33857 is separated by space. If number of weights is smaller than number
33858 of frames last specified weight will be used for all remaining
33859 unset weights.
33860
33861 scale
33862 Specify scale, if it is set it will be multiplied with sum of each
33863 weight multiplied with pixel values to give final destination pixel
33864 value. By default scale is auto scaled to sum of weights.
33865
33866 planes
33867 Set which planes to filter. Default is all. Allowed range is from 0
33868 to 15.
33869
33870 duration
33871 Specify how end of stream is determined.
33872
33873 longest
33874 The duration of the longest input. (default)
33875
33876 shortest
33877 The duration of the shortest input.
33878
33879 first
33880 The duration of the first input.
33881
33882 Commands
33883
33884 This filter supports the following commands:
33885
33886 weights
33887 scale
33888 planes
33889 Syntax is same as option with same name.
33890
33891 monochrome
33892 Convert video to gray using custom color filter.
33893
33894 A description of the accepted options follows.
33895
33896 cb Set the chroma blue spot. Allowed range is from -1 to 1. Default
33897 value is 0.
33898
33899 cr Set the chroma red spot. Allowed range is from -1 to 1. Default
33900 value is 0.
33901
33902 size
33903 Set the color filter size. Allowed range is from .1 to 10. Default
33904 value is 1.
33905
33906 high
33907 Set the highlights strength. Allowed range is from 0 to 1. Default
33908 value is 0.
33909
33910 Commands
33911
33912 This filter supports the all above options as commands.
33913
33914 morpho
33915 This filter allows to apply main morphological grayscale transforms,
33916 erode and dilate with arbitrary structures set in second input stream.
33917
33918 Unlike naive implementation and much slower performance in erosion and
33919 dilation filters, when speed is critical "morpho" filter should be used
33920 instead.
33921
33922 A description of accepted options follows,
33923
33924 mode
33925 Set morphological transform to apply, can be:
33926
33927 erode
33928 dilate
33929 open
33930 close
33931 gradient
33932 tophat
33933 blackhat
33934
33935 Default is "erode".
33936
33937 planes
33938 Set planes to filter, by default all planes except alpha are
33939 filtered.
33940
33941 structure
33942 Set which structure video frames will be processed from second
33943 input stream, can be first or all. Default is all.
33944
33945 The "morpho" filter also supports the framesync options.
33946
33947 Commands
33948
33949 This filter supports same commands as options.
33950
33951 mpdecimate
33952 Drop frames that do not differ greatly from the previous frame in order
33953 to reduce frame rate.
33954
33955 The main use of this filter is for very-low-bitrate encoding (e.g.
33956 streaming over dialup modem), but it could in theory be used for fixing
33957 movies that were inverse-telecined incorrectly.
33958
33959 A description of the accepted options follows.
33960
33961 max Set the maximum number of consecutive frames which can be dropped
33962 (if positive), or the minimum interval between dropped frames (if
33963 negative). If the value is 0, the frame is dropped disregarding the
33964 number of previous sequentially dropped frames.
33965
33966 Default value is 0.
33967
33968 hi
33969 lo
33970 frac
33971 Set the dropping threshold values.
33972
33973 Values for hi and lo are for 8x8 pixel blocks and represent actual
33974 pixel value differences, so a threshold of 64 corresponds to 1 unit
33975 of difference for each pixel, or the same spread out differently
33976 over the block.
33977
33978 A frame is a candidate for dropping if no 8x8 blocks differ by more
33979 than a threshold of hi, and if no more than frac blocks (1 meaning
33980 the whole image) differ by more than a threshold of lo.
33981
33982 Default value for hi is 64*12, default value for lo is 64*5, and
33983 default value for frac is 0.33.
33984
33985 msad
33986 Obtain the MSAD (Mean Sum of Absolute Differences) between two input
33987 videos.
33988
33989 This filter takes two input videos.
33990
33991 Both input videos must have the same resolution and pixel format for
33992 this filter to work correctly. Also it assumes that both inputs have
33993 the same number of frames, which are compared one by one.
33994
33995 The obtained per component, average, min and max MSAD is printed
33996 through the logging system.
33997
33998 The filter stores the calculated MSAD of each frame in frame metadata.
33999
34000 This filter also supports the framesync options.
34001
34002 In the below example the input file main.mpg being processed is
34003 compared with the reference file ref.mpg.
34004
34005 ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
34006
34007 multiply
34008 Multiply first video stream pixels values with second video stream
34009 pixels values.
34010
34011 The filter accepts the following options:
34012
34013 scale
34014 Set the scale applied to second video stream. By default is 1.
34015 Allowed range is from 0 to 9.
34016
34017 offset
34018 Set the offset applied to second video stream. By default is 0.5.
34019 Allowed range is from -1 to 1.
34020
34021 planes
34022 Specify planes from input video stream that will be processed. By
34023 default all planes are processed.
34024
34025 Commands
34026
34027 This filter supports same commands as options.
34028
34029 negate
34030 Negate (invert) the input video.
34031
34032 It accepts the following option:
34033
34034 components
34035 Set components to negate.
34036
34037 Available values for components are:
34038
34039 y
34040 u
34041 v
34042 a
34043 r
34044 g
34045 b
34046 negate_alpha
34047 With value 1, it negates the alpha component, if present. Default
34048 value is 0.
34049
34050 Commands
34051
34052 This filter supports same commands as options.
34053
34054 nlmeans
34055 Denoise frames using Non-Local Means algorithm.
34056
34057 Each pixel is adjusted by looking for other pixels with similar
34058 contexts. This context similarity is defined by comparing their
34059 surrounding patches of size pxp. Patches are searched in an area of rxr
34060 around the pixel.
34061
34062 Note that the research area defines centers for patches, which means
34063 some patches will be made of pixels outside that research area.
34064
34065 The filter accepts the following options.
34066
34067 s Set denoising strength. Default is 1.0. Must be in range [1.0,
34068 30.0].
34069
34070 p Set patch size. Default is 7. Must be odd number in range [0, 99].
34071
34072 pc Same as p but for chroma planes.
34073
34074 The default value is 0 and means automatic.
34075
34076 r Set research size. Default is 15. Must be odd number in range [0,
34077 99].
34078
34079 rc Same as r but for chroma planes.
34080
34081 The default value is 0 and means automatic.
34082
34083 nnedi
34084 Deinterlace video using neural network edge directed interpolation.
34085
34086 This filter accepts the following options:
34087
34088 weights
34089 Mandatory option, without binary file filter can not work.
34090 Currently file can be found here:
34091 https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
34092
34093 deint
34094 Set which frames to deinterlace, by default it is "all". Can be
34095 "all" or "interlaced".
34096
34097 field
34098 Set mode of operation.
34099
34100 Can be one of the following:
34101
34102 af Use frame flags, both fields.
34103
34104 a Use frame flags, single field.
34105
34106 t Use top field only.
34107
34108 b Use bottom field only.
34109
34110 tf Use both fields, top first.
34111
34112 bf Use both fields, bottom first.
34113
34114 planes
34115 Set which planes to process, by default filter process all frames.
34116
34117 nsize
34118 Set size of local neighborhood around each pixel, used by the
34119 predictor neural network.
34120
34121 Can be one of the following:
34122
34123 s8x6
34124 s16x6
34125 s32x6
34126 s48x6
34127 s8x4
34128 s16x4
34129 s32x4
34130 nns Set the number of neurons in predictor neural network. Can be one
34131 of the following:
34132
34133 n16
34134 n32
34135 n64
34136 n128
34137 n256
34138 qual
34139 Controls the number of different neural network predictions that
34140 are blended together to compute the final output value. Can be
34141 "fast", default or "slow".
34142
34143 etype
34144 Set which set of weights to use in the predictor. Can be one of
34145 the following:
34146
34147 a, abs
34148 weights trained to minimize absolute error
34149
34150 s, mse
34151 weights trained to minimize squared error
34152
34153 pscrn
34154 Controls whether or not the prescreener neural network is used to
34155 decide which pixels should be processed by the predictor neural
34156 network and which can be handled by simple cubic interpolation.
34157 The prescreener is trained to know whether cubic interpolation will
34158 be sufficient for a pixel or whether it should be predicted by the
34159 predictor nn. The computational complexity of the prescreener nn
34160 is much less than that of the predictor nn. Since most pixels can
34161 be handled by cubic interpolation, using the prescreener generally
34162 results in much faster processing. The prescreener is pretty
34163 accurate, so the difference between using it and not using it is
34164 almost always unnoticeable.
34165
34166 Can be one of the following:
34167
34168 none
34169 original
34170 new
34171 new2
34172 new3
34173
34174 Default is "new".
34175
34176 Commands
34177
34178 This filter supports same commands as options, excluding weights
34179 option.
34180
34181 noformat
34182 Force libavfilter not to use any of the specified pixel formats for the
34183 input to the next filter.
34184
34185 It accepts the following parameters:
34186
34187 pix_fmts
34188 A '|'-separated list of pixel format names, such as
34189 pix_fmts=yuv420p|monow|rgb24".
34190
34191 Examples
34192
34193 • Force libavfilter to use a format different from yuv420p for the
34194 input to the vflip filter:
34195
34196 noformat=pix_fmts=yuv420p,vflip
34197
34198 • Convert the input video to any of the formats not contained in the
34199 list:
34200
34201 noformat=yuv420p|yuv444p|yuv410p
34202
34203 noise
34204 Add noise on video input frame.
34205
34206 The filter accepts the following options:
34207
34208 all_seed
34209 c0_seed
34210 c1_seed
34211 c2_seed
34212 c3_seed
34213 Set noise seed for specific pixel component or all pixel components
34214 in case of all_seed. Default value is 123457.
34215
34216 all_strength, alls
34217 c0_strength, c0s
34218 c1_strength, c1s
34219 c2_strength, c2s
34220 c3_strength, c3s
34221 Set noise strength for specific pixel component or all pixel
34222 components in case all_strength. Default value is 0. Allowed range
34223 is [0, 100].
34224
34225 all_flags, allf
34226 c0_flags, c0f
34227 c1_flags, c1f
34228 c2_flags, c2f
34229 c3_flags, c3f
34230 Set pixel component flags or set flags for all components if
34231 all_flags. Available values for component flags are:
34232
34233 a averaged temporal noise (smoother)
34234
34235 p mix random noise with a (semi)regular pattern
34236
34237 t temporal noise (noise pattern changes between frames)
34238
34239 u uniform noise (gaussian otherwise)
34240
34241 Examples
34242
34243 Add temporal and uniform noise to input video:
34244
34245 noise=alls=20:allf=t+u
34246
34247 normalize
34248 Normalize RGB video (aka histogram stretching, contrast stretching).
34249 See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
34250
34251 For each channel of each frame, the filter computes the input range and
34252 maps it linearly to the user-specified output range. The output range
34253 defaults to the full dynamic range from pure black to pure white.
34254
34255 Temporal smoothing can be used on the input range to reduce flickering
34256 (rapid changes in brightness) caused when small dark or bright objects
34257 enter or leave the scene. This is similar to the auto-exposure
34258 (automatic gain control) on a video camera, and, like a video camera,
34259 it may cause a period of over- or under-exposure of the video.
34260
34261 The R,G,B channels can be normalized independently, which may cause
34262 some color shifting, or linked together as a single channel, which
34263 prevents color shifting. Linked normalization preserves hue.
34264 Independent normalization does not, so it can be used to remove some
34265 color casts. Independent and linked normalization can be combined in
34266 any ratio.
34267
34268 The normalize filter accepts the following options:
34269
34270 blackpt
34271 whitept
34272 Colors which define the output range. The minimum input value is
34273 mapped to the blackpt. The maximum input value is mapped to the
34274 whitept. The defaults are black and white respectively. Specifying
34275 white for blackpt and black for whitept will give color-inverted,
34276 normalized video. Shades of grey can be used to reduce the dynamic
34277 range (contrast). Specifying saturated colors here can create some
34278 interesting effects.
34279
34280 smoothing
34281 The number of previous frames to use for temporal smoothing. The
34282 input range of each channel is smoothed using a rolling average
34283 over the current frame and the smoothing previous frames. The
34284 default is 0 (no temporal smoothing).
34285
34286 independence
34287 Controls the ratio of independent (color shifting) channel
34288 normalization to linked (color preserving) normalization. 0.0 is
34289 fully linked, 1.0 is fully independent. Defaults to 1.0 (fully
34290 independent).
34291
34292 strength
34293 Overall strength of the filter. 1.0 is full strength. 0.0 is a
34294 rather expensive no-op. Defaults to 1.0 (full strength).
34295
34296 Commands
34297
34298 This filter supports same commands as options, excluding smoothing
34299 option. The command accepts the same syntax of the corresponding
34300 option.
34301
34302 If the specified expression is not valid, it is kept at its current
34303 value.
34304
34305 Examples
34306
34307 Stretch video contrast to use the full dynamic range, with no temporal
34308 smoothing; may flicker depending on the source content:
34309
34310 normalize=blackpt=black:whitept=white:smoothing=0
34311
34312 As above, but with 50 frames of temporal smoothing; flicker should be
34313 reduced, depending on the source content:
34314
34315 normalize=blackpt=black:whitept=white:smoothing=50
34316
34317 As above, but with hue-preserving linked channel normalization:
34318
34319 normalize=blackpt=black:whitept=white:smoothing=50:independence=0
34320
34321 As above, but with half strength:
34322
34323 normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
34324
34325 Map the darkest input color to red, the brightest input color to cyan:
34326
34327 normalize=blackpt=red:whitept=cyan
34328
34329 null
34330 Pass the video source unchanged to the output.
34331
34332 ocr
34333 Optical Character Recognition
34334
34335 This filter uses Tesseract for optical character recognition. To enable
34336 compilation of this filter, you need to configure FFmpeg with
34337 "--enable-libtesseract".
34338
34339 It accepts the following options:
34340
34341 datapath
34342 Set datapath to tesseract data. Default is to use whatever was set
34343 at installation.
34344
34345 language
34346 Set language, default is "eng".
34347
34348 whitelist
34349 Set character whitelist.
34350
34351 blacklist
34352 Set character blacklist.
34353
34354 The filter exports recognized text as the frame metadata
34355 "lavfi.ocr.text". The filter exports confidence of recognized words as
34356 the frame metadata "lavfi.ocr.confidence".
34357
34358 ocv
34359 Apply a video transform using libopencv.
34360
34361 To enable this filter, install the libopencv library and headers and
34362 configure FFmpeg with "--enable-libopencv".
34363
34364 It accepts the following parameters:
34365
34366 filter_name
34367 The name of the libopencv filter to apply.
34368
34369 filter_params
34370 The parameters to pass to the libopencv filter. If not specified,
34371 the default values are assumed.
34372
34373 Refer to the official libopencv documentation for more precise
34374 information:
34375 <http://docs.opencv.org/master/modules/imgproc/doc/filtering.html>
34376
34377 Several libopencv filters are supported; see the following subsections.
34378
34379 dilate
34380
34381 Dilate an image by using a specific structuring element. It
34382 corresponds to the libopencv function "cvDilate".
34383
34384 It accepts the parameters: struct_el|nb_iterations.
34385
34386 struct_el represents a structuring element, and has the syntax:
34387 colsxrows+anchor_xxanchor_y/shape
34388
34389 cols and rows represent the number of columns and rows of the
34390 structuring element, anchor_x and anchor_y the anchor point, and shape
34391 the shape for the structuring element. shape must be "rect", "cross",
34392 "ellipse", or "custom".
34393
34394 If the value for shape is "custom", it must be followed by a string of
34395 the form "=filename". The file with name filename is assumed to
34396 represent a binary image, with each printable character corresponding
34397 to a bright pixel. When a custom shape is used, cols and rows are
34398 ignored, the number or columns and rows of the read file are assumed
34399 instead.
34400
34401 The default value for struct_el is "3x3+0x0/rect".
34402
34403 nb_iterations specifies the number of times the transform is applied to
34404 the image, and defaults to 1.
34405
34406 Some examples:
34407
34408 # Use the default values
34409 ocv=dilate
34410
34411 # Dilate using a structuring element with a 5x5 cross, iterating two times
34412 ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
34413
34414 # Read the shape from the file diamond.shape, iterating two times.
34415 # The file diamond.shape may contain a pattern of characters like this
34416 # *
34417 # ***
34418 # *****
34419 # ***
34420 # *
34421 # The specified columns and rows are ignored
34422 # but the anchor point coordinates are not
34423 ocv=dilate:0x0+2x2/custom=diamond.shape|2
34424
34425 erode
34426
34427 Erode an image by using a specific structuring element. It corresponds
34428 to the libopencv function "cvErode".
34429
34430 It accepts the parameters: struct_el:nb_iterations, with the same
34431 syntax and semantics as the dilate filter.
34432
34433 smooth
34434
34435 Smooth the input video.
34436
34437 The filter takes the following parameters:
34438 type|param1|param2|param3|param4.
34439
34440 type is the type of smooth filter to apply, and must be one of the
34441 following values: "blur", "blur_no_scale", "median", "gaussian", or
34442 "bilateral". The default value is "gaussian".
34443
34444 The meaning of param1, param2, param3, and param4 depends on the smooth
34445 type. param1 and param2 accept integer positive values or 0. param3 and
34446 param4 accept floating point values.
34447
34448 The default value for param1 is 3. The default value for the other
34449 parameters is 0.
34450
34451 These parameters correspond to the parameters assigned to the libopencv
34452 function "cvSmooth".
34453
34454 oscilloscope
34455 2D Video Oscilloscope.
34456
34457 Useful to measure spatial impulse, step responses, chroma delays, etc.
34458
34459 It accepts the following parameters:
34460
34461 x Set scope center x position.
34462
34463 y Set scope center y position.
34464
34465 s Set scope size, relative to frame diagonal.
34466
34467 t Set scope tilt/rotation.
34468
34469 o Set trace opacity.
34470
34471 tx Set trace center x position.
34472
34473 ty Set trace center y position.
34474
34475 tw Set trace width, relative to width of frame.
34476
34477 th Set trace height, relative to height of frame.
34478
34479 c Set which components to trace. By default it traces first three
34480 components.
34481
34482 g Draw trace grid. By default is enabled.
34483
34484 st Draw some statistics. By default is enabled.
34485
34486 sc Draw scope. By default is enabled.
34487
34488 Commands
34489
34490 This filter supports same commands as options. The command accepts the
34491 same syntax of the corresponding option.
34492
34493 If the specified expression is not valid, it is kept at its current
34494 value.
34495
34496 Examples
34497
34498 • Inspect full first row of video frame.
34499
34500 oscilloscope=x=0.5:y=0:s=1
34501
34502 • Inspect full last row of video frame.
34503
34504 oscilloscope=x=0.5:y=1:s=1
34505
34506 • Inspect full 5th line of video frame of height 1080.
34507
34508 oscilloscope=x=0.5:y=5/1080:s=1
34509
34510 • Inspect full last column of video frame.
34511
34512 oscilloscope=x=1:y=0.5:s=1:t=1
34513
34514 overlay
34515 Overlay one video on top of another.
34516
34517 It takes two inputs and has one output. The first input is the "main"
34518 video on which the second input is overlaid.
34519
34520 It accepts the following parameters:
34521
34522 A description of the accepted options follows.
34523
34524 x
34525 y Set the expression for the x and y coordinates of the overlaid
34526 video on the main video. Default value is "0" for both expressions.
34527 In case the expression is invalid, it is set to a huge value
34528 (meaning that the overlay will not be displayed within the output
34529 visible area).
34530
34531 eof_action
34532 See framesync.
34533
34534 eval
34535 Set when the expressions for x, and y are evaluated.
34536
34537 It accepts the following values:
34538
34539 init
34540 only evaluate expressions once during the filter initialization
34541 or when a command is processed
34542
34543 frame
34544 evaluate expressions for each incoming frame
34545
34546 Default value is frame.
34547
34548 shortest
34549 See framesync.
34550
34551 format
34552 Set the format for the output video.
34553
34554 It accepts the following values:
34555
34556 yuv420
34557 force YUV420 output
34558
34559 yuv420p10
34560 force YUV420p10 output
34561
34562 yuv422
34563 force YUV422 output
34564
34565 yuv422p10
34566 force YUV422p10 output
34567
34568 yuv444
34569 force YUV444 output
34570
34571 rgb force packed RGB output
34572
34573 gbrp
34574 force planar RGB output
34575
34576 auto
34577 automatically pick format
34578
34579 Default value is yuv420.
34580
34581 repeatlast
34582 See framesync.
34583
34584 alpha
34585 Set format of alpha of the overlaid video, it can be straight or
34586 premultiplied. Default is straight.
34587
34588 The x, and y expressions can contain the following parameters.
34589
34590 main_w, W
34591 main_h, H
34592 The main input width and height.
34593
34594 overlay_w, w
34595 overlay_h, h
34596 The overlay input width and height.
34597
34598 x
34599 y The computed values for x and y. They are evaluated for each new
34600 frame.
34601
34602 hsub
34603 vsub
34604 horizontal and vertical chroma subsample values of the output
34605 format. For example for the pixel format "yuv422p" hsub is 2 and
34606 vsub is 1.
34607
34608 n the number of input frame, starting from 0
34609
34610 pos the position in the file of the input frame, NAN if unknown
34611
34612 t The timestamp, expressed in seconds. It's NAN if the input
34613 timestamp is unknown.
34614
34615 This filter also supports the framesync options.
34616
34617 Note that the n, pos, t variables are available only when evaluation is
34618 done per frame, and will evaluate to NAN when eval is set to init.
34619
34620 Be aware that frames are taken from each input video in timestamp
34621 order, hence, if their initial timestamps differ, it is a good idea to
34622 pass the two inputs through a setpts=PTS-STARTPTS filter to have them
34623 begin in the same zero timestamp, as the example for the movie filter
34624 does.
34625
34626 You can chain together more overlays but you should test the efficiency
34627 of such approach.
34628
34629 Commands
34630
34631 This filter supports the following commands:
34632
34633 x
34634 y Modify the x and y of the overlay input. The command accepts the
34635 same syntax of the corresponding option.
34636
34637 If the specified expression is not valid, it is kept at its current
34638 value.
34639
34640 Examples
34641
34642 • Draw the overlay at 10 pixels from the bottom right corner of the
34643 main video:
34644
34645 overlay=main_w-overlay_w-10:main_h-overlay_h-10
34646
34647 Using named options the example above becomes:
34648
34649 overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
34650
34651 • Insert a transparent PNG logo in the bottom left corner of the
34652 input, using the ffmpeg tool with the "-filter_complex" option:
34653
34654 ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
34655
34656 • Insert 2 different transparent PNG logos (second logo on bottom
34657 right corner) using the ffmpeg tool:
34658
34659 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
34660
34661 • Add a transparent color layer on top of the main video; "WxH" must
34662 specify the size of the main input to the overlay filter:
34663
34664 color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
34665
34666 • Play an original video and a filtered version (here with the
34667 deshake filter) side by side using the ffplay tool:
34668
34669 ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
34670
34671 The above command is the same as:
34672
34673 ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
34674
34675 • Make a sliding overlay appearing from the left to the right top
34676 part of the screen starting since time 2:
34677
34678 overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
34679
34680 • Compose output by putting two input videos side to side:
34681
34682 ffmpeg -i left.avi -i right.avi -filter_complex "
34683 nullsrc=size=200x100 [background];
34684 [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
34685 [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
34686 [background][left] overlay=shortest=1 [background+left];
34687 [background+left][right] overlay=shortest=1:x=100 [left+right]
34688 "
34689
34690 • Mask 10-20 seconds of a video by applying the delogo filter to a
34691 section
34692
34693 ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
34694 -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]'
34695 masked.avi
34696
34697 • Chain several overlays in cascade:
34698
34699 nullsrc=s=200x200 [bg];
34700 testsrc=s=100x100, split=4 [in0][in1][in2][in3];
34701 [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
34702 [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
34703 [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
34704 [in3] null, [mid2] overlay=100:100 [out0]
34705
34706 overlay_cuda
34707 Overlay one video on top of another.
34708
34709 This is the CUDA variant of the overlay filter. It only accepts CUDA
34710 frames. The underlying input pixel formats have to match.
34711
34712 It takes two inputs and has one output. The first input is the "main"
34713 video on which the second input is overlaid.
34714
34715 It accepts the following parameters:
34716
34717 x
34718 y Set expressions for the x and y coordinates of the overlaid video
34719 on the main video.
34720
34721 They can contain the following parameters:
34722
34723 main_w, W
34724 main_h, H
34725 The main input width and height.
34726
34727 overlay_w, w
34728 overlay_h, h
34729 The overlay input width and height.
34730
34731 x
34732 y The computed values for x and y. They are evaluated for each
34733 new frame.
34734
34735 n The ordinal index of the main input frame, starting from 0.
34736
34737 pos The byte offset position in the file of the main input frame,
34738 NAN if unknown.
34739
34740 t The timestamp of the main input frame, expressed in seconds,
34741 NAN if unknown.
34742
34743 Default value is "0" for both expressions.
34744
34745 eval
34746 Set when the expressions for x and y are evaluated.
34747
34748 It accepts the following values:
34749
34750 init
34751 Evaluate expressions once during filter initialization or when
34752 a command is processed.
34753
34754 frame
34755 Evaluate expressions for each incoming frame
34756
34757 Default value is frame.
34758
34759 eof_action
34760 See framesync.
34761
34762 shortest
34763 See framesync.
34764
34765 repeatlast
34766 See framesync.
34767
34768 This filter also supports the framesync options.
34769
34770 owdenoise
34771 Apply Overcomplete Wavelet denoiser.
34772
34773 The filter accepts the following options:
34774
34775 depth
34776 Set depth.
34777
34778 Larger depth values will denoise lower frequency components more,
34779 but slow down filtering.
34780
34781 Must be an int in the range 8-16, default is 8.
34782
34783 luma_strength, ls
34784 Set luma strength.
34785
34786 Must be a double value in the range 0-1000, default is 1.0.
34787
34788 chroma_strength, cs
34789 Set chroma strength.
34790
34791 Must be a double value in the range 0-1000, default is 1.0.
34792
34793 pad
34794 Add paddings to the input image, and place the original input at the
34795 provided x, y coordinates.
34796
34797 It accepts the following parameters:
34798
34799 width, w
34800 height, h
34801 Specify an expression for the size of the output image with the
34802 paddings added. If the value for width or height is 0, the
34803 corresponding input size is used for the output.
34804
34805 The width expression can reference the value set by the height
34806 expression, and vice versa.
34807
34808 The default value of width and height is 0.
34809
34810 x
34811 y Specify the offsets to place the input image at within the padded
34812 area, with respect to the top/left border of the output image.
34813
34814 The x expression can reference the value set by the y expression,
34815 and vice versa.
34816
34817 The default value of x and y is 0.
34818
34819 If x or y evaluate to a negative number, they'll be changed so the
34820 input image is centered on the padded area.
34821
34822 color
34823 Specify the color of the padded area. For the syntax of this
34824 option, check the "Color" section in the ffmpeg-utils manual.
34825
34826 The default value of color is "black".
34827
34828 eval
34829 Specify when to evaluate width, height, x and y expression.
34830
34831 It accepts the following values:
34832
34833 init
34834 Only evaluate expressions once during the filter initialization
34835 or when a command is processed.
34836
34837 frame
34838 Evaluate expressions for each incoming frame.
34839
34840 Default value is init.
34841
34842 aspect
34843 Pad to aspect instead to a resolution.
34844
34845 The value for the width, height, x, and y options are expressions
34846 containing the following constants:
34847
34848 in_w
34849 in_h
34850 The input video width and height.
34851
34852 iw
34853 ih These are the same as in_w and in_h.
34854
34855 out_w
34856 out_h
34857 The output width and height (the size of the padded area), as
34858 specified by the width and height expressions.
34859
34860 ow
34861 oh These are the same as out_w and out_h.
34862
34863 x
34864 y The x and y offsets as specified by the x and y expressions, or NAN
34865 if not yet specified.
34866
34867 a same as iw / ih
34868
34869 sar input sample aspect ratio
34870
34871 dar input display aspect ratio, it is the same as (iw / ih) * sar
34872
34873 hsub
34874 vsub
34875 The horizontal and vertical chroma subsample values. For example
34876 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
34877
34878 Examples
34879
34880 • Add paddings with the color "violet" to the input video. The output
34881 video size is 640x480, and the top-left corner of the input video
34882 is placed at column 0, row 40
34883
34884 pad=640:480:0:40:violet
34885
34886 The example above is equivalent to the following command:
34887
34888 pad=width=640:height=480:x=0:y=40:color=violet
34889
34890 • Pad the input to get an output with dimensions increased by 3/2,
34891 and put the input video at the center of the padded area:
34892
34893 pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
34894
34895 • Pad the input to get a squared output with size equal to the
34896 maximum value between the input width and height, and put the input
34897 video at the center of the padded area:
34898
34899 pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
34900
34901 • Pad the input to get a final w/h ratio of 16:9:
34902
34903 pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
34904
34905 • In case of anamorphic video, in order to set the output display
34906 aspect correctly, it is necessary to use sar in the expression,
34907 according to the relation:
34908
34909 (ih * X / ih) * sar = output_dar
34910 X = output_dar / sar
34911
34912 Thus the previous example needs to be modified to:
34913
34914 pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
34915
34916 • Double the output size and put the input video in the bottom-right
34917 corner of the output padded area:
34918
34919 pad="2*iw:2*ih:ow-iw:oh-ih"
34920
34921 palettegen
34922 Generate one palette for a whole video stream.
34923
34924 It accepts the following options:
34925
34926 max_colors
34927 Set the maximum number of colors to quantize in the palette. Note:
34928 the palette will still contain 256 colors; the unused palette
34929 entries will be black.
34930
34931 reserve_transparent
34932 Create a palette of 255 colors maximum and reserve the last one for
34933 transparency. Reserving the transparency color is useful for GIF
34934 optimization. If not set, the maximum of colors in the palette
34935 will be 256. You probably want to disable this option for a
34936 standalone image. Set by default.
34937
34938 transparency_color
34939 Set the color that will be used as background for transparency.
34940
34941 stats_mode
34942 Set statistics mode.
34943
34944 It accepts the following values:
34945
34946 full
34947 Compute full frame histograms.
34948
34949 diff
34950 Compute histograms only for the part that differs from previous
34951 frame. This might be relevant to give more importance to the
34952 moving part of your input if the background is static.
34953
34954 single
34955 Compute new histogram for each frame.
34956
34957 Default value is full.
34958
34959 The filter also exports the frame metadata "lavfi.color_quant_ratio"
34960 ("nb_color_in / nb_color_out") which you can use to evaluate the degree
34961 of color quantization of the palette. This information is also visible
34962 at info logging level.
34963
34964 Examples
34965
34966 • Generate a representative palette of a given video using ffmpeg:
34967
34968 ffmpeg -i input.mkv -vf palettegen palette.png
34969
34970 paletteuse
34971 Use a palette to downsample an input video stream.
34972
34973 The filter takes two inputs: one video stream and a palette. The
34974 palette must be a 256 pixels image.
34975
34976 It accepts the following options:
34977
34978 dither
34979 Select dithering mode. Available algorithms are:
34980
34981 bayer
34982 Ordered 8x8 bayer dithering (deterministic)
34983
34984 heckbert
34985 Dithering as defined by Paul Heckbert in 1982 (simple error
34986 diffusion). Note: this dithering is sometimes considered
34987 "wrong" and is included as a reference.
34988
34989 floyd_steinberg
34990 Floyd and Steingberg dithering (error diffusion)
34991
34992 sierra2
34993 Frankie Sierra dithering v2 (error diffusion)
34994
34995 sierra2_4a
34996 Frankie Sierra dithering v2 "Lite" (error diffusion)
34997
34998 sierra3
34999 Frankie Sierra dithering v3 (error diffusion)
35000
35001 burkes
35002 Burkes dithering (error diffusion)
35003
35004 atkinson
35005 Atkinson dithering by Bill Atkinson at Apple Computer (error
35006 diffusion)
35007
35008 Default is sierra2_4a.
35009
35010 bayer_scale
35011 When bayer dithering is selected, this option defines the scale of
35012 the pattern (how much the crosshatch pattern is visible). A low
35013 value means more visible pattern for less banding, and higher value
35014 means less visible pattern at the cost of more banding.
35015
35016 The option must be an integer value in the range [0,5]. Default is
35017 2.
35018
35019 diff_mode
35020 If set, define the zone to process
35021
35022 rectangle
35023 Only the changing rectangle will be reprocessed. This is
35024 similar to GIF cropping/offsetting compression mechanism. This
35025 option can be useful for speed if only a part of the image is
35026 changing, and has use cases such as limiting the scope of the
35027 error diffusal dither to the rectangle that bounds the moving
35028 scene (it leads to more deterministic output if the scene
35029 doesn't change much, and as a result less moving noise and
35030 better GIF compression).
35031
35032 Default is none.
35033
35034 new Take new palette for each output frame.
35035
35036 alpha_threshold
35037 Sets the alpha threshold for transparency. Alpha values above this
35038 threshold will be treated as completely opaque, and values below
35039 this threshold will be treated as completely transparent.
35040
35041 The option must be an integer value in the range [0,255]. Default
35042 is 128.
35043
35044 Examples
35045
35046 • Use a palette (generated for example with palettegen) to encode a
35047 GIF using ffmpeg:
35048
35049 ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
35050
35051 perspective
35052 Correct perspective of video not recorded perpendicular to the screen.
35053
35054 A description of the accepted parameters follows.
35055
35056 x0
35057 y0
35058 x1
35059 y1
35060 x2
35061 y2
35062 x3
35063 y3 Set coordinates expression for top left, top right, bottom left and
35064 bottom right corners. Default values are "0:0:W:0:0:H:W:H" with
35065 which perspective will remain unchanged. If the "sense" option is
35066 set to "source", then the specified points will be sent to the
35067 corners of the destination. If the "sense" option is set to
35068 "destination", then the corners of the source will be sent to the
35069 specified coordinates.
35070
35071 The expressions can use the following variables:
35072
35073 W
35074 H the width and height of video frame.
35075
35076 in Input frame count.
35077
35078 on Output frame count.
35079
35080 interpolation
35081 Set interpolation for perspective correction.
35082
35083 It accepts the following values:
35084
35085 linear
35086 cubic
35087
35088 Default value is linear.
35089
35090 sense
35091 Set interpretation of coordinate options.
35092
35093 It accepts the following values:
35094
35095 0, source
35096 Send point in the source specified by the given coordinates to
35097 the corners of the destination.
35098
35099 1, destination
35100 Send the corners of the source to the point in the destination
35101 specified by the given coordinates.
35102
35103 Default value is source.
35104
35105 eval
35106 Set when the expressions for coordinates x0,y0,...x3,y3 are
35107 evaluated.
35108
35109 It accepts the following values:
35110
35111 init
35112 only evaluate expressions once during the filter initialization
35113 or when a command is processed
35114
35115 frame
35116 evaluate expressions for each incoming frame
35117
35118 Default value is init.
35119
35120 phase
35121 Delay interlaced video by one field time so that the field order
35122 changes.
35123
35124 The intended use is to fix PAL movies that have been captured with the
35125 opposite field order to the film-to-video transfer.
35126
35127 A description of the accepted parameters follows.
35128
35129 mode
35130 Set phase mode.
35131
35132 It accepts the following values:
35133
35134 t Capture field order top-first, transfer bottom-first. Filter
35135 will delay the bottom field.
35136
35137 b Capture field order bottom-first, transfer top-first. Filter
35138 will delay the top field.
35139
35140 p Capture and transfer with the same field order. This mode only
35141 exists for the documentation of the other options to refer to,
35142 but if you actually select it, the filter will faithfully do
35143 nothing.
35144
35145 a Capture field order determined automatically by field flags,
35146 transfer opposite. Filter selects among t and b modes on a
35147 frame by frame basis using field flags. If no field information
35148 is available, then this works just like u.
35149
35150 u Capture unknown or varying, transfer opposite. Filter selects
35151 among t and b on a frame by frame basis by analyzing the images
35152 and selecting the alternative that produces best match between
35153 the fields.
35154
35155 T Capture top-first, transfer unknown or varying. Filter selects
35156 among t and p using image analysis.
35157
35158 B Capture bottom-first, transfer unknown or varying. Filter
35159 selects among b and p using image analysis.
35160
35161 A Capture determined by field flags, transfer unknown or varying.
35162 Filter selects among t, b and p using field flags and image
35163 analysis. If no field information is available, then this works
35164 just like U. This is the default mode.
35165
35166 U Both capture and transfer unknown or varying. Filter selects
35167 among t, b and p using image analysis only.
35168
35169 Commands
35170
35171 This filter supports the all above options as commands.
35172
35173 photosensitivity
35174 Reduce various flashes in video, so to help users with epilepsy.
35175
35176 It accepts the following options:
35177
35178 frames, f
35179 Set how many frames to use when filtering. Default is 30.
35180
35181 threshold, t
35182 Set detection threshold factor. Default is 1. Lower is stricter.
35183
35184 skip
35185 Set how many pixels to skip when sampling frames. Default is 1.
35186 Allowed range is from 1 to 1024.
35187
35188 bypass
35189 Leave frames unchanged. Default is disabled.
35190
35191 pixdesctest
35192 Pixel format descriptor test filter, mainly useful for internal
35193 testing. The output video should be equal to the input video.
35194
35195 For example:
35196
35197 format=monow, pixdesctest
35198
35199 can be used to test the monowhite pixel format descriptor definition.
35200
35201 pixelize
35202 Apply pixelization to video stream.
35203
35204 The filter accepts the following options:
35205
35206 width, w
35207 height, h
35208 Set block dimensions that will be used for pixelization. Default
35209 value is 16.
35210
35211 mode, m
35212 Set the mode of pixelization used.
35213
35214 Possible values are:
35215
35216 avg
35217 min
35218 max
35219
35220 Default value is "avg".
35221
35222 planes, p
35223 Set what planes to filter. Default is to filter all planes.
35224
35225 Commands
35226
35227 This filter supports all options as commands.
35228
35229 pixscope
35230 Display sample values of color channels. Mainly useful for checking
35231 color and levels. Minimum supported resolution is 640x480.
35232
35233 The filters accept the following options:
35234
35235 x Set scope X position, relative offset on X axis.
35236
35237 y Set scope Y position, relative offset on Y axis.
35238
35239 w Set scope width.
35240
35241 h Set scope height.
35242
35243 o Set window opacity. This window also holds statistics about pixel
35244 area.
35245
35246 wx Set window X position, relative offset on X axis.
35247
35248 wy Set window Y position, relative offset on Y axis.
35249
35250 Commands
35251
35252 This filter supports same commands as options.
35253
35254 pp
35255 Enable the specified chain of postprocessing subfilters using
35256 libpostproc. This library should be automatically selected with a GPL
35257 build ("--enable-gpl"). Subfilters must be separated by '/' and can be
35258 disabled by prepending a '-'. Each subfilter and some options have a
35259 short and a long name that can be used interchangeably, i.e. dr/dering
35260 are the same.
35261
35262 The filters accept the following options:
35263
35264 subfilters
35265 Set postprocessing subfilters string.
35266
35267 All subfilters share common options to determine their scope:
35268
35269 a/autoq
35270 Honor the quality commands for this subfilter.
35271
35272 c/chrom
35273 Do chrominance filtering, too (default).
35274
35275 y/nochrom
35276 Do luminance filtering only (no chrominance).
35277
35278 n/noluma
35279 Do chrominance filtering only (no luminance).
35280
35281 These options can be appended after the subfilter name, separated by a
35282 '|'.
35283
35284 Available subfilters are:
35285
35286 hb/hdeblock[|difference[|flatness]]
35287 Horizontal deblocking filter
35288
35289 difference
35290 Difference factor where higher values mean more deblocking
35291 (default: 32).
35292
35293 flatness
35294 Flatness threshold where lower values mean more deblocking
35295 (default: 39).
35296
35297 vb/vdeblock[|difference[|flatness]]
35298 Vertical deblocking filter
35299
35300 difference
35301 Difference factor where higher values mean more deblocking
35302 (default: 32).
35303
35304 flatness
35305 Flatness threshold where lower values mean more deblocking
35306 (default: 39).
35307
35308 ha/hadeblock[|difference[|flatness]]
35309 Accurate horizontal deblocking filter
35310
35311 difference
35312 Difference factor where higher values mean more deblocking
35313 (default: 32).
35314
35315 flatness
35316 Flatness threshold where lower values mean more deblocking
35317 (default: 39).
35318
35319 va/vadeblock[|difference[|flatness]]
35320 Accurate vertical deblocking filter
35321
35322 difference
35323 Difference factor where higher values mean more deblocking
35324 (default: 32).
35325
35326 flatness
35327 Flatness threshold where lower values mean more deblocking
35328 (default: 39).
35329
35330 The horizontal and vertical deblocking filters share the difference and
35331 flatness values so you cannot set different horizontal and vertical
35332 thresholds.
35333
35334 h1/x1hdeblock
35335 Experimental horizontal deblocking filter
35336
35337 v1/x1vdeblock
35338 Experimental vertical deblocking filter
35339
35340 dr/dering
35341 Deringing filter
35342
35343 tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise
35344 reducer
35345 threshold1
35346 larger -> stronger filtering
35347
35348 threshold2
35349 larger -> stronger filtering
35350
35351 threshold3
35352 larger -> stronger filtering
35353
35354 al/autolevels[:f/fullyrange], automatic brightness / contrast
35355 correction
35356 f/fullyrange
35357 Stretch luminance to "0-255".
35358
35359 lb/linblenddeint
35360 Linear blend deinterlacing filter that deinterlaces the given block
35361 by filtering all lines with a "(1 2 1)" filter.
35362
35363 li/linipoldeint
35364 Linear interpolating deinterlacing filter that deinterlaces the
35365 given block by linearly interpolating every second line.
35366
35367 ci/cubicipoldeint
35368 Cubic interpolating deinterlacing filter deinterlaces the given
35369 block by cubically interpolating every second line.
35370
35371 md/mediandeint
35372 Median deinterlacing filter that deinterlaces the given block by
35373 applying a median filter to every second line.
35374
35375 fd/ffmpegdeint
35376 FFmpeg deinterlacing filter that deinterlaces the given block by
35377 filtering every second line with a "(-1 4 2 4 -1)" filter.
35378
35379 l5/lowpass5
35380 Vertically applied FIR lowpass deinterlacing filter that
35381 deinterlaces the given block by filtering all lines with a "(-1 2 6
35382 2 -1)" filter.
35383
35384 fq/forceQuant[|quantizer]
35385 Overrides the quantizer table from the input with the constant
35386 quantizer you specify.
35387
35388 quantizer
35389 Quantizer to use
35390
35391 de/default
35392 Default pp filter combination ("hb|a,vb|a,dr|a")
35393
35394 fa/fast
35395 Fast pp filter combination ("h1|a,v1|a,dr|a")
35396
35397 ac High quality pp filter combination ("ha|a|128|7,va|a,dr|a")
35398
35399 Examples
35400
35401 • Apply horizontal and vertical deblocking, deringing and automatic
35402 brightness/contrast:
35403
35404 pp=hb/vb/dr/al
35405
35406 • Apply default filters without brightness/contrast correction:
35407
35408 pp=de/-al
35409
35410 • Apply default filters and temporal denoiser:
35411
35412 pp=default/tmpnoise|1|2|3
35413
35414 • Apply deblocking on luminance only, and switch vertical deblocking
35415 on or off automatically depending on available CPU time:
35416
35417 pp=hb|y/vb|a
35418
35419 pp7
35420 Apply Postprocessing filter 7. It is variant of the spp filter, similar
35421 to spp = 6 with 7 point DCT, where only the center sample is used after
35422 IDCT.
35423
35424 The filter accepts the following options:
35425
35426 qp Force a constant quantization parameter. It accepts an integer in
35427 range 0 to 63. If not set, the filter will use the QP from the
35428 video stream (if available).
35429
35430 mode
35431 Set thresholding mode. Available modes are:
35432
35433 hard
35434 Set hard thresholding.
35435
35436 soft
35437 Set soft thresholding (better de-ringing effect, but likely
35438 blurrier).
35439
35440 medium
35441 Set medium thresholding (good results, default).
35442
35443 premultiply
35444 Apply alpha premultiply effect to input video stream using first plane
35445 of second stream as alpha.
35446
35447 Both streams must have same dimensions and same pixel format.
35448
35449 The filter accepts the following option:
35450
35451 planes
35452 Set which planes will be processed, unprocessed planes will be
35453 copied. By default value 0xf, all planes will be processed.
35454
35455 inplace
35456 Do not require 2nd input for processing, instead use alpha plane
35457 from input stream.
35458
35459 prewitt
35460 Apply prewitt operator to input video stream.
35461
35462 The filter accepts the following option:
35463
35464 planes
35465 Set which planes will be processed, unprocessed planes will be
35466 copied. By default value 0xf, all planes will be processed.
35467
35468 scale
35469 Set value which will be multiplied with filtered result.
35470
35471 delta
35472 Set value which will be added to filtered result.
35473
35474 Commands
35475
35476 This filter supports the all above options as commands.
35477
35478 pseudocolor
35479 Alter frame colors in video with pseudocolors.
35480
35481 This filter accepts the following options:
35482
35483 c0 set pixel first component expression
35484
35485 c1 set pixel second component expression
35486
35487 c2 set pixel third component expression
35488
35489 c3 set pixel fourth component expression, corresponds to the alpha
35490 component
35491
35492 index, i
35493 set component to use as base for altering colors
35494
35495 preset, p
35496 Pick one of built-in LUTs. By default is set to none.
35497
35498 Available LUTs:
35499
35500 magma
35501 inferno
35502 plasma
35503 viridis
35504 turbo
35505 cividis
35506 range1
35507 range2
35508 shadows
35509 highlights
35510 solar
35511 nominal
35512 preferred
35513 total
35514 spectral
35515 opacity
35516 Set opacity of output colors. Allowed range is from 0 to 1.
35517 Default value is set to 1.
35518
35519 Each of the expression options specifies the expression to use for
35520 computing the lookup table for the corresponding pixel component
35521 values.
35522
35523 The expressions can contain the following constants and functions:
35524
35525 w
35526 h The input width and height.
35527
35528 val The input value for the pixel component.
35529
35530 ymin, umin, vmin, amin
35531 The minimum allowed component value.
35532
35533 ymax, umax, vmax, amax
35534 The maximum allowed component value.
35535
35536 All expressions default to "val".
35537
35538 Commands
35539
35540 This filter supports the all above options as commands.
35541
35542 Examples
35543
35544 • Change too high luma values to gradient:
35545
35546 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'"
35547
35548 psnr
35549 Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
35550 Ratio) between two input videos.
35551
35552 This filter takes in input two input videos, the first input is
35553 considered the "main" source and is passed unchanged to the output. The
35554 second input is used as a "reference" video for computing the PSNR.
35555
35556 Both video inputs must have the same resolution and pixel format for
35557 this filter to work correctly. Also it assumes that both inputs have
35558 the same number of frames, which are compared one by one.
35559
35560 The obtained average PSNR is printed through the logging system.
35561
35562 The filter stores the accumulated MSE (mean squared error) of each
35563 frame, and at the end of the processing it is averaged across all
35564 frames equally, and the following formula is applied to obtain the
35565 PSNR:
35566
35567 PSNR = 10*log10(MAX^2/MSE)
35568
35569 Where MAX is the average of the maximum values of each component of the
35570 image.
35571
35572 The description of the accepted parameters follows.
35573
35574 stats_file, f
35575 If specified the filter will use the named file to save the PSNR of
35576 each individual frame. When filename equals "-" the data is sent to
35577 standard output.
35578
35579 stats_version
35580 Specifies which version of the stats file format to use. Details of
35581 each format are written below. Default value is 1.
35582
35583 stats_add_max
35584 Determines whether the max value is output to the stats log.
35585 Default value is 0. Requires stats_version >= 2. If this is set
35586 and stats_version < 2, the filter will return an error.
35587
35588 This filter also supports the framesync options.
35589
35590 The file printed if stats_file is selected, contains a sequence of
35591 key/value pairs of the form key:value for each compared couple of
35592 frames.
35593
35594 If a stats_version greater than 1 is specified, a header line precedes
35595 the list of per-frame-pair stats, with key value pairs following the
35596 frame format with the following parameters:
35597
35598 psnr_log_version
35599 The version of the log file format. Will match stats_version.
35600
35601 fields
35602 A comma separated list of the per-frame-pair parameters included in
35603 the log.
35604
35605 A description of each shown per-frame-pair parameter follows:
35606
35607 n sequential number of the input frame, starting from 1
35608
35609 mse_avg
35610 Mean Square Error pixel-by-pixel average difference of the compared
35611 frames, averaged over all the image components.
35612
35613 mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a
35614 Mean Square Error pixel-by-pixel average difference of the compared
35615 frames for the component specified by the suffix.
35616
35617 psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a
35618 Peak Signal to Noise ratio of the compared frames for the component
35619 specified by the suffix.
35620
35621 max_avg, max_y, max_u, max_v
35622 Maximum allowed value for each channel, and average over all
35623 channels.
35624
35625 Examples
35626
35627 • For example:
35628
35629 movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
35630 [main][ref] psnr="stats_file=stats.log" [out]
35631
35632 On this example the input file being processed is compared with the
35633 reference file ref_movie.mpg. The PSNR of each individual frame is
35634 stored in stats.log.
35635
35636 • Another example with different containers:
35637
35638 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 -
35639
35640 pullup
35641 Pulldown reversal (inverse telecine) filter, capable of handling mixed
35642 hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps
35643 progressive content.
35644
35645 The pullup filter is designed to take advantage of future context in
35646 making its decisions. This filter is stateless in the sense that it
35647 does not lock onto a pattern to follow, but it instead looks forward to
35648 the following fields in order to identify matches and rebuild
35649 progressive frames.
35650
35651 To produce content with an even framerate, insert the fps filter after
35652 pullup, use "fps=24000/1001" if the input frame rate is 29.97fps,
35653 "fps=24" for 30fps and the (rare) telecined 25fps input.
35654
35655 The filter accepts the following options:
35656
35657 jl
35658 jr
35659 jt
35660 jb These options set the amount of "junk" to ignore at the left,
35661 right, top, and bottom of the image, respectively. Left and right
35662 are in units of 8 pixels, while top and bottom are in units of 2
35663 lines. The default is 8 pixels on each side.
35664
35665 sb Set the strict breaks. Setting this option to 1 will reduce the
35666 chances of filter generating an occasional mismatched frame, but it
35667 may also cause an excessive number of frames to be dropped during
35668 high motion sequences. Conversely, setting it to -1 will make
35669 filter match fields more easily. This may help processing of video
35670 where there is slight blurring between the fields, but may also
35671 cause there to be interlaced frames in the output. Default value
35672 is 0.
35673
35674 mp Set the metric plane to use. It accepts the following values:
35675
35676 l Use luma plane.
35677
35678 u Use chroma blue plane.
35679
35680 v Use chroma red plane.
35681
35682 This option may be set to use chroma plane instead of the default
35683 luma plane for doing filter's computations. This may improve
35684 accuracy on very clean source material, but more likely will
35685 decrease accuracy, especially if there is chroma noise (rainbow
35686 effect) or any grayscale video. The main purpose of setting mp to
35687 a chroma plane is to reduce CPU load and make pullup usable in
35688 realtime on slow machines.
35689
35690 For best results (without duplicated frames in the output file) it is
35691 necessary to change the output frame rate. For example, to inverse
35692 telecine NTSC input:
35693
35694 ffmpeg -i input -vf pullup -r 24000/1001 ...
35695
35696 qp
35697 Change video quantization parameters (QP).
35698
35699 The filter accepts the following option:
35700
35701 qp Set expression for quantization parameter.
35702
35703 The expression is evaluated through the eval API and can contain, among
35704 others, the following constants:
35705
35706 known
35707 1 if index is not 129, 0 otherwise.
35708
35709 qp Sequential index starting from -129 to 128.
35710
35711 Examples
35712
35713 • Some equation like:
35714
35715 qp=2+2*sin(PI*qp)
35716
35717 random
35718 Flush video frames from internal cache of frames into a random order.
35719 No frame is discarded. Inspired by frei0r nervous filter.
35720
35721 frames
35722 Set size in number of frames of internal cache, in range from 2 to
35723 512. Default is 30.
35724
35725 seed
35726 Set seed for random number generator, must be an integer included
35727 between 0 and "UINT32_MAX". If not specified, or if explicitly set
35728 to less than 0, the filter will try to use a good random seed on a
35729 best effort basis.
35730
35731 readeia608
35732 Read closed captioning (EIA-608) information from the top lines of a
35733 video frame.
35734
35735 This filter adds frame metadata for "lavfi.readeia608.X.cc" and
35736 "lavfi.readeia608.X.line", where "X" is the number of the identified
35737 line with EIA-608 data (starting from 0). A description of each
35738 metadata value follows:
35739
35740 lavfi.readeia608.X.cc
35741 The two bytes stored as EIA-608 data (printed in hexadecimal).
35742
35743 lavfi.readeia608.X.line
35744 The number of the line on which the EIA-608 data was identified and
35745 read.
35746
35747 This filter accepts the following options:
35748
35749 scan_min
35750 Set the line to start scanning for EIA-608 data. Default is 0.
35751
35752 scan_max
35753 Set the line to end scanning for EIA-608 data. Default is 29.
35754
35755 spw Set the ratio of width reserved for sync code detection. Default
35756 is 0.27. Allowed range is "[0.1 - 0.7]".
35757
35758 chp Enable checking the parity bit. In the event of a parity error, the
35759 filter will output 0x00 for that character. Default is false.
35760
35761 lp Lowpass lines prior to further processing. Default is enabled.
35762
35763 Commands
35764
35765 This filter supports the all above options as commands.
35766
35767 Examples
35768
35769 • Output a csv with presentation time and the first two lines of
35770 identified EIA-608 captioning data.
35771
35772 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
35773
35774 readvitc
35775 Read vertical interval timecode (VITC) information from the top lines
35776 of a video frame.
35777
35778 The filter adds frame metadata key "lavfi.readvitc.tc_str" with the
35779 timecode value, if a valid timecode has been detected. Further metadata
35780 key "lavfi.readvitc.found" is set to 0/1 depending on whether timecode
35781 data has been found or not.
35782
35783 This filter accepts the following options:
35784
35785 scan_max
35786 Set the maximum number of lines to scan for VITC data. If the value
35787 is set to -1 the full video frame is scanned. Default is 45.
35788
35789 thr_b
35790 Set the luma threshold for black. Accepts float numbers in the
35791 range [0.0,1.0], default value is 0.2. The value must be equal or
35792 less than "thr_w".
35793
35794 thr_w
35795 Set the luma threshold for white. Accepts float numbers in the
35796 range [0.0,1.0], default value is 0.6. The value must be equal or
35797 greater than "thr_b".
35798
35799 Examples
35800
35801 • Detect and draw VITC data onto the video frame; if no valid VITC is
35802 detected, draw "--:--:--:--" as a placeholder:
35803
35804 ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--}:x=(w-tw)/2:y=400-ascent'
35805
35806 remap
35807 Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
35808
35809 Destination pixel at position (X, Y) will be picked from source (x, y)
35810 position where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are
35811 out of range, zero value for pixel will be used for destination pixel.
35812
35813 Xmap and Ymap input video streams must be of same dimensions. Output
35814 video stream will have Xmap/Ymap video stream dimensions. Xmap and
35815 Ymap input video streams are 16bit depth, single channel.
35816
35817 format
35818 Specify pixel format of output from this filter. Can be "color" or
35819 "gray". Default is "color".
35820
35821 fill
35822 Specify the color of the unmapped pixels. For the syntax of this
35823 option, check the "Color" section in the ffmpeg-utils manual.
35824 Default color is "black".
35825
35826 removegrain
35827 The removegrain filter is a spatial denoiser for progressive video.
35828
35829 m0 Set mode for the first plane.
35830
35831 m1 Set mode for the second plane.
35832
35833 m2 Set mode for the third plane.
35834
35835 m3 Set mode for the fourth plane.
35836
35837 Range of mode is from 0 to 24. Description of each mode follows:
35838
35839 0 Leave input plane unchanged. Default.
35840
35841 1 Clips the pixel with the minimum and maximum of the 8 neighbour
35842 pixels.
35843
35844 2 Clips the pixel with the second minimum and maximum of the 8
35845 neighbour pixels.
35846
35847 3 Clips the pixel with the third minimum and maximum of the 8
35848 neighbour pixels.
35849
35850 4 Clips the pixel with the fourth minimum and maximum of the 8
35851 neighbour pixels. This is equivalent to a median filter.
35852
35853 5 Line-sensitive clipping giving the minimal change.
35854
35855 6 Line-sensitive clipping, intermediate.
35856
35857 7 Line-sensitive clipping, intermediate.
35858
35859 8 Line-sensitive clipping, intermediate.
35860
35861 9 Line-sensitive clipping on a line where the neighbours pixels are
35862 the closest.
35863
35864 10 Replaces the target pixel with the closest neighbour.
35865
35866 11 [1 2 1] horizontal and vertical kernel blur.
35867
35868 12 Same as mode 11.
35869
35870 13 Bob mode, interpolates top field from the line where the neighbours
35871 pixels are the closest.
35872
35873 14 Bob mode, interpolates bottom field from the line where the
35874 neighbours pixels are the closest.
35875
35876 15 Bob mode, interpolates top field. Same as 13 but with a more
35877 complicated interpolation formula.
35878
35879 16 Bob mode, interpolates bottom field. Same as 14 but with a more
35880 complicated interpolation formula.
35881
35882 17 Clips the pixel with the minimum and maximum of respectively the
35883 maximum and minimum of each pair of opposite neighbour pixels.
35884
35885 18 Line-sensitive clipping using opposite neighbours whose greatest
35886 distance from the current pixel is minimal.
35887
35888 19 Replaces the pixel with the average of its 8 neighbours.
35889
35890 20 Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
35891
35892 21 Clips pixels using the averages of opposite neighbour.
35893
35894 22 Same as mode 21 but simpler and faster.
35895
35896 23 Small edge and halo removal, but reputed useless.
35897
35898 24 Similar as 23.
35899
35900 removelogo
35901 Suppress a TV station logo, using an image file to determine which
35902 pixels comprise the logo. It works by filling in the pixels that
35903 comprise the logo with neighboring pixels.
35904
35905 The filter accepts the following options:
35906
35907 filename, f
35908 Set the filter bitmap file, which can be any image format supported
35909 by libavformat. The width and height of the image file must match
35910 those of the video stream being processed.
35911
35912 Pixels in the provided bitmap image with a value of zero are not
35913 considered part of the logo, non-zero pixels are considered part of the
35914 logo. If you use white (255) for the logo and black (0) for the rest,
35915 you will be safe. For making the filter bitmap, it is recommended to
35916 take a screen capture of a black frame with the logo visible, and then
35917 using a threshold filter followed by the erode filter once or twice.
35918
35919 If needed, little splotches can be fixed manually. Remember that if
35920 logo pixels are not covered, the filter quality will be much reduced.
35921 Marking too many pixels as part of the logo does not hurt as much, but
35922 it will increase the amount of blurring needed to cover over the image
35923 and will destroy more information than necessary, and extra pixels will
35924 slow things down on a large logo.
35925
35926 repeatfields
35927 This filter uses the repeat_field flag from the Video ES headers and
35928 hard repeats fields based on its value.
35929
35930 reverse
35931 Reverse a video clip.
35932
35933 Warning: This filter requires memory to buffer the entire clip, so
35934 trimming is suggested.
35935
35936 Examples
35937
35938 • Take the first 5 seconds of a clip, and reverse it.
35939
35940 trim=end=5,reverse
35941
35942 rgbashift
35943 Shift R/G/B/A pixels horizontally and/or vertically.
35944
35945 The filter accepts the following options:
35946
35947 rh Set amount to shift red horizontally.
35948
35949 rv Set amount to shift red vertically.
35950
35951 gh Set amount to shift green horizontally.
35952
35953 gv Set amount to shift green vertically.
35954
35955 bh Set amount to shift blue horizontally.
35956
35957 bv Set amount to shift blue vertically.
35958
35959 ah Set amount to shift alpha horizontally.
35960
35961 av Set amount to shift alpha vertically.
35962
35963 edge
35964 Set edge mode, can be smear, default, or warp.
35965
35966 Commands
35967
35968 This filter supports the all above options as commands.
35969
35970 roberts
35971 Apply roberts cross operator to input video stream.
35972
35973 The filter accepts the following option:
35974
35975 planes
35976 Set which planes will be processed, unprocessed planes will be
35977 copied. By default value 0xf, all planes will be processed.
35978
35979 scale
35980 Set value which will be multiplied with filtered result.
35981
35982 delta
35983 Set value which will be added to filtered result.
35984
35985 Commands
35986
35987 This filter supports the all above options as commands.
35988
35989 rotate
35990 Rotate video by an arbitrary angle expressed in radians.
35991
35992 The filter accepts the following options:
35993
35994 A description of the optional parameters follows.
35995
35996 angle, a
35997 Set an expression for the angle by which to rotate the input video
35998 clockwise, expressed as a number of radians. A negative value will
35999 result in a counter-clockwise rotation. By default it is set to
36000 "0".
36001
36002 This expression is evaluated for each frame.
36003
36004 out_w, ow
36005 Set the output width expression, default value is "iw". This
36006 expression is evaluated just once during configuration.
36007
36008 out_h, oh
36009 Set the output height expression, default value is "ih". This
36010 expression is evaluated just once during configuration.
36011
36012 bilinear
36013 Enable bilinear interpolation if set to 1, a value of 0 disables
36014 it. Default value is 1.
36015
36016 fillcolor, c
36017 Set the color used to fill the output area not covered by the
36018 rotated image. For the general syntax of this option, check the
36019 "Color" section in the ffmpeg-utils manual. If the special value
36020 "none" is selected then no background is printed (useful for
36021 example if the background is never shown).
36022
36023 Default value is "black".
36024
36025 The expressions for the angle and the output size can contain the
36026 following constants and functions:
36027
36028 n sequential number of the input frame, starting from 0. It is always
36029 NAN before the first frame is filtered.
36030
36031 t time in seconds of the input frame, it is set to 0 when the filter
36032 is configured. It is always NAN before the first frame is filtered.
36033
36034 hsub
36035 vsub
36036 horizontal and vertical chroma subsample values. For example for
36037 the pixel format "yuv422p" hsub is 2 and vsub is 1.
36038
36039 in_w, iw
36040 in_h, ih
36041 the input video width and height
36042
36043 out_w, ow
36044 out_h, oh
36045 the output width and height, that is the size of the padded area as
36046 specified by the width and height expressions
36047
36048 rotw(a)
36049 roth(a)
36050 the minimal width/height required for completely containing the
36051 input video rotated by a radians.
36052
36053 These are only available when computing the out_w and out_h
36054 expressions.
36055
36056 Examples
36057
36058 • Rotate the input by PI/6 radians clockwise:
36059
36060 rotate=PI/6
36061
36062 • Rotate the input by PI/6 radians counter-clockwise:
36063
36064 rotate=-PI/6
36065
36066 • Rotate the input by 45 degrees clockwise:
36067
36068 rotate=45*PI/180
36069
36070 • Apply a constant rotation with period T, starting from an angle of
36071 PI/3:
36072
36073 rotate=PI/3+2*PI*t/T
36074
36075 • Make the input video rotation oscillating with a period of T
36076 seconds and an amplitude of A radians:
36077
36078 rotate=A*sin(2*PI/T*t)
36079
36080 • Rotate the video, output size is chosen so that the whole rotating
36081 input video is always completely contained in the output:
36082
36083 rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
36084
36085 • Rotate the video, reduce the output size so that no background is
36086 ever shown:
36087
36088 rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
36089
36090 Commands
36091
36092 The filter supports the following commands:
36093
36094 a, angle
36095 Set the angle expression. The command accepts the same syntax of
36096 the corresponding option.
36097
36098 If the specified expression is not valid, it is kept at its current
36099 value.
36100
36101 sab
36102 Apply Shape Adaptive Blur.
36103
36104 The filter accepts the following options:
36105
36106 luma_radius, lr
36107 Set luma blur filter strength, must be a value in range 0.1-4.0,
36108 default value is 1.0. A greater value will result in a more blurred
36109 image, and in slower processing.
36110
36111 luma_pre_filter_radius, lpfr
36112 Set luma pre-filter radius, must be a value in the 0.1-2.0 range,
36113 default value is 1.0.
36114
36115 luma_strength, ls
36116 Set luma maximum difference between pixels to still be considered,
36117 must be a value in the 0.1-100.0 range, default value is 1.0.
36118
36119 chroma_radius, cr
36120 Set chroma blur filter strength, must be a value in range -0.9-4.0.
36121 A greater value will result in a more blurred image, and in slower
36122 processing.
36123
36124 chroma_pre_filter_radius, cpfr
36125 Set chroma pre-filter radius, must be a value in the -0.9-2.0
36126 range.
36127
36128 chroma_strength, cs
36129 Set chroma maximum difference between pixels to still be
36130 considered, must be a value in the -0.9-100.0 range.
36131
36132 Each chroma option value, if not explicitly specified, is set to the
36133 corresponding luma option value.
36134
36135 scale
36136 Scale (resize) the input video, using the libswscale library.
36137
36138 The scale filter forces the output display aspect ratio to be the same
36139 of the input, by changing the output sample aspect ratio.
36140
36141 If the input image format is different from the format requested by the
36142 next filter, the scale filter will convert the input to the requested
36143 format.
36144
36145 Options
36146
36147 The filter accepts the following options, or any of the options
36148 supported by the libswscale scaler.
36149
36150 See the ffmpeg-scaler manual for the complete list of scaler options.
36151
36152 width, w
36153 height, h
36154 Set the output video dimension expression. Default value is the
36155 input dimension.
36156
36157 If the width or w value is 0, the input width is used for the
36158 output. If the height or h value is 0, the input height is used for
36159 the output.
36160
36161 If one and only one of the values is -n with n >= 1, the scale
36162 filter will use a value that maintains the aspect ratio of the
36163 input image, calculated from the other specified dimension. After
36164 that it will, however, make sure that the calculated dimension is
36165 divisible by n and adjust the value if necessary.
36166
36167 If both values are -n with n >= 1, the behavior will be identical
36168 to both values being set to 0 as previously detailed.
36169
36170 See below for the list of accepted constants for use in the
36171 dimension expression.
36172
36173 eval
36174 Specify when to evaluate width and height expression. It accepts
36175 the following values:
36176
36177 init
36178 Only evaluate expressions once during the filter initialization
36179 or when a command is processed.
36180
36181 frame
36182 Evaluate expressions for each incoming frame.
36183
36184 Default value is init.
36185
36186 interl
36187 Set the interlacing mode. It accepts the following values:
36188
36189 1 Force interlaced aware scaling.
36190
36191 0 Do not apply interlaced scaling.
36192
36193 -1 Select interlaced aware scaling depending on whether the source
36194 frames are flagged as interlaced or not.
36195
36196 Default value is 0.
36197
36198 flags
36199 Set libswscale scaling flags. See the ffmpeg-scaler manual for the
36200 complete list of values. If not explicitly specified the filter
36201 applies the default flags.
36202
36203 param0, param1
36204 Set libswscale input parameters for scaling algorithms that need
36205 them. See the ffmpeg-scaler manual for the complete documentation.
36206 If not explicitly specified the filter applies empty parameters.
36207
36208 size, s
36209 Set the video size. For the syntax of this option, check the "Video
36210 size" section in the ffmpeg-utils manual.
36211
36212 in_color_matrix
36213 out_color_matrix
36214 Set in/output YCbCr color space type.
36215
36216 This allows the autodetected value to be overridden as well as
36217 allows forcing a specific value used for the output and encoder.
36218
36219 If not specified, the color space type depends on the pixel format.
36220
36221 Possible values:
36222
36223 auto
36224 Choose automatically.
36225
36226 bt709
36227 Format conforming to International Telecommunication Union
36228 (ITU) Recommendation BT.709.
36229
36230 fcc Set color space conforming to the United States Federal
36231 Communications Commission (FCC) Code of Federal Regulations
36232 (CFR) Title 47 (2003) 73.682 (a).
36233
36234 bt601
36235 bt470
36236 smpte170m
36237 Set color space conforming to:
36238
36239 • ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
36240
36241 • ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
36242
36243 • Society of Motion Picture and Television Engineers (SMPTE)
36244 ST 170:2004
36245
36246 smpte240m
36247 Set color space conforming to SMPTE ST 240:1999.
36248
36249 bt2020
36250 Set color space conforming to ITU-R BT.2020 non-constant
36251 luminance system.
36252
36253 in_range
36254 out_range
36255 Set in/output YCbCr sample range.
36256
36257 This allows the autodetected value to be overridden as well as
36258 allows forcing a specific value used for the output and encoder. If
36259 not specified, the range depends on the pixel format. Possible
36260 values:
36261
36262 auto/unknown
36263 Choose automatically.
36264
36265 jpeg/full/pc
36266 Set full range (0-255 in case of 8-bit luma).
36267
36268 mpeg/limited/tv
36269 Set "MPEG" range (16-235 in case of 8-bit luma).
36270
36271 force_original_aspect_ratio
36272 Enable decreasing or increasing output video width or height if
36273 necessary to keep the original aspect ratio. Possible values:
36274
36275 disable
36276 Scale the video as specified and disable this feature.
36277
36278 decrease
36279 The output video dimensions will automatically be decreased if
36280 needed.
36281
36282 increase
36283 The output video dimensions will automatically be increased if
36284 needed.
36285
36286 One useful instance of this option is that when you know a specific
36287 device's maximum allowed resolution, you can use this to limit the
36288 output video to that, while retaining the aspect ratio. For
36289 example, device A allows 1280x720 playback, and your video is
36290 1920x800. Using this option (set it to decrease) and specifying
36291 1280x720 to the command line makes the output 1280x533.
36292
36293 Please note that this is a different thing than specifying -1 for w
36294 or h, you still need to specify the output resolution for this
36295 option to work.
36296
36297 force_divisible_by
36298 Ensures that both the output dimensions, width and height, are
36299 divisible by the given integer when used together with
36300 force_original_aspect_ratio. This works similar to using "-n" in
36301 the w and h options.
36302
36303 This option respects the value set for force_original_aspect_ratio,
36304 increasing or decreasing the resolution accordingly. The video's
36305 aspect ratio may be slightly modified.
36306
36307 This option can be handy if you need to have a video fit within or
36308 exceed a defined resolution using force_original_aspect_ratio but
36309 also have encoder restrictions on width or height divisibility.
36310
36311 The values of the w and h options are expressions containing the
36312 following constants:
36313
36314 in_w
36315 in_h
36316 The input width and height
36317
36318 iw
36319 ih These are the same as in_w and in_h.
36320
36321 out_w
36322 out_h
36323 The output (scaled) width and height
36324
36325 ow
36326 oh These are the same as out_w and out_h
36327
36328 a The same as iw / ih
36329
36330 sar input sample aspect ratio
36331
36332 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
36333
36334 hsub
36335 vsub
36336 horizontal and vertical input chroma subsample values. For example
36337 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
36338
36339 ohsub
36340 ovsub
36341 horizontal and vertical output chroma subsample values. For example
36342 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
36343
36344 n The (sequential) number of the input frame, starting from 0. Only
36345 available with "eval=frame".
36346
36347 t The presentation timestamp of the input frame, expressed as a
36348 number of seconds. Only available with "eval=frame".
36349
36350 pos The position (byte offset) of the frame in the input stream, or NaN
36351 if this information is unavailable and/or meaningless (for example
36352 in case of synthetic video). Only available with "eval=frame".
36353
36354 Examples
36355
36356 • Scale the input video to a size of 200x100
36357
36358 scale=w=200:h=100
36359
36360 This is equivalent to:
36361
36362 scale=200:100
36363
36364 or:
36365
36366 scale=200x100
36367
36368 • Specify a size abbreviation for the output size:
36369
36370 scale=qcif
36371
36372 which can also be written as:
36373
36374 scale=size=qcif
36375
36376 • Scale the input to 2x:
36377
36378 scale=w=2*iw:h=2*ih
36379
36380 • The above is the same as:
36381
36382 scale=2*in_w:2*in_h
36383
36384 • Scale the input to 2x with forced interlaced scaling:
36385
36386 scale=2*iw:2*ih:interl=1
36387
36388 • Scale the input to half size:
36389
36390 scale=w=iw/2:h=ih/2
36391
36392 • Increase the width, and set the height to the same size:
36393
36394 scale=3/2*iw:ow
36395
36396 • Seek Greek harmony:
36397
36398 scale=iw:1/PHI*iw
36399 scale=ih*PHI:ih
36400
36401 • Increase the height, and set the width to 3/2 of the height:
36402
36403 scale=w=3/2*oh:h=3/5*ih
36404
36405 • Increase the size, making the size a multiple of the chroma
36406 subsample values:
36407
36408 scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
36409
36410 • Increase the width to a maximum of 500 pixels, keeping the same
36411 aspect ratio as the input:
36412
36413 scale=w='min(500\, iw*3/2):h=-1'
36414
36415 • Make pixels square by combining scale and setsar:
36416
36417 scale='trunc(ih*dar):ih',setsar=1/1
36418
36419 • Make pixels square by combining scale and setsar, making sure the
36420 resulting resolution is even (required by some codecs):
36421
36422 scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
36423
36424 Commands
36425
36426 This filter supports the following commands:
36427
36428 width, w
36429 height, h
36430 Set the output video dimension expression. The command accepts the
36431 same syntax of the corresponding option.
36432
36433 If the specified expression is not valid, it is kept at its current
36434 value.
36435
36436 scale_cuda
36437 Scale (resize) and convert (pixel format) the input video, using
36438 accelerated CUDA kernels. Setting the output width and height works in
36439 the same way as for the scale filter.
36440
36441 The filter accepts the following options:
36442
36443 w
36444 h Set the output video dimension expression. Default value is the
36445 input dimension.
36446
36447 Allows for the same expressions as the scale filter.
36448
36449 interp_algo
36450 Sets the algorithm used for scaling:
36451
36452 nearest
36453 Nearest neighbour
36454
36455 Used by default if input parameters match the desired output.
36456
36457 bilinear
36458 Bilinear
36459
36460 bicubic
36461 Bicubic
36462
36463 This is the default.
36464
36465 lanczos
36466 Lanczos
36467
36468 format
36469 Controls the output pixel format. By default, or if none is
36470 specified, the input pixel format is used.
36471
36472 The filter does not support converting between YUV and RGB pixel
36473 formats.
36474
36475 passthrough
36476 If set to 0, every frame is processed, even if no conversion is
36477 neccesary. This mode can be useful to use the filter as a buffer
36478 for a downstream frame-consumer that exhausts the limited decoder
36479 frame pool.
36480
36481 If set to 1, frames are passed through as-is if they match the
36482 desired output parameters. This is the default behaviour.
36483
36484 param
36485 Algorithm-Specific parameter.
36486
36487 Affects the curves of the bicubic algorithm.
36488
36489 force_original_aspect_ratio
36490 force_divisible_by
36491 Work the same as the identical scale filter options.
36492
36493 Examples
36494
36495 • Scale input to 720p, keeping aspect ratio and ensuring the output
36496 is yuv420p.
36497
36498 scale_cuda=-2:720:format=yuv420p
36499
36500 • Upscale to 4K using nearest neighbour algorithm.
36501
36502 scale_cuda=4096:2160:interp_algo=nearest
36503
36504 • Don't do any conversion or scaling, but copy all input frames into
36505 newly allocated ones. This can be useful to deal with a filter and
36506 encode chain that otherwise exhausts the decoders frame pool.
36507
36508 scale_cuda=passthrough=0
36509
36510 scale_npp
36511 Use the NVIDIA Performance Primitives (libnpp) to perform scaling
36512 and/or pixel format conversion on CUDA video frames. Setting the output
36513 width and height works in the same way as for the scale filter.
36514
36515 The following additional options are accepted:
36516
36517 format
36518 The pixel format of the output CUDA frames. If set to the string
36519 "same" (the default), the input format will be kept. Note that
36520 automatic format negotiation and conversion is not yet supported
36521 for hardware frames
36522
36523 interp_algo
36524 The interpolation algorithm used for resizing. One of the
36525 following:
36526
36527 nn Nearest neighbour.
36528
36529 linear
36530 cubic
36531 cubic2p_bspline
36532 2-parameter cubic (B=1, C=0)
36533
36534 cubic2p_catmullrom
36535 2-parameter cubic (B=0, C=1/2)
36536
36537 cubic2p_b05c03
36538 2-parameter cubic (B=1/2, C=3/10)
36539
36540 super
36541 Supersampling
36542
36543 lanczos
36544 force_original_aspect_ratio
36545 Enable decreasing or increasing output video width or height if
36546 necessary to keep the original aspect ratio. Possible values:
36547
36548 disable
36549 Scale the video as specified and disable this feature.
36550
36551 decrease
36552 The output video dimensions will automatically be decreased if
36553 needed.
36554
36555 increase
36556 The output video dimensions will automatically be increased if
36557 needed.
36558
36559 One useful instance of this option is that when you know a specific
36560 device's maximum allowed resolution, you can use this to limit the
36561 output video to that, while retaining the aspect ratio. For
36562 example, device A allows 1280x720 playback, and your video is
36563 1920x800. Using this option (set it to decrease) and specifying
36564 1280x720 to the command line makes the output 1280x533.
36565
36566 Please note that this is a different thing than specifying -1 for w
36567 or h, you still need to specify the output resolution for this
36568 option to work.
36569
36570 force_divisible_by
36571 Ensures that both the output dimensions, width and height, are
36572 divisible by the given integer when used together with
36573 force_original_aspect_ratio. This works similar to using "-n" in
36574 the w and h options.
36575
36576 This option respects the value set for force_original_aspect_ratio,
36577 increasing or decreasing the resolution accordingly. The video's
36578 aspect ratio may be slightly modified.
36579
36580 This option can be handy if you need to have a video fit within or
36581 exceed a defined resolution using force_original_aspect_ratio but
36582 also have encoder restrictions on width or height divisibility.
36583
36584 eval
36585 Specify when to evaluate width and height expression. It accepts
36586 the following values:
36587
36588 init
36589 Only evaluate expressions once during the filter initialization
36590 or when a command is processed.
36591
36592 frame
36593 Evaluate expressions for each incoming frame.
36594
36595 The values of the w and h options are expressions containing the
36596 following constants:
36597
36598 in_w
36599 in_h
36600 The input width and height
36601
36602 iw
36603 ih These are the same as in_w and in_h.
36604
36605 out_w
36606 out_h
36607 The output (scaled) width and height
36608
36609 ow
36610 oh These are the same as out_w and out_h
36611
36612 a The same as iw / ih
36613
36614 sar input sample aspect ratio
36615
36616 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
36617
36618 n The (sequential) number of the input frame, starting from 0. Only
36619 available with "eval=frame".
36620
36621 t The presentation timestamp of the input frame, expressed as a
36622 number of seconds. Only available with "eval=frame".
36623
36624 pos The position (byte offset) of the frame in the input stream, or NaN
36625 if this information is unavailable and/or meaningless (for example
36626 in case of synthetic video). Only available with "eval=frame".
36627
36628 scale2ref
36629 Scale (resize) the input video, based on a reference video.
36630
36631 See the scale filter for available options, scale2ref supports the same
36632 but uses the reference video instead of the main input as basis.
36633 scale2ref also supports the following additional constants for the w
36634 and h options:
36635
36636 main_w
36637 main_h
36638 The main input video's width and height
36639
36640 main_a
36641 The same as main_w / main_h
36642
36643 main_sar
36644 The main input video's sample aspect ratio
36645
36646 main_dar, mdar
36647 The main input video's display aspect ratio. Calculated from
36648 "(main_w / main_h) * main_sar".
36649
36650 main_hsub
36651 main_vsub
36652 The main input video's horizontal and vertical chroma subsample
36653 values. For example for the pixel format "yuv422p" hsub is 2 and
36654 vsub is 1.
36655
36656 main_n
36657 The (sequential) number of the main input frame, starting from 0.
36658 Only available with "eval=frame".
36659
36660 main_t
36661 The presentation timestamp of the main input frame, expressed as a
36662 number of seconds. Only available with "eval=frame".
36663
36664 main_pos
36665 The position (byte offset) of the frame in the main input stream,
36666 or NaN if this information is unavailable and/or meaningless (for
36667 example in case of synthetic video). Only available with
36668 "eval=frame".
36669
36670 Examples
36671
36672 • Scale a subtitle stream (b) to match the main video (a) in size
36673 before overlaying
36674
36675 'scale2ref[b][a];[a][b]overlay'
36676
36677 • Scale a logo to 1/10th the height of a video, while preserving its
36678 display aspect ratio.
36679
36680 [logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
36681
36682 Commands
36683
36684 This filter supports the following commands:
36685
36686 width, w
36687 height, h
36688 Set the output video dimension expression. The command accepts the
36689 same syntax of the corresponding option.
36690
36691 If the specified expression is not valid, it is kept at its current
36692 value.
36693
36694 scale2ref_npp
36695 Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the
36696 input video, based on a reference video.
36697
36698 See the scale_npp filter for available options, scale2ref_npp supports
36699 the same but uses the reference video instead of the main input as
36700 basis. scale2ref_npp also supports the following additional constants
36701 for the w and h options:
36702
36703 main_w
36704 main_h
36705 The main input video's width and height
36706
36707 main_a
36708 The same as main_w / main_h
36709
36710 main_sar
36711 The main input video's sample aspect ratio
36712
36713 main_dar, mdar
36714 The main input video's display aspect ratio. Calculated from
36715 "(main_w / main_h) * main_sar".
36716
36717 main_n
36718 The (sequential) number of the main input frame, starting from 0.
36719 Only available with "eval=frame".
36720
36721 main_t
36722 The presentation timestamp of the main input frame, expressed as a
36723 number of seconds. Only available with "eval=frame".
36724
36725 main_pos
36726 The position (byte offset) of the frame in the main input stream,
36727 or NaN if this information is unavailable and/or meaningless (for
36728 example in case of synthetic video). Only available with
36729 "eval=frame".
36730
36731 Examples
36732
36733 • Scale a subtitle stream (b) to match the main video (a) in size
36734 before overlaying
36735
36736 'scale2ref_npp[b][a];[a][b]overlay_cuda'
36737
36738 • Scale a logo to 1/10th the height of a video, while preserving its
36739 display aspect ratio.
36740
36741 [logo-in][video-in]scale2ref_npp=w=oh*mdar:h=ih/10[logo-out][video-out]
36742
36743 scharr
36744 Apply scharr operator to input video stream.
36745
36746 The filter accepts the following option:
36747
36748 planes
36749 Set which planes will be processed, unprocessed planes will be
36750 copied. By default value 0xf, all planes will be processed.
36751
36752 scale
36753 Set value which will be multiplied with filtered result.
36754
36755 delta
36756 Set value which will be added to filtered result.
36757
36758 Commands
36759
36760 This filter supports the all above options as commands.
36761
36762 scroll
36763 Scroll input video horizontally and/or vertically by constant speed.
36764
36765 The filter accepts the following options:
36766
36767 horizontal, h
36768 Set the horizontal scrolling speed. Default is 0. Allowed range is
36769 from -1 to 1. Negative values changes scrolling direction.
36770
36771 vertical, v
36772 Set the vertical scrolling speed. Default is 0. Allowed range is
36773 from -1 to 1. Negative values changes scrolling direction.
36774
36775 hpos
36776 Set the initial horizontal scrolling position. Default is 0.
36777 Allowed range is from 0 to 1.
36778
36779 vpos
36780 Set the initial vertical scrolling position. Default is 0. Allowed
36781 range is from 0 to 1.
36782
36783 Commands
36784
36785 This filter supports the following commands:
36786
36787 horizontal, h
36788 Set the horizontal scrolling speed.
36789
36790 vertical, v
36791 Set the vertical scrolling speed.
36792
36793 scdet
36794 Detect video scene change.
36795
36796 This filter sets frame metadata with mafd between frame, the scene
36797 score, and forward the frame to the next filter, so they can use these
36798 metadata to detect scene change or others.
36799
36800 In addition, this filter logs a message and sets frame metadata when it
36801 detects a scene change by threshold.
36802
36803 "lavfi.scd.mafd" metadata keys are set with mafd for every frame.
36804
36805 "lavfi.scd.score" metadata keys are set with scene change score for
36806 every frame to detect scene change.
36807
36808 "lavfi.scd.time" metadata keys are set with current filtered frame time
36809 which detect scene change with threshold.
36810
36811 The filter accepts the following options:
36812
36813 threshold, t
36814 Set the scene change detection threshold as a percentage of maximum
36815 change. Good values are in the "[8.0, 14.0]" range. The range for
36816 threshold is "[0., 100.]".
36817
36818 Default value is 10..
36819
36820 sc_pass, s
36821 Set the flag to pass scene change frames to the next filter.
36822 Default value is 0 You can enable it if you want to get snapshot of
36823 scene change frames only.
36824
36825 selectivecolor
36826 Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of
36827 colors (such as "reds", "yellows", "greens", "cyans", ...). The
36828 adjustment range is defined by the "purity" of the color (that is, how
36829 saturated it already is).
36830
36831 This filter is similar to the Adobe Photoshop Selective Color tool.
36832
36833 The filter accepts the following options:
36834
36835 correction_method
36836 Select color correction method.
36837
36838 Available values are:
36839
36840 absolute
36841 Specified adjustments are applied "as-is" (added/subtracted to
36842 original pixel component value).
36843
36844 relative
36845 Specified adjustments are relative to the original component
36846 value.
36847
36848 Default is "absolute".
36849
36850 reds
36851 Adjustments for red pixels (pixels where the red component is the
36852 maximum)
36853
36854 yellows
36855 Adjustments for yellow pixels (pixels where the blue component is
36856 the minimum)
36857
36858 greens
36859 Adjustments for green pixels (pixels where the green component is
36860 the maximum)
36861
36862 cyans
36863 Adjustments for cyan pixels (pixels where the red component is the
36864 minimum)
36865
36866 blues
36867 Adjustments for blue pixels (pixels where the blue component is the
36868 maximum)
36869
36870 magentas
36871 Adjustments for magenta pixels (pixels where the green component is
36872 the minimum)
36873
36874 whites
36875 Adjustments for white pixels (pixels where all components are
36876 greater than 128)
36877
36878 neutrals
36879 Adjustments for all pixels except pure black and pure white
36880
36881 blacks
36882 Adjustments for black pixels (pixels where all components are
36883 lesser than 128)
36884
36885 psfile
36886 Specify a Photoshop selective color file (".asv") to import the
36887 settings from.
36888
36889 All the adjustment settings (reds, yellows, ...) accept up to 4 space
36890 separated floating point adjustment values in the [-1,1] range,
36891 respectively to adjust the amount of cyan, magenta, yellow and black
36892 for the pixels of its range.
36893
36894 Examples
36895
36896 • Increase cyan by 50% and reduce yellow by 33% in every green areas,
36897 and increase magenta by 27% in blue areas:
36898
36899 selectivecolor=greens=.5 0 -.33 0:blues=0 .27
36900
36901 • Use a Photoshop selective color preset:
36902
36903 selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
36904
36905 separatefields
36906 The "separatefields" takes a frame-based video input and splits each
36907 frame into its components fields, producing a new half height clip with
36908 twice the frame rate and twice the frame count.
36909
36910 This filter use field-dominance information in frame to decide which of
36911 each pair of fields to place first in the output. If it gets it wrong
36912 use setfield filter before "separatefields" filter.
36913
36914 setdar, setsar
36915 The "setdar" filter sets the Display Aspect Ratio for the filter output
36916 video.
36917
36918 This is done by changing the specified Sample (aka Pixel) Aspect Ratio,
36919 according to the following equation:
36920
36921 <DAR> = <HORIZONTAL_RESOLUTION> / <VERTICAL_RESOLUTION> * <SAR>
36922
36923 Keep in mind that the "setdar" filter does not modify the pixel
36924 dimensions of the video frame. Also, the display aspect ratio set by
36925 this filter may be changed by later filters in the filterchain, e.g. in
36926 case of scaling or if another "setdar" or a "setsar" filter is applied.
36927
36928 The "setsar" filter sets the Sample (aka Pixel) Aspect Ratio for the
36929 filter output video.
36930
36931 Note that as a consequence of the application of this filter, the
36932 output display aspect ratio will change according to the equation
36933 above.
36934
36935 Keep in mind that the sample aspect ratio set by the "setsar" filter
36936 may be changed by later filters in the filterchain, e.g. if another
36937 "setsar" or a "setdar" filter is applied.
36938
36939 It accepts the following parameters:
36940
36941 r, ratio, dar ("setdar" only), sar ("setsar" only)
36942 Set the aspect ratio used by the filter.
36943
36944 The parameter can be a floating point number string, an expression,
36945 or a string of the form num:den, where num and den are the
36946 numerator and denominator of the aspect ratio. If the parameter is
36947 not specified, it is assumed the value "0". In case the form
36948 "num:den" is used, the ":" character should be escaped.
36949
36950 max Set the maximum integer value to use for expressing numerator and
36951 denominator when reducing the expressed aspect ratio to a rational.
36952 Default value is 100.
36953
36954 The parameter sar is an expression containing the following constants:
36955
36956 E, PI, PHI
36957 These are approximated values for the mathematical constants e
36958 (Euler's number), pi (Greek pi), and phi (the golden ratio).
36959
36960 w, h
36961 The input width and height.
36962
36963 a These are the same as w / h.
36964
36965 sar The input sample aspect ratio.
36966
36967 dar The input display aspect ratio. It is the same as (w / h) * sar.
36968
36969 hsub, vsub
36970 Horizontal and vertical chroma subsample values. For example, for
36971 the pixel format "yuv422p" hsub is 2 and vsub is 1.
36972
36973 Examples
36974
36975 • To change the display aspect ratio to 16:9, specify one of the
36976 following:
36977
36978 setdar=dar=1.77777
36979 setdar=dar=16/9
36980
36981 • To change the sample aspect ratio to 10:11, specify:
36982
36983 setsar=sar=10/11
36984
36985 • To set a display aspect ratio of 16:9, and specify a maximum
36986 integer value of 1000 in the aspect ratio reduction, use the
36987 command:
36988
36989 setdar=ratio=16/9:max=1000
36990
36991 setfield
36992 Force field for the output video frame.
36993
36994 The "setfield" filter marks the interlace type field for the output
36995 frames. It does not change the input frame, but only sets the
36996 corresponding property, which affects how the frame is treated by
36997 following filters (e.g. "fieldorder" or "yadif").
36998
36999 The filter accepts the following options:
37000
37001 mode
37002 Available values are:
37003
37004 auto
37005 Keep the same field property.
37006
37007 bff Mark the frame as bottom-field-first.
37008
37009 tff Mark the frame as top-field-first.
37010
37011 prog
37012 Mark the frame as progressive.
37013
37014 setparams
37015 Force frame parameter for the output video frame.
37016
37017 The "setparams" filter marks interlace and color range for the output
37018 frames. It does not change the input frame, but only sets the
37019 corresponding property, which affects how the frame is treated by
37020 filters/encoders.
37021
37022 field_mode
37023 Available values are:
37024
37025 auto
37026 Keep the same field property (default).
37027
37028 bff Mark the frame as bottom-field-first.
37029
37030 tff Mark the frame as top-field-first.
37031
37032 prog
37033 Mark the frame as progressive.
37034
37035 range
37036 Available values are:
37037
37038 auto
37039 Keep the same color range property (default).
37040
37041 unspecified, unknown
37042 Mark the frame as unspecified color range.
37043
37044 limited, tv, mpeg
37045 Mark the frame as limited range.
37046
37047 full, pc, jpeg
37048 Mark the frame as full range.
37049
37050 color_primaries
37051 Set the color primaries. Available values are:
37052
37053 auto
37054 Keep the same color primaries property (default).
37055
37056 bt709
37057 unknown
37058 bt470m
37059 bt470bg
37060 smpte170m
37061 smpte240m
37062 film
37063 bt2020
37064 smpte428
37065 smpte431
37066 smpte432
37067 jedec-p22
37068 color_trc
37069 Set the color transfer. Available values are:
37070
37071 auto
37072 Keep the same color trc property (default).
37073
37074 bt709
37075 unknown
37076 bt470m
37077 bt470bg
37078 smpte170m
37079 smpte240m
37080 linear
37081 log100
37082 log316
37083 iec61966-2-4
37084 bt1361e
37085 iec61966-2-1
37086 bt2020-10
37087 bt2020-12
37088 smpte2084
37089 smpte428
37090 arib-std-b67
37091 colorspace
37092 Set the colorspace. Available values are:
37093
37094 auto
37095 Keep the same colorspace property (default).
37096
37097 gbr
37098 bt709
37099 unknown
37100 fcc
37101 bt470bg
37102 smpte170m
37103 smpte240m
37104 ycgco
37105 bt2020nc
37106 bt2020c
37107 smpte2085
37108 chroma-derived-nc
37109 chroma-derived-c
37110 ictcp
37111
37112 sharpen_npp
37113 Use the NVIDIA Performance Primitives (libnpp) to perform image
37114 sharpening with border control.
37115
37116 The following additional options are accepted:
37117
37118 border_type
37119 Type of sampling to be used ad frame borders. One of the following:
37120
37121 replicate
37122 Replicate pixel values.
37123
37124 shear
37125 Apply shear transform to input video.
37126
37127 This filter supports the following options:
37128
37129 shx Shear factor in X-direction. Default value is 0. Allowed range is
37130 from -2 to 2.
37131
37132 shy Shear factor in Y-direction. Default value is 0. Allowed range is
37133 from -2 to 2.
37134
37135 fillcolor, c
37136 Set the color used to fill the output area not covered by the
37137 transformed video. For the general syntax of this option, check the
37138 "Color" section in the ffmpeg-utils manual. If the special value
37139 "none" is selected then no background is printed (useful for
37140 example if the background is never shown).
37141
37142 Default value is "black".
37143
37144 interp
37145 Set interpolation type. Can be "bilinear" or "nearest". Default is
37146 "bilinear".
37147
37148 Commands
37149
37150 This filter supports the all above options as commands.
37151
37152 showinfo
37153 Show a line containing various information for each input video frame.
37154 The input video is not modified.
37155
37156 This filter supports the following options:
37157
37158 checksum
37159 Calculate checksums of each plane. By default enabled.
37160
37161 The shown line contains a sequence of key/value pairs of the form
37162 key:value.
37163
37164 The following values are shown in the output:
37165
37166 n The (sequential) number of the input frame, starting from 0.
37167
37168 pts The Presentation TimeStamp of the input frame, expressed as a
37169 number of time base units. The time base unit depends on the filter
37170 input pad.
37171
37172 pts_time
37173 The Presentation TimeStamp of the input frame, expressed as a
37174 number of seconds.
37175
37176 pos The position of the frame in the input stream, or -1 if this
37177 information is unavailable and/or meaningless (for example in case
37178 of synthetic video).
37179
37180 fmt The pixel format name.
37181
37182 sar The sample aspect ratio of the input frame, expressed in the form
37183 num/den.
37184
37185 s The size of the input frame. For the syntax of this option, check
37186 the "Video size" section in the ffmpeg-utils manual.
37187
37188 i The type of interlaced mode ("P" for "progressive", "T" for top
37189 field first, "B" for bottom field first).
37190
37191 iskey
37192 This is 1 if the frame is a key frame, 0 otherwise.
37193
37194 type
37195 The picture type of the input frame ("I" for an I-frame, "P" for a
37196 P-frame, "B" for a B-frame, or "?" for an unknown type). Also
37197 refer to the documentation of the "AVPictureType" enum and of the
37198 "av_get_picture_type_char" function defined in libavutil/avutil.h.
37199
37200 checksum
37201 The Adler-32 checksum (printed in hexadecimal) of all the planes of
37202 the input frame.
37203
37204 plane_checksum
37205 The Adler-32 checksum (printed in hexadecimal) of each plane of the
37206 input frame, expressed in the form "[c0 c1 c2 c3]".
37207
37208 mean
37209 The mean value of pixels in each plane of the input frame,
37210 expressed in the form "[mean0 mean1 mean2 mean3]".
37211
37212 stdev
37213 The standard deviation of pixel values in each plane of the input
37214 frame, expressed in the form "[stdev0 stdev1 stdev2 stdev3]".
37215
37216 showpalette
37217 Displays the 256 colors palette of each frame. This filter is only
37218 relevant for pal8 pixel format frames.
37219
37220 It accepts the following option:
37221
37222 s Set the size of the box used to represent one palette color entry.
37223 Default is 30 (for a "30x30" pixel box).
37224
37225 shuffleframes
37226 Reorder and/or duplicate and/or drop video frames.
37227
37228 It accepts the following parameters:
37229
37230 mapping
37231 Set the destination indexes of input frames. This is space or '|'
37232 separated list of indexes that maps input frames to output frames.
37233 Number of indexes also sets maximal value that each index may have.
37234 '-1' index have special meaning and that is to drop frame.
37235
37236 The first frame has the index 0. The default is to keep the input
37237 unchanged.
37238
37239 Examples
37240
37241 • Swap second and third frame of every three frames of the input:
37242
37243 ffmpeg -i INPUT -vf "shuffleframes=0 2 1" OUTPUT
37244
37245 • Swap 10th and 1st frame of every ten frames of the input:
37246
37247 ffmpeg -i INPUT -vf "shuffleframes=9 1 2 3 4 5 6 7 8 0" OUTPUT
37248
37249 shufflepixels
37250 Reorder pixels in video frames.
37251
37252 This filter accepts the following options:
37253
37254 direction, d
37255 Set shuffle direction. Can be forward or inverse direction.
37256 Default direction is forward.
37257
37258 mode, m
37259 Set shuffle mode. Can be horizontal, vertical or block mode.
37260
37261 width, w
37262 height, h
37263 Set shuffle block_size. In case of horizontal shuffle mode only
37264 width part of size is used, and in case of vertical shuffle mode
37265 only height part of size is used.
37266
37267 seed, s
37268 Set random seed used with shuffling pixels. Mainly useful to set to
37269 be able to reverse filtering process to get original input. For
37270 example, to reverse forward shuffle you need to use same parameters
37271 and exact same seed and to set direction to inverse.
37272
37273 shuffleplanes
37274 Reorder and/or duplicate video planes.
37275
37276 It accepts the following parameters:
37277
37278 map0
37279 The index of the input plane to be used as the first output plane.
37280
37281 map1
37282 The index of the input plane to be used as the second output plane.
37283
37284 map2
37285 The index of the input plane to be used as the third output plane.
37286
37287 map3
37288 The index of the input plane to be used as the fourth output plane.
37289
37290 The first plane has the index 0. The default is to keep the input
37291 unchanged.
37292
37293 Examples
37294
37295 • Swap the second and third planes of the input:
37296
37297 ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
37298
37299 signalstats
37300 Evaluate various visual metrics that assist in determining issues
37301 associated with the digitization of analog video media.
37302
37303 By default the filter will log these metadata values:
37304
37305 YMIN
37306 Display the minimal Y value contained within the input frame.
37307 Expressed in range of [0-255].
37308
37309 YLOW
37310 Display the Y value at the 10% percentile within the input frame.
37311 Expressed in range of [0-255].
37312
37313 YAVG
37314 Display the average Y value within the input frame. Expressed in
37315 range of [0-255].
37316
37317 YHIGH
37318 Display the Y value at the 90% percentile within the input frame.
37319 Expressed in range of [0-255].
37320
37321 YMAX
37322 Display the maximum Y value contained within the input frame.
37323 Expressed in range of [0-255].
37324
37325 UMIN
37326 Display the minimal U value contained within the input frame.
37327 Expressed in range of [0-255].
37328
37329 ULOW
37330 Display the U value at the 10% percentile within the input frame.
37331 Expressed in range of [0-255].
37332
37333 UAVG
37334 Display the average U value within the input frame. Expressed in
37335 range of [0-255].
37336
37337 UHIGH
37338 Display the U value at the 90% percentile within the input frame.
37339 Expressed in range of [0-255].
37340
37341 UMAX
37342 Display the maximum U value contained within the input frame.
37343 Expressed in range of [0-255].
37344
37345 VMIN
37346 Display the minimal V value contained within the input frame.
37347 Expressed in range of [0-255].
37348
37349 VLOW
37350 Display the V value at the 10% percentile within the input frame.
37351 Expressed in range of [0-255].
37352
37353 VAVG
37354 Display the average V value within the input frame. Expressed in
37355 range of [0-255].
37356
37357 VHIGH
37358 Display the V value at the 90% percentile within the input frame.
37359 Expressed in range of [0-255].
37360
37361 VMAX
37362 Display the maximum V value contained within the input frame.
37363 Expressed in range of [0-255].
37364
37365 SATMIN
37366 Display the minimal saturation value contained within the input
37367 frame. Expressed in range of [0-~181.02].
37368
37369 SATLOW
37370 Display the saturation value at the 10% percentile within the input
37371 frame. Expressed in range of [0-~181.02].
37372
37373 SATAVG
37374 Display the average saturation value within the input frame.
37375 Expressed in range of [0-~181.02].
37376
37377 SATHIGH
37378 Display the saturation value at the 90% percentile within the input
37379 frame. Expressed in range of [0-~181.02].
37380
37381 SATMAX
37382 Display the maximum saturation value contained within the input
37383 frame. Expressed in range of [0-~181.02].
37384
37385 HUEMED
37386 Display the median value for hue within the input frame. Expressed
37387 in range of [0-360].
37388
37389 HUEAVG
37390 Display the average value for hue within the input frame. Expressed
37391 in range of [0-360].
37392
37393 YDIF
37394 Display the average of sample value difference between all values
37395 of the Y plane in the current frame and corresponding values of the
37396 previous input frame. Expressed in range of [0-255].
37397
37398 UDIF
37399 Display the average of sample value difference between all values
37400 of the U plane in the current frame and corresponding values of the
37401 previous input frame. Expressed in range of [0-255].
37402
37403 VDIF
37404 Display the average of sample value difference between all values
37405 of the V plane in the current frame and corresponding values of the
37406 previous input frame. Expressed in range of [0-255].
37407
37408 YBITDEPTH
37409 Display bit depth of Y plane in current frame. Expressed in range
37410 of [0-16].
37411
37412 UBITDEPTH
37413 Display bit depth of U plane in current frame. Expressed in range
37414 of [0-16].
37415
37416 VBITDEPTH
37417 Display bit depth of V plane in current frame. Expressed in range
37418 of [0-16].
37419
37420 The filter accepts the following options:
37421
37422 stat
37423 out stat specify an additional form of image analysis. out output
37424 video with the specified type of pixel highlighted.
37425
37426 Both options accept the following values:
37427
37428 tout
37429 Identify temporal outliers pixels. A temporal outlier is a
37430 pixel unlike the neighboring pixels of the same field. Examples
37431 of temporal outliers include the results of video dropouts,
37432 head clogs, or tape tracking issues.
37433
37434 vrep
37435 Identify vertical line repetition. Vertical line repetition
37436 includes similar rows of pixels within a frame. In born-digital
37437 video vertical line repetition is common, but this pattern is
37438 uncommon in video digitized from an analog source. When it
37439 occurs in video that results from the digitization of an analog
37440 source it can indicate concealment from a dropout compensator.
37441
37442 brng
37443 Identify pixels that fall outside of legal broadcast range.
37444
37445 color, c
37446 Set the highlight color for the out option. The default color is
37447 yellow.
37448
37449 Examples
37450
37451 • Output data of various video metrics:
37452
37453 ffprobe -f lavfi movie=example.mov,signalstats="stat=tout+vrep+brng" -show_frames
37454
37455 • Output specific data about the minimum and maximum values of the Y
37456 plane per frame:
37457
37458 ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
37459
37460 • Playback video while highlighting pixels that are outside of
37461 broadcast range in red.
37462
37463 ffplay example.mov -vf signalstats="out=brng:color=red"
37464
37465 • Playback video with signalstats metadata drawn over the frame.
37466
37467 ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
37468
37469 The contents of signalstat_drawtext.txt used in the command are:
37470
37471 time %{pts:hms}
37472 Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
37473 U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
37474 V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
37475 saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
37476
37477 signature
37478 Calculates the MPEG-7 Video Signature. The filter can handle more than
37479 one input. In this case the matching between the inputs can be
37480 calculated additionally. The filter always passes through the first
37481 input. The signature of each stream can be written into a file.
37482
37483 It accepts the following options:
37484
37485 detectmode
37486 Enable or disable the matching process.
37487
37488 Available values are:
37489
37490 off Disable the calculation of a matching (default).
37491
37492 full
37493 Calculate the matching for the whole video and output whether
37494 the whole video matches or only parts.
37495
37496 fast
37497 Calculate only until a matching is found or the video ends.
37498 Should be faster in some cases.
37499
37500 nb_inputs
37501 Set the number of inputs. The option value must be a non negative
37502 integer. Default value is 1.
37503
37504 filename
37505 Set the path to which the output is written. If there is more than
37506 one input, the path must be a prototype, i.e. must contain %d or
37507 %0nd (where n is a positive integer), that will be replaced with
37508 the input number. If no filename is specified, no output will be
37509 written. This is the default.
37510
37511 format
37512 Choose the output format.
37513
37514 Available values are:
37515
37516 binary
37517 Use the specified binary representation (default).
37518
37519 xml Use the specified xml representation.
37520
37521 th_d
37522 Set threshold to detect one word as similar. The option value must
37523 be an integer greater than zero. The default value is 9000.
37524
37525 th_dc
37526 Set threshold to detect all words as similar. The option value must
37527 be an integer greater than zero. The default value is 60000.
37528
37529 th_xh
37530 Set threshold to detect frames as similar. The option value must be
37531 an integer greater than zero. The default value is 116.
37532
37533 th_di
37534 Set the minimum length of a sequence in frames to recognize it as
37535 matching sequence. The option value must be a non negative integer
37536 value. The default value is 0.
37537
37538 th_it
37539 Set the minimum relation, that matching frames to all frames must
37540 have. The option value must be a double value between 0 and 1. The
37541 default value is 0.5.
37542
37543 Examples
37544
37545 • To calculate the signature of an input video and store it in
37546 signature.bin:
37547
37548 ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
37549
37550 • To detect whether two videos match and store the signatures in XML
37551 format in signature0.xml and signature1.xml:
37552
37553 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 -
37554
37555 siti
37556 Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video,
37557 as defined in ITU-T P.910: Subjective video quality assessment methods
37558 for multimedia applications. Available PDF at
37559 <https://www.itu.int/rec/T-REC-P.910-199909-S/en >.
37560
37561 It accepts the following option:
37562
37563 print_summary
37564 If set to 1, Summary statistics will be printed to the console.
37565 Default 0.
37566
37567 Examples
37568
37569 • To calculate SI/TI metrics and print summary:
37570
37571 ffmpeg -i input.mp4 -vf siti=print_summary=1 -f null -
37572
37573 smartblur
37574 Blur the input video without impacting the outlines.
37575
37576 It accepts the following options:
37577
37578 luma_radius, lr
37579 Set the luma radius. The option value must be a float number in the
37580 range [0.1,5.0] that specifies the variance of the gaussian filter
37581 used to blur the image (slower if larger). Default value is 1.0.
37582
37583 luma_strength, ls
37584 Set the luma strength. The option value must be a float number in
37585 the range [-1.0,1.0] that configures the blurring. A value included
37586 in [0.0,1.0] will blur the image whereas a value included in
37587 [-1.0,0.0] will sharpen the image. Default value is 1.0.
37588
37589 luma_threshold, lt
37590 Set the luma threshold used as a coefficient to determine whether a
37591 pixel should be blurred or not. The option value must be an integer
37592 in the range [-30,30]. A value of 0 will filter all the image, a
37593 value included in [0,30] will filter flat areas and a value
37594 included in [-30,0] will filter edges. Default value is 0.
37595
37596 chroma_radius, cr
37597 Set the chroma radius. The option value must be a float number in
37598 the range [0.1,5.0] that specifies the variance of the gaussian
37599 filter used to blur the image (slower if larger). Default value is
37600 luma_radius.
37601
37602 chroma_strength, cs
37603 Set the chroma strength. The option value must be a float number in
37604 the range [-1.0,1.0] that configures the blurring. A value included
37605 in [0.0,1.0] will blur the image whereas a value included in
37606 [-1.0,0.0] will sharpen the image. Default value is luma_strength.
37607
37608 chroma_threshold, ct
37609 Set the chroma threshold used as a coefficient to determine whether
37610 a pixel should be blurred or not. The option value must be an
37611 integer in the range [-30,30]. A value of 0 will filter all the
37612 image, a value included in [0,30] will filter flat areas and a
37613 value included in [-30,0] will filter edges. Default value is
37614 luma_threshold.
37615
37616 If a chroma option is not explicitly set, the corresponding luma value
37617 is set.
37618
37619 sobel
37620 Apply sobel operator to input video stream.
37621
37622 The filter accepts the following option:
37623
37624 planes
37625 Set which planes will be processed, unprocessed planes will be
37626 copied. By default value 0xf, all planes will be processed.
37627
37628 scale
37629 Set value which will be multiplied with filtered result.
37630
37631 delta
37632 Set value which will be added to filtered result.
37633
37634 Commands
37635
37636 This filter supports the all above options as commands.
37637
37638 spp
37639 Apply a simple postprocessing filter that compresses and decompresses
37640 the image at several (or - in the case of quality level 6 - all) shifts
37641 and average the results.
37642
37643 The filter accepts the following options:
37644
37645 quality
37646 Set quality. This option defines the number of levels for
37647 averaging. It accepts an integer in the range 0-6. If set to 0, the
37648 filter will have no effect. A value of 6 means the higher quality.
37649 For each increment of that value the speed drops by a factor of
37650 approximately 2. Default value is 3.
37651
37652 qp Force a constant quantization parameter. If not set, the filter
37653 will use the QP from the video stream (if available).
37654
37655 mode
37656 Set thresholding mode. Available modes are:
37657
37658 hard
37659 Set hard thresholding (default).
37660
37661 soft
37662 Set soft thresholding (better de-ringing effect, but likely
37663 blurrier).
37664
37665 use_bframe_qp
37666 Enable the use of the QP from the B-Frames if set to 1. Using this
37667 option may cause flicker since the B-Frames have often larger QP.
37668 Default is 0 (not enabled).
37669
37670 Commands
37671
37672 This filter supports the following commands:
37673
37674 quality, level
37675 Set quality level. The value "max" can be used to set the maximum
37676 level, currently 6.
37677
37678 sr
37679 Scale the input by applying one of the super-resolution methods based
37680 on convolutional neural networks. Supported models:
37681
37682 • Super-Resolution Convolutional Neural Network model (SRCNN). See
37683 <https://arxiv.org/abs/1501.00092>.
37684
37685 • Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
37686 See <https://arxiv.org/abs/1609.05158>.
37687
37688 Training scripts as well as scripts for model file (.pb) saving can be
37689 found at <https://github.com/XueweiMeng/sr/tree/sr_dnn_native>.
37690 Original repository is at
37691 <https://github.com/HighVoltageRocknRoll/sr.git>.
37692
37693 Native model files (.model) can be generated from TensorFlow model
37694 files (.pb) by using tools/python/convert.py
37695
37696 The filter accepts the following options:
37697
37698 dnn_backend
37699 Specify which DNN backend to use for model loading and execution.
37700 This option accepts the following values:
37701
37702 native
37703 Native implementation of DNN loading and execution.
37704
37705 tensorflow
37706 TensorFlow backend. To enable this backend you need to install
37707 the TensorFlow for C library (see
37708 <https://www.tensorflow.org/install/lang_c>) and configure
37709 FFmpeg with "--enable-libtensorflow"
37710
37711 Default value is native.
37712
37713 model
37714 Set path to model file specifying network architecture and its
37715 parameters. Note that different backends use different file
37716 formats. TensorFlow backend can load files for both formats, while
37717 native backend can load files for only its format.
37718
37719 scale_factor
37720 Set scale factor for SRCNN model. Allowed values are 2, 3 and 4.
37721 Default value is 2. Scale factor is necessary for SRCNN model,
37722 because it accepts input upscaled using bicubic upscaling with
37723 proper scale factor.
37724
37725 To get full functionality (such as async execution), please use the
37726 dnn_processing filter.
37727
37728 ssim
37729 Obtain the SSIM (Structural SImilarity Metric) between two input
37730 videos.
37731
37732 This filter takes in input two input videos, the first input is
37733 considered the "main" source and is passed unchanged to the output. The
37734 second input is used as a "reference" video for computing the SSIM.
37735
37736 Both video inputs must have the same resolution and pixel format for
37737 this filter to work correctly. Also it assumes that both inputs have
37738 the same number of frames, which are compared one by one.
37739
37740 The filter stores the calculated SSIM of each frame.
37741
37742 The description of the accepted parameters follows.
37743
37744 stats_file, f
37745 If specified the filter will use the named file to save the SSIM of
37746 each individual frame. When filename equals "-" the data is sent to
37747 standard output.
37748
37749 The file printed if stats_file is selected, contains a sequence of
37750 key/value pairs of the form key:value for each compared couple of
37751 frames.
37752
37753 A description of each shown parameter follows:
37754
37755 n sequential number of the input frame, starting from 1
37756
37757 Y, U, V, R, G, B
37758 SSIM of the compared frames for the component specified by the
37759 suffix.
37760
37761 All SSIM of the compared frames for the whole frame.
37762
37763 dB Same as above but in dB representation.
37764
37765 This filter also supports the framesync options.
37766
37767 Examples
37768
37769 • For example:
37770
37771 movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
37772 [main][ref] ssim="stats_file=stats.log" [out]
37773
37774 On this example the input file being processed is compared with the
37775 reference file ref_movie.mpg. The SSIM of each individual frame is
37776 stored in stats.log.
37777
37778 • Another example with both psnr and ssim at same time:
37779
37780 ffmpeg -i main.mpg -i ref.mpg -lavfi "ssim;[0:v][1:v]psnr" -f null -
37781
37782 • Another example with different containers:
37783
37784 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 -
37785
37786 stereo3d
37787 Convert between different stereoscopic image formats.
37788
37789 The filters accept the following options:
37790
37791 in Set stereoscopic image format of input.
37792
37793 Available values for input image formats are:
37794
37795 sbsl
37796 side by side parallel (left eye left, right eye right)
37797
37798 sbsr
37799 side by side crosseye (right eye left, left eye right)
37800
37801 sbs2l
37802 side by side parallel with half width resolution (left eye
37803 left, right eye right)
37804
37805 sbs2r
37806 side by side crosseye with half width resolution (right eye
37807 left, left eye right)
37808
37809 abl
37810 tbl above-below (left eye above, right eye below)
37811
37812 abr
37813 tbr above-below (right eye above, left eye below)
37814
37815 ab2l
37816 tb2l
37817 above-below with half height resolution (left eye above, right
37818 eye below)
37819
37820 ab2r
37821 tb2r
37822 above-below with half height resolution (right eye above, left
37823 eye below)
37824
37825 al alternating frames (left eye first, right eye second)
37826
37827 ar alternating frames (right eye first, left eye second)
37828
37829 irl interleaved rows (left eye has top row, right eye starts on
37830 next row)
37831
37832 irr interleaved rows (right eye has top row, left eye starts on
37833 next row)
37834
37835 icl interleaved columns, left eye first
37836
37837 icr interleaved columns, right eye first
37838
37839 Default value is sbsl.
37840
37841 out Set stereoscopic image format of output.
37842
37843 sbsl
37844 side by side parallel (left eye left, right eye right)
37845
37846 sbsr
37847 side by side crosseye (right eye left, left eye right)
37848
37849 sbs2l
37850 side by side parallel with half width resolution (left eye
37851 left, right eye right)
37852
37853 sbs2r
37854 side by side crosseye with half width resolution (right eye
37855 left, left eye right)
37856
37857 abl
37858 tbl above-below (left eye above, right eye below)
37859
37860 abr
37861 tbr above-below (right eye above, left eye below)
37862
37863 ab2l
37864 tb2l
37865 above-below with half height resolution (left eye above, right
37866 eye below)
37867
37868 ab2r
37869 tb2r
37870 above-below with half height resolution (right eye above, left
37871 eye below)
37872
37873 al alternating frames (left eye first, right eye second)
37874
37875 ar alternating frames (right eye first, left eye second)
37876
37877 irl interleaved rows (left eye has top row, right eye starts on
37878 next row)
37879
37880 irr interleaved rows (right eye has top row, left eye starts on
37881 next row)
37882
37883 arbg
37884 anaglyph red/blue gray (red filter on left eye, blue filter on
37885 right eye)
37886
37887 argg
37888 anaglyph red/green gray (red filter on left eye, green filter
37889 on right eye)
37890
37891 arcg
37892 anaglyph red/cyan gray (red filter on left eye, cyan filter on
37893 right eye)
37894
37895 arch
37896 anaglyph red/cyan half colored (red filter on left eye, cyan
37897 filter on right eye)
37898
37899 arcc
37900 anaglyph red/cyan color (red filter on left eye, cyan filter on
37901 right eye)
37902
37903 arcd
37904 anaglyph red/cyan color optimized with the least squares
37905 projection of dubois (red filter on left eye, cyan filter on
37906 right eye)
37907
37908 agmg
37909 anaglyph green/magenta gray (green filter on left eye, magenta
37910 filter on right eye)
37911
37912 agmh
37913 anaglyph green/magenta half colored (green filter on left eye,
37914 magenta filter on right eye)
37915
37916 agmc
37917 anaglyph green/magenta colored (green filter on left eye,
37918 magenta filter on right eye)
37919
37920 agmd
37921 anaglyph green/magenta color optimized with the least squares
37922 projection of dubois (green filter on left eye, magenta filter
37923 on right eye)
37924
37925 aybg
37926 anaglyph yellow/blue gray (yellow filter on left eye, blue
37927 filter on right eye)
37928
37929 aybh
37930 anaglyph yellow/blue half colored (yellow filter on left eye,
37931 blue filter on right eye)
37932
37933 aybc
37934 anaglyph yellow/blue colored (yellow filter on left eye, blue
37935 filter on right eye)
37936
37937 aybd
37938 anaglyph yellow/blue color optimized with the least squares
37939 projection of dubois (yellow filter on left eye, blue filter on
37940 right eye)
37941
37942 ml mono output (left eye only)
37943
37944 mr mono output (right eye only)
37945
37946 chl checkerboard, left eye first
37947
37948 chr checkerboard, right eye first
37949
37950 icl interleaved columns, left eye first
37951
37952 icr interleaved columns, right eye first
37953
37954 hdmi
37955 HDMI frame pack
37956
37957 Default value is arcd.
37958
37959 Examples
37960
37961 • Convert input video from side by side parallel to anaglyph
37962 yellow/blue dubois:
37963
37964 stereo3d=sbsl:aybd
37965
37966 • Convert input video from above below (left eye above, right eye
37967 below) to side by side crosseye.
37968
37969 stereo3d=abl:sbsr
37970
37971 streamselect, astreamselect
37972 Select video or audio streams.
37973
37974 The filter accepts the following options:
37975
37976 inputs
37977 Set number of inputs. Default is 2.
37978
37979 map Set input indexes to remap to outputs.
37980
37981 Commands
37982
37983 The "streamselect" and "astreamselect" filter supports the following
37984 commands:
37985
37986 map Set input indexes to remap to outputs.
37987
37988 Examples
37989
37990 • Select first 5 seconds 1st stream and rest of time 2nd stream:
37991
37992 sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
37993
37994 • Same as above, but for audio:
37995
37996 asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
37997
37998 subtitles
37999 Draw subtitles on top of input video using the libass library.
38000
38001 To enable compilation of this filter you need to configure FFmpeg with
38002 "--enable-libass". This filter also requires a build with libavcodec
38003 and libavformat to convert the passed subtitles file to ASS (Advanced
38004 Substation Alpha) subtitles format.
38005
38006 The filter accepts the following options:
38007
38008 filename, f
38009 Set the filename of the subtitle file to read. It must be
38010 specified.
38011
38012 original_size
38013 Specify the size of the original video, the video for which the ASS
38014 file was composed. For the syntax of this option, check the "Video
38015 size" section in the ffmpeg-utils manual. Due to a misdesign in
38016 ASS aspect ratio arithmetic, this is necessary to correctly scale
38017 the fonts if the aspect ratio has been changed.
38018
38019 fontsdir
38020 Set a directory path containing fonts that can be used by the
38021 filter. These fonts will be used in addition to whatever the font
38022 provider uses.
38023
38024 alpha
38025 Process alpha channel, by default alpha channel is untouched.
38026
38027 charenc
38028 Set subtitles input character encoding. "subtitles" filter only.
38029 Only useful if not UTF-8.
38030
38031 stream_index, si
38032 Set subtitles stream index. "subtitles" filter only.
38033
38034 force_style
38035 Override default style or script info parameters of the subtitles.
38036 It accepts a string containing ASS style format "KEY=VALUE" couples
38037 separated by ",".
38038
38039 If the first key is not specified, it is assumed that the first value
38040 specifies the filename.
38041
38042 For example, to render the file sub.srt on top of the input video, use
38043 the command:
38044
38045 subtitles=sub.srt
38046
38047 which is equivalent to:
38048
38049 subtitles=filename=sub.srt
38050
38051 To render the default subtitles stream from file video.mkv, use:
38052
38053 subtitles=video.mkv
38054
38055 To render the second subtitles stream from that file, use:
38056
38057 subtitles=video.mkv:si=1
38058
38059 To make the subtitles stream from sub.srt appear in 80% transparent
38060 blue "DejaVu Serif", use:
38061
38062 subtitles=sub.srt:force_style='Fontname=DejaVu Serif,PrimaryColour=&HCCFF0000'
38063
38064 super2xsai
38065 Scale the input by 2x and smooth using the Super2xSaI (Scale and
38066 Interpolate) pixel art scaling algorithm.
38067
38068 Useful for enlarging pixel art images without reducing sharpness.
38069
38070 swaprect
38071 Swap two rectangular objects in video.
38072
38073 This filter accepts the following options:
38074
38075 w Set object width.
38076
38077 h Set object height.
38078
38079 x1 Set 1st rect x coordinate.
38080
38081 y1 Set 1st rect y coordinate.
38082
38083 x2 Set 2nd rect x coordinate.
38084
38085 y2 Set 2nd rect y coordinate.
38086
38087 All expressions are evaluated once for each frame.
38088
38089 The all options are expressions containing the following constants:
38090
38091 w
38092 h The input width and height.
38093
38094 a same as w / h
38095
38096 sar input sample aspect ratio
38097
38098 dar input display aspect ratio, it is the same as (w / h) * sar
38099
38100 n The number of the input frame, starting from 0.
38101
38102 t The timestamp expressed in seconds. It's NAN if the input timestamp
38103 is unknown.
38104
38105 pos the position in the file of the input frame, NAN if unknown
38106
38107 Commands
38108
38109 This filter supports the all above options as commands.
38110
38111 swapuv
38112 Swap U & V plane.
38113
38114 tblend
38115 Blend successive video frames.
38116
38117 See blend
38118
38119 telecine
38120 Apply telecine process to the video.
38121
38122 This filter accepts the following options:
38123
38124 first_field
38125 top, t
38126 top field first
38127
38128 bottom, b
38129 bottom field first The default value is "top".
38130
38131 pattern
38132 A string of numbers representing the pulldown pattern you wish to
38133 apply. The default value is 23.
38134
38135 Some typical patterns:
38136
38137 NTSC output (30i):
38138 27.5p: 32222
38139 24p: 23 (classic)
38140 24p: 2332 (preferred)
38141 20p: 33
38142 18p: 334
38143 16p: 3444
38144
38145 PAL output (25i):
38146 27.5p: 12222
38147 24p: 222222222223 ("Euro pulldown")
38148 16.67p: 33
38149 16p: 33333334
38150
38151 thistogram
38152 Compute and draw a color distribution histogram for the input video
38153 across time.
38154
38155 Unlike histogram video filter which only shows histogram of single
38156 input frame at certain time, this filter shows also past histograms of
38157 number of frames defined by "width" option.
38158
38159 The computed histogram is a representation of the color component
38160 distribution in an image.
38161
38162 The filter accepts the following options:
38163
38164 width, w
38165 Set width of single color component output. Default value is 0.
38166 Value of 0 means width will be picked from input video. This also
38167 set number of passed histograms to keep. Allowed range is [0,
38168 8192].
38169
38170 display_mode, d
38171 Set display mode. It accepts the following values:
38172
38173 stack
38174 Per color component graphs are placed below each other.
38175
38176 parade
38177 Per color component graphs are placed side by side.
38178
38179 overlay
38180 Presents information identical to that in the "parade", except
38181 that the graphs representing color components are superimposed
38182 directly over one another.
38183
38184 Default is "stack".
38185
38186 levels_mode, m
38187 Set mode. Can be either "linear", or "logarithmic". Default is
38188 "linear".
38189
38190 components, c
38191 Set what color components to display. Default is 7.
38192
38193 bgopacity, b
38194 Set background opacity. Default is 0.9.
38195
38196 envelope, e
38197 Show envelope. Default is disabled.
38198
38199 ecolor, ec
38200 Set envelope color. Default is "gold".
38201
38202 slide
38203 Set slide mode.
38204
38205 Available values for slide is:
38206
38207 frame
38208 Draw new frame when right border is reached.
38209
38210 replace
38211 Replace old columns with new ones.
38212
38213 scroll
38214 Scroll from right to left.
38215
38216 rscroll
38217 Scroll from left to right.
38218
38219 picture
38220 Draw single picture.
38221
38222 Default is "replace".
38223
38224 threshold
38225 Apply threshold effect to video stream.
38226
38227 This filter needs four video streams to perform thresholding. First
38228 stream is stream we are filtering. Second stream is holding threshold
38229 values, third stream is holding min values, and last, fourth stream is
38230 holding max values.
38231
38232 The filter accepts the following option:
38233
38234 planes
38235 Set which planes will be processed, unprocessed planes will be
38236 copied. By default value 0xf, all planes will be processed.
38237
38238 For example if first stream pixel's component value is less then
38239 threshold value of pixel component from 2nd threshold stream, third
38240 stream value will picked, otherwise fourth stream pixel component value
38241 will be picked.
38242
38243 Using color source filter one can perform various types of
38244 thresholding:
38245
38246 Commands
38247
38248 This filter supports the all options as commands.
38249
38250 Examples
38251
38252 • Binary threshold, using gray color as threshold:
38253
38254 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi
38255
38256 • Inverted binary threshold, using gray color as threshold:
38257
38258 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi
38259
38260 • Truncate binary threshold, using gray color as threshold:
38261
38262 ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
38263
38264 • Threshold to zero, using gray color as threshold:
38265
38266 ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
38267
38268 • Inverted threshold to zero, using gray color as threshold:
38269
38270 ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
38271
38272 thumbnail
38273 Select the most representative frame in a given sequence of consecutive
38274 frames.
38275
38276 The filter accepts the following options:
38277
38278 n Set the frames batch size to analyze; in a set of n frames, the
38279 filter will pick one of them, and then handle the next batch of n
38280 frames until the end. Default is 100.
38281
38282 log Set the log level to display picked frame stats. Default is
38283 "info".
38284
38285 Since the filter keeps track of the whole frames sequence, a bigger n
38286 value will result in a higher memory usage, so a high value is not
38287 recommended.
38288
38289 Examples
38290
38291 • Extract one picture each 50 frames:
38292
38293 thumbnail=50
38294
38295 • Complete example of a thumbnail creation with ffmpeg:
38296
38297 ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
38298
38299 tile
38300 Tile several successive frames together.
38301
38302 The untile filter can do the reverse.
38303
38304 The filter accepts the following options:
38305
38306 layout
38307 Set the grid size in the form "COLUMNSxROWS". Range is upto
38308 UINT_MAX cells. Default is "6x5".
38309
38310 nb_frames
38311 Set the maximum number of frames to render in the given area. It
38312 must be less than or equal to wxh. The default value is 0, meaning
38313 all the area will be used.
38314
38315 margin
38316 Set the outer border margin in pixels. Range is 0 to 1024. Default
38317 is 0.
38318
38319 padding
38320 Set the inner border thickness (i.e. the number of pixels between
38321 frames). For more advanced padding options (such as having
38322 different values for the edges), refer to the pad video filter.
38323 Range is 0 to 1024. Default is 0.
38324
38325 color
38326 Specify the color of the unused area. For the syntax of this
38327 option, check the "Color" section in the ffmpeg-utils manual. The
38328 default value of color is "black".
38329
38330 overlap
38331 Set the number of frames to overlap when tiling several successive
38332 frames together. The value must be between 0 and nb_frames - 1.
38333 Default is 0.
38334
38335 init_padding
38336 Set the number of frames to initially be empty before displaying
38337 first output frame. This controls how soon will one get first
38338 output frame. The value must be between 0 and nb_frames - 1.
38339 Default is 0.
38340
38341 Examples
38342
38343 • Produce 8x8 PNG tiles of all keyframes (-skip_frame nokey) in a
38344 movie:
38345
38346 ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
38347
38348 The -vsync 0 is necessary to prevent ffmpeg from duplicating each
38349 output frame to accommodate the originally detected frame rate.
38350
38351 • Display 5 pictures in an area of "3x2" frames, with 7 pixels
38352 between them, and 2 pixels of initial margin, using mixed flat and
38353 named options:
38354
38355 tile=3x2:nb_frames=5:padding=7:margin=2
38356
38357 tinterlace
38358 Perform various types of temporal field interlacing.
38359
38360 Frames are counted starting from 1, so the first input frame is
38361 considered odd.
38362
38363 The filter accepts the following options:
38364
38365 mode
38366 Specify the mode of the interlacing. This option can also be
38367 specified as a value alone. See below for a list of values for this
38368 option.
38369
38370 Available values are:
38371
38372 merge, 0
38373 Move odd frames into the upper field, even into the lower
38374 field, generating a double height frame at half frame rate.
38375
38376 ------> time
38377 Input:
38378 Frame 1 Frame 2 Frame 3 Frame 4
38379
38380 11111 22222 33333 44444
38381 11111 22222 33333 44444
38382 11111 22222 33333 44444
38383 11111 22222 33333 44444
38384
38385 Output:
38386 11111 33333
38387 22222 44444
38388 11111 33333
38389 22222 44444
38390 11111 33333
38391 22222 44444
38392 11111 33333
38393 22222 44444
38394
38395 drop_even, 1
38396 Only output odd frames, even frames are dropped, generating a
38397 frame with unchanged height at half frame rate.
38398
38399 ------> time
38400 Input:
38401 Frame 1 Frame 2 Frame 3 Frame 4
38402
38403 11111 22222 33333 44444
38404 11111 22222 33333 44444
38405 11111 22222 33333 44444
38406 11111 22222 33333 44444
38407
38408 Output:
38409 11111 33333
38410 11111 33333
38411 11111 33333
38412 11111 33333
38413
38414 drop_odd, 2
38415 Only output even frames, odd frames are dropped, generating a
38416 frame with unchanged height at half frame rate.
38417
38418 ------> time
38419 Input:
38420 Frame 1 Frame 2 Frame 3 Frame 4
38421
38422 11111 22222 33333 44444
38423 11111 22222 33333 44444
38424 11111 22222 33333 44444
38425 11111 22222 33333 44444
38426
38427 Output:
38428 22222 44444
38429 22222 44444
38430 22222 44444
38431 22222 44444
38432
38433 pad, 3
38434 Expand each frame to full height, but pad alternate lines with
38435 black, generating a frame with double height at the same input
38436 frame rate.
38437
38438 ------> time
38439 Input:
38440 Frame 1 Frame 2 Frame 3 Frame 4
38441
38442 11111 22222 33333 44444
38443 11111 22222 33333 44444
38444 11111 22222 33333 44444
38445 11111 22222 33333 44444
38446
38447 Output:
38448 11111 ..... 33333 .....
38449 ..... 22222 ..... 44444
38450 11111 ..... 33333 .....
38451 ..... 22222 ..... 44444
38452 11111 ..... 33333 .....
38453 ..... 22222 ..... 44444
38454 11111 ..... 33333 .....
38455 ..... 22222 ..... 44444
38456
38457 interleave_top, 4
38458 Interleave the upper field from odd frames with the lower field
38459 from even frames, generating a frame with unchanged height at
38460 half frame rate.
38461
38462 ------> time
38463 Input:
38464 Frame 1 Frame 2 Frame 3 Frame 4
38465
38466 11111<- 22222 33333<- 44444
38467 11111 22222<- 33333 44444<-
38468 11111<- 22222 33333<- 44444
38469 11111 22222<- 33333 44444<-
38470
38471 Output:
38472 11111 33333
38473 22222 44444
38474 11111 33333
38475 22222 44444
38476
38477 interleave_bottom, 5
38478 Interleave the lower field from odd frames with the upper field
38479 from even frames, generating a frame with unchanged height at
38480 half frame rate.
38481
38482 ------> time
38483 Input:
38484 Frame 1 Frame 2 Frame 3 Frame 4
38485
38486 11111 22222<- 33333 44444<-
38487 11111<- 22222 33333<- 44444
38488 11111 22222<- 33333 44444<-
38489 11111<- 22222 33333<- 44444
38490
38491 Output:
38492 22222 44444
38493 11111 33333
38494 22222 44444
38495 11111 33333
38496
38497 interlacex2, 6
38498 Double frame rate with unchanged height. Frames are inserted
38499 each containing the second temporal field from the previous
38500 input frame and the first temporal field from the next input
38501 frame. This mode relies on the top_field_first flag. Useful for
38502 interlaced video displays with no field synchronisation.
38503
38504 ------> time
38505 Input:
38506 Frame 1 Frame 2 Frame 3 Frame 4
38507
38508 11111 22222 33333 44444
38509 11111 22222 33333 44444
38510 11111 22222 33333 44444
38511 11111 22222 33333 44444
38512
38513 Output:
38514 11111 22222 22222 33333 33333 44444 44444
38515 11111 11111 22222 22222 33333 33333 44444
38516 11111 22222 22222 33333 33333 44444 44444
38517 11111 11111 22222 22222 33333 33333 44444
38518
38519 mergex2, 7
38520 Move odd frames into the upper field, even into the lower
38521 field, generating a double height frame at same frame rate.
38522
38523 ------> time
38524 Input:
38525 Frame 1 Frame 2 Frame 3 Frame 4
38526
38527 11111 22222 33333 44444
38528 11111 22222 33333 44444
38529 11111 22222 33333 44444
38530 11111 22222 33333 44444
38531
38532 Output:
38533 11111 33333 33333 55555
38534 22222 22222 44444 44444
38535 11111 33333 33333 55555
38536 22222 22222 44444 44444
38537 11111 33333 33333 55555
38538 22222 22222 44444 44444
38539 11111 33333 33333 55555
38540 22222 22222 44444 44444
38541
38542 Numeric values are deprecated but are accepted for backward
38543 compatibility reasons.
38544
38545 Default mode is "merge".
38546
38547 flags
38548 Specify flags influencing the filter process.
38549
38550 Available value for flags is:
38551
38552 low_pass_filter, vlpf
38553 Enable linear vertical low-pass filtering in the filter.
38554 Vertical low-pass filtering is required when creating an
38555 interlaced destination from a progressive source which contains
38556 high-frequency vertical detail. Filtering will reduce interlace
38557 'twitter' and Moire patterning.
38558
38559 complex_filter, cvlpf
38560 Enable complex vertical low-pass filtering. This will slightly
38561 less reduce interlace 'twitter' and Moire patterning but better
38562 retain detail and subjective sharpness impression.
38563
38564 bypass_il
38565 Bypass already interlaced frames, only adjust the frame rate.
38566
38567 Vertical low-pass filtering and bypassing already interlaced frames
38568 can only be enabled for mode interleave_top and interleave_bottom.
38569
38570 tmedian
38571 Pick median pixels from several successive input video frames.
38572
38573 The filter accepts the following options:
38574
38575 radius
38576 Set radius of median filter. Default is 1. Allowed range is from 1
38577 to 127.
38578
38579 planes
38580 Set which planes to filter. Default value is 15, by which all
38581 planes are processed.
38582
38583 percentile
38584 Set median percentile. Default value is 0.5. Default value of 0.5
38585 will pick always median values, while 0 will pick minimum values,
38586 and 1 maximum values.
38587
38588 Commands
38589
38590 This filter supports all above options as commands, excluding option
38591 "radius".
38592
38593 tmidequalizer
38594 Apply Temporal Midway Video Equalization effect.
38595
38596 Midway Video Equalization adjusts a sequence of video frames to have
38597 the same histograms, while maintaining their dynamics as much as
38598 possible. It's useful for e.g. matching exposures from a video frames
38599 sequence.
38600
38601 This filter accepts the following option:
38602
38603 radius
38604 Set filtering radius. Default is 5. Allowed range is from 1 to 127.
38605
38606 sigma
38607 Set filtering sigma. Default is 0.5. This controls strength of
38608 filtering. Setting this option to 0 effectively does nothing.
38609
38610 planes
38611 Set which planes to process. Default is 15, which is all available
38612 planes.
38613
38614 tmix
38615 Mix successive video frames.
38616
38617 A description of the accepted options follows.
38618
38619 frames
38620 The number of successive frames to mix. If unspecified, it defaults
38621 to 3.
38622
38623 weights
38624 Specify weight of each input video frame. Each weight is separated
38625 by space. If number of weights is smaller than number of frames
38626 last specified weight will be used for all remaining unset weights.
38627
38628 scale
38629 Specify scale, if it is set it will be multiplied with sum of each
38630 weight multiplied with pixel values to give final destination pixel
38631 value. By default scale is auto scaled to sum of weights.
38632
38633 planes
38634 Set which planes to filter. Default is all. Allowed range is from 0
38635 to 15.
38636
38637 Examples
38638
38639 • Average 7 successive frames:
38640
38641 tmix=frames=7:weights="1 1 1 1 1 1 1"
38642
38643 • Apply simple temporal convolution:
38644
38645 tmix=frames=3:weights="-1 3 -1"
38646
38647 • Similar as above but only showing temporal differences:
38648
38649 tmix=frames=3:weights="-1 2 -1":scale=1
38650
38651 Commands
38652
38653 This filter supports the following commands:
38654
38655 weights
38656 scale
38657 planes
38658 Syntax is same as option with same name.
38659
38660 tonemap
38661 Tone map colors from different dynamic ranges.
38662
38663 This filter expects data in single precision floating point, as it
38664 needs to operate on (and can output) out-of-range values. Another
38665 filter, such as zscale, is needed to convert the resulting frame to a
38666 usable format.
38667
38668 The tonemapping algorithms implemented only work on linear light, so
38669 input data should be linearized beforehand (and possibly correctly
38670 tagged).
38671
38672 ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
38673
38674 Options
38675
38676 The filter accepts the following options.
38677
38678 tonemap
38679 Set the tone map algorithm to use.
38680
38681 Possible values are:
38682
38683 none
38684 Do not apply any tone map, only desaturate overbright pixels.
38685
38686 clip
38687 Hard-clip any out-of-range values. Use it for perfect color
38688 accuracy for in-range values, while distorting out-of-range
38689 values.
38690
38691 linear
38692 Stretch the entire reference gamut to a linear multiple of the
38693 display.
38694
38695 gamma
38696 Fit a logarithmic transfer between the tone curves.
38697
38698 reinhard
38699 Preserve overall image brightness with a simple curve, using
38700 nonlinear contrast, which results in flattening details and
38701 degrading color accuracy.
38702
38703 hable
38704 Preserve both dark and bright details better than reinhard, at
38705 the cost of slightly darkening everything. Use it when detail
38706 preservation is more important than color and brightness
38707 accuracy.
38708
38709 mobius
38710 Smoothly map out-of-range values, while retaining contrast and
38711 colors for in-range material as much as possible. Use it when
38712 color accuracy is more important than detail preservation.
38713
38714 Default is none.
38715
38716 param
38717 Tune the tone mapping algorithm.
38718
38719 This affects the following algorithms:
38720
38721 none
38722 Ignored.
38723
38724 linear
38725 Specifies the scale factor to use while stretching. Default to
38726 1.0.
38727
38728 gamma
38729 Specifies the exponent of the function. Default to 1.8.
38730
38731 clip
38732 Specify an extra linear coefficient to multiply into the signal
38733 before clipping. Default to 1.0.
38734
38735 reinhard
38736 Specify the local contrast coefficient at the display peak.
38737 Default to 0.5, which means that in-gamut values will be about
38738 half as bright as when clipping.
38739
38740 hable
38741 Ignored.
38742
38743 mobius
38744 Specify the transition point from linear to mobius transform.
38745 Every value below this point is guaranteed to be mapped 1:1.
38746 The higher the value, the more accurate the result will be, at
38747 the cost of losing bright details. Default to 0.3, which due
38748 to the steep initial slope still preserves in-range colors
38749 fairly accurately.
38750
38751 desat
38752 Apply desaturation for highlights that exceed this level of
38753 brightness. The higher the parameter, the more color information
38754 will be preserved. This setting helps prevent unnaturally blown-out
38755 colors for super-highlights, by (smoothly) turning into white
38756 instead. This makes images feel more natural, at the cost of
38757 reducing information about out-of-range colors.
38758
38759 The default of 2.0 is somewhat conservative and will mostly just
38760 apply to skies or directly sunlit surfaces. A setting of 0.0
38761 disables this option.
38762
38763 This option works only if the input frame has a supported color
38764 tag.
38765
38766 peak
38767 Override signal/nominal/reference peak with this value. Useful when
38768 the embedded peak information in display metadata is not reliable
38769 or when tone mapping from a lower range to a higher range.
38770
38771 tpad
38772 Temporarily pad video frames.
38773
38774 The filter accepts the following options:
38775
38776 start
38777 Specify number of delay frames before input video stream. Default
38778 is 0.
38779
38780 stop
38781 Specify number of padding frames after input video stream. Set to
38782 -1 to pad indefinitely. Default is 0.
38783
38784 start_mode
38785 Set kind of frames added to beginning of stream. Can be either add
38786 or clone. With add frames of solid-color are added. With clone
38787 frames are clones of first frame. Default is add.
38788
38789 stop_mode
38790 Set kind of frames added to end of stream. Can be either add or
38791 clone. With add frames of solid-color are added. With clone
38792 frames are clones of last frame. Default is add.
38793
38794 start_duration, stop_duration
38795 Specify the duration of the start/stop delay. See the Time duration
38796 section in the ffmpeg-utils(1) manual for the accepted syntax.
38797 These options override start and stop. Default is 0.
38798
38799 color
38800 Specify the color of the padded area. For the syntax of this
38801 option, check the "Color" section in the ffmpeg-utils manual.
38802
38803 The default value of color is "black".
38804
38805 transpose
38806 Transpose rows with columns in the input video and optionally flip it.
38807
38808 It accepts the following parameters:
38809
38810 dir Specify the transposition direction.
38811
38812 Can assume the following values:
38813
38814 0, 4, cclock_flip
38815 Rotate by 90 degrees counterclockwise and vertically flip
38816 (default), that is:
38817
38818 L.R L.l
38819 . . -> . .
38820 l.r R.r
38821
38822 1, 5, clock
38823 Rotate by 90 degrees clockwise, that is:
38824
38825 L.R l.L
38826 . . -> . .
38827 l.r r.R
38828
38829 2, 6, cclock
38830 Rotate by 90 degrees counterclockwise, that is:
38831
38832 L.R R.r
38833 . . -> . .
38834 l.r L.l
38835
38836 3, 7, clock_flip
38837 Rotate by 90 degrees clockwise and vertically flip, that is:
38838
38839 L.R r.R
38840 . . -> . .
38841 l.r l.L
38842
38843 For values between 4-7, the transposition is only done if the input
38844 video geometry is portrait and not landscape. These values are
38845 deprecated, the "passthrough" option should be used instead.
38846
38847 Numerical values are deprecated, and should be dropped in favor of
38848 symbolic constants.
38849
38850 passthrough
38851 Do not apply the transposition if the input geometry matches the
38852 one specified by the specified value. It accepts the following
38853 values:
38854
38855 none
38856 Always apply transposition.
38857
38858 portrait
38859 Preserve portrait geometry (when height >= width).
38860
38861 landscape
38862 Preserve landscape geometry (when width >= height).
38863
38864 Default value is "none".
38865
38866 For example to rotate by 90 degrees clockwise and preserve portrait
38867 layout:
38868
38869 transpose=dir=1:passthrough=portrait
38870
38871 The command above can also be specified as:
38872
38873 transpose=1:portrait
38874
38875 transpose_npp
38876 Transpose rows with columns in the input video and optionally flip it.
38877 For more in depth examples see the transpose video filter, which shares
38878 mostly the same options.
38879
38880 It accepts the following parameters:
38881
38882 dir Specify the transposition direction.
38883
38884 Can assume the following values:
38885
38886 cclock_flip
38887 Rotate by 90 degrees counterclockwise and vertically flip.
38888 (default)
38889
38890 clock
38891 Rotate by 90 degrees clockwise.
38892
38893 cclock
38894 Rotate by 90 degrees counterclockwise.
38895
38896 clock_flip
38897 Rotate by 90 degrees clockwise and vertically flip.
38898
38899 passthrough
38900 Do not apply the transposition if the input geometry matches the
38901 one specified by the specified value. It accepts the following
38902 values:
38903
38904 none
38905 Always apply transposition. (default)
38906
38907 portrait
38908 Preserve portrait geometry (when height >= width).
38909
38910 landscape
38911 Preserve landscape geometry (when width >= height).
38912
38913 trim
38914 Trim the input so that the output contains one continuous subpart of
38915 the input.
38916
38917 It accepts the following parameters:
38918
38919 start
38920 Specify the time of the start of the kept section, i.e. the frame
38921 with the timestamp start will be the first frame in the output.
38922
38923 end Specify the time of the first frame that will be dropped, i.e. the
38924 frame immediately preceding the one with the timestamp end will be
38925 the last frame in the output.
38926
38927 start_pts
38928 This is the same as start, except this option sets the start
38929 timestamp in timebase units instead of seconds.
38930
38931 end_pts
38932 This is the same as end, except this option sets the end timestamp
38933 in timebase units instead of seconds.
38934
38935 duration
38936 The maximum duration of the output in seconds.
38937
38938 start_frame
38939 The number of the first frame that should be passed to the output.
38940
38941 end_frame
38942 The number of the first frame that should be dropped.
38943
38944 start, end, and duration are expressed as time duration specifications;
38945 see the Time duration section in the ffmpeg-utils(1) manual for the
38946 accepted syntax.
38947
38948 Note that the first two sets of the start/end options and the duration
38949 option look at the frame timestamp, while the _frame variants simply
38950 count the frames that pass through the filter. Also note that this
38951 filter does not modify the timestamps. If you wish for the output
38952 timestamps to start at zero, insert a setpts filter after the trim
38953 filter.
38954
38955 If multiple start or end options are set, this filter tries to be
38956 greedy and keep all the frames that match at least one of the specified
38957 constraints. To keep only the part that matches all the constraints at
38958 once, chain multiple trim filters.
38959
38960 The defaults are such that all the input is kept. So it is possible to
38961 set e.g. just the end values to keep everything before the specified
38962 time.
38963
38964 Examples:
38965
38966 • Drop everything except the second minute of input:
38967
38968 ffmpeg -i INPUT -vf trim=60:120
38969
38970 • Keep only the first second:
38971
38972 ffmpeg -i INPUT -vf trim=duration=1
38973
38974 unpremultiply
38975 Apply alpha unpremultiply effect to input video stream using first
38976 plane of second stream as alpha.
38977
38978 Both streams must have same dimensions and same pixel format.
38979
38980 The filter accepts the following option:
38981
38982 planes
38983 Set which planes will be processed, unprocessed planes will be
38984 copied. By default value 0xf, all planes will be processed.
38985
38986 If the format has 1 or 2 components, then luma is bit 0. If the
38987 format has 3 or 4 components: for RGB formats bit 0 is green, bit 1
38988 is blue and bit 2 is red; for YUV formats bit 0 is luma, bit 1 is
38989 chroma-U and bit 2 is chroma-V. If present, the alpha channel is
38990 always the last bit.
38991
38992 inplace
38993 Do not require 2nd input for processing, instead use alpha plane
38994 from input stream.
38995
38996 unsharp
38997 Sharpen or blur the input video.
38998
38999 It accepts the following parameters:
39000
39001 luma_msize_x, lx
39002 Set the luma matrix horizontal size. It must be an odd integer
39003 between 3 and 23. The default value is 5.
39004
39005 luma_msize_y, ly
39006 Set the luma matrix vertical size. It must be an odd integer
39007 between 3 and 23. The default value is 5.
39008
39009 luma_amount, la
39010 Set the luma effect strength. It must be a floating point number,
39011 reasonable values lay between -1.5 and 1.5.
39012
39013 Negative values will blur the input video, while positive values
39014 will sharpen it, a value of zero will disable the effect.
39015
39016 Default value is 1.0.
39017
39018 chroma_msize_x, cx
39019 Set the chroma matrix horizontal size. It must be an odd integer
39020 between 3 and 23. The default value is 5.
39021
39022 chroma_msize_y, cy
39023 Set the chroma matrix vertical size. It must be an odd integer
39024 between 3 and 23. The default value is 5.
39025
39026 chroma_amount, ca
39027 Set the chroma effect strength. It must be a floating point number,
39028 reasonable values lay between -1.5 and 1.5.
39029
39030 Negative values will blur the input video, while positive values
39031 will sharpen it, a value of zero will disable the effect.
39032
39033 Default value is 0.0.
39034
39035 alpha_msize_x, ax
39036 Set the alpha matrix horizontal size. It must be an odd integer
39037 between 3 and 23. The default value is 5.
39038
39039 alpha_msize_y, ay
39040 Set the alpha matrix vertical size. It must be an odd integer
39041 between 3 and 23. The default value is 5.
39042
39043 alpha_amount, aa
39044 Set the alpha effect strength. It must be a floating point number,
39045 reasonable values lay between -1.5 and 1.5.
39046
39047 Negative values will blur the input video, while positive values
39048 will sharpen it, a value of zero will disable the effect.
39049
39050 Default value is 0.0.
39051
39052 All parameters are optional and default to the equivalent of the string
39053 '5:5:1.0:5:5:0.0'.
39054
39055 Examples
39056
39057 • Apply strong luma sharpen effect:
39058
39059 unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
39060
39061 • Apply a strong blur of both luma and chroma parameters:
39062
39063 unsharp=7:7:-2:7:7:-2
39064
39065 untile
39066 Decompose a video made of tiled images into the individual images.
39067
39068 The frame rate of the output video is the frame rate of the input video
39069 multiplied by the number of tiles.
39070
39071 This filter does the reverse of tile.
39072
39073 The filter accepts the following options:
39074
39075 layout
39076 Set the grid size (i.e. the number of lines and columns). For the
39077 syntax of this option, check the "Video size" section in the
39078 ffmpeg-utils manual.
39079
39080 Examples
39081
39082 • Produce a 1-second video from a still image file made of 25 frames
39083 stacked vertically, like an analogic film reel:
39084
39085 ffmpeg -r 1 -i image.jpg -vf untile=1x25 movie.mkv
39086
39087 uspp
39088 Apply ultra slow/simple postprocessing filter that compresses and
39089 decompresses the image at several (or - in the case of quality level 8
39090 - all) shifts and average the results.
39091
39092 The way this differs from the behavior of spp is that uspp actually
39093 encodes & decodes each case with libavcodec Snow, whereas spp uses a
39094 simplified intra only 8x8 DCT similar to MJPEG.
39095
39096 This filter is only available in ffmpeg version 4.4 or earlier.
39097
39098 The filter accepts the following options:
39099
39100 quality
39101 Set quality. This option defines the number of levels for
39102 averaging. It accepts an integer in the range 0-8. If set to 0, the
39103 filter will have no effect. A value of 8 means the higher quality.
39104 For each increment of that value the speed drops by a factor of
39105 approximately 2. Default value is 3.
39106
39107 qp Force a constant quantization parameter. If not set, the filter
39108 will use the QP from the video stream (if available).
39109
39110 v360
39111 Convert 360 videos between various formats.
39112
39113 The filter accepts the following options:
39114
39115 input
39116 output
39117 Set format of the input/output video.
39118
39119 Available formats:
39120
39121 e
39122 equirect
39123 Equirectangular projection.
39124
39125 c3x2
39126 c6x1
39127 c1x6
39128 Cubemap with 3x2/6x1/1x6 layout.
39129
39130 Format specific options:
39131
39132 in_pad
39133 out_pad
39134 Set padding proportion for the input/output cubemap. Values
39135 in decimals.
39136
39137 Example values:
39138
39139 0 No padding.
39140
39141 0.01
39142 1% of face is padding. For example, with 1920x1280
39143 resolution face size would be 640x640 and padding would
39144 be 3 pixels from each side. (640 * 0.01 = 6 pixels)
39145
39146 Default value is @samp{0}. Maximum value is @samp{0.1}.
39147
39148 fin_pad
39149 fout_pad
39150 Set fixed padding for the input/output cubemap. Values in
39151 pixels.
39152
39153 Default value is @samp{0}. If greater than zero it
39154 overrides other padding options.
39155
39156 in_forder
39157 out_forder
39158 Set order of faces for the input/output cubemap. Choose one
39159 direction for each position.
39160
39161 Designation of directions:
39162
39163 r right
39164
39165 l left
39166
39167 u up
39168
39169 d down
39170
39171 f forward
39172
39173 b back
39174
39175 Default value is @samp{rludfb}.
39176
39177 in_frot
39178 out_frot
39179 Set rotation of faces for the input/output cubemap. Choose
39180 one angle for each position.
39181
39182 Designation of angles:
39183
39184 0 0 degrees clockwise
39185
39186 1 90 degrees clockwise
39187
39188 2 180 degrees clockwise
39189
39190 3 270 degrees clockwise
39191
39192 Default value is @samp{000000}.
39193
39194 eac Equi-Angular Cubemap.
39195
39196 flat
39197 gnomonic
39198 rectilinear
39199 Regular video.
39200
39201 Format specific options:
39202
39203 h_fov
39204 v_fov
39205 d_fov
39206 Set output horizontal/vertical/diagonal field of view.
39207 Values in degrees.
39208
39209 If diagonal field of view is set it overrides horizontal
39210 and vertical field of view.
39211
39212 ih_fov
39213 iv_fov
39214 id_fov
39215 Set input horizontal/vertical/diagonal field of view.
39216 Values in degrees.
39217
39218 If diagonal field of view is set it overrides horizontal
39219 and vertical field of view.
39220
39221 dfisheye
39222 Dual fisheye.
39223
39224 Format specific options:
39225
39226 h_fov
39227 v_fov
39228 d_fov
39229 Set output horizontal/vertical/diagonal field of view.
39230 Values in degrees.
39231
39232 If diagonal field of view is set it overrides horizontal
39233 and vertical field of view.
39234
39235 ih_fov
39236 iv_fov
39237 id_fov
39238 Set input horizontal/vertical/diagonal field of view.
39239 Values in degrees.
39240
39241 If diagonal field of view is set it overrides horizontal
39242 and vertical field of view.
39243
39244 barrel
39245 fb
39246 barrelsplit
39247 Facebook's 360 formats.
39248
39249 sg Stereographic format.
39250
39251 Format specific options:
39252
39253 h_fov
39254 v_fov
39255 d_fov
39256 Set output horizontal/vertical/diagonal field of view.
39257 Values in degrees.
39258
39259 If diagonal field of view is set it overrides horizontal
39260 and vertical field of view.
39261
39262 ih_fov
39263 iv_fov
39264 id_fov
39265 Set input horizontal/vertical/diagonal field of view.
39266 Values in degrees.
39267
39268 If diagonal field of view is set it overrides horizontal
39269 and vertical field of view.
39270
39271 mercator
39272 Mercator format.
39273
39274 ball
39275 Ball format, gives significant distortion toward the back.
39276
39277 hammer
39278 Hammer-Aitoff map projection format.
39279
39280 sinusoidal
39281 Sinusoidal map projection format.
39282
39283 fisheye
39284 Fisheye projection.
39285
39286 Format specific options:
39287
39288 h_fov
39289 v_fov
39290 d_fov
39291 Set output horizontal/vertical/diagonal field of view.
39292 Values in degrees.
39293
39294 If diagonal field of view is set it overrides horizontal
39295 and vertical field of view.
39296
39297 ih_fov
39298 iv_fov
39299 id_fov
39300 Set input horizontal/vertical/diagonal field of view.
39301 Values in degrees.
39302
39303 If diagonal field of view is set it overrides horizontal
39304 and vertical field of view.
39305
39306 pannini
39307 Pannini projection.
39308
39309 Format specific options:
39310
39311 h_fov
39312 Set output pannini parameter.
39313
39314 ih_fov
39315 Set input pannini parameter.
39316
39317 cylindrical
39318 Cylindrical projection.
39319
39320 Format specific options:
39321
39322 h_fov
39323 v_fov
39324 d_fov
39325 Set output horizontal/vertical/diagonal field of view.
39326 Values in degrees.
39327
39328 If diagonal field of view is set it overrides horizontal
39329 and vertical field of view.
39330
39331 ih_fov
39332 iv_fov
39333 id_fov
39334 Set input horizontal/vertical/diagonal field of view.
39335 Values in degrees.
39336
39337 If diagonal field of view is set it overrides horizontal
39338 and vertical field of view.
39339
39340 perspective
39341 Perspective projection. (output only)
39342
39343 Format specific options:
39344
39345 v_fov
39346 Set perspective parameter.
39347
39348 tetrahedron
39349 Tetrahedron projection.
39350
39351 tsp Truncated square pyramid projection.
39352
39353 he
39354 hequirect
39355 Half equirectangular projection.
39356
39357 equisolid
39358 Equisolid format.
39359
39360 Format specific options:
39361
39362 h_fov
39363 v_fov
39364 d_fov
39365 Set output horizontal/vertical/diagonal field of view.
39366 Values in degrees.
39367
39368 If diagonal field of view is set it overrides horizontal
39369 and vertical field of view.
39370
39371 ih_fov
39372 iv_fov
39373 id_fov
39374 Set input horizontal/vertical/diagonal field of view.
39375 Values in degrees.
39376
39377 If diagonal field of view is set it overrides horizontal
39378 and vertical field of view.
39379
39380 og Orthographic format.
39381
39382 Format specific options:
39383
39384 h_fov
39385 v_fov
39386 d_fov
39387 Set output horizontal/vertical/diagonal field of view.
39388 Values in degrees.
39389
39390 If diagonal field of view is set it overrides horizontal
39391 and vertical field of view.
39392
39393 ih_fov
39394 iv_fov
39395 id_fov
39396 Set input horizontal/vertical/diagonal field of view.
39397 Values in degrees.
39398
39399 If diagonal field of view is set it overrides horizontal
39400 and vertical field of view.
39401
39402 octahedron
39403 Octahedron projection.
39404
39405 cylindricalea
39406 Cylindrical Equal Area projection.
39407
39408 interp
39409 Set interpolation method.Note: more complex interpolation methods
39410 require much more memory to run.
39411
39412 Available methods:
39413
39414 near
39415 nearest
39416 Nearest neighbour.
39417
39418 line
39419 linear
39420 Bilinear interpolation.
39421
39422 lagrange9
39423 Lagrange9 interpolation.
39424
39425 cube
39426 cubic
39427 Bicubic interpolation.
39428
39429 lanc
39430 lanczos
39431 Lanczos interpolation.
39432
39433 sp16
39434 spline16
39435 Spline16 interpolation.
39436
39437 gauss
39438 gaussian
39439 Gaussian interpolation.
39440
39441 mitchell
39442 Mitchell interpolation.
39443
39444 Default value is @samp{line}.
39445
39446 w
39447 h Set the output video resolution.
39448
39449 Default resolution depends on formats.
39450
39451 in_stereo
39452 out_stereo
39453 Set the input/output stereo format.
39454
39455 2d 2D mono
39456
39457 sbs Side by side
39458
39459 tb Top bottom
39460
39461 Default value is @samp{2d} for input and output format.
39462
39463 yaw
39464 pitch
39465 roll
39466 Set rotation for the output video. Values in degrees.
39467
39468 rorder
39469 Set rotation order for the output video. Choose one item for each
39470 position.
39471
39472 y, Y
39473 yaw
39474
39475 p, P
39476 pitch
39477
39478 r, R
39479 roll
39480
39481 Default value is @samp{ypr}.
39482
39483 h_flip
39484 v_flip
39485 d_flip
39486 Flip the output video horizontally(swaps
39487 left-right)/vertically(swaps up-down)/in-depth(swaps back-forward).
39488 Boolean values.
39489
39490 ih_flip
39491 iv_flip
39492 Set if input video is flipped horizontally/vertically. Boolean
39493 values.
39494
39495 in_trans
39496 Set if input video is transposed. Boolean value, by default
39497 disabled.
39498
39499 out_trans
39500 Set if output video needs to be transposed. Boolean value, by
39501 default disabled.
39502
39503 h_offset
39504 v_offset
39505 Set output horizontal/vertical off-axis offset. Default is set to
39506 0. Allowed range is from -1 to 1.
39507
39508 alpha_mask
39509 Build mask in alpha plane for all unmapped pixels by marking them
39510 fully transparent. Boolean value, by default disabled.
39511
39512 reset_rot
39513 Reset rotation of output video. Boolean value, by default disabled.
39514
39515 Examples
39516
39517 • Convert equirectangular video to cubemap with 3x2 layout and 1%
39518 padding using bicubic interpolation:
39519
39520 ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
39521
39522 • Extract back view of Equi-Angular Cubemap:
39523
39524 ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
39525
39526 • Convert transposed and horizontally flipped Equi-Angular Cubemap in
39527 side-by-side stereo format to equirectangular top-bottom stereo
39528 format:
39529
39530 v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
39531
39532 Commands
39533
39534 This filter supports subset of above options as commands.
39535
39536 vaguedenoiser
39537 Apply a wavelet based denoiser.
39538
39539 It transforms each frame from the video input into the wavelet domain,
39540 using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
39541 the obtained coefficients. It does an inverse wavelet transform after.
39542 Due to wavelet properties, it should give a nice smoothed result, and
39543 reduced noise, without blurring picture features.
39544
39545 This filter accepts the following options:
39546
39547 threshold
39548 The filtering strength. The higher, the more filtered the video
39549 will be. Hard thresholding can use a higher threshold than soft
39550 thresholding before the video looks overfiltered. Default value is
39551 2.
39552
39553 method
39554 The filtering method the filter will use.
39555
39556 It accepts the following values:
39557
39558 hard
39559 All values under the threshold will be zeroed.
39560
39561 soft
39562 All values under the threshold will be zeroed. All values above
39563 will be reduced by the threshold.
39564
39565 garrote
39566 Scales or nullifies coefficients - intermediary between (more)
39567 soft and (less) hard thresholding.
39568
39569 Default is garrote.
39570
39571 nsteps
39572 Number of times, the wavelet will decompose the picture. Picture
39573 can't be decomposed beyond a particular point (typically, 8 for a
39574 640x480 frame - as 2^9 = 512 > 480). Valid values are integers
39575 between 1 and 32. Default value is 6.
39576
39577 percent
39578 Partial of full denoising (limited coefficients shrinking), from 0
39579 to 100. Default value is 85.
39580
39581 planes
39582 A list of the planes to process. By default all planes are
39583 processed.
39584
39585 type
39586 The threshold type the filter will use.
39587
39588 It accepts the following values:
39589
39590 universal
39591 Threshold used is same for all decompositions.
39592
39593 bayes
39594 Threshold used depends also on each decomposition coefficients.
39595
39596 Default is universal.
39597
39598 varblur
39599 Apply variable blur filter by using 2nd video stream to set blur
39600 radius. The 2nd stream must have the same dimensions.
39601
39602 This filter accepts the following options:
39603
39604 min_r
39605 Set min allowed radius. Allowed range is from 0 to 254. Default is
39606 0.
39607
39608 max_r
39609 Set max allowed radius. Allowed range is from 1 to 255. Default is
39610 8.
39611
39612 planes
39613 Set which planes to process. By default, all are used.
39614
39615 The "varblur" filter also supports the framesync options.
39616
39617 Commands
39618
39619 This filter supports all the above options as commands.
39620
39621 vectorscope
39622 Display 2 color component values in the two dimensional graph (which is
39623 called a vectorscope).
39624
39625 This filter accepts the following options:
39626
39627 mode, m
39628 Set vectorscope mode.
39629
39630 It accepts the following values:
39631
39632 gray
39633 tint
39634 Gray values are displayed on graph, higher brightness means
39635 more pixels have same component color value on location in
39636 graph. This is the default mode.
39637
39638 color
39639 Gray values are displayed on graph. Surrounding pixels values
39640 which are not present in video frame are drawn in gradient of 2
39641 color components which are set by option "x" and "y". The 3rd
39642 color component is static.
39643
39644 color2
39645 Actual color components values present in video frame are
39646 displayed on graph.
39647
39648 color3
39649 Similar as color2 but higher frequency of same values "x" and
39650 "y" on graph increases value of another color component, which
39651 is luminance by default values of "x" and "y".
39652
39653 color4
39654 Actual colors present in video frame are displayed on graph. If
39655 two different colors map to same position on graph then color
39656 with higher value of component not present in graph is picked.
39657
39658 color5
39659 Gray values are displayed on graph. Similar to "color" but with
39660 3rd color component picked from radial gradient.
39661
39662 x Set which color component will be represented on X-axis. Default is
39663 1.
39664
39665 y Set which color component will be represented on Y-axis. Default is
39666 2.
39667
39668 intensity, i
39669 Set intensity, used by modes: gray, color, color3 and color5 for
39670 increasing brightness of color component which represents frequency
39671 of (X, Y) location in graph.
39672
39673 envelope, e
39674 none
39675 No envelope, this is default.
39676
39677 instant
39678 Instant envelope, even darkest single pixel will be clearly
39679 highlighted.
39680
39681 peak
39682 Hold maximum and minimum values presented in graph over time.
39683 This way you can still spot out of range values without
39684 constantly looking at vectorscope.
39685
39686 peak+instant
39687 Peak and instant envelope combined together.
39688
39689 graticule, g
39690 Set what kind of graticule to draw.
39691
39692 none
39693 green
39694 color
39695 invert
39696 opacity, o
39697 Set graticule opacity.
39698
39699 flags, f
39700 Set graticule flags.
39701
39702 white
39703 Draw graticule for white point.
39704
39705 black
39706 Draw graticule for black point.
39707
39708 name
39709 Draw color points short names.
39710
39711 bgopacity, b
39712 Set background opacity.
39713
39714 lthreshold, l
39715 Set low threshold for color component not represented on X or Y
39716 axis. Values lower than this value will be ignored. Default is 0.
39717 Note this value is multiplied with actual max possible value one
39718 pixel component can have. So for 8-bit input and low threshold
39719 value of 0.1 actual threshold is 0.1 * 255 = 25.
39720
39721 hthreshold, h
39722 Set high threshold for color component not represented on X or Y
39723 axis. Values higher than this value will be ignored. Default is 1.
39724 Note this value is multiplied with actual max possible value one
39725 pixel component can have. So for 8-bit input and high threshold
39726 value of 0.9 actual threshold is 0.9 * 255 = 230.
39727
39728 colorspace, c
39729 Set what kind of colorspace to use when drawing graticule.
39730
39731 auto
39732 601
39733 709
39734
39735 Default is auto.
39736
39737 tint0, t0
39738 tint1, t1
39739 Set color tint for gray/tint vectorscope mode. By default both
39740 options are zero. This means no tint, and output will remain gray.
39741
39742 vidstabdetect
39743 Analyze video stabilization/deshaking. Perform pass 1 of 2, see
39744 vidstabtransform for pass 2.
39745
39746 This filter generates a file with relative translation and rotation
39747 transform information about subsequent frames, which is then used by
39748 the vidstabtransform filter.
39749
39750 To enable compilation of this filter you need to configure FFmpeg with
39751 "--enable-libvidstab".
39752
39753 This filter accepts the following options:
39754
39755 result
39756 Set the path to the file used to write the transforms information.
39757 Default value is transforms.trf.
39758
39759 shakiness
39760 Set how shaky the video is and how quick the camera is. It accepts
39761 an integer in the range 1-10, a value of 1 means little shakiness,
39762 a value of 10 means strong shakiness. Default value is 5.
39763
39764 accuracy
39765 Set the accuracy of the detection process. It must be a value in
39766 the range 1-15. A value of 1 means low accuracy, a value of 15
39767 means high accuracy. Default value is 15.
39768
39769 stepsize
39770 Set stepsize of the search process. The region around minimum is
39771 scanned with 1 pixel resolution. Default value is 6.
39772
39773 mincontrast
39774 Set minimum contrast. Below this value a local measurement field is
39775 discarded. Must be a floating point value in the range 0-1. Default
39776 value is 0.3.
39777
39778 tripod
39779 Set reference frame number for tripod mode.
39780
39781 If enabled, the motion of the frames is compared to a reference
39782 frame in the filtered stream, identified by the specified number.
39783 The idea is to compensate all movements in a more-or-less static
39784 scene and keep the camera view absolutely still.
39785
39786 If set to 0, it is disabled. The frames are counted starting from
39787 1.
39788
39789 show
39790 Show fields and transforms in the resulting frames. It accepts an
39791 integer in the range 0-2. Default value is 0, which disables any
39792 visualization.
39793
39794 Examples
39795
39796 • Use default values:
39797
39798 vidstabdetect
39799
39800 • Analyze strongly shaky movie and put the results in file
39801 mytransforms.trf:
39802
39803 vidstabdetect=shakiness=10:accuracy=15:result="mytransforms.trf"
39804
39805 • Visualize the result of internal transformations in the resulting
39806 video:
39807
39808 vidstabdetect=show=1
39809
39810 • Analyze a video with medium shakiness using ffmpeg:
39811
39812 ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
39813
39814 vidstabtransform
39815 Video stabilization/deshaking: pass 2 of 2, see vidstabdetect for pass
39816 1.
39817
39818 Read a file with transform information for each frame and
39819 apply/compensate them. Together with the vidstabdetect filter this can
39820 be used to deshake videos. See also
39821 <http://public.hronopik.de/vid.stab>. It is important to also use the
39822 unsharp filter, see below.
39823
39824 To enable compilation of this filter you need to configure FFmpeg with
39825 "--enable-libvidstab".
39826
39827 Options
39828
39829 input
39830 Set path to the file used to read the transforms. Default value is
39831 transforms.trf.
39832
39833 smoothing
39834 Set the number of frames (value*2 + 1) used for lowpass filtering
39835 the camera movements. Default value is 10.
39836
39837 For example a number of 10 means that 21 frames are used (10 in the
39838 past and 10 in the future) to smoothen the motion in the video. A
39839 larger value leads to a smoother video, but limits the acceleration
39840 of the camera (pan/tilt movements). 0 is a special case where a
39841 static camera is simulated.
39842
39843 optalgo
39844 Set the camera path optimization algorithm.
39845
39846 Accepted values are:
39847
39848 gauss
39849 gaussian kernel low-pass filter on camera motion (default)
39850
39851 avg averaging on transformations
39852
39853 maxshift
39854 Set maximal number of pixels to translate frames. Default value is
39855 -1, meaning no limit.
39856
39857 maxangle
39858 Set maximal angle in radians (degree*PI/180) to rotate frames.
39859 Default value is -1, meaning no limit.
39860
39861 crop
39862 Specify how to deal with borders that may be visible due to
39863 movement compensation.
39864
39865 Available values are:
39866
39867 keep
39868 keep image information from previous frame (default)
39869
39870 black
39871 fill the border black
39872
39873 invert
39874 Invert transforms if set to 1. Default value is 0.
39875
39876 relative
39877 Consider transforms as relative to previous frame if set to 1,
39878 absolute if set to 0. Default value is 0.
39879
39880 zoom
39881 Set percentage to zoom. A positive value will result in a zoom-in
39882 effect, a negative value in a zoom-out effect. Default value is 0
39883 (no zoom).
39884
39885 optzoom
39886 Set optimal zooming to avoid borders.
39887
39888 Accepted values are:
39889
39890 0 disabled
39891
39892 1 optimal static zoom value is determined (only very strong
39893 movements will lead to visible borders) (default)
39894
39895 2 optimal adaptive zoom value is determined (no borders will be
39896 visible), see zoomspeed
39897
39898 Note that the value given at zoom is added to the one calculated
39899 here.
39900
39901 zoomspeed
39902 Set percent to zoom maximally each frame (enabled when optzoom is
39903 set to 2). Range is from 0 to 5, default value is 0.25.
39904
39905 interpol
39906 Specify type of interpolation.
39907
39908 Available values are:
39909
39910 no no interpolation
39911
39912 linear
39913 linear only horizontal
39914
39915 bilinear
39916 linear in both directions (default)
39917
39918 bicubic
39919 cubic in both directions (slow)
39920
39921 tripod
39922 Enable virtual tripod mode if set to 1, which is equivalent to
39923 "relative=0:smoothing=0". Default value is 0.
39924
39925 Use also "tripod" option of vidstabdetect.
39926
39927 debug
39928 Increase log verbosity if set to 1. Also the detected global
39929 motions are written to the temporary file global_motions.trf.
39930 Default value is 0.
39931
39932 Examples
39933
39934 • Use ffmpeg for a typical stabilization with default values:
39935
39936 ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
39937
39938 Note the use of the unsharp filter which is always recommended.
39939
39940 • Zoom in a bit more and load transform data from a given file:
39941
39942 vidstabtransform=zoom=5:input="mytransforms.trf"
39943
39944 • Smoothen the video even more:
39945
39946 vidstabtransform=smoothing=30
39947
39948 vflip
39949 Flip the input video vertically.
39950
39951 For example, to vertically flip a video with ffmpeg:
39952
39953 ffmpeg -i in.avi -vf "vflip" out.avi
39954
39955 vfrdet
39956 Detect variable frame rate video.
39957
39958 This filter tries to detect if the input is variable or constant frame
39959 rate.
39960
39961 At end it will output number of frames detected as having variable
39962 delta pts, and ones with constant delta pts. If there was frames with
39963 variable delta, than it will also show min, max and average delta
39964 encountered.
39965
39966 vibrance
39967 Boost or alter saturation.
39968
39969 The filter accepts the following options:
39970
39971 intensity
39972 Set strength of boost if positive value or strength of alter if
39973 negative value. Default is 0. Allowed range is from -2 to 2.
39974
39975 rbal
39976 Set the red balance. Default is 1. Allowed range is from -10 to 10.
39977
39978 gbal
39979 Set the green balance. Default is 1. Allowed range is from -10 to
39980 10.
39981
39982 bbal
39983 Set the blue balance. Default is 1. Allowed range is from -10 to
39984 10.
39985
39986 rlum
39987 Set the red luma coefficient.
39988
39989 glum
39990 Set the green luma coefficient.
39991
39992 blum
39993 Set the blue luma coefficient.
39994
39995 alternate
39996 If "intensity" is negative and this is set to 1, colors will
39997 change, otherwise colors will be less saturated, more towards gray.
39998
39999 Commands
40000
40001 This filter supports the all above options as commands.
40002
40003 vif
40004 Obtain the average VIF (Visual Information Fidelity) between two input
40005 videos.
40006
40007 This filter takes two input videos.
40008
40009 Both input videos must have the same resolution and pixel format for
40010 this filter to work correctly. Also it assumes that both inputs have
40011 the same number of frames, which are compared one by one.
40012
40013 The obtained average VIF score is printed through the logging system.
40014
40015 The filter stores the calculated VIF score of each frame.
40016
40017 This filter also supports the framesync options.
40018
40019 In the below example the input file main.mpg being processed is
40020 compared with the reference file ref.mpg.
40021
40022 ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
40023
40024 vignette
40025 Make or reverse a natural vignetting effect.
40026
40027 The filter accepts the following options:
40028
40029 angle, a
40030 Set lens angle expression as a number of radians.
40031
40032 The value is clipped in the "[0,PI/2]" range.
40033
40034 Default value: "PI/5"
40035
40036 x0
40037 y0 Set center coordinates expressions. Respectively "w/2" and "h/2" by
40038 default.
40039
40040 mode
40041 Set forward/backward mode.
40042
40043 Available modes are:
40044
40045 forward
40046 The larger the distance from the central point, the darker the
40047 image becomes.
40048
40049 backward
40050 The larger the distance from the central point, the brighter
40051 the image becomes. This can be used to reverse a vignette
40052 effect, though there is no automatic detection to extract the
40053 lens angle and other settings (yet). It can also be used to
40054 create a burning effect.
40055
40056 Default value is forward.
40057
40058 eval
40059 Set evaluation mode for the expressions (angle, x0, y0).
40060
40061 It accepts the following values:
40062
40063 init
40064 Evaluate expressions only once during the filter
40065 initialization.
40066
40067 frame
40068 Evaluate expressions for each incoming frame. This is way
40069 slower than the init mode since it requires all the scalers to
40070 be re-computed, but it allows advanced dynamic expressions.
40071
40072 Default value is init.
40073
40074 dither
40075 Set dithering to reduce the circular banding effects. Default is 1
40076 (enabled).
40077
40078 aspect
40079 Set vignette aspect. This setting allows one to adjust the shape of
40080 the vignette. Setting this value to the SAR of the input will make
40081 a rectangular vignetting following the dimensions of the video.
40082
40083 Default is "1/1".
40084
40085 Expressions
40086
40087 The alpha, x0 and y0 expressions can contain the following parameters.
40088
40089 w
40090 h input width and height
40091
40092 n the number of input frame, starting from 0
40093
40094 pts the PTS (Presentation TimeStamp) time of the filtered video frame,
40095 expressed in TB units, NAN if undefined
40096
40097 r frame rate of the input video, NAN if the input frame rate is
40098 unknown
40099
40100 t the PTS (Presentation TimeStamp) of the filtered video frame,
40101 expressed in seconds, NAN if undefined
40102
40103 tb time base of the input video
40104
40105 Examples
40106
40107 • Apply simple strong vignetting effect:
40108
40109 vignette=PI/4
40110
40111 • Make a flickering vignetting:
40112
40113 vignette='PI/4+random(1)*PI/50':eval=frame
40114
40115 vmafmotion
40116 Obtain the average VMAF motion score of a video. It is one of the
40117 component metrics of VMAF.
40118
40119 The obtained average motion score is printed through the logging
40120 system.
40121
40122 The filter accepts the following options:
40123
40124 stats_file
40125 If specified, the filter will use the named file to save the motion
40126 score of each frame with respect to the previous frame. When
40127 filename equals "-" the data is sent to standard output.
40128
40129 Example:
40130
40131 ffmpeg -i ref.mpg -vf vmafmotion -f null -
40132
40133 vstack
40134 Stack input videos vertically.
40135
40136 All streams must be of same pixel format and of same width.
40137
40138 Note that this filter is faster than using overlay and pad filter to
40139 create same output.
40140
40141 The filter accepts the following options:
40142
40143 inputs
40144 Set number of input streams. Default is 2.
40145
40146 shortest
40147 If set to 1, force the output to terminate when the shortest input
40148 terminates. Default value is 0.
40149
40150 w3fdif
40151 Deinterlace the input video ("w3fdif" stands for "Weston 3 Field
40152 Deinterlacing Filter").
40153
40154 Based on the process described by Martin Weston for BBC R&D, and
40155 implemented based on the de-interlace algorithm written by Jim
40156 Easterbrook for BBC R&D, the Weston 3 field deinterlacing filter uses
40157 filter coefficients calculated by BBC R&D.
40158
40159 This filter uses field-dominance information in frame to decide which
40160 of each pair of fields to place first in the output. If it gets it
40161 wrong use setfield filter before "w3fdif" filter.
40162
40163 There are two sets of filter coefficients, so called "simple" and
40164 "complex". Which set of filter coefficients is used can be set by
40165 passing an optional parameter:
40166
40167 filter
40168 Set the interlacing filter coefficients. Accepts one of the
40169 following values:
40170
40171 simple
40172 Simple filter coefficient set.
40173
40174 complex
40175 More-complex filter coefficient set.
40176
40177 Default value is complex.
40178
40179 mode
40180 The interlacing mode to adopt. It accepts one of the following
40181 values:
40182
40183 frame
40184 Output one frame for each frame.
40185
40186 field
40187 Output one frame for each field.
40188
40189 The default value is "field".
40190
40191 parity
40192 The picture field parity assumed for the input interlaced video. It
40193 accepts one of the following values:
40194
40195 tff Assume the top field is first.
40196
40197 bff Assume the bottom field is first.
40198
40199 auto
40200 Enable automatic detection of field parity.
40201
40202 The default value is "auto". If the interlacing is unknown or the
40203 decoder does not export this information, top field first will be
40204 assumed.
40205
40206 deint
40207 Specify which frames to deinterlace. Accepts one of the following
40208 values:
40209
40210 all Deinterlace all frames,
40211
40212 interlaced
40213 Only deinterlace frames marked as interlaced.
40214
40215 Default value is all.
40216
40217 Commands
40218
40219 This filter supports same commands as options.
40220
40221 waveform
40222 Video waveform monitor.
40223
40224 The waveform monitor plots color component intensity. By default
40225 luminance only. Each column of the waveform corresponds to a column of
40226 pixels in the source video.
40227
40228 It accepts the following options:
40229
40230 mode, m
40231 Can be either "row", or "column". Default is "column". In row
40232 mode, the graph on the left side represents color component value 0
40233 and the right side represents value = 255. In column mode, the top
40234 side represents color component value = 0 and bottom side
40235 represents value = 255.
40236
40237 intensity, i
40238 Set intensity. Smaller values are useful to find out how many
40239 values of the same luminance are distributed across input
40240 rows/columns. Default value is 0.04. Allowed range is [0, 1].
40241
40242 mirror, r
40243 Set mirroring mode. 0 means unmirrored, 1 means mirrored. In
40244 mirrored mode, higher values will be represented on the left side
40245 for "row" mode and at the top for "column" mode. Default is 1
40246 (mirrored).
40247
40248 display, d
40249 Set display mode. It accepts the following values:
40250
40251 overlay
40252 Presents information identical to that in the "parade", except
40253 that the graphs representing color components are superimposed
40254 directly over one another.
40255
40256 This display mode makes it easier to spot relative differences
40257 or similarities in overlapping areas of the color components
40258 that are supposed to be identical, such as neutral whites,
40259 grays, or blacks.
40260
40261 stack
40262 Display separate graph for the color components side by side in
40263 "row" mode or one below the other in "column" mode.
40264
40265 parade
40266 Display separate graph for the color components side by side in
40267 "column" mode or one below the other in "row" mode.
40268
40269 Using this display mode makes it easy to spot color casts in
40270 the highlights and shadows of an image, by comparing the
40271 contours of the top and the bottom graphs of each waveform.
40272 Since whites, grays, and blacks are characterized by exactly
40273 equal amounts of red, green, and blue, neutral areas of the
40274 picture should display three waveforms of roughly equal
40275 width/height. If not, the correction is easy to perform by
40276 making level adjustments the three waveforms.
40277
40278 Default is "stack".
40279
40280 components, c
40281 Set which color components to display. Default is 1, which means
40282 only luminance or red color component if input is in RGB
40283 colorspace. If is set for example to 7 it will display all 3 (if)
40284 available color components.
40285
40286 envelope, e
40287 none
40288 No envelope, this is default.
40289
40290 instant
40291 Instant envelope, minimum and maximum values presented in graph
40292 will be easily visible even with small "step" value.
40293
40294 peak
40295 Hold minimum and maximum values presented in graph across time.
40296 This way you can still spot out of range values without
40297 constantly looking at waveforms.
40298
40299 peak+instant
40300 Peak and instant envelope combined together.
40301
40302 filter, f
40303 lowpass
40304 No filtering, this is default.
40305
40306 flat
40307 Luma and chroma combined together.
40308
40309 aflat
40310 Similar as above, but shows difference between blue and red
40311 chroma.
40312
40313 xflat
40314 Similar as above, but use different colors.
40315
40316 yflat
40317 Similar as above, but again with different colors.
40318
40319 chroma
40320 Displays only chroma.
40321
40322 color
40323 Displays actual color value on waveform.
40324
40325 acolor
40326 Similar as above, but with luma showing frequency of chroma
40327 values.
40328
40329 graticule, g
40330 Set which graticule to display.
40331
40332 none
40333 Do not display graticule.
40334
40335 green
40336 Display green graticule showing legal broadcast ranges.
40337
40338 orange
40339 Display orange graticule showing legal broadcast ranges.
40340
40341 invert
40342 Display invert graticule showing legal broadcast ranges.
40343
40344 opacity, o
40345 Set graticule opacity.
40346
40347 flags, fl
40348 Set graticule flags.
40349
40350 numbers
40351 Draw numbers above lines. By default enabled.
40352
40353 dots
40354 Draw dots instead of lines.
40355
40356 scale, s
40357 Set scale used for displaying graticule.
40358
40359 digital
40360 millivolts
40361 ire
40362
40363 Default is digital.
40364
40365 bgopacity, b
40366 Set background opacity.
40367
40368 tint0, t0
40369 tint1, t1
40370 Set tint for output. Only used with lowpass filter and when
40371 display is not overlay and input pixel formats are not RGB.
40372
40373 fitmode, fm
40374 Set sample aspect ratio of video output frames. Can be used to
40375 configure waveform so it is not streched too much in one of
40376 directions.
40377
40378 none
40379 Set sample aspect ration to 1/1.
40380
40381 size
40382 Set sample aspect ratio to match input size of video
40383
40384 Default is none.
40385
40386 weave, doubleweave
40387 The "weave" takes a field-based video input and join each two
40388 sequential fields into single frame, producing a new double height clip
40389 with half the frame rate and half the frame count.
40390
40391 The "doubleweave" works same as "weave" but without halving frame rate
40392 and frame count.
40393
40394 It accepts the following option:
40395
40396 first_field
40397 Set first field. Available values are:
40398
40399 top, t
40400 Set the frame as top-field-first.
40401
40402 bottom, b
40403 Set the frame as bottom-field-first.
40404
40405 Examples
40406
40407 • Interlace video using select and separatefields filter:
40408
40409 separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
40410
40411 xbr
40412 Apply the xBR high-quality magnification filter which is designed for
40413 pixel art. It follows a set of edge-detection rules, see
40414 <https://forums.libretro.com/t/xbr-algorithm-tutorial/123>.
40415
40416 It accepts the following option:
40417
40418 n Set the scaling dimension: 2 for "2xBR", 3 for "3xBR" and 4 for
40419 "4xBR". Default is 3.
40420
40421 xcorrelate
40422 Apply normalized cross-correlation between first and second input video
40423 stream.
40424
40425 Second input video stream dimensions must be lower than first input
40426 video stream.
40427
40428 The filter accepts the following options:
40429
40430 planes
40431 Set which planes to process.
40432
40433 secondary
40434 Set which secondary video frames will be processed from second
40435 input video stream, can be first or all. Default is all.
40436
40437 The "xcorrelate" filter also supports the framesync options.
40438
40439 xfade
40440 Apply cross fade from one input video stream to another input video
40441 stream. The cross fade is applied for specified duration.
40442
40443 Both inputs must be constant frame-rate and have the same resolution,
40444 pixel format, frame rate and timebase.
40445
40446 The filter accepts the following options:
40447
40448 transition
40449 Set one of available transition effects:
40450
40451 custom
40452 fade
40453 wipeleft
40454 wiperight
40455 wipeup
40456 wipedown
40457 slideleft
40458 slideright
40459 slideup
40460 slidedown
40461 circlecrop
40462 rectcrop
40463 distance
40464 fadeblack
40465 fadewhite
40466 radial
40467 smoothleft
40468 smoothright
40469 smoothup
40470 smoothdown
40471 circleopen
40472 circleclose
40473 vertopen
40474 vertclose
40475 horzopen
40476 horzclose
40477 dissolve
40478 pixelize
40479 diagtl
40480 diagtr
40481 diagbl
40482 diagbr
40483 hlslice
40484 hrslice
40485 vuslice
40486 vdslice
40487 hblur
40488 fadegrays
40489 wipetl
40490 wipetr
40491 wipebl
40492 wipebr
40493 squeezeh
40494 squeezev
40495 zoomin
40496 fadefast
40497 fadeslow
40498
40499 Default transition effect is fade.
40500
40501 duration
40502 Set cross fade duration in seconds. Range is 0 to 60 seconds.
40503 Default duration is 1 second.
40504
40505 offset
40506 Set cross fade start relative to first input stream in seconds.
40507 Default offset is 0.
40508
40509 expr
40510 Set expression for custom transition effect.
40511
40512 The expressions can use the following variables and functions:
40513
40514 X
40515 Y The coordinates of the current sample.
40516
40517 W
40518 H The width and height of the image.
40519
40520 P Progress of transition effect.
40521
40522 PLANE
40523 Currently processed plane.
40524
40525 A Return value of first input at current location and plane.
40526
40527 B Return value of second input at current location and plane.
40528
40529 a0(x, y)
40530 a1(x, y)
40531 a2(x, y)
40532 a3(x, y)
40533 Return the value of the pixel at location (x,y) of the
40534 first/second/third/fourth component of first input.
40535
40536 b0(x, y)
40537 b1(x, y)
40538 b2(x, y)
40539 b3(x, y)
40540 Return the value of the pixel at location (x,y) of the
40541 first/second/third/fourth component of second input.
40542
40543 Examples
40544
40545 • Cross fade from one input video to another input video, with fade
40546 transition and duration of transition of 2 seconds starting at
40547 offset of 5 seconds:
40548
40549 ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
40550
40551 xmedian
40552 Pick median pixels from several input videos.
40553
40554 The filter accepts the following options:
40555
40556 inputs
40557 Set number of inputs. Default is 3. Allowed range is from 3 to
40558 255. If number of inputs is even number, than result will be mean
40559 value between two median values.
40560
40561 planes
40562 Set which planes to filter. Default value is 15, by which all
40563 planes are processed.
40564
40565 percentile
40566 Set median percentile. Default value is 0.5. Default value of 0.5
40567 will pick always median values, while 0 will pick minimum values,
40568 and 1 maximum values.
40569
40570 Commands
40571
40572 This filter supports all above options as commands, excluding option
40573 "inputs".
40574
40575 xstack
40576 Stack video inputs into custom layout.
40577
40578 All streams must be of same pixel format.
40579
40580 The filter accepts the following options:
40581
40582 inputs
40583 Set number of input streams. Default is 2.
40584
40585 layout
40586 Specify layout of inputs. This option requires the desired layout
40587 configuration to be explicitly set by the user. This sets position
40588 of each video input in output. Each input is separated by '|'. The
40589 first number represents the column, and the second number
40590 represents the row. Numbers start at 0 and are separated by '_'.
40591 Optionally one can use wX and hX, where X is video input from which
40592 to take width or height. Multiple values can be used when
40593 separated by '+'. In such case values are summed together.
40594
40595 Note that if inputs are of different sizes gaps may appear, as not
40596 all of the output video frame will be filled. Similarly, videos can
40597 overlap each other if their position doesn't leave enough space for
40598 the full frame of adjoining videos.
40599
40600 For 2 inputs, a default layout of "0_0|w0_0" (equivalent to
40601 "grid=2x1") is set. In all other cases, a layout or a grid must be
40602 set by the user. Either "grid" or "layout" can be specified at a
40603 time. Specifying both will result in an error.
40604
40605 grid
40606 Specify a fixed size grid of inputs. This option is used to create
40607 a fixed size grid of the input streams. Set the grid size in the
40608 form "COLUMNSxROWS". There must be "ROWS * COLUMNS" input streams
40609 and they will be arranged as a grid with "ROWS" rows and "COLUMNS"
40610 columns. When using this option, each input stream within a row
40611 must have the same height and all the rows must have the same
40612 width.
40613
40614 If "grid" is set, then "inputs" option is ignored and is implicitly
40615 set to "ROWS * COLUMNS".
40616
40617 For 2 inputs, a default grid of "2x1" (equivalent to
40618 "layout=0_0|w0_0") is set. In all other cases, a layout or a grid
40619 must be set by the user. Either "grid" or "layout" can be specified
40620 at a time. Specifying both will result in an error.
40621
40622 shortest
40623 If set to 1, force the output to terminate when the shortest input
40624 terminates. Default value is 0.
40625
40626 fill
40627 If set to valid color, all unused pixels will be filled with that
40628 color. By default fill is set to none, so it is disabled.
40629
40630 Examples
40631
40632 • Display 4 inputs into 2x2 grid.
40633
40634 Layout:
40635
40636 input1(0, 0) | input3(w0, 0)
40637 input2(0, h0) | input4(w0, h0)
40638
40639
40640
40641 xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
40642
40643 Note that if inputs are of different sizes, gaps or overlaps may
40644 occur.
40645
40646 • Display 4 inputs into 1x4 grid.
40647
40648 Layout:
40649
40650 input1(0, 0)
40651 input2(0, h0)
40652 input3(0, h0+h1)
40653 input4(0, h0+h1+h2)
40654
40655
40656
40657 xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
40658
40659 Note that if inputs are of different widths, unused space will
40660 appear.
40661
40662 • Display 9 inputs into 3x3 grid.
40663
40664 Layout:
40665
40666 input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
40667 input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
40668 input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
40669
40670
40671
40672 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
40673
40674 Note that if inputs are of different sizes, gaps or overlaps may
40675 occur.
40676
40677 • Display 16 inputs into 4x4 grid.
40678
40679 Layout:
40680
40681 input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
40682 input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
40683 input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
40684 input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
40685
40686
40687
40688 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|
40689 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
40690
40691 Note that if inputs are of different sizes, gaps or overlaps may
40692 occur.
40693
40694 yadif
40695 Deinterlace the input video ("yadif" means "yet another deinterlacing
40696 filter").
40697
40698 It accepts the following parameters:
40699
40700 mode
40701 The interlacing mode to adopt. It accepts one of the following
40702 values:
40703
40704 0, send_frame
40705 Output one frame for each frame.
40706
40707 1, send_field
40708 Output one frame for each field.
40709
40710 2, send_frame_nospatial
40711 Like "send_frame", but it skips the spatial interlacing check.
40712
40713 3, send_field_nospatial
40714 Like "send_field", but it skips the spatial interlacing check.
40715
40716 The default value is "send_frame".
40717
40718 parity
40719 The picture field parity assumed for the input interlaced video. It
40720 accepts one of the following values:
40721
40722 0, tff
40723 Assume the top field is first.
40724
40725 1, bff
40726 Assume the bottom field is first.
40727
40728 -1, auto
40729 Enable automatic detection of field parity.
40730
40731 The default value is "auto". If the interlacing is unknown or the
40732 decoder does not export this information, top field first will be
40733 assumed.
40734
40735 deint
40736 Specify which frames to deinterlace. Accepts one of the following
40737 values:
40738
40739 0, all
40740 Deinterlace all frames.
40741
40742 1, interlaced
40743 Only deinterlace frames marked as interlaced.
40744
40745 The default value is "all".
40746
40747 yadif_cuda
40748 Deinterlace the input video using the yadif algorithm, but implemented
40749 in CUDA so that it can work as part of a GPU accelerated pipeline with
40750 nvdec and/or nvenc.
40751
40752 It accepts the following parameters:
40753
40754 mode
40755 The interlacing mode to adopt. It accepts one of the following
40756 values:
40757
40758 0, send_frame
40759 Output one frame for each frame.
40760
40761 1, send_field
40762 Output one frame for each field.
40763
40764 2, send_frame_nospatial
40765 Like "send_frame", but it skips the spatial interlacing check.
40766
40767 3, send_field_nospatial
40768 Like "send_field", but it skips the spatial interlacing check.
40769
40770 The default value is "send_frame".
40771
40772 parity
40773 The picture field parity assumed for the input interlaced video. It
40774 accepts one of the following values:
40775
40776 0, tff
40777 Assume the top field is first.
40778
40779 1, bff
40780 Assume the bottom field is first.
40781
40782 -1, auto
40783 Enable automatic detection of field parity.
40784
40785 The default value is "auto". If the interlacing is unknown or the
40786 decoder does not export this information, top field first will be
40787 assumed.
40788
40789 deint
40790 Specify which frames to deinterlace. Accepts one of the following
40791 values:
40792
40793 0, all
40794 Deinterlace all frames.
40795
40796 1, interlaced
40797 Only deinterlace frames marked as interlaced.
40798
40799 The default value is "all".
40800
40801 yaepblur
40802 Apply blur filter while preserving edges ("yaepblur" means "yet another
40803 edge preserving blur filter"). The algorithm is described in "J. S.
40804 Lee, Digital image enhancement and noise filtering by use of local
40805 statistics, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 1980."
40806
40807 It accepts the following parameters:
40808
40809 radius, r
40810 Set the window radius. Default value is 3.
40811
40812 planes, p
40813 Set which planes to filter. Default is only the first plane.
40814
40815 sigma, s
40816 Set blur strength. Default value is 128.
40817
40818 Commands
40819
40820 This filter supports same commands as options.
40821
40822 zoompan
40823 Apply Zoom & Pan effect.
40824
40825 This filter accepts the following options:
40826
40827 zoom, z
40828 Set the zoom expression. Range is 1-10. Default is 1.
40829
40830 x
40831 y Set the x and y expression. Default is 0.
40832
40833 d Set the duration expression in number of frames. This sets for how
40834 many number of frames effect will last for single input image.
40835 Default is 90.
40836
40837 s Set the output image size, default is 'hd720'.
40838
40839 fps Set the output frame rate, default is '25'.
40840
40841 Each expression can contain the following constants:
40842
40843 in_w, iw
40844 Input width.
40845
40846 in_h, ih
40847 Input height.
40848
40849 out_w, ow
40850 Output width.
40851
40852 out_h, oh
40853 Output height.
40854
40855 in Input frame count.
40856
40857 on Output frame count.
40858
40859 in_time, it
40860 The input timestamp expressed in seconds. It's NAN if the input
40861 timestamp is unknown.
40862
40863 out_time, time, ot
40864 The output timestamp expressed in seconds.
40865
40866 x
40867 y Last calculated 'x' and 'y' position from 'x' and 'y' expression
40868 for current input frame.
40869
40870 px
40871 py 'x' and 'y' of last output frame of previous input frame or 0 when
40872 there was not yet such frame (first input frame).
40873
40874 zoom
40875 Last calculated zoom from 'z' expression for current input frame.
40876
40877 pzoom
40878 Last calculated zoom of last output frame of previous input frame.
40879
40880 duration
40881 Number of output frames for current input frame. Calculated from
40882 'd' expression for each input frame.
40883
40884 pduration
40885 number of output frames created for previous input frame
40886
40887 a Rational number: input width / input height
40888
40889 sar sample aspect ratio
40890
40891 dar display aspect ratio
40892
40893 Examples
40894
40895 • Zoom in up to 1.5x and pan at same time to some spot near center of
40896 picture:
40897
40898 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
40899
40900 • Zoom in up to 1.5x and pan always at center of picture:
40901
40902 zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
40903
40904 • Same as above but without pausing:
40905
40906 zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
40907
40908 • Zoom in 2x into center of picture only for the first second of the
40909 input video:
40910
40911 zoompan=z='if(between(in_time,0,1),2,1)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
40912
40913 zscale
40914 Scale (resize) the input video, using the z.lib library:
40915 <https://github.com/sekrit-twc/zimg>. To enable compilation of this
40916 filter, you need to configure FFmpeg with "--enable-libzimg".
40917
40918 The zscale filter forces the output display aspect ratio to be the same
40919 as the input, by changing the output sample aspect ratio.
40920
40921 If the input image format is different from the format requested by the
40922 next filter, the zscale filter will convert the input to the requested
40923 format.
40924
40925 Options
40926
40927 The filter accepts the following options.
40928
40929 width, w
40930 height, h
40931 Set the output video dimension expression. Default value is the
40932 input dimension.
40933
40934 If the width or w value is 0, the input width is used for the
40935 output. If the height or h value is 0, the input height is used for
40936 the output.
40937
40938 If one and only one of the values is -n with n >= 1, the zscale
40939 filter will use a value that maintains the aspect ratio of the
40940 input image, calculated from the other specified dimension. After
40941 that it will, however, make sure that the calculated dimension is
40942 divisible by n and adjust the value if necessary.
40943
40944 If both values are -n with n >= 1, the behavior will be identical
40945 to both values being set to 0 as previously detailed.
40946
40947 See below for the list of accepted constants for use in the
40948 dimension expression.
40949
40950 size, s
40951 Set the video size. For the syntax of this option, check the "Video
40952 size" section in the ffmpeg-utils manual.
40953
40954 dither, d
40955 Set the dither type.
40956
40957 Possible values are:
40958
40959 none
40960 ordered
40961 random
40962 error_diffusion
40963
40964 Default is none.
40965
40966 filter, f
40967 Set the resize filter type.
40968
40969 Possible values are:
40970
40971 point
40972 bilinear
40973 bicubic
40974 spline16
40975 spline36
40976 lanczos
40977
40978 Default is bilinear.
40979
40980 range, r
40981 Set the color range.
40982
40983 Possible values are:
40984
40985 input
40986 limited
40987 full
40988
40989 Default is same as input.
40990
40991 primaries, p
40992 Set the color primaries.
40993
40994 Possible values are:
40995
40996 input
40997 709
40998 unspecified
40999 170m
41000 240m
41001 2020
41002
41003 Default is same as input.
41004
41005 transfer, t
41006 Set the transfer characteristics.
41007
41008 Possible values are:
41009
41010 input
41011 709
41012 unspecified
41013 601
41014 linear
41015 2020_10
41016 2020_12
41017 smpte2084
41018 iec61966-2-1
41019 arib-std-b67
41020
41021 Default is same as input.
41022
41023 matrix, m
41024 Set the colorspace matrix.
41025
41026 Possible value are:
41027
41028 input
41029 709
41030 unspecified
41031 470bg
41032 170m
41033 2020_ncl
41034 2020_cl
41035
41036 Default is same as input.
41037
41038 rangein, rin
41039 Set the input color range.
41040
41041 Possible values are:
41042
41043 input
41044 limited
41045 full
41046
41047 Default is same as input.
41048
41049 primariesin, pin
41050 Set the input color primaries.
41051
41052 Possible values are:
41053
41054 input
41055 709
41056 unspecified
41057 170m
41058 240m
41059 2020
41060
41061 Default is same as input.
41062
41063 transferin, tin
41064 Set the input transfer characteristics.
41065
41066 Possible values are:
41067
41068 input
41069 709
41070 unspecified
41071 601
41072 linear
41073 2020_10
41074 2020_12
41075
41076 Default is same as input.
41077
41078 matrixin, min
41079 Set the input colorspace matrix.
41080
41081 Possible value are:
41082
41083 input
41084 709
41085 unspecified
41086 470bg
41087 170m
41088 2020_ncl
41089 2020_cl
41090 chromal, c
41091 Set the output chroma location.
41092
41093 Possible values are:
41094
41095 input
41096 left
41097 center
41098 topleft
41099 top
41100 bottomleft
41101 bottom
41102 chromalin, cin
41103 Set the input chroma location.
41104
41105 Possible values are:
41106
41107 input
41108 left
41109 center
41110 topleft
41111 top
41112 bottomleft
41113 bottom
41114 npl Set the nominal peak luminance.
41115
41116 param_a
41117 Parameter A for scaling filters. Parameter "b" for bicubic, and the
41118 number of filter taps for lanczos.
41119
41120 param_b
41121 Parameter B for scaling filters. Parameter "c" for bicubic.
41122
41123 The values of the w and h options are expressions containing the
41124 following constants:
41125
41126 in_w
41127 in_h
41128 The input width and height
41129
41130 iw
41131 ih These are the same as in_w and in_h.
41132
41133 out_w
41134 out_h
41135 The output (scaled) width and height
41136
41137 ow
41138 oh These are the same as out_w and out_h
41139
41140 a The same as iw / ih
41141
41142 sar input sample aspect ratio
41143
41144 dar The input display aspect ratio. Calculated from "(iw / ih) * sar".
41145
41146 hsub
41147 vsub
41148 horizontal and vertical input chroma subsample values. For example
41149 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
41150
41151 ohsub
41152 ovsub
41153 horizontal and vertical output chroma subsample values. For example
41154 for the pixel format "yuv422p" hsub is 2 and vsub is 1.
41155
41156 Commands
41157
41158 This filter supports the following commands:
41159
41160 width, w
41161 height, h
41162 Set the output video dimension expression. The command accepts the
41163 same syntax of the corresponding option.
41164
41165 If the specified expression is not valid, it is kept at its current
41166 value.
41167
41169 Below is a description of the currently available OpenCL video filters.
41170
41171 To enable compilation of these filters you need to configure FFmpeg
41172 with "--enable-opencl".
41173
41174 Running OpenCL filters requires you to initialize a hardware device and
41175 to pass that device to all filters in any filter graph.
41176
41177 -init_hw_device opencl[=name][:device[,key=value...]]
41178 Initialise a new hardware device of type opencl called name, using
41179 the given device parameters.
41180
41181 -filter_hw_device name
41182 Pass the hardware device called name to all filters in any filter
41183 graph.
41184
41185 For more detailed information see
41186 <https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options>
41187
41188 • Example of choosing the first device on the second platform and
41189 running avgblur_opencl filter with default parameters on it.
41190
41191 -init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf "hwupload, avgblur_opencl, hwdownload" OUTPUT
41192
41193 Since OpenCL filters are not able to access frame data in normal
41194 memory, all frame data needs to be uploaded(hwupload) to hardware
41195 surfaces connected to the appropriate device before being used and then
41196 downloaded(hwdownload) back to normal memory. Note that hwupload will
41197 upload to a surface with the same layout as the software frame, so it
41198 may be necessary to add a format filter immediately before to get the
41199 input into the right format and hwdownload does not support all formats
41200 on the output - it may be necessary to insert an additional format
41201 filter immediately following in the graph to get the output in a
41202 supported format.
41203
41204 avgblur_opencl
41205 Apply average blur filter.
41206
41207 The filter accepts the following options:
41208
41209 sizeX
41210 Set horizontal radius size. Range is "[1, 1024]" and default value
41211 is 1.
41212
41213 planes
41214 Set which planes to filter. Default value is 0xf, by which all
41215 planes are processed.
41216
41217 sizeY
41218 Set vertical radius size. Range is "[1, 1024]" and default value is
41219 0. If zero, "sizeX" value will be used.
41220
41221 Example
41222
41223 • Apply average blur filter with horizontal and vertical size of 3,
41224 setting each pixel of the output to the average value of the 7x7
41225 region centered on it in the input. For pixels on the edges of the
41226 image, the region does not extend beyond the image boundaries, and
41227 so out-of-range coordinates are not used in the calculations.
41228
41229 -i INPUT -vf "hwupload, avgblur_opencl=3, hwdownload" OUTPUT
41230
41231 boxblur_opencl
41232 Apply a boxblur algorithm to the input video.
41233
41234 It accepts the following parameters:
41235
41236 luma_radius, lr
41237 luma_power, lp
41238 chroma_radius, cr
41239 chroma_power, cp
41240 alpha_radius, ar
41241 alpha_power, ap
41242
41243 A description of the accepted options follows.
41244
41245 luma_radius, lr
41246 chroma_radius, cr
41247 alpha_radius, ar
41248 Set an expression for the box radius in pixels used for blurring
41249 the corresponding input plane.
41250
41251 The radius value must be a non-negative number, and must not be
41252 greater than the value of the expression "min(w,h)/2" for the luma
41253 and alpha planes, and of "min(cw,ch)/2" for the chroma planes.
41254
41255 Default value for luma_radius is "2". If not specified,
41256 chroma_radius and alpha_radius default to the corresponding value
41257 set for luma_radius.
41258
41259 The expressions can contain the following constants:
41260
41261 w
41262 h The input width and height in pixels.
41263
41264 cw
41265 ch The input chroma image width and height in pixels.
41266
41267 hsub
41268 vsub
41269 The horizontal and vertical chroma subsample values. For
41270 example, for the pixel format "yuv422p", hsub is 2 and vsub is
41271 1.
41272
41273 luma_power, lp
41274 chroma_power, cp
41275 alpha_power, ap
41276 Specify how many times the boxblur filter is applied to the
41277 corresponding plane.
41278
41279 Default value for luma_power is 2. If not specified, chroma_power
41280 and alpha_power default to the corresponding value set for
41281 luma_power.
41282
41283 A value of 0 will disable the effect.
41284
41285 Examples
41286
41287 Apply boxblur filter, setting each pixel of the output to the average
41288 value of box-radiuses luma_radius, chroma_radius, alpha_radius for each
41289 plane respectively. The filter will apply luma_power, chroma_power,
41290 alpha_power times onto the corresponding plane. For pixels on the edges
41291 of the image, the radius does not extend beyond the image boundaries,
41292 and so out-of-range coordinates are not used in the calculations.
41293
41294 • Apply a boxblur filter with the luma, chroma, and alpha radius set
41295 to 2 and luma, chroma, and alpha power set to 3. The filter will
41296 run 3 times with box-radius set to 2 for every plane of the image.
41297
41298 -i INPUT -vf "hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload" OUTPUT
41299 -i INPUT -vf "hwupload, boxblur_opencl=2:3, hwdownload" OUTPUT
41300
41301 • Apply a boxblur filter with luma radius set to 2, luma_power to 1,
41302 chroma_radius to 4, chroma_power to 5, alpha_radius to 3 and
41303 alpha_power to 7.
41304
41305 For the luma plane, a 2x2 box radius will be run once.
41306
41307 For the chroma plane, a 4x4 box radius will be run 5 times.
41308
41309 For the alpha plane, a 3x3 box radius will be run 7 times.
41310
41311 -i INPUT -vf "hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload" OUTPUT
41312
41313 colorkey_opencl
41314 RGB colorspace color keying.
41315
41316 The filter accepts the following options:
41317
41318 color
41319 The color which will be replaced with transparency.
41320
41321 similarity
41322 Similarity percentage with the key color.
41323
41324 0.01 matches only the exact key color, while 1.0 matches
41325 everything.
41326
41327 blend
41328 Blend percentage.
41329
41330 0.0 makes pixels either fully transparent, or not transparent at
41331 all.
41332
41333 Higher values result in semi-transparent pixels, with a higher
41334 transparency the more similar the pixels color is to the key color.
41335
41336 Examples
41337
41338 • Make every semi-green pixel in the input transparent with some
41339 slight blending:
41340
41341 -i INPUT -vf "hwupload, colorkey_opencl=green:0.3:0.1, hwdownload" OUTPUT
41342
41343 convolution_opencl
41344 Apply convolution of 3x3, 5x5, 7x7 matrix.
41345
41346 The filter accepts the following options:
41347
41348 0m
41349 1m
41350 2m
41351 3m Set matrix for each plane. Matrix is sequence of 9, 25 or 49
41352 signed numbers. Default value for each plane is "0 0 0 0 1 0 0 0
41353 0".
41354
41355 0rdiv
41356 1rdiv
41357 2rdiv
41358 3rdiv
41359 Set multiplier for calculated value for each plane. If unset or 0,
41360 it will be sum of all matrix elements. The option value must be a
41361 float number greater or equal to 0.0. Default value is 1.0.
41362
41363 0bias
41364 1bias
41365 2bias
41366 3bias
41367 Set bias for each plane. This value is added to the result of the
41368 multiplication. Useful for making the overall image brighter or
41369 darker. The option value must be a float number greater or equal
41370 to 0.0. Default value is 0.0.
41371
41372 Examples
41373
41374 • Apply sharpen:
41375
41376 -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
41377
41378 • Apply blur:
41379
41380 -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
41381
41382 • Apply edge enhance:
41383
41384 -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
41385
41386 • Apply edge detect:
41387
41388 -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
41389
41390 • Apply laplacian edge detector which includes diagonals:
41391
41392 -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
41393
41394 • Apply emboss:
41395
41396 -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
41397
41398 erosion_opencl
41399 Apply erosion effect to the video.
41400
41401 This filter replaces the pixel by the local(3x3) minimum.
41402
41403 It accepts the following options:
41404
41405 threshold0
41406 threshold1
41407 threshold2
41408 threshold3
41409 Limit the maximum change for each plane. Range is "[0, 65535]" and
41410 default value is 65535. If 0, plane will remain unchanged.
41411
41412 coordinates
41413 Flag which specifies the pixel to refer to. Range is "[0, 255]"
41414 and default value is 255, i.e. all eight pixels are used.
41415
41416 Flags to local 3x3 coordinates region centered on "x":
41417
41418 1 2 3
41419
41420 4 x 5
41421
41422 6 7 8
41423
41424 Example
41425
41426 • Apply erosion filter with threshold0 set to 30, threshold1 set 40,
41427 threshold2 set to 50 and coordinates set to 231, setting each pixel
41428 of the output to the local minimum between pixels: 1, 2, 3, 6, 7, 8
41429 of the 3x3 region centered on it in the input. If the difference
41430 between input pixel and local minimum is more then threshold of the
41431 corresponding plane, output pixel will be set to input pixel -
41432 threshold of corresponding plane.
41433
41434 -i INPUT -vf "hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
41435
41436 deshake_opencl
41437 Feature-point based video stabilization filter.
41438
41439 The filter accepts the following options:
41440
41441 tripod
41442 Simulates a tripod by preventing any camera movement whatsoever
41443 from the original frame. Defaults to 0.
41444
41445 debug
41446 Whether or not additional debug info should be displayed, both in
41447 the processed output and in the console.
41448
41449 Note that in order to see console debug output you will also need
41450 to pass "-v verbose" to ffmpeg.
41451
41452 Viewing point matches in the output video is only supported for RGB
41453 input.
41454
41455 Defaults to 0.
41456
41457 adaptive_crop
41458 Whether or not to do a tiny bit of cropping at the borders to cut
41459 down on the amount of mirrored pixels.
41460
41461 Defaults to 1.
41462
41463 refine_features
41464 Whether or not feature points should be refined at a sub-pixel
41465 level.
41466
41467 This can be turned off for a slight performance gain at the cost of
41468 precision.
41469
41470 Defaults to 1.
41471
41472 smooth_strength
41473 The strength of the smoothing applied to the camera path from 0.0
41474 to 1.0.
41475
41476 1.0 is the maximum smoothing strength while values less than that
41477 result in less smoothing.
41478
41479 0.0 causes the filter to adaptively choose a smoothing strength on
41480 a per-frame basis.
41481
41482 Defaults to 0.0.
41483
41484 smooth_window_multiplier
41485 Controls the size of the smoothing window (the number of frames
41486 buffered to determine motion information from).
41487
41488 The size of the smoothing window is determined by multiplying the
41489 framerate of the video by this number.
41490
41491 Acceptable values range from 0.1 to 10.0.
41492
41493 Larger values increase the amount of motion data available for
41494 determining how to smooth the camera path, potentially improving
41495 smoothness, but also increase latency and memory usage.
41496
41497 Defaults to 2.0.
41498
41499 Examples
41500
41501 • Stabilize a video with a fixed, medium smoothing strength:
41502
41503 -i INPUT -vf "hwupload, deshake_opencl=smooth_strength=0.5, hwdownload" OUTPUT
41504
41505 • Stabilize a video with debugging (both in console and in rendered
41506 video):
41507
41508 -i INPUT -filter_complex "[0:v]format=rgba, hwupload, deshake_opencl=debug=1, hwdownload, format=rgba, format=yuv420p" -v verbose OUTPUT
41509
41510 dilation_opencl
41511 Apply dilation effect to the video.
41512
41513 This filter replaces the pixel by the local(3x3) maximum.
41514
41515 It accepts the following options:
41516
41517 threshold0
41518 threshold1
41519 threshold2
41520 threshold3
41521 Limit the maximum change for each plane. Range is "[0, 65535]" and
41522 default value is 65535. If 0, plane will remain unchanged.
41523
41524 coordinates
41525 Flag which specifies the pixel to refer to. Range is "[0, 255]"
41526 and default value is 255, i.e. all eight pixels are used.
41527
41528 Flags to local 3x3 coordinates region centered on "x":
41529
41530 1 2 3
41531
41532 4 x 5
41533
41534 6 7 8
41535
41536 Example
41537
41538 • Apply dilation filter with threshold0 set to 30, threshold1 set 40,
41539 threshold2 set to 50 and coordinates set to 231, setting each pixel
41540 of the output to the local maximum between pixels: 1, 2, 3, 6, 7, 8
41541 of the 3x3 region centered on it in the input. If the difference
41542 between input pixel and local maximum is more then threshold of the
41543 corresponding plane, output pixel will be set to input pixel +
41544 threshold of corresponding plane.
41545
41546 -i INPUT -vf "hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload" OUTPUT
41547
41548 nlmeans_opencl
41549 Non-local Means denoise filter through OpenCL, this filter accepts same
41550 options as nlmeans.
41551
41552 overlay_opencl
41553 Overlay one video on top of another.
41554
41555 It takes two inputs and has one output. The first input is the "main"
41556 video on which the second input is overlaid. This filter requires same
41557 memory layout for all the inputs. So, format conversion may be needed.
41558
41559 The filter accepts the following options:
41560
41561 x Set the x coordinate of the overlaid video on the main video.
41562 Default value is 0.
41563
41564 y Set the y coordinate of the overlaid video on the main video.
41565 Default value is 0.
41566
41567 Examples
41568
41569 • Overlay an image LOGO at the top-left corner of the INPUT video.
41570 Both inputs are yuv420p format.
41571
41572 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
41573
41574 • The inputs have same memory layout for color channels , the overlay
41575 has additional alpha plane, like INPUT is yuv420p, and the LOGO is
41576 yuva420p.
41577
41578 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT
41579
41580 pad_opencl
41581 Add paddings to the input image, and place the original input at the
41582 provided x, y coordinates.
41583
41584 It accepts the following options:
41585
41586 width, w
41587 height, h
41588 Specify an expression for the size of the output image with the
41589 paddings added. If the value for width or height is 0, the
41590 corresponding input size is used for the output.
41591
41592 The width expression can reference the value set by the height
41593 expression, and vice versa.
41594
41595 The default value of width and height is 0.
41596
41597 x
41598 y Specify the offsets to place the input image at within the padded
41599 area, with respect to the top/left border of the output image.
41600
41601 The x expression can reference the value set by the y expression,
41602 and vice versa.
41603
41604 The default value of x and y is 0.
41605
41606 If x or y evaluate to a negative number, they'll be changed so the
41607 input image is centered on the padded area.
41608
41609 color
41610 Specify the color of the padded area. For the syntax of this
41611 option, check the "Color" section in the ffmpeg-utils manual.
41612
41613 aspect
41614 Pad to an aspect instead to a resolution.
41615
41616 The value for the width, height, x, and y options are expressions
41617 containing the following constants:
41618
41619 in_w
41620 in_h
41621 The input video width and height.
41622
41623 iw
41624 ih These are the same as in_w and in_h.
41625
41626 out_w
41627 out_h
41628 The output width and height (the size of the padded area), as
41629 specified by the width and height expressions.
41630
41631 ow
41632 oh These are the same as out_w and out_h.
41633
41634 x
41635 y The x and y offsets as specified by the x and y expressions, or NAN
41636 if not yet specified.
41637
41638 a same as iw / ih
41639
41640 sar input sample aspect ratio
41641
41642 dar input display aspect ratio, it is the same as (iw / ih) * sar
41643
41644 prewitt_opencl
41645 Apply the Prewitt operator
41646 (<https://en.wikipedia.org/wiki/Prewitt_operator>) to input video
41647 stream.
41648
41649 The filter accepts the following option:
41650
41651 planes
41652 Set which planes to filter. Default value is 0xf, by which all
41653 planes are processed.
41654
41655 scale
41656 Set value which will be multiplied with filtered result. Range is
41657 "[0.0, 65535]" and default value is 1.0.
41658
41659 delta
41660 Set value which will be added to filtered result. Range is
41661 "[-65535, 65535]" and default value is 0.0.
41662
41663 Example
41664
41665 • Apply the Prewitt operator with scale set to 2 and delta set to 10.
41666
41667 -i INPUT -vf "hwupload, prewitt_opencl=scale=2:delta=10, hwdownload" OUTPUT
41668
41669 program_opencl
41670 Filter video using an OpenCL program.
41671
41672 source
41673 OpenCL program source file.
41674
41675 kernel
41676 Kernel name in program.
41677
41678 inputs
41679 Number of inputs to the filter. Defaults to 1.
41680
41681 size, s
41682 Size of output frames. Defaults to the same as the first input.
41683
41684 The "program_opencl" filter also supports the framesync options.
41685
41686 The program source file must contain a kernel function with the given
41687 name, which will be run once for each plane of the output. Each run on
41688 a plane gets enqueued as a separate 2D global NDRange with one work-
41689 item for each pixel to be generated. The global ID offset for each
41690 work-item is therefore the coordinates of a pixel in the destination
41691 image.
41692
41693 The kernel function needs to take the following arguments:
41694
41695 • Destination image, __write_only image2d_t.
41696
41697 This image will become the output; the kernel should write all of
41698 it.
41699
41700 • Frame index, unsigned int.
41701
41702 This is a counter starting from zero and increasing by one for each
41703 frame.
41704
41705 • Source images, __read_only image2d_t.
41706
41707 These are the most recent images on each input. The kernel may
41708 read from them to generate the output, but they can't be written
41709 to.
41710
41711 Example programs:
41712
41713 • Copy the input to the output (output must be the same size as the
41714 input).
41715
41716 __kernel void copy(__write_only image2d_t destination,
41717 unsigned int index,
41718 __read_only image2d_t source)
41719 {
41720 const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
41721
41722 int2 location = (int2)(get_global_id(0), get_global_id(1));
41723
41724 float4 value = read_imagef(source, sampler, location);
41725
41726 write_imagef(destination, location, value);
41727 }
41728
41729 • Apply a simple transformation, rotating the input by an amount
41730 increasing with the index counter. Pixel values are linearly
41731 interpolated by the sampler, and the output need not have the same
41732 dimensions as the input.
41733
41734 __kernel void rotate_image(__write_only image2d_t dst,
41735 unsigned int index,
41736 __read_only image2d_t src)
41737 {
41738 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
41739 CLK_FILTER_LINEAR);
41740
41741 float angle = (float)index / 100.0f;
41742
41743 float2 dst_dim = convert_float2(get_image_dim(dst));
41744 float2 src_dim = convert_float2(get_image_dim(src));
41745
41746 float2 dst_cen = dst_dim / 2.0f;
41747 float2 src_cen = src_dim / 2.0f;
41748
41749 int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
41750
41751 float2 dst_pos = convert_float2(dst_loc) - dst_cen;
41752 float2 src_pos = {
41753 cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
41754 sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
41755 };
41756 src_pos = src_pos * src_dim / dst_dim;
41757
41758 float2 src_loc = src_pos + src_cen;
41759
41760 if (src_loc.x < 0.0f || src_loc.y < 0.0f ||
41761 src_loc.x > src_dim.x || src_loc.y > src_dim.y)
41762 write_imagef(dst, dst_loc, 0.5f);
41763 else
41764 write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
41765 }
41766
41767 • Blend two inputs together, with the amount of each input used
41768 varying with the index counter.
41769
41770 __kernel void blend_images(__write_only image2d_t dst,
41771 unsigned int index,
41772 __read_only image2d_t src1,
41773 __read_only image2d_t src2)
41774 {
41775 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
41776 CLK_FILTER_LINEAR);
41777
41778 float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
41779
41780 int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
41781 int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
41782 int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
41783
41784 float4 val1 = read_imagef(src1, sampler, src1_loc);
41785 float4 val2 = read_imagef(src2, sampler, src2_loc);
41786
41787 write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
41788 }
41789
41790 remap_opencl
41791 Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
41792
41793 Destination pixel at position (X, Y) will be picked from source (x, y)
41794 position where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are
41795 out of range, zero value for pixel will be used for destination pixel.
41796
41797 Xmap and Ymap input video streams must be of same dimensions. Output
41798 video stream will have Xmap/Ymap video stream dimensions. Xmap and
41799 Ymap input video streams are 32bit float pixel format, single channel.
41800
41801 interp
41802 Specify interpolation used for remapping of pixels. Allowed values
41803 are "near" and "linear". Default value is "linear".
41804
41805 fill
41806 Specify the color of the unmapped pixels. For the syntax of this
41807 option, check the "Color" section in the ffmpeg-utils manual.
41808 Default color is "black".
41809
41810 roberts_opencl
41811 Apply the Roberts cross operator
41812 (<https://en.wikipedia.org/wiki/Roberts_cross>) to input video stream.
41813
41814 The filter accepts the following option:
41815
41816 planes
41817 Set which planes to filter. Default value is 0xf, by which all
41818 planes are processed.
41819
41820 scale
41821 Set value which will be multiplied with filtered result. Range is
41822 "[0.0, 65535]" and default value is 1.0.
41823
41824 delta
41825 Set value which will be added to filtered result. Range is
41826 "[-65535, 65535]" and default value is 0.0.
41827
41828 Example
41829
41830 • Apply the Roberts cross operator with scale set to 2 and delta set
41831 to 10
41832
41833 -i INPUT -vf "hwupload, roberts_opencl=scale=2:delta=10, hwdownload" OUTPUT
41834
41835 sobel_opencl
41836 Apply the Sobel operator
41837 (<https://en.wikipedia.org/wiki/Sobel_operator>) to input video stream.
41838
41839 The filter accepts the following option:
41840
41841 planes
41842 Set which planes to filter. Default value is 0xf, by which all
41843 planes are processed.
41844
41845 scale
41846 Set value which will be multiplied with filtered result. Range is
41847 "[0.0, 65535]" and default value is 1.0.
41848
41849 delta
41850 Set value which will be added to filtered result. Range is
41851 "[-65535, 65535]" and default value is 0.0.
41852
41853 Example
41854
41855 • Apply sobel operator with scale set to 2 and delta set to 10
41856
41857 -i INPUT -vf "hwupload, sobel_opencl=scale=2:delta=10, hwdownload" OUTPUT
41858
41859 tonemap_opencl
41860 Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
41861
41862 It accepts the following parameters:
41863
41864 tonemap
41865 Specify the tone-mapping operator to be used. Same as tonemap
41866 option in tonemap.
41867
41868 param
41869 Tune the tone mapping algorithm. same as param option in tonemap.
41870
41871 desat
41872 Apply desaturation for highlights that exceed this level of
41873 brightness. The higher the parameter, the more color information
41874 will be preserved. This setting helps prevent unnaturally blown-out
41875 colors for super-highlights, by (smoothly) turning into white
41876 instead. This makes images feel more natural, at the cost of
41877 reducing information about out-of-range colors.
41878
41879 The default value is 0.5, and the algorithm here is a little
41880 different from the cpu version tonemap currently. A setting of 0.0
41881 disables this option.
41882
41883 threshold
41884 The tonemapping algorithm parameters is fine-tuned per each scene.
41885 And a threshold is used to detect whether the scene has changed or
41886 not. If the distance between the current frame average brightness
41887 and the current running average exceeds a threshold value, we would
41888 re-calculate scene average and peak brightness. The default value
41889 is 0.2.
41890
41891 format
41892 Specify the output pixel format.
41893
41894 Currently supported formats are:
41895
41896 p010
41897 nv12
41898 range, r
41899 Set the output color range.
41900
41901 Possible values are:
41902
41903 tv/mpeg
41904 pc/jpeg
41905
41906 Default is same as input.
41907
41908 primaries, p
41909 Set the output color primaries.
41910
41911 Possible values are:
41912
41913 bt709
41914 bt2020
41915
41916 Default is same as input.
41917
41918 transfer, t
41919 Set the output transfer characteristics.
41920
41921 Possible values are:
41922
41923 bt709
41924 bt2020
41925
41926 Default is bt709.
41927
41928 matrix, m
41929 Set the output colorspace matrix.
41930
41931 Possible value are:
41932
41933 bt709
41934 bt2020
41935
41936 Default is same as input.
41937
41938 Example
41939
41940 • Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010
41941 format using linear operator.
41942
41943 -i INPUT -vf "format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010" OUTPUT
41944
41945 unsharp_opencl
41946 Sharpen or blur the input video.
41947
41948 It accepts the following parameters:
41949
41950 luma_msize_x, lx
41951 Set the luma matrix horizontal size. Range is "[1, 23]" and
41952 default value is 5.
41953
41954 luma_msize_y, ly
41955 Set the luma matrix vertical size. Range is "[1, 23]" and default
41956 value is 5.
41957
41958 luma_amount, la
41959 Set the luma effect strength. Range is "[-10, 10]" and default
41960 value is 1.0.
41961
41962 Negative values will blur the input video, while positive values
41963 will sharpen it, a value of zero will disable the effect.
41964
41965 chroma_msize_x, cx
41966 Set the chroma matrix horizontal size. Range is "[1, 23]" and
41967 default value is 5.
41968
41969 chroma_msize_y, cy
41970 Set the chroma matrix vertical size. Range is "[1, 23]" and
41971 default value is 5.
41972
41973 chroma_amount, ca
41974 Set the chroma effect strength. Range is "[-10, 10]" and default
41975 value is 0.0.
41976
41977 Negative values will blur the input video, while positive values
41978 will sharpen it, a value of zero will disable the effect.
41979
41980 All parameters are optional and default to the equivalent of the string
41981 '5:5:1.0:5:5:0.0'.
41982
41983 Examples
41984
41985 • Apply strong luma sharpen effect:
41986
41987 -i INPUT -vf "hwupload, unsharp_opencl=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5, hwdownload" OUTPUT
41988
41989 • Apply a strong blur of both luma and chroma parameters:
41990
41991 -i INPUT -vf "hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload" OUTPUT
41992
41993 xfade_opencl
41994 Cross fade two videos with custom transition effect by using OpenCL.
41995
41996 It accepts the following options:
41997
41998 transition
41999 Set one of possible transition effects.
42000
42001 custom
42002 Select custom transition effect, the actual transition
42003 description will be picked from source and kernel options.
42004
42005 fade
42006 wipeleft
42007 wiperight
42008 wipeup
42009 wipedown
42010 slideleft
42011 slideright
42012 slideup
42013 slidedown
42014 Default transition is fade.
42015
42016 source
42017 OpenCL program source file for custom transition.
42018
42019 kernel
42020 Set name of kernel to use for custom transition from program source
42021 file.
42022
42023 duration
42024 Set duration of video transition.
42025
42026 offset
42027 Set time of start of transition relative to first video.
42028
42029 The program source file must contain a kernel function with the given
42030 name, which will be run once for each plane of the output. Each run on
42031 a plane gets enqueued as a separate 2D global NDRange with one work-
42032 item for each pixel to be generated. The global ID offset for each
42033 work-item is therefore the coordinates of a pixel in the destination
42034 image.
42035
42036 The kernel function needs to take the following arguments:
42037
42038 • Destination image, __write_only image2d_t.
42039
42040 This image will become the output; the kernel should write all of
42041 it.
42042
42043 • First Source image, __read_only image2d_t. Second Source image,
42044 __read_only image2d_t.
42045
42046 These are the most recent images on each input. The kernel may
42047 read from them to generate the output, but they can't be written
42048 to.
42049
42050 • Transition progress, float. This value is always between 0 and 1
42051 inclusive.
42052
42053 Example programs:
42054
42055 • Apply dots curtain transition effect:
42056
42057 __kernel void blend_images(__write_only image2d_t dst,
42058 __read_only image2d_t src1,
42059 __read_only image2d_t src2,
42060 float progress)
42061 {
42062 const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
42063 CLK_FILTER_LINEAR);
42064 int2 p = (int2)(get_global_id(0), get_global_id(1));
42065 float2 rp = (float2)(get_global_id(0), get_global_id(1));
42066 float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
42067 rp = rp / dim;
42068
42069 float2 dots = (float2)(20.0, 20.0);
42070 float2 center = (float2)(0,0);
42071 float2 unused;
42072
42073 float4 val1 = read_imagef(src1, sampler, p);
42074 float4 val2 = read_imagef(src2, sampler, p);
42075 bool next = distance(fract(rp * dots, &unused), (float2)(0.5, 0.5)) < (progress / distance(rp, center));
42076
42077 write_imagef(dst, p, next ? val1 : val2);
42078 }
42079
42081 VAAPI Video filters are usually used with VAAPI decoder and VAAPI
42082 encoder. Below is a description of VAAPI video filters.
42083
42084 To enable compilation of these filters you need to configure FFmpeg
42085 with "--enable-vaapi".
42086
42087 To use vaapi filters, you need to setup the vaapi device correctly. For
42088 more information, please read
42089 <https://trac.ffmpeg.org/wiki/Hardware/VAAPI>
42090
42091 overlay_vaapi
42092 Overlay one video on the top of another.
42093
42094 It takes two inputs and has one output. The first input is the "main"
42095 video on which the second input is overlaid.
42096
42097 The filter accepts the following options:
42098
42099 x
42100 y Set expressions for the x and y coordinates of the overlaid video
42101 on the main video.
42102
42103 Default value is "0" for both expressions.
42104
42105 w
42106 h Set expressions for the width and height the overlaid video on the
42107 main video.
42108
42109 Default values are 'overlay_iw' for 'w' and
42110 'overlay_ih*w/overlay_iw' for 'h'.
42111
42112 The expressions can contain the following parameters:
42113
42114 main_w, W
42115 main_h, H
42116 The main input width and height.
42117
42118 overlay_iw
42119 overlay_ih
42120 The overlay input width and height.
42121
42122 overlay_w, w
42123 overlay_h, h
42124 The overlay output width and height.
42125
42126 overlay_x, x
42127 overlay_y, y
42128 Position of the overlay layer inside of main
42129
42130 alpha
42131 Set transparency of overlaid video. Allowed range is 0.0 to 1.0.
42132 Higher value means lower transparency. Default value is 1.0.
42133
42134 eof_action
42135 See framesync.
42136
42137 shortest
42138 See framesync.
42139
42140 repeatlast
42141 See framesync.
42142
42143 This filter also supports the framesync options.
42144
42145 Examples
42146
42147 • Overlay an image LOGO at the top-left corner of the INPUT video.
42148 Both inputs for this filter are yuv420p format.
42149
42150 -i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_vaapi" OUTPUT
42151
42152 • Overlay an image LOGO at the offset (200, 100) from the top-left
42153 corner of the INPUT video. The inputs have same memory layout for
42154 color channels, the overlay has additional alpha plane, like INPUT
42155 is yuv420p, and the LOGO is yuva420p.
42156
42157 -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
42158
42159 tonemap_vaapi
42160 Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range)
42161 conversion with tone-mapping. It maps the dynamic range of HDR10
42162 content to the SDR content. It currently only accepts HDR10 as input.
42163
42164 It accepts the following parameters:
42165
42166 format
42167 Specify the output pixel format.
42168
42169 Currently supported formats are:
42170
42171 p010
42172 nv12
42173
42174 Default is nv12.
42175
42176 primaries, p
42177 Set the output color primaries.
42178
42179 Default is same as input.
42180
42181 transfer, t
42182 Set the output transfer characteristics.
42183
42184 Default is bt709.
42185
42186 matrix, m
42187 Set the output colorspace matrix.
42188
42189 Default is same as input.
42190
42191 Example
42192
42193 • Convert HDR(HDR10) video to bt2020-transfer-characteristic p010
42194 format
42195
42196 tonemap_vaapi=format=p010:t=bt2020-10
42197
42198 hstack_vaapi
42199 Stack input videos horizontally.
42200
42201 This is the VA-API variant of the hstack filter, each input stream may
42202 have different height, this filter will scale down/up each input stream
42203 while keeping the orignal aspect.
42204
42205 It accepts the following options:
42206
42207 inputs
42208 See hstack.
42209
42210 shortest
42211 See hstack.
42212
42213 height
42214 Set height of output. If set to 0, this filter will set height of
42215 output to height of the first input stream. Default value is 0.
42216
42217 vstack_vaapi
42218 Stack input videos vertically.
42219
42220 This is the VA-API variant of the vstack filter, each input stream may
42221 have different width, this filter will scale down/up each input stream
42222 while keeping the orignal aspect.
42223
42224 It accepts the following options:
42225
42226 inputs
42227 See vstack.
42228
42229 shortest
42230 See vstack.
42231
42232 width
42233 Set width of output. If set to 0, this filter will set width of
42234 output to width of the first input stream. Default value is 0.
42235
42236 xstack_vaapi
42237 Stack video inputs into custom layout.
42238
42239 This is the VA-API variant of the xstack filter, each input stream may
42240 have different size, this filter will scale down/up each input stream
42241 to the given output size, or the size of the first input stream.
42242
42243 It accepts the following options:
42244
42245 inputs
42246 See xstack.
42247
42248 shortest
42249 See xstack.
42250
42251 layout
42252 See xstack. Moreover, this permits the user to supply output size
42253 for each input stream.
42254
42255 xstack_vaapi=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080
42256
42257 grid
42258 See xstack.
42259
42260 grid_tile_size
42261 Set output size for each input stream when grid is set. If this
42262 option is not set, this filter will set output size by default to
42263 the size of the first input stream. For the syntax of this option,
42264 check the "Video size" section in the ffmpeg-utils manual.
42265
42266 fill
42267 See xstack.
42268
42270 Below is a description of the currently available QSV video filters.
42271
42272 To enable compilation of these filters you need to configure FFmpeg
42273 with "--enable-libmfx" or "--enable-libvpl".
42274
42275 To use QSV filters, you need to setup the QSV device correctly. For
42276 more information, please read
42277 <https://trac.ffmpeg.org/wiki/Hardware/QuickSync>
42278
42279 hstack_qsv
42280 Stack input videos horizontally.
42281
42282 This is the QSV variant of the hstack filter, each input stream may
42283 have different height, this filter will scale down/up each input stream
42284 while keeping the orignal aspect.
42285
42286 It accepts the following options:
42287
42288 inputs
42289 See hstack.
42290
42291 shortest
42292 See hstack.
42293
42294 height
42295 Set height of output. If set to 0, this filter will set height of
42296 output to height of the first input stream. Default value is 0.
42297
42298 vstack_qsv
42299 Stack input videos vertically.
42300
42301 This is the QSV variant of the vstack filter, each input stream may
42302 have different width, this filter will scale down/up each input stream
42303 while keeping the orignal aspect.
42304
42305 It accepts the following options:
42306
42307 inputs
42308 See vstack.
42309
42310 shortest
42311 See vstack.
42312
42313 width
42314 Set width of output. If set to 0, this filter will set width of
42315 output to width of the first input stream. Default value is 0.
42316
42317 xstack_qsv
42318 Stack video inputs into custom layout.
42319
42320 This is the QSV variant of the xstack filter.
42321
42322 It accepts the following options:
42323
42324 inputs
42325 See xstack.
42326
42327 shortest
42328 See xstack.
42329
42330 layout
42331 See xstack. Moreover, this permits the user to supply output size
42332 for each input stream.
42333
42334 xstack_qsv=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080
42335
42336 grid
42337 See xstack.
42338
42339 grid_tile_size
42340 Set output size for each input stream when grid is set. If this
42341 option is not set, this filter will set output size by default to
42342 the size of the first input stream. For the syntax of this option,
42343 check the "Video size" section in the ffmpeg-utils manual.
42344
42345 fill
42346 See xstack.
42347
42349 Below is a description of the currently available video sources.
42350
42351 buffer
42352 Buffer video frames, and make them available to the filter chain.
42353
42354 This source is mainly intended for a programmatic use, in particular
42355 through the interface defined in libavfilter/buffersrc.h.
42356
42357 It accepts the following parameters:
42358
42359 video_size
42360 Specify the size (width and height) of the buffered video frames.
42361 For the syntax of this option, check the "Video size" section in
42362 the ffmpeg-utils manual.
42363
42364 width
42365 The input video width.
42366
42367 height
42368 The input video height.
42369
42370 pix_fmt
42371 A string representing the pixel format of the buffered video
42372 frames. It may be a number corresponding to a pixel format, or a
42373 pixel format name.
42374
42375 time_base
42376 Specify the timebase assumed by the timestamps of the buffered
42377 frames.
42378
42379 frame_rate
42380 Specify the frame rate expected for the video stream.
42381
42382 pixel_aspect, sar
42383 The sample (pixel) aspect ratio of the input video.
42384
42385 hw_frames_ctx
42386 When using a hardware pixel format, this should be a reference to
42387 an AVHWFramesContext describing input frames.
42388
42389 For example:
42390
42391 buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
42392
42393 will instruct the source to accept video frames with size 320x240 and
42394 with format "yuv410p", assuming 1/24 as the timestamps timebase and
42395 square pixels (1:1 sample aspect ratio). Since the pixel format with
42396 name "yuv410p" corresponds to the number 6 (check the enum
42397 AVPixelFormat definition in libavutil/pixfmt.h), this example
42398 corresponds to:
42399
42400 buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
42401
42402 Alternatively, the options can be specified as a flat string, but this
42403 syntax is deprecated:
42404
42405 width:height:pix_fmt:time_base.num:time_base.den:pixel_aspect.num:pixel_aspect.den
42406
42407 cellauto
42408 Create a pattern generated by an elementary cellular automaton.
42409
42410 The initial state of the cellular automaton can be defined through the
42411 filename and pattern options. If such options are not specified an
42412 initial state is created randomly.
42413
42414 At each new frame a new row in the video is filled with the result of
42415 the cellular automaton next generation. The behavior when the whole
42416 frame is filled is defined by the scroll option.
42417
42418 This source accepts the following options:
42419
42420 filename, f
42421 Read the initial cellular automaton state, i.e. the starting row,
42422 from the specified file. In the file, each non-whitespace
42423 character is considered an alive cell, a newline will terminate the
42424 row, and further characters in the file will be ignored.
42425
42426 pattern, p
42427 Read the initial cellular automaton state, i.e. the starting row,
42428 from the specified string.
42429
42430 Each non-whitespace character in the string is considered an alive
42431 cell, a newline will terminate the row, and further characters in
42432 the string will be ignored.
42433
42434 rate, r
42435 Set the video rate, that is the number of frames generated per
42436 second. Default is 25.
42437
42438 random_fill_ratio, ratio
42439 Set the random fill ratio for the initial cellular automaton row.
42440 It is a floating point number value ranging from 0 to 1, defaults
42441 to 1/PHI.
42442
42443 This option is ignored when a file or a pattern is specified.
42444
42445 random_seed, seed
42446 Set the seed for filling randomly the initial row, must be an
42447 integer included between 0 and UINT32_MAX. If not specified, or if
42448 explicitly set to -1, the filter will try to use a good random seed
42449 on a best effort basis.
42450
42451 rule
42452 Set the cellular automaton rule, it is a number ranging from 0 to
42453 255. Default value is 110.
42454
42455 size, s
42456 Set the size of the output video. For the syntax of this option,
42457 check the "Video size" section in the ffmpeg-utils manual.
42458
42459 If filename or pattern is specified, the size is set by default to
42460 the width of the specified initial state row, and the height is set
42461 to width * PHI.
42462
42463 If size is set, it must contain the width of the specified pattern
42464 string, and the specified pattern will be centered in the larger
42465 row.
42466
42467 If a filename or a pattern string is not specified, the size value
42468 defaults to "320x518" (used for a randomly generated initial
42469 state).
42470
42471 scroll
42472 If set to 1, scroll the output upward when all the rows in the
42473 output have been already filled. If set to 0, the new generated row
42474 will be written over the top row just after the bottom row is
42475 filled. Defaults to 1.
42476
42477 start_full, full
42478 If set to 1, completely fill the output with generated rows before
42479 outputting the first frame. This is the default behavior, for
42480 disabling set the value to 0.
42481
42482 stitch
42483 If set to 1, stitch the left and right row edges together. This is
42484 the default behavior, for disabling set the value to 0.
42485
42486 Examples
42487
42488 • Read the initial state from pattern, and specify an output of size
42489 200x400.
42490
42491 cellauto=f=pattern:s=200x400
42492
42493 • Generate a random initial row with a width of 200 cells, with a
42494 fill ratio of 2/3:
42495
42496 cellauto=ratio=2/3:s=200x200
42497
42498 • Create a pattern generated by rule 18 starting by a single alive
42499 cell centered on an initial row with width 100:
42500
42501 cellauto=p=@s=100x400:full=0:rule=18
42502
42503 • Specify a more elaborated initial pattern:
42504
42505 cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
42506
42507 coreimagesrc
42508 Video source generated on GPU using Apple's CoreImage API on OSX.
42509
42510 This video source is a specialized version of the coreimage video
42511 filter. Use a core image generator at the beginning of the applied
42512 filterchain to generate the content.
42513
42514 The coreimagesrc video source accepts the following options:
42515
42516 list_generators
42517 List all available generators along with all their respective
42518 options as well as possible minimum and maximum values along with
42519 the default values.
42520
42521 list_generators=true
42522
42523 size, s
42524 Specify the size of the sourced video. For the syntax of this
42525 option, check the "Video size" section in the ffmpeg-utils manual.
42526 The default value is "320x240".
42527
42528 rate, r
42529 Specify the frame rate of the sourced video, as the number of
42530 frames generated per second. It has to be a string in the format
42531 frame_rate_num/frame_rate_den, an integer number, a floating point
42532 number or a valid video frame rate abbreviation. The default value
42533 is "25".
42534
42535 sar Set the sample aspect ratio of the sourced video.
42536
42537 duration, d
42538 Set the duration of the sourced video. See the Time duration
42539 section in the ffmpeg-utils(1) manual for the accepted syntax.
42540
42541 If not specified, or the expressed duration is negative, the video
42542 is supposed to be generated forever.
42543
42544 Additionally, all options of the coreimage video filter are accepted.
42545 A complete filterchain can be used for further processing of the
42546 generated input without CPU-HOST transfer. See coreimage documentation
42547 and examples for details.
42548
42549 Examples
42550
42551 • Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
42552 given as complete and escaped command-line for Apple's standard
42553 bash shell:
42554
42555 ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
42556
42557 This example is equivalent to the QRCode example of coreimage
42558 without the need for a nullsrc video source.
42559
42560 ddagrab
42561 Captures the Windows Desktop via Desktop Duplication API.
42562
42563 The filter exclusively returns D3D11 Hardware Frames, for on-gpu
42564 encoding or processing. So an explicit hwdownload is needed for any
42565 kind of software processing.
42566
42567 It accepts the following options:
42568
42569 output_idx
42570 DXGI Output Index to capture.
42571
42572 Usually corresponds to the index Windows has given the screen minus
42573 one, so it's starting at 0.
42574
42575 Defaults to output 0.
42576
42577 draw_mouse
42578 Whether to draw the mouse cursor.
42579
42580 Defaults to true.
42581
42582 Only affects hardware cursors. If a game or application renders its
42583 own cursor, it'll always be captured.
42584
42585 framerate
42586 Framerate at which the desktop will be captured.
42587
42588 Defaults to 30 FPS.
42589
42590 video_size
42591 Specify the size of the captured video.
42592
42593 Defaults to the full size of the screen.
42594
42595 Cropped from the bottom/right if smaller than screen size.
42596
42597 offset_x
42598 Horizontal offset of the captured video.
42599
42600 offset_y
42601 Vertical offset of the captured video.
42602
42603 output_fmt
42604 Desired filter output format. Defaults to 8 Bit BGRA.
42605
42606 It accepts the following values:
42607
42608 auto
42609 Passes all supported output formats to DDA and returns what DDA
42610 decides to use.
42611
42612 8bit
42613 bgra
42614 8 Bit formats always work, and DDA will convert to them if
42615 neccesary.
42616
42617 10bit
42618 x2bgr10
42619 Filter initialization will fail if 10 bit format is requested
42620 but unavailable.
42621
42622 Examples
42623
42624 Capture primary screen and encode using nvenc:
42625
42626 ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 output.mp4
42627
42628 You can also skip the lavfi device and directly use the filter. Also
42629 demonstrates downloading the frame and encoding with libx264. Explicit
42630 output format specification is required in this case:
42631
42632 ffmpeg -filter_complex ddagrab=output_idx=1:framerate=60,hwdownload,format=bgra -c:v libx264 -crf 18 output.mp4
42633
42634 If you want to capture only a subsection of the desktop, this can be
42635 achieved by specifying a smaller size and its offsets into the screen:
42636
42637 ddagrab=video_size=800x600:offset_x=100:offset_y=100
42638
42639 gradients
42640 Generate several gradients.
42641
42642 size, s
42643 Set frame size. For the syntax of this option, check the "Video
42644 size" section in the ffmpeg-utils manual. Default value is
42645 "640x480".
42646
42647 rate, r
42648 Set frame rate, expressed as number of frames per second. Default
42649 value is "25".
42650
42651 c0, c1, c2, c3, c4, c5, c6, c7
42652 Set 8 colors. Default values for colors is to pick random one.
42653
42654 x0, y0, y0, y1
42655 Set gradient line source and destination points. If negative or out
42656 of range, random ones are picked.
42657
42658 nb_colors, n
42659 Set number of colors to use at once. Allowed range is from 2 to 8.
42660 Default value is 2.
42661
42662 seed
42663 Set seed for picking gradient line points.
42664
42665 duration, d
42666 Set the duration of the sourced video. See the Time duration
42667 section in the ffmpeg-utils(1) manual for the accepted syntax.
42668
42669 If not specified, or the expressed duration is negative, the video
42670 is supposed to be generated forever.
42671
42672 speed
42673 Set speed of gradients rotation.
42674
42675 type, t
42676 Set type of gradients, can be "linear" or "radial" or "circular" or
42677 "spiral".
42678
42679 mandelbrot
42680 Generate a Mandelbrot set fractal, and progressively zoom towards the
42681 point specified with start_x and start_y.
42682
42683 This source accepts the following options:
42684
42685 end_pts
42686 Set the terminal pts value. Default value is 400.
42687
42688 end_scale
42689 Set the terminal scale value. Must be a floating point value.
42690 Default value is 0.3.
42691
42692 inner
42693 Set the inner coloring mode, that is the algorithm used to draw the
42694 Mandelbrot fractal internal region.
42695
42696 It shall assume one of the following values:
42697
42698 black
42699 Set black mode.
42700
42701 convergence
42702 Show time until convergence.
42703
42704 mincol
42705 Set color based on point closest to the origin of the
42706 iterations.
42707
42708 period
42709 Set period mode.
42710
42711 Default value is mincol.
42712
42713 bailout
42714 Set the bailout value. Default value is 10.0.
42715
42716 maxiter
42717 Set the maximum of iterations performed by the rendering algorithm.
42718 Default value is 7189.
42719
42720 outer
42721 Set outer coloring mode. It shall assume one of following values:
42722
42723 iteration_count
42724 Set iteration count mode.
42725
42726 normalized_iteration_count
42727 set normalized iteration count mode.
42728
42729 Default value is normalized_iteration_count.
42730
42731 rate, r
42732 Set frame rate, expressed as number of frames per second. Default
42733 value is "25".
42734
42735 size, s
42736 Set frame size. For the syntax of this option, check the "Video
42737 size" section in the ffmpeg-utils manual. Default value is
42738 "640x480".
42739
42740 start_scale
42741 Set the initial scale value. Default value is 3.0.
42742
42743 start_x
42744 Set the initial x position. Must be a floating point value between
42745 -100 and 100. Default value is
42746 -0.743643887037158704752191506114774.
42747
42748 start_y
42749 Set the initial y position. Must be a floating point value between
42750 -100 and 100. Default value is
42751 -0.131825904205311970493132056385139.
42752
42753 mptestsrc
42754 Generate various test patterns, as generated by the MPlayer test
42755 filter.
42756
42757 The size of the generated video is fixed, and is 256x256. This source
42758 is useful in particular for testing encoding features.
42759
42760 This source accepts the following options:
42761
42762 rate, r
42763 Specify the frame rate of the sourced video, as the number of
42764 frames generated per second. It has to be a string in the format
42765 frame_rate_num/frame_rate_den, an integer number, a floating point
42766 number or a valid video frame rate abbreviation. The default value
42767 is "25".
42768
42769 duration, d
42770 Set the duration of the sourced video. See the Time duration
42771 section in the ffmpeg-utils(1) manual for the accepted syntax.
42772
42773 If not specified, or the expressed duration is negative, the video
42774 is supposed to be generated forever.
42775
42776 test, t
42777 Set the number or the name of the test to perform. Supported tests
42778 are:
42779
42780 dc_luma
42781 dc_chroma
42782 freq_luma
42783 freq_chroma
42784 amp_luma
42785 amp_chroma
42786 cbp
42787 mv
42788 ring1
42789 ring2
42790 all
42791 max_frames, m
42792 Set the maximum number of frames generated for each test,
42793 default value is 30.
42794
42795 Default value is "all", which will cycle through the list of all
42796 tests.
42797
42798 Some examples:
42799
42800 mptestsrc=t=dc_luma
42801
42802 will generate a "dc_luma" test pattern.
42803
42804 frei0r_src
42805 Provide a frei0r source.
42806
42807 To enable compilation of this filter you need to install the frei0r
42808 header and configure FFmpeg with "--enable-frei0r".
42809
42810 This source accepts the following parameters:
42811
42812 size
42813 The size of the video to generate. For the syntax of this option,
42814 check the "Video size" section in the ffmpeg-utils manual.
42815
42816 framerate
42817 The framerate of the generated video. It may be a string of the
42818 form num/den or a frame rate abbreviation.
42819
42820 filter_name
42821 The name to the frei0r source to load. For more information
42822 regarding frei0r and how to set the parameters, read the frei0r
42823 section in the video filters documentation.
42824
42825 filter_params
42826 A '|'-separated list of parameters to pass to the frei0r source.
42827
42828 For example, to generate a frei0r partik0l source with size 200x200 and
42829 frame rate 10 which is overlaid on the overlay filter main input:
42830
42831 frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
42832
42833 life
42834 Generate a life pattern.
42835
42836 This source is based on a generalization of John Conway's life game.
42837
42838 The sourced input represents a life grid, each pixel represents a cell
42839 which can be in one of two possible states, alive or dead. Every cell
42840 interacts with its eight neighbours, which are the cells that are
42841 horizontally, vertically, or diagonally adjacent.
42842
42843 At each interaction the grid evolves according to the adopted rule,
42844 which specifies the number of neighbor alive cells which will make a
42845 cell stay alive or born. The rule option allows one to specify the rule
42846 to adopt.
42847
42848 This source accepts the following options:
42849
42850 filename, f
42851 Set the file from which to read the initial grid state. In the
42852 file, each non-whitespace character is considered an alive cell,
42853 and newline is used to delimit the end of each row.
42854
42855 If this option is not specified, the initial grid is generated
42856 randomly.
42857
42858 rate, r
42859 Set the video rate, that is the number of frames generated per
42860 second. Default is 25.
42861
42862 random_fill_ratio, ratio
42863 Set the random fill ratio for the initial random grid. It is a
42864 floating point number value ranging from 0 to 1, defaults to 1/PHI.
42865 It is ignored when a file is specified.
42866
42867 random_seed, seed
42868 Set the seed for filling the initial random grid, must be an
42869 integer included between 0 and UINT32_MAX. If not specified, or if
42870 explicitly set to -1, the filter will try to use a good random seed
42871 on a best effort basis.
42872
42873 rule
42874 Set the life rule.
42875
42876 A rule can be specified with a code of the kind "SNS/BNB", where NS
42877 and NB are sequences of numbers in the range 0-8, NS specifies the
42878 number of alive neighbor cells which make a live cell stay alive,
42879 and NB the number of alive neighbor cells which make a dead cell to
42880 become alive (i.e. to "born"). "s" and "b" can be used in place of
42881 "S" and "B", respectively.
42882
42883 Alternatively a rule can be specified by an 18-bits integer. The 9
42884 high order bits are used to encode the next cell state if it is
42885 alive for each number of neighbor alive cells, the low order bits
42886 specify the rule for "borning" new cells. Higher order bits encode
42887 for an higher number of neighbor cells. For example the number
42888 6153 = "(12<<9)+9" specifies a stay alive rule of 12 and a born
42889 rule of 9, which corresponds to "S23/B03".
42890
42891 Default value is "S23/B3", which is the original Conway's game of
42892 life rule, and will keep a cell alive if it has 2 or 3 neighbor
42893 alive cells, and will born a new cell if there are three alive
42894 cells around a dead cell.
42895
42896 size, s
42897 Set the size of the output video. For the syntax of this option,
42898 check the "Video size" section in the ffmpeg-utils manual.
42899
42900 If filename is specified, the size is set by default to the same
42901 size of the input file. If size is set, it must contain the size
42902 specified in the input file, and the initial grid defined in that
42903 file is centered in the larger resulting area.
42904
42905 If a filename is not specified, the size value defaults to
42906 "320x240" (used for a randomly generated initial grid).
42907
42908 stitch
42909 If set to 1, stitch the left and right grid edges together, and the
42910 top and bottom edges also. Defaults to 1.
42911
42912 mold
42913 Set cell mold speed. If set, a dead cell will go from death_color
42914 to mold_color with a step of mold. mold can have a value from 0 to
42915 255.
42916
42917 life_color
42918 Set the color of living (or new born) cells.
42919
42920 death_color
42921 Set the color of dead cells. If mold is set, this is the first
42922 color used to represent a dead cell.
42923
42924 mold_color
42925 Set mold color, for definitely dead and moldy cells.
42926
42927 For the syntax of these 3 color options, check the "Color" section
42928 in the ffmpeg-utils manual.
42929
42930 Examples
42931
42932 • Read a grid from pattern, and center it on a grid of size 300x300
42933 pixels:
42934
42935 life=f=pattern:s=300x300
42936
42937 • Generate a random grid of size 200x200, with a fill ratio of 2/3:
42938
42939 life=ratio=2/3:s=200x200
42940
42941 • Specify a custom rule for evolving a randomly generated grid:
42942
42943 life=rule=S14/B34
42944
42945 • Full example with slow death effect (mold) using ffplay:
42946
42947 ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
42948
42949 allrgb, allyuv, color, colorchart, colorspectrum, haldclutsrc, nullsrc,
42950 pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc,
42951 testsrc2, yuvtestsrc
42952 The "allrgb" source returns frames of size 4096x4096 of all rgb colors.
42953
42954 The "allyuv" source returns frames of size 4096x4096 of all yuv colors.
42955
42956 The "color" source provides an uniformly colored input.
42957
42958 The "colorchart" source provides a colors checker chart.
42959
42960 The "colorspectrum" source provides a color spectrum input.
42961
42962 The "haldclutsrc" source provides an identity Hald CLUT. See also
42963 haldclut filter.
42964
42965 The "nullsrc" source returns unprocessed video frames. It is mainly
42966 useful to be employed in analysis / debugging tools, or as the source
42967 for filters which ignore the input data.
42968
42969 The "pal75bars" source generates a color bars pattern, based on EBU PAL
42970 recommendations with 75% color levels.
42971
42972 The "pal100bars" source generates a color bars pattern, based on EBU
42973 PAL recommendations with 100% color levels.
42974
42975 The "rgbtestsrc" source generates an RGB test pattern useful for
42976 detecting RGB vs BGR issues. You should see a red, green and blue
42977 stripe from top to bottom.
42978
42979 The "smptebars" source generates a color bars pattern, based on the
42980 SMPTE Engineering Guideline EG 1-1990.
42981
42982 The "smptehdbars" source generates a color bars pattern, based on the
42983 SMPTE RP 219-2002.
42984
42985 The "testsrc" source generates a test video pattern, showing a color
42986 pattern, a scrolling gradient and a timestamp. This is mainly intended
42987 for testing purposes.
42988
42989 The "testsrc2" source is similar to testsrc, but supports more pixel
42990 formats instead of just "rgb24". This allows using it as an input for
42991 other tests without requiring a format conversion.
42992
42993 The "yuvtestsrc" source generates an YUV test pattern. You should see a
42994 y, cb and cr stripe from top to bottom.
42995
42996 The sources accept the following parameters:
42997
42998 level
42999 Specify the level of the Hald CLUT, only available in the
43000 "haldclutsrc" source. A level of "N" generates a picture of "N*N*N"
43001 by "N*N*N" pixels to be used as identity matrix for 3D lookup
43002 tables. Each component is coded on a "1/(N*N)" scale.
43003
43004 color, c
43005 Specify the color of the source, only available in the "color"
43006 source. For the syntax of this option, check the "Color" section in
43007 the ffmpeg-utils manual.
43008
43009 size, s
43010 Specify the size of the sourced video. For the syntax of this
43011 option, check the "Video size" section in the ffmpeg-utils manual.
43012 The default value is "320x240".
43013
43014 This option is not available with the "allrgb", "allyuv", and
43015 "haldclutsrc" filters.
43016
43017 rate, r
43018 Specify the frame rate of the sourced video, as the number of
43019 frames generated per second. It has to be a string in the format
43020 frame_rate_num/frame_rate_den, an integer number, a floating point
43021 number or a valid video frame rate abbreviation. The default value
43022 is "25".
43023
43024 duration, d
43025 Set the duration of the sourced video. See the Time duration
43026 section in the ffmpeg-utils(1) manual for the accepted syntax.
43027
43028 If not specified, or the expressed duration is negative, the video
43029 is supposed to be generated forever.
43030
43031 Since the frame rate is used as time base, all frames including the
43032 last one will have their full duration. If the specified duration
43033 is not a multiple of the frame duration, it will be rounded up.
43034
43035 sar Set the sample aspect ratio of the sourced video.
43036
43037 alpha
43038 Specify the alpha (opacity) of the background, only available in
43039 the "testsrc2" source. The value must be between 0 (fully
43040 transparent) and 255 (fully opaque, the default).
43041
43042 decimals, n
43043 Set the number of decimals to show in the timestamp, only available
43044 in the "testsrc" source.
43045
43046 The displayed timestamp value will correspond to the original
43047 timestamp value multiplied by the power of 10 of the specified
43048 value. Default value is 0.
43049
43050 type
43051 Set the type of the color spectrum, only available in the
43052 "colorspectrum" source. Can be one of the following:
43053
43054 black
43055 white
43056 all
43057 patch_size
43058 Set patch size of single color patch, only available in the
43059 "colorchart" source. Default is "64x64".
43060
43061 preset
43062 Set colorchecker colors preset, only available in the "colorchart"
43063 source.
43064
43065 Available values are:
43066
43067 reference
43068 skintones
43069
43070 Default value is "reference".
43071
43072 Examples
43073
43074 • Generate a video with a duration of 5.3 seconds, with size 176x144
43075 and a frame rate of 10 frames per second:
43076
43077 testsrc=duration=5.3:size=qcif:rate=10
43078
43079 • The following graph description will generate a red source with an
43080 opacity of 0.2, with size "qcif" and a frame rate of 10 frames per
43081 second:
43082
43083 color=c=red@0.2:s=qcif:r=10
43084
43085 • If the input content is to be ignored, "nullsrc" can be used. The
43086 following command generates noise in the luminance plane by
43087 employing the "geq" filter:
43088
43089 nullsrc=s=256x256, geq=random(1)*255:128:128
43090
43091 Commands
43092
43093 The "color" source supports the following commands:
43094
43095 c, color
43096 Set the color of the created image. Accepts the same syntax of the
43097 corresponding color option.
43098
43099 openclsrc
43100 Generate video using an OpenCL program.
43101
43102 source
43103 OpenCL program source file.
43104
43105 kernel
43106 Kernel name in program.
43107
43108 size, s
43109 Size of frames to generate. This must be set.
43110
43111 format
43112 Pixel format to use for the generated frames. This must be set.
43113
43114 rate, r
43115 Number of frames generated every second. Default value is '25'.
43116
43117 For details of how the program loading works, see the program_opencl
43118 filter.
43119
43120 Example programs:
43121
43122 • Generate a colour ramp by setting pixel values from the position of
43123 the pixel in the output image. (Note that this will work with all
43124 pixel formats, but the generated output will not be the same.)
43125
43126 __kernel void ramp(__write_only image2d_t dst,
43127 unsigned int index)
43128 {
43129 int2 loc = (int2)(get_global_id(0), get_global_id(1));
43130
43131 float4 val;
43132 val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
43133
43134 write_imagef(dst, loc, val);
43135 }
43136
43137 • Generate a Sierpinski carpet pattern, panning by a single pixel
43138 each frame.
43139
43140 __kernel void sierpinski_carpet(__write_only image2d_t dst,
43141 unsigned int index)
43142 {
43143 int2 loc = (int2)(get_global_id(0), get_global_id(1));
43144
43145 float4 value = 0.0f;
43146 int x = loc.x + index;
43147 int y = loc.y + index;
43148 while (x > 0 || y > 0) {
43149 if (x % 3 == 1 && y % 3 == 1) {
43150 value = 1.0f;
43151 break;
43152 }
43153 x /= 3;
43154 y /= 3;
43155 }
43156
43157 write_imagef(dst, loc, value);
43158 }
43159
43160 sierpinski
43161 Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
43162
43163 This source accepts the following options:
43164
43165 size, s
43166 Set frame size. For the syntax of this option, check the "Video
43167 size" section in the ffmpeg-utils manual. Default value is
43168 "640x480".
43169
43170 rate, r
43171 Set frame rate, expressed as number of frames per second. Default
43172 value is "25".
43173
43174 seed
43175 Set seed which is used for random panning.
43176
43177 jump
43178 Set max jump for single pan destination. Allowed range is from 1 to
43179 10000.
43180
43181 type
43182 Set fractal type, can be default "carpet" or "triangle".
43183
43185 Below is a description of the currently available video sinks.
43186
43187 buffersink
43188 Buffer video frames, and make them available to the end of the filter
43189 graph.
43190
43191 This sink is mainly intended for programmatic use, in particular
43192 through the interface defined in libavfilter/buffersink.h or the
43193 options system.
43194
43195 It accepts a pointer to an AVBufferSinkContext structure, which defines
43196 the incoming buffers' formats, to be passed as the opaque parameter to
43197 "avfilter_init_filter" for initialization.
43198
43199 nullsink
43200 Null video sink: do absolutely nothing with the input video. It is
43201 mainly useful as a template and for use in analysis / debugging tools.
43202
43204 Below is a description of the currently available multimedia filters.
43205
43206 a3dscope
43207 Convert input audio to 3d scope video output.
43208
43209 The filter accepts the following options:
43210
43211 rate, r
43212 Set frame rate, expressed as number of frames per second. Default
43213 value is "25".
43214
43215 size, s
43216 Specify the video size for the output. For the syntax of this
43217 option, check the "Video size" section in the ffmpeg-utils manual.
43218 Default value is "hd720".
43219
43220 fov Set the camera field of view. Default is 90 degrees. Allowed range
43221 is from 40 to 150.
43222
43223 roll
43224 Set the camera roll.
43225
43226 pitch
43227 Set the camera pitch.
43228
43229 yaw Set the camera yaw.
43230
43231 xzoom
43232 Set the camera zoom on X-axis.
43233
43234 yzoom
43235 Set the camera zoom on Y-axis.
43236
43237 zzoom
43238 Set the camera zoom on Z-axis.
43239
43240 xpos
43241 Set the camera position on X-axis.
43242
43243 ypos
43244 Set the camera position on Y-axis.
43245
43246 zpos
43247 Set the camera position on Z-axis.
43248
43249 length
43250 Set the length of displayed audio waves in number of frames.
43251
43252 Commands
43253
43254 Filter supports the some above options as commands.
43255
43256 abitscope
43257 Convert input audio to a video output, displaying the audio bit scope.
43258
43259 The filter accepts the following options:
43260
43261 rate, r
43262 Set frame rate, expressed as number of frames per second. Default
43263 value is "25".
43264
43265 size, s
43266 Specify the video size for the output. For the syntax of this
43267 option, check the "Video size" section in the ffmpeg-utils manual.
43268 Default value is "1024x256".
43269
43270 colors
43271 Specify list of colors separated by space or by '|' which will be
43272 used to draw channels. Unrecognized or missing colors will be
43273 replaced by white color.
43274
43275 mode, m
43276 Set output mode. Can be "bars" or "trace". Default is "bars".
43277
43278 adrawgraph
43279 Draw a graph using input audio metadata.
43280
43281 See drawgraph
43282
43283 agraphmonitor
43284 See graphmonitor.
43285
43286 ahistogram
43287 Convert input audio to a video output, displaying the volume histogram.
43288
43289 The filter accepts the following options:
43290
43291 dmode
43292 Specify how histogram is calculated.
43293
43294 It accepts the following values:
43295
43296 single
43297 Use single histogram for all channels.
43298
43299 separate
43300 Use separate histogram for each channel.
43301
43302 Default is "single".
43303
43304 rate, r
43305 Set frame rate, expressed as number of frames per second. Default
43306 value is "25".
43307
43308 size, s
43309 Specify the video size for the output. For the syntax of this
43310 option, check the "Video size" section in the ffmpeg-utils manual.
43311 Default value is "hd720".
43312
43313 scale
43314 Set display scale.
43315
43316 It accepts the following values:
43317
43318 log logarithmic
43319
43320 sqrt
43321 square root
43322
43323 cbrt
43324 cubic root
43325
43326 lin linear
43327
43328 rlog
43329 reverse logarithmic
43330
43331 Default is "log".
43332
43333 ascale
43334 Set amplitude scale.
43335
43336 It accepts the following values:
43337
43338 log logarithmic
43339
43340 lin linear
43341
43342 Default is "log".
43343
43344 acount
43345 Set how much frames to accumulate in histogram. Default is 1.
43346 Setting this to -1 accumulates all frames.
43347
43348 rheight
43349 Set histogram ratio of window height.
43350
43351 slide
43352 Set sonogram sliding.
43353
43354 It accepts the following values:
43355
43356 replace
43357 replace old rows with new ones.
43358
43359 scroll
43360 scroll from top to bottom.
43361
43362 Default is "replace".
43363
43364 hmode
43365 Set histogram mode.
43366
43367 It accepts the following values:
43368
43369 abs Use absolute values of samples.
43370
43371 sign
43372 Use untouched values of samples.
43373
43374 Default is "abs".
43375
43376 aphasemeter
43377 Measures phase of input audio, which is exported as metadata
43378 "lavfi.aphasemeter.phase", representing mean phase of current audio
43379 frame. A video output can also be produced and is enabled by default.
43380 The audio is passed through as first output.
43381
43382 Audio will be rematrixed to stereo if it has a different channel
43383 layout. Phase value is in range "[-1, 1]" where -1 means left and right
43384 channels are completely out of phase and 1 means channels are in phase.
43385
43386 The filter accepts the following options, all related to its video
43387 output:
43388
43389 rate, r
43390 Set the output frame rate. Default value is 25.
43391
43392 size, s
43393 Set the video size for the output. For the syntax of this option,
43394 check the "Video size" section in the ffmpeg-utils manual. Default
43395 value is "800x400".
43396
43397 rc
43398 gc
43399 bc Specify the red, green, blue contrast. Default values are 2, 7 and
43400 1. Allowed range is "[0, 255]".
43401
43402 mpc Set color which will be used for drawing median phase. If color is
43403 "none" which is default, no median phase value will be drawn.
43404
43405 video
43406 Enable video output. Default is enabled.
43407
43408 phasing detection
43409
43410 The filter also detects out of phase and mono sequences in stereo
43411 streams. It logs the sequence start, end and duration when it lasts
43412 longer or as long as the minimum set.
43413
43414 The filter accepts the following options for this detection:
43415
43416 phasing
43417 Enable mono and out of phase detection. Default is disabled.
43418
43419 tolerance, t
43420 Set phase tolerance for mono detection, in amplitude ratio. Default
43421 is 0. Allowed range is "[0, 1]".
43422
43423 angle, a
43424 Set angle threshold for out of phase detection, in degree. Default
43425 is 170. Allowed range is "[90, 180]".
43426
43427 duration, d
43428 Set mono or out of phase duration until notification, expressed in
43429 seconds. Default is 2.
43430
43431 Examples
43432
43433 • Complete example with ffmpeg to detect 1 second of mono with 0.001
43434 phase tolerance:
43435
43436 ffmpeg -i stereo.wav -af aphasemeter=video=0:phasing=1:duration=1:tolerance=0.001 -f null -
43437
43438 avectorscope
43439 Convert input audio to a video output, representing the audio vector
43440 scope.
43441
43442 The filter is used to measure the difference between channels of stereo
43443 audio stream. A monaural signal, consisting of identical left and right
43444 signal, results in straight vertical line. Any stereo separation is
43445 visible as a deviation from this line, creating a Lissajous figure. If
43446 the straight (or deviation from it) but horizontal line appears this
43447 indicates that the left and right channels are out of phase.
43448
43449 The filter accepts the following options:
43450
43451 mode, m
43452 Set the vectorscope mode.
43453
43454 Available values are:
43455
43456 lissajous
43457 Lissajous rotated by 45 degrees.
43458
43459 lissajous_xy
43460 Same as above but not rotated.
43461
43462 polar
43463 Shape resembling half of circle.
43464
43465 Default value is lissajous.
43466
43467 size, s
43468 Set the video size for the output. For the syntax of this option,
43469 check the "Video size" section in the ffmpeg-utils manual. Default
43470 value is "400x400".
43471
43472 rate, r
43473 Set the output frame rate. Default value is 25.
43474
43475 rc
43476 gc
43477 bc
43478 ac Specify the red, green, blue and alpha contrast. Default values are
43479 40, 160, 80 and 255. Allowed range is "[0, 255]".
43480
43481 rf
43482 gf
43483 bf
43484 af Specify the red, green, blue and alpha fade. Default values are 15,
43485 10, 5 and 5. Allowed range is "[0, 255]".
43486
43487 zoom
43488 Set the zoom factor. Default value is 1. Allowed range is "[0,
43489 10]". Values lower than 1 will auto adjust zoom factor to maximal
43490 possible value.
43491
43492 draw
43493 Set the vectorscope drawing mode.
43494
43495 Available values are:
43496
43497 dot Draw dot for each sample.
43498
43499 line
43500 Draw line between previous and current sample.
43501
43502 aaline
43503 Draw anti-aliased line between previous and current sample.
43504
43505 Default value is dot.
43506
43507 scale
43508 Specify amplitude scale of audio samples.
43509
43510 Available values are:
43511
43512 lin Linear.
43513
43514 sqrt
43515 Square root.
43516
43517 cbrt
43518 Cubic root.
43519
43520 log Logarithmic.
43521
43522 swap
43523 Swap left channel axis with right channel axis.
43524
43525 mirror
43526 Mirror axis.
43527
43528 none
43529 No mirror.
43530
43531 x Mirror only x axis.
43532
43533 y Mirror only y axis.
43534
43535 xy Mirror both axis.
43536
43537 Examples
43538
43539 • Complete example using ffplay:
43540
43541 ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
43542 [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
43543
43544 Commands
43545
43546 This filter supports the all above options as commands except options
43547 "size" and "rate".
43548
43549 bench, abench
43550 Benchmark part of a filtergraph.
43551
43552 The filter accepts the following options:
43553
43554 action
43555 Start or stop a timer.
43556
43557 Available values are:
43558
43559 start
43560 Get the current time, set it as frame metadata (using the key
43561 "lavfi.bench.start_time"), and forward the frame to the next
43562 filter.
43563
43564 stop
43565 Get the current time and fetch the "lavfi.bench.start_time"
43566 metadata from the input frame metadata to get the time
43567 difference. Time difference, average, maximum and minimum time
43568 (respectively "t", "avg", "max" and "min") are then printed.
43569 The timestamps are expressed in seconds.
43570
43571 Examples
43572
43573 • Benchmark selectivecolor filter:
43574
43575 bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
43576
43577 concat
43578 Concatenate audio and video streams, joining them together one after
43579 the other.
43580
43581 The filter works on segments of synchronized video and audio streams.
43582 All segments must have the same number of streams of each type, and
43583 that will also be the number of streams at output.
43584
43585 The filter accepts the following options:
43586
43587 n Set the number of segments. Default is 2.
43588
43589 v Set the number of output video streams, that is also the number of
43590 video streams in each segment. Default is 1.
43591
43592 a Set the number of output audio streams, that is also the number of
43593 audio streams in each segment. Default is 0.
43594
43595 unsafe
43596 Activate unsafe mode: do not fail if segments have a different
43597 format.
43598
43599 The filter has v+a outputs: first v video outputs, then a audio
43600 outputs.
43601
43602 There are nx(v+a) inputs: first the inputs for the first segment, in
43603 the same order as the outputs, then the inputs for the second segment,
43604 etc.
43605
43606 Related streams do not always have exactly the same duration, for
43607 various reasons including codec frame size or sloppy authoring. For
43608 that reason, related synchronized streams (e.g. a video and its audio
43609 track) should be concatenated at once. The concat filter will use the
43610 duration of the longest stream in each segment (except the last one),
43611 and if necessary pad shorter audio streams with silence.
43612
43613 For this filter to work correctly, all segments must start at timestamp
43614 0.
43615
43616 All corresponding streams must have the same parameters in all
43617 segments; the filtering system will automatically select a common pixel
43618 format for video streams, and a common sample format, sample rate and
43619 channel layout for audio streams, but other settings, such as
43620 resolution, must be converted explicitly by the user.
43621
43622 Different frame rates are acceptable but will result in variable frame
43623 rate at output; be sure to configure the output file to handle it.
43624
43625 Examples
43626
43627 • Concatenate an opening, an episode and an ending, all in bilingual
43628 version (video in stream 0, audio in streams 1 and 2):
43629
43630 ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
43631 '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
43632 concat=n=3:v=1:a=2 [v] [a1] [a2]' \
43633 -map '[v]' -map '[a1]' -map '[a2]' output.mkv
43634
43635 • Concatenate two parts, handling audio and video separately, using
43636 the (a)movie sources, and adjusting the resolution:
43637
43638 movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
43639 movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
43640 [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
43641
43642 Note that a desync will happen at the stitch if the audio and video
43643 streams do not have exactly the same duration in the first file.
43644
43645 Commands
43646
43647 This filter supports the following commands:
43648
43649 next
43650 Close the current segment and step to the next one
43651
43652 ebur128
43653 EBU R128 scanner filter. This filter takes an audio stream and analyzes
43654 its loudness level. By default, it logs a message at a frequency of
43655 10Hz with the Momentary loudness (identified by "M"), Short-term
43656 loudness ("S"), Integrated loudness ("I") and Loudness Range ("LRA").
43657
43658 The filter can only analyze streams which have sample format is double-
43659 precision floating point. The input stream will be converted to this
43660 specification, if needed. Users may need to insert aformat and/or
43661 aresample filters after this filter to obtain the original parameters.
43662
43663 The filter also has a video output (see the video option) with a real
43664 time graph to observe the loudness evolution. The graphic contains the
43665 logged message mentioned above, so it is not printed anymore when this
43666 option is set, unless the verbose logging is set. The main graphing
43667 area contains the short-term loudness (3 seconds of analysis), and the
43668 gauge on the right is for the momentary loudness (400 milliseconds),
43669 but can optionally be configured to instead display short-term loudness
43670 (see gauge).
43671
43672 The green area marks a +/- 1LU target range around the target loudness
43673 (-23LUFS by default, unless modified through target).
43674
43675 More information about the Loudness Recommendation EBU R128 on
43676 <http://tech.ebu.ch/loudness>.
43677
43678 The filter accepts the following options:
43679
43680 video
43681 Activate the video output. The audio stream is passed unchanged
43682 whether this option is set or no. The video stream will be the
43683 first output stream if activated. Default is 0.
43684
43685 size
43686 Set the video size. This option is for video only. For the syntax
43687 of this option, check the "Video size" section in the ffmpeg-utils
43688 manual. Default and minimum resolution is "640x480".
43689
43690 meter
43691 Set the EBU scale meter. Default is 9. Common values are 9 and 18,
43692 respectively for EBU scale meter +9 and EBU scale meter +18. Any
43693 other integer value between this range is allowed.
43694
43695 metadata
43696 Set metadata injection. If set to 1, the audio input will be
43697 segmented into 100ms output frames, each of them containing various
43698 loudness information in metadata. All the metadata keys are
43699 prefixed with "lavfi.r128.".
43700
43701 Default is 0.
43702
43703 framelog
43704 Force the frame logging level.
43705
43706 Available values are:
43707
43708 quiet
43709 logging disabled
43710
43711 info
43712 information logging level
43713
43714 verbose
43715 verbose logging level
43716
43717 By default, the logging level is set to info. If the video or the
43718 metadata options are set, it switches to verbose.
43719
43720 peak
43721 Set peak mode(s).
43722
43723 Available modes can be cumulated (the option is a "flag" type).
43724 Possible values are:
43725
43726 none
43727 Disable any peak mode (default).
43728
43729 sample
43730 Enable sample-peak mode.
43731
43732 Simple peak mode looking for the higher sample value. It logs a
43733 message for sample-peak (identified by "SPK").
43734
43735 true
43736 Enable true-peak mode.
43737
43738 If enabled, the peak lookup is done on an over-sampled version
43739 of the input stream for better peak accuracy. It logs a message
43740 for true-peak. (identified by "TPK") and true-peak per frame
43741 (identified by "FTPK"). This mode requires a build with
43742 "libswresample".
43743
43744 dualmono
43745 Treat mono input files as "dual mono". If a mono file is intended
43746 for playback on a stereo system, its EBU R128 measurement will be
43747 perceptually incorrect. If set to "true", this option will
43748 compensate for this effect. Multi-channel input files are not
43749 affected by this option.
43750
43751 panlaw
43752 Set a specific pan law to be used for the measurement of dual mono
43753 files. This parameter is optional, and has a default value of
43754 -3.01dB.
43755
43756 target
43757 Set a specific target level (in LUFS) used as relative zero in the
43758 visualization. This parameter is optional and has a default value
43759 of -23LUFS as specified by EBU R128. However, material published
43760 online may prefer a level of -16LUFS (e.g. for use with podcasts or
43761 video platforms).
43762
43763 gauge
43764 Set the value displayed by the gauge. Valid values are "momentary"
43765 and s "shortterm". By default the momentary value will be used, but
43766 in certain scenarios it may be more useful to observe the short
43767 term value instead (e.g. live mixing).
43768
43769 scale
43770 Sets the display scale for the loudness. Valid parameters are
43771 "absolute" (in LUFS) or "relative" (LU) relative to the target.
43772 This only affects the video output, not the summary or continuous
43773 log output.
43774
43775 Examples
43776
43777 • Real-time graph using ffplay, with a EBU scale meter +18:
43778
43779 ffplay -f lavfi -i "amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]"
43780
43781 • Run an analysis with ffmpeg:
43782
43783 ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
43784
43785 interleave, ainterleave
43786 Temporally interleave frames from several inputs.
43787
43788 "interleave" works with video inputs, "ainterleave" with audio.
43789
43790 These filters read frames from several inputs and send the oldest
43791 queued frame to the output.
43792
43793 Input streams must have well defined, monotonically increasing frame
43794 timestamp values.
43795
43796 In order to submit one frame to output, these filters need to enqueue
43797 at least one frame for each input, so they cannot work in case one
43798 input is not yet terminated and will not receive incoming frames.
43799
43800 For example consider the case when one input is a "select" filter which
43801 always drops input frames. The "interleave" filter will keep reading
43802 from that input, but it will never be able to send new frames to output
43803 until the input sends an end-of-stream signal.
43804
43805 Also, depending on inputs synchronization, the filters will drop frames
43806 in case one input receives more frames than the other ones, and the
43807 queue is already filled.
43808
43809 These filters accept the following options:
43810
43811 nb_inputs, n
43812 Set the number of different inputs, it is 2 by default.
43813
43814 duration
43815 How to determine the end-of-stream.
43816
43817 longest
43818 The duration of the longest input. (default)
43819
43820 shortest
43821 The duration of the shortest input.
43822
43823 first
43824 The duration of the first input.
43825
43826 Examples
43827
43828 • Interleave frames belonging to different streams using ffmpeg:
43829
43830 ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex "[0:v][1:v] interleave" out.avi
43831
43832 • Add flickering blur effect:
43833
43834 select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
43835
43836 latency, alatency
43837 Measure filtering latency.
43838
43839 Report previous filter filtering latency, delay in number of audio
43840 samples for audio filters or number of video frames for video filters.
43841
43842 On end of input stream, filter will report min and max measured latency
43843 for previous running filter in filtergraph.
43844
43845 metadata, ametadata
43846 Manipulate frame metadata.
43847
43848 This filter accepts the following options:
43849
43850 mode
43851 Set mode of operation of the filter.
43852
43853 Can be one of the following:
43854
43855 select
43856 If both "value" and "key" is set, select frames which have such
43857 metadata. If only "key" is set, select every frame that has
43858 such key in metadata.
43859
43860 add Add new metadata "key" and "value". If key is already available
43861 do nothing.
43862
43863 modify
43864 Modify value of already present key.
43865
43866 delete
43867 If "value" is set, delete only keys that have such value.
43868 Otherwise, delete key. If "key" is not set, delete all metadata
43869 values in the frame.
43870
43871 print
43872 Print key and its value if metadata was found. If "key" is not
43873 set print all metadata values available in frame.
43874
43875 key Set key used with all modes. Must be set for all modes except
43876 "print" and "delete".
43877
43878 value
43879 Set metadata value which will be used. This option is mandatory for
43880 "modify" and "add" mode.
43881
43882 function
43883 Which function to use when comparing metadata value and "value".
43884
43885 Can be one of following:
43886
43887 same_str
43888 Values are interpreted as strings, returns true if metadata
43889 value is same as "value".
43890
43891 starts_with
43892 Values are interpreted as strings, returns true if metadata
43893 value starts with the "value" option string.
43894
43895 less
43896 Values are interpreted as floats, returns true if metadata
43897 value is less than "value".
43898
43899 equal
43900 Values are interpreted as floats, returns true if "value" is
43901 equal with metadata value.
43902
43903 greater
43904 Values are interpreted as floats, returns true if metadata
43905 value is greater than "value".
43906
43907 expr
43908 Values are interpreted as floats, returns true if expression
43909 from option "expr" evaluates to true.
43910
43911 ends_with
43912 Values are interpreted as strings, returns true if metadata
43913 value ends with the "value" option string.
43914
43915 expr
43916 Set expression which is used when "function" is set to "expr". The
43917 expression is evaluated through the eval API and can contain the
43918 following constants:
43919
43920 VALUE1, FRAMEVAL
43921 Float representation of "value" from metadata key.
43922
43923 VALUE2, USERVAL
43924 Float representation of "value" as supplied by user in "value"
43925 option.
43926
43927 file
43928 If specified in "print" mode, output is written to the named file.
43929 Instead of plain filename any writable url can be specified.
43930 Filename ``-'' is a shorthand for standard output. If "file" option
43931 is not set, output is written to the log with AV_LOG_INFO loglevel.
43932
43933 direct
43934 Reduces buffering in print mode when output is written to a URL set
43935 using file.
43936
43937 Examples
43938
43939 • Print all metadata values for frames with key
43940 "lavfi.signalstats.YDIF" with values between 0 and 1.
43941
43942 signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
43943
43944 • Print silencedetect output to file metadata.txt.
43945
43946 silencedetect,ametadata=mode=print:file=metadata.txt
43947
43948 • Direct all metadata to a pipe with file descriptor 4.
43949
43950 metadata=mode=print:file='pipe\:4'
43951
43952 perms, aperms
43953 Set read/write permissions for the output frames.
43954
43955 These filters are mainly aimed at developers to test direct path in the
43956 following filter in the filtergraph.
43957
43958 The filters accept the following options:
43959
43960 mode
43961 Select the permissions mode.
43962
43963 It accepts the following values:
43964
43965 none
43966 Do nothing. This is the default.
43967
43968 ro Set all the output frames read-only.
43969
43970 rw Set all the output frames directly writable.
43971
43972 toggle
43973 Make the frame read-only if writable, and writable if read-
43974 only.
43975
43976 random
43977 Set each output frame read-only or writable randomly.
43978
43979 seed
43980 Set the seed for the random mode, must be an integer included
43981 between 0 and "UINT32_MAX". If not specified, or if explicitly set
43982 to -1, the filter will try to use a good random seed on a best
43983 effort basis.
43984
43985 Note: in case of auto-inserted filter between the permission filter and
43986 the following one, the permission might not be received as expected in
43987 that following filter. Inserting a format or aformat filter before the
43988 perms/aperms filter can avoid this problem.
43989
43990 realtime, arealtime
43991 Slow down filtering to match real time approximately.
43992
43993 These filters will pause the filtering for a variable amount of time to
43994 match the output rate with the input timestamps. They are similar to
43995 the re option to "ffmpeg".
43996
43997 They accept the following options:
43998
43999 limit
44000 Time limit for the pauses. Any pause longer than that will be
44001 considered a timestamp discontinuity and reset the timer. Default
44002 is 2 seconds.
44003
44004 speed
44005 Speed factor for processing. The value must be a float larger than
44006 zero. Values larger than 1.0 will result in faster than realtime
44007 processing, smaller will slow processing down. The limit is
44008 automatically adapted accordingly. Default is 1.0.
44009
44010 A processing speed faster than what is possible without these
44011 filters cannot be achieved.
44012
44013 Commands
44014
44015 Both filters supports the all above options as commands.
44016
44017 segment, asegment
44018 Split single input stream into multiple streams.
44019
44020 This filter does opposite of concat filters.
44021
44022 "segment" works on video frames, "asegment" on audio samples.
44023
44024 This filter accepts the following options:
44025
44026 timestamps
44027 Timestamps of output segments separated by '|'. The first segment
44028 will run from the beginning of the input stream. The last segment
44029 will run until the end of the input stream
44030
44031 frames, samples
44032 Exact frame/sample count to split the segments.
44033
44034 In all cases, prefixing an each segment with '+' will make it relative
44035 to the previous segment.
44036
44037 Examples
44038
44039 • Split input audio stream into three output audio streams, starting
44040 at start of input audio stream and storing that in 1st output audio
44041 stream, then following at 60th second and storing than in 2nd
44042 output audio stream, and last after 150th second of input audio
44043 stream store in 3rd output audio stream:
44044
44045 asegment=timestamps="60|150"
44046
44047 select, aselect
44048 Select frames to pass in output.
44049
44050 This filter accepts the following options:
44051
44052 expr, e
44053 Set expression, which is evaluated for each input frame.
44054
44055 If the expression is evaluated to zero, the frame is discarded.
44056
44057 If the evaluation result is negative or NaN, the frame is sent to
44058 the first output; otherwise it is sent to the output with index
44059 "ceil(val)-1", assuming that the input index starts from 0.
44060
44061 For example a value of 1.2 corresponds to the output with index
44062 "ceil(1.2)-1 = 2-1 = 1", that is the second output.
44063
44064 outputs, n
44065 Set the number of outputs. The output to which to send the selected
44066 frame is based on the result of the evaluation. Default value is 1.
44067
44068 The expression can contain the following constants:
44069
44070 n The (sequential) number of the filtered frame, starting from 0.
44071
44072 selected_n
44073 The (sequential) number of the selected frame, starting from 0.
44074
44075 prev_selected_n
44076 The sequential number of the last selected frame. It's NAN if
44077 undefined.
44078
44079 TB The timebase of the input timestamps.
44080
44081 pts The PTS (Presentation TimeStamp) of the filtered frame, expressed
44082 in TB units. It's NAN if undefined.
44083
44084 t The PTS of the filtered frame, expressed in seconds. It's NAN if
44085 undefined.
44086
44087 prev_pts
44088 The PTS of the previously filtered frame. It's NAN if undefined.
44089
44090 prev_selected_pts
44091 The PTS of the last previously filtered frame. It's NAN if
44092 undefined.
44093
44094 prev_selected_t
44095 The PTS of the last previously selected frame, expressed in
44096 seconds. It's NAN if undefined.
44097
44098 start_pts
44099 The first PTS in the stream which is not NAN. It remains NAN if not
44100 found.
44101
44102 start_t
44103 The first PTS, in seconds, in the stream which is not NAN. It
44104 remains NAN if not found.
44105
44106 pict_type (video only)
44107 The type of the filtered frame. It can assume one of the following
44108 values:
44109
44110 I
44111 P
44112 B
44113 S
44114 SI
44115 SP
44116 BI
44117 interlace_type (video only)
44118 The frame interlace type. It can assume one of the following
44119 values:
44120
44121 PROGRESSIVE
44122 The frame is progressive (not interlaced).
44123
44124 TOPFIRST
44125 The frame is top-field-first.
44126
44127 BOTTOMFIRST
44128 The frame is bottom-field-first.
44129
44130 consumed_sample_n (audio only)
44131 the number of selected samples before the current frame
44132
44133 samples_n (audio only)
44134 the number of samples in the current frame
44135
44136 sample_rate (audio only)
44137 the input sample rate
44138
44139 key This is 1 if the filtered frame is a key-frame, 0 otherwise.
44140
44141 pos the position in the file of the filtered frame, -1 if the
44142 information is not available (e.g. for synthetic video)
44143
44144 scene (video only)
44145 value between 0 and 1 to indicate a new scene; a low value reflects
44146 a low probability for the current frame to introduce a new scene,
44147 while a higher value means the current frame is more likely to be
44148 one (see the example below)
44149
44150 concatdec_select
44151 The concat demuxer can select only part of a concat input file by
44152 setting an inpoint and an outpoint, but the output packets may not
44153 be entirely contained in the selected interval. By using this
44154 variable, it is possible to skip frames generated by the concat
44155 demuxer which are not exactly contained in the selected interval.
44156
44157 This works by comparing the frame pts against the
44158 lavf.concat.start_time and the lavf.concat.duration packet metadata
44159 values which are also present in the decoded frames.
44160
44161 The concatdec_select variable is -1 if the frame pts is at least
44162 start_time and either the duration metadata is missing or the frame
44163 pts is less than start_time + duration, 0 otherwise, and NaN if the
44164 start_time metadata is missing.
44165
44166 That basically means that an input frame is selected if its pts is
44167 within the interval set by the concat demuxer.
44168
44169 The default value of the select expression is "1".
44170
44171 Examples
44172
44173 • Select all frames in input:
44174
44175 select
44176
44177 The example above is the same as:
44178
44179 select=1
44180
44181 • Skip all frames:
44182
44183 select=0
44184
44185 • Select only I-frames:
44186
44187 select='eq(pict_type\,I)'
44188
44189 • Select one frame every 100:
44190
44191 select='not(mod(n\,100))'
44192
44193 • Select only frames contained in the 10-20 time interval:
44194
44195 select=between(t\,10\,20)
44196
44197 • Select only I-frames contained in the 10-20 time interval:
44198
44199 select=between(t\,10\,20)*eq(pict_type\,I)
44200
44201 • Select frames with a minimum distance of 10 seconds:
44202
44203 select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
44204
44205 • Use aselect to select only audio frames with samples number > 100:
44206
44207 aselect='gt(samples_n\,100)'
44208
44209 • Create a mosaic of the first scenes:
44210
44211 ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
44212
44213 Comparing scene against a value between 0.3 and 0.5 is generally a
44214 sane choice.
44215
44216 • Send even and odd frames to separate outputs, and compose them:
44217
44218 select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
44219
44220 • Select useful frames from an ffconcat file which is using inpoints
44221 and outpoints but where the source files are not intra frame only.
44222
44223 ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
44224
44225 sendcmd, asendcmd
44226 Send commands to filters in the filtergraph.
44227
44228 These filters read commands to be sent to other filters in the
44229 filtergraph.
44230
44231 "sendcmd" must be inserted between two video filters, "asendcmd" must
44232 be inserted between two audio filters, but apart from that they act the
44233 same way.
44234
44235 The specification of commands can be provided in the filter arguments
44236 with the commands option, or in a file specified by the filename
44237 option.
44238
44239 These filters accept the following options:
44240
44241 commands, c
44242 Set the commands to be read and sent to the other filters.
44243
44244 filename, f
44245 Set the filename of the commands to be read and sent to the other
44246 filters.
44247
44248 Commands syntax
44249
44250 A commands description consists of a sequence of interval
44251 specifications, comprising a list of commands to be executed when a
44252 particular event related to that interval occurs. The occurring event
44253 is typically the current frame time entering or leaving a given time
44254 interval.
44255
44256 An interval is specified by the following syntax:
44257
44258 <START>[-<END>] <COMMANDS>;
44259
44260 The time interval is specified by the START and END times. END is
44261 optional and defaults to the maximum time.
44262
44263 The current frame time is considered within the specified interval if
44264 it is included in the interval [START, END), that is when the time is
44265 greater or equal to START and is lesser than END.
44266
44267 COMMANDS consists of a sequence of one or more command specifications,
44268 separated by ",", relating to that interval. The syntax of a command
44269 specification is given by:
44270
44271 [<FLAGS>] <TARGET> <COMMAND> <ARG>
44272
44273 FLAGS is optional and specifies the type of events relating to the time
44274 interval which enable sending the specified command, and must be a non-
44275 null sequence of identifier flags separated by "+" or "|" and enclosed
44276 between "[" and "]".
44277
44278 The following flags are recognized:
44279
44280 enter
44281 The command is sent when the current frame timestamp enters the
44282 specified interval. In other words, the command is sent when the
44283 previous frame timestamp was not in the given interval, and the
44284 current is.
44285
44286 leave
44287 The command is sent when the current frame timestamp leaves the
44288 specified interval. In other words, the command is sent when the
44289 previous frame timestamp was in the given interval, and the current
44290 is not.
44291
44292 expr
44293 The command ARG is interpreted as expression and result of
44294 expression is passed as ARG.
44295
44296 The expression is evaluated through the eval API and can contain
44297 the following constants:
44298
44299 POS Original position in the file of the frame, or undefined if
44300 undefined for the current frame.
44301
44302 PTS The presentation timestamp in input.
44303
44304 N The count of the input frame for video or audio, starting from
44305 0.
44306
44307 T The time in seconds of the current frame.
44308
44309 TS The start time in seconds of the current command interval.
44310
44311 TE The end time in seconds of the current command interval.
44312
44313 TI The interpolated time of the current command interval, TI = (T
44314 - TS) / (TE - TS).
44315
44316 W The video frame width.
44317
44318 H The video frame height.
44319
44320 If FLAGS is not specified, a default value of "[enter]" is assumed.
44321
44322 TARGET specifies the target of the command, usually the name of the
44323 filter class or a specific filter instance name.
44324
44325 COMMAND specifies the name of the command for the target filter.
44326
44327 ARG is optional and specifies the optional list of argument for the
44328 given COMMAND.
44329
44330 Between one interval specification and another, whitespaces, or
44331 sequences of characters starting with "#" until the end of line, are
44332 ignored and can be used to annotate comments.
44333
44334 A simplified BNF description of the commands specification syntax
44335 follows:
44336
44337 <COMMAND_FLAG> ::= "enter" | "leave"
44338 <COMMAND_FLAGS> ::= <COMMAND_FLAG> [(+|"|")<COMMAND_FLAG>]
44339 <COMMAND> ::= ["[" <COMMAND_FLAGS> "]"] <TARGET> <COMMAND> [<ARG>]
44340 <COMMANDS> ::= <COMMAND> [,<COMMANDS>]
44341 <INTERVAL> ::= <START>[-<END>] <COMMANDS>
44342 <INTERVALS> ::= <INTERVAL>[;<INTERVALS>]
44343
44344 Examples
44345
44346 • Specify audio tempo change at second 4:
44347
44348 asendcmd=c='4.0 atempo tempo 1.5',atempo
44349
44350 • Target a specific filter instance:
44351
44352 asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
44353
44354 • Specify a list of drawtext and hue commands in a file.
44355
44356 # show text in the interval 5-10
44357 5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
44358 [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
44359
44360 # desaturate the image in the interval 15-20
44361 15.0-20.0 [enter] hue s 0,
44362 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
44363 [leave] hue s 1,
44364 [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
44365
44366 # apply an exponential saturation fade-out effect, starting from time 25
44367 25 [enter] hue s exp(25-t)
44368
44369 A filtergraph allowing to read and process the above command list
44370 stored in a file test.cmd, can be specified with:
44371
44372 sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
44373
44374 setpts, asetpts
44375 Change the PTS (presentation timestamp) of the input frames.
44376
44377 "setpts" works on video frames, "asetpts" on audio frames.
44378
44379 This filter accepts the following options:
44380
44381 expr
44382 The expression which is evaluated for each frame to construct its
44383 timestamp.
44384
44385 The expression is evaluated through the eval API and can contain the
44386 following constants:
44387
44388 FRAME_RATE, FR
44389 frame rate, only defined for constant frame-rate video
44390
44391 PTS The presentation timestamp in input
44392
44393 N The count of the input frame for video or the number of consumed
44394 samples, not including the current frame for audio, starting from
44395 0.
44396
44397 NB_CONSUMED_SAMPLES
44398 The number of consumed samples, not including the current frame
44399 (only audio)
44400
44401 NB_SAMPLES, S
44402 The number of samples in the current frame (only audio)
44403
44404 SAMPLE_RATE, SR
44405 The audio sample rate.
44406
44407 STARTPTS
44408 The PTS of the first frame.
44409
44410 STARTT
44411 the time in seconds of the first frame
44412
44413 INTERLACED
44414 State whether the current frame is interlaced.
44415
44416 T the time in seconds of the current frame
44417
44418 POS original position in the file of the frame, or undefined if
44419 undefined for the current frame
44420
44421 PREV_INPTS
44422 The previous input PTS.
44423
44424 PREV_INT
44425 previous input time in seconds
44426
44427 PREV_OUTPTS
44428 The previous output PTS.
44429
44430 PREV_OUTT
44431 previous output time in seconds
44432
44433 RTCTIME
44434 The wallclock (RTC) time in microseconds. This is deprecated, use
44435 time(0) instead.
44436
44437 RTCSTART
44438 The wallclock (RTC) time at the start of the movie in microseconds.
44439
44440 TB The timebase of the input timestamps.
44441
44442 Examples
44443
44444 • Start counting PTS from zero
44445
44446 setpts=PTS-STARTPTS
44447
44448 • Apply fast motion effect:
44449
44450 setpts=0.5*PTS
44451
44452 • Apply slow motion effect:
44453
44454 setpts=2.0*PTS
44455
44456 • Set fixed rate of 25 frames per second:
44457
44458 setpts=N/(25*TB)
44459
44460 • Set fixed rate 25 fps with some jitter:
44461
44462 setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
44463
44464 • Apply an offset of 10 seconds to the input PTS:
44465
44466 setpts=PTS+10/TB
44467
44468 • Generate timestamps from a "live source" and rebase onto the
44469 current timebase:
44470
44471 setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
44472
44473 • Generate timestamps by counting samples:
44474
44475 asetpts=N/SR/TB
44476
44477 setrange
44478 Force color range for the output video frame.
44479
44480 The "setrange" filter marks the color range property for the output
44481 frames. It does not change the input frame, but only sets the
44482 corresponding property, which affects how the frame is treated by
44483 following filters.
44484
44485 The filter accepts the following options:
44486
44487 range
44488 Available values are:
44489
44490 auto
44491 Keep the same color range property.
44492
44493 unspecified, unknown
44494 Set the color range as unspecified.
44495
44496 limited, tv, mpeg
44497 Set the color range as limited.
44498
44499 full, pc, jpeg
44500 Set the color range as full.
44501
44502 settb, asettb
44503 Set the timebase to use for the output frames timestamps. It is mainly
44504 useful for testing timebase configuration.
44505
44506 It accepts the following parameters:
44507
44508 expr, tb
44509 The expression which is evaluated into the output timebase.
44510
44511 The value for tb is an arithmetic expression representing a rational.
44512 The expression can contain the constants "AVTB" (the default timebase),
44513 "intb" (the input timebase) and "sr" (the sample rate, audio only).
44514 Default value is "intb".
44515
44516 Examples
44517
44518 • Set the timebase to 1/25:
44519
44520 settb=expr=1/25
44521
44522 • Set the timebase to 1/10:
44523
44524 settb=expr=0.1
44525
44526 • Set the timebase to 1001/1000:
44527
44528 settb=1+0.001
44529
44530 • Set the timebase to 2*intb:
44531
44532 settb=2*intb
44533
44534 • Set the default timebase value:
44535
44536 settb=AVTB
44537
44538 showcqt
44539 Convert input audio to a video output representing frequency spectrum
44540 logarithmically using Brown-Puckette constant Q transform algorithm
44541 with direct frequency domain coefficient calculation (but the transform
44542 itself is not really constant Q, instead the Q factor is actually
44543 variable/clamped), with musical tone scale, from E0 to D#10.
44544
44545 The filter accepts the following options:
44546
44547 size, s
44548 Specify the video size for the output. It must be even. For the
44549 syntax of this option, check the "Video size" section in the
44550 ffmpeg-utils manual. Default value is "1920x1080".
44551
44552 fps, rate, r
44553 Set the output frame rate. Default value is 25.
44554
44555 bar_h
44556 Set the bargraph height. It must be even. Default value is -1 which
44557 computes the bargraph height automatically.
44558
44559 axis_h
44560 Set the axis height. It must be even. Default value is -1 which
44561 computes the axis height automatically.
44562
44563 sono_h
44564 Set the sonogram height. It must be even. Default value is -1 which
44565 computes the sonogram height automatically.
44566
44567 fullhd
44568 Set the fullhd resolution. This option is deprecated, use size, s
44569 instead. Default value is 1.
44570
44571 sono_v, volume
44572 Specify the sonogram volume expression. It can contain variables:
44573
44574 bar_v
44575 the bar_v evaluated expression
44576
44577 frequency, freq, f
44578 the frequency where it is evaluated
44579
44580 timeclamp, tc
44581 the value of timeclamp option
44582
44583 and functions:
44584
44585 a_weighting(f)
44586 A-weighting of equal loudness
44587
44588 b_weighting(f)
44589 B-weighting of equal loudness
44590
44591 c_weighting(f)
44592 C-weighting of equal loudness.
44593
44594 Default value is 16.
44595
44596 bar_v, volume2
44597 Specify the bargraph volume expression. It can contain variables:
44598
44599 sono_v
44600 the sono_v evaluated expression
44601
44602 frequency, freq, f
44603 the frequency where it is evaluated
44604
44605 timeclamp, tc
44606 the value of timeclamp option
44607
44608 and functions:
44609
44610 a_weighting(f)
44611 A-weighting of equal loudness
44612
44613 b_weighting(f)
44614 B-weighting of equal loudness
44615
44616 c_weighting(f)
44617 C-weighting of equal loudness.
44618
44619 Default value is "sono_v".
44620
44621 sono_g, gamma
44622 Specify the sonogram gamma. Lower gamma makes the spectrum more
44623 contrast, higher gamma makes the spectrum having more range.
44624 Default value is 3. Acceptable range is "[1, 7]".
44625
44626 bar_g, gamma2
44627 Specify the bargraph gamma. Default value is 1. Acceptable range is
44628 "[1, 7]".
44629
44630 bar_t
44631 Specify the bargraph transparency level. Lower value makes the
44632 bargraph sharper. Default value is 1. Acceptable range is "[0,
44633 1]".
44634
44635 timeclamp, tc
44636 Specify the transform timeclamp. At low frequency, there is trade-
44637 off between accuracy in time domain and frequency domain. If
44638 timeclamp is lower, event in time domain is represented more
44639 accurately (such as fast bass drum), otherwise event in frequency
44640 domain is represented more accurately (such as bass guitar).
44641 Acceptable range is "[0.002, 1]". Default value is 0.17.
44642
44643 attack
44644 Set attack time in seconds. The default is 0 (disabled). Otherwise,
44645 it limits future samples by applying asymmetric windowing in time
44646 domain, useful when low latency is required. Accepted range is "[0,
44647 1]".
44648
44649 basefreq
44650 Specify the transform base frequency. Default value is
44651 20.01523126408007475, which is frequency 50 cents below E0.
44652 Acceptable range is "[10, 100000]".
44653
44654 endfreq
44655 Specify the transform end frequency. Default value is
44656 20495.59681441799654, which is frequency 50 cents above D#10.
44657 Acceptable range is "[10, 100000]".
44658
44659 coeffclamp
44660 This option is deprecated and ignored.
44661
44662 tlength
44663 Specify the transform length in time domain. Use this option to
44664 control accuracy trade-off between time domain and frequency domain
44665 at every frequency sample. It can contain variables:
44666
44667 frequency, freq, f
44668 the frequency where it is evaluated
44669
44670 timeclamp, tc
44671 the value of timeclamp option.
44672
44673 Default value is "384*tc/(384+tc*f)".
44674
44675 count
44676 Specify the transform count for every video frame. Default value is
44677 6. Acceptable range is "[1, 30]".
44678
44679 fcount
44680 Specify the transform count for every single pixel. Default value
44681 is 0, which makes it computed automatically. Acceptable range is
44682 "[0, 10]".
44683
44684 fontfile
44685 Specify font file for use with freetype to draw the axis. If not
44686 specified, use embedded font. Note that drawing with font file or
44687 embedded font is not implemented with custom basefreq and endfreq,
44688 use axisfile option instead.
44689
44690 font
44691 Specify fontconfig pattern. This has lower priority than fontfile.
44692 The ":" in the pattern may be replaced by "|" to avoid unnecessary
44693 escaping.
44694
44695 fontcolor
44696 Specify font color expression. This is arithmetic expression that
44697 should return integer value 0xRRGGBB. It can contain variables:
44698
44699 frequency, freq, f
44700 the frequency where it is evaluated
44701
44702 timeclamp, tc
44703 the value of timeclamp option
44704
44705 and functions:
44706
44707 midi(f)
44708 midi number of frequency f, some midi numbers: E0(16), C1(24),
44709 C2(36), A4(69)
44710
44711 r(x), g(x), b(x)
44712 red, green, and blue value of intensity x.
44713
44714 Default value is "st(0, (midi(f)-59.5)/12); st(1,
44715 if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0)); r(1-ld(1)) +
44716 b(ld(1))".
44717
44718 axisfile
44719 Specify image file to draw the axis. This option override fontfile
44720 and fontcolor option.
44721
44722 axis, text
44723 Enable/disable drawing text to the axis. If it is set to 0, drawing
44724 to the axis is disabled, ignoring fontfile and axisfile option.
44725 Default value is 1.
44726
44727 csp Set colorspace. The accepted values are:
44728
44729 unspecified
44730 Unspecified (default)
44731
44732 bt709
44733 BT.709
44734
44735 fcc FCC
44736
44737 bt470bg
44738 BT.470BG or BT.601-6 625
44739
44740 smpte170m
44741 SMPTE-170M or BT.601-6 525
44742
44743 smpte240m
44744 SMPTE-240M
44745
44746 bt2020ncl
44747 BT.2020 with non-constant luminance
44748
44749 cscheme
44750 Set spectrogram color scheme. This is list of floating point values
44751 with format "left_r|left_g|left_b|right_r|right_g|right_b". The
44752 default is "1|0.5|0|0|0.5|1".
44753
44754 Examples
44755
44756 • Playing audio while showing the spectrum:
44757
44758 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
44759
44760 • Same as above, but with frame rate 30 fps:
44761
44762 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
44763
44764 • Playing at 1280x720:
44765
44766 ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
44767
44768 • Disable sonogram display:
44769
44770 sono_h=0
44771
44772 • A1 and its harmonics: A1, A2, (near)E3, A3:
44773
44774 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),
44775 asplit[a][out1]; [a] showcqt [out0]'
44776
44777 • Same as above, but with more accuracy in frequency domain:
44778
44779 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),
44780 asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
44781
44782 • Custom volume:
44783
44784 bar_v=10:sono_v=bar_v*a_weighting(f)
44785
44786 • Custom gamma, now spectrum is linear to the amplitude.
44787
44788 bar_g=2:sono_g=2
44789
44790 • Custom tlength equation:
44791
44792 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)))'
44793
44794 • Custom fontcolor and fontfile, C-note is colored green, others are
44795 colored blue:
44796
44797 fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
44798
44799 • Custom font using fontconfig:
44800
44801 font='Courier New,Monospace,mono|bold'
44802
44803 • Custom frequency range with custom axis using image file:
44804
44805 axisfile=myaxis.png:basefreq=40:endfreq=10000
44806
44807 showcwt
44808 Convert input audio to video output representing frequency spectrum
44809 using Continuous Wavelet Transform and Morlet wavelet.
44810
44811 The filter accepts the following options:
44812
44813 size, s
44814 Specify the video size for the output. For the syntax of this
44815 option, check the "Video size" section in the ffmpeg-utils manual.
44816 Default value is "640x512".
44817
44818 rate, r
44819 Set the output frame rate. Default value is 25.
44820
44821 scale
44822 Set the frequency scale used. Allowed values are:
44823
44824 linear
44825 log2
44826 bark
44827 mel
44828 erbs
44829
44830 Default value is "linear".
44831
44832 min Set the minimum frequency that will be used in output. Default is
44833 20 Hz.
44834
44835 max Set the maximum frequency that will be used in output. Default is
44836 20000 Hz. The real frequency upper limit depends on input audio's
44837 sample rate and such will be enforced on this value when it is set
44838 to value greater than Nyquist frequency.
44839
44840 logb
44841 Set the logarithmic basis for brightness strength when mapping
44842 calculated magnitude values to pixel values. Allowed range is from
44843 0 to 1. Default value is 0.0001.
44844
44845 deviation
44846 Set the frequency deviation. Lower values than 1 are more
44847 frequency oriented, while higher values than 1 are more time
44848 oriented. Allowed range is from 0 to 10. Default value is 1.
44849
44850 pps Set the number of pixel output per each second in one row. Allowed
44851 range is from 1 to 1024. Default value is 64.
44852
44853 mode
44854 Set the output visual mode. Allowed values are:
44855
44856 magnitude
44857 Show magnitude.
44858
44859 phase
44860 Show only phase.
44861
44862 magphase
44863 Show combination of magnitude and phase. Magnitude is mapped
44864 to brightness and phase to color.
44865
44866 channel
44867 Show unique color per channel magnitude.
44868
44869 stereo
44870 Show unique color per stereo difference.
44871
44872 Default value is "magnitude".
44873
44874 slide
44875 Set the output slide method. Allowed values are:
44876
44877 replace
44878 scroll
44879 frame
44880 direction
44881 Set the direction method for output slide method. Allowed values
44882 are:
44883
44884 lr Direction from left to right.
44885
44886 rl Direction from right to left.
44887
44888 ud Direction from up to down.
44889
44890 du Direction from down to up.
44891
44892 showfreqs
44893 Convert input audio to video output representing the audio power
44894 spectrum. Audio amplitude is on Y-axis while frequency is on X-axis.
44895
44896 The filter accepts the following options:
44897
44898 size, s
44899 Specify size of video. For the syntax of this option, check the
44900 "Video size" section in the ffmpeg-utils manual. Default is
44901 "1024x512".
44902
44903 rate, r
44904 Set video rate. Default is 25.
44905
44906 mode
44907 Set display mode. This set how each frequency bin will be
44908 represented.
44909
44910 It accepts the following values:
44911
44912 line
44913 bar
44914 dot
44915
44916 Default is "bar".
44917
44918 ascale
44919 Set amplitude scale.
44920
44921 It accepts the following values:
44922
44923 lin Linear scale.
44924
44925 sqrt
44926 Square root scale.
44927
44928 cbrt
44929 Cubic root scale.
44930
44931 log Logarithmic scale.
44932
44933 Default is "log".
44934
44935 fscale
44936 Set frequency scale.
44937
44938 It accepts the following values:
44939
44940 lin Linear scale.
44941
44942 log Logarithmic scale.
44943
44944 rlog
44945 Reverse logarithmic scale.
44946
44947 Default is "lin".
44948
44949 win_size
44950 Set window size. Allowed range is from 16 to 65536.
44951
44952 Default is 2048
44953
44954 win_func
44955 Set windowing function.
44956
44957 It accepts the following values:
44958
44959 rect
44960 bartlett
44961 hanning
44962 hamming
44963 blackman
44964 welch
44965 flattop
44966 bharris
44967 bnuttall
44968 bhann
44969 sine
44970 nuttall
44971 lanczos
44972 gauss
44973 tukey
44974 dolph
44975 cauchy
44976 parzen
44977 poisson
44978 bohman
44979 kaiser
44980
44981 Default is "hanning".
44982
44983 overlap
44984 Set window overlap. In range "[0, 1]". Default is 1, which means
44985 optimal overlap for selected window function will be picked.
44986
44987 averaging
44988 Set time averaging. Setting this to 0 will display current maximal
44989 peaks. Default is 1, which means time averaging is disabled.
44990
44991 colors
44992 Specify list of colors separated by space or by '|' which will be
44993 used to draw channel frequencies. Unrecognized or missing colors
44994 will be replaced by white color.
44995
44996 cmode
44997 Set channel display mode.
44998
44999 It accepts the following values:
45000
45001 combined
45002 separate
45003
45004 Default is "combined".
45005
45006 minamp
45007 Set minimum amplitude used in "log" amplitude scaler.
45008
45009 data
45010 Set data display mode.
45011
45012 It accepts the following values:
45013
45014 magnitude
45015 phase
45016 delay
45017
45018 Default is "magnitude".
45019
45020 channels
45021 Set channels to use when processing audio. By default all are
45022 processed.
45023
45024 showspatial
45025 Convert stereo input audio to a video output, representing the spatial
45026 relationship between two channels.
45027
45028 The filter accepts the following options:
45029
45030 size, s
45031 Specify the video size for the output. For the syntax of this
45032 option, check the "Video size" section in the ffmpeg-utils manual.
45033 Default value is "512x512".
45034
45035 win_size
45036 Set window size. Allowed range is from 1024 to 65536. Default size
45037 is 4096.
45038
45039 win_func
45040 Set window function.
45041
45042 It accepts the following values:
45043
45044 rect
45045 bartlett
45046 hann
45047 hanning
45048 hamming
45049 blackman
45050 welch
45051 flattop
45052 bharris
45053 bnuttall
45054 bhann
45055 sine
45056 nuttall
45057 lanczos
45058 gauss
45059 tukey
45060 dolph
45061 cauchy
45062 parzen
45063 poisson
45064 bohman
45065 kaiser
45066
45067 Default value is "hann".
45068
45069 rate, r
45070 Set output framerate.
45071
45072 showspectrum
45073 Convert input audio to a video output, representing the audio frequency
45074 spectrum.
45075
45076 The filter accepts the following options:
45077
45078 size, s
45079 Specify the video size for the output. For the syntax of this
45080 option, check the "Video size" section in the ffmpeg-utils manual.
45081 Default value is "640x512".
45082
45083 slide
45084 Specify how the spectrum should slide along the window.
45085
45086 It accepts the following values:
45087
45088 replace
45089 the samples start again on the left when they reach the right
45090
45091 scroll
45092 the samples scroll from right to left
45093
45094 fullframe
45095 frames are only produced when the samples reach the right
45096
45097 rscroll
45098 the samples scroll from left to right
45099
45100 lreplace
45101 the samples start again on the right when they reach the left
45102
45103 Default value is "replace".
45104
45105 mode
45106 Specify display mode.
45107
45108 It accepts the following values:
45109
45110 combined
45111 all channels are displayed in the same row
45112
45113 separate
45114 all channels are displayed in separate rows
45115
45116 Default value is combined.
45117
45118 color
45119 Specify display color mode.
45120
45121 It accepts the following values:
45122
45123 channel
45124 each channel is displayed in a separate color
45125
45126 intensity
45127 each channel is displayed using the same color scheme
45128
45129 rainbow
45130 each channel is displayed using the rainbow color scheme
45131
45132 moreland
45133 each channel is displayed using the moreland color scheme
45134
45135 nebulae
45136 each channel is displayed using the nebulae color scheme
45137
45138 fire
45139 each channel is displayed using the fire color scheme
45140
45141 fiery
45142 each channel is displayed using the fiery color scheme
45143
45144 fruit
45145 each channel is displayed using the fruit color scheme
45146
45147 cool
45148 each channel is displayed using the cool color scheme
45149
45150 magma
45151 each channel is displayed using the magma color scheme
45152
45153 green
45154 each channel is displayed using the green color scheme
45155
45156 viridis
45157 each channel is displayed using the viridis color scheme
45158
45159 plasma
45160 each channel is displayed using the plasma color scheme
45161
45162 cividis
45163 each channel is displayed using the cividis color scheme
45164
45165 terrain
45166 each channel is displayed using the terrain color scheme
45167
45168 Default value is channel.
45169
45170 scale
45171 Specify scale used for calculating intensity color values.
45172
45173 It accepts the following values:
45174
45175 lin linear
45176
45177 sqrt
45178 square root, default
45179
45180 cbrt
45181 cubic root
45182
45183 log logarithmic
45184
45185 4thrt
45186 4th root
45187
45188 5thrt
45189 5th root
45190
45191 Default value is sqrt.
45192
45193 fscale
45194 Specify frequency scale.
45195
45196 It accepts the following values:
45197
45198 lin linear
45199
45200 log logarithmic
45201
45202 Default value is lin.
45203
45204 saturation
45205 Set saturation modifier for displayed colors. Negative values
45206 provide alternative color scheme. 0 is no saturation at all.
45207 Saturation must be in [-10.0, 10.0] range. Default value is 1.
45208
45209 win_func
45210 Set window function.
45211
45212 It accepts the following values:
45213
45214 rect
45215 bartlett
45216 hann
45217 hanning
45218 hamming
45219 blackman
45220 welch
45221 flattop
45222 bharris
45223 bnuttall
45224 bhann
45225 sine
45226 nuttall
45227 lanczos
45228 gauss
45229 tukey
45230 dolph
45231 cauchy
45232 parzen
45233 poisson
45234 bohman
45235 kaiser
45236
45237 Default value is "hann".
45238
45239 orientation
45240 Set orientation of time vs frequency axis. Can be "vertical" or
45241 "horizontal". Default is "vertical".
45242
45243 overlap
45244 Set ratio of overlap window. Default value is 0. When value is 1
45245 overlap is set to recommended size for specific window function
45246 currently used.
45247
45248 gain
45249 Set scale gain for calculating intensity color values. Default
45250 value is 1.
45251
45252 data
45253 Set which data to display. Can be "magnitude", default or "phase",
45254 or unwrapped phase: "uphase".
45255
45256 rotation
45257 Set color rotation, must be in [-1.0, 1.0] range. Default value is
45258 0.
45259
45260 start
45261 Set start frequency from which to display spectrogram. Default is
45262 0.
45263
45264 stop
45265 Set stop frequency to which to display spectrogram. Default is 0.
45266
45267 fps Set upper frame rate limit. Default is "auto", unlimited.
45268
45269 legend
45270 Draw time and frequency axes and legends. Default is disabled.
45271
45272 drange
45273 Set dynamic range used to calculate intensity color values. Default
45274 is 120 dBFS. Allowed range is from 10 to 200.
45275
45276 limit
45277 Set upper limit of input audio samples volume in dBFS. Default is 0
45278 dBFS. Allowed range is from -100 to 100.
45279
45280 opacity
45281 Set opacity strength when using pixel format output with alpha
45282 component.
45283
45284 The usage is very similar to the showwaves filter; see the examples in
45285 that section.
45286
45287 Examples
45288
45289 • Large window with logarithmic color scaling:
45290
45291 showspectrum=s=1280x480:scale=log
45292
45293 • Complete example for a colored and sliding spectrum per channel
45294 using ffplay:
45295
45296 ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
45297 [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
45298
45299 showspectrumpic
45300 Convert input audio to a single video frame, representing the audio
45301 frequency spectrum.
45302
45303 The filter accepts the following options:
45304
45305 size, s
45306 Specify the video size for the output. For the syntax of this
45307 option, check the "Video size" section in the ffmpeg-utils manual.
45308 Default value is "4096x2048".
45309
45310 mode
45311 Specify display mode.
45312
45313 It accepts the following values:
45314
45315 combined
45316 all channels are displayed in the same row
45317
45318 separate
45319 all channels are displayed in separate rows
45320
45321 Default value is combined.
45322
45323 color
45324 Specify display color mode.
45325
45326 It accepts the following values:
45327
45328 channel
45329 each channel is displayed in a separate color
45330
45331 intensity
45332 each channel is displayed using the same color scheme
45333
45334 rainbow
45335 each channel is displayed using the rainbow color scheme
45336
45337 moreland
45338 each channel is displayed using the moreland color scheme
45339
45340 nebulae
45341 each channel is displayed using the nebulae color scheme
45342
45343 fire
45344 each channel is displayed using the fire color scheme
45345
45346 fiery
45347 each channel is displayed using the fiery color scheme
45348
45349 fruit
45350 each channel is displayed using the fruit color scheme
45351
45352 cool
45353 each channel is displayed using the cool color scheme
45354
45355 magma
45356 each channel is displayed using the magma color scheme
45357
45358 green
45359 each channel is displayed using the green color scheme
45360
45361 viridis
45362 each channel is displayed using the viridis color scheme
45363
45364 plasma
45365 each channel is displayed using the plasma color scheme
45366
45367 cividis
45368 each channel is displayed using the cividis color scheme
45369
45370 terrain
45371 each channel is displayed using the terrain color scheme
45372
45373 Default value is intensity.
45374
45375 scale
45376 Specify scale used for calculating intensity color values.
45377
45378 It accepts the following values:
45379
45380 lin linear
45381
45382 sqrt
45383 square root, default
45384
45385 cbrt
45386 cubic root
45387
45388 log logarithmic
45389
45390 4thrt
45391 4th root
45392
45393 5thrt
45394 5th root
45395
45396 Default value is log.
45397
45398 fscale
45399 Specify frequency scale.
45400
45401 It accepts the following values:
45402
45403 lin linear
45404
45405 log logarithmic
45406
45407 Default value is lin.
45408
45409 saturation
45410 Set saturation modifier for displayed colors. Negative values
45411 provide alternative color scheme. 0 is no saturation at all.
45412 Saturation must be in [-10.0, 10.0] range. Default value is 1.
45413
45414 win_func
45415 Set window function.
45416
45417 It accepts the following values:
45418
45419 rect
45420 bartlett
45421 hann
45422 hanning
45423 hamming
45424 blackman
45425 welch
45426 flattop
45427 bharris
45428 bnuttall
45429 bhann
45430 sine
45431 nuttall
45432 lanczos
45433 gauss
45434 tukey
45435 dolph
45436 cauchy
45437 parzen
45438 poisson
45439 bohman
45440 kaiser
45441
45442 Default value is "hann".
45443
45444 orientation
45445 Set orientation of time vs frequency axis. Can be "vertical" or
45446 "horizontal". Default is "vertical".
45447
45448 gain
45449 Set scale gain for calculating intensity color values. Default
45450 value is 1.
45451
45452 legend
45453 Draw time and frequency axes and legends. Default is enabled.
45454
45455 rotation
45456 Set color rotation, must be in [-1.0, 1.0] range. Default value is
45457 0.
45458
45459 start
45460 Set start frequency from which to display spectrogram. Default is
45461 0.
45462
45463 stop
45464 Set stop frequency to which to display spectrogram. Default is 0.
45465
45466 drange
45467 Set dynamic range used to calculate intensity color values. Default
45468 is 120 dBFS. Allowed range is from 10 to 200.
45469
45470 limit
45471 Set upper limit of input audio samples volume in dBFS. Default is 0
45472 dBFS. Allowed range is from -100 to 100.
45473
45474 opacity
45475 Set opacity strength when using pixel format output with alpha
45476 component.
45477
45478 Examples
45479
45480 • Extract an audio spectrogram of a whole audio track in a 1024x1024
45481 picture using ffmpeg:
45482
45483 ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
45484
45485 showvolume
45486 Convert input audio volume to a video output.
45487
45488 The filter accepts the following options:
45489
45490 rate, r
45491 Set video rate.
45492
45493 b Set border width, allowed range is [0, 5]. Default is 1.
45494
45495 w Set channel width, allowed range is [80, 8192]. Default is 400.
45496
45497 h Set channel height, allowed range is [1, 900]. Default is 20.
45498
45499 f Set fade, allowed range is [0, 1]. Default is 0.95.
45500
45501 c Set volume color expression.
45502
45503 The expression can use the following variables:
45504
45505 VOLUME
45506 Current max volume of channel in dB.
45507
45508 PEAK
45509 Current peak.
45510
45511 CHANNEL
45512 Current channel number, starting from 0.
45513
45514 t If set, displays channel names. Default is enabled.
45515
45516 v If set, displays volume values. Default is enabled.
45517
45518 o Set orientation, can be horizontal: "h" or vertical: "v", default
45519 is "h".
45520
45521 s Set step size, allowed range is [0, 5]. Default is 0, which means
45522 step is disabled.
45523
45524 p Set background opacity, allowed range is [0, 1]. Default is 0.
45525
45526 m Set metering mode, can be peak: "p" or rms: "r", default is "p".
45527
45528 ds Set display scale, can be linear: "lin" or log: "log", default is
45529 "lin".
45530
45531 dm In second. If set to > 0., display a line for the max level in the
45532 previous seconds. default is disabled: 0.
45533
45534 dmc The color of the max line. Use when "dm" option is set to > 0.
45535 default is: "orange"
45536
45537 showwaves
45538 Convert input audio to a video output, representing the samples waves.
45539
45540 The filter accepts the following options:
45541
45542 size, s
45543 Specify the video size for the output. For the syntax of this
45544 option, check the "Video size" section in the ffmpeg-utils manual.
45545 Default value is "600x240".
45546
45547 mode
45548 Set display mode.
45549
45550 Available values are:
45551
45552 point
45553 Draw a point for each sample.
45554
45555 line
45556 Draw a vertical line for each sample.
45557
45558 p2p Draw a point for each sample and a line between them.
45559
45560 cline
45561 Draw a centered vertical line for each sample.
45562
45563 Default value is "point".
45564
45565 n Set the number of samples which are printed on the same column. A
45566 larger value will decrease the frame rate. Must be a positive
45567 integer. This option can be set only if the value for rate is not
45568 explicitly specified.
45569
45570 rate, r
45571 Set the (approximate) output frame rate. This is done by setting
45572 the option n. Default value is "25".
45573
45574 split_channels
45575 Set if channels should be drawn separately or overlap. Default
45576 value is 0.
45577
45578 colors
45579 Set colors separated by '|' which are going to be used for drawing
45580 of each channel.
45581
45582 scale
45583 Set amplitude scale.
45584
45585 Available values are:
45586
45587 lin Linear.
45588
45589 log Logarithmic.
45590
45591 sqrt
45592 Square root.
45593
45594 cbrt
45595 Cubic root.
45596
45597 Default is linear.
45598
45599 draw
45600 Set the draw mode. This is mostly useful to set for high n.
45601
45602 Available values are:
45603
45604 scale
45605 Scale pixel values for each drawn sample.
45606
45607 full
45608 Draw every sample directly.
45609
45610 Default value is "scale".
45611
45612 Examples
45613
45614 • Output the input file audio and the corresponding video
45615 representation at the same time:
45616
45617 amovie=a.mp3,asplit[out0],showwaves[out1]
45618
45619 • Create a synthetic signal and show it with showwaves, forcing a
45620 frame rate of 30 frames per second:
45621
45622 aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
45623
45624 showwavespic
45625 Convert input audio to a single video frame, representing the samples
45626 waves.
45627
45628 The filter accepts the following options:
45629
45630 size, s
45631 Specify the video size for the output. For the syntax of this
45632 option, check the "Video size" section in the ffmpeg-utils manual.
45633 Default value is "600x240".
45634
45635 split_channels
45636 Set if channels should be drawn separately or overlap. Default
45637 value is 0.
45638
45639 colors
45640 Set colors separated by '|' which are going to be used for drawing
45641 of each channel.
45642
45643 scale
45644 Set amplitude scale.
45645
45646 Available values are:
45647
45648 lin Linear.
45649
45650 log Logarithmic.
45651
45652 sqrt
45653 Square root.
45654
45655 cbrt
45656 Cubic root.
45657
45658 Default is linear.
45659
45660 draw
45661 Set the draw mode.
45662
45663 Available values are:
45664
45665 scale
45666 Scale pixel values for each drawn sample.
45667
45668 full
45669 Draw every sample directly.
45670
45671 Default value is "scale".
45672
45673 filter
45674 Set the filter mode.
45675
45676 Available values are:
45677
45678 average
45679 Use average samples values for each drawn sample.
45680
45681 peak
45682 Use peak samples values for each drawn sample.
45683
45684 Default value is "average".
45685
45686 Examples
45687
45688 • Extract a channel split representation of the wave form of a whole
45689 audio track in a 1024x800 picture using ffmpeg:
45690
45691 ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
45692
45693 sidedata, asidedata
45694 Delete frame side data, or select frames based on it.
45695
45696 This filter accepts the following options:
45697
45698 mode
45699 Set mode of operation of the filter.
45700
45701 Can be one of the following:
45702
45703 select
45704 Select every frame with side data of "type".
45705
45706 delete
45707 Delete side data of "type". If "type" is not set, delete all
45708 side data in the frame.
45709
45710 type
45711 Set side data type used with all modes. Must be set for "select"
45712 mode. For the list of frame side data types, refer to the
45713 "AVFrameSideDataType" enum in libavutil/frame.h. For example, to
45714 choose "AV_FRAME_DATA_PANSCAN" side data, you must specify
45715 "PANSCAN".
45716
45717 spectrumsynth
45718 Synthesize audio from 2 input video spectrums, first input stream
45719 represents magnitude across time and second represents phase across
45720 time. The filter will transform from frequency domain as displayed in
45721 videos back to time domain as presented in audio output.
45722
45723 This filter is primarily created for reversing processed showspectrum
45724 filter outputs, but can synthesize sound from other spectrograms too.
45725 But in such case results are going to be poor if the phase data is not
45726 available, because in such cases phase data need to be recreated,
45727 usually it's just recreated from random noise. For best results use
45728 gray only output ("channel" color mode in showspectrum filter) and
45729 "log" scale for magnitude video and "lin" scale for phase video. To
45730 produce phase, for 2nd video, use "data" option. Inputs videos should
45731 generally use "fullframe" slide mode as that saves resources needed for
45732 decoding video.
45733
45734 The filter accepts the following options:
45735
45736 sample_rate
45737 Specify sample rate of output audio, the sample rate of audio from
45738 which spectrum was generated may differ.
45739
45740 channels
45741 Set number of channels represented in input video spectrums.
45742
45743 scale
45744 Set scale which was used when generating magnitude input spectrum.
45745 Can be "lin" or "log". Default is "log".
45746
45747 slide
45748 Set slide which was used when generating inputs spectrums. Can be
45749 "replace", "scroll", "fullframe" or "rscroll". Default is
45750 "fullframe".
45751
45752 win_func
45753 Set window function used for resynthesis.
45754
45755 overlap
45756 Set window overlap. In range "[0, 1]". Default is 1, which means
45757 optimal overlap for selected window function will be picked.
45758
45759 orientation
45760 Set orientation of input videos. Can be "vertical" or "horizontal".
45761 Default is "vertical".
45762
45763 Examples
45764
45765 • First create magnitude and phase videos from audio, assuming audio
45766 is stereo with 44100 sample rate, then resynthesize videos back to
45767 audio with spectrumsynth:
45768
45769 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
45770 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
45771 ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
45772
45773 split, asplit
45774 Split input into several identical outputs.
45775
45776 "asplit" works with audio input, "split" with video.
45777
45778 The filter accepts a single parameter which specifies the number of
45779 outputs. If unspecified, it defaults to 2.
45780
45781 Examples
45782
45783 • Create two separate outputs from the same input:
45784
45785 [in] split [out0][out1]
45786
45787 • To create 3 or more outputs, you need to specify the number of
45788 outputs, like in:
45789
45790 [in] asplit=3 [out0][out1][out2]
45791
45792 • Create two separate outputs from the same input, one cropped and
45793 one padded:
45794
45795 [in] split [splitout1][splitout2];
45796 [splitout1] crop=100:100:0:0 [cropout];
45797 [splitout2] pad=200:200:100:100 [padout];
45798
45799 • Create 5 copies of the input audio with ffmpeg:
45800
45801 ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
45802
45803 zmq, azmq
45804 Receive commands sent through a libzmq client, and forward them to
45805 filters in the filtergraph.
45806
45807 "zmq" and "azmq" work as a pass-through filters. "zmq" must be inserted
45808 between two video filters, "azmq" between two audio filters. Both are
45809 capable to send messages to any filter type.
45810
45811 To enable these filters you need to install the libzmq library and
45812 headers and configure FFmpeg with "--enable-libzmq".
45813
45814 For more information about libzmq see: <http://www.zeromq.org/>
45815
45816 The "zmq" and "azmq" filters work as a libzmq server, which receives
45817 messages sent through a network interface defined by the bind_address
45818 (or the abbreviation "b") option. Default value of this option is
45819 tcp://localhost:5555. You may want to alter this value to your needs,
45820 but do not forget to escape any ':' signs (see filtergraph escaping).
45821
45822 The received message must be in the form:
45823
45824 <TARGET> <COMMAND> [<ARG>]
45825
45826 TARGET specifies the target of the command, usually the name of the
45827 filter class or a specific filter instance name. The default filter
45828 instance name uses the pattern Parsed_<filter_name>_<index>, but you
45829 can override this by using the filter_name@id syntax (see Filtergraph
45830 syntax).
45831
45832 COMMAND specifies the name of the command for the target filter.
45833
45834 ARG is optional and specifies the optional argument list for the given
45835 COMMAND.
45836
45837 Upon reception, the message is processed and the corresponding command
45838 is injected into the filtergraph. Depending on the result, the filter
45839 will send a reply to the client, adopting the format:
45840
45841 <ERROR_CODE> <ERROR_REASON>
45842 <MESSAGE>
45843
45844 MESSAGE is optional.
45845
45846 Examples
45847
45848 Look at tools/zmqsend for an example of a zmq client which can be used
45849 to send commands processed by these filters.
45850
45851 Consider the following filtergraph generated by ffplay. In this
45852 example the last overlay filter has an instance name. All other filters
45853 will have default instance names.
45854
45855 ffplay -dumpgraph 1 -f lavfi "
45856 color=s=100x100:c=red [l];
45857 color=s=100x100:c=blue [r];
45858 nullsrc=s=200x100, zmq [bg];
45859 [bg][l] overlay [bg+l];
45860 [bg+l][r] overlay@my=x=100 "
45861
45862 To change the color of the left side of the video, the following
45863 command can be used:
45864
45865 echo Parsed_color_0 c yellow | tools/zmqsend
45866
45867 To change the right side:
45868
45869 echo Parsed_color_1 c pink | tools/zmqsend
45870
45871 To change the position of the right side:
45872
45873 echo overlay@my x 150 | tools/zmqsend
45874
45876 Below is a description of the currently available multimedia sources.
45877
45878 amovie
45879 This is the same as movie source, except it selects an audio stream by
45880 default.
45881
45882 avsynctest
45883 Generate an Audio/Video Sync Test.
45884
45885 Generated stream periodically shows flash video frame and emits beep in
45886 audio. Useful to inspect A/V sync issues.
45887
45888 It accepts the following options:
45889
45890 size, s
45891 Set output video size. Default value is "hd720".
45892
45893 framerate, fr
45894 Set output video frame rate. Default value is 30.
45895
45896 samplerate, sr
45897 Set output audio sample rate. Default value is 44100.
45898
45899 amplitude, a
45900 Set output audio beep amplitude. Default value is 0.7.
45901
45902 period, p
45903 Set output audio beep period in seconds. Default value is 3.
45904
45905 delay, dl
45906 Set output video flash delay in number of frames. Default value is
45907 0.
45908
45909 cycle, c
45910 Enable cycling of video delays, by default is disabled.
45911
45912 duration, d
45913 Set stream output duration. By default duration is unlimited.
45914
45915 fg, bg, ag
45916 Set foreground/background/additional color.
45917
45918 movie
45919 Read audio and/or video stream(s) from a movie container.
45920
45921 It accepts the following parameters:
45922
45923 filename
45924 The name of the resource to read (not necessarily a file; it can
45925 also be a device or a stream accessed through some protocol).
45926
45927 format_name, f
45928 Specifies the format assumed for the movie to read, and can be
45929 either the name of a container or an input device. If not
45930 specified, the format is guessed from movie_name or by probing.
45931
45932 seek_point, sp
45933 Specifies the seek point in seconds. The frames will be output
45934 starting from this seek point. The parameter is evaluated with
45935 "av_strtod", so the numerical value may be suffixed by an IS
45936 postfix. The default value is "0".
45937
45938 streams, s
45939 Specifies the streams to read. Several streams can be specified,
45940 separated by "+". The source will then have as many outputs, in the
45941 same order. The syntax is explained in the "Stream specifiers"
45942 section in the ffmpeg manual. Two special names, "dv" and "da"
45943 specify respectively the default (best suited) video and audio
45944 stream. Default is "dv", or "da" if the filter is called as
45945 "amovie".
45946
45947 stream_index, si
45948 Specifies the index of the video stream to read. If the value is
45949 -1, the most suitable video stream will be automatically selected.
45950 The default value is "-1". Deprecated. If the filter is called
45951 "amovie", it will select audio instead of video.
45952
45953 loop
45954 Specifies how many times to read the stream in sequence. If the
45955 value is 0, the stream will be looped infinitely. Default value is
45956 "1".
45957
45958 Note that when the movie is looped the source timestamps are not
45959 changed, so it will generate non monotonically increasing
45960 timestamps.
45961
45962 discontinuity
45963 Specifies the time difference between frames above which the point
45964 is considered a timestamp discontinuity which is removed by
45965 adjusting the later timestamps.
45966
45967 dec_threads
45968 Specifies the number of threads for decoding
45969
45970 format_opts
45971 Specify format options for the opened file. Format options can be
45972 specified as a list of key=value pairs separated by ':'. The
45973 following example shows how to add protocol_whitelist and
45974 protocol_blacklist options:
45975
45976 ffplay -f lavfi
45977 "movie=filename='1.sdp':format_opts='protocol_whitelist=file,rtp,udp\:protocol_blacklist=http'"
45978
45979 It allows overlaying a second video on top of the main input of a
45980 filtergraph, as shown in this graph:
45981
45982 input -----------> deltapts0 --> overlay --> output
45983 ^
45984 |
45985 movie --> scale--> deltapts1 -------+
45986
45987 Examples
45988
45989 • Skip 3.2 seconds from the start of the AVI file in.avi, and overlay
45990 it on top of the input labelled "in":
45991
45992 movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
45993 [in] setpts=PTS-STARTPTS [main];
45994 [main][over] overlay=16:16 [out]
45995
45996 • Read from a video4linux2 device, and overlay it on top of the input
45997 labelled "in":
45998
45999 movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
46000 [in] setpts=PTS-STARTPTS [main];
46001 [main][over] overlay=16:16 [out]
46002
46003 • Read the first video stream and the audio stream with id 0x81 from
46004 dvd.vob; the video is connected to the pad named "video" and the
46005 audio is connected to the pad named "audio":
46006
46007 movie=dvd.vob:s=v:0+#0x81 [video] [audio]
46008
46009 Commands
46010
46011 Both movie and amovie support the following commands:
46012
46013 seek
46014 Perform seek using "av_seek_frame". The syntax is: seek
46015 stream_index|timestamp|flags
46016
46017 • stream_index: If stream_index is -1, a default stream is
46018 selected, and timestamp is automatically converted from
46019 AV_TIME_BASE units to the stream specific time_base.
46020
46021 • timestamp: Timestamp in AVStream.time_base units or, if no
46022 stream is specified, in AV_TIME_BASE units.
46023
46024 • flags: Flags which select direction and seeking mode.
46025
46026 get_duration
46027 Get movie duration in AV_TIME_BASE units.
46028
46030 FFmpeg can be hooked up with a number of external libraries to add
46031 support for more formats. None of them are used by default, their use
46032 has to be explicitly requested by passing the appropriate flags to
46033 ./configure.
46034
46035 Alliance for Open Media (AOM)
46036 FFmpeg can make use of the AOM library for AV1 decoding and encoding.
46037
46038 Go to <http://aomedia.org/> and follow the instructions for installing
46039 the library. Then pass "--enable-libaom" to configure to enable it.
46040
46041 AMD AMF/VCE
46042 FFmpeg can use the AMD Advanced Media Framework library for accelerated
46043 H.264 and HEVC(only windows) encoding on hardware with Video Coding
46044 Engine (VCE).
46045
46046 To enable support you must obtain the AMF framework header
46047 files(version 1.4.9+) from
46048 <https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git>.
46049
46050 Create an "AMF/" directory in the system include path. Copy the
46051 contents of "AMF/amf/public/include/" into that directory. Then
46052 configure FFmpeg with "--enable-amf".
46053
46054 Initialization of amf encoder occurs in this order: 1) trying to
46055 initialize through dx11(only windows) 2) trying to initialize through
46056 dx9(only windows) 3) trying to initialize through vulkan
46057
46058 To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and
46059 amf-amdgpu-pro package(amdgru-pro contains, but does not install
46060 automatically) are required.
46061
46062 This driver can be installed using amdgpu-pro-install script in
46063 official amd driver archive.
46064
46065 AviSynth
46066 FFmpeg can read AviSynth scripts as input. To enable support, pass
46067 "--enable-avisynth" to configure after installing the headers provided
46068 by <https://github.com/AviSynth/AviSynthPlus>. AviSynth+ can be
46069 configured to install only the headers by either passing
46070 "-DHEADERS_ONLY:bool=on" to the normal CMake-based build system, or by
46071 using the supplied "GNUmakefile".
46072
46073 For Windows, supported AviSynth variants are <http://avisynth.nl> for
46074 32-bit builds and <http://avisynth.nl/index.php/AviSynth+> for 32-bit
46075 and 64-bit builds.
46076
46077 For Linux, macOS, and BSD, the only supported AviSynth variant is
46078 <https://github.com/AviSynth/AviSynthPlus>, starting with version 3.5.
46079
46080 In 2016, AviSynth+ added support for building with GCC. However,
46081 due to the eccentricities of Windows' calling conventions, 32-bit
46082 GCC builds of AviSynth+ are not compatible with typical 32-bit
46083 builds of FFmpeg.
46084
46085 By default, FFmpeg assumes compatibility with 32-bit MSVC builds of
46086 AviSynth+ since that is the most widely-used and entrenched build
46087 configuration. Users can override this and enable support for
46088 32-bit GCC builds of AviSynth+ by passing "-DAVSC_WIN32_GCC32" to
46089 "--extra-cflags" when configuring FFmpeg.
46090
46091 64-bit builds of FFmpeg are not affected, and can use either MSVC
46092 or GCC builds of AviSynth+ without any special flags.
46093
46094 AviSynth(+) is loaded dynamically. Distributors can build FFmpeg
46095 with "--enable-avisynth", and the binaries will work regardless of
46096 the end user having AviSynth installed. If/when an end user would
46097 like to use AviSynth scripts, then they can install AviSynth(+) and
46098 FFmpeg will be able to find and use it to open scripts.
46099
46100 Chromaprint
46101 FFmpeg can make use of the Chromaprint library for generating audio
46102 fingerprints. Pass "--enable-chromaprint" to configure to enable it.
46103 See <https://acoustid.org/chromaprint>.
46104
46105 codec2
46106 FFmpeg can make use of the codec2 library for codec2 decoding and
46107 encoding. There is currently no native decoder, so libcodec2 must be
46108 used for decoding.
46109
46110 Go to <http://freedv.org/>, download "Codec 2 source archive". Build
46111 and install using CMake. Debian users can install the libcodec2-dev
46112 package instead. Once libcodec2 is installed you can pass
46113 "--enable-libcodec2" to configure to enable it.
46114
46115 The easiest way to use codec2 is with .c2 files, since they contain the
46116 mode information required for decoding. To encode such a file, use a
46117 .c2 file extension and give the libcodec2 encoder the -mode option:
46118 "ffmpeg -i input.wav -mode 700C output.c2". Playback is as simple as
46119 "ffplay output.c2". For a list of supported modes, run "ffmpeg -h
46120 encoder=libcodec2". Raw codec2 files are also supported. To make
46121 sense of them the mode in use needs to be specified as a format option:
46122 "ffmpeg -f codec2raw -mode 1300 -i input.raw output.wav".
46123
46124 dav1d
46125 FFmpeg can make use of the dav1d library for AV1 video decoding.
46126
46127 Go to <https://code.videolan.org/videolan/dav1d> and follow the
46128 instructions for installing the library. Then pass "--enable-libdav1d"
46129 to configure to enable it.
46130
46131 davs2
46132 FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video
46133 decoding.
46134
46135 Go to <https://github.com/pkuvcl/davs2> and follow the instructions for
46136 installing the library. Then pass "--enable-libdavs2" to configure to
46137 enable it.
46138
46139 libdavs2 is under the GNU Public License Version 2 or later (see
46140 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
46141 details), you must upgrade FFmpeg's license to GPL in order to use
46142 it.
46143
46144 uavs3d
46145 FFmpeg can make use of the uavs3d library for AVS3-P2/IEEE1857.10 video
46146 decoding.
46147
46148 Go to <https://github.com/uavs3/uavs3d> and follow the instructions for
46149 installing the library. Then pass "--enable-libuavs3d" to configure to
46150 enable it.
46151
46152 Game Music Emu
46153 FFmpeg can make use of the Game Music Emu library to read audio from
46154 supported video game music file formats. Pass "--enable-libgme" to
46155 configure to enable it. See
46156 <https://bitbucket.org/mpyne/game-music-emu/overview>.
46157
46158 Intel QuickSync Video
46159 FFmpeg can use Intel QuickSync Video (QSV) for accelerated decoding and
46160 encoding of multiple codecs. To use QSV, FFmpeg must be linked against
46161 the "libmfx" dispatcher, which loads the actual decoding libraries.
46162
46163 The dispatcher is open source and can be downloaded from
46164 <https://github.com/lu-zero/mfx_dispatch.git>. FFmpeg needs to be
46165 configured with the "--enable-libmfx" option and "pkg-config" needs to
46166 be able to locate the dispatcher's ".pc" files.
46167
46168 Kvazaar
46169 FFmpeg can make use of the Kvazaar library for HEVC encoding.
46170
46171 Go to <https://github.com/ultravideo/kvazaar> and follow the
46172 instructions for installing the library. Then pass
46173 "--enable-libkvazaar" to configure to enable it.
46174
46175 LAME
46176 FFmpeg can make use of the LAME library for MP3 encoding.
46177
46178 Go to <http://lame.sourceforge.net/> and follow the instructions for
46179 installing the library. Then pass "--enable-libmp3lame" to configure
46180 to enable it.
46181
46182 libilbc
46183 iLBC is a narrowband speech codec that has been made freely available
46184 by Google as part of the WebRTC project. libilbc is a packaging
46185 friendly copy of the iLBC codec. FFmpeg can make use of the libilbc
46186 library for iLBC decoding and encoding.
46187
46188 Go to <https://github.com/TimothyGu/libilbc> and follow the
46189 instructions for installing the library. Then pass "--enable-libilbc"
46190 to configure to enable it.
46191
46192 libjxl
46193 JPEG XL is an image format intended to fully replace legacy JPEG for an
46194 extended period of life. See <https://jpegxl.info/> for more
46195 information, and see <https://github.com/libjxl/libjxl> for the library
46196 source. You can pass "--enable-libjxl" to configure in order enable the
46197 libjxl wrapper.
46198
46199 libvpx
46200 FFmpeg can make use of the libvpx library for VP8/VP9 decoding and
46201 encoding.
46202
46203 Go to <http://www.webmproject.org/> and follow the instructions for
46204 installing the library. Then pass "--enable-libvpx" to configure to
46205 enable it.
46206
46207 ModPlug
46208 FFmpeg can make use of this library, originating in Modplug-XMMS, to
46209 read from MOD-like music files. See
46210 <https://github.com/Konstanty/libmodplug>. Pass "--enable-libmodplug"
46211 to configure to enable it.
46212
46213 OpenCORE, VisualOn, and Fraunhofer libraries
46214 Spun off Google Android sources, OpenCore, VisualOn and Fraunhofer
46215 libraries provide encoders for a number of audio codecs.
46216
46217 OpenCORE and VisualOn libraries are under the Apache License 2.0
46218 (see <http://www.apache.org/licenses/LICENSE-2.0> for details),
46219 which is incompatible to the LGPL version 2.1 and GPL version 2.
46220 You have to upgrade FFmpeg's license to LGPL version 3 (or if you
46221 have enabled GPL components, GPL version 3) by passing
46222 "--enable-version3" to configure in order to use it.
46223
46224 The license of the Fraunhofer AAC library is incompatible with the
46225 GPL. Therefore, for GPL builds, you have to pass
46226 "--enable-nonfree" to configure in order to use it. To the best of
46227 our knowledge, it is compatible with the LGPL.
46228
46229 OpenCORE AMR
46230
46231 FFmpeg can make use of the OpenCORE libraries for AMR-NB
46232 decoding/encoding and AMR-WB decoding.
46233
46234 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
46235 instructions for installing the libraries. Then pass
46236 "--enable-libopencore-amrnb" and/or "--enable-libopencore-amrwb" to
46237 configure to enable them.
46238
46239 VisualOn AMR-WB encoder library
46240
46241 FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB
46242 encoding.
46243
46244 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
46245 instructions for installing the library. Then pass
46246 "--enable-libvo-amrwbenc" to configure to enable it.
46247
46248 Fraunhofer AAC library
46249
46250 FFmpeg can make use of the Fraunhofer AAC library for AAC decoding &
46251 encoding.
46252
46253 Go to <http://sourceforge.net/projects/opencore-amr/> and follow the
46254 instructions for installing the library. Then pass
46255 "--enable-libfdk-aac" to configure to enable it.
46256
46257 OpenH264
46258 FFmpeg can make use of the OpenH264 library for H.264 decoding and
46259 encoding.
46260
46261 Go to <http://www.openh264.org/> and follow the instructions for
46262 installing the library. Then pass "--enable-libopenh264" to configure
46263 to enable it.
46264
46265 For decoding, this library is much more limited than the built-in
46266 decoder in libavcodec; currently, this library lacks support for
46267 decoding B-frames and some other main/high profile features. (It
46268 currently only supports constrained baseline profile and CABAC.) Using
46269 it is mostly useful for testing and for taking advantage of Cisco's
46270 patent portfolio license
46271 (<http://www.openh264.org/BINARY_LICENSE.txt>).
46272
46273 OpenJPEG
46274 FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos.
46275 Go to <http://www.openjpeg.org/> to get the libraries and follow the
46276 installation instructions. To enable using OpenJPEG in FFmpeg, pass
46277 "--enable-libopenjpeg" to ./configure.
46278
46279 rav1e
46280 FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to
46281 encode videos. Go to <https://github.com/xiph/rav1e/> and follow the
46282 instructions to build the C library. To enable using rav1e in FFmpeg,
46283 pass "--enable-librav1e" to ./configure.
46284
46285 SVT-AV1
46286 FFmpeg can make use of the Scalable Video Technology for AV1 library
46287 for AV1 encoding.
46288
46289 Go to <https://gitlab.com/AOMediaCodec/SVT-AV1/> and follow the
46290 instructions for installing the library. Then pass "--enable-libsvtav1"
46291 to configure to enable it.
46292
46293 TwoLAME
46294 FFmpeg can make use of the TwoLAME library for MP2 encoding.
46295
46296 Go to <http://www.twolame.org/> and follow the instructions for
46297 installing the library. Then pass "--enable-libtwolame" to configure
46298 to enable it.
46299
46300 VapourSynth
46301 FFmpeg can read VapourSynth scripts as input. To enable support, pass
46302 "--enable-vapoursynth" to configure. Vapoursynth is detected via
46303 "pkg-config". Versions 42 or greater supported. See
46304 <http://www.vapoursynth.com/>.
46305
46306 Due to security concerns, Vapoursynth scripts will not be autodetected
46307 so the input format has to be forced. For ff* CLI tools, add "-f
46308 vapoursynth" before the input "-i yourscript.vpy".
46309
46310 x264
46311 FFmpeg can make use of the x264 library for H.264 encoding.
46312
46313 Go to <http://www.videolan.org/developers/x264.html> and follow the
46314 instructions for installing the library. Then pass "--enable-libx264"
46315 to configure to enable it.
46316
46317 x264 is under the GNU Public License Version 2 or later (see
46318 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
46319 details), you must upgrade FFmpeg's license to GPL in order to use
46320 it.
46321
46322 x265
46323 FFmpeg can make use of the x265 library for HEVC encoding.
46324
46325 Go to <http://x265.org/developers.html> and follow the instructions for
46326 installing the library. Then pass "--enable-libx265" to configure to
46327 enable it.
46328
46329 x265 is under the GNU Public License Version 2 or later (see
46330 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
46331 details), you must upgrade FFmpeg's license to GPL in order to use
46332 it.
46333
46334 xavs
46335 FFmpeg can make use of the xavs library for AVS encoding.
46336
46337 Go to <http://xavs.sf.net/> and follow the instructions for installing
46338 the library. Then pass "--enable-libxavs" to configure to enable it.
46339
46340 xavs2
46341 FFmpeg can make use of the xavs2 library for AVS2-P2/IEEE1857.4 video
46342 encoding.
46343
46344 Go to <https://github.com/pkuvcl/xavs2> and follow the instructions for
46345 installing the library. Then pass "--enable-libxavs2" to configure to
46346 enable it.
46347
46348 libxavs2 is under the GNU Public License Version 2 or later (see
46349 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> for
46350 details), you must upgrade FFmpeg's license to GPL in order to use
46351 it.
46352
46353 ZVBI
46354 ZVBI is a VBI decoding library which can be used by FFmpeg to decode
46355 DVB teletext pages and DVB teletext subtitles.
46356
46357 Go to <http://sourceforge.net/projects/zapping/> and follow the
46358 instructions for installing the library. Then pass "--enable-libzvbi"
46359 to configure to enable it.
46360
46362 You can use the "-formats" and "-codecs" options to have an exhaustive
46363 list.
46364
46365 File Formats
46366 FFmpeg supports the following file formats through the "libavformat"
46367 library:
46368
46369 Name : Encoding @tab Decoding @tab Comments
46370 3dostr : @tab X
46371 4xm : @tab X
46372 @tab 4X Technologies format, used in some games.
46373
46374 8088flex TMV : @tab X
46375 AAX : @tab X
46376 @tab Audible Enhanced Audio format, used in audiobooks.
46377
46378 AA : @tab X
46379 @tab Audible Format 2, 3, and 4, used in audiobooks.
46380
46381 ACT Voice : @tab X
46382 @tab contains G.729 audio
46383
46384 Adobe Filmstrip : X @tab X
46385 Audio IFF (AIFF) : X @tab X
46386 American Laser Games MM : @tab X
46387 @tab Multimedia format used in games like Mad Dog McCree.
46388
46389 3GPP AMR : X @tab X
46390 Amazing Studio Packed Animation File : @tab X
46391 @tab Multimedia format used in game Heart Of Darkness.
46392
46393 Apple HTTP Live Streaming : @tab X
46394 Artworx Data Format : @tab X
46395 Interplay ACM : @tab X
46396 @tab Audio only format used in some Interplay games.
46397
46398 ADP : @tab X
46399 @tab Audio format used on the Nintendo Gamecube.
46400
46401 AFC : @tab X
46402 @tab Audio format used on the Nintendo Gamecube.
46403
46404 ADS/SS2 : @tab X
46405 @tab Audio format used on the PS2.
46406
46407 APNG : X @tab X
46408 ASF : X @tab X
46409 @tab Advanced / Active Streaming Format.
46410
46411 AST : X @tab X
46412 @tab Audio format used on the Nintendo Wii.
46413
46414 AVI : X @tab X
46415 AviSynth : @tab X
46416 AVR : @tab X
46417 @tab Audio format used on Mac.
46418
46419 AVS : @tab X
46420 @tab Multimedia format used by the Creature Shock game.
46421
46422 Beam Software SIFF : @tab X
46423 @tab Audio and video format used in some games by Beam Software.
46424
46425 Bethesda Softworks VID : @tab X
46426 @tab Used in some games from Bethesda Softworks.
46427
46428 Binary text : @tab X
46429 Bink : @tab X
46430 @tab Multimedia format used by many games.
46431
46432 Bink Audio : @tab X
46433 @tab Audio only multimedia format used by some games.
46434
46435 Bitmap Brothers JV : @tab X
46436 @tab Used in Z and Z95 games.
46437
46438 BRP : @tab X
46439 @tab Argonaut Games format.
46440
46441 Brute Force & Ignorance : @tab X
46442 @tab Used in the game Flash Traffic: City of Angels.
46443
46444 BFSTM : @tab X
46445 @tab Audio format used on the Nintendo WiiU (based on BRSTM).
46446
46447 BRSTM : @tab X
46448 @tab Audio format used on the Nintendo Wii.
46449
46450 BW64 : @tab X
46451 @tab Broadcast Wave 64bit.
46452
46453 BWF : X @tab X
46454 codec2 (raw) : X @tab X
46455 @tab Must be given -mode format option to decode correctly.
46456
46457 codec2 (.c2 files) : X @tab X
46458 @tab Contains header with version and mode info, simplifying playback.
46459
46460 CRI ADX : X @tab X
46461 @tab Audio-only format used in console video games.
46462
46463 CRI AIX : @tab X
46464 CRI HCA : @tab X
46465 @tab Audio-only format used in console video games.
46466
46467 Discworld II BMV : @tab X
46468 Interplay C93 : @tab X
46469 @tab Used in the game Cyberia from Interplay.
46470
46471 Delphine Software International CIN : @tab X
46472 @tab Multimedia format used by Delphine Software games.
46473
46474 Digital Speech Standard (DSS) : @tab X
46475 CD+G : @tab X
46476 @tab Video format used by CD+G karaoke disks
46477
46478 Phantom Cine : @tab X
46479 Commodore CDXL : @tab X
46480 @tab Amiga CD video format
46481
46482 Core Audio Format : X @tab X
46483 @tab Apple Core Audio Format
46484
46485 CRC testing format : X @tab
46486 Creative Voice : X @tab X
46487 @tab Created for the Sound Blaster Pro.
46488
46489 CRYO APC : @tab X
46490 @tab Audio format used in some games by CRYO Interactive Entertainment.
46491
46492 D-Cinema audio : X @tab X
46493 Deluxe Paint Animation : @tab X
46494 DCSTR : @tab X
46495 DFA : @tab X
46496 @tab This format is used in Chronomaster game
46497
46498 DirectDraw Surface : @tab X
46499 DSD Stream File (DSF) : @tab X
46500 DV video : X @tab X
46501 DXA : @tab X
46502 @tab This format is used in the non-Windows version of the Feeble Files
46503 game and different game cutscenes repacked for use with ScummVM.
46504
46505 Electronic Arts cdata : @tab X
46506 Electronic Arts Multimedia : @tab X
46507 @tab Used in various EA games; files have extensions like WVE and UV2.
46508
46509 Ensoniq Paris Audio File : @tab X
46510 FFM (FFserver live feed) : X @tab X
46511 Flash (SWF) : X @tab X
46512 Flash 9 (AVM2) : X @tab X
46513 @tab Only embedded audio is decoded.
46514
46515 FLI/FLC/FLX animation : @tab X
46516 @tab .fli/.flc files
46517
46518 Flash Video (FLV) : X @tab X
46519 @tab Macromedia Flash video files
46520
46521 framecrc testing format : X @tab
46522 FunCom ISS : @tab X
46523 @tab Audio format used in various games from FunCom like The Longest Journey.
46524
46525 G.723.1 : X @tab X
46526 G.726 : @tab X @tab Both left- and right-
46527 justified.
46528 G.729 BIT : X @tab X
46529 G.729 raw : @tab X
46530 GENH : @tab X
46531 @tab Audio format for various games.
46532
46533 GIF Animation : X @tab X
46534 GXF : X @tab X
46535 @tab General eXchange Format SMPTE 360M, used by Thomson Grass Valley
46536 playout servers.
46537
46538 HNM : @tab X
46539 @tab Only version 4 supported, used in some games from Cryo Interactive
46540
46541 iCEDraw File : @tab X
46542 ICO : X @tab X
46543 @tab Microsoft Windows ICO
46544
46545 id Quake II CIN video : @tab X
46546 id RoQ : X @tab X
46547 @tab Used in Quake III, Jedi Knight 2 and other computer games.
46548
46549 IEC61937 encapsulation : X @tab X
46550 IFF : @tab X
46551 @tab Interchange File Format
46552
46553 IFV : @tab X
46554 @tab A format used by some old CCTV DVRs.
46555
46556 iLBC : X @tab X
46557 Interplay MVE : @tab X
46558 @tab Format used in various Interplay computer games.
46559
46560 Iterated Systems ClearVideo : @tab X
46561 @tab I-frames only
46562
46563 IV8 : @tab X
46564 @tab A format generated by IndigoVision 8000 video server.
46565
46566 IVF (On2) : X @tab X
46567 @tab A format used by libvpx
46568
46569 Internet Video Recording : @tab X
46570 IRCAM : X @tab X
46571 LAF : @tab X
46572 @tab Limitless Audio Format
46573
46574 LATM : X @tab X
46575 LMLM4 : @tab X
46576 @tab Used by Linux Media Labs MPEG-4 PCI boards
46577
46578 LOAS : @tab X
46579 @tab contains LATM multiplexed AAC audio
46580
46581 LRC : X @tab X
46582 LVF : @tab X
46583 LXF : @tab X
46584 @tab VR native stream format, used by Leitch/Harris' video servers.
46585
46586 Magic Lantern Video (MLV) : @tab X
46587 Matroska : X @tab X
46588 Matroska audio : X @tab
46589 FFmpeg metadata : X @tab X
46590 @tab Metadata in text format.
46591
46592 MAXIS XA : @tab X
46593 @tab Used in Sim City 3000; file extension .xa.
46594
46595 MCA : @tab X
46596 @tab Used in some games from Capcom; file extension .mca.
46597
46598 MD Studio : @tab X
46599 Metal Gear Solid: The Twin Snakes : @tab X
46600 Megalux Frame : @tab X
46601 @tab Used by Megalux Ultimate Paint
46602
46603 MobiClip MODS : @tab X
46604 MobiClip MOFLEX : @tab X
46605 Mobotix .mxg : @tab X
46606 Monkey's Audio : @tab X
46607 Motion Pixels MVI : @tab X
46608 MOV/QuickTime/MP4 : X @tab X
46609 @tab 3GP, 3GP2, PSP, iPod variants supported
46610
46611 MP2 : X @tab X
46612 MP3 : X @tab X
46613 MPEG-1 System : X @tab X
46614 @tab muxed audio and video, VCD format supported
46615
46616 MPEG-PS (program stream) : X @tab X
46617 @tab also known as C<VOB> file, SVCD and DVD format supported
46618
46619 MPEG-TS (transport stream) : X @tab X
46620 @tab also known as DVB Transport Stream
46621
46622 MPEG-4 : X @tab X
46623 @tab MPEG-4 is a variant of QuickTime.
46624
46625 MSF : @tab X
46626 @tab Audio format used on the PS3.
46627
46628 Mirillis FIC video : @tab X
46629 @tab No cursor rendering.
46630
46631 MIDI Sample Dump Standard : @tab X
46632 MIME multipart JPEG : X @tab
46633 MSN TCP webcam : @tab X
46634 @tab Used by MSN Messenger webcam streams.
46635
46636 MTV : @tab X
46637 Musepack : @tab X
46638 Musepack SV8 : @tab X
46639 Material eXchange Format (MXF) : X @tab X
46640 @tab SMPTE 377M, used by D-Cinema, broadcast industry.
46641
46642 Material eXchange Format (MXF), D-10 Mapping : X @tab X
46643 @tab SMPTE 386M, D-10/IMX Mapping.
46644
46645 NC camera feed : @tab X
46646 @tab NC (AVIP NC4600) camera streams
46647
46648 NIST SPeech HEader REsources : @tab X
46649 Computerized Speech Lab NSP : @tab X
46650 NTT TwinVQ (VQF) : @tab X
46651 @tab Nippon Telegraph and Telephone Corporation TwinVQ.
46652
46653 Nullsoft Streaming Video : @tab X
46654 NuppelVideo : @tab X
46655 NUT : X @tab X
46656 @tab NUT Open Container Format
46657
46658 Ogg : X @tab X
46659 Playstation Portable PMP : @tab X
46660 Portable Voice Format : @tab X
46661 RK Audio (RKA) : @tab X
46662 TechnoTrend PVA : @tab X
46663 @tab Used by TechnoTrend DVB PCI boards.
46664
46665 QCP : @tab X
46666 raw ADTS (AAC) : X @tab X
46667 raw AC-3 : X @tab X
46668 raw AMR-NB : @tab X
46669 raw AMR-WB : @tab X
46670 raw APAC : @tab X
46671 raw aptX : X @tab X
46672 raw aptX HD : X @tab X
46673 raw Bonk : @tab X
46674 raw Chinese AVS video : X @tab X
46675 raw DFPWM : X @tab X
46676 raw Dirac : X @tab X
46677 raw DNxHD : X @tab X
46678 raw DTS : X @tab X
46679 raw DTS-HD : @tab X
46680 raw E-AC-3 : X @tab X
46681 raw FLAC : X @tab X
46682 raw GSM : @tab X
46683 raw H.261 : X @tab X
46684 raw H.263 : X @tab X
46685 raw H.264 : X @tab X
46686 raw HEVC : X @tab X
46687 raw Ingenient MJPEG : @tab X
46688 raw MJPEG : X @tab X
46689 raw MLP : @tab X
46690 raw MPEG : @tab X
46691 raw MPEG-1 : @tab X
46692 raw MPEG-2 : @tab X
46693 raw MPEG-4 : X @tab X
46694 raw NULL : X @tab
46695 raw video : X @tab X
46696 raw id RoQ : X @tab
46697 raw OBU : X @tab X
46698 raw SBC : X @tab X
46699 raw Shorten : @tab X
46700 raw TAK : @tab X
46701 raw TrueHD : X @tab X
46702 raw VC-1 : X @tab X
46703 raw PCM A-law : X @tab X
46704 raw PCM mu-law : X @tab X
46705 raw PCM Archimedes VIDC : X @tab X
46706 raw PCM signed 8 bit : X @tab X
46707 raw PCM signed 16 bit big-endian : X @tab X
46708 raw PCM signed 16 bit little-endian : X @tab X
46709 raw PCM signed 24 bit big-endian : X @tab X
46710 raw PCM signed 24 bit little-endian : X @tab X
46711 raw PCM signed 32 bit big-endian : X @tab X
46712 raw PCM signed 32 bit little-endian : X @tab X
46713 raw PCM signed 64 bit big-endian : X @tab X
46714 raw PCM signed 64 bit little-endian : X @tab X
46715 raw PCM unsigned 8 bit : X @tab X
46716 raw PCM unsigned 16 bit big-endian : X @tab X
46717 raw PCM unsigned 16 bit little-endian : X @tab X
46718 raw PCM unsigned 24 bit big-endian : X @tab X
46719 raw PCM unsigned 24 bit little-endian : X @tab X
46720 raw PCM unsigned 32 bit big-endian : X @tab X
46721 raw PCM unsigned 32 bit little-endian : X @tab X
46722 raw PCM 16.8 floating point little-endian : @tab X
46723 raw PCM 24.0 floating point little-endian : @tab X
46724 raw PCM floating-point 32 bit big-endian : X @tab X
46725 raw PCM floating-point 32 bit little-endian : X @tab X
46726 raw PCM floating-point 64 bit big-endian : X @tab X
46727 raw PCM floating-point 64 bit little-endian : X @tab X
46728 RDT : @tab X
46729 REDCODE R3D : @tab X
46730 @tab File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.
46731
46732 RealMedia : X @tab X
46733 Redirector : @tab X
46734 RedSpark : @tab X
46735 Renderware TeXture Dictionary : @tab X
46736 Resolume DXV : @tab X
46737 RF64 : @tab X
46738 RL2 : @tab X
46739 @tab Audio and video format used in some games by Entertainment Software Partners.
46740
46741 RPL/ARMovie : @tab X
46742 Lego Mindstorms RSO : X @tab X
46743 RSD : @tab X
46744 RTMP : X @tab X
46745 @tab Output is performed by publishing stream to RTMP server
46746
46747 RTP : X @tab X
46748 RTSP : X @tab X
46749 Sample Dump eXchange : @tab X
46750 SAP : X @tab X
46751 SBG : @tab X
46752 SDNS : @tab X
46753 SDP : @tab X
46754 SER : @tab X
46755 Digital Pictures SGA : @tab X
46756 Sega FILM/CPK : X @tab X
46757 @tab Used in many Sega Saturn console games.
46758
46759 Silicon Graphics Movie : @tab X
46760 Sierra SOL : @tab X
46761 @tab .sol files used in Sierra Online games.
46762
46763 Sierra VMD : @tab X
46764 @tab Used in Sierra CD-ROM games.
46765
46766 Smacker : @tab X
46767 @tab Multimedia format used by many games.
46768
46769 SMJPEG : X @tab X
46770 @tab Used in certain Loki game ports.
46771
46772 SMPTE 337M encapsulation : @tab X
46773 Smush : @tab X
46774 @tab Multimedia format used in some LucasArts games.
46775
46776 Sony OpenMG (OMA) : X @tab X
46777 @tab Audio format used in Sony Sonic Stage and Sony Vegas.
46778
46779 Sony PlayStation STR : @tab X
46780 Sony Wave64 (W64) : X @tab X
46781 SoX native format : X @tab X
46782 SUN AU format : X @tab X
46783 SUP raw PGS subtitles : X @tab X
46784 SVAG : @tab X
46785 @tab Audio format used in Konami PS2 games.
46786
46787 TDSC : @tab X
46788 Text files : @tab X
46789 THP : @tab X
46790 @tab Used on the Nintendo GameCube.
46791
46792 Tiertex Limited SEQ : @tab X
46793 @tab Tiertex .seq files used in the DOS CD-ROM version of the game Flashback.
46794
46795 True Audio : X @tab X
46796 VAG : @tab X
46797 @tab Audio format used in many Sony PS2 games.
46798
46799 VC-1 test bitstream : X @tab X
46800 Vidvox Hap : X @tab X
46801 Vivo : @tab X
46802 VPK : @tab X
46803 @tab Audio format used in Sony PS games.
46804
46805 Marble WADY : @tab X
46806 WAV : X @tab X
46807 Waveform Archiver : @tab X
46808 WavPack : X @tab X
46809 WebM : X @tab X
46810 Windows Televison (WTV) : X @tab X
46811 Wing Commander III movie : @tab X
46812 @tab Multimedia format used in Origin's Wing Commander III computer game.
46813
46814 Westwood Studios audio : X @tab X
46815 @tab Multimedia format used in Westwood Studios games.
46816
46817 Westwood Studios VQA : @tab X
46818 @tab Multimedia format used in Westwood Studios games.
46819
46820 Wideband Single-bit Data (WSD) : @tab X
46821 WVE : @tab X
46822 Konami XMD : @tab X
46823 XMV : @tab X
46824 @tab Microsoft video container used in Xbox games.
46825
46826 XVAG : @tab X
46827 @tab Audio format used on the PS3.
46828
46829 xWMA : @tab X
46830 @tab Microsoft audio container used by XAudio 2.
46831
46832 eXtended BINary text (XBIN) : @tab X
46833 YUV4MPEG pipe : X @tab X
46834 Psygnosis YOP : @tab X
46835
46836 "X" means that the feature in that column (encoding / decoding) is
46837 supported.
46838
46839 Image Formats
46840 FFmpeg can read and write images for each frame of a video sequence.
46841 The following image formats are supported:
46842
46843 Name : Encoding @tab Decoding @tab Comments
46844 .Y.U.V : X @tab X
46845 @tab one raw file per component
46846
46847 Alias PIX : X @tab X
46848 @tab Alias/Wavefront PIX image format
46849
46850 animated GIF : X @tab X
46851 APNG : X @tab X
46852 @tab Animated Portable Network Graphics
46853
46854 BMP : X @tab X
46855 @tab Microsoft BMP image
46856
46857 BRender PIX : @tab X
46858 @tab Argonaut BRender 3D engine image format.
46859
46860 CRI : @tab X
46861 @tab Cintel RAW
46862
46863 DPX : X @tab X
46864 @tab Digital Picture Exchange
46865
46866 EXR : @tab X
46867 @tab OpenEXR
46868
46869 FITS : X @tab X
46870 @tab Flexible Image Transport System
46871
46872 HDR : X @tab X
46873 @tab Radiance HDR RGBE Image format
46874
46875 IMG : @tab X
46876 @tab GEM Raster image
46877
46878 JPEG : X @tab X
46879 @tab Progressive JPEG is not supported.
46880
46881 JPEG 2000 : X @tab X
46882 JPEG-LS : X @tab X
46883 LJPEG : X @tab
46884 @tab Lossless JPEG
46885
46886 Media 100 : @tab X
46887 MSP : @tab X
46888 @tab Microsoft Paint image
46889
46890 PAM : X @tab X
46891 @tab PAM is a PNM extension with alpha support.
46892
46893 PBM : X @tab X
46894 @tab Portable BitMap image
46895
46896 PCD : @tab X
46897 @tab PhotoCD
46898
46899 PCX : X @tab X
46900 @tab PC Paintbrush
46901
46902 PFM : X @tab X
46903 @tab Portable FloatMap image
46904
46905 PGM : X @tab X
46906 @tab Portable GrayMap image
46907
46908 PGMYUV : X @tab X
46909 @tab PGM with U and V components in YUV 4:2:0
46910
46911 PGX : @tab X
46912 @tab PGX file decoder
46913
46914 PHM : X @tab X
46915 @tab Portable HalfFloatMap image
46916
46917 PIC : @tab X
46918 @tab Pictor/PC Paint
46919
46920 PNG : X @tab X
46921 @tab Portable Network Graphics image
46922
46923 PPM : X @tab X
46924 @tab Portable PixelMap image
46925
46926 PSD : @tab X
46927 @tab Photoshop
46928
46929 PTX : @tab X
46930 @tab V.Flash PTX format
46931
46932 QOI : X @tab X
46933 @tab Quite OK Image format
46934
46935 SGI : X @tab X
46936 @tab SGI RGB image format
46937
46938 Sun Rasterfile : X @tab X
46939 @tab Sun RAS image format
46940
46941 TIFF : X @tab X
46942 @tab YUV, JPEG and some extension is not supported yet.
46943
46944 Truevision Targa : X @tab X
46945 @tab Targa (.TGA) image format
46946
46947 VBN : X @tab X
46948 @tab Vizrt Binary Image format
46949
46950 WBMP : X @tab X
46951 @tab Wireless Application Protocol Bitmap image format
46952
46953 WebP : E @tab X
46954 @tab WebP image format, encoding supported through external library libwebp
46955
46956 XBM : X @tab X
46957 @tab X BitMap image format
46958
46959 XFace : X @tab X
46960 @tab X-Face image format
46961
46962 XPM : @tab X
46963 @tab X PixMap image format
46964
46965 XWD : X @tab X
46966 @tab X Window Dump image format
46967
46968 "X" means that the feature in that column (encoding / decoding) is
46969 supported.
46970
46971 "E" means that support is provided through an external library.
46972
46973 Video Codecs
46974 Name : Encoding @tab Decoding @tab Comments
46975 4X Movie : @tab X
46976 @tab Used in certain computer games.
46977
46978 8088flex TMV : @tab X
46979 A64 multicolor : X @tab
46980 @tab Creates video suitable to be played on a commodore 64 (multicolor mode).
46981
46982 Amazing Studio PAF Video : @tab X
46983 American Laser Games MM : @tab X
46984 @tab Used in games like Mad Dog McCree.
46985
46986 Amuse Graphics Movie : @tab X
46987 AMV Video : X @tab X
46988 @tab Used in Chinese MP3 players.
46989
46990 ANSI/ASCII art : @tab X
46991 Apple Intermediate Codec : @tab X
46992 Apple MJPEG-B : @tab X
46993 Apple Pixlet : @tab X
46994 Apple ProRes : X @tab X
46995 @tab fourcc: apch,apcn,apcs,apco,ap4h,ap4x
46996
46997 Apple QuickDraw : @tab X
46998 @tab fourcc: qdrw
46999
47000 Argonaut Video : @tab X
47001 @tab Used in some Argonaut games.
47002
47003 Asus v1 : X @tab X
47004 @tab fourcc: ASV1
47005
47006 Asus v2 : X @tab X
47007 @tab fourcc: ASV2
47008
47009 ATI VCR1 : @tab X
47010 @tab fourcc: VCR1
47011
47012 ATI VCR2 : @tab X
47013 @tab fourcc: VCR2
47014
47015 Auravision Aura : @tab X
47016 Auravision Aura 2 : @tab X
47017 Autodesk Animator Flic video : @tab X
47018 Autodesk RLE : @tab X
47019 @tab fourcc: AASC
47020
47021 AV1 : E @tab E
47022 @tab Supported through external libraries libaom, libdav1d, librav1e and libsvtav1
47023
47024 Avid 1:1 10-bit RGB Packer : X @tab X
47025 @tab fourcc: AVrp
47026
47027 AVS (Audio Video Standard) video : @tab X
47028 @tab Video encoding used by the Creature Shock game.
47029
47030 AVS2-P2/IEEE1857.4 : E @tab E
47031 @tab Supported through external libraries libxavs2 and libdavs2
47032
47033 AVS3-P2/IEEE1857.10 : @tab E
47034 @tab Supported through external library libuavs3d
47035
47036 AYUV : X @tab X
47037 @tab Microsoft uncompressed packed 4:4:4:4
47038
47039 Beam Software VB : @tab X
47040 Bethesda VID video : @tab X
47041 @tab Used in some games from Bethesda Softworks.
47042
47043 Bink Video : @tab X
47044 BitJazz SheerVideo : @tab X
47045 Bitmap Brothers JV video : @tab X
47046 y41p Brooktree uncompressed 4:1:1 12-bit : X @tab X
47047 Brooktree ProSumer Video : @tab X
47048 @tab fourcc: BT20
47049
47050 Brute Force & Ignorance : @tab X
47051 @tab Used in the game Flash Traffic: City of Angels.
47052
47053 C93 video : @tab X
47054 @tab Codec used in Cyberia game.
47055
47056 CamStudio : @tab X
47057 @tab fourcc: CSCD
47058
47059 CD+G : @tab X
47060 @tab Video codec for CD+G karaoke disks
47061
47062 CDXL : @tab X
47063 @tab Amiga CD video codec
47064
47065 Chinese AVS video : E @tab X
47066 @tab AVS1-P2, JiZhun profile, encoding through external library libxavs
47067
47068 Delphine Software International CIN video : @tab X
47069 @tab Codec used in Delphine Software International games.
47070
47071 Discworld II BMV Video : @tab X
47072 CineForm HD : X @tab X
47073 Canopus HQ : @tab X
47074 Canopus HQA : @tab X
47075 Canopus HQX : @tab X
47076 Canopus Lossless Codec : @tab X
47077 CDToons : @tab X
47078 @tab Codec used in various Broderbund games.
47079
47080 Cinepak : @tab X
47081 Cirrus Logic AccuPak : X @tab X
47082 @tab fourcc: CLJR
47083
47084 CPiA Video Format : @tab X
47085 Creative YUV (CYUV) : @tab X
47086 DFA : @tab X
47087 @tab Codec used in Chronomaster game.
47088
47089 Dirac : E @tab X
47090 @tab supported though the native vc2 (Dirac Pro) encoder
47091
47092 Deluxe Paint Animation : @tab X
47093 DNxHD : X @tab X
47094 @tab aka SMPTE VC3
47095
47096 Duck TrueMotion 1.0 : @tab X
47097 @tab fourcc: DUCK
47098
47099 Duck TrueMotion 2.0 : @tab X
47100 @tab fourcc: TM20
47101
47102 Duck TrueMotion 2.0 RT : @tab X
47103 @tab fourcc: TR20
47104
47105 DV (Digital Video) : X @tab X
47106 Dxtory capture format : @tab X
47107 Feeble Files/ScummVM DXA : @tab X
47108 @tab Codec originally used in Feeble Files game.
47109
47110 Electronic Arts CMV video : @tab X
47111 @tab Used in NHL 95 game.
47112
47113 Electronic Arts Madcow video : @tab X
47114 Electronic Arts TGV video : @tab X
47115 Electronic Arts TGQ video : @tab X
47116 Electronic Arts TQI video : @tab X
47117 Escape 124 : @tab X
47118 Escape 130 : @tab X
47119 FFmpeg video codec #1 : X @tab X
47120 @tab lossless codec (fourcc: FFV1)
47121
47122 Flash Screen Video v1 : X @tab X
47123 @tab fourcc: FSV1
47124
47125 Flash Screen Video v2 : X @tab X
47126 Flash Video (FLV) : X @tab X
47127 @tab Sorenson H.263 used in Flash
47128
47129 FM Screen Capture Codec : @tab X
47130 Forward Uncompressed : @tab X
47131 Fraps : @tab X
47132 Go2Meeting : @tab X
47133 @tab fourcc: G2M2, G2M3
47134
47135 Go2Webinar : @tab X
47136 @tab fourcc: G2M4
47137
47138 Gremlin Digital Video : @tab X
47139 H.261 : X @tab X
47140 H.263 / H.263-1996 : X @tab X
47141 H.263+ / H.263-1998 / H.263 version 2 : X @tab X
47142 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 : E @tab X
47143 @tab encoding supported through external library libx264 and OpenH264
47144
47145 HEVC : X @tab X
47146 @tab encoding supported through external library libx265 and libkvazaar
47147
47148 HNM version 4 : @tab X
47149 HuffYUV : X @tab X
47150 HuffYUV FFmpeg variant : X @tab X
47151 IBM Ultimotion : @tab X
47152 @tab fourcc: ULTI
47153
47154 id Cinematic video : @tab X
47155 @tab Used in Quake II.
47156
47157 id RoQ video : X @tab X
47158 @tab Used in Quake III, Jedi Knight 2, other computer games.
47159
47160 IFF ILBM : @tab X
47161 @tab IFF interleaved bitmap
47162
47163 IFF ByteRun1 : @tab X
47164 @tab IFF run length encoded bitmap
47165
47166 Infinity IMM4 : @tab X
47167 Intel H.263 : @tab X
47168 Intel Indeo 2 : @tab X
47169 Intel Indeo 3 : @tab X
47170 Intel Indeo 4 : @tab X
47171 Intel Indeo 5 : @tab X
47172 Interplay C93 : @tab X
47173 @tab Used in the game Cyberia from Interplay.
47174
47175 Interplay MVE video : @tab X
47176 @tab Used in Interplay .MVE files.
47177
47178 J2K : X @tab X
47179 Karl Morton's video codec : @tab X
47180 @tab Codec used in Worms games.
47181
47182 Kega Game Video (KGV1) : @tab X
47183 @tab Kega emulator screen capture codec.
47184
47185 Lagarith : @tab X
47186 LCL (LossLess Codec Library) MSZH : @tab X
47187 LCL (LossLess Codec Library) ZLIB : E @tab E
47188 LOCO : @tab X
47189 LucasArts SANM/Smush : @tab X
47190 @tab Used in LucasArts games / SMUSH animations.
47191
47192 lossless MJPEG : X @tab X
47193 MagicYUV Video : X @tab X
47194 Mandsoft Screen Capture Codec : @tab X
47195 Microsoft ATC Screen : @tab X
47196 @tab Also known as Microsoft Screen 3.
47197
47198 Microsoft Expression Encoder Screen : @tab X
47199 @tab Also known as Microsoft Titanium Screen 2.
47200
47201 Microsoft RLE : @tab X
47202 Microsoft Screen 1 : @tab X
47203 @tab Also known as Windows Media Video V7 Screen.
47204
47205 Microsoft Screen 2 : @tab X
47206 @tab Also known as Windows Media Video V9 Screen.
47207
47208 Microsoft Video 1 : @tab X
47209 Mimic : @tab X
47210 @tab Used in MSN Messenger Webcam streams.
47211
47212 Miro VideoXL : @tab X
47213 @tab fourcc: VIXL
47214
47215 MJPEG (Motion JPEG) : X @tab X
47216 Mobotix MxPEG video : @tab X
47217 Motion Pixels video : @tab X
47218 MPEG-1 video : X @tab X
47219 MPEG-2 video : X @tab X
47220 MPEG-4 part 2 : X @tab X
47221 @tab libxvidcore can be used alternatively for encoding.
47222
47223 MPEG-4 part 2 Microsoft variant version 1 : @tab X
47224 MPEG-4 part 2 Microsoft variant version 2 : X @tab X
47225 MPEG-4 part 2 Microsoft variant version 3 : X @tab X
47226 Newtek SpeedHQ : X @tab X
47227 Nintendo Gamecube THP video : @tab X
47228 NotchLC : @tab X
47229 NuppelVideo/RTjpeg : @tab X
47230 @tab Video encoding used in NuppelVideo files.
47231
47232 On2 VP3 : @tab X
47233 @tab still experimental
47234
47235 On2 VP4 : @tab X
47236 @tab fourcc: VP40
47237
47238 On2 VP5 : @tab X
47239 @tab fourcc: VP50
47240
47241 On2 VP6 : @tab X
47242 @tab fourcc: VP60,VP61,VP62
47243
47244 On2 VP7 : @tab X
47245 @tab fourcc: VP70,VP71
47246
47247 VP8 : E @tab X
47248 @tab fourcc: VP80, encoding supported through external library libvpx
47249
47250 VP9 : E @tab X
47251 @tab encoding supported through external library libvpx
47252
47253 Pinnacle TARGA CineWave YUV16 : @tab X
47254 @tab fourcc: Y216
47255
47256 Q-team QPEG : @tab X
47257 @tab fourccs: QPEG, Q1.0, Q1.1
47258
47259 QuickTime 8BPS video : @tab X
47260 QuickTime Animation (RLE) video : X @tab X
47261 @tab fourcc: 'rle '
47262
47263 QuickTime Graphics (SMC) : X @tab X
47264 @tab fourcc: 'smc '
47265
47266 QuickTime video (RPZA) : X @tab X
47267 @tab fourcc: rpza
47268
47269 R10K AJA Kona 10-bit RGB Codec : X @tab X
47270 R210 Quicktime Uncompressed RGB 10-bit : X @tab X
47271 Raw Video : X @tab X
47272 RealVideo 1.0 : X @tab X
47273 RealVideo 2.0 : X @tab X
47274 RealVideo 3.0 : @tab X
47275 @tab still far from ideal
47276
47277 RealVideo 4.0 : @tab X
47278 Renderware TXD (TeXture Dictionary) : @tab X
47279 @tab Texture dictionaries used by the Renderware Engine.
47280
47281 RL2 video : @tab X
47282 @tab used in some games by Entertainment Software Partners
47283
47284 ScreenPressor : @tab X
47285 Screenpresso : @tab X
47286 Screen Recorder Gold Codec : @tab X
47287 Sierra VMD video : @tab X
47288 @tab Used in Sierra VMD files.
47289
47290 Silicon Graphics Motion Video Compressor 1 (MVC1) : @tab X
47291 Silicon Graphics Motion Video Compressor 2 (MVC2) : @tab X
47292 Silicon Graphics RLE 8-bit video : @tab X
47293 Smacker video : @tab X
47294 @tab Video encoding used in Smacker.
47295
47296 SMPTE VC-1 : @tab X
47297 Snow : X @tab X
47298 @tab experimental wavelet codec (fourcc: SNOW)
47299
47300 Sony PlayStation MDEC (Motion DECoder) : @tab X
47301 Sorenson Vector Quantizer 1 : X @tab X
47302 @tab fourcc: SVQ1
47303
47304 Sorenson Vector Quantizer 3 : @tab X
47305 @tab fourcc: SVQ3
47306
47307 Sunplus JPEG (SP5X) : @tab X
47308 @tab fourcc: SP5X
47309
47310 TechSmith Screen Capture Codec : @tab X
47311 @tab fourcc: TSCC
47312
47313 TechSmith Screen Capture Codec 2 : @tab X
47314 @tab fourcc: TSC2
47315
47316 Theora : E @tab X
47317 @tab encoding supported through external library libtheora
47318
47319 Tiertex Limited SEQ video : @tab X
47320 @tab Codec used in DOS CD-ROM FlashBack game.
47321
47322 Ut Video : X @tab X
47323 v210 QuickTime uncompressed 4:2:2 10-bit : X @tab X
47324 v308 QuickTime uncompressed 4:4:4 : X @tab X
47325 v408 QuickTime uncompressed 4:4:4:4 : X @tab X
47326 v410 QuickTime uncompressed 4:4:4 10-bit : X @tab X
47327 VBLE Lossless Codec : @tab X
47328 VMware Screen Codec / VMware Video : @tab X
47329 @tab Codec used in videos captured by VMware.
47330
47331 Westwood Studios VQA (Vector Quantized Animation) video : @tab
47332 X
47333 Windows Media Image : @tab X
47334 Windows Media Video 7 : X @tab X
47335 Windows Media Video 8 : X @tab X
47336 Windows Media Video 9 : @tab X
47337 @tab not completely working
47338
47339 Wing Commander III / Xan : @tab X
47340 @tab Used in Wing Commander III .MVE files.
47341
47342 Wing Commander IV / Xan : @tab X
47343 @tab Used in Wing Commander IV.
47344
47345 Winnov WNV1 : @tab X
47346 WMV7 : X @tab X
47347 YAMAHA SMAF : X @tab X
47348 Psygnosis YOP Video : @tab X
47349 yuv4 : X @tab X
47350 @tab libquicktime uncompressed packed 4:2:0
47351
47352 ZeroCodec Lossless Video : @tab X
47353 ZLIB : X @tab X
47354 @tab part of LCL, encoder experimental
47355
47356 Zip Motion Blocks Video : X @tab X
47357 @tab Encoder works only in PAL8.
47358
47359 "X" means that the feature in that column (encoding / decoding) is
47360 supported.
47361
47362 "E" means that support is provided through an external library.
47363
47364 Audio Codecs
47365 Name : Encoding @tab Decoding @tab Comments
47366 8SVX exponential : @tab X
47367 8SVX fibonacci : @tab X
47368 AAC : EX @tab X
47369 @tab encoding supported through internal encoder and external library libfdk-aac
47370
47371 AAC+ : E @tab IX
47372 @tab encoding supported through external library libfdk-aac
47373
47374 AC-3 : IX @tab IX
47375 ACELP.KELVIN : @tab X
47376 ADPCM 4X Movie : @tab X
47377 ADPCM Yamaha AICA : @tab X
47378 ADPCM AmuseGraphics Movie : @tab X
47379 ADPCM Argonaut Games : X @tab X
47380 ADPCM CDROM XA : @tab X
47381 ADPCM Creative Technology : @tab X
47382 @tab 16 -E<gt> 4, 8 -E<gt> 4, 8 -E<gt> 3, 8 -E<gt> 2
47383
47384 ADPCM Electronic Arts : @tab X
47385 @tab Used in various EA titles.
47386
47387 ADPCM Electronic Arts Maxis CDROM XS : @tab X
47388 @tab Used in Sim City 3000.
47389
47390 ADPCM Electronic Arts R1 : @tab X
47391 ADPCM Electronic Arts R2 : @tab X
47392 ADPCM Electronic Arts R3 : @tab X
47393 ADPCM Electronic Arts XAS : @tab X
47394 ADPCM G.722 : X @tab X
47395 ADPCM G.726 : X @tab X
47396 ADPCM IMA Acorn Replay : @tab X
47397 ADPCM IMA AMV : X @tab X
47398 @tab Used in AMV files
47399
47400 ADPCM IMA Cunning Developments : @tab X
47401 ADPCM IMA Electronic Arts EACS : @tab X
47402 ADPCM IMA Electronic Arts SEAD : @tab X
47403 ADPCM IMA Funcom : @tab X
47404 ADPCM IMA High Voltage Software ALP : X @tab X
47405 ADPCM IMA Mobiclip MOFLEX : @tab X
47406 ADPCM IMA QuickTime : X @tab X
47407 ADPCM IMA Simon & Schuster Interactive : X @tab X
47408 ADPCM IMA Ubisoft APM : X @tab X
47409 ADPCM IMA Loki SDL MJPEG : @tab X
47410 ADPCM IMA WAV : X @tab X
47411 ADPCM IMA Westwood : @tab X
47412 ADPCM ISS IMA : @tab X
47413 @tab Used in FunCom games.
47414
47415 ADPCM IMA Dialogic : @tab X
47416 ADPCM IMA Duck DK3 : @tab X
47417 @tab Used in some Sega Saturn console games.
47418
47419 ADPCM IMA Duck DK4 : @tab X
47420 @tab Used in some Sega Saturn console games.
47421
47422 ADPCM IMA Radical : @tab X
47423 ADPCM Microsoft : X @tab X
47424 ADPCM MS IMA : X @tab X
47425 ADPCM Nintendo Gamecube AFC : @tab X
47426 ADPCM Nintendo Gamecube DTK : @tab X
47427 ADPCM Nintendo THP : @tab X
47428 ADPCM Playstation : @tab X
47429 ADPCM QT IMA : X @tab X
47430 ADPCM SEGA CRI ADX : X @tab X
47431 @tab Used in Sega Dreamcast games.
47432
47433 ADPCM Shockwave Flash : X @tab X
47434 ADPCM Sound Blaster Pro 2-bit : @tab X
47435 ADPCM Sound Blaster Pro 2.6-bit : @tab X
47436 ADPCM Sound Blaster Pro 4-bit : @tab X
47437 ADPCM VIMA : @tab X
47438 @tab Used in LucasArts SMUSH animations.
47439
47440 ADPCM Konami XMD : @tab X
47441 ADPCM Westwood Studios IMA : X @tab X
47442 @tab Used in Westwood Studios games like Command and Conquer.
47443
47444 ADPCM Yamaha : X @tab X
47445 ADPCM Zork : @tab X
47446 AMR-NB : E @tab X
47447 @tab encoding supported through external library libopencore-amrnb
47448
47449 AMR-WB : E @tab X
47450 @tab encoding supported through external library libvo-amrwbenc
47451
47452 Amazing Studio PAF Audio : @tab X
47453 Apple lossless audio : X @tab X
47454 @tab QuickTime fourcc 'alac'
47455
47456 aptX : X @tab X
47457 @tab Used in Bluetooth A2DP
47458
47459 aptX HD : X @tab X
47460 @tab Used in Bluetooth A2DP
47461
47462 ATRAC1 : @tab X
47463 ATRAC3 : @tab X
47464 ATRAC3+ : @tab X
47465 ATRAC9 : @tab X
47466 Bink Audio : @tab X
47467 @tab Used in Bink and Smacker files in many games.
47468
47469 Bonk audio : @tab X
47470 CELT : @tab E
47471 @tab decoding supported through external library libcelt
47472
47473 codec2 : E @tab E
47474 @tab en/decoding supported through external library libcodec2
47475
47476 CRI HCA : @tab X
47477 Delphine Software International CIN audio : @tab X
47478 @tab Codec used in Delphine Software International games.
47479
47480 DFPWM : X @tab X
47481 Digital Speech Standard - Standard Play mode (DSS SP) : @tab X
47482 Discworld II BMV Audio : @tab X
47483 COOK : @tab X
47484 @tab All versions except 5.1 are supported.
47485
47486 DCA (DTS Coherent Acoustics) : X @tab X
47487 @tab supported extensions: XCh, XXCH, X96, XBR, XLL, LBR (partially)
47488
47489 Dolby E : @tab X
47490 DPCM Cuberoot-Delta-Exact : @tab X
47491 @tab Used in few games.
47492
47493 DPCM Gremlin : @tab X
47494 DPCM id RoQ : X @tab X
47495 @tab Used in Quake III, Jedi Knight 2 and other computer games.
47496
47497 DPCM Marble WADY : @tab X
47498 DPCM Interplay : @tab X
47499 @tab Used in various Interplay computer games.
47500
47501 DPCM Squareroot-Delta-Exact : @tab X
47502 @tab Used in various games.
47503
47504 DPCM Sierra Online : @tab X
47505 @tab Used in Sierra Online game audio files.
47506
47507 DPCM Sol : @tab X
47508 DPCM Xan : @tab X
47509 @tab Used in Origin's Wing Commander IV AVI files.
47510
47511 DPCM Xilam DERF : @tab X
47512 DSD (Direct Stream Digital), least significant bit first : @tab X
47513 DSD (Direct Stream Digital), most significant bit first : @tab X
47514 DSD (Direct Stream Digital), least significant bit first, planar :
47515 @tab X
47516 DSD (Direct Stream Digital), most significant bit first, planar :
47517 @tab X
47518 DSP Group TrueSpeech : @tab X
47519 DST (Direct Stream Transfer) : @tab X
47520 DV audio : @tab X
47521 Enhanced AC-3 : X @tab X
47522 EVRC (Enhanced Variable Rate Codec) : @tab X
47523 FLAC (Free Lossless Audio Codec) : X @tab IX
47524 FTR Voice : @tab X
47525 G.723.1 : X @tab X
47526 G.729 : @tab X
47527 GSM : E @tab X
47528 @tab encoding supported through external library libgsm
47529
47530 GSM Microsoft variant : E @tab X
47531 @tab encoding supported through external library libgsm
47532
47533 IAC (Indeo Audio Coder) : @tab X
47534 iLBC (Internet Low Bitrate Codec) : E @tab EX
47535 @tab encoding and decoding supported through external library libilbc
47536
47537 IMC (Intel Music Coder) : @tab X
47538 Interplay ACM : @tab X
47539 MACE (Macintosh Audio Compression/Expansion) 3:1 : @tab X
47540 MACE (Macintosh Audio Compression/Expansion) 6:1 : @tab X
47541 Marian's A-pac audio : @tab X
47542 MI-SC4 (Micronas SC-4 Audio) : @tab X
47543 MLP (Meridian Lossless Packing) : X @tab X
47544 @tab Used in DVD-Audio discs.
47545
47546 Monkey's Audio : @tab X
47547 MP1 (MPEG audio layer 1) : @tab IX
47548 MP2 (MPEG audio layer 2) : IX @tab IX
47549 @tab encoding supported also through external library TwoLAME
47550
47551 MP3 (MPEG audio layer 3) : E @tab IX
47552 @tab encoding supported through external library LAME, ADU MP3 and MP3onMP4 also supported
47553
47554 MPEG-4 Audio Lossless Coding (ALS) : @tab X
47555 MobiClip FastAudio : @tab X
47556 Musepack SV7 : @tab X
47557 Musepack SV8 : @tab X
47558 Nellymoser Asao : X @tab X
47559 On2 AVC (Audio for Video Codec) : @tab X
47560 Opus : E @tab X
47561 @tab encoding supported through external library libopus
47562
47563 PCM A-law : X @tab X
47564 PCM mu-law : X @tab X
47565 PCM Archimedes VIDC : X @tab X
47566 PCM signed 8-bit planar : X @tab X
47567 PCM signed 16-bit big-endian planar : X @tab X
47568 PCM signed 16-bit little-endian planar : X @tab X
47569 PCM signed 24-bit little-endian planar : X @tab X
47570 PCM signed 32-bit little-endian planar : X @tab X
47571 PCM 32-bit floating point big-endian : X @tab X
47572 PCM 32-bit floating point little-endian : X @tab X
47573 PCM 64-bit floating point big-endian : X @tab X
47574 PCM 64-bit floating point little-endian : X @tab X
47575 PCM D-Cinema audio signed 24-bit : X @tab X
47576 PCM signed 8-bit : X @tab X
47577 PCM signed 16-bit big-endian : X @tab X
47578 PCM signed 16-bit little-endian : X @tab X
47579 PCM signed 24-bit big-endian : X @tab X
47580 PCM signed 24-bit little-endian : X @tab X
47581 PCM signed 32-bit big-endian : X @tab X
47582 PCM signed 32-bit little-endian : X @tab X
47583 PCM signed 16/20/24-bit big-endian in MPEG-TS : @tab X
47584 PCM unsigned 8-bit : X @tab X
47585 PCM unsigned 16-bit big-endian : X @tab X
47586 PCM unsigned 16-bit little-endian : X @tab X
47587 PCM unsigned 24-bit big-endian : X @tab X
47588 PCM unsigned 24-bit little-endian : X @tab X
47589 PCM unsigned 32-bit big-endian : X @tab X
47590 PCM unsigned 32-bit little-endian : X @tab X
47591 PCM SGA : @tab X
47592 QCELP / PureVoice : @tab X
47593 QDesign Music Codec 1 : @tab X
47594 QDesign Music Codec 2 : @tab X
47595 @tab There are still some distortions.
47596
47597 RealAudio 1.0 (14.4K) : X @tab X
47598 @tab Real 14400 bit/s codec
47599
47600 RealAudio 2.0 (28.8K) : @tab X
47601 @tab Real 28800 bit/s codec
47602
47603 RealAudio 3.0 (dnet) : IX @tab X
47604 @tab Real low bitrate AC-3 codec
47605
47606 RealAudio Lossless : @tab X
47607 RealAudio SIPR / ACELP.NET : @tab X
47608 RK Audio (RKA) : @tab X
47609 SBC (low-complexity subband codec) : X @tab X
47610 @tab Used in Bluetooth A2DP
47611
47612 Shorten : @tab X
47613 Sierra VMD audio : @tab X
47614 @tab Used in Sierra VMD files.
47615
47616 Smacker audio : @tab X
47617 SMPTE 302M AES3 audio : X @tab X
47618 Sonic : X @tab X
47619 @tab experimental codec
47620
47621 Sonic lossless : X @tab X
47622 @tab experimental codec
47623
47624 Speex : E @tab EX
47625 @tab supported through external library libspeex
47626
47627 TAK (Tom's lossless Audio Kompressor) : @tab X
47628 True Audio (TTA) : X @tab X
47629 TrueHD : X @tab X
47630 @tab Used in HD-DVD and Blu-Ray discs.
47631
47632 TwinVQ (VQF flavor) : @tab X
47633 VIMA : @tab X
47634 @tab Used in LucasArts SMUSH animations.
47635
47636 ViewQuest VQC : @tab X
47637 Vorbis : E @tab X
47638 @tab A native but very primitive encoder exists.
47639
47640 Voxware MetaSound : @tab X
47641 Waveform Archiver : @tab X
47642 WavPack : X @tab X
47643 Westwood Audio (SND1) : @tab X
47644 Windows Media Audio 1 : X @tab X
47645 Windows Media Audio 2 : X @tab X
47646 Windows Media Audio Lossless : @tab X
47647 Windows Media Audio Pro : @tab X
47648 Windows Media Audio Voice : @tab X
47649 Xbox Media Audio 1 : @tab X
47650 Xbox Media Audio 2 : @tab X
47651
47652 "X" means that the feature in that column (encoding / decoding) is
47653 supported.
47654
47655 "E" means that support is provided through an external library.
47656
47657 "I" means that an integer-only version is available, too (ensures high
47658 performance on systems without hardware floating point support).
47659
47660 Subtitle Formats
47661 Name : Muxing @tab Demuxing @tab Encoding @tab Decoding
47662 3GPP Timed Text : @tab @tab X @tab X
47663 AQTitle : @tab X @tab @tab X
47664 DVB : X @tab X @tab X @tab X
47665 DVB teletext : @tab X @tab @tab E
47666 DVD : X @tab X @tab X @tab X
47667 JACOsub : X @tab X @tab @tab X
47668 MicroDVD : X @tab X @tab @tab X
47669 MPL2 : @tab X @tab @tab X
47670 MPsub (MPlayer) : @tab X @tab @tab X
47671 PGS : @tab @tab @tab X
47672 PJS (Phoenix) : @tab X @tab @tab X
47673 RealText : @tab X @tab @tab X
47674 SAMI : @tab X @tab @tab X
47675 Spruce format (STL) : @tab X @tab @tab X
47676 SSA/ASS : X @tab X @tab X @tab X
47677 SubRip (SRT) : X @tab X @tab X @tab X
47678 SubViewer v1 : @tab X @tab @tab X
47679 SubViewer : @tab X @tab @tab X
47680 TED Talks captions : @tab X @tab @tab X
47681 TTML : X @tab @tab X @tab
47682 VobSub (IDX+SUB) : @tab X @tab @tab X
47683 VPlayer : @tab X @tab @tab X
47684 WebVTT : X @tab X @tab X @tab X
47685 XSUB : @tab @tab X @tab X
47686
47687 "X" means that the feature is supported.
47688
47689 "E" means that support is provided through an external library.
47690
47691 Network Protocols
47692 Name : Support
47693 AMQP : E
47694 file : X
47695 FTP : X
47696 Gopher : X
47697 Gophers : X
47698 HLS : X
47699 HTTP : X
47700 HTTPS : X
47701 Icecast : X
47702 MMSH : X
47703 MMST : X
47704 pipe : X
47705 Pro-MPEG FEC : X
47706 RTMP : X
47707 RTMPE : X
47708 RTMPS : X
47709 RTMPT : X
47710 RTMPTE : X
47711 RTMPTS : X
47712 RTP : X
47713 SAMBA : E
47714 SCTP : X
47715 SFTP : E
47716 TCP : X
47717 TLS : X
47718 UDP : X
47719 ZMQ : E
47720
47721 "X" means that the protocol is supported.
47722
47723 "E" means that support is provided through an external library.
47724
47725 Input/Output Devices
47726 Name : Input @tab Output
47727 ALSA : X @tab X
47728 BKTR : X @tab
47729 caca : @tab X
47730 DV1394 : X @tab
47731 Lavfi virtual device : X @tab
47732 Linux framebuffer : X @tab X
47733 JACK : X @tab
47734 LIBCDIO : X
47735 LIBDC1394 : X @tab
47736 OpenAL : X
47737 OpenGL : @tab X
47738 OSS : X @tab X
47739 PulseAudio : X @tab X
47740 SDL : @tab X
47741 Video4Linux2 : X @tab X
47742 VfW capture : X @tab
47743 X11 grabbing : X @tab
47744 Win32 grabbing : X @tab
47745
47746 "X" means that input/output is supported.
47747
47748 Timecode
47749 Codec/format : Read @tab Write
47750 AVI : X @tab X
47751 DV : X @tab X
47752 GXF : X @tab X
47753 MOV : X @tab X
47754 MPEG1/2 : X @tab X
47755 MXF : X @tab X
47756
47758 ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-utils(1), ffmpeg-scaler(1),
47759 ffmpeg-resampler(1), ffmpeg-codecs(1), ffmpeg-bitstream-filters(1),
47760 ffmpeg-formats(1), ffmpeg-devices(1), ffmpeg-protocols(1),
47761 ffmpeg-filters(1)
47762
47764 The FFmpeg developers.
47765
47766 For details about the authorship, see the Git history of the project
47767 (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
47768 the FFmpeg source directory, or browsing the online repository at
47769 <https://git.ffmpeg.org/ffmpeg>.
47770
47771 Maintainers for the specific components are listed in the file
47772 MAINTAINERS in the source code tree.
47773
47774
47775
47776 FFMPEG-ALL(1)