yading@10
|
1 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
|
yading@10
|
2 .\"
|
yading@10
|
3 .\" Standard preamble:
|
yading@10
|
4 .\" ========================================================================
|
yading@10
|
5 .de Sp \" Vertical space (when we can't use .PP)
|
yading@10
|
6 .if t .sp .5v
|
yading@10
|
7 .if n .sp
|
yading@10
|
8 ..
|
yading@10
|
9 .de Vb \" Begin verbatim text
|
yading@10
|
10 .ft CW
|
yading@10
|
11 .nf
|
yading@10
|
12 .ne \\$1
|
yading@10
|
13 ..
|
yading@10
|
14 .de Ve \" End verbatim text
|
yading@10
|
15 .ft R
|
yading@10
|
16 .fi
|
yading@10
|
17 ..
|
yading@10
|
18 .\" Set up some character translations and predefined strings. \*(-- will
|
yading@10
|
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
yading@10
|
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
yading@10
|
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
yading@10
|
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
yading@10
|
23 .\" nothing in troff, for use with C<>.
|
yading@10
|
24 .tr \(*W-
|
yading@10
|
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
yading@10
|
26 .ie n \{\
|
yading@10
|
27 . ds -- \(*W-
|
yading@10
|
28 . ds PI pi
|
yading@10
|
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
yading@10
|
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
yading@10
|
31 . ds L" ""
|
yading@10
|
32 . ds R" ""
|
yading@10
|
33 . ds C` ""
|
yading@10
|
34 . ds C' ""
|
yading@10
|
35 'br\}
|
yading@10
|
36 .el\{\
|
yading@10
|
37 . ds -- \|\(em\|
|
yading@10
|
38 . ds PI \(*p
|
yading@10
|
39 . ds L" ``
|
yading@10
|
40 . ds R" ''
|
yading@10
|
41 'br\}
|
yading@10
|
42 .\"
|
yading@10
|
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
|
yading@10
|
44 .ie \n(.g .ds Aq \(aq
|
yading@10
|
45 .el .ds Aq '
|
yading@10
|
46 .\"
|
yading@10
|
47 .\" If the F register is turned on, we'll generate index entries on stderr for
|
yading@10
|
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
yading@10
|
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
|
yading@10
|
50 .\" output yourself in some meaningful fashion.
|
yading@10
|
51 .ie \nF \{\
|
yading@10
|
52 . de IX
|
yading@10
|
53 . tm Index:\\$1\t\\n%\t"\\$2"
|
yading@10
|
54 ..
|
yading@10
|
55 . nr % 0
|
yading@10
|
56 . rr F
|
yading@10
|
57 .\}
|
yading@10
|
58 .el \{\
|
yading@10
|
59 . de IX
|
yading@10
|
60 ..
|
yading@10
|
61 .\}
|
yading@10
|
62 .\"
|
yading@10
|
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
yading@10
|
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
|
yading@10
|
65 . \" fudge factors for nroff and troff
|
yading@10
|
66 .if n \{\
|
yading@10
|
67 . ds #H 0
|
yading@10
|
68 . ds #V .8m
|
yading@10
|
69 . ds #F .3m
|
yading@10
|
70 . ds #[ \f1
|
yading@10
|
71 . ds #] \fP
|
yading@10
|
72 .\}
|
yading@10
|
73 .if t \{\
|
yading@10
|
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
yading@10
|
75 . ds #V .6m
|
yading@10
|
76 . ds #F 0
|
yading@10
|
77 . ds #[ \&
|
yading@10
|
78 . ds #] \&
|
yading@10
|
79 .\}
|
yading@10
|
80 . \" simple accents for nroff and troff
|
yading@10
|
81 .if n \{\
|
yading@10
|
82 . ds ' \&
|
yading@10
|
83 . ds ` \&
|
yading@10
|
84 . ds ^ \&
|
yading@10
|
85 . ds , \&
|
yading@10
|
86 . ds ~ ~
|
yading@10
|
87 . ds /
|
yading@10
|
88 .\}
|
yading@10
|
89 .if t \{\
|
yading@10
|
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
yading@10
|
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
yading@10
|
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
yading@10
|
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
yading@10
|
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
yading@10
|
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
yading@10
|
96 .\}
|
yading@10
|
97 . \" troff and (daisy-wheel) nroff accents
|
yading@10
|
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
yading@10
|
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
yading@10
|
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
yading@10
|
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
yading@10
|
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
yading@10
|
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
yading@10
|
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
yading@10
|
105 .ds ae a\h'-(\w'a'u*4/10)'e
|
yading@10
|
106 .ds Ae A\h'-(\w'A'u*4/10)'E
|
yading@10
|
107 . \" corrections for vroff
|
yading@10
|
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
yading@10
|
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
yading@10
|
110 . \" for low resolution devices (crt and lpr)
|
yading@10
|
111 .if \n(.H>23 .if \n(.V>19 \
|
yading@10
|
112 \{\
|
yading@10
|
113 . ds : e
|
yading@10
|
114 . ds 8 ss
|
yading@10
|
115 . ds o a
|
yading@10
|
116 . ds d- d\h'-1'\(ga
|
yading@10
|
117 . ds D- D\h'-1'\(hy
|
yading@10
|
118 . ds th \o'bp'
|
yading@10
|
119 . ds Th \o'LP'
|
yading@10
|
120 . ds ae ae
|
yading@10
|
121 . ds Ae AE
|
yading@10
|
122 .\}
|
yading@10
|
123 .rm #[ #] #H #V #F C
|
yading@10
|
124 .\" ========================================================================
|
yading@10
|
125 .\"
|
yading@10
|
126 .IX Title "FFMPEG-ALL 1"
|
yading@10
|
127 .TH FFMPEG-ALL 1 "2013-04-21" " " " "
|
yading@10
|
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
yading@10
|
129 .\" way too many mistakes in technical documents.
|
yading@10
|
130 .if n .ad l
|
yading@10
|
131 .nh
|
yading@10
|
132 .SH "NAME"
|
yading@10
|
133 ffmpeg \- ffmpeg video converter
|
yading@10
|
134 .SH "SYNOPSIS"
|
yading@10
|
135 .IX Header "SYNOPSIS"
|
yading@10
|
136 ffmpeg [\fIglobal_options\fR] {[\fIinput_file_options\fR] \-i \fIinput_file\fR} ... {[\fIoutput_file_options\fR] \fIoutput_file\fR} ...
|
yading@10
|
137 .SH "DESCRIPTION"
|
yading@10
|
138 .IX Header "DESCRIPTION"
|
yading@10
|
139 \&\fBffmpeg\fR is a very fast video and audio converter that can also grab from
|
yading@10
|
140 a live audio/video source. It can also convert between arbitrary sample
|
yading@10
|
141 rates and resize video on the fly with a high quality polyphase filter.
|
yading@10
|
142 .PP
|
yading@10
|
143 \&\fBffmpeg\fR reads from an arbitrary number of input \*(L"files\*(R" (which can be regular
|
yading@10
|
144 files, pipes, network streams, grabbing devices, etc.), specified by the
|
yading@10
|
145 \&\f(CW\*(C`\-i\*(C'\fR option, and writes to an arbitrary number of output \*(L"files\*(R", which are
|
yading@10
|
146 specified by a plain output filename. Anything found on the command line which
|
yading@10
|
147 cannot be interpreted as an option is considered to be an output filename.
|
yading@10
|
148 .PP
|
yading@10
|
149 Each input or output file can, in principle, contain any number of streams of
|
yading@10
|
150 different types (video/audio/subtitle/attachment/data). The allowed number and/or
|
yading@10
|
151 types of streams may be limited by the container format. Selecting which
|
yading@10
|
152 streams from which inputs will go into which output is either done automatically
|
yading@10
|
153 or with the \f(CW\*(C`\-map\*(C'\fR option (see the Stream selection chapter).
|
yading@10
|
154 .PP
|
yading@10
|
155 To refer to input files in options, you must use their indices (0\-based). E.g.
|
yading@10
|
156 the first input file is \f(CW0\fR, the second is \f(CW1\fR, etc. Similarly, streams
|
yading@10
|
157 within a file are referred to by their indices. E.g. \f(CW\*(C`2:3\*(C'\fR refers to the
|
yading@10
|
158 fourth stream in the third input file. Also see the Stream specifiers chapter.
|
yading@10
|
159 .PP
|
yading@10
|
160 As a general rule, options are applied to the next specified
|
yading@10
|
161 file. Therefore, order is important, and you can have the same
|
yading@10
|
162 option on the command line multiple times. Each occurrence is
|
yading@10
|
163 then applied to the next input or output file.
|
yading@10
|
164 Exceptions from this rule are the global options (e.g. verbosity level),
|
yading@10
|
165 which should be specified first.
|
yading@10
|
166 .PP
|
yading@10
|
167 Do not mix input and output files \*(-- first specify all input files, then all
|
yading@10
|
168 output files. Also do not mix options which belong to different files. All
|
yading@10
|
169 options apply \s-1ONLY\s0 to the next input or output file and are reset between files.
|
yading@10
|
170 .IP "\(bu" 4
|
yading@10
|
171 To set the video bitrate of the output file to 64 kbit/s:
|
yading@10
|
172 .Sp
|
yading@10
|
173 .Vb 1
|
yading@10
|
174 \& ffmpeg \-i input.avi \-b:v 64k \-bufsize 64k output.avi
|
yading@10
|
175 .Ve
|
yading@10
|
176 .IP "\(bu" 4
|
yading@10
|
177 To force the frame rate of the output file to 24 fps:
|
yading@10
|
178 .Sp
|
yading@10
|
179 .Vb 1
|
yading@10
|
180 \& ffmpeg \-i input.avi \-r 24 output.avi
|
yading@10
|
181 .Ve
|
yading@10
|
182 .IP "\(bu" 4
|
yading@10
|
183 To force the frame rate of the input file (valid for raw formats only)
|
yading@10
|
184 to 1 fps and the frame rate of the output file to 24 fps:
|
yading@10
|
185 .Sp
|
yading@10
|
186 .Vb 1
|
yading@10
|
187 \& ffmpeg \-r 1 \-i input.m2v \-r 24 output.avi
|
yading@10
|
188 .Ve
|
yading@10
|
189 .PP
|
yading@10
|
190 The format option may be needed for raw input files.
|
yading@10
|
191 .SH "DETAILED DESCRIPTION"
|
yading@10
|
192 .IX Header "DETAILED DESCRIPTION"
|
yading@10
|
193 The transcoding process in \fBffmpeg\fR for each output can be described by
|
yading@10
|
194 the following diagram:
|
yading@10
|
195 .PP
|
yading@10
|
196 .Vb 5
|
yading@10
|
197 \& _\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
198 \& | | | | | | | | | |
|
yading@10
|
199 \& | input | demuxer | encoded data | decoder | decoded | encoder | encoded data | muxer | output |
|
yading@10
|
200 \& | file | \-\-\-\-\-\-\-\-\-> | packets | \-\-\-\-\-\-\-\-\-> | frames | \-\-\-\-\-\-\-\-\-> | packets | \-\-\-\-\-\-\-> | file |
|
yading@10
|
201 \& |_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
202 .Ve
|
yading@10
|
203 .PP
|
yading@10
|
204 \&\fBffmpeg\fR calls the libavformat library (containing demuxers) to read
|
yading@10
|
205 input files and get packets containing encoded data from them. When there are
|
yading@10
|
206 multiple input files, \fBffmpeg\fR tries to keep them synchronized by
|
yading@10
|
207 tracking lowest timestamp on any active input stream.
|
yading@10
|
208 .PP
|
yading@10
|
209 Encoded packets are then passed to the decoder (unless streamcopy is selected
|
yading@10
|
210 for the stream, see further for a description). The decoder produces
|
yading@10
|
211 uncompressed frames (raw video/PCM audio/...) which can be processed further by
|
yading@10
|
212 filtering (see next section). After filtering, the frames are passed to the
|
yading@10
|
213 encoder, which encodes them and outputs encoded packets. Finally those are
|
yading@10
|
214 passed to the muxer, which writes the encoded packets to the output file.
|
yading@10
|
215 .SS "Filtering"
|
yading@10
|
216 .IX Subsection "Filtering"
|
yading@10
|
217 Before encoding, \fBffmpeg\fR can process raw audio and video frames using
|
yading@10
|
218 filters from the libavfilter library. Several chained filters form a filter
|
yading@10
|
219 graph. \fBffmpeg\fR distinguishes between two types of filtergraphs:
|
yading@10
|
220 simple and complex.
|
yading@10
|
221 .PP
|
yading@10
|
222 \fISimple filtergraphs\fR
|
yading@10
|
223 .IX Subsection "Simple filtergraphs"
|
yading@10
|
224 .PP
|
yading@10
|
225 Simple filtergraphs are those that have exactly one input and output, both of
|
yading@10
|
226 the same type. In the above diagram they can be represented by simply inserting
|
yading@10
|
227 an additional step between decoding and encoding:
|
yading@10
|
228 .PP
|
yading@10
|
229 .Vb 5
|
yading@10
|
230 \& _\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
231 \& | | | | | |
|
yading@10
|
232 \& | decoded | simple filtergraph | filtered | encoder | encoded data |
|
yading@10
|
233 \& | frames | \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> | frames | \-\-\-\-\-\-\-\-\-> | packets |
|
yading@10
|
234 \& |_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
235 .Ve
|
yading@10
|
236 .PP
|
yading@10
|
237 Simple filtergraphs are configured with the per-stream \fB\-filter\fR option
|
yading@10
|
238 (with \fB\-vf\fR and \fB\-af\fR aliases for video and audio respectively).
|
yading@10
|
239 A simple filtergraph for video can look for example like this:
|
yading@10
|
240 .PP
|
yading@10
|
241 .Vb 4
|
yading@10
|
242 \& _\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
243 \& | | | | | | | | | |
|
yading@10
|
244 \& | input | \-\-\-> | deinterlace | \-\-\-> | scale | \-\-\-> | fps | \-\-\-> | output |
|
yading@10
|
245 \& |_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
246 .Ve
|
yading@10
|
247 .PP
|
yading@10
|
248 Note that some filters change frame properties but not frame contents. E.g. the
|
yading@10
|
249 \&\f(CW\*(C`fps\*(C'\fR filter in the example above changes number of frames, but does not
|
yading@10
|
250 touch the frame contents. Another example is the \f(CW\*(C`setpts\*(C'\fR filter, which
|
yading@10
|
251 only sets timestamps and otherwise passes the frames unchanged.
|
yading@10
|
252 .PP
|
yading@10
|
253 \fIComplex filtergraphs\fR
|
yading@10
|
254 .IX Subsection "Complex filtergraphs"
|
yading@10
|
255 .PP
|
yading@10
|
256 Complex filtergraphs are those which cannot be described as simply a linear
|
yading@10
|
257 processing chain applied to one stream. This is the case, for example, when the graph has
|
yading@10
|
258 more than one input and/or output, or when output stream type is different from
|
yading@10
|
259 input. They can be represented with the following diagram:
|
yading@10
|
260 .PP
|
yading@10
|
261 .Vb 10
|
yading@10
|
262 \& _\|_\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
263 \& | |
|
yading@10
|
264 \& | input 0 |\e _\|_\|_\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
265 \& |_\|_\|_\|_\|_\|_\|_\|_\|_| \e | |
|
yading@10
|
266 \& \e _\|_\|_\|_\|_\|_\|_\|_\|_ /| output 0 |
|
yading@10
|
267 \& \e | | / |_\|_\|_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
268 \& _\|_\|_\|_\|_\|_\|_\|_\|_ \e| complex | /
|
yading@10
|
269 \& | | | |/
|
yading@10
|
270 \& | input 1 |\-\-\-\->| filter |\e
|
yading@10
|
271 \& |_\|_\|_\|_\|_\|_\|_\|_\|_| | | \e _\|_\|_\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
272 \& /| graph | \e | |
|
yading@10
|
273 \& / | | \e| output 1 |
|
yading@10
|
274 \& _\|_\|_\|_\|_\|_\|_\|_\|_ / |_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
275 \& | | /
|
yading@10
|
276 \& | input 2 |/
|
yading@10
|
277 \& |_\|_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
278 .Ve
|
yading@10
|
279 .PP
|
yading@10
|
280 Complex filtergraphs are configured with the \fB\-filter_complex\fR option.
|
yading@10
|
281 Note that this option is global, since a complex filtergraph, by its nature,
|
yading@10
|
282 cannot be unambiguously associated with a single stream or file.
|
yading@10
|
283 .PP
|
yading@10
|
284 The \fB\-lavfi\fR option is equivalent to \fB\-filter_complex\fR.
|
yading@10
|
285 .PP
|
yading@10
|
286 A trivial example of a complex filtergraph is the \f(CW\*(C`overlay\*(C'\fR filter, which
|
yading@10
|
287 has two video inputs and one video output, containing one video overlaid on top
|
yading@10
|
288 of the other. Its audio counterpart is the \f(CW\*(C`amix\*(C'\fR filter.
|
yading@10
|
289 .SS "Stream copy"
|
yading@10
|
290 .IX Subsection "Stream copy"
|
yading@10
|
291 Stream copy is a mode selected by supplying the \f(CW\*(C`copy\*(C'\fR parameter to the
|
yading@10
|
292 \&\fB\-codec\fR option. It makes \fBffmpeg\fR omit the decoding and encoding
|
yading@10
|
293 step for the specified stream, so it does only demuxing and muxing. It is useful
|
yading@10
|
294 for changing the container format or modifying container-level metadata. The
|
yading@10
|
295 diagram above will, in this case, simplify to this:
|
yading@10
|
296 .PP
|
yading@10
|
297 .Vb 5
|
yading@10
|
298 \& _\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ _\|_\|_\|_\|_\|_\|_\|_
|
yading@10
|
299 \& | | | | | |
|
yading@10
|
300 \& | input | demuxer | encoded data | muxer | output |
|
yading@10
|
301 \& | file | \-\-\-\-\-\-\-\-\-> | packets | \-\-\-\-\-\-\-> | file |
|
yading@10
|
302 \& |_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_| |_\|_\|_\|_\|_\|_\|_\|_|
|
yading@10
|
303 .Ve
|
yading@10
|
304 .PP
|
yading@10
|
305 Since there is no decoding or encoding, it is very fast and there is no quality
|
yading@10
|
306 loss. However, it might not work in some cases because of many factors. Applying
|
yading@10
|
307 filters is obviously also impossible, since filters work on uncompressed data.
|
yading@10
|
308 .SH "STREAM SELECTION"
|
yading@10
|
309 .IX Header "STREAM SELECTION"
|
yading@10
|
310 By default, \fBffmpeg\fR includes only one stream of each type (video, audio, subtitle)
|
yading@10
|
311 present in the input files and adds them to each output file. It picks the
|
yading@10
|
312 \&\*(L"best\*(R" of each based upon the following criteria: for video, it is the stream
|
yading@10
|
313 with the highest resolution, for audio, it is the stream with the most channels, for
|
yading@10
|
314 subtitles, it is the first subtitle stream. In the case where several streams of
|
yading@10
|
315 the same type rate equally, the stream with the lowest index is chosen.
|
yading@10
|
316 .PP
|
yading@10
|
317 You can disable some of those defaults by using the \f(CW\*(C`\-vn/\-an/\-sn\*(C'\fR options. For
|
yading@10
|
318 full manual control, use the \f(CW\*(C`\-map\*(C'\fR option, which disables the defaults just
|
yading@10
|
319 described.
|
yading@10
|
320 .SH "OPTIONS"
|
yading@10
|
321 .IX Header "OPTIONS"
|
yading@10
|
322 All the numerical options, if not specified otherwise, accept a string
|
yading@10
|
323 representing a number as input, which may be followed by one of the \s-1SI\s0
|
yading@10
|
324 unit prefixes, for example: 'K', 'M', or 'G'.
|
yading@10
|
325 .PP
|
yading@10
|
326 If 'i' is appended to the \s-1SI\s0 unit prefix, the complete prefix will be
|
yading@10
|
327 interpreted as a unit prefix for binary multiplies, which are based on
|
yading@10
|
328 powers of 1024 instead of powers of 1000. Appending 'B' to the \s-1SI\s0 unit
|
yading@10
|
329 prefix multiplies the value by 8. This allows using, for example:
|
yading@10
|
330 \&'\s-1KB\s0', 'MiB', 'G' and 'B' as number suffixes.
|
yading@10
|
331 .PP
|
yading@10
|
332 Options which do not take arguments are boolean options, and set the
|
yading@10
|
333 corresponding value to true. They can be set to false by prefixing
|
yading@10
|
334 the option name with \*(L"no\*(R". For example using \*(L"\-nofoo\*(R"
|
yading@10
|
335 will set the boolean option with name \*(L"foo\*(R" to false.
|
yading@10
|
336 .SS "Stream specifiers"
|
yading@10
|
337 .IX Subsection "Stream specifiers"
|
yading@10
|
338 Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
|
yading@10
|
339 are used to precisely specify which stream(s) a given option belongs to.
|
yading@10
|
340 .PP
|
yading@10
|
341 A stream specifier is a string generally appended to the option name and
|
yading@10
|
342 separated from it by a colon. E.g. \f(CW\*(C`\-codec:a:1 ac3\*(C'\fR contains the
|
yading@10
|
343 \&\f(CW\*(C`a:1\*(C'\fR stream specifier, which matches the second audio stream. Therefore, it
|
yading@10
|
344 would select the ac3 codec for the second audio stream.
|
yading@10
|
345 .PP
|
yading@10
|
346 A stream specifier can match several streams, so that the option is applied to all
|
yading@10
|
347 of them. E.g. the stream specifier in \f(CW\*(C`\-b:a 128k\*(C'\fR matches all audio
|
yading@10
|
348 streams.
|
yading@10
|
349 .PP
|
yading@10
|
350 An empty stream specifier matches all streams. For example, \f(CW\*(C`\-codec copy\*(C'\fR
|
yading@10
|
351 or \f(CW\*(C`\-codec: copy\*(C'\fR would copy all the streams without reencoding.
|
yading@10
|
352 .PP
|
yading@10
|
353 Possible forms of stream specifiers are:
|
yading@10
|
354 .IP "\fIstream_index\fR" 4
|
yading@10
|
355 .IX Item "stream_index"
|
yading@10
|
356 Matches the stream with this index. E.g. \f(CW\*(C`\-threads:1 4\*(C'\fR would set the
|
yading@10
|
357 thread count for the second stream to 4.
|
yading@10
|
358 .IP "\fIstream_type\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4
|
yading@10
|
359 .IX Item "stream_type[:stream_index]"
|
yading@10
|
360 \&\fIstream_type\fR is one of following: 'v' for video, 'a' for audio, 's' for subtitle,
|
yading@10
|
361 \&'d' for data, and 't' for attachments. If \fIstream_index\fR is given, then it matches
|
yading@10
|
362 stream number \fIstream_index\fR of this type. Otherwise, it matches all
|
yading@10
|
363 streams of this type.
|
yading@10
|
364 .IP "\fBp:\fR\fIprogram_id\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4
|
yading@10
|
365 .IX Item "p:program_id[:stream_index]"
|
yading@10
|
366 If \fIstream_index\fR is given, then it matches the stream with number \fIstream_index\fR
|
yading@10
|
367 in the program with the id \fIprogram_id\fR. Otherwise, it matches all streams in the
|
yading@10
|
368 program.
|
yading@10
|
369 .IP "\fB#\fR\fIstream_id\fR" 4
|
yading@10
|
370 .IX Item "#stream_id"
|
yading@10
|
371 Matches the stream by a format-specific \s-1ID\s0.
|
yading@10
|
372 .SS "Generic options"
|
yading@10
|
373 .IX Subsection "Generic options"
|
yading@10
|
374 These options are shared amongst the ff* tools.
|
yading@10
|
375 .IP "\fB\-L\fR" 4
|
yading@10
|
376 .IX Item "-L"
|
yading@10
|
377 Show license.
|
yading@10
|
378 .IP "\fB\-h, \-?, \-help, \-\-help [\fR\fIarg\fR\fB]\fR" 4
|
yading@10
|
379 .IX Item "-h, -?, -help, --help [arg]"
|
yading@10
|
380 Show help. An optional parameter may be specified to print help about a specific
|
yading@10
|
381 item.
|
yading@10
|
382 .Sp
|
yading@10
|
383 Possible values of \fIarg\fR are:
|
yading@10
|
384 .RS 4
|
yading@10
|
385 .IP "\fBdecoder=\fR\fIdecoder_name\fR" 4
|
yading@10
|
386 .IX Item "decoder=decoder_name"
|
yading@10
|
387 Print detailed information about the decoder named \fIdecoder_name\fR. Use the
|
yading@10
|
388 \&\fB\-decoders\fR option to get a list of all decoders.
|
yading@10
|
389 .IP "\fBencoder=\fR\fIencoder_name\fR" 4
|
yading@10
|
390 .IX Item "encoder=encoder_name"
|
yading@10
|
391 Print detailed information about the encoder named \fIencoder_name\fR. Use the
|
yading@10
|
392 \&\fB\-encoders\fR option to get a list of all encoders.
|
yading@10
|
393 .IP "\fBdemuxer=\fR\fIdemuxer_name\fR" 4
|
yading@10
|
394 .IX Item "demuxer=demuxer_name"
|
yading@10
|
395 Print detailed information about the demuxer named \fIdemuxer_name\fR. Use the
|
yading@10
|
396 \&\fB\-formats\fR option to get a list of all demuxers and muxers.
|
yading@10
|
397 .IP "\fBmuxer=\fR\fImuxer_name\fR" 4
|
yading@10
|
398 .IX Item "muxer=muxer_name"
|
yading@10
|
399 Print detailed information about the muxer named \fImuxer_name\fR. Use the
|
yading@10
|
400 \&\fB\-formats\fR option to get a list of all muxers and demuxers.
|
yading@10
|
401 .IP "\fBfilter=\fR\fIfilter_name\fR" 4
|
yading@10
|
402 .IX Item "filter=filter_name"
|
yading@10
|
403 Print detailed information about the filter name \fIfilter_name\fR. Use the
|
yading@10
|
404 \&\fB\-filters\fR option to get a list of all filters.
|
yading@10
|
405 .RE
|
yading@10
|
406 .RS 4
|
yading@10
|
407 .RE
|
yading@10
|
408 .IP "\fB\-version\fR" 4
|
yading@10
|
409 .IX Item "-version"
|
yading@10
|
410 Show version.
|
yading@10
|
411 .IP "\fB\-formats\fR" 4
|
yading@10
|
412 .IX Item "-formats"
|
yading@10
|
413 Show available formats.
|
yading@10
|
414 .IP "\fB\-codecs\fR" 4
|
yading@10
|
415 .IX Item "-codecs"
|
yading@10
|
416 Show all codecs known to libavcodec.
|
yading@10
|
417 .Sp
|
yading@10
|
418 Note that the term 'codec' is used throughout this documentation as a shortcut
|
yading@10
|
419 for what is more correctly called a media bitstream format.
|
yading@10
|
420 .IP "\fB\-decoders\fR" 4
|
yading@10
|
421 .IX Item "-decoders"
|
yading@10
|
422 Show available decoders.
|
yading@10
|
423 .IP "\fB\-encoders\fR" 4
|
yading@10
|
424 .IX Item "-encoders"
|
yading@10
|
425 Show all available encoders.
|
yading@10
|
426 .IP "\fB\-bsfs\fR" 4
|
yading@10
|
427 .IX Item "-bsfs"
|
yading@10
|
428 Show available bitstream filters.
|
yading@10
|
429 .IP "\fB\-protocols\fR" 4
|
yading@10
|
430 .IX Item "-protocols"
|
yading@10
|
431 Show available protocols.
|
yading@10
|
432 .IP "\fB\-filters\fR" 4
|
yading@10
|
433 .IX Item "-filters"
|
yading@10
|
434 Show available libavfilter filters.
|
yading@10
|
435 .IP "\fB\-pix_fmts\fR" 4
|
yading@10
|
436 .IX Item "-pix_fmts"
|
yading@10
|
437 Show available pixel formats.
|
yading@10
|
438 .IP "\fB\-sample_fmts\fR" 4
|
yading@10
|
439 .IX Item "-sample_fmts"
|
yading@10
|
440 Show available sample formats.
|
yading@10
|
441 .IP "\fB\-layouts\fR" 4
|
yading@10
|
442 .IX Item "-layouts"
|
yading@10
|
443 Show channel names and standard channel layouts.
|
yading@10
|
444 .IP "\fB\-loglevel [repeat+]\fR\fIloglevel\fR \fB| \-v [repeat+]\fR\fIloglevel\fR" 4
|
yading@10
|
445 .IX Item "-loglevel [repeat+]loglevel | -v [repeat+]loglevel"
|
yading@10
|
446 Set the logging level used by the library.
|
yading@10
|
447 Adding \*(L"repeat+\*(R" indicates that repeated log output should not be compressed
|
yading@10
|
448 to the first line and the \*(L"Last message repeated n times\*(R" line will be
|
yading@10
|
449 omitted. \*(L"repeat\*(R" can also be used alone.
|
yading@10
|
450 If \*(L"repeat\*(R" is used alone, and with no prior loglevel set, the default
|
yading@10
|
451 loglevel will be used. If multiple loglevel parameters are given, using
|
yading@10
|
452 \&'repeat' will not change the loglevel.
|
yading@10
|
453 \&\fIloglevel\fR is a number or a string containing one of the following values:
|
yading@10
|
454 .RS 4
|
yading@10
|
455 .IP "\fBquiet\fR" 4
|
yading@10
|
456 .IX Item "quiet"
|
yading@10
|
457 Show nothing at all; be silent.
|
yading@10
|
458 .IP "\fBpanic\fR" 4
|
yading@10
|
459 .IX Item "panic"
|
yading@10
|
460 Only show fatal errors which could lead the process to crash, such as
|
yading@10
|
461 and assert failure. This is not currently used for anything.
|
yading@10
|
462 .IP "\fBfatal\fR" 4
|
yading@10
|
463 .IX Item "fatal"
|
yading@10
|
464 Only show fatal errors. These are errors after which the process absolutely
|
yading@10
|
465 cannot continue after.
|
yading@10
|
466 .IP "\fBerror\fR" 4
|
yading@10
|
467 .IX Item "error"
|
yading@10
|
468 Show all errors, including ones which can be recovered from.
|
yading@10
|
469 .IP "\fBwarning\fR" 4
|
yading@10
|
470 .IX Item "warning"
|
yading@10
|
471 Show all warnings and errors. Any message related to possibly
|
yading@10
|
472 incorrect or unexpected events will be shown.
|
yading@10
|
473 .IP "\fBinfo\fR" 4
|
yading@10
|
474 .IX Item "info"
|
yading@10
|
475 Show informative messages during processing. This is in addition to
|
yading@10
|
476 warnings and errors. This is the default value.
|
yading@10
|
477 .IP "\fBverbose\fR" 4
|
yading@10
|
478 .IX Item "verbose"
|
yading@10
|
479 Same as \f(CW\*(C`info\*(C'\fR, except more verbose.
|
yading@10
|
480 .IP "\fBdebug\fR" 4
|
yading@10
|
481 .IX Item "debug"
|
yading@10
|
482 Show everything, including debugging information.
|
yading@10
|
483 .RE
|
yading@10
|
484 .RS 4
|
yading@10
|
485 .Sp
|
yading@10
|
486 By default the program logs to stderr, if coloring is supported by the
|
yading@10
|
487 terminal, colors are used to mark errors and warnings. Log coloring
|
yading@10
|
488 can be disabled setting the environment variable
|
yading@10
|
489 \&\fB\s-1AV_LOG_FORCE_NOCOLOR\s0\fR or \fB\s-1NO_COLOR\s0\fR, or can be forced setting
|
yading@10
|
490 the environment variable \fB\s-1AV_LOG_FORCE_COLOR\s0\fR.
|
yading@10
|
491 The use of the environment variable \fB\s-1NO_COLOR\s0\fR is deprecated and
|
yading@10
|
492 will be dropped in a following FFmpeg version.
|
yading@10
|
493 .RE
|
yading@10
|
494 .IP "\fB\-report\fR" 4
|
yading@10
|
495 .IX Item "-report"
|
yading@10
|
496 Dump full command line and console output to a file named
|
yading@10
|
497 \&\f(CW\*(C`\f(CIprogram\f(CW\-\f(CIYYYYMMDD\f(CW\-\f(CIHHMMSS\f(CW.log\*(C'\fR in the current
|
yading@10
|
498 directory.
|
yading@10
|
499 This file can be useful for bug reports.
|
yading@10
|
500 It also implies \f(CW\*(C`\-loglevel verbose\*(C'\fR.
|
yading@10
|
501 .Sp
|
yading@10
|
502 Setting the environment variable \f(CW\*(C`FFREPORT\*(C'\fR to any value has the
|
yading@10
|
503 same effect. If the value is a ':'\-separated key=value sequence, these
|
yading@10
|
504 options will affect the report; options values must be escaped if they
|
yading@10
|
505 contain special characters or the options delimiter ':' (see the
|
yading@10
|
506 ``Quoting and escaping'' section in the ffmpeg-utils manual). The
|
yading@10
|
507 following option is recognized:
|
yading@10
|
508 .RS 4
|
yading@10
|
509 .IP "\fBfile\fR" 4
|
yading@10
|
510 .IX Item "file"
|
yading@10
|
511 set the file name to use for the report; \f(CW%p\fR is expanded to the name
|
yading@10
|
512 of the program, \f(CW%t\fR is expanded to a timestamp, \f(CW\*(C`%%\*(C'\fR is expanded
|
yading@10
|
513 to a plain \f(CW\*(C`%\*(C'\fR
|
yading@10
|
514 .RE
|
yading@10
|
515 .RS 4
|
yading@10
|
516 .Sp
|
yading@10
|
517 Errors in parsing the environment variable are not fatal, and will not
|
yading@10
|
518 appear in the report.
|
yading@10
|
519 .RE
|
yading@10
|
520 .IP "\fB\-cpuflags flags (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
521 .IX Item "-cpuflags flags (global)"
|
yading@10
|
522 Allows setting and clearing cpu flags. This option is intended
|
yading@10
|
523 for testing. Do not use it unless you know what you're doing.
|
yading@10
|
524 .Sp
|
yading@10
|
525 .Vb 3
|
yading@10
|
526 \& ffmpeg \-cpuflags \-sse+mmx ...
|
yading@10
|
527 \& ffmpeg \-cpuflags mmx ...
|
yading@10
|
528 \& ffmpeg \-cpuflags 0 ...
|
yading@10
|
529 .Ve
|
yading@10
|
530 .Sp
|
yading@10
|
531 Possible flags for this option are:
|
yading@10
|
532 .RS 4
|
yading@10
|
533 .IP "\fBx86\fR" 4
|
yading@10
|
534 .IX Item "x86"
|
yading@10
|
535 .RS 4
|
yading@10
|
536 .PD 0
|
yading@10
|
537 .IP "\fBmmx\fR" 4
|
yading@10
|
538 .IX Item "mmx"
|
yading@10
|
539 .IP "\fBmmxext\fR" 4
|
yading@10
|
540 .IX Item "mmxext"
|
yading@10
|
541 .IP "\fBsse\fR" 4
|
yading@10
|
542 .IX Item "sse"
|
yading@10
|
543 .IP "\fBsse2\fR" 4
|
yading@10
|
544 .IX Item "sse2"
|
yading@10
|
545 .IP "\fBsse2slow\fR" 4
|
yading@10
|
546 .IX Item "sse2slow"
|
yading@10
|
547 .IP "\fBsse3\fR" 4
|
yading@10
|
548 .IX Item "sse3"
|
yading@10
|
549 .IP "\fBsse3slow\fR" 4
|
yading@10
|
550 .IX Item "sse3slow"
|
yading@10
|
551 .IP "\fBssse3\fR" 4
|
yading@10
|
552 .IX Item "ssse3"
|
yading@10
|
553 .IP "\fBatom\fR" 4
|
yading@10
|
554 .IX Item "atom"
|
yading@10
|
555 .IP "\fBsse4.1\fR" 4
|
yading@10
|
556 .IX Item "sse4.1"
|
yading@10
|
557 .IP "\fBsse4.2\fR" 4
|
yading@10
|
558 .IX Item "sse4.2"
|
yading@10
|
559 .IP "\fBavx\fR" 4
|
yading@10
|
560 .IX Item "avx"
|
yading@10
|
561 .IP "\fBxop\fR" 4
|
yading@10
|
562 .IX Item "xop"
|
yading@10
|
563 .IP "\fBfma4\fR" 4
|
yading@10
|
564 .IX Item "fma4"
|
yading@10
|
565 .IP "\fB3dnow\fR" 4
|
yading@10
|
566 .IX Item "3dnow"
|
yading@10
|
567 .IP "\fB3dnowext\fR" 4
|
yading@10
|
568 .IX Item "3dnowext"
|
yading@10
|
569 .IP "\fBcmov\fR" 4
|
yading@10
|
570 .IX Item "cmov"
|
yading@10
|
571 .RE
|
yading@10
|
572 .RS 4
|
yading@10
|
573 .RE
|
yading@10
|
574 .IP "\fB\s-1ARM\s0\fR" 4
|
yading@10
|
575 .IX Item "ARM"
|
yading@10
|
576 .RS 4
|
yading@10
|
577 .IP "\fBarmv5te\fR" 4
|
yading@10
|
578 .IX Item "armv5te"
|
yading@10
|
579 .IP "\fBarmv6\fR" 4
|
yading@10
|
580 .IX Item "armv6"
|
yading@10
|
581 .IP "\fBarmv6t2\fR" 4
|
yading@10
|
582 .IX Item "armv6t2"
|
yading@10
|
583 .IP "\fBvfp\fR" 4
|
yading@10
|
584 .IX Item "vfp"
|
yading@10
|
585 .IP "\fBvfpv3\fR" 4
|
yading@10
|
586 .IX Item "vfpv3"
|
yading@10
|
587 .IP "\fBneon\fR" 4
|
yading@10
|
588 .IX Item "neon"
|
yading@10
|
589 .RE
|
yading@10
|
590 .RS 4
|
yading@10
|
591 .RE
|
yading@10
|
592 .IP "\fBPowerPC\fR" 4
|
yading@10
|
593 .IX Item "PowerPC"
|
yading@10
|
594 .RS 4
|
yading@10
|
595 .IP "\fBaltivec\fR" 4
|
yading@10
|
596 .IX Item "altivec"
|
yading@10
|
597 .RE
|
yading@10
|
598 .RS 4
|
yading@10
|
599 .RE
|
yading@10
|
600 .IP "\fBSpecific Processors\fR" 4
|
yading@10
|
601 .IX Item "Specific Processors"
|
yading@10
|
602 .RS 4
|
yading@10
|
603 .IP "\fBpentium2\fR" 4
|
yading@10
|
604 .IX Item "pentium2"
|
yading@10
|
605 .IP "\fBpentium3\fR" 4
|
yading@10
|
606 .IX Item "pentium3"
|
yading@10
|
607 .IP "\fBpentium4\fR" 4
|
yading@10
|
608 .IX Item "pentium4"
|
yading@10
|
609 .IP "\fBk6\fR" 4
|
yading@10
|
610 .IX Item "k6"
|
yading@10
|
611 .IP "\fBk62\fR" 4
|
yading@10
|
612 .IX Item "k62"
|
yading@10
|
613 .IP "\fBathlon\fR" 4
|
yading@10
|
614 .IX Item "athlon"
|
yading@10
|
615 .IP "\fBathlonxp\fR" 4
|
yading@10
|
616 .IX Item "athlonxp"
|
yading@10
|
617 .IP "\fBk8\fR" 4
|
yading@10
|
618 .IX Item "k8"
|
yading@10
|
619 .RE
|
yading@10
|
620 .RS 4
|
yading@10
|
621 .RE
|
yading@10
|
622 .RE
|
yading@10
|
623 .RS 4
|
yading@10
|
624 .RE
|
yading@10
|
625 .IP "\fB\-opencl_options options (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
626 .IX Item "-opencl_options options (global)"
|
yading@10
|
627 .PD
|
yading@10
|
628 Set OpenCL environment options. This option is only available when
|
yading@10
|
629 FFmpeg has been compiled with \f(CW\*(C`\-\-enable\-opencl\*(C'\fR.
|
yading@10
|
630 .Sp
|
yading@10
|
631 \&\fIoptions\fR must be a list of \fIkey\fR=\fIvalue\fR option pairs
|
yading@10
|
632 separated by ':'. See the ``OpenCL Options'' section in the
|
yading@10
|
633 ffmpeg-utils manual for the list of supported options.
|
yading@10
|
634 .SS "AVOptions"
|
yading@10
|
635 .IX Subsection "AVOptions"
|
yading@10
|
636 These options are provided directly by the libavformat, libavdevice and
|
yading@10
|
637 libavcodec libraries. To see the list of available AVOptions, use the
|
yading@10
|
638 \&\fB\-help\fR option. They are separated into two categories:
|
yading@10
|
639 .IP "\fBgeneric\fR" 4
|
yading@10
|
640 .IX Item "generic"
|
yading@10
|
641 These options can be set for any container, codec or device. Generic options
|
yading@10
|
642 are listed under AVFormatContext options for containers/devices and under
|
yading@10
|
643 AVCodecContext options for codecs.
|
yading@10
|
644 .IP "\fBprivate\fR" 4
|
yading@10
|
645 .IX Item "private"
|
yading@10
|
646 These options are specific to the given container, device or codec. Private
|
yading@10
|
647 options are listed under their corresponding containers/devices/codecs.
|
yading@10
|
648 .PP
|
yading@10
|
649 For example to write an ID3v2.3 header instead of a default ID3v2.4 to
|
yading@10
|
650 an \s-1MP3\s0 file, use the \fBid3v2_version\fR private option of the \s-1MP3\s0
|
yading@10
|
651 muxer:
|
yading@10
|
652 .PP
|
yading@10
|
653 .Vb 1
|
yading@10
|
654 \& ffmpeg \-i input.flac \-id3v2_version 3 out.mp3
|
yading@10
|
655 .Ve
|
yading@10
|
656 .PP
|
yading@10
|
657 All codec AVOptions are obviously per-stream, so the chapter on stream
|
yading@10
|
658 specifiers applies to them
|
yading@10
|
659 .PP
|
yading@10
|
660 Note \fB\-nooption\fR syntax cannot be used for boolean AVOptions,
|
yading@10
|
661 use \fB\-option 0\fR/\fB\-option 1\fR.
|
yading@10
|
662 .PP
|
yading@10
|
663 Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
yading@10
|
664 v/a/s to the options name is now obsolete and will be removed soon.
|
yading@10
|
665 .SS "Main options"
|
yading@10
|
666 .IX Subsection "Main options"
|
yading@10
|
667 .IP "\fB\-f\fR \fIfmt\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
668 .IX Item "-f fmt (input/output)"
|
yading@10
|
669 Force input or output file format. The format is normally auto detected for input
|
yading@10
|
670 files and guessed from the file extension for output files, so this option is not
|
yading@10
|
671 needed in most cases.
|
yading@10
|
672 .IP "\fB\-i\fR \fIfilename\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
673 .IX Item "-i filename (input)"
|
yading@10
|
674 input file name
|
yading@10
|
675 .IP "\fB\-y (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
676 .IX Item "-y (global)"
|
yading@10
|
677 Overwrite output files without asking.
|
yading@10
|
678 .IP "\fB\-n (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
679 .IX Item "-n (global)"
|
yading@10
|
680 Do not overwrite output files, and exit immediately if a specified
|
yading@10
|
681 output file already exists.
|
yading@10
|
682 .IP "\fB\-c[:\fR\fIstream_specifier\fR\fB]\fR \fIcodec\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
683 .IX Item "-c[:stream_specifier] codec (input/output,per-stream)"
|
yading@10
|
684 .PD 0
|
yading@10
|
685 .IP "\fB\-codec[:\fR\fIstream_specifier\fR\fB]\fR \fIcodec\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
686 .IX Item "-codec[:stream_specifier] codec (input/output,per-stream)"
|
yading@10
|
687 .PD
|
yading@10
|
688 Select an encoder (when used before an output file) or a decoder (when used
|
yading@10
|
689 before an input file) for one or more streams. \fIcodec\fR is the name of a
|
yading@10
|
690 decoder/encoder or a special value \f(CW\*(C`copy\*(C'\fR (output only) to indicate that
|
yading@10
|
691 the stream is not to be re-encoded.
|
yading@10
|
692 .Sp
|
yading@10
|
693 For example
|
yading@10
|
694 .Sp
|
yading@10
|
695 .Vb 1
|
yading@10
|
696 \& ffmpeg \-i INPUT \-map 0 \-c:v libx264 \-c:a copy OUTPUT
|
yading@10
|
697 .Ve
|
yading@10
|
698 .Sp
|
yading@10
|
699 encodes all video streams with libx264 and copies all audio streams.
|
yading@10
|
700 .Sp
|
yading@10
|
701 For each stream, the last matching \f(CW\*(C`c\*(C'\fR option is applied, so
|
yading@10
|
702 .Sp
|
yading@10
|
703 .Vb 1
|
yading@10
|
704 \& ffmpeg \-i INPUT \-map 0 \-c copy \-c:v:1 libx264 \-c:a:137 libvorbis OUTPUT
|
yading@10
|
705 .Ve
|
yading@10
|
706 .Sp
|
yading@10
|
707 will copy all the streams except the second video, which will be encoded with
|
yading@10
|
708 libx264, and the 138th audio, which will be encoded with libvorbis.
|
yading@10
|
709 .IP "\fB\-t\fR \fIduration\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
710 .IX Item "-t duration (output)"
|
yading@10
|
711 Stop writing the output after its duration reaches \fIduration\fR.
|
yading@10
|
712 \&\fIduration\fR may be a number in seconds, or in \f(CW\*(C`hh:mm:ss[.xxx]\*(C'\fR form.
|
yading@10
|
713 .Sp
|
yading@10
|
714 \&\-to and \-t are mutually exclusive and \-t has priority.
|
yading@10
|
715 .IP "\fB\-to\fR \fIposition\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
716 .IX Item "-to position (output)"
|
yading@10
|
717 Stop writing the output at \fIposition\fR.
|
yading@10
|
718 \&\fIposition\fR may be a number in seconds, or in \f(CW\*(C`hh:mm:ss[.xxx]\*(C'\fR form.
|
yading@10
|
719 .Sp
|
yading@10
|
720 \&\-to and \-t are mutually exclusive and \-t has priority.
|
yading@10
|
721 .IP "\fB\-fs\fR \fIlimit_size\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
722 .IX Item "-fs limit_size (output)"
|
yading@10
|
723 Set the file size limit, expressed in bytes.
|
yading@10
|
724 .IP "\fB\-ss\fR \fIposition\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
725 .IX Item "-ss position (input/output)"
|
yading@10
|
726 When used as an input option (before \f(CW\*(C`\-i\*(C'\fR), seeks in this input file to
|
yading@10
|
727 \&\fIposition\fR. When used as an output option (before an output filename),
|
yading@10
|
728 decodes but discards input until the timestamps reach \fIposition\fR. This is
|
yading@10
|
729 slower, but more accurate.
|
yading@10
|
730 .Sp
|
yading@10
|
731 \&\fIposition\fR may be either in seconds or in \f(CW\*(C`hh:mm:ss[.xxx]\*(C'\fR form.
|
yading@10
|
732 .IP "\fB\-itsoffset\fR \fIoffset\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
733 .IX Item "-itsoffset offset (input)"
|
yading@10
|
734 Set the input time offset in seconds.
|
yading@10
|
735 \&\f(CW\*(C`[\-]hh:mm:ss[.xxx]\*(C'\fR syntax is also supported.
|
yading@10
|
736 The offset is added to the timestamps of the input files.
|
yading@10
|
737 Specifying a positive offset means that the corresponding
|
yading@10
|
738 streams are delayed by \fIoffset\fR seconds.
|
yading@10
|
739 .IP "\fB\-timestamp\fR \fItime\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
740 .IX Item "-timestamp time (output)"
|
yading@10
|
741 Set the recording timestamp in the container.
|
yading@10
|
742 The syntax for \fItime\fR is:
|
yading@10
|
743 .Sp
|
yading@10
|
744 .Vb 1
|
yading@10
|
745 \& now|([(YYYY\-MM\-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...])|(HHMMSS[.m...]))[Z|z])
|
yading@10
|
746 .Ve
|
yading@10
|
747 .Sp
|
yading@10
|
748 If the value is \*(L"now\*(R" it takes the current time.
|
yading@10
|
749 Time is local time unless 'Z' or 'z' is appended, in which case it is
|
yading@10
|
750 interpreted as \s-1UTC\s0.
|
yading@10
|
751 If the year-month-day part is not specified it takes the current
|
yading@10
|
752 year-month-day.
|
yading@10
|
753 .IP "\fB\-metadata[:metadata_specifier]\fR \fIkey\fR\fB=\fR\fIvalue\fR \fB(\fR\fIoutput,per\-metadata\fR\fB)\fR" 4
|
yading@10
|
754 .IX Item "-metadata[:metadata_specifier] key=value (output,per-metadata)"
|
yading@10
|
755 Set a metadata key/value pair.
|
yading@10
|
756 .Sp
|
yading@10
|
757 An optional \fImetadata_specifier\fR may be given to set metadata
|
yading@10
|
758 on streams or chapters. See \f(CW\*(C`\-map_metadata\*(C'\fR documentation for
|
yading@10
|
759 details.
|
yading@10
|
760 .Sp
|
yading@10
|
761 This option overrides metadata set with \f(CW\*(C`\-map_metadata\*(C'\fR. It is
|
yading@10
|
762 also possible to delete metadata by using an empty value.
|
yading@10
|
763 .Sp
|
yading@10
|
764 For example, for setting the title in the output file:
|
yading@10
|
765 .Sp
|
yading@10
|
766 .Vb 1
|
yading@10
|
767 \& ffmpeg \-i in.avi \-metadata title="my title" out.flv
|
yading@10
|
768 .Ve
|
yading@10
|
769 .Sp
|
yading@10
|
770 To set the language of the first audio stream:
|
yading@10
|
771 .Sp
|
yading@10
|
772 .Vb 1
|
yading@10
|
773 \& ffmpeg \-i INPUT \-metadata:s:a:1 language=eng OUTPUT
|
yading@10
|
774 .Ve
|
yading@10
|
775 .IP "\fB\-target\fR \fItype\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
776 .IX Item "-target type (output)"
|
yading@10
|
777 Specify target file type (\f(CW\*(C`vcd\*(C'\fR, \f(CW\*(C`svcd\*(C'\fR, \f(CW\*(C`dvd\*(C'\fR, \f(CW\*(C`dv\*(C'\fR,
|
yading@10
|
778 \&\f(CW\*(C`dv50\*(C'\fR). \fItype\fR may be prefixed with \f(CW\*(C`pal\-\*(C'\fR, \f(CW\*(C`ntsc\-\*(C'\fR or
|
yading@10
|
779 \&\f(CW\*(C`film\-\*(C'\fR to use the corresponding standard. All the format options
|
yading@10
|
780 (bitrate, codecs, buffer sizes) are then set automatically. You can just type:
|
yading@10
|
781 .Sp
|
yading@10
|
782 .Vb 1
|
yading@10
|
783 \& ffmpeg \-i myfile.avi \-target vcd /tmp/vcd.mpg
|
yading@10
|
784 .Ve
|
yading@10
|
785 .Sp
|
yading@10
|
786 Nevertheless you can specify additional options as long as you know
|
yading@10
|
787 they do not conflict with the standard, as in:
|
yading@10
|
788 .Sp
|
yading@10
|
789 .Vb 1
|
yading@10
|
790 \& ffmpeg \-i myfile.avi \-target vcd \-bf 2 /tmp/vcd.mpg
|
yading@10
|
791 .Ve
|
yading@10
|
792 .IP "\fB\-dframes\fR \fInumber\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
793 .IX Item "-dframes number (output)"
|
yading@10
|
794 Set the number of data frames to record. This is an alias for \f(CW\*(C`\-frames:d\*(C'\fR.
|
yading@10
|
795 .IP "\fB\-frames[:\fR\fIstream_specifier\fR\fB]\fR \fIframecount\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
796 .IX Item "-frames[:stream_specifier] framecount (output,per-stream)"
|
yading@10
|
797 Stop writing to the stream after \fIframecount\fR frames.
|
yading@10
|
798 .IP "\fB\-q[:\fR\fIstream_specifier\fR\fB]\fR \fIq\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
799 .IX Item "-q[:stream_specifier] q (output,per-stream)"
|
yading@10
|
800 .PD 0
|
yading@10
|
801 .IP "\fB\-qscale[:\fR\fIstream_specifier\fR\fB]\fR \fIq\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
802 .IX Item "-qscale[:stream_specifier] q (output,per-stream)"
|
yading@10
|
803 .PD
|
yading@10
|
804 Use fixed quality scale (\s-1VBR\s0). The meaning of \fIq\fR is
|
yading@10
|
805 codec-dependent.
|
yading@10
|
806 .IP "\fB\-filter[:\fR\fIstream_specifier\fR\fB]\fR \fIfiltergraph\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
807 .IX Item "-filter[:stream_specifier] filtergraph (output,per-stream)"
|
yading@10
|
808 Create the filtergraph specified by \fIfiltergraph\fR and use it to
|
yading@10
|
809 filter the stream.
|
yading@10
|
810 .Sp
|
yading@10
|
811 \&\fIfiltergraph\fR is a description of the filtergraph to apply to
|
yading@10
|
812 the stream, and must have a single input and a single output of the
|
yading@10
|
813 same type of the stream. In the filtergraph, the input is associated
|
yading@10
|
814 to the label \f(CW\*(C`in\*(C'\fR, and the output to the label \f(CW\*(C`out\*(C'\fR. See
|
yading@10
|
815 the ffmpeg-filters manual for more information about the filtergraph
|
yading@10
|
816 syntax.
|
yading@10
|
817 .Sp
|
yading@10
|
818 See the \-filter_complex option if you
|
yading@10
|
819 want to create filtergraphs with multiple inputs and/or outputs.
|
yading@10
|
820 .IP "\fB\-filter_script[:\fR\fIstream_specifier\fR\fB]\fR \fIfilename\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
821 .IX Item "-filter_script[:stream_specifier] filename (output,per-stream)"
|
yading@10
|
822 This option is similar to \fB\-filter\fR, the only difference is that its
|
yading@10
|
823 argument is the name of the file from which a filtergraph description is to be
|
yading@10
|
824 read.
|
yading@10
|
825 .IP "\fB\-pre[:\fR\fIstream_specifier\fR\fB]\fR \fIpreset_name\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
826 .IX Item "-pre[:stream_specifier] preset_name (output,per-stream)"
|
yading@10
|
827 Specify the preset for matching stream(s).
|
yading@10
|
828 .IP "\fB\-stats (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
829 .IX Item "-stats (global)"
|
yading@10
|
830 Print encoding progress/statistics. It is on by default, to explicitly
|
yading@10
|
831 disable it you need to specify \f(CW\*(C`\-nostats\*(C'\fR.
|
yading@10
|
832 .IP "\fB\-progress\fR \fIurl\fR \fB(\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
833 .IX Item "-progress url (global)"
|
yading@10
|
834 Send program-friendly progress information to \fIurl\fR.
|
yading@10
|
835 .Sp
|
yading@10
|
836 Progress information is written approximately every second and at the end of
|
yading@10
|
837 the encoding process. It is made of "\fIkey\fR=\fIvalue\fR" lines. \fIkey\fR
|
yading@10
|
838 consists of only alphanumeric characters. The last key of a sequence of
|
yading@10
|
839 progress information is always \*(L"progress\*(R".
|
yading@10
|
840 .IP "\fB\-stdin\fR" 4
|
yading@10
|
841 .IX Item "-stdin"
|
yading@10
|
842 Enable interaction on standard input. On by default unless standard input is
|
yading@10
|
843 used as an input. To explicitly disable interaction you need to specify
|
yading@10
|
844 \&\f(CW\*(C`\-nostdin\*(C'\fR.
|
yading@10
|
845 .Sp
|
yading@10
|
846 Disabling interaction on standard input is useful, for example, if
|
yading@10
|
847 ffmpeg is in the background process group. Roughly the same result can
|
yading@10
|
848 be achieved with \f(CW\*(C`ffmpeg ... < /dev/null\*(C'\fR but it requires a
|
yading@10
|
849 shell.
|
yading@10
|
850 .IP "\fB\-debug_ts (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
851 .IX Item "-debug_ts (global)"
|
yading@10
|
852 Print timestamp information. It is off by default. This option is
|
yading@10
|
853 mostly useful for testing and debugging purposes, and the output
|
yading@10
|
854 format may change from one version to another, so it should not be
|
yading@10
|
855 employed by portable scripts.
|
yading@10
|
856 .Sp
|
yading@10
|
857 See also the option \f(CW\*(C`\-fdebug ts\*(C'\fR.
|
yading@10
|
858 .IP "\fB\-attach\fR \fIfilename\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
859 .IX Item "-attach filename (output)"
|
yading@10
|
860 Add an attachment to the output file. This is supported by a few formats
|
yading@10
|
861 like Matroska for e.g. fonts used in rendering subtitles. Attachments
|
yading@10
|
862 are implemented as a specific type of stream, so this option will add
|
yading@10
|
863 a new stream to the file. It is then possible to use per-stream options
|
yading@10
|
864 on this stream in the usual way. Attachment streams created with this
|
yading@10
|
865 option will be created after all the other streams (i.e. those created
|
yading@10
|
866 with \f(CW\*(C`\-map\*(C'\fR or automatic mappings).
|
yading@10
|
867 .Sp
|
yading@10
|
868 Note that for Matroska you also have to set the mimetype metadata tag:
|
yading@10
|
869 .Sp
|
yading@10
|
870 .Vb 1
|
yading@10
|
871 \& ffmpeg \-i INPUT \-attach DejaVuSans.ttf \-metadata:s:2 mimetype=application/x\-truetype\-font out.mkv
|
yading@10
|
872 .Ve
|
yading@10
|
873 .Sp
|
yading@10
|
874 (assuming that the attachment stream will be third in the output file).
|
yading@10
|
875 .IP "\fB\-dump_attachment[:\fR\fIstream_specifier\fR\fB]\fR \fIfilename\fR \fB(\fR\fIinput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
876 .IX Item "-dump_attachment[:stream_specifier] filename (input,per-stream)"
|
yading@10
|
877 Extract the matching attachment stream into a file named \fIfilename\fR. If
|
yading@10
|
878 \&\fIfilename\fR is empty, then the value of the \f(CW\*(C`filename\*(C'\fR metadata tag
|
yading@10
|
879 will be used.
|
yading@10
|
880 .Sp
|
yading@10
|
881 E.g. to extract the first attachment to a file named 'out.ttf':
|
yading@10
|
882 .Sp
|
yading@10
|
883 .Vb 1
|
yading@10
|
884 \& ffmpeg \-dump_attachment:t:0 out.ttf \-i INPUT
|
yading@10
|
885 .Ve
|
yading@10
|
886 .Sp
|
yading@10
|
887 To extract all attachments to files determined by the \f(CW\*(C`filename\*(C'\fR tag:
|
yading@10
|
888 .Sp
|
yading@10
|
889 .Vb 1
|
yading@10
|
890 \& ffmpeg \-dump_attachment:t "" \-i INPUT
|
yading@10
|
891 .Ve
|
yading@10
|
892 .Sp
|
yading@10
|
893 Technical note \*(-- attachments are implemented as codec extradata, so this
|
yading@10
|
894 option can actually be used to extract extradata from any stream, not just
|
yading@10
|
895 attachments.
|
yading@10
|
896 .SS "Video Options"
|
yading@10
|
897 .IX Subsection "Video Options"
|
yading@10
|
898 .IP "\fB\-vframes\fR \fInumber\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
899 .IX Item "-vframes number (output)"
|
yading@10
|
900 Set the number of video frames to record. This is an alias for \f(CW\*(C`\-frames:v\*(C'\fR.
|
yading@10
|
901 .IP "\fB\-r[:\fR\fIstream_specifier\fR\fB]\fR \fIfps\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
902 .IX Item "-r[:stream_specifier] fps (input/output,per-stream)"
|
yading@10
|
903 Set frame rate (Hz value, fraction or abbreviation).
|
yading@10
|
904 .Sp
|
yading@10
|
905 As an input option, ignore any timestamps stored in the file and instead
|
yading@10
|
906 generate timestamps assuming constant frame rate \fIfps\fR.
|
yading@10
|
907 .Sp
|
yading@10
|
908 As an output option, duplicate or drop input frames to achieve constant output
|
yading@10
|
909 frame rate \fIfps\fR.
|
yading@10
|
910 .IP "\fB\-s[:\fR\fIstream_specifier\fR\fB]\fR \fIsize\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
911 .IX Item "-s[:stream_specifier] size (input/output,per-stream)"
|
yading@10
|
912 Set frame size.
|
yading@10
|
913 .Sp
|
yading@10
|
914 As an input option, this is a shortcut for the \fBvideo_size\fR private
|
yading@10
|
915 option, recognized by some demuxers for which the frame size is either not
|
yading@10
|
916 stored in the file or is configurable \*(-- e.g. raw video or video grabbers.
|
yading@10
|
917 .Sp
|
yading@10
|
918 As an output option, this inserts the \f(CW\*(C`scale\*(C'\fR video filter to the
|
yading@10
|
919 \&\fIend\fR of the corresponding filtergraph. Please use the \f(CW\*(C`scale\*(C'\fR filter
|
yading@10
|
920 directly to insert it at the beginning or some other place.
|
yading@10
|
921 .Sp
|
yading@10
|
922 The format is \fBwxh\fR (default \- same as source).
|
yading@10
|
923 .IP "\fB\-aspect[:\fR\fIstream_specifier\fR\fB]\fR \fIaspect\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
924 .IX Item "-aspect[:stream_specifier] aspect (output,per-stream)"
|
yading@10
|
925 Set the video display aspect ratio specified by \fIaspect\fR.
|
yading@10
|
926 .Sp
|
yading@10
|
927 \&\fIaspect\fR can be a floating point number string, or a string of the
|
yading@10
|
928 form \fInum\fR:\fIden\fR, where \fInum\fR and \fIden\fR are the
|
yading@10
|
929 numerator and denominator of the aspect ratio. For example \*(L"4:3\*(R",
|
yading@10
|
930 \&\*(L"16:9\*(R", \*(L"1.3333\*(R", and \*(L"1.7777\*(R" are valid argument values.
|
yading@10
|
931 .Sp
|
yading@10
|
932 If used together with \fB\-vcodec copy\fR, it will affect the aspect ratio
|
yading@10
|
933 stored at container level, but not the aspect ratio stored in encoded
|
yading@10
|
934 frames, if it exists.
|
yading@10
|
935 .IP "\fB\-vn (\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
936 .IX Item "-vn (output)"
|
yading@10
|
937 Disable video recording.
|
yading@10
|
938 .IP "\fB\-vcodec\fR \fIcodec\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
939 .IX Item "-vcodec codec (output)"
|
yading@10
|
940 Set the video codec. This is an alias for \f(CW\*(C`\-codec:v\*(C'\fR.
|
yading@10
|
941 .IP "\fB\-pass[:\fR\fIstream_specifier\fR\fB]\fR \fIn\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
942 .IX Item "-pass[:stream_specifier] n (output,per-stream)"
|
yading@10
|
943 Select the pass number (1 or 2). It is used to do two-pass
|
yading@10
|
944 video encoding. The statistics of the video are recorded in the first
|
yading@10
|
945 pass into a log file (see also the option \-passlogfile),
|
yading@10
|
946 and in the second pass that log file is used to generate the video
|
yading@10
|
947 at the exact requested bitrate.
|
yading@10
|
948 On pass 1, you may just deactivate audio and set output to null,
|
yading@10
|
949 examples for Windows and Unix:
|
yading@10
|
950 .Sp
|
yading@10
|
951 .Vb 2
|
yading@10
|
952 \& ffmpeg \-i foo.mov \-c:v libxvid \-pass 1 \-an \-f rawvideo \-y NUL
|
yading@10
|
953 \& ffmpeg \-i foo.mov \-c:v libxvid \-pass 1 \-an \-f rawvideo \-y /dev/null
|
yading@10
|
954 .Ve
|
yading@10
|
955 .IP "\fB\-passlogfile[:\fR\fIstream_specifier\fR\fB]\fR \fIprefix\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
956 .IX Item "-passlogfile[:stream_specifier] prefix (output,per-stream)"
|
yading@10
|
957 Set two-pass log file name prefix to \fIprefix\fR, the default file name
|
yading@10
|
958 prefix is ``ffmpeg2pass''. The complete file name will be
|
yading@10
|
959 \&\fI\s-1PREFIX\-N\s0.log\fR, where N is a number specific to the output
|
yading@10
|
960 stream
|
yading@10
|
961 .IP "\fB\-vlang\fR \fIcode\fR" 4
|
yading@10
|
962 .IX Item "-vlang code"
|
yading@10
|
963 Set the \s-1ISO\s0 639 language code (3 letters) of the current video stream.
|
yading@10
|
964 .IP "\fB\-vf\fR \fIfiltergraph\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
965 .IX Item "-vf filtergraph (output)"
|
yading@10
|
966 Create the filtergraph specified by \fIfiltergraph\fR and use it to
|
yading@10
|
967 filter the stream.
|
yading@10
|
968 .Sp
|
yading@10
|
969 This is an alias for \f(CW\*(C`\-filter:v\*(C'\fR, see the \-filter option.
|
yading@10
|
970 .SS "Advanced Video Options"
|
yading@10
|
971 .IX Subsection "Advanced Video Options"
|
yading@10
|
972 .IP "\fB\-pix_fmt[:\fR\fIstream_specifier\fR\fB]\fR \fIformat\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
973 .IX Item "-pix_fmt[:stream_specifier] format (input/output,per-stream)"
|
yading@10
|
974 Set pixel format. Use \f(CW\*(C`\-pix_fmts\*(C'\fR to show all the supported
|
yading@10
|
975 pixel formats.
|
yading@10
|
976 If the selected pixel format can not be selected, ffmpeg will print a
|
yading@10
|
977 warning and select the best pixel format supported by the encoder.
|
yading@10
|
978 If \fIpix_fmt\fR is prefixed by a \f(CW\*(C`+\*(C'\fR, ffmpeg will exit with an error
|
yading@10
|
979 if the requested pixel format can not be selected, and automatic conversions
|
yading@10
|
980 inside filtergraphs are disabled.
|
yading@10
|
981 If \fIpix_fmt\fR is a single \f(CW\*(C`+\*(C'\fR, ffmpeg selects the same pixel format
|
yading@10
|
982 as the input (or graph output) and automatic conversions are disabled.
|
yading@10
|
983 .IP "\fB\-sws_flags\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
984 .IX Item "-sws_flags flags (input/output)"
|
yading@10
|
985 Set SwScaler flags.
|
yading@10
|
986 .IP "\fB\-vdt\fR \fIn\fR" 4
|
yading@10
|
987 .IX Item "-vdt n"
|
yading@10
|
988 Discard threshold.
|
yading@10
|
989 .IP "\fB\-rc_override[:\fR\fIstream_specifier\fR\fB]\fR \fIoverride\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
990 .IX Item "-rc_override[:stream_specifier] override (output,per-stream)"
|
yading@10
|
991 Rate control override for specific intervals, formatted as \*(L"int,int,int\*(R"
|
yading@10
|
992 list separated with slashes. Two first values are the beginning and
|
yading@10
|
993 end frame numbers, last one is quantizer to use if positive, or quality
|
yading@10
|
994 factor if negative.
|
yading@10
|
995 .IP "\fB\-deinterlace\fR" 4
|
yading@10
|
996 .IX Item "-deinterlace"
|
yading@10
|
997 Deinterlace pictures.
|
yading@10
|
998 This option is deprecated since the deinterlacing is very low quality.
|
yading@10
|
999 Use the yadif filter with \f(CW\*(C`\-filter:v yadif\*(C'\fR.
|
yading@10
|
1000 .IP "\fB\-ilme\fR" 4
|
yading@10
|
1001 .IX Item "-ilme"
|
yading@10
|
1002 Force interlacing support in encoder (\s-1MPEG\-2\s0 and \s-1MPEG\-4\s0 only).
|
yading@10
|
1003 Use this option if your input file is interlaced and you want
|
yading@10
|
1004 to keep the interlaced format for minimum losses.
|
yading@10
|
1005 The alternative is to deinterlace the input stream with
|
yading@10
|
1006 \&\fB\-deinterlace\fR, but deinterlacing introduces losses.
|
yading@10
|
1007 .IP "\fB\-psnr\fR" 4
|
yading@10
|
1008 .IX Item "-psnr"
|
yading@10
|
1009 Calculate \s-1PSNR\s0 of compressed frames.
|
yading@10
|
1010 .IP "\fB\-vstats\fR" 4
|
yading@10
|
1011 .IX Item "-vstats"
|
yading@10
|
1012 Dump video coding statistics to \fIvstats_HHMMSS.log\fR.
|
yading@10
|
1013 .IP "\fB\-vstats_file\fR \fIfile\fR" 4
|
yading@10
|
1014 .IX Item "-vstats_file file"
|
yading@10
|
1015 Dump video coding statistics to \fIfile\fR.
|
yading@10
|
1016 .IP "\fB\-top[:\fR\fIstream_specifier\fR\fB]\fR \fIn\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1017 .IX Item "-top[:stream_specifier] n (output,per-stream)"
|
yading@10
|
1018 top=1/bottom=0/auto=\-1 field first
|
yading@10
|
1019 .IP "\fB\-dc\fR \fIprecision\fR" 4
|
yading@10
|
1020 .IX Item "-dc precision"
|
yading@10
|
1021 Intra_dc_precision.
|
yading@10
|
1022 .IP "\fB\-vtag\fR \fIfourcc/tag\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1023 .IX Item "-vtag fourcc/tag (output)"
|
yading@10
|
1024 Force video tag/fourcc. This is an alias for \f(CW\*(C`\-tag:v\*(C'\fR.
|
yading@10
|
1025 .IP "\fB\-qphist (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1026 .IX Item "-qphist (global)"
|
yading@10
|
1027 Show \s-1QP\s0 histogram
|
yading@10
|
1028 .IP "\fB\-vbsf\fR \fIbitstream_filter\fR" 4
|
yading@10
|
1029 .IX Item "-vbsf bitstream_filter"
|
yading@10
|
1030 Deprecated see \-bsf
|
yading@10
|
1031 .IP "\fB\-force_key_frames[:\fR\fIstream_specifier\fR\fB]\fR \fItime\fR\fB[,\fR\fItime\fR\fB...] (\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1032 .IX Item "-force_key_frames[:stream_specifier] time[,time...] (output,per-stream)"
|
yading@10
|
1033 .PD 0
|
yading@10
|
1034 .IP "\fB\-force_key_frames[:\fR\fIstream_specifier\fR\fB] expr:\fR\fIexpr\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1035 .IX Item "-force_key_frames[:stream_specifier] expr:expr (output,per-stream)"
|
yading@10
|
1036 .PD
|
yading@10
|
1037 Force key frames at the specified timestamps, more precisely at the first
|
yading@10
|
1038 frames after each specified time.
|
yading@10
|
1039 .Sp
|
yading@10
|
1040 If the argument is prefixed with \f(CW\*(C`expr:\*(C'\fR, the string \fIexpr\fR
|
yading@10
|
1041 is interpreted like an expression and is evaluated for each frame. A
|
yading@10
|
1042 key frame is forced in case the evaluation is non-zero.
|
yading@10
|
1043 .Sp
|
yading@10
|
1044 If one of the times is "\f(CW\*(C`chapters\*(C'\fR[\fIdelta\fR]", it is expanded into
|
yading@10
|
1045 the time of the beginning of all chapters in the file, shifted by
|
yading@10
|
1046 \&\fIdelta\fR, expressed as a time in seconds.
|
yading@10
|
1047 This option can be useful to ensure that a seek point is present at a
|
yading@10
|
1048 chapter mark or any other designated place in the output file.
|
yading@10
|
1049 .Sp
|
yading@10
|
1050 For example, to insert a key frame at 5 minutes, plus key frames 0.1 second
|
yading@10
|
1051 before the beginning of every chapter:
|
yading@10
|
1052 .Sp
|
yading@10
|
1053 .Vb 1
|
yading@10
|
1054 \& \-force_key_frames 0:05:00,chapters\-0.1
|
yading@10
|
1055 .Ve
|
yading@10
|
1056 .Sp
|
yading@10
|
1057 The expression in \fIexpr\fR can contain the following constants:
|
yading@10
|
1058 .RS 4
|
yading@10
|
1059 .IP "\fBn\fR" 4
|
yading@10
|
1060 .IX Item "n"
|
yading@10
|
1061 the number of current processed frame, starting from 0
|
yading@10
|
1062 .IP "\fBn_forced\fR" 4
|
yading@10
|
1063 .IX Item "n_forced"
|
yading@10
|
1064 the number of forced frames
|
yading@10
|
1065 .IP "\fBprev_forced_n\fR" 4
|
yading@10
|
1066 .IX Item "prev_forced_n"
|
yading@10
|
1067 the number of the previous forced frame, it is \f(CW\*(C`NAN\*(C'\fR when no
|
yading@10
|
1068 keyframe was forced yet
|
yading@10
|
1069 .IP "\fBprev_forced_t\fR" 4
|
yading@10
|
1070 .IX Item "prev_forced_t"
|
yading@10
|
1071 the time of the previous forced frame, it is \f(CW\*(C`NAN\*(C'\fR when no
|
yading@10
|
1072 keyframe was forced yet
|
yading@10
|
1073 .IP "\fBt\fR" 4
|
yading@10
|
1074 .IX Item "t"
|
yading@10
|
1075 the time of the current processed frame
|
yading@10
|
1076 .RE
|
yading@10
|
1077 .RS 4
|
yading@10
|
1078 .Sp
|
yading@10
|
1079 For example to force a key frame every 5 seconds, you can specify:
|
yading@10
|
1080 .Sp
|
yading@10
|
1081 .Vb 1
|
yading@10
|
1082 \& \-force_key_frames expr:gte(t,n_forced*5)
|
yading@10
|
1083 .Ve
|
yading@10
|
1084 .Sp
|
yading@10
|
1085 To force a key frame 5 seconds after the time of the last forced one,
|
yading@10
|
1086 starting from second 13:
|
yading@10
|
1087 .Sp
|
yading@10
|
1088 .Vb 1
|
yading@10
|
1089 \& \-force_key_frames expr:if(isnan(prev_forced_t),gte(t,13),gte(t,prev_forced_t+5))
|
yading@10
|
1090 .Ve
|
yading@10
|
1091 .Sp
|
yading@10
|
1092 Note that forcing too many keyframes is very harmful for the lookahead
|
yading@10
|
1093 algorithms of certain encoders: using fixed-GOP options or similar
|
yading@10
|
1094 would be more efficient.
|
yading@10
|
1095 .RE
|
yading@10
|
1096 .IP "\fB\-copyinkf[:\fR\fIstream_specifier\fR\fB] (\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1097 .IX Item "-copyinkf[:stream_specifier] (output,per-stream)"
|
yading@10
|
1098 When doing stream copy, copy also non-key frames found at the
|
yading@10
|
1099 beginning.
|
yading@10
|
1100 .SS "Audio Options"
|
yading@10
|
1101 .IX Subsection "Audio Options"
|
yading@10
|
1102 .IP "\fB\-aframes\fR \fInumber\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1103 .IX Item "-aframes number (output)"
|
yading@10
|
1104 Set the number of audio frames to record. This is an alias for \f(CW\*(C`\-frames:a\*(C'\fR.
|
yading@10
|
1105 .IP "\fB\-ar[:\fR\fIstream_specifier\fR\fB]\fR \fIfreq\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1106 .IX Item "-ar[:stream_specifier] freq (input/output,per-stream)"
|
yading@10
|
1107 Set the audio sampling frequency. For output streams it is set by
|
yading@10
|
1108 default to the frequency of the corresponding input stream. For input
|
yading@10
|
1109 streams this option only makes sense for audio grabbing devices and raw
|
yading@10
|
1110 demuxers and is mapped to the corresponding demuxer options.
|
yading@10
|
1111 .IP "\fB\-aq\fR \fIq\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1112 .IX Item "-aq q (output)"
|
yading@10
|
1113 Set the audio quality (codec-specific, \s-1VBR\s0). This is an alias for \-q:a.
|
yading@10
|
1114 .IP "\fB\-ac[:\fR\fIstream_specifier\fR\fB]\fR \fIchannels\fR \fB(\fR\fIinput/output,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1115 .IX Item "-ac[:stream_specifier] channels (input/output,per-stream)"
|
yading@10
|
1116 Set the number of audio channels. For output streams it is set by
|
yading@10
|
1117 default to the number of input audio channels. For input streams
|
yading@10
|
1118 this option only makes sense for audio grabbing devices and raw demuxers
|
yading@10
|
1119 and is mapped to the corresponding demuxer options.
|
yading@10
|
1120 .IP "\fB\-an (\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1121 .IX Item "-an (output)"
|
yading@10
|
1122 Disable audio recording.
|
yading@10
|
1123 .IP "\fB\-acodec\fR \fIcodec\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
1124 .IX Item "-acodec codec (input/output)"
|
yading@10
|
1125 Set the audio codec. This is an alias for \f(CW\*(C`\-codec:a\*(C'\fR.
|
yading@10
|
1126 .IP "\fB\-sample_fmt[:\fR\fIstream_specifier\fR\fB]\fR \fIsample_fmt\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1127 .IX Item "-sample_fmt[:stream_specifier] sample_fmt (output,per-stream)"
|
yading@10
|
1128 Set the audio sample format. Use \f(CW\*(C`\-sample_fmts\*(C'\fR to get a list
|
yading@10
|
1129 of supported sample formats.
|
yading@10
|
1130 .IP "\fB\-af\fR \fIfiltergraph\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1131 .IX Item "-af filtergraph (output)"
|
yading@10
|
1132 Create the filtergraph specified by \fIfiltergraph\fR and use it to
|
yading@10
|
1133 filter the stream.
|
yading@10
|
1134 .Sp
|
yading@10
|
1135 This is an alias for \f(CW\*(C`\-filter:a\*(C'\fR, see the \-filter option.
|
yading@10
|
1136 .SS "Advanced Audio options:"
|
yading@10
|
1137 .IX Subsection "Advanced Audio options:"
|
yading@10
|
1138 .IP "\fB\-atag\fR \fIfourcc/tag\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1139 .IX Item "-atag fourcc/tag (output)"
|
yading@10
|
1140 Force audio tag/fourcc. This is an alias for \f(CW\*(C`\-tag:a\*(C'\fR.
|
yading@10
|
1141 .IP "\fB\-absf\fR \fIbitstream_filter\fR" 4
|
yading@10
|
1142 .IX Item "-absf bitstream_filter"
|
yading@10
|
1143 Deprecated, see \-bsf
|
yading@10
|
1144 .IP "\fB\-guess_layout_max\fR \fIchannels\fR \fB(\fR\fIinput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1145 .IX Item "-guess_layout_max channels (input,per-stream)"
|
yading@10
|
1146 If some input channel layout is not known, try to guess only if it
|
yading@10
|
1147 corresponds to at most the specified number of channels. For example, 2
|
yading@10
|
1148 tells to \fBffmpeg\fR to recognize 1 channel as mono and 2 channels as
|
yading@10
|
1149 stereo but not 6 channels as 5.1. The default is to always try to guess. Use
|
yading@10
|
1150 0 to disable all guessing.
|
yading@10
|
1151 .SS "Subtitle options:"
|
yading@10
|
1152 .IX Subsection "Subtitle options:"
|
yading@10
|
1153 .IP "\fB\-slang\fR \fIcode\fR" 4
|
yading@10
|
1154 .IX Item "-slang code"
|
yading@10
|
1155 Set the \s-1ISO\s0 639 language code (3 letters) of the current subtitle stream.
|
yading@10
|
1156 .IP "\fB\-scodec\fR \fIcodec\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
1157 .IX Item "-scodec codec (input/output)"
|
yading@10
|
1158 Set the subtitle codec. This is an alias for \f(CW\*(C`\-codec:s\*(C'\fR.
|
yading@10
|
1159 .IP "\fB\-sn (\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1160 .IX Item "-sn (output)"
|
yading@10
|
1161 Disable subtitle recording.
|
yading@10
|
1162 .IP "\fB\-sbsf\fR \fIbitstream_filter\fR" 4
|
yading@10
|
1163 .IX Item "-sbsf bitstream_filter"
|
yading@10
|
1164 Deprecated, see \-bsf
|
yading@10
|
1165 .SS "Advanced Subtitle options:"
|
yading@10
|
1166 .IX Subsection "Advanced Subtitle options:"
|
yading@10
|
1167 .IP "\fB\-fix_sub_duration\fR" 4
|
yading@10
|
1168 .IX Item "-fix_sub_duration"
|
yading@10
|
1169 Fix subtitles durations. For each subtitle, wait for the next packet in the
|
yading@10
|
1170 same stream and adjust the duration of the first to avoid overlap. This is
|
yading@10
|
1171 necessary with some subtitles codecs, especially \s-1DVB\s0 subtitles, because the
|
yading@10
|
1172 duration in the original packet is only a rough estimate and the end is
|
yading@10
|
1173 actually marked by an empty subtitle frame. Failing to use this option when
|
yading@10
|
1174 necessary can result in exaggerated durations or muxing failures due to
|
yading@10
|
1175 non-monotonic timestamps.
|
yading@10
|
1176 .Sp
|
yading@10
|
1177 Note that this option will delay the output of all data until the next
|
yading@10
|
1178 subtitle packet is decoded: it may increase memory consumption and latency a
|
yading@10
|
1179 lot.
|
yading@10
|
1180 .IP "\fB\-canvas_size\fR \fIsize\fR" 4
|
yading@10
|
1181 .IX Item "-canvas_size size"
|
yading@10
|
1182 Set the size of the canvas used to render subtitles.
|
yading@10
|
1183 .SS "Advanced options"
|
yading@10
|
1184 .IX Subsection "Advanced options"
|
yading@10
|
1185 .IP "\fB\-map [\-]\fR\fIinput_file_id\fR\fB[:\fR\fIstream_specifier\fR\fB][,\fR\fIsync_file_id\fR\fB[:\fR\fIstream_specifier\fR\fB]] |\fR \fI[linklabel]\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1186 .IX Item "-map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]] | [linklabel] (output)"
|
yading@10
|
1187 Designate one or more input streams as a source for the output file. Each input
|
yading@10
|
1188 stream is identified by the input file index \fIinput_file_id\fR and
|
yading@10
|
1189 the input stream index \fIinput_stream_id\fR within the input
|
yading@10
|
1190 file. Both indices start at 0. If specified,
|
yading@10
|
1191 \&\fIsync_file_id\fR:\fIstream_specifier\fR sets which input stream
|
yading@10
|
1192 is used as a presentation sync reference.
|
yading@10
|
1193 .Sp
|
yading@10
|
1194 The first \f(CW\*(C`\-map\*(C'\fR option on the command line specifies the
|
yading@10
|
1195 source for output stream 0, the second \f(CW\*(C`\-map\*(C'\fR option specifies
|
yading@10
|
1196 the source for output stream 1, etc.
|
yading@10
|
1197 .Sp
|
yading@10
|
1198 A \f(CW\*(C`\-\*(C'\fR character before the stream identifier creates a \*(L"negative\*(R" mapping.
|
yading@10
|
1199 It disables matching streams from already created mappings.
|
yading@10
|
1200 .Sp
|
yading@10
|
1201 An alternative \fI[linklabel]\fR form will map outputs from complex filter
|
yading@10
|
1202 graphs (see the \fB\-filter_complex\fR option) to the output file.
|
yading@10
|
1203 \&\fIlinklabel\fR must correspond to a defined output link label in the graph.
|
yading@10
|
1204 .Sp
|
yading@10
|
1205 For example, to map \s-1ALL\s0 streams from the first input file to output
|
yading@10
|
1206 .Sp
|
yading@10
|
1207 .Vb 1
|
yading@10
|
1208 \& ffmpeg \-i INPUT \-map 0 output
|
yading@10
|
1209 .Ve
|
yading@10
|
1210 .Sp
|
yading@10
|
1211 For example, if you have two audio streams in the first input file,
|
yading@10
|
1212 these streams are identified by \*(L"0:0\*(R" and \*(L"0:1\*(R". You can use
|
yading@10
|
1213 \&\f(CW\*(C`\-map\*(C'\fR to select which streams to place in an output file. For
|
yading@10
|
1214 example:
|
yading@10
|
1215 .Sp
|
yading@10
|
1216 .Vb 1
|
yading@10
|
1217 \& ffmpeg \-i INPUT \-map 0:1 out.wav
|
yading@10
|
1218 .Ve
|
yading@10
|
1219 .Sp
|
yading@10
|
1220 will map the input stream in \fI\s-1INPUT\s0\fR identified by \*(L"0:1\*(R" to
|
yading@10
|
1221 the (single) output stream in \fIout.wav\fR.
|
yading@10
|
1222 .Sp
|
yading@10
|
1223 For example, to select the stream with index 2 from input file
|
yading@10
|
1224 \&\fIa.mov\fR (specified by the identifier \*(L"0:2\*(R"), and stream with
|
yading@10
|
1225 index 6 from input \fIb.mov\fR (specified by the identifier \*(L"1:6\*(R"),
|
yading@10
|
1226 and copy them to the output file \fIout.mov\fR:
|
yading@10
|
1227 .Sp
|
yading@10
|
1228 .Vb 1
|
yading@10
|
1229 \& ffmpeg \-i a.mov \-i b.mov \-c copy \-map 0:2 \-map 1:6 out.mov
|
yading@10
|
1230 .Ve
|
yading@10
|
1231 .Sp
|
yading@10
|
1232 To select all video and the third audio stream from an input file:
|
yading@10
|
1233 .Sp
|
yading@10
|
1234 .Vb 1
|
yading@10
|
1235 \& ffmpeg \-i INPUT \-map 0:v \-map 0:a:2 OUTPUT
|
yading@10
|
1236 .Ve
|
yading@10
|
1237 .Sp
|
yading@10
|
1238 To map all the streams except the second audio, use negative mappings
|
yading@10
|
1239 .Sp
|
yading@10
|
1240 .Vb 1
|
yading@10
|
1241 \& ffmpeg \-i INPUT \-map 0 \-map \-0:a:1 OUTPUT
|
yading@10
|
1242 .Ve
|
yading@10
|
1243 .Sp
|
yading@10
|
1244 Note that using this option disables the default mappings for this output file.
|
yading@10
|
1245 .IP "\fB\-map_channel [\fR\fIinput_file_id\fR\fB.\fR\fIstream_specifier\fR\fB.\fR\fIchannel_id\fR\fB|\-1][:\fR\fIoutput_file_id\fR\fB.\fR\fIstream_specifier\fR\fB]\fR" 4
|
yading@10
|
1246 .IX Item "-map_channel [input_file_id.stream_specifier.channel_id|-1][:output_file_id.stream_specifier]"
|
yading@10
|
1247 Map an audio channel from a given input to an output. If
|
yading@10
|
1248 \&\fIoutput_file_id\fR.\fIstream_specifier\fR is not set, the audio channel will
|
yading@10
|
1249 be mapped on all the audio streams.
|
yading@10
|
1250 .Sp
|
yading@10
|
1251 Using \*(L"\-1\*(R" instead of
|
yading@10
|
1252 \&\fIinput_file_id\fR.\fIstream_specifier\fR.\fIchannel_id\fR will map a muted
|
yading@10
|
1253 channel.
|
yading@10
|
1254 .Sp
|
yading@10
|
1255 For example, assuming \fI\s-1INPUT\s0\fR is a stereo audio file, you can switch the
|
yading@10
|
1256 two audio channels with the following command:
|
yading@10
|
1257 .Sp
|
yading@10
|
1258 .Vb 1
|
yading@10
|
1259 \& ffmpeg \-i INPUT \-map_channel 0.0.1 \-map_channel 0.0.0 OUTPUT
|
yading@10
|
1260 .Ve
|
yading@10
|
1261 .Sp
|
yading@10
|
1262 If you want to mute the first channel and keep the second:
|
yading@10
|
1263 .Sp
|
yading@10
|
1264 .Vb 1
|
yading@10
|
1265 \& ffmpeg \-i INPUT \-map_channel \-1 \-map_channel 0.0.1 OUTPUT
|
yading@10
|
1266 .Ve
|
yading@10
|
1267 .Sp
|
yading@10
|
1268 The order of the \*(L"\-map_channel\*(R" option specifies the order of the channels in
|
yading@10
|
1269 the output stream. The output channel layout is guessed from the number of
|
yading@10
|
1270 channels mapped (mono if one \*(L"\-map_channel\*(R", stereo if two, etc.). Using \*(L"\-ac\*(R"
|
yading@10
|
1271 in combination of \*(L"\-map_channel\*(R" makes the channel gain levels to be updated if
|
yading@10
|
1272 input and output channel layouts don't match (for instance two \*(L"\-map_channel\*(R"
|
yading@10
|
1273 options and \*(L"\-ac 6\*(R").
|
yading@10
|
1274 .Sp
|
yading@10
|
1275 You can also extract each channel of an input to specific outputs; the following
|
yading@10
|
1276 command extracts two channels of the \fI\s-1INPUT\s0\fR audio stream (file 0, stream 0)
|
yading@10
|
1277 to the respective \fI\s-1OUTPUT_CH0\s0\fR and \fI\s-1OUTPUT_CH1\s0\fR outputs:
|
yading@10
|
1278 .Sp
|
yading@10
|
1279 .Vb 1
|
yading@10
|
1280 \& ffmpeg \-i INPUT \-map_channel 0.0.0 OUTPUT_CH0 \-map_channel 0.0.1 OUTPUT_CH1
|
yading@10
|
1281 .Ve
|
yading@10
|
1282 .Sp
|
yading@10
|
1283 The following example splits the channels of a stereo input into two separate
|
yading@10
|
1284 streams, which are put into the same output file:
|
yading@10
|
1285 .Sp
|
yading@10
|
1286 .Vb 1
|
yading@10
|
1287 \& 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
|
yading@10
|
1288 .Ve
|
yading@10
|
1289 .Sp
|
yading@10
|
1290 Note that currently each output stream can only contain channels from a single
|
yading@10
|
1291 input stream; you can't for example use \*(L"\-map_channel\*(R" to pick multiple input
|
yading@10
|
1292 audio channels contained in different streams (from the same or different files)
|
yading@10
|
1293 and merge them into a single output stream. It is therefore not currently
|
yading@10
|
1294 possible, for example, to turn two separate mono streams into a single stereo
|
yading@10
|
1295 stream. However splitting a stereo stream into two single channel mono streams
|
yading@10
|
1296 is possible.
|
yading@10
|
1297 .Sp
|
yading@10
|
1298 If you need this feature, a possible workaround is to use the \fIamerge\fR
|
yading@10
|
1299 filter. For example, if you need to merge a media (here \fIinput.mkv\fR) with 2
|
yading@10
|
1300 mono audio streams into one single stereo channel audio stream (and keep the
|
yading@10
|
1301 video stream), you can use the following command:
|
yading@10
|
1302 .Sp
|
yading@10
|
1303 .Vb 1
|
yading@10
|
1304 \& ffmpeg \-i input.mkv \-filter_complex "[0:1] [0:2] amerge" \-c:a pcm_s16le \-c:v copy output.mkv
|
yading@10
|
1305 .Ve
|
yading@10
|
1306 .IP "\fB\-map_metadata[:\fR\fImetadata_spec_out\fR\fB]\fR \fIinfile\fR\fB[:\fR\fImetadata_spec_in\fR\fB] (\fR\fIoutput,per\-metadata\fR\fB)\fR" 4
|
yading@10
|
1307 .IX Item "-map_metadata[:metadata_spec_out] infile[:metadata_spec_in] (output,per-metadata)"
|
yading@10
|
1308 Set metadata information of the next output file from \fIinfile\fR. Note that
|
yading@10
|
1309 those are file indices (zero-based), not filenames.
|
yading@10
|
1310 Optional \fImetadata_spec_in/out\fR parameters specify, which metadata to copy.
|
yading@10
|
1311 A metadata specifier can have the following forms:
|
yading@10
|
1312 .RS 4
|
yading@10
|
1313 .IP "\fIg\fR" 4
|
yading@10
|
1314 .IX Item "g"
|
yading@10
|
1315 global metadata, i.e. metadata that applies to the whole file
|
yading@10
|
1316 .IP "\fIs\fR\fB[:\fR\fIstream_spec\fR\fB]\fR" 4
|
yading@10
|
1317 .IX Item "s[:stream_spec]"
|
yading@10
|
1318 per-stream metadata. \fIstream_spec\fR is a stream specifier as described
|
yading@10
|
1319 in the Stream specifiers chapter. In an input metadata specifier, the first
|
yading@10
|
1320 matching stream is copied from. In an output metadata specifier, all matching
|
yading@10
|
1321 streams are copied to.
|
yading@10
|
1322 .IP "\fIc\fR\fB:\fR\fIchapter_index\fR" 4
|
yading@10
|
1323 .IX Item "c:chapter_index"
|
yading@10
|
1324 per-chapter metadata. \fIchapter_index\fR is the zero-based chapter index.
|
yading@10
|
1325 .IP "\fIp\fR\fB:\fR\fIprogram_index\fR" 4
|
yading@10
|
1326 .IX Item "p:program_index"
|
yading@10
|
1327 per-program metadata. \fIprogram_index\fR is the zero-based program index.
|
yading@10
|
1328 .RE
|
yading@10
|
1329 .RS 4
|
yading@10
|
1330 .Sp
|
yading@10
|
1331 If metadata specifier is omitted, it defaults to global.
|
yading@10
|
1332 .Sp
|
yading@10
|
1333 By default, global metadata is copied from the first input file,
|
yading@10
|
1334 per-stream and per-chapter metadata is copied along with streams/chapters. These
|
yading@10
|
1335 default mappings are disabled by creating any mapping of the relevant type. A negative
|
yading@10
|
1336 file index can be used to create a dummy mapping that just disables automatic copying.
|
yading@10
|
1337 .Sp
|
yading@10
|
1338 For example to copy metadata from the first stream of the input file to global metadata
|
yading@10
|
1339 of the output file:
|
yading@10
|
1340 .Sp
|
yading@10
|
1341 .Vb 1
|
yading@10
|
1342 \& ffmpeg \-i in.ogg \-map_metadata 0:s:0 out.mp3
|
yading@10
|
1343 .Ve
|
yading@10
|
1344 .Sp
|
yading@10
|
1345 To do the reverse, i.e. copy global metadata to all audio streams:
|
yading@10
|
1346 .Sp
|
yading@10
|
1347 .Vb 1
|
yading@10
|
1348 \& ffmpeg \-i in.mkv \-map_metadata:s:a 0:g out.mkv
|
yading@10
|
1349 .Ve
|
yading@10
|
1350 .Sp
|
yading@10
|
1351 Note that simple \f(CW0\fR would work as well in this example, since global
|
yading@10
|
1352 metadata is assumed by default.
|
yading@10
|
1353 .RE
|
yading@10
|
1354 .IP "\fB\-map_chapters\fR \fIinput_file_index\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1355 .IX Item "-map_chapters input_file_index (output)"
|
yading@10
|
1356 Copy chapters from input file with index \fIinput_file_index\fR to the next
|
yading@10
|
1357 output file. If no chapter mapping is specified, then chapters are copied from
|
yading@10
|
1358 the first input file with at least one chapter. Use a negative file index to
|
yading@10
|
1359 disable any chapter copying.
|
yading@10
|
1360 .IP "\fB\-benchmark (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1361 .IX Item "-benchmark (global)"
|
yading@10
|
1362 Show benchmarking information at the end of an encode.
|
yading@10
|
1363 Shows \s-1CPU\s0 time used and maximum memory consumption.
|
yading@10
|
1364 Maximum memory consumption is not supported on all systems,
|
yading@10
|
1365 it will usually display as 0 if not supported.
|
yading@10
|
1366 .IP "\fB\-benchmark_all (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1367 .IX Item "-benchmark_all (global)"
|
yading@10
|
1368 Show benchmarking information during the encode.
|
yading@10
|
1369 Shows \s-1CPU\s0 time used in various steps (audio/video encode/decode).
|
yading@10
|
1370 .IP "\fB\-timelimit\fR \fIduration\fR \fB(\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1371 .IX Item "-timelimit duration (global)"
|
yading@10
|
1372 Exit after ffmpeg has been running for \fIduration\fR seconds.
|
yading@10
|
1373 .IP "\fB\-dump (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1374 .IX Item "-dump (global)"
|
yading@10
|
1375 Dump each input packet to stderr.
|
yading@10
|
1376 .IP "\fB\-hex (\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1377 .IX Item "-hex (global)"
|
yading@10
|
1378 When dumping packets, also dump the payload.
|
yading@10
|
1379 .IP "\fB\-re (\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
1380 .IX Item "-re (input)"
|
yading@10
|
1381 Read input at native frame rate. Mainly used to simulate a grab device.
|
yading@10
|
1382 By default \fBffmpeg\fR attempts to read the input(s) as fast as possible.
|
yading@10
|
1383 This option will slow down the reading of the input(s) to the native frame rate
|
yading@10
|
1384 of the input(s). It is useful for real-time output (e.g. live streaming). If
|
yading@10
|
1385 your input(s) is coming from some other live streaming source (through \s-1HTTP\s0 or
|
yading@10
|
1386 \&\s-1UDP\s0 for example) the server might already be in real-time, thus the option will
|
yading@10
|
1387 likely not be required. On the other hand, this is meaningful if your input(s)
|
yading@10
|
1388 is a file you are trying to push in real-time.
|
yading@10
|
1389 .IP "\fB\-loop_input\fR" 4
|
yading@10
|
1390 .IX Item "-loop_input"
|
yading@10
|
1391 Loop over the input stream. Currently it works only for image
|
yading@10
|
1392 streams. This option is used for automatic FFserver testing.
|
yading@10
|
1393 This option is deprecated, use \-loop 1.
|
yading@10
|
1394 .IP "\fB\-loop_output\fR \fInumber_of_times\fR" 4
|
yading@10
|
1395 .IX Item "-loop_output number_of_times"
|
yading@10
|
1396 Repeatedly loop output for formats that support looping such as animated \s-1GIF\s0
|
yading@10
|
1397 (0 will loop the output infinitely).
|
yading@10
|
1398 This option is deprecated, use \-loop.
|
yading@10
|
1399 .IP "\fB\-vsync\fR \fIparameter\fR" 4
|
yading@10
|
1400 .IX Item "-vsync parameter"
|
yading@10
|
1401 Video sync method.
|
yading@10
|
1402 For compatibility reasons old values can be specified as numbers.
|
yading@10
|
1403 Newly added values will have to be specified as strings always.
|
yading@10
|
1404 .RS 4
|
yading@10
|
1405 .IP "\fB0, passthrough\fR" 4
|
yading@10
|
1406 .IX Item "0, passthrough"
|
yading@10
|
1407 Each frame is passed with its timestamp from the demuxer to the muxer.
|
yading@10
|
1408 .IP "\fB1, cfr\fR" 4
|
yading@10
|
1409 .IX Item "1, cfr"
|
yading@10
|
1410 Frames will be duplicated and dropped to achieve exactly the requested
|
yading@10
|
1411 constant frame rate.
|
yading@10
|
1412 .IP "\fB2, vfr\fR" 4
|
yading@10
|
1413 .IX Item "2, vfr"
|
yading@10
|
1414 Frames are passed through with their timestamp or dropped so as to
|
yading@10
|
1415 prevent 2 frames from having the same timestamp.
|
yading@10
|
1416 .IP "\fBdrop\fR" 4
|
yading@10
|
1417 .IX Item "drop"
|
yading@10
|
1418 As passthrough but destroys all timestamps, making the muxer generate
|
yading@10
|
1419 fresh timestamps based on frame-rate.
|
yading@10
|
1420 .IP "\fB\-1, auto\fR" 4
|
yading@10
|
1421 .IX Item "-1, auto"
|
yading@10
|
1422 Chooses between 1 and 2 depending on muxer capabilities. This is the
|
yading@10
|
1423 default method.
|
yading@10
|
1424 .RE
|
yading@10
|
1425 .RS 4
|
yading@10
|
1426 .Sp
|
yading@10
|
1427 Note that the timestamps may be further modified by the muxer, after this.
|
yading@10
|
1428 For example, in the case that the format option \fBavoid_negative_ts\fR
|
yading@10
|
1429 is enabled.
|
yading@10
|
1430 .Sp
|
yading@10
|
1431 With \-map you can select from which stream the timestamps should be
|
yading@10
|
1432 taken. You can leave either video or audio unchanged and sync the
|
yading@10
|
1433 remaining stream(s) to the unchanged one.
|
yading@10
|
1434 .RE
|
yading@10
|
1435 .IP "\fB\-async\fR \fIsamples_per_second\fR" 4
|
yading@10
|
1436 .IX Item "-async samples_per_second"
|
yading@10
|
1437 Audio sync method. \*(L"Stretches/squeezes\*(R" the audio stream to match the timestamps,
|
yading@10
|
1438 the parameter is the maximum samples per second by which the audio is changed.
|
yading@10
|
1439 \&\-async 1 is a special case where only the start of the audio stream is corrected
|
yading@10
|
1440 without any later correction.
|
yading@10
|
1441 .Sp
|
yading@10
|
1442 Note that the timestamps may be further modified by the muxer, after this.
|
yading@10
|
1443 For example, in the case that the format option \fBavoid_negative_ts\fR
|
yading@10
|
1444 is enabled.
|
yading@10
|
1445 .Sp
|
yading@10
|
1446 This option has been deprecated. Use the \f(CW\*(C`aresample\*(C'\fR audio filter instead.
|
yading@10
|
1447 .IP "\fB\-copyts\fR" 4
|
yading@10
|
1448 .IX Item "-copyts"
|
yading@10
|
1449 Do not process input timestamps, but keep their values without trying
|
yading@10
|
1450 to sanitize them. In particular, do not remove the initial start time
|
yading@10
|
1451 offset value.
|
yading@10
|
1452 .Sp
|
yading@10
|
1453 Note that, depending on the \fBvsync\fR option or on specific muxer
|
yading@10
|
1454 processing (e.g. in case the format option \fBavoid_negative_ts\fR
|
yading@10
|
1455 is enabled) the output timestamps may mismatch with the input
|
yading@10
|
1456 timestamps even when this option is selected.
|
yading@10
|
1457 .IP "\fB\-copytb\fR \fImode\fR" 4
|
yading@10
|
1458 .IX Item "-copytb mode"
|
yading@10
|
1459 Specify how to set the encoder timebase when stream copying. \fImode\fR is an
|
yading@10
|
1460 integer numeric value, and can assume one of the following values:
|
yading@10
|
1461 .RS 4
|
yading@10
|
1462 .IP "\fB1\fR" 4
|
yading@10
|
1463 .IX Item "1"
|
yading@10
|
1464 Use the demuxer timebase.
|
yading@10
|
1465 .Sp
|
yading@10
|
1466 The time base is copied to the output encoder from the corresponding input
|
yading@10
|
1467 demuxer. This is sometimes required to avoid non monotonically increasing
|
yading@10
|
1468 timestamps when copying video streams with variable frame rate.
|
yading@10
|
1469 .IP "\fB0\fR" 4
|
yading@10
|
1470 .IX Item "0"
|
yading@10
|
1471 Use the decoder timebase.
|
yading@10
|
1472 .Sp
|
yading@10
|
1473 The time base is copied to the output encoder from the corresponding input
|
yading@10
|
1474 decoder.
|
yading@10
|
1475 .IP "\fB\-1\fR" 4
|
yading@10
|
1476 .IX Item "-1"
|
yading@10
|
1477 Try to make the choice automatically, in order to generate a sane output.
|
yading@10
|
1478 .RE
|
yading@10
|
1479 .RS 4
|
yading@10
|
1480 .Sp
|
yading@10
|
1481 Default value is \-1.
|
yading@10
|
1482 .RE
|
yading@10
|
1483 .IP "\fB\-shortest (\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1484 .IX Item "-shortest (output)"
|
yading@10
|
1485 Finish encoding when the shortest input stream ends.
|
yading@10
|
1486 .IP "\fB\-dts_delta_threshold\fR" 4
|
yading@10
|
1487 .IX Item "-dts_delta_threshold"
|
yading@10
|
1488 Timestamp discontinuity delta threshold.
|
yading@10
|
1489 .IP "\fB\-muxdelay\fR \fIseconds\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
1490 .IX Item "-muxdelay seconds (input)"
|
yading@10
|
1491 Set the maximum demux-decode delay.
|
yading@10
|
1492 .IP "\fB\-muxpreload\fR \fIseconds\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
1493 .IX Item "-muxpreload seconds (input)"
|
yading@10
|
1494 Set the initial demux-decode delay.
|
yading@10
|
1495 .IP "\fB\-streamid\fR \fIoutput-stream-index\fR\fB:\fR\fInew-value\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
1496 .IX Item "-streamid output-stream-index:new-value (output)"
|
yading@10
|
1497 Assign a new stream-id value to an output stream. This option should be
|
yading@10
|
1498 specified prior to the output filename to which it applies.
|
yading@10
|
1499 For the situation where multiple output files exist, a streamid
|
yading@10
|
1500 may be reassigned to a different value.
|
yading@10
|
1501 .Sp
|
yading@10
|
1502 For example, to set the stream 0 \s-1PID\s0 to 33 and the stream 1 \s-1PID\s0 to 36 for
|
yading@10
|
1503 an output mpegts file:
|
yading@10
|
1504 .Sp
|
yading@10
|
1505 .Vb 1
|
yading@10
|
1506 \& ffmpeg \-i infile \-streamid 0:33 \-streamid 1:36 out.ts
|
yading@10
|
1507 .Ve
|
yading@10
|
1508 .IP "\fB\-bsf[:\fR\fIstream_specifier\fR\fB]\fR \fIbitstream_filters\fR \fB(\fR\fIoutput,per\-stream\fR\fB)\fR" 4
|
yading@10
|
1509 .IX Item "-bsf[:stream_specifier] bitstream_filters (output,per-stream)"
|
yading@10
|
1510 Set bitstream filters for matching streams. \fIbitstream_filters\fR is
|
yading@10
|
1511 a comma-separated list of bitstream filters. Use the \f(CW\*(C`\-bsfs\*(C'\fR option
|
yading@10
|
1512 to get the list of bitstream filters.
|
yading@10
|
1513 .Sp
|
yading@10
|
1514 .Vb 1
|
yading@10
|
1515 \& ffmpeg \-i h264.mp4 \-c:v copy \-bsf:v h264_mp4toannexb \-an out.h264
|
yading@10
|
1516 \&
|
yading@10
|
1517 \&
|
yading@10
|
1518 \& ffmpeg \-i file.mov \-an \-vn \-bsf:s mov2textsub \-c:s copy \-f rawvideo sub.txt
|
yading@10
|
1519 .Ve
|
yading@10
|
1520 .IP "\fB\-tag[:\fR\fIstream_specifier\fR\fB]\fR \fIcodec_tag\fR \fB(\fR\fIper-stream\fR\fB)\fR" 4
|
yading@10
|
1521 .IX Item "-tag[:stream_specifier] codec_tag (per-stream)"
|
yading@10
|
1522 Force a tag/fourcc for matching streams.
|
yading@10
|
1523 .IP "\fB\-timecode\fR \fIhh\fR\fB:\fR\fImm\fR\fB:\fR\fIss\fR\fB\s-1SEP\s0\fR\fIff\fR" 4
|
yading@10
|
1524 .IX Item "-timecode hh:mm:ssSEPff"
|
yading@10
|
1525 Specify Timecode for writing. \fI\s-1SEP\s0\fR is ':' for non drop timecode and ';'
|
yading@10
|
1526 (or '.') for drop.
|
yading@10
|
1527 .Sp
|
yading@10
|
1528 .Vb 1
|
yading@10
|
1529 \& ffmpeg \-i input.mpg \-timecode 01:02:03.04 \-r 30000/1001 \-s ntsc output.mpg
|
yading@10
|
1530 .Ve
|
yading@10
|
1531 .IP "\fB\-filter_complex\fR \fIfiltergraph\fR \fB(\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1532 .IX Item "-filter_complex filtergraph (global)"
|
yading@10
|
1533 Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or
|
yading@10
|
1534 outputs. For simple graphs \*(-- those with one input and one output of the same
|
yading@10
|
1535 type \*(-- see the \fB\-filter\fR options. \fIfiltergraph\fR is a description of
|
yading@10
|
1536 the filtergraph, as described in the ``Filtergraph syntax'' section of the
|
yading@10
|
1537 ffmpeg-filters manual.
|
yading@10
|
1538 .Sp
|
yading@10
|
1539 Input link labels must refer to input streams using the
|
yading@10
|
1540 \&\f(CW\*(C`[file_index:stream_specifier]\*(C'\fR syntax (i.e. the same as \fB\-map\fR
|
yading@10
|
1541 uses). If \fIstream_specifier\fR matches multiple streams, the first one will be
|
yading@10
|
1542 used. An unlabeled input will be connected to the first unused input stream of
|
yading@10
|
1543 the matching type.
|
yading@10
|
1544 .Sp
|
yading@10
|
1545 Output link labels are referred to with \fB\-map\fR. Unlabeled outputs are
|
yading@10
|
1546 added to the first output file.
|
yading@10
|
1547 .Sp
|
yading@10
|
1548 Note that with this option it is possible to use only lavfi sources without
|
yading@10
|
1549 normal input files.
|
yading@10
|
1550 .Sp
|
yading@10
|
1551 For example, to overlay an image over video
|
yading@10
|
1552 .Sp
|
yading@10
|
1553 .Vb 2
|
yading@10
|
1554 \& ffmpeg \-i video.mkv \-i image.png \-filter_complex \*(Aq[0:v][1:v]overlay[out]\*(Aq \-map
|
yading@10
|
1555 \& \*(Aq[out]\*(Aq out.mkv
|
yading@10
|
1556 .Ve
|
yading@10
|
1557 .Sp
|
yading@10
|
1558 Here \f(CW\*(C`[0:v]\*(C'\fR refers to the first video stream in the first input file,
|
yading@10
|
1559 which is linked to the first (main) input of the overlay filter. Similarly the
|
yading@10
|
1560 first video stream in the second input is linked to the second (overlay) input
|
yading@10
|
1561 of overlay.
|
yading@10
|
1562 .Sp
|
yading@10
|
1563 Assuming there is only one video stream in each input file, we can omit input
|
yading@10
|
1564 labels, so the above is equivalent to
|
yading@10
|
1565 .Sp
|
yading@10
|
1566 .Vb 2
|
yading@10
|
1567 \& ffmpeg \-i video.mkv \-i image.png \-filter_complex \*(Aqoverlay[out]\*(Aq \-map
|
yading@10
|
1568 \& \*(Aq[out]\*(Aq out.mkv
|
yading@10
|
1569 .Ve
|
yading@10
|
1570 .Sp
|
yading@10
|
1571 Furthermore we can omit the output label and the single output from the filter
|
yading@10
|
1572 graph will be added to the output file automatically, so we can simply write
|
yading@10
|
1573 .Sp
|
yading@10
|
1574 .Vb 1
|
yading@10
|
1575 \& ffmpeg \-i video.mkv \-i image.png \-filter_complex \*(Aqoverlay\*(Aq out.mkv
|
yading@10
|
1576 .Ve
|
yading@10
|
1577 .Sp
|
yading@10
|
1578 To generate 5 seconds of pure red video using lavfi \f(CW\*(C`color\*(C'\fR source:
|
yading@10
|
1579 .Sp
|
yading@10
|
1580 .Vb 1
|
yading@10
|
1581 \& ffmpeg \-filter_complex \*(Aqcolor=c=red\*(Aq \-t 5 out.mkv
|
yading@10
|
1582 .Ve
|
yading@10
|
1583 .IP "\fB\-lavfi\fR \fIfiltergraph\fR \fB(\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1584 .IX Item "-lavfi filtergraph (global)"
|
yading@10
|
1585 Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or
|
yading@10
|
1586 outputs. Equivalent to \fB\-filter_complex\fR.
|
yading@10
|
1587 .IP "\fB\-filter_complex_script\fR \fIfilename\fR \fB(\fR\fIglobal\fR\fB)\fR" 4
|
yading@10
|
1588 .IX Item "-filter_complex_script filename (global)"
|
yading@10
|
1589 This option is similar to \fB\-filter_complex\fR, the only difference is that
|
yading@10
|
1590 its argument is the name of the file from which a complex filtergraph
|
yading@10
|
1591 description is to be read.
|
yading@10
|
1592 .PP
|
yading@10
|
1593 As a special exception, you can use a bitmap subtitle stream as input: it
|
yading@10
|
1594 will be converted into a video with the same size as the largest video in
|
yading@10
|
1595 the file, or 720x576 if no video is present. Note that this is an
|
yading@10
|
1596 experimental and temporary solution. It will be removed once libavfilter has
|
yading@10
|
1597 proper support for subtitles.
|
yading@10
|
1598 .PP
|
yading@10
|
1599 For example, to hardcode subtitles on top of a DVB-T recording stored in
|
yading@10
|
1600 MPEG-TS format, delaying the subtitles by 1 second:
|
yading@10
|
1601 .PP
|
yading@10
|
1602 .Vb 3
|
yading@10
|
1603 \& ffmpeg \-i input.ts \-filter_complex \e
|
yading@10
|
1604 \& \*(Aq[#0x2ef] setpts=PTS+1/TB [sub] ; [#0x2d0] [sub] overlay\*(Aq \e
|
yading@10
|
1605 \& \-sn \-map \*(Aq#0x2dc\*(Aq output.mkv
|
yading@10
|
1606 .Ve
|
yading@10
|
1607 .PP
|
yading@10
|
1608 (0x2d0, 0x2dc and 0x2ef are the MPEG-TS PIDs of respectively the video,
|
yading@10
|
1609 audio and subtitles streams; 0:0, 0:3 and 0:7 would have worked too)
|
yading@10
|
1610 .SS "Preset files"
|
yading@10
|
1611 .IX Subsection "Preset files"
|
yading@10
|
1612 A preset file contains a sequence of \fIoption\fR=\fIvalue\fR pairs,
|
yading@10
|
1613 one for each line, specifying a sequence of options which would be
|
yading@10
|
1614 awkward to specify on the command line. Lines starting with the hash
|
yading@10
|
1615 ('#') character are ignored and are used to provide comments. Check
|
yading@10
|
1616 the \fIpresets\fR directory in the FFmpeg source tree for examples.
|
yading@10
|
1617 .PP
|
yading@10
|
1618 Preset files are specified with the \f(CW\*(C`vpre\*(C'\fR, \f(CW\*(C`apre\*(C'\fR,
|
yading@10
|
1619 \&\f(CW\*(C`spre\*(C'\fR, and \f(CW\*(C`fpre\*(C'\fR options. The \f(CW\*(C`fpre\*(C'\fR option takes the
|
yading@10
|
1620 filename of the preset instead of a preset name as input and can be
|
yading@10
|
1621 used for any kind of codec. For the \f(CW\*(C`vpre\*(C'\fR, \f(CW\*(C`apre\*(C'\fR, and
|
yading@10
|
1622 \&\f(CW\*(C`spre\*(C'\fR options, the options specified in a preset file are
|
yading@10
|
1623 applied to the currently selected codec of the same type as the preset
|
yading@10
|
1624 option.
|
yading@10
|
1625 .PP
|
yading@10
|
1626 The argument passed to the \f(CW\*(C`vpre\*(C'\fR, \f(CW\*(C`apre\*(C'\fR, and \f(CW\*(C`spre\*(C'\fR
|
yading@10
|
1627 preset options identifies the preset file to use according to the
|
yading@10
|
1628 following rules:
|
yading@10
|
1629 .PP
|
yading@10
|
1630 First ffmpeg searches for a file named \fIarg\fR.ffpreset in the
|
yading@10
|
1631 directories \fI\f(CI$FFMPEG_DATADIR\fI\fR (if set), and \fI\f(CI$HOME\fI/.ffmpeg\fR, and in
|
yading@10
|
1632 the datadir defined at configuration time (usually \fIPREFIX/share/ffmpeg\fR)
|
yading@10
|
1633 or in a \fIffpresets\fR folder along the executable on win32,
|
yading@10
|
1634 in that order. For example, if the argument is \f(CW\*(C`libvpx\-1080p\*(C'\fR, it will
|
yading@10
|
1635 search for the file \fIlibvpx\-1080p.ffpreset\fR.
|
yading@10
|
1636 .PP
|
yading@10
|
1637 If no such file is found, then ffmpeg will search for a file named
|
yading@10
|
1638 \&\fIcodec_name\fR\-\fIarg\fR.ffpreset in the above-mentioned
|
yading@10
|
1639 directories, where \fIcodec_name\fR is the name of the codec to which
|
yading@10
|
1640 the preset file options will be applied. For example, if you select
|
yading@10
|
1641 the video codec with \f(CW\*(C`\-vcodec libvpx\*(C'\fR and use \f(CW\*(C`\-vpre 1080p\*(C'\fR,
|
yading@10
|
1642 then it will search for the file \fIlibvpx\-1080p.ffpreset\fR.
|
yading@10
|
1643 .SH "TIPS"
|
yading@10
|
1644 .IX Header "TIPS"
|
yading@10
|
1645 .IP "\(bu" 4
|
yading@10
|
1646 For streaming at very low bitrate application, use a low frame rate
|
yading@10
|
1647 and a small \s-1GOP\s0 size. This is especially true for RealVideo where
|
yading@10
|
1648 the Linux player does not seem to be very fast, so it can miss
|
yading@10
|
1649 frames. An example is:
|
yading@10
|
1650 .Sp
|
yading@10
|
1651 .Vb 1
|
yading@10
|
1652 \& ffmpeg \-g 3 \-r 3 \-t 10 \-b:v 50k \-s qcif \-f rv10 /tmp/b.rm
|
yading@10
|
1653 .Ve
|
yading@10
|
1654 .IP "\(bu" 4
|
yading@10
|
1655 The parameter 'q' which is displayed while encoding is the current
|
yading@10
|
1656 quantizer. The value 1 indicates that a very good quality could
|
yading@10
|
1657 be achieved. The value 31 indicates the worst quality. If q=31 appears
|
yading@10
|
1658 too often, it means that the encoder cannot compress enough to meet
|
yading@10
|
1659 your bitrate. You must either increase the bitrate, decrease the
|
yading@10
|
1660 frame rate or decrease the frame size.
|
yading@10
|
1661 .IP "\(bu" 4
|
yading@10
|
1662 If your computer is not fast enough, you can speed up the
|
yading@10
|
1663 compression at the expense of the compression ratio. You can use
|
yading@10
|
1664 \&'\-me zero' to speed up motion estimation, and '\-g 0' to disable
|
yading@10
|
1665 motion estimation completely (you have only I\-frames, which means it
|
yading@10
|
1666 is about as good as \s-1JPEG\s0 compression).
|
yading@10
|
1667 .IP "\(bu" 4
|
yading@10
|
1668 To have very low audio bitrates, reduce the sampling frequency
|
yading@10
|
1669 (down to 22050 Hz for \s-1MPEG\s0 audio, 22050 or 11025 for \s-1AC\-3\s0).
|
yading@10
|
1670 .IP "\(bu" 4
|
yading@10
|
1671 To have a constant quality (but a variable bitrate), use the option
|
yading@10
|
1672 \&'\-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
|
yading@10
|
1673 quality).
|
yading@10
|
1674 .SH "EXAMPLES"
|
yading@10
|
1675 .IX Header "EXAMPLES"
|
yading@10
|
1676 .SS "Preset files"
|
yading@10
|
1677 .IX Subsection "Preset files"
|
yading@10
|
1678 A preset file contains a sequence of \fIoption=value\fR pairs, one for
|
yading@10
|
1679 each line, specifying a sequence of options which can be specified also on
|
yading@10
|
1680 the command line. Lines starting with the hash ('#') character are ignored and
|
yading@10
|
1681 are used to provide comments. Empty lines are also ignored. Check the
|
yading@10
|
1682 \&\fIpresets\fR directory in the FFmpeg source tree for examples.
|
yading@10
|
1683 .PP
|
yading@10
|
1684 Preset files are specified with the \f(CW\*(C`pre\*(C'\fR option, this option takes a
|
yading@10
|
1685 preset name as input. FFmpeg searches for a file named \fIpreset_name\fR.avpreset in
|
yading@10
|
1686 the directories \fI\f(CI$AVCONV_DATADIR\fI\fR (if set), and \fI\f(CI$HOME\fI/.ffmpeg\fR, and in
|
yading@10
|
1687 the data directory defined at configuration time (usually \fI\f(CI$PREFIX\fI/share/ffmpeg\fR)
|
yading@10
|
1688 in that order. For example, if the argument is \f(CW\*(C`libx264\-max\*(C'\fR, it will
|
yading@10
|
1689 search for the file \fIlibx264\-max.avpreset\fR.
|
yading@10
|
1690 .SS "Video and Audio grabbing"
|
yading@10
|
1691 .IX Subsection "Video and Audio grabbing"
|
yading@10
|
1692 If you specify the input format and device then ffmpeg can grab video
|
yading@10
|
1693 and audio directly.
|
yading@10
|
1694 .PP
|
yading@10
|
1695 .Vb 1
|
yading@10
|
1696 \& ffmpeg \-f oss \-i /dev/dsp \-f video4linux2 \-i /dev/video0 /tmp/out.mpg
|
yading@10
|
1697 .Ve
|
yading@10
|
1698 .PP
|
yading@10
|
1699 Or with an \s-1ALSA\s0 audio source (mono input, card id 1) instead of \s-1OSS:\s0
|
yading@10
|
1700 .PP
|
yading@10
|
1701 .Vb 1
|
yading@10
|
1702 \& ffmpeg \-f alsa \-ac 1 \-i hw:1 \-f video4linux2 \-i /dev/video0 /tmp/out.mpg
|
yading@10
|
1703 .Ve
|
yading@10
|
1704 .PP
|
yading@10
|
1705 Note that you must activate the right video source and channel before
|
yading@10
|
1706 launching ffmpeg with any \s-1TV\s0 viewer such as
|
yading@10
|
1707 <\fBhttp://linux.bytesex.org/xawtv/\fR> by Gerd Knorr. You also
|
yading@10
|
1708 have to set the audio recording levels correctly with a
|
yading@10
|
1709 standard mixer.
|
yading@10
|
1710 .SS "X11 grabbing"
|
yading@10
|
1711 .IX Subsection "X11 grabbing"
|
yading@10
|
1712 Grab the X11 display with ffmpeg via
|
yading@10
|
1713 .PP
|
yading@10
|
1714 .Vb 1
|
yading@10
|
1715 \& ffmpeg \-f x11grab \-s cif \-r 25 \-i :0.0 /tmp/out.mpg
|
yading@10
|
1716 .Ve
|
yading@10
|
1717 .PP
|
yading@10
|
1718 0.0 is display.screen number of your X11 server, same as
|
yading@10
|
1719 the \s-1DISPLAY\s0 environment variable.
|
yading@10
|
1720 .PP
|
yading@10
|
1721 .Vb 1
|
yading@10
|
1722 \& ffmpeg \-f x11grab \-s cif \-r 25 \-i :0.0+10,20 /tmp/out.mpg
|
yading@10
|
1723 .Ve
|
yading@10
|
1724 .PP
|
yading@10
|
1725 0.0 is display.screen number of your X11 server, same as the \s-1DISPLAY\s0 environment
|
yading@10
|
1726 variable. 10 is the x\-offset and 20 the y\-offset for the grabbing.
|
yading@10
|
1727 .SS "Video and Audio file format conversion"
|
yading@10
|
1728 .IX Subsection "Video and Audio file format conversion"
|
yading@10
|
1729 Any supported file format and protocol can serve as input to ffmpeg:
|
yading@10
|
1730 .PP
|
yading@10
|
1731 Examples:
|
yading@10
|
1732 .IP "\(bu" 4
|
yading@10
|
1733 You can use \s-1YUV\s0 files as input:
|
yading@10
|
1734 .Sp
|
yading@10
|
1735 .Vb 1
|
yading@10
|
1736 \& ffmpeg \-i /tmp/test%d.Y /tmp/out.mpg
|
yading@10
|
1737 .Ve
|
yading@10
|
1738 .Sp
|
yading@10
|
1739 It will use the files:
|
yading@10
|
1740 .Sp
|
yading@10
|
1741 .Vb 2
|
yading@10
|
1742 \& /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
|
yading@10
|
1743 \& /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
|
yading@10
|
1744 .Ve
|
yading@10
|
1745 .Sp
|
yading@10
|
1746 The Y files use twice the resolution of the U and V files. They are
|
yading@10
|
1747 raw files, without header. They can be generated by all decent video
|
yading@10
|
1748 decoders. You must specify the size of the image with the \fB\-s\fR option
|
yading@10
|
1749 if ffmpeg cannot guess it.
|
yading@10
|
1750 .IP "\(bu" 4
|
yading@10
|
1751 You can input from a raw \s-1YUV420P\s0 file:
|
yading@10
|
1752 .Sp
|
yading@10
|
1753 .Vb 1
|
yading@10
|
1754 \& ffmpeg \-i /tmp/test.yuv /tmp/out.avi
|
yading@10
|
1755 .Ve
|
yading@10
|
1756 .Sp
|
yading@10
|
1757 test.yuv is a file containing raw \s-1YUV\s0 planar data. Each frame is composed
|
yading@10
|
1758 of the Y plane followed by the U and V planes at half vertical and
|
yading@10
|
1759 horizontal resolution.
|
yading@10
|
1760 .IP "\(bu" 4
|
yading@10
|
1761 You can output to a raw \s-1YUV420P\s0 file:
|
yading@10
|
1762 .Sp
|
yading@10
|
1763 .Vb 1
|
yading@10
|
1764 \& ffmpeg \-i mydivx.avi hugefile.yuv
|
yading@10
|
1765 .Ve
|
yading@10
|
1766 .IP "\(bu" 4
|
yading@10
|
1767 You can set several input files and output files:
|
yading@10
|
1768 .Sp
|
yading@10
|
1769 .Vb 1
|
yading@10
|
1770 \& ffmpeg \-i /tmp/a.wav \-s 640x480 \-i /tmp/a.yuv /tmp/a.mpg
|
yading@10
|
1771 .Ve
|
yading@10
|
1772 .Sp
|
yading@10
|
1773 Converts the audio file a.wav and the raw \s-1YUV\s0 video file a.yuv
|
yading@10
|
1774 to \s-1MPEG\s0 file a.mpg.
|
yading@10
|
1775 .IP "\(bu" 4
|
yading@10
|
1776 You can also do audio and video conversions at the same time:
|
yading@10
|
1777 .Sp
|
yading@10
|
1778 .Vb 1
|
yading@10
|
1779 \& ffmpeg \-i /tmp/a.wav \-ar 22050 /tmp/a.mp2
|
yading@10
|
1780 .Ve
|
yading@10
|
1781 .Sp
|
yading@10
|
1782 Converts a.wav to \s-1MPEG\s0 audio at 22050 Hz sample rate.
|
yading@10
|
1783 .IP "\(bu" 4
|
yading@10
|
1784 You can encode to several formats at the same time and define a
|
yading@10
|
1785 mapping from input stream to output streams:
|
yading@10
|
1786 .Sp
|
yading@10
|
1787 .Vb 1
|
yading@10
|
1788 \& ffmpeg \-i /tmp/a.wav \-map 0:a \-b:a 64k /tmp/a.mp2 \-map 0:a \-b:a 128k /tmp/b.mp2
|
yading@10
|
1789 .Ve
|
yading@10
|
1790 .Sp
|
yading@10
|
1791 Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '\-map
|
yading@10
|
1792 file:index' specifies which input stream is used for each output
|
yading@10
|
1793 stream, in the order of the definition of output streams.
|
yading@10
|
1794 .IP "\(bu" 4
|
yading@10
|
1795 You can transcode decrypted VOBs:
|
yading@10
|
1796 .Sp
|
yading@10
|
1797 .Vb 1
|
yading@10
|
1798 \& 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
|
yading@10
|
1799 .Ve
|
yading@10
|
1800 .Sp
|
yading@10
|
1801 This is a typical \s-1DVD\s0 ripping example; the input is a \s-1VOB\s0 file, the
|
yading@10
|
1802 output an \s-1AVI\s0 file with \s-1MPEG\-4\s0 video and \s-1MP3\s0 audio. Note that in this
|
yading@10
|
1803 command we use B\-frames so the \s-1MPEG\-4\s0 stream is DivX5 compatible, and
|
yading@10
|
1804 \&\s-1GOP\s0 size is 300 which means one intra frame every 10 seconds for 29.97fps
|
yading@10
|
1805 input video. Furthermore, the audio stream is MP3\-encoded so you need
|
yading@10
|
1806 to enable \s-1LAME\s0 support by passing \f(CW\*(C`\-\-enable\-libmp3lame\*(C'\fR to configure.
|
yading@10
|
1807 The mapping is particularly useful for \s-1DVD\s0 transcoding
|
yading@10
|
1808 to get the desired audio language.
|
yading@10
|
1809 .Sp
|
yading@10
|
1810 \&\s-1NOTE:\s0 To see the supported input formats, use \f(CW\*(C`ffmpeg \-formats\*(C'\fR.
|
yading@10
|
1811 .IP "\(bu" 4
|
yading@10
|
1812 You can extract images from a video, or create a video from many images:
|
yading@10
|
1813 .Sp
|
yading@10
|
1814 For extracting images from a video:
|
yading@10
|
1815 .Sp
|
yading@10
|
1816 .Vb 1
|
yading@10
|
1817 \& ffmpeg \-i foo.avi \-r 1 \-s WxH \-f image2 foo\-%03d.jpeg
|
yading@10
|
1818 .Ve
|
yading@10
|
1819 .Sp
|
yading@10
|
1820 This will extract one video frame per second from the video and will
|
yading@10
|
1821 output them in files named \fIfoo\-001.jpeg\fR, \fIfoo\-002.jpeg\fR,
|
yading@10
|
1822 etc. Images will be rescaled to fit the new WxH values.
|
yading@10
|
1823 .Sp
|
yading@10
|
1824 If you want to extract just a limited number of frames, you can use the
|
yading@10
|
1825 above command in combination with the \-vframes or \-t option, or in
|
yading@10
|
1826 combination with \-ss to start extracting from a certain point in time.
|
yading@10
|
1827 .Sp
|
yading@10
|
1828 For creating a video from many images:
|
yading@10
|
1829 .Sp
|
yading@10
|
1830 .Vb 1
|
yading@10
|
1831 \& ffmpeg \-f image2 \-i foo\-%03d.jpeg \-r 12 \-s WxH foo.avi
|
yading@10
|
1832 .Ve
|
yading@10
|
1833 .Sp
|
yading@10
|
1834 The syntax \f(CW\*(C`foo\-%03d.jpeg\*(C'\fR specifies to use a decimal number
|
yading@10
|
1835 composed of three digits padded with zeroes to express the sequence
|
yading@10
|
1836 number. It is the same syntax supported by the C printf function, but
|
yading@10
|
1837 only formats accepting a normal integer are suitable.
|
yading@10
|
1838 .Sp
|
yading@10
|
1839 When importing an image sequence, \-i also supports expanding
|
yading@10
|
1840 shell-like wildcard patterns (globbing) internally, by selecting the
|
yading@10
|
1841 image2\-specific \f(CW\*(C`\-pattern_type glob\*(C'\fR option.
|
yading@10
|
1842 .Sp
|
yading@10
|
1843 For example, for creating a video from filenames matching the glob pattern
|
yading@10
|
1844 \&\f(CW\*(C`foo\-*.jpeg\*(C'\fR:
|
yading@10
|
1845 .Sp
|
yading@10
|
1846 .Vb 1
|
yading@10
|
1847 \& ffmpeg \-f image2 \-pattern_type glob \-i \*(Aqfoo\-*.jpeg\*(Aq \-r 12 \-s WxH foo.avi
|
yading@10
|
1848 .Ve
|
yading@10
|
1849 .IP "\(bu" 4
|
yading@10
|
1850 You can put many streams of the same type in the output:
|
yading@10
|
1851 .Sp
|
yading@10
|
1852 .Vb 1
|
yading@10
|
1853 \& ffmpeg \-i test1.avi \-i test2.avi \-map 0:3 \-map 0:2 \-map 0:1 \-map 0:0 \-c copy test12.nut
|
yading@10
|
1854 .Ve
|
yading@10
|
1855 .Sp
|
yading@10
|
1856 The resulting output file \fItest12.avi\fR will contain first four streams from
|
yading@10
|
1857 the input file in reverse order.
|
yading@10
|
1858 .IP "\(bu" 4
|
yading@10
|
1859 To force \s-1CBR\s0 video output:
|
yading@10
|
1860 .Sp
|
yading@10
|
1861 .Vb 1
|
yading@10
|
1862 \& ffmpeg \-i myfile.avi \-b 4000k \-minrate 4000k \-maxrate 4000k \-bufsize 1835k out.m2v
|
yading@10
|
1863 .Ve
|
yading@10
|
1864 .IP "\(bu" 4
|
yading@10
|
1865 The four options lmin, lmax, mblmin and mblmax use 'lambda' units,
|
yading@10
|
1866 but you may use the \s-1QP2LAMBDA\s0 constant to easily convert from 'q' units:
|
yading@10
|
1867 .Sp
|
yading@10
|
1868 .Vb 1
|
yading@10
|
1869 \& ffmpeg \-i src.ext \-lmax 21*QP2LAMBDA dst.ext
|
yading@10
|
1870 .Ve
|
yading@10
|
1871 .SH "SYNTAX"
|
yading@10
|
1872 .IX Header "SYNTAX"
|
yading@10
|
1873 This section documents the syntax and formats employed by the FFmpeg
|
yading@10
|
1874 libraries and tools.
|
yading@10
|
1875 .SS "Quoting and escaping"
|
yading@10
|
1876 .IX Subsection "Quoting and escaping"
|
yading@10
|
1877 FFmpeg adopts the following quoting and escaping mechanism, unless
|
yading@10
|
1878 explicitly specified. The following rules are applied:
|
yading@10
|
1879 .IP "\(bu" 4
|
yading@10
|
1880 \&\f(CW\*(C`\*(Aq\*(C'\fR and \f(CW\*(C`\e\*(C'\fR are special characters (respectively used for
|
yading@10
|
1881 quoting and escaping). In addition to them, there might be other
|
yading@10
|
1882 special characters depending on the specific syntax where the escaping
|
yading@10
|
1883 and quoting are employed.
|
yading@10
|
1884 .IP "\(bu" 4
|
yading@10
|
1885 A special character is escaped by prefixing it with a '\e'.
|
yading@10
|
1886 .IP "\(bu" 4
|
yading@10
|
1887 All characters enclosed between '' are included literally in the
|
yading@10
|
1888 parsed string. The quote character \f(CW\*(C`\*(Aq\*(C'\fR itself cannot be quoted,
|
yading@10
|
1889 so you may need to close the quote and escape it.
|
yading@10
|
1890 .IP "\(bu" 4
|
yading@10
|
1891 Leading and trailing whitespaces, unless escaped or quoted, are
|
yading@10
|
1892 removed from the parsed string.
|
yading@10
|
1893 .PP
|
yading@10
|
1894 Note that you may need to add a second level of escaping when using
|
yading@10
|
1895 the command line or a script, which depends on the syntax of the
|
yading@10
|
1896 adopted shell language.
|
yading@10
|
1897 .PP
|
yading@10
|
1898 The function \f(CW\*(C`av_get_token\*(C'\fR defined in
|
yading@10
|
1899 \&\fIlibavutil/avstring.h\fR can be used to parse a token quoted or
|
yading@10
|
1900 escaped according to the rules defined above.
|
yading@10
|
1901 .PP
|
yading@10
|
1902 The tool \fItools/ffescape\fR in the FFmpeg source tree can be used
|
yading@10
|
1903 to automatically quote or escape a string in a script.
|
yading@10
|
1904 .PP
|
yading@10
|
1905 \fIExamples\fR
|
yading@10
|
1906 .IX Subsection "Examples"
|
yading@10
|
1907 .IP "\(bu" 4
|
yading@10
|
1908 Escape the string \f(CW\*(C`Crime d\*(AqAmour\*(C'\fR containing the \f(CW\*(C`\*(Aq\*(C'\fR special
|
yading@10
|
1909 character:
|
yading@10
|
1910 .Sp
|
yading@10
|
1911 .Vb 1
|
yading@10
|
1912 \& Crime d\e\*(AqAmour
|
yading@10
|
1913 .Ve
|
yading@10
|
1914 .IP "\(bu" 4
|
yading@10
|
1915 The string above contains a quote, so the \f(CW\*(C`\*(Aq\*(C'\fR needs to be escaped
|
yading@10
|
1916 when quoting it:
|
yading@10
|
1917 .Sp
|
yading@10
|
1918 .Vb 1
|
yading@10
|
1919 \& \*(AqCrime d\*(Aq\e\*(Aq\*(AqAmour\*(Aq
|
yading@10
|
1920 .Ve
|
yading@10
|
1921 .IP "\(bu" 4
|
yading@10
|
1922 Include leading or trailing whitespaces using quoting:
|
yading@10
|
1923 .Sp
|
yading@10
|
1924 .Vb 1
|
yading@10
|
1925 \& \*(Aq this string starts and ends with whitespaces \*(Aq
|
yading@10
|
1926 .Ve
|
yading@10
|
1927 .IP "\(bu" 4
|
yading@10
|
1928 Escaping and quoting can be mixed together:
|
yading@10
|
1929 .Sp
|
yading@10
|
1930 .Vb 1
|
yading@10
|
1931 \& \*(Aq The string \*(Aq\e\*(Aqstring\e\*(Aq\*(Aq is a string \*(Aq
|
yading@10
|
1932 .Ve
|
yading@10
|
1933 .IP "\(bu" 4
|
yading@10
|
1934 To include a literal \f(CW\*(C`\e\*(C'\fR you can use either escaping or quoting:
|
yading@10
|
1935 .Sp
|
yading@10
|
1936 .Vb 1
|
yading@10
|
1937 \& \*(Aqc:\efoo\*(Aq can be written as c:\e\efoo
|
yading@10
|
1938 .Ve
|
yading@10
|
1939 .SS "Date"
|
yading@10
|
1940 .IX Subsection "Date"
|
yading@10
|
1941 The accepted syntax is:
|
yading@10
|
1942 .PP
|
yading@10
|
1943 .Vb 2
|
yading@10
|
1944 \& [(YYYY\-MM\-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
|
yading@10
|
1945 \& now
|
yading@10
|
1946 .Ve
|
yading@10
|
1947 .PP
|
yading@10
|
1948 If the value is \*(L"now\*(R" it takes the current time.
|
yading@10
|
1949 .PP
|
yading@10
|
1950 Time is local time unless Z is appended, in which case it is
|
yading@10
|
1951 interpreted as \s-1UTC\s0.
|
yading@10
|
1952 If the year-month-day part is not specified it takes the current
|
yading@10
|
1953 year-month-day.
|
yading@10
|
1954 .SS "Time duration"
|
yading@10
|
1955 .IX Subsection "Time duration"
|
yading@10
|
1956 The accepted syntax is:
|
yading@10
|
1957 .PP
|
yading@10
|
1958 .Vb 2
|
yading@10
|
1959 \& [\-][HH:]MM:SS[.m...]
|
yading@10
|
1960 \& [\-]S+[.m...]
|
yading@10
|
1961 .Ve
|
yading@10
|
1962 .PP
|
yading@10
|
1963 \&\fI\s-1HH\s0\fR expresses the number of hours, \fI\s-1MM\s0\fR the number a of minutes
|
yading@10
|
1964 and \fI\s-1SS\s0\fR the number of seconds.
|
yading@10
|
1965 .SS "Video size"
|
yading@10
|
1966 .IX Subsection "Video size"
|
yading@10
|
1967 Specify the size of the sourced video, it may be a string of the form
|
yading@10
|
1968 \&\fIwidth\fRx\fIheight\fR, or the name of a size abbreviation.
|
yading@10
|
1969 .PP
|
yading@10
|
1970 The following abbreviations are recognized:
|
yading@10
|
1971 .IP "\fBntsc\fR" 4
|
yading@10
|
1972 .IX Item "ntsc"
|
yading@10
|
1973 720x480
|
yading@10
|
1974 .IP "\fBpal\fR" 4
|
yading@10
|
1975 .IX Item "pal"
|
yading@10
|
1976 720x576
|
yading@10
|
1977 .IP "\fBqntsc\fR" 4
|
yading@10
|
1978 .IX Item "qntsc"
|
yading@10
|
1979 352x240
|
yading@10
|
1980 .IP "\fBqpal\fR" 4
|
yading@10
|
1981 .IX Item "qpal"
|
yading@10
|
1982 352x288
|
yading@10
|
1983 .IP "\fBsntsc\fR" 4
|
yading@10
|
1984 .IX Item "sntsc"
|
yading@10
|
1985 640x480
|
yading@10
|
1986 .IP "\fBspal\fR" 4
|
yading@10
|
1987 .IX Item "spal"
|
yading@10
|
1988 768x576
|
yading@10
|
1989 .IP "\fBfilm\fR" 4
|
yading@10
|
1990 .IX Item "film"
|
yading@10
|
1991 352x240
|
yading@10
|
1992 .IP "\fBntsc-film\fR" 4
|
yading@10
|
1993 .IX Item "ntsc-film"
|
yading@10
|
1994 352x240
|
yading@10
|
1995 .IP "\fBsqcif\fR" 4
|
yading@10
|
1996 .IX Item "sqcif"
|
yading@10
|
1997 128x96
|
yading@10
|
1998 .IP "\fBqcif\fR" 4
|
yading@10
|
1999 .IX Item "qcif"
|
yading@10
|
2000 176x144
|
yading@10
|
2001 .IP "\fBcif\fR" 4
|
yading@10
|
2002 .IX Item "cif"
|
yading@10
|
2003 352x288
|
yading@10
|
2004 .IP "\fB4cif\fR" 4
|
yading@10
|
2005 .IX Item "4cif"
|
yading@10
|
2006 704x576
|
yading@10
|
2007 .IP "\fB16cif\fR" 4
|
yading@10
|
2008 .IX Item "16cif"
|
yading@10
|
2009 1408x1152
|
yading@10
|
2010 .IP "\fBqqvga\fR" 4
|
yading@10
|
2011 .IX Item "qqvga"
|
yading@10
|
2012 160x120
|
yading@10
|
2013 .IP "\fBqvga\fR" 4
|
yading@10
|
2014 .IX Item "qvga"
|
yading@10
|
2015 320x240
|
yading@10
|
2016 .IP "\fBvga\fR" 4
|
yading@10
|
2017 .IX Item "vga"
|
yading@10
|
2018 640x480
|
yading@10
|
2019 .IP "\fBsvga\fR" 4
|
yading@10
|
2020 .IX Item "svga"
|
yading@10
|
2021 800x600
|
yading@10
|
2022 .IP "\fBxga\fR" 4
|
yading@10
|
2023 .IX Item "xga"
|
yading@10
|
2024 1024x768
|
yading@10
|
2025 .IP "\fBuxga\fR" 4
|
yading@10
|
2026 .IX Item "uxga"
|
yading@10
|
2027 1600x1200
|
yading@10
|
2028 .IP "\fBqxga\fR" 4
|
yading@10
|
2029 .IX Item "qxga"
|
yading@10
|
2030 2048x1536
|
yading@10
|
2031 .IP "\fBsxga\fR" 4
|
yading@10
|
2032 .IX Item "sxga"
|
yading@10
|
2033 1280x1024
|
yading@10
|
2034 .IP "\fBqsxga\fR" 4
|
yading@10
|
2035 .IX Item "qsxga"
|
yading@10
|
2036 2560x2048
|
yading@10
|
2037 .IP "\fBhsxga\fR" 4
|
yading@10
|
2038 .IX Item "hsxga"
|
yading@10
|
2039 5120x4096
|
yading@10
|
2040 .IP "\fBwvga\fR" 4
|
yading@10
|
2041 .IX Item "wvga"
|
yading@10
|
2042 852x480
|
yading@10
|
2043 .IP "\fBwxga\fR" 4
|
yading@10
|
2044 .IX Item "wxga"
|
yading@10
|
2045 1366x768
|
yading@10
|
2046 .IP "\fBwsxga\fR" 4
|
yading@10
|
2047 .IX Item "wsxga"
|
yading@10
|
2048 1600x1024
|
yading@10
|
2049 .IP "\fBwuxga\fR" 4
|
yading@10
|
2050 .IX Item "wuxga"
|
yading@10
|
2051 1920x1200
|
yading@10
|
2052 .IP "\fBwoxga\fR" 4
|
yading@10
|
2053 .IX Item "woxga"
|
yading@10
|
2054 2560x1600
|
yading@10
|
2055 .IP "\fBwqsxga\fR" 4
|
yading@10
|
2056 .IX Item "wqsxga"
|
yading@10
|
2057 3200x2048
|
yading@10
|
2058 .IP "\fBwquxga\fR" 4
|
yading@10
|
2059 .IX Item "wquxga"
|
yading@10
|
2060 3840x2400
|
yading@10
|
2061 .IP "\fBwhsxga\fR" 4
|
yading@10
|
2062 .IX Item "whsxga"
|
yading@10
|
2063 6400x4096
|
yading@10
|
2064 .IP "\fBwhuxga\fR" 4
|
yading@10
|
2065 .IX Item "whuxga"
|
yading@10
|
2066 7680x4800
|
yading@10
|
2067 .IP "\fBcga\fR" 4
|
yading@10
|
2068 .IX Item "cga"
|
yading@10
|
2069 320x200
|
yading@10
|
2070 .IP "\fBega\fR" 4
|
yading@10
|
2071 .IX Item "ega"
|
yading@10
|
2072 640x350
|
yading@10
|
2073 .IP "\fBhd480\fR" 4
|
yading@10
|
2074 .IX Item "hd480"
|
yading@10
|
2075 852x480
|
yading@10
|
2076 .IP "\fBhd720\fR" 4
|
yading@10
|
2077 .IX Item "hd720"
|
yading@10
|
2078 1280x720
|
yading@10
|
2079 .IP "\fBhd1080\fR" 4
|
yading@10
|
2080 .IX Item "hd1080"
|
yading@10
|
2081 1920x1080
|
yading@10
|
2082 .IP "\fB2k\fR" 4
|
yading@10
|
2083 .IX Item "2k"
|
yading@10
|
2084 2048x1080
|
yading@10
|
2085 .IP "\fB2kflat\fR" 4
|
yading@10
|
2086 .IX Item "2kflat"
|
yading@10
|
2087 1998x1080
|
yading@10
|
2088 .IP "\fB2kscope\fR" 4
|
yading@10
|
2089 .IX Item "2kscope"
|
yading@10
|
2090 2048x858
|
yading@10
|
2091 .IP "\fB4k\fR" 4
|
yading@10
|
2092 .IX Item "4k"
|
yading@10
|
2093 4096x2160
|
yading@10
|
2094 .IP "\fB4kflat\fR" 4
|
yading@10
|
2095 .IX Item "4kflat"
|
yading@10
|
2096 3996x2160
|
yading@10
|
2097 .IP "\fB4kscope\fR" 4
|
yading@10
|
2098 .IX Item "4kscope"
|
yading@10
|
2099 4096x1716
|
yading@10
|
2100 .SS "Video rate"
|
yading@10
|
2101 .IX Subsection "Video rate"
|
yading@10
|
2102 Specify the frame rate of a video, expressed as the number of frames
|
yading@10
|
2103 generated per second. It has to be a string in the format
|
yading@10
|
2104 \&\fIframe_rate_num\fR/\fIframe_rate_den\fR, an integer number, a float
|
yading@10
|
2105 number or a valid video frame rate abbreviation.
|
yading@10
|
2106 .PP
|
yading@10
|
2107 The following abbreviations are recognized:
|
yading@10
|
2108 .IP "\fBntsc\fR" 4
|
yading@10
|
2109 .IX Item "ntsc"
|
yading@10
|
2110 30000/1001
|
yading@10
|
2111 .IP "\fBpal\fR" 4
|
yading@10
|
2112 .IX Item "pal"
|
yading@10
|
2113 25/1
|
yading@10
|
2114 .IP "\fBqntsc\fR" 4
|
yading@10
|
2115 .IX Item "qntsc"
|
yading@10
|
2116 30000/1001
|
yading@10
|
2117 .IP "\fBqpal\fR" 4
|
yading@10
|
2118 .IX Item "qpal"
|
yading@10
|
2119 25/1
|
yading@10
|
2120 .IP "\fBsntsc\fR" 4
|
yading@10
|
2121 .IX Item "sntsc"
|
yading@10
|
2122 30000/1001
|
yading@10
|
2123 .IP "\fBspal\fR" 4
|
yading@10
|
2124 .IX Item "spal"
|
yading@10
|
2125 25/1
|
yading@10
|
2126 .IP "\fBfilm\fR" 4
|
yading@10
|
2127 .IX Item "film"
|
yading@10
|
2128 24/1
|
yading@10
|
2129 .IP "\fBntsc-film\fR" 4
|
yading@10
|
2130 .IX Item "ntsc-film"
|
yading@10
|
2131 24000/1001
|
yading@10
|
2132 .SS "Ratio"
|
yading@10
|
2133 .IX Subsection "Ratio"
|
yading@10
|
2134 A ratio can be expressed as an expression, or in the form
|
yading@10
|
2135 \&\fInumerator\fR:\fIdenominator\fR.
|
yading@10
|
2136 .PP
|
yading@10
|
2137 Note that a ratio with infinite (1/0) or negative value is
|
yading@10
|
2138 considered valid, so you should check on the returned value if you
|
yading@10
|
2139 want to exclude those values.
|
yading@10
|
2140 .PP
|
yading@10
|
2141 The undefined value can be expressed using the \*(L"0:0\*(R" string.
|
yading@10
|
2142 .SS "Color"
|
yading@10
|
2143 .IX Subsection "Color"
|
yading@10
|
2144 It can be the name of a color (case insensitive match) or a
|
yading@10
|
2145 [0x|#]RRGGBB[\s-1AA\s0] sequence, possibly followed by \*(L"@\*(R" and a string
|
yading@10
|
2146 representing the alpha component.
|
yading@10
|
2147 .PP
|
yading@10
|
2148 The alpha component may be a string composed by \*(L"0x\*(R" followed by an
|
yading@10
|
2149 hexadecimal number or a decimal number between 0.0 and 1.0, which
|
yading@10
|
2150 represents the opacity value (0x00/0.0 means completely transparent,
|
yading@10
|
2151 0xff/1.0 completely opaque).
|
yading@10
|
2152 If the alpha component is not specified then 0xff is assumed.
|
yading@10
|
2153 .PP
|
yading@10
|
2154 The string \*(L"random\*(R" will result in a random color.
|
yading@10
|
2155 .SH "EXPRESSION EVALUATION"
|
yading@10
|
2156 .IX Header "EXPRESSION EVALUATION"
|
yading@10
|
2157 When evaluating an arithmetic expression, FFmpeg uses an internal
|
yading@10
|
2158 formula evaluator, implemented through the \fIlibavutil/eval.h\fR
|
yading@10
|
2159 interface.
|
yading@10
|
2160 .PP
|
yading@10
|
2161 An expression may contain unary, binary operators, constants, and
|
yading@10
|
2162 functions.
|
yading@10
|
2163 .PP
|
yading@10
|
2164 Two expressions \fIexpr1\fR and \fIexpr2\fR can be combined to form
|
yading@10
|
2165 another expression "\fIexpr1\fR;\fIexpr2\fR".
|
yading@10
|
2166 \&\fIexpr1\fR and \fIexpr2\fR are evaluated in turn, and the new
|
yading@10
|
2167 expression evaluates to the value of \fIexpr2\fR.
|
yading@10
|
2168 .PP
|
yading@10
|
2169 The following binary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR,
|
yading@10
|
2170 \&\f(CW\*(C`*\*(C'\fR, \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`^\*(C'\fR.
|
yading@10
|
2171 .PP
|
yading@10
|
2172 The following unary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR.
|
yading@10
|
2173 .PP
|
yading@10
|
2174 The following functions are available:
|
yading@10
|
2175 .IP "\fBabs(x)\fR" 4
|
yading@10
|
2176 .IX Item "abs(x)"
|
yading@10
|
2177 Compute absolute value of \fIx\fR.
|
yading@10
|
2178 .IP "\fBacos(x)\fR" 4
|
yading@10
|
2179 .IX Item "acos(x)"
|
yading@10
|
2180 Compute arccosine of \fIx\fR.
|
yading@10
|
2181 .IP "\fBasin(x)\fR" 4
|
yading@10
|
2182 .IX Item "asin(x)"
|
yading@10
|
2183 Compute arcsine of \fIx\fR.
|
yading@10
|
2184 .IP "\fBatan(x)\fR" 4
|
yading@10
|
2185 .IX Item "atan(x)"
|
yading@10
|
2186 Compute arctangent of \fIx\fR.
|
yading@10
|
2187 .IP "\fBbetween(x, min, max)\fR" 4
|
yading@10
|
2188 .IX Item "between(x, min, max)"
|
yading@10
|
2189 Return 1 if \fIx\fR is greater than or equal to \fImin\fR and lesser than or
|
yading@10
|
2190 equal to \fImax\fR, 0 otherwise.
|
yading@10
|
2191 .IP "\fBbitand(x, y)\fR" 4
|
yading@10
|
2192 .IX Item "bitand(x, y)"
|
yading@10
|
2193 .PD 0
|
yading@10
|
2194 .IP "\fBbitor(x, y)\fR" 4
|
yading@10
|
2195 .IX Item "bitor(x, y)"
|
yading@10
|
2196 .PD
|
yading@10
|
2197 Compute bitwise and/or operation on \fIx\fR and \fIy\fR.
|
yading@10
|
2198 .Sp
|
yading@10
|
2199 The results of the evaluation of \fIx\fR and \fIy\fR are converted to
|
yading@10
|
2200 integers before executing the bitwise operation.
|
yading@10
|
2201 .Sp
|
yading@10
|
2202 Note that both the conversion to integer and the conversion back to
|
yading@10
|
2203 floating point can lose precision. Beware of unexpected results for
|
yading@10
|
2204 large numbers (usually 2^53 and larger).
|
yading@10
|
2205 .IP "\fBceil(expr)\fR" 4
|
yading@10
|
2206 .IX Item "ceil(expr)"
|
yading@10
|
2207 Round the value of expression \fIexpr\fR upwards to the nearest
|
yading@10
|
2208 integer. For example, \*(L"ceil(1.5)\*(R" is \*(L"2.0\*(R".
|
yading@10
|
2209 .IP "\fBcos(x)\fR" 4
|
yading@10
|
2210 .IX Item "cos(x)"
|
yading@10
|
2211 Compute cosine of \fIx\fR.
|
yading@10
|
2212 .IP "\fBcosh(x)\fR" 4
|
yading@10
|
2213 .IX Item "cosh(x)"
|
yading@10
|
2214 Compute hyperbolic cosine of \fIx\fR.
|
yading@10
|
2215 .IP "\fBeq(x, y)\fR" 4
|
yading@10
|
2216 .IX Item "eq(x, y)"
|
yading@10
|
2217 Return 1 if \fIx\fR and \fIy\fR are equivalent, 0 otherwise.
|
yading@10
|
2218 .IP "\fBexp(x)\fR" 4
|
yading@10
|
2219 .IX Item "exp(x)"
|
yading@10
|
2220 Compute exponential of \fIx\fR (with base \f(CW\*(C`e\*(C'\fR, the Euler's number).
|
yading@10
|
2221 .IP "\fBfloor(expr)\fR" 4
|
yading@10
|
2222 .IX Item "floor(expr)"
|
yading@10
|
2223 Round the value of expression \fIexpr\fR downwards to the nearest
|
yading@10
|
2224 integer. For example, \*(L"floor(\-1.5)\*(R" is \*(L"\-2.0\*(R".
|
yading@10
|
2225 .IP "\fBgauss(x)\fR" 4
|
yading@10
|
2226 .IX Item "gauss(x)"
|
yading@10
|
2227 Compute Gauss function of \fIx\fR, corresponding to
|
yading@10
|
2228 \&\f(CW\*(C`exp(\-x*x/2) / sqrt(2*PI)\*(C'\fR.
|
yading@10
|
2229 .IP "\fBgcd(x, y)\fR" 4
|
yading@10
|
2230 .IX Item "gcd(x, y)"
|
yading@10
|
2231 Return the greatest common divisor of \fIx\fR and \fIy\fR. If both \fIx\fR and
|
yading@10
|
2232 \&\fIy\fR are 0 or either or both are less than zero then behavior is undefined.
|
yading@10
|
2233 .IP "\fBgt(x, y)\fR" 4
|
yading@10
|
2234 .IX Item "gt(x, y)"
|
yading@10
|
2235 Return 1 if \fIx\fR is greater than \fIy\fR, 0 otherwise.
|
yading@10
|
2236 .IP "\fBgte(x, y)\fR" 4
|
yading@10
|
2237 .IX Item "gte(x, y)"
|
yading@10
|
2238 Return 1 if \fIx\fR is greater than or equal to \fIy\fR, 0 otherwise.
|
yading@10
|
2239 .IP "\fBhypot(x, y)\fR" 4
|
yading@10
|
2240 .IX Item "hypot(x, y)"
|
yading@10
|
2241 This function is similar to the C function with the same name; it returns
|
yading@10
|
2242 "sqrt(\fIx\fR*\fIx\fR + \fIy\fR*\fIy\fR)", the length of the hypotenuse of a
|
yading@10
|
2243 right triangle with sides of length \fIx\fR and \fIy\fR, or the distance of the
|
yading@10
|
2244 point (\fIx\fR, \fIy\fR) from the origin.
|
yading@10
|
2245 .IP "\fBif(x, y)\fR" 4
|
yading@10
|
2246 .IX Item "if(x, y)"
|
yading@10
|
2247 Evaluate \fIx\fR, and if the result is non-zero return the result of
|
yading@10
|
2248 the evaluation of \fIy\fR, return 0 otherwise.
|
yading@10
|
2249 .IP "\fBif(x, y, z)\fR" 4
|
yading@10
|
2250 .IX Item "if(x, y, z)"
|
yading@10
|
2251 Evaluate \fIx\fR, and if the result is non-zero return the evaluation
|
yading@10
|
2252 result of \fIy\fR, otherwise the evaluation result of \fIz\fR.
|
yading@10
|
2253 .IP "\fBifnot(x, y)\fR" 4
|
yading@10
|
2254 .IX Item "ifnot(x, y)"
|
yading@10
|
2255 Evaluate \fIx\fR, and if the result is zero return the result of the
|
yading@10
|
2256 evaluation of \fIy\fR, return 0 otherwise.
|
yading@10
|
2257 .IP "\fBifnot(x, y, z)\fR" 4
|
yading@10
|
2258 .IX Item "ifnot(x, y, z)"
|
yading@10
|
2259 Evaluate \fIx\fR, and if the result is zero return the evaluation
|
yading@10
|
2260 result of \fIy\fR, otherwise the evaluation result of \fIz\fR.
|
yading@10
|
2261 .IP "\fBisinf(x)\fR" 4
|
yading@10
|
2262 .IX Item "isinf(x)"
|
yading@10
|
2263 Return 1.0 if \fIx\fR is +/\-INFINITY, 0.0 otherwise.
|
yading@10
|
2264 .IP "\fBisnan(x)\fR" 4
|
yading@10
|
2265 .IX Item "isnan(x)"
|
yading@10
|
2266 Return 1.0 if \fIx\fR is \s-1NAN\s0, 0.0 otherwise.
|
yading@10
|
2267 .IP "\fBld(var)\fR" 4
|
yading@10
|
2268 .IX Item "ld(var)"
|
yading@10
|
2269 Allow to load the value of the internal variable with number
|
yading@10
|
2270 \&\fIvar\fR, which was previously stored with st(\fIvar\fR, \fIexpr\fR).
|
yading@10
|
2271 The function returns the loaded value.
|
yading@10
|
2272 .IP "\fBlog(x)\fR" 4
|
yading@10
|
2273 .IX Item "log(x)"
|
yading@10
|
2274 Compute natural logarithm of \fIx\fR.
|
yading@10
|
2275 .IP "\fBlt(x, y)\fR" 4
|
yading@10
|
2276 .IX Item "lt(x, y)"
|
yading@10
|
2277 Return 1 if \fIx\fR is lesser than \fIy\fR, 0 otherwise.
|
yading@10
|
2278 .IP "\fBlte(x, y)\fR" 4
|
yading@10
|
2279 .IX Item "lte(x, y)"
|
yading@10
|
2280 Return 1 if \fIx\fR is lesser than or equal to \fIy\fR, 0 otherwise.
|
yading@10
|
2281 .IP "\fBmax(x, y)\fR" 4
|
yading@10
|
2282 .IX Item "max(x, y)"
|
yading@10
|
2283 Return the maximum between \fIx\fR and \fIy\fR.
|
yading@10
|
2284 .IP "\fBmin(x, y)\fR" 4
|
yading@10
|
2285 .IX Item "min(x, y)"
|
yading@10
|
2286 Return the maximum between \fIx\fR and \fIy\fR.
|
yading@10
|
2287 .IP "\fBmod(x, y)\fR" 4
|
yading@10
|
2288 .IX Item "mod(x, y)"
|
yading@10
|
2289 Compute the remainder of division of \fIx\fR by \fIy\fR.
|
yading@10
|
2290 .IP "\fBnot(expr)\fR" 4
|
yading@10
|
2291 .IX Item "not(expr)"
|
yading@10
|
2292 Return 1.0 if \fIexpr\fR is zero, 0.0 otherwise.
|
yading@10
|
2293 .IP "\fBpow(x, y)\fR" 4
|
yading@10
|
2294 .IX Item "pow(x, y)"
|
yading@10
|
2295 Compute the power of \fIx\fR elevated \fIy\fR, it is equivalent to
|
yading@10
|
2296 "(\fIx\fR)^(\fIy\fR)".
|
yading@10
|
2297 .IP "\fBprint(t)\fR" 4
|
yading@10
|
2298 .IX Item "print(t)"
|
yading@10
|
2299 .PD 0
|
yading@10
|
2300 .IP "\fBprint(t, l)\fR" 4
|
yading@10
|
2301 .IX Item "print(t, l)"
|
yading@10
|
2302 .PD
|
yading@10
|
2303 Print the value of expression \fIt\fR with loglevel \fIl\fR. If
|
yading@10
|
2304 \&\fIl\fR is not specified then a default log level is used.
|
yading@10
|
2305 Returns the value of the expression printed.
|
yading@10
|
2306 .Sp
|
yading@10
|
2307 Prints t with loglevel l
|
yading@10
|
2308 .IP "\fBrandom(x)\fR" 4
|
yading@10
|
2309 .IX Item "random(x)"
|
yading@10
|
2310 Return a pseudo random value between 0.0 and 1.0. \fIx\fR is the index of the
|
yading@10
|
2311 internal variable which will be used to save the seed/state.
|
yading@10
|
2312 .IP "\fBroot(expr, max)\fR" 4
|
yading@10
|
2313 .IX Item "root(expr, max)"
|
yading@10
|
2314 Find an input value for which the function represented by \fIexpr\fR
|
yading@10
|
2315 with argument \fI\fIld\fI\|(0)\fR is 0 in the interval 0..\fImax\fR.
|
yading@10
|
2316 .Sp
|
yading@10
|
2317 The expression in \fIexpr\fR must denote a continuous function or the
|
yading@10
|
2318 result is undefined.
|
yading@10
|
2319 .Sp
|
yading@10
|
2320 \&\fI\fIld\fI\|(0)\fR is used to represent the function input value, which means
|
yading@10
|
2321 that the given expression will be evaluated multiple times with
|
yading@10
|
2322 various input values that the expression can access through
|
yading@10
|
2323 \&\f(CWld(0)\fR. When the expression evaluates to 0 then the
|
yading@10
|
2324 corresponding input value will be returned.
|
yading@10
|
2325 .IP "\fBsin(x)\fR" 4
|
yading@10
|
2326 .IX Item "sin(x)"
|
yading@10
|
2327 Compute sine of \fIx\fR.
|
yading@10
|
2328 .IP "\fBsinh(x)\fR" 4
|
yading@10
|
2329 .IX Item "sinh(x)"
|
yading@10
|
2330 Compute hyperbolic sine of \fIx\fR.
|
yading@10
|
2331 .IP "\fBsqrt(expr)\fR" 4
|
yading@10
|
2332 .IX Item "sqrt(expr)"
|
yading@10
|
2333 Compute the square root of \fIexpr\fR. This is equivalent to
|
yading@10
|
2334 "(\fIexpr\fR)^.5".
|
yading@10
|
2335 .IP "\fBsquish(x)\fR" 4
|
yading@10
|
2336 .IX Item "squish(x)"
|
yading@10
|
2337 Compute expression \f(CW\*(C`1/(1 + exp(4*x))\*(C'\fR.
|
yading@10
|
2338 .IP "\fBst(var, expr)\fR" 4
|
yading@10
|
2339 .IX Item "st(var, expr)"
|
yading@10
|
2340 Allow to store the value of the expression \fIexpr\fR in an internal
|
yading@10
|
2341 variable. \fIvar\fR specifies the number of the variable where to
|
yading@10
|
2342 store the value, and it is a value ranging from 0 to 9. The function
|
yading@10
|
2343 returns the value stored in the internal variable.
|
yading@10
|
2344 Note, Variables are currently not shared between expressions.
|
yading@10
|
2345 .IP "\fBtan(x)\fR" 4
|
yading@10
|
2346 .IX Item "tan(x)"
|
yading@10
|
2347 Compute tangent of \fIx\fR.
|
yading@10
|
2348 .IP "\fBtanh(x)\fR" 4
|
yading@10
|
2349 .IX Item "tanh(x)"
|
yading@10
|
2350 Compute hyperbolic tangent of \fIx\fR.
|
yading@10
|
2351 .IP "\fBtaylor(expr, x)\fR" 4
|
yading@10
|
2352 .IX Item "taylor(expr, x)"
|
yading@10
|
2353 .PD 0
|
yading@10
|
2354 .IP "\fBtaylor(expr, x, id)\fR" 4
|
yading@10
|
2355 .IX Item "taylor(expr, x, id)"
|
yading@10
|
2356 .PD
|
yading@10
|
2357 Evaluate a Taylor series at \fIx\fR, given an expression representing
|
yading@10
|
2358 the \f(CW\*(C`ld(id)\*(C'\fR\-th derivative of a function at 0.
|
yading@10
|
2359 .Sp
|
yading@10
|
2360 When the series does not converge the result is undefined.
|
yading@10
|
2361 .Sp
|
yading@10
|
2362 \&\fIld(id)\fR is used to represent the derivative order in \fIexpr\fR,
|
yading@10
|
2363 which means that the given expression will be evaluated multiple times
|
yading@10
|
2364 with various input values that the expression can access through
|
yading@10
|
2365 \&\f(CW\*(C`ld(id)\*(C'\fR. If \fIid\fR is not specified then 0 is assumed.
|
yading@10
|
2366 .Sp
|
yading@10
|
2367 Note, when you have the derivatives at y instead of 0,
|
yading@10
|
2368 \&\f(CW\*(C`taylor(expr, x\-y)\*(C'\fR can be used.
|
yading@10
|
2369 .IP "\fB\f(BItime\fB\|(0)\fR" 4
|
yading@10
|
2370 .IX Item "time"
|
yading@10
|
2371 Return the current (wallclock) time in seconds.
|
yading@10
|
2372 .IP "\fBtrunc(expr)\fR" 4
|
yading@10
|
2373 .IX Item "trunc(expr)"
|
yading@10
|
2374 Round the value of expression \fIexpr\fR towards zero to the nearest
|
yading@10
|
2375 integer. For example, \*(L"trunc(\-1.5)\*(R" is \*(L"\-1.0\*(R".
|
yading@10
|
2376 .IP "\fBwhile(cond, expr)\fR" 4
|
yading@10
|
2377 .IX Item "while(cond, expr)"
|
yading@10
|
2378 Evaluate expression \fIexpr\fR while the expression \fIcond\fR is
|
yading@10
|
2379 non-zero, and returns the value of the last \fIexpr\fR evaluation, or
|
yading@10
|
2380 \&\s-1NAN\s0 if \fIcond\fR was always false.
|
yading@10
|
2381 .PP
|
yading@10
|
2382 The following constants are available:
|
yading@10
|
2383 .IP "\fB\s-1PI\s0\fR" 4
|
yading@10
|
2384 .IX Item "PI"
|
yading@10
|
2385 area of the unit disc, approximately 3.14
|
yading@10
|
2386 .IP "\fBE\fR" 4
|
yading@10
|
2387 .IX Item "E"
|
yading@10
|
2388 \&\fIexp\fR\|(1) (Euler's number), approximately 2.718
|
yading@10
|
2389 .IP "\fB\s-1PHI\s0\fR" 4
|
yading@10
|
2390 .IX Item "PHI"
|
yading@10
|
2391 golden ratio (1+\fIsqrt\fR\|(5))/2, approximately 1.618
|
yading@10
|
2392 .PP
|
yading@10
|
2393 Assuming that an expression is considered \*(L"true\*(R" if it has a non-zero
|
yading@10
|
2394 value, note that:
|
yading@10
|
2395 .PP
|
yading@10
|
2396 \&\f(CW\*(C`*\*(C'\fR works like \s-1AND\s0
|
yading@10
|
2397 .PP
|
yading@10
|
2398 \&\f(CW\*(C`+\*(C'\fR works like \s-1OR\s0
|
yading@10
|
2399 .PP
|
yading@10
|
2400 For example the construct:
|
yading@10
|
2401 .PP
|
yading@10
|
2402 .Vb 1
|
yading@10
|
2403 \& if (A AND B) then C
|
yading@10
|
2404 .Ve
|
yading@10
|
2405 .PP
|
yading@10
|
2406 is equivalent to:
|
yading@10
|
2407 .PP
|
yading@10
|
2408 .Vb 1
|
yading@10
|
2409 \& if(A*B, C)
|
yading@10
|
2410 .Ve
|
yading@10
|
2411 .PP
|
yading@10
|
2412 In your C code, you can extend the list of unary and binary functions,
|
yading@10
|
2413 and define recognized constants, so that they are available for your
|
yading@10
|
2414 expressions.
|
yading@10
|
2415 .PP
|
yading@10
|
2416 The evaluator also recognizes the International System unit prefixes.
|
yading@10
|
2417 If 'i' is appended after the prefix, binary prefixes are used, which
|
yading@10
|
2418 are based on powers of 1024 instead of powers of 1000.
|
yading@10
|
2419 The 'B' postfix multiplies the value by 8, and can be appended after a
|
yading@10
|
2420 unit prefix or used alone. This allows using for example '\s-1KB\s0', 'MiB',
|
yading@10
|
2421 \&'G' and 'B' as number postfix.
|
yading@10
|
2422 .PP
|
yading@10
|
2423 The list of available International System prefixes follows, with
|
yading@10
|
2424 indication of the corresponding powers of 10 and of 2.
|
yading@10
|
2425 .IP "\fBy\fR" 4
|
yading@10
|
2426 .IX Item "y"
|
yading@10
|
2427 10^\-24 / 2^\-80
|
yading@10
|
2428 .IP "\fBz\fR" 4
|
yading@10
|
2429 .IX Item "z"
|
yading@10
|
2430 10^\-21 / 2^\-70
|
yading@10
|
2431 .IP "\fBa\fR" 4
|
yading@10
|
2432 .IX Item "a"
|
yading@10
|
2433 10^\-18 / 2^\-60
|
yading@10
|
2434 .IP "\fBf\fR" 4
|
yading@10
|
2435 .IX Item "f"
|
yading@10
|
2436 10^\-15 / 2^\-50
|
yading@10
|
2437 .IP "\fBp\fR" 4
|
yading@10
|
2438 .IX Item "p"
|
yading@10
|
2439 10^\-12 / 2^\-40
|
yading@10
|
2440 .IP "\fBn\fR" 4
|
yading@10
|
2441 .IX Item "n"
|
yading@10
|
2442 10^\-9 / 2^\-30
|
yading@10
|
2443 .IP "\fBu\fR" 4
|
yading@10
|
2444 .IX Item "u"
|
yading@10
|
2445 10^\-6 / 2^\-20
|
yading@10
|
2446 .IP "\fBm\fR" 4
|
yading@10
|
2447 .IX Item "m"
|
yading@10
|
2448 10^\-3 / 2^\-10
|
yading@10
|
2449 .IP "\fBc\fR" 4
|
yading@10
|
2450 .IX Item "c"
|
yading@10
|
2451 10^\-2
|
yading@10
|
2452 .IP "\fBd\fR" 4
|
yading@10
|
2453 .IX Item "d"
|
yading@10
|
2454 10^\-1
|
yading@10
|
2455 .IP "\fBh\fR" 4
|
yading@10
|
2456 .IX Item "h"
|
yading@10
|
2457 10^2
|
yading@10
|
2458 .IP "\fBk\fR" 4
|
yading@10
|
2459 .IX Item "k"
|
yading@10
|
2460 10^3 / 2^10
|
yading@10
|
2461 .IP "\fBK\fR" 4
|
yading@10
|
2462 .IX Item "K"
|
yading@10
|
2463 10^3 / 2^10
|
yading@10
|
2464 .IP "\fBM\fR" 4
|
yading@10
|
2465 .IX Item "M"
|
yading@10
|
2466 10^6 / 2^20
|
yading@10
|
2467 .IP "\fBG\fR" 4
|
yading@10
|
2468 .IX Item "G"
|
yading@10
|
2469 10^9 / 2^30
|
yading@10
|
2470 .IP "\fBT\fR" 4
|
yading@10
|
2471 .IX Item "T"
|
yading@10
|
2472 10^12 / 2^40
|
yading@10
|
2473 .IP "\fBP\fR" 4
|
yading@10
|
2474 .IX Item "P"
|
yading@10
|
2475 10^15 / 2^40
|
yading@10
|
2476 .IP "\fBE\fR" 4
|
yading@10
|
2477 .IX Item "E"
|
yading@10
|
2478 10^18 / 2^50
|
yading@10
|
2479 .IP "\fBZ\fR" 4
|
yading@10
|
2480 .IX Item "Z"
|
yading@10
|
2481 10^21 / 2^60
|
yading@10
|
2482 .IP "\fBY\fR" 4
|
yading@10
|
2483 .IX Item "Y"
|
yading@10
|
2484 10^24 / 2^70
|
yading@10
|
2485 .SH "OPENCL OPTIONS"
|
yading@10
|
2486 .IX Header "OPENCL OPTIONS"
|
yading@10
|
2487 When FFmpeg is configured with \f(CW\*(C`\-\-enable\-opencl\*(C'\fR, it is possible
|
yading@10
|
2488 to set the options for the global OpenCL context.
|
yading@10
|
2489 .PP
|
yading@10
|
2490 The list of supported options follows:
|
yading@10
|
2491 .IP "\fBbuild_options\fR" 4
|
yading@10
|
2492 .IX Item "build_options"
|
yading@10
|
2493 Set build options used to compile the registered kernels.
|
yading@10
|
2494 .Sp
|
yading@10
|
2495 See reference \*(L"OpenCL Specification Version: 1.2 chapter 5.6.4\*(R".
|
yading@10
|
2496 .IP "\fBplatform_idx\fR" 4
|
yading@10
|
2497 .IX Item "platform_idx"
|
yading@10
|
2498 Select the index of the platform to run OpenCL code.
|
yading@10
|
2499 .Sp
|
yading@10
|
2500 The specified index must be one of the indexes in the device list
|
yading@10
|
2501 which can be obtained with \f(CW\*(C`av_opencl_get_device_list()\*(C'\fR.
|
yading@10
|
2502 .IP "\fBdevice_idx\fR" 4
|
yading@10
|
2503 .IX Item "device_idx"
|
yading@10
|
2504 Select the index of the device used to run OpenCL code.
|
yading@10
|
2505 .Sp
|
yading@10
|
2506 The specifed index must be one of the indexes in the device list which
|
yading@10
|
2507 can be obtained with \f(CW\*(C`av_opencl_get_device_list()\*(C'\fR.
|
yading@10
|
2508 .SH "CODEC OPTIONS"
|
yading@10
|
2509 .IX Header "CODEC OPTIONS"
|
yading@10
|
2510 libavcodec provides some generic global options, which can be set on
|
yading@10
|
2511 all the encoders and decoders. In addition each codec may support
|
yading@10
|
2512 so-called private options, which are specific for a given codec.
|
yading@10
|
2513 .PP
|
yading@10
|
2514 Sometimes, a global option may only affect a specific kind of codec,
|
yading@10
|
2515 and may be unsensical or ignored by another, so you need to be aware
|
yading@10
|
2516 of the meaning of the specified options. Also some options are
|
yading@10
|
2517 meant only for decoding or encoding.
|
yading@10
|
2518 .PP
|
yading@10
|
2519 Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
|
yading@10
|
2520 FFmpeg tools, or by setting the value explicitly in the
|
yading@10
|
2521 \&\f(CW\*(C`AVCodecContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0
|
yading@10
|
2522 for programmatic use.
|
yading@10
|
2523 .PP
|
yading@10
|
2524 The list of supported options follow:
|
yading@10
|
2525 .IP "\fBb\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
2526 .IX Item "b integer (encoding,audio,video)"
|
yading@10
|
2527 Set bitrate in bits/s. Default value is 200K.
|
yading@10
|
2528 .IP "\fBab\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4
|
yading@10
|
2529 .IX Item "ab integer (encoding,audio)"
|
yading@10
|
2530 Set audio bitrate (in bits/s). Default value is 128K.
|
yading@10
|
2531 .IP "\fBbt\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2532 .IX Item "bt integer (encoding,video)"
|
yading@10
|
2533 Set video bitrate tolerance (in bits/s). In 1\-pass mode, bitrate
|
yading@10
|
2534 tolerance specifies how far ratecontrol is willing to deviate from the
|
yading@10
|
2535 target average bitrate value. This is not related to min/max
|
yading@10
|
2536 bitrate. Lowering tolerance too much has an adverse effect on quality.
|
yading@10
|
2537 .IP "\fBflags\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video,subtitles\fR\fB)\fR" 4
|
yading@10
|
2538 .IX Item "flags flags (decoding/encoding,audio,video,subtitles)"
|
yading@10
|
2539 Set generic flags.
|
yading@10
|
2540 .Sp
|
yading@10
|
2541 Possible values:
|
yading@10
|
2542 .RS 4
|
yading@10
|
2543 .IP "\fBmv4\fR" 4
|
yading@10
|
2544 .IX Item "mv4"
|
yading@10
|
2545 Use four motion vector by macroblock (mpeg4).
|
yading@10
|
2546 .IP "\fBqpel\fR" 4
|
yading@10
|
2547 .IX Item "qpel"
|
yading@10
|
2548 Use 1/4 pel motion compensation.
|
yading@10
|
2549 .IP "\fBloop\fR" 4
|
yading@10
|
2550 .IX Item "loop"
|
yading@10
|
2551 Use loop filter.
|
yading@10
|
2552 .IP "\fBqscale\fR" 4
|
yading@10
|
2553 .IX Item "qscale"
|
yading@10
|
2554 Use fixed qscale.
|
yading@10
|
2555 .IP "\fBgmc\fR" 4
|
yading@10
|
2556 .IX Item "gmc"
|
yading@10
|
2557 Use gmc.
|
yading@10
|
2558 .IP "\fBmv0\fR" 4
|
yading@10
|
2559 .IX Item "mv0"
|
yading@10
|
2560 Always try a mb with mv=<0,0>.
|
yading@10
|
2561 .IP "\fBinput_preserved\fR" 4
|
yading@10
|
2562 .IX Item "input_preserved"
|
yading@10
|
2563 .PD 0
|
yading@10
|
2564 .IP "\fBpass1\fR" 4
|
yading@10
|
2565 .IX Item "pass1"
|
yading@10
|
2566 .PD
|
yading@10
|
2567 Use internal 2pass ratecontrol in first pass mode.
|
yading@10
|
2568 .IP "\fBpass2\fR" 4
|
yading@10
|
2569 .IX Item "pass2"
|
yading@10
|
2570 Use internal 2pass ratecontrol in second pass mode.
|
yading@10
|
2571 .IP "\fBgray\fR" 4
|
yading@10
|
2572 .IX Item "gray"
|
yading@10
|
2573 Only decode/encode grayscale.
|
yading@10
|
2574 .IP "\fBemu_edge\fR" 4
|
yading@10
|
2575 .IX Item "emu_edge"
|
yading@10
|
2576 Do not draw edges.
|
yading@10
|
2577 .IP "\fBpsnr\fR" 4
|
yading@10
|
2578 .IX Item "psnr"
|
yading@10
|
2579 Set error[?] variables during encoding.
|
yading@10
|
2580 .IP "\fBtruncated\fR" 4
|
yading@10
|
2581 .IX Item "truncated"
|
yading@10
|
2582 .PD 0
|
yading@10
|
2583 .IP "\fBnaq\fR" 4
|
yading@10
|
2584 .IX Item "naq"
|
yading@10
|
2585 .PD
|
yading@10
|
2586 Normalize adaptive quantization.
|
yading@10
|
2587 .IP "\fBildct\fR" 4
|
yading@10
|
2588 .IX Item "ildct"
|
yading@10
|
2589 Use interlaced \s-1DCT\s0.
|
yading@10
|
2590 .IP "\fBlow_delay\fR" 4
|
yading@10
|
2591 .IX Item "low_delay"
|
yading@10
|
2592 Force low delay.
|
yading@10
|
2593 .IP "\fBglobal_header\fR" 4
|
yading@10
|
2594 .IX Item "global_header"
|
yading@10
|
2595 Place global headers in extradata instead of every keyframe.
|
yading@10
|
2596 .IP "\fBbitexact\fR" 4
|
yading@10
|
2597 .IX Item "bitexact"
|
yading@10
|
2598 Use only bitexact stuff (except (I)DCT).
|
yading@10
|
2599 .IP "\fBaic\fR" 4
|
yading@10
|
2600 .IX Item "aic"
|
yading@10
|
2601 Apply H263 advanced intra coding / mpeg4 ac prediction.
|
yading@10
|
2602 .IP "\fBcbp\fR" 4
|
yading@10
|
2603 .IX Item "cbp"
|
yading@10
|
2604 Deprecated, use mpegvideo private options instead.
|
yading@10
|
2605 .IP "\fBqprd\fR" 4
|
yading@10
|
2606 .IX Item "qprd"
|
yading@10
|
2607 Deprecated, use mpegvideo private options instead.
|
yading@10
|
2608 .IP "\fBilme\fR" 4
|
yading@10
|
2609 .IX Item "ilme"
|
yading@10
|
2610 Apply interlaced motion estimation.
|
yading@10
|
2611 .IP "\fBcgop\fR" 4
|
yading@10
|
2612 .IX Item "cgop"
|
yading@10
|
2613 Use closed gop.
|
yading@10
|
2614 .RE
|
yading@10
|
2615 .RS 4
|
yading@10
|
2616 .RE
|
yading@10
|
2617 .IP "\fBsub_id\fR \fIinteger\fR" 4
|
yading@10
|
2618 .IX Item "sub_id integer"
|
yading@10
|
2619 Deprecated, currently unused.
|
yading@10
|
2620 .IP "\fBme_method\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2621 .IX Item "me_method integer (encoding,video)"
|
yading@10
|
2622 Set motion estimation method.
|
yading@10
|
2623 .Sp
|
yading@10
|
2624 Possible values:
|
yading@10
|
2625 .RS 4
|
yading@10
|
2626 .IP "\fBzero\fR" 4
|
yading@10
|
2627 .IX Item "zero"
|
yading@10
|
2628 zero motion estimation (fastest)
|
yading@10
|
2629 .IP "\fBfull\fR" 4
|
yading@10
|
2630 .IX Item "full"
|
yading@10
|
2631 full motion estimation (slowest)
|
yading@10
|
2632 .IP "\fBepzs\fR" 4
|
yading@10
|
2633 .IX Item "epzs"
|
yading@10
|
2634 \&\s-1EPZS\s0 motion estimation (default)
|
yading@10
|
2635 .IP "\fBesa\fR" 4
|
yading@10
|
2636 .IX Item "esa"
|
yading@10
|
2637 esa motion estimation (alias for full)
|
yading@10
|
2638 .IP "\fBtesa\fR" 4
|
yading@10
|
2639 .IX Item "tesa"
|
yading@10
|
2640 tesa motion estimation
|
yading@10
|
2641 .IP "\fBdia\fR" 4
|
yading@10
|
2642 .IX Item "dia"
|
yading@10
|
2643 dia motion estimation (alias for epzs)
|
yading@10
|
2644 .IP "\fBlog\fR" 4
|
yading@10
|
2645 .IX Item "log"
|
yading@10
|
2646 log motion estimation
|
yading@10
|
2647 .IP "\fBphods\fR" 4
|
yading@10
|
2648 .IX Item "phods"
|
yading@10
|
2649 phods motion estimation
|
yading@10
|
2650 .IP "\fBx1\fR" 4
|
yading@10
|
2651 .IX Item "x1"
|
yading@10
|
2652 X1 motion estimation
|
yading@10
|
2653 .IP "\fBhex\fR" 4
|
yading@10
|
2654 .IX Item "hex"
|
yading@10
|
2655 hex motion estimation
|
yading@10
|
2656 .IP "\fBumh\fR" 4
|
yading@10
|
2657 .IX Item "umh"
|
yading@10
|
2658 umh motion estimation
|
yading@10
|
2659 .IP "\fBiter\fR" 4
|
yading@10
|
2660 .IX Item "iter"
|
yading@10
|
2661 iter motion estimation
|
yading@10
|
2662 .RE
|
yading@10
|
2663 .RS 4
|
yading@10
|
2664 .RE
|
yading@10
|
2665 .IP "\fBextradata_size\fR \fIinteger\fR" 4
|
yading@10
|
2666 .IX Item "extradata_size integer"
|
yading@10
|
2667 Set extradata size.
|
yading@10
|
2668 .IP "\fBtime_base\fR \fIrational number\fR" 4
|
yading@10
|
2669 .IX Item "time_base rational number"
|
yading@10
|
2670 Set codec time base.
|
yading@10
|
2671 .Sp
|
yading@10
|
2672 It is the fundamental unit of time (in seconds) in terms of which
|
yading@10
|
2673 frame timestamps are represented. For fixed-fps content, timebase
|
yading@10
|
2674 should be \f(CW\*(C`1 / frame_rate\*(C'\fR and timestamp increments should be
|
yading@10
|
2675 identically 1.
|
yading@10
|
2676 .IP "\fBg\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2677 .IX Item "g integer (encoding,video)"
|
yading@10
|
2678 Set the group of picture size. Default value is 12.
|
yading@10
|
2679 .IP "\fBar\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4
|
yading@10
|
2680 .IX Item "ar integer (decoding/encoding,audio)"
|
yading@10
|
2681 Set audio sampling rate (in Hz).
|
yading@10
|
2682 .IP "\fBac\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4
|
yading@10
|
2683 .IX Item "ac integer (decoding/encoding,audio)"
|
yading@10
|
2684 Set number of audio channels.
|
yading@10
|
2685 .IP "\fBcutoff\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4
|
yading@10
|
2686 .IX Item "cutoff integer (encoding,audio)"
|
yading@10
|
2687 Set cutoff bandwidth.
|
yading@10
|
2688 .IP "\fBframe_size\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4
|
yading@10
|
2689 .IX Item "frame_size integer (encoding,audio)"
|
yading@10
|
2690 Set audio frame size.
|
yading@10
|
2691 .Sp
|
yading@10
|
2692 Each submitted frame except the last must contain exactly frame_size
|
yading@10
|
2693 samples per channel. May be 0 when the codec has
|
yading@10
|
2694 \&\s-1CODEC_CAP_VARIABLE_FRAME_SIZE\s0 set, in that case the frame size is not
|
yading@10
|
2695 restricted. It is set by some decoders to indicate constant frame
|
yading@10
|
2696 size.
|
yading@10
|
2697 .IP "\fBframe_number\fR \fIinteger\fR" 4
|
yading@10
|
2698 .IX Item "frame_number integer"
|
yading@10
|
2699 Set the frame number.
|
yading@10
|
2700 .IP "\fBdelay\fR \fIinteger\fR" 4
|
yading@10
|
2701 .IX Item "delay integer"
|
yading@10
|
2702 .PD 0
|
yading@10
|
2703 .IP "\fBqcomp\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2704 .IX Item "qcomp float (encoding,video)"
|
yading@10
|
2705 .PD
|
yading@10
|
2706 Set video quantizer scale compression (\s-1VBR\s0). It is used as a constant
|
yading@10
|
2707 in the ratecontrol equation. Recommended range for default rc_eq:
|
yading@10
|
2708 0.0\-1.0.
|
yading@10
|
2709 .IP "\fBqblur\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2710 .IX Item "qblur float (encoding,video)"
|
yading@10
|
2711 Set video quantizer scale blur (\s-1VBR\s0).
|
yading@10
|
2712 .IP "\fBqmin\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2713 .IX Item "qmin integer (encoding,video)"
|
yading@10
|
2714 Set min video quantizer scale (\s-1VBR\s0). Must be included between \-1 and
|
yading@10
|
2715 69, default value is 2.
|
yading@10
|
2716 .IP "\fBqmax\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2717 .IX Item "qmax integer (encoding,video)"
|
yading@10
|
2718 Set max video quantizer scale (\s-1VBR\s0). Must be included between \-1 and
|
yading@10
|
2719 1024, default value is 31.
|
yading@10
|
2720 .IP "\fBqdiff\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2721 .IX Item "qdiff integer (encoding,video)"
|
yading@10
|
2722 Set max difference between the quantizer scale (\s-1VBR\s0).
|
yading@10
|
2723 .IP "\fBbf\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2724 .IX Item "bf integer (encoding,video)"
|
yading@10
|
2725 Set max number of B frames.
|
yading@10
|
2726 .IP "\fBb_qfactor\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2727 .IX Item "b_qfactor float (encoding,video)"
|
yading@10
|
2728 Set qp factor between P and B frames.
|
yading@10
|
2729 .IP "\fBrc_strategy\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2730 .IX Item "rc_strategy integer (encoding,video)"
|
yading@10
|
2731 Set ratecontrol method.
|
yading@10
|
2732 .IP "\fBb_strategy\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2733 .IX Item "b_strategy integer (encoding,video)"
|
yading@10
|
2734 Set strategy to choose between I/P/B\-frames.
|
yading@10
|
2735 .IP "\fBps\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2736 .IX Item "ps integer (encoding,video)"
|
yading@10
|
2737 Set \s-1RTP\s0 payload size in bytes.
|
yading@10
|
2738 .IP "\fBmv_bits\fR \fIinteger\fR" 4
|
yading@10
|
2739 .IX Item "mv_bits integer"
|
yading@10
|
2740 .PD 0
|
yading@10
|
2741 .IP "\fBheader_bits\fR \fIinteger\fR" 4
|
yading@10
|
2742 .IX Item "header_bits integer"
|
yading@10
|
2743 .IP "\fBi_tex_bits\fR \fIinteger\fR" 4
|
yading@10
|
2744 .IX Item "i_tex_bits integer"
|
yading@10
|
2745 .IP "\fBp_tex_bits\fR \fIinteger\fR" 4
|
yading@10
|
2746 .IX Item "p_tex_bits integer"
|
yading@10
|
2747 .IP "\fBi_count\fR \fIinteger\fR" 4
|
yading@10
|
2748 .IX Item "i_count integer"
|
yading@10
|
2749 .IP "\fBp_count\fR \fIinteger\fR" 4
|
yading@10
|
2750 .IX Item "p_count integer"
|
yading@10
|
2751 .IP "\fBskip_count\fR \fIinteger\fR" 4
|
yading@10
|
2752 .IX Item "skip_count integer"
|
yading@10
|
2753 .IP "\fBmisc_bits\fR \fIinteger\fR" 4
|
yading@10
|
2754 .IX Item "misc_bits integer"
|
yading@10
|
2755 .IP "\fBframe_bits\fR \fIinteger\fR" 4
|
yading@10
|
2756 .IX Item "frame_bits integer"
|
yading@10
|
2757 .IP "\fBcodec_tag\fR \fIinteger\fR" 4
|
yading@10
|
2758 .IX Item "codec_tag integer"
|
yading@10
|
2759 .IP "\fBbug\fR \fIflags\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
2760 .IX Item "bug flags (decoding,video)"
|
yading@10
|
2761 .PD
|
yading@10
|
2762 Workaround not auto detected encoder bugs.
|
yading@10
|
2763 .Sp
|
yading@10
|
2764 Possible values:
|
yading@10
|
2765 .RS 4
|
yading@10
|
2766 .IP "\fBautodetect\fR" 4
|
yading@10
|
2767 .IX Item "autodetect"
|
yading@10
|
2768 .PD 0
|
yading@10
|
2769 .IP "\fBold_msmpeg4\fR" 4
|
yading@10
|
2770 .IX Item "old_msmpeg4"
|
yading@10
|
2771 .PD
|
yading@10
|
2772 some old lavc generated msmpeg4v3 files (no autodetection)
|
yading@10
|
2773 .IP "\fBxvid_ilace\fR" 4
|
yading@10
|
2774 .IX Item "xvid_ilace"
|
yading@10
|
2775 Xvid interlacing bug (autodetected if fourcc==XVIX)
|
yading@10
|
2776 .IP "\fBump4\fR" 4
|
yading@10
|
2777 .IX Item "ump4"
|
yading@10
|
2778 (autodetected if fourcc==UMP4)
|
yading@10
|
2779 .IP "\fBno_padding\fR" 4
|
yading@10
|
2780 .IX Item "no_padding"
|
yading@10
|
2781 padding bug (autodetected)
|
yading@10
|
2782 .IP "\fBamv\fR" 4
|
yading@10
|
2783 .IX Item "amv"
|
yading@10
|
2784 .PD 0
|
yading@10
|
2785 .IP "\fBac_vlc\fR" 4
|
yading@10
|
2786 .IX Item "ac_vlc"
|
yading@10
|
2787 .PD
|
yading@10
|
2788 illegal vlc bug (autodetected per fourcc)
|
yading@10
|
2789 .IP "\fBqpel_chroma\fR" 4
|
yading@10
|
2790 .IX Item "qpel_chroma"
|
yading@10
|
2791 .PD 0
|
yading@10
|
2792 .IP "\fBstd_qpel\fR" 4
|
yading@10
|
2793 .IX Item "std_qpel"
|
yading@10
|
2794 .PD
|
yading@10
|
2795 old standard qpel (autodetected per fourcc/version)
|
yading@10
|
2796 .IP "\fBqpel_chroma2\fR" 4
|
yading@10
|
2797 .IX Item "qpel_chroma2"
|
yading@10
|
2798 .PD 0
|
yading@10
|
2799 .IP "\fBdirect_blocksize\fR" 4
|
yading@10
|
2800 .IX Item "direct_blocksize"
|
yading@10
|
2801 .PD
|
yading@10
|
2802 direct-qpel-blocksize bug (autodetected per fourcc/version)
|
yading@10
|
2803 .IP "\fBedge\fR" 4
|
yading@10
|
2804 .IX Item "edge"
|
yading@10
|
2805 edge padding bug (autodetected per fourcc/version)
|
yading@10
|
2806 .IP "\fBhpel_chroma\fR" 4
|
yading@10
|
2807 .IX Item "hpel_chroma"
|
yading@10
|
2808 .PD 0
|
yading@10
|
2809 .IP "\fBdc_clip\fR" 4
|
yading@10
|
2810 .IX Item "dc_clip"
|
yading@10
|
2811 .IP "\fBms\fR" 4
|
yading@10
|
2812 .IX Item "ms"
|
yading@10
|
2813 .PD
|
yading@10
|
2814 Workaround various bugs in microsoft broken decoders.
|
yading@10
|
2815 .IP "\fBtrunc\fR" 4
|
yading@10
|
2816 .IX Item "trunc"
|
yading@10
|
2817 trancated frames
|
yading@10
|
2818 .RE
|
yading@10
|
2819 .RS 4
|
yading@10
|
2820 .RE
|
yading@10
|
2821 .IP "\fBlelim\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2822 .IX Item "lelim integer (encoding,video)"
|
yading@10
|
2823 Set single coefficient elimination threshold for luminance (negative
|
yading@10
|
2824 values also consider \s-1DC\s0 coefficient).
|
yading@10
|
2825 .IP "\fBcelim\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2826 .IX Item "celim integer (encoding,video)"
|
yading@10
|
2827 Set single coefficient elimination threshold for chrominance (negative
|
yading@10
|
2828 values also consider dc coefficient)
|
yading@10
|
2829 .IP "\fBstrict\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
2830 .IX Item "strict integer (decoding/encoding,audio,video)"
|
yading@10
|
2831 Specify how strictly to follow the standards.
|
yading@10
|
2832 .Sp
|
yading@10
|
2833 Possible values:
|
yading@10
|
2834 .RS 4
|
yading@10
|
2835 .IP "\fBvery\fR" 4
|
yading@10
|
2836 .IX Item "very"
|
yading@10
|
2837 strictly conform to a older more strict version of the spec or reference software
|
yading@10
|
2838 .IP "\fBstrict\fR" 4
|
yading@10
|
2839 .IX Item "strict"
|
yading@10
|
2840 strictly conform to all the things in the spec no matter what consequences
|
yading@10
|
2841 .IP "\fBnormal\fR" 4
|
yading@10
|
2842 .IX Item "normal"
|
yading@10
|
2843 .PD 0
|
yading@10
|
2844 .IP "\fBunofficial\fR" 4
|
yading@10
|
2845 .IX Item "unofficial"
|
yading@10
|
2846 .PD
|
yading@10
|
2847 allow unofficial extensions
|
yading@10
|
2848 .IP "\fBexperimental\fR" 4
|
yading@10
|
2849 .IX Item "experimental"
|
yading@10
|
2850 allow non standardized experimental things
|
yading@10
|
2851 .RE
|
yading@10
|
2852 .RS 4
|
yading@10
|
2853 .RE
|
yading@10
|
2854 .IP "\fBb_qoffset\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2855 .IX Item "b_qoffset float (encoding,video)"
|
yading@10
|
2856 Set \s-1QP\s0 offset between P and B frames.
|
yading@10
|
2857 .IP "\fBerr_detect\fR \fIflags\fR \fB(\fR\fIdecoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
2858 .IX Item "err_detect flags (decoding,audio,video)"
|
yading@10
|
2859 Set error detection flags.
|
yading@10
|
2860 .Sp
|
yading@10
|
2861 Possible values:
|
yading@10
|
2862 .RS 4
|
yading@10
|
2863 .IP "\fBcrccheck\fR" 4
|
yading@10
|
2864 .IX Item "crccheck"
|
yading@10
|
2865 verify embedded CRCs
|
yading@10
|
2866 .IP "\fBbitstream\fR" 4
|
yading@10
|
2867 .IX Item "bitstream"
|
yading@10
|
2868 detect bitstream specification deviations
|
yading@10
|
2869 .IP "\fBbuffer\fR" 4
|
yading@10
|
2870 .IX Item "buffer"
|
yading@10
|
2871 detect improper bitstream length
|
yading@10
|
2872 .IP "\fBexplode\fR" 4
|
yading@10
|
2873 .IX Item "explode"
|
yading@10
|
2874 abort decoding on minor error detection
|
yading@10
|
2875 .IP "\fBcareful\fR" 4
|
yading@10
|
2876 .IX Item "careful"
|
yading@10
|
2877 consider things that violate the spec and have not been seen in the wild as errors
|
yading@10
|
2878 .IP "\fBcompliant\fR" 4
|
yading@10
|
2879 .IX Item "compliant"
|
yading@10
|
2880 consider all spec non compliancies as errors
|
yading@10
|
2881 .IP "\fBaggressive\fR" 4
|
yading@10
|
2882 .IX Item "aggressive"
|
yading@10
|
2883 consider things that a sane encoder should not do as an error
|
yading@10
|
2884 .RE
|
yading@10
|
2885 .RS 4
|
yading@10
|
2886 .RE
|
yading@10
|
2887 .IP "\fBhas_b_frames\fR \fIinteger\fR" 4
|
yading@10
|
2888 .IX Item "has_b_frames integer"
|
yading@10
|
2889 .PD 0
|
yading@10
|
2890 .IP "\fBblock_align\fR \fIinteger\fR" 4
|
yading@10
|
2891 .IX Item "block_align integer"
|
yading@10
|
2892 .IP "\fBmpeg_quant\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2893 .IX Item "mpeg_quant integer (encoding,video)"
|
yading@10
|
2894 .PD
|
yading@10
|
2895 Use \s-1MPEG\s0 quantizers instead of H.263.
|
yading@10
|
2896 .IP "\fBqsquish\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2897 .IX Item "qsquish float (encoding,video)"
|
yading@10
|
2898 How to keep quantizer between qmin and qmax (0 = clip, 1 = use
|
yading@10
|
2899 differentiable function).
|
yading@10
|
2900 .IP "\fBrc_qmod_amp\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2901 .IX Item "rc_qmod_amp float (encoding,video)"
|
yading@10
|
2902 Set experimental quantizer modulation.
|
yading@10
|
2903 .IP "\fBrc_qmod_freq\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2904 .IX Item "rc_qmod_freq integer (encoding,video)"
|
yading@10
|
2905 Set experimental quantizer modulation.
|
yading@10
|
2906 .IP "\fBrc_override_count\fR \fIinteger\fR" 4
|
yading@10
|
2907 .IX Item "rc_override_count integer"
|
yading@10
|
2908 .PD 0
|
yading@10
|
2909 .IP "\fBrc_eq\fR \fIstring\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2910 .IX Item "rc_eq string (encoding,video)"
|
yading@10
|
2911 .PD
|
yading@10
|
2912 Set rate control equation. When computing the expression, besides the
|
yading@10
|
2913 standard functions defined in the section 'Expression Evaluation', the
|
yading@10
|
2914 following functions are available: bits2qp(bits), qp2bits(qp). Also
|
yading@10
|
2915 the following constants are available: iTex pTex tex mv fCode iCount
|
yading@10
|
2916 mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
|
yading@10
|
2917 avgTex.
|
yading@10
|
2918 .IP "\fBmaxrate\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
2919 .IX Item "maxrate integer (encoding,audio,video)"
|
yading@10
|
2920 Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
|
yading@10
|
2921 .IP "\fBminrate\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
2922 .IX Item "minrate integer (encoding,audio,video)"
|
yading@10
|
2923 Set min bitrate tolerance (in bits/s). Most useful in setting up a \s-1CBR\s0
|
yading@10
|
2924 encode. It is of little use elsewise.
|
yading@10
|
2925 .IP "\fBbufsize\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
2926 .IX Item "bufsize integer (encoding,audio,video)"
|
yading@10
|
2927 Set ratecontrol buffer size (in bits).
|
yading@10
|
2928 .IP "\fBrc_buf_aggressivity\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2929 .IX Item "rc_buf_aggressivity float (encoding,video)"
|
yading@10
|
2930 Currently useless.
|
yading@10
|
2931 .IP "\fBi_qfactor\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2932 .IX Item "i_qfactor float (encoding,video)"
|
yading@10
|
2933 Set \s-1QP\s0 factor between P and I frames.
|
yading@10
|
2934 .IP "\fBi_qoffset\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2935 .IX Item "i_qoffset float (encoding,video)"
|
yading@10
|
2936 Set \s-1QP\s0 offset between P and I frames.
|
yading@10
|
2937 .IP "\fBrc_init_cplx\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2938 .IX Item "rc_init_cplx float (encoding,video)"
|
yading@10
|
2939 Set initial complexity for 1\-pass encoding.
|
yading@10
|
2940 .IP "\fBdct\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2941 .IX Item "dct integer (encoding,video)"
|
yading@10
|
2942 Set \s-1DCT\s0 algorithm.
|
yading@10
|
2943 .Sp
|
yading@10
|
2944 Possible values:
|
yading@10
|
2945 .RS 4
|
yading@10
|
2946 .IP "\fBauto\fR" 4
|
yading@10
|
2947 .IX Item "auto"
|
yading@10
|
2948 autoselect a good one (default)
|
yading@10
|
2949 .IP "\fBfastint\fR" 4
|
yading@10
|
2950 .IX Item "fastint"
|
yading@10
|
2951 fast integer
|
yading@10
|
2952 .IP "\fBint\fR" 4
|
yading@10
|
2953 .IX Item "int"
|
yading@10
|
2954 accurate integer
|
yading@10
|
2955 .IP "\fBmmx\fR" 4
|
yading@10
|
2956 .IX Item "mmx"
|
yading@10
|
2957 .PD 0
|
yading@10
|
2958 .IP "\fBaltivec\fR" 4
|
yading@10
|
2959 .IX Item "altivec"
|
yading@10
|
2960 .IP "\fBfaan\fR" 4
|
yading@10
|
2961 .IX Item "faan"
|
yading@10
|
2962 .PD
|
yading@10
|
2963 floating point \s-1AAN\s0 \s-1DCT\s0
|
yading@10
|
2964 .RE
|
yading@10
|
2965 .RS 4
|
yading@10
|
2966 .RE
|
yading@10
|
2967 .IP "\fBlumi_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2968 .IX Item "lumi_mask float (encoding,video)"
|
yading@10
|
2969 Compress bright areas stronger than medium ones.
|
yading@10
|
2970 .IP "\fBtcplx_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2971 .IX Item "tcplx_mask float (encoding,video)"
|
yading@10
|
2972 Set temporal complexity masking.
|
yading@10
|
2973 .IP "\fBscplx_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2974 .IX Item "scplx_mask float (encoding,video)"
|
yading@10
|
2975 Set spatial complexity masking.
|
yading@10
|
2976 .IP "\fBp_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2977 .IX Item "p_mask float (encoding,video)"
|
yading@10
|
2978 Set inter masking.
|
yading@10
|
2979 .IP "\fBdark_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
2980 .IX Item "dark_mask float (encoding,video)"
|
yading@10
|
2981 Compress dark areas stronger than medium ones.
|
yading@10
|
2982 .IP "\fBidct\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
2983 .IX Item "idct integer (decoding/encoding,video)"
|
yading@10
|
2984 Select \s-1IDCT\s0 implementation.
|
yading@10
|
2985 .Sp
|
yading@10
|
2986 Possible values:
|
yading@10
|
2987 .RS 4
|
yading@10
|
2988 .IP "\fBauto\fR" 4
|
yading@10
|
2989 .IX Item "auto"
|
yading@10
|
2990 .PD 0
|
yading@10
|
2991 .IP "\fBint\fR" 4
|
yading@10
|
2992 .IX Item "int"
|
yading@10
|
2993 .IP "\fBsimple\fR" 4
|
yading@10
|
2994 .IX Item "simple"
|
yading@10
|
2995 .IP "\fBsimplemmx\fR" 4
|
yading@10
|
2996 .IX Item "simplemmx"
|
yading@10
|
2997 .IP "\fBlibmpeg2mmx\fR" 4
|
yading@10
|
2998 .IX Item "libmpeg2mmx"
|
yading@10
|
2999 .IP "\fBmmi\fR" 4
|
yading@10
|
3000 .IX Item "mmi"
|
yading@10
|
3001 .IP "\fBarm\fR" 4
|
yading@10
|
3002 .IX Item "arm"
|
yading@10
|
3003 .IP "\fBaltivec\fR" 4
|
yading@10
|
3004 .IX Item "altivec"
|
yading@10
|
3005 .IP "\fBsh4\fR" 4
|
yading@10
|
3006 .IX Item "sh4"
|
yading@10
|
3007 .IP "\fBsimplearm\fR" 4
|
yading@10
|
3008 .IX Item "simplearm"
|
yading@10
|
3009 .IP "\fBsimplearmv5te\fR" 4
|
yading@10
|
3010 .IX Item "simplearmv5te"
|
yading@10
|
3011 .IP "\fBsimplearmv6\fR" 4
|
yading@10
|
3012 .IX Item "simplearmv6"
|
yading@10
|
3013 .IP "\fBsimpleneon\fR" 4
|
yading@10
|
3014 .IX Item "simpleneon"
|
yading@10
|
3015 .IP "\fBsimplealpha\fR" 4
|
yading@10
|
3016 .IX Item "simplealpha"
|
yading@10
|
3017 .IP "\fBh264\fR" 4
|
yading@10
|
3018 .IX Item "h264"
|
yading@10
|
3019 .IP "\fBvp3\fR" 4
|
yading@10
|
3020 .IX Item "vp3"
|
yading@10
|
3021 .IP "\fBipp\fR" 4
|
yading@10
|
3022 .IX Item "ipp"
|
yading@10
|
3023 .IP "\fBxvidmmx\fR" 4
|
yading@10
|
3024 .IX Item "xvidmmx"
|
yading@10
|
3025 .IP "\fBfaani\fR" 4
|
yading@10
|
3026 .IX Item "faani"
|
yading@10
|
3027 .PD
|
yading@10
|
3028 floating point \s-1AAN\s0 \s-1IDCT\s0
|
yading@10
|
3029 .RE
|
yading@10
|
3030 .RS 4
|
yading@10
|
3031 .RE
|
yading@10
|
3032 .IP "\fBslice_count\fR \fIinteger\fR" 4
|
yading@10
|
3033 .IX Item "slice_count integer"
|
yading@10
|
3034 .PD 0
|
yading@10
|
3035 .IP "\fBec\fR \fIflags\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3036 .IX Item "ec flags (decoding,video)"
|
yading@10
|
3037 .PD
|
yading@10
|
3038 Set error concealment strategy.
|
yading@10
|
3039 .Sp
|
yading@10
|
3040 Possible values:
|
yading@10
|
3041 .RS 4
|
yading@10
|
3042 .IP "\fBguess_mvs\fR" 4
|
yading@10
|
3043 .IX Item "guess_mvs"
|
yading@10
|
3044 iterative motion vector (\s-1MV\s0) search (slow)
|
yading@10
|
3045 .IP "\fBdeblock\fR" 4
|
yading@10
|
3046 .IX Item "deblock"
|
yading@10
|
3047 use strong deblock filter for damaged MBs
|
yading@10
|
3048 .RE
|
yading@10
|
3049 .RS 4
|
yading@10
|
3050 .RE
|
yading@10
|
3051 .IP "\fBbits_per_coded_sample\fR \fIinteger\fR" 4
|
yading@10
|
3052 .IX Item "bits_per_coded_sample integer"
|
yading@10
|
3053 .PD 0
|
yading@10
|
3054 .IP "\fBpred\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3055 .IX Item "pred integer (encoding,video)"
|
yading@10
|
3056 .PD
|
yading@10
|
3057 Set prediction method.
|
yading@10
|
3058 .Sp
|
yading@10
|
3059 Possible values:
|
yading@10
|
3060 .RS 4
|
yading@10
|
3061 .IP "\fBleft\fR" 4
|
yading@10
|
3062 .IX Item "left"
|
yading@10
|
3063 .PD 0
|
yading@10
|
3064 .IP "\fBplane\fR" 4
|
yading@10
|
3065 .IX Item "plane"
|
yading@10
|
3066 .IP "\fBmedian\fR" 4
|
yading@10
|
3067 .IX Item "median"
|
yading@10
|
3068 .RE
|
yading@10
|
3069 .RS 4
|
yading@10
|
3070 .RE
|
yading@10
|
3071 .IP "\fBaspect\fR \fIrational number\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3072 .IX Item "aspect rational number (encoding,video)"
|
yading@10
|
3073 .PD
|
yading@10
|
3074 Set sample aspect ratio.
|
yading@10
|
3075 .IP "\fBdebug\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video,subtitles\fR\fB)\fR" 4
|
yading@10
|
3076 .IX Item "debug flags (decoding/encoding,audio,video,subtitles)"
|
yading@10
|
3077 Print specific debug info.
|
yading@10
|
3078 .Sp
|
yading@10
|
3079 Possible values:
|
yading@10
|
3080 .RS 4
|
yading@10
|
3081 .IP "\fBpict\fR" 4
|
yading@10
|
3082 .IX Item "pict"
|
yading@10
|
3083 picture info
|
yading@10
|
3084 .IP "\fBrc\fR" 4
|
yading@10
|
3085 .IX Item "rc"
|
yading@10
|
3086 rate control
|
yading@10
|
3087 .IP "\fBbitstream\fR" 4
|
yading@10
|
3088 .IX Item "bitstream"
|
yading@10
|
3089 .PD 0
|
yading@10
|
3090 .IP "\fBmb_type\fR" 4
|
yading@10
|
3091 .IX Item "mb_type"
|
yading@10
|
3092 .PD
|
yading@10
|
3093 macroblock (\s-1MB\s0) type
|
yading@10
|
3094 .IP "\fBqp\fR" 4
|
yading@10
|
3095 .IX Item "qp"
|
yading@10
|
3096 per-block quantization parameter (\s-1QP\s0)
|
yading@10
|
3097 .IP "\fBmv\fR" 4
|
yading@10
|
3098 .IX Item "mv"
|
yading@10
|
3099 motion vector
|
yading@10
|
3100 .IP "\fBdct_coeff\fR" 4
|
yading@10
|
3101 .IX Item "dct_coeff"
|
yading@10
|
3102 .PD 0
|
yading@10
|
3103 .IP "\fBskip\fR" 4
|
yading@10
|
3104 .IX Item "skip"
|
yading@10
|
3105 .IP "\fBstartcode\fR" 4
|
yading@10
|
3106 .IX Item "startcode"
|
yading@10
|
3107 .IP "\fBpts\fR" 4
|
yading@10
|
3108 .IX Item "pts"
|
yading@10
|
3109 .IP "\fBer\fR" 4
|
yading@10
|
3110 .IX Item "er"
|
yading@10
|
3111 .PD
|
yading@10
|
3112 error recognition
|
yading@10
|
3113 .IP "\fBmmco\fR" 4
|
yading@10
|
3114 .IX Item "mmco"
|
yading@10
|
3115 memory management control operations (H.264)
|
yading@10
|
3116 .IP "\fBbugs\fR" 4
|
yading@10
|
3117 .IX Item "bugs"
|
yading@10
|
3118 .PD 0
|
yading@10
|
3119 .IP "\fBvis_qp\fR" 4
|
yading@10
|
3120 .IX Item "vis_qp"
|
yading@10
|
3121 .PD
|
yading@10
|
3122 visualize quantization parameter (\s-1QP\s0), lower \s-1QP\s0 are tinted greener
|
yading@10
|
3123 .IP "\fBvis_mb_type\fR" 4
|
yading@10
|
3124 .IX Item "vis_mb_type"
|
yading@10
|
3125 visualize block types
|
yading@10
|
3126 .IP "\fBbuffers\fR" 4
|
yading@10
|
3127 .IX Item "buffers"
|
yading@10
|
3128 picture buffer allocations
|
yading@10
|
3129 .IP "\fBthread_ops\fR" 4
|
yading@10
|
3130 .IX Item "thread_ops"
|
yading@10
|
3131 threading operations
|
yading@10
|
3132 .RE
|
yading@10
|
3133 .RS 4
|
yading@10
|
3134 .RE
|
yading@10
|
3135 .IP "\fBvismv\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3136 .IX Item "vismv integer (decoding,video)"
|
yading@10
|
3137 Visualize motion vectors (MVs).
|
yading@10
|
3138 .Sp
|
yading@10
|
3139 Possible values:
|
yading@10
|
3140 .RS 4
|
yading@10
|
3141 .IP "\fBpf\fR" 4
|
yading@10
|
3142 .IX Item "pf"
|
yading@10
|
3143 forward predicted MVs of P\-frames
|
yading@10
|
3144 .IP "\fBbf\fR" 4
|
yading@10
|
3145 .IX Item "bf"
|
yading@10
|
3146 forward predicted MVs of B\-frames
|
yading@10
|
3147 .IP "\fBbb\fR" 4
|
yading@10
|
3148 .IX Item "bb"
|
yading@10
|
3149 backward predicted MVs of B\-frames
|
yading@10
|
3150 .RE
|
yading@10
|
3151 .RS 4
|
yading@10
|
3152 .RE
|
yading@10
|
3153 .IP "\fBcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3154 .IX Item "cmp integer (encoding,video)"
|
yading@10
|
3155 Set full pel me compare function.
|
yading@10
|
3156 .Sp
|
yading@10
|
3157 Possible values:
|
yading@10
|
3158 .RS 4
|
yading@10
|
3159 .IP "\fBsad\fR" 4
|
yading@10
|
3160 .IX Item "sad"
|
yading@10
|
3161 sum of absolute differences, fast (default)
|
yading@10
|
3162 .IP "\fBsse\fR" 4
|
yading@10
|
3163 .IX Item "sse"
|
yading@10
|
3164 sum of squared errors
|
yading@10
|
3165 .IP "\fBsatd\fR" 4
|
yading@10
|
3166 .IX Item "satd"
|
yading@10
|
3167 sum of absolute Hadamard transformed differences
|
yading@10
|
3168 .IP "\fBdct\fR" 4
|
yading@10
|
3169 .IX Item "dct"
|
yading@10
|
3170 sum of absolute \s-1DCT\s0 transformed differences
|
yading@10
|
3171 .IP "\fBpsnr\fR" 4
|
yading@10
|
3172 .IX Item "psnr"
|
yading@10
|
3173 sum of squared quantization errors (avoid, low quality)
|
yading@10
|
3174 .IP "\fBbit\fR" 4
|
yading@10
|
3175 .IX Item "bit"
|
yading@10
|
3176 number of bits needed for the block
|
yading@10
|
3177 .IP "\fBrd\fR" 4
|
yading@10
|
3178 .IX Item "rd"
|
yading@10
|
3179 rate distortion optimal, slow
|
yading@10
|
3180 .IP "\fBzero\fR" 4
|
yading@10
|
3181 .IX Item "zero"
|
yading@10
|
3182 0
|
yading@10
|
3183 .IP "\fBvsad\fR" 4
|
yading@10
|
3184 .IX Item "vsad"
|
yading@10
|
3185 sum of absolute vertical differences
|
yading@10
|
3186 .IP "\fBvsse\fR" 4
|
yading@10
|
3187 .IX Item "vsse"
|
yading@10
|
3188 sum of squared vertical differences
|
yading@10
|
3189 .IP "\fBnsse\fR" 4
|
yading@10
|
3190 .IX Item "nsse"
|
yading@10
|
3191 noise preserving sum of squared differences
|
yading@10
|
3192 .IP "\fBw53\fR" 4
|
yading@10
|
3193 .IX Item "w53"
|
yading@10
|
3194 5/3 wavelet, only used in snow
|
yading@10
|
3195 .IP "\fBw97\fR" 4
|
yading@10
|
3196 .IX Item "w97"
|
yading@10
|
3197 9/7 wavelet, only used in snow
|
yading@10
|
3198 .IP "\fBdctmax\fR" 4
|
yading@10
|
3199 .IX Item "dctmax"
|
yading@10
|
3200 .PD 0
|
yading@10
|
3201 .IP "\fBchroma\fR" 4
|
yading@10
|
3202 .IX Item "chroma"
|
yading@10
|
3203 .RE
|
yading@10
|
3204 .RS 4
|
yading@10
|
3205 .RE
|
yading@10
|
3206 .IP "\fBsubcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3207 .IX Item "subcmp integer (encoding,video)"
|
yading@10
|
3208 .PD
|
yading@10
|
3209 Set sub pel me compare function.
|
yading@10
|
3210 .Sp
|
yading@10
|
3211 Possible values:
|
yading@10
|
3212 .RS 4
|
yading@10
|
3213 .IP "\fBsad\fR" 4
|
yading@10
|
3214 .IX Item "sad"
|
yading@10
|
3215 sum of absolute differences, fast (default)
|
yading@10
|
3216 .IP "\fBsse\fR" 4
|
yading@10
|
3217 .IX Item "sse"
|
yading@10
|
3218 sum of squared errors
|
yading@10
|
3219 .IP "\fBsatd\fR" 4
|
yading@10
|
3220 .IX Item "satd"
|
yading@10
|
3221 sum of absolute Hadamard transformed differences
|
yading@10
|
3222 .IP "\fBdct\fR" 4
|
yading@10
|
3223 .IX Item "dct"
|
yading@10
|
3224 sum of absolute \s-1DCT\s0 transformed differences
|
yading@10
|
3225 .IP "\fBpsnr\fR" 4
|
yading@10
|
3226 .IX Item "psnr"
|
yading@10
|
3227 sum of squared quantization errors (avoid, low quality)
|
yading@10
|
3228 .IP "\fBbit\fR" 4
|
yading@10
|
3229 .IX Item "bit"
|
yading@10
|
3230 number of bits needed for the block
|
yading@10
|
3231 .IP "\fBrd\fR" 4
|
yading@10
|
3232 .IX Item "rd"
|
yading@10
|
3233 rate distortion optimal, slow
|
yading@10
|
3234 .IP "\fBzero\fR" 4
|
yading@10
|
3235 .IX Item "zero"
|
yading@10
|
3236 0
|
yading@10
|
3237 .IP "\fBvsad\fR" 4
|
yading@10
|
3238 .IX Item "vsad"
|
yading@10
|
3239 sum of absolute vertical differences
|
yading@10
|
3240 .IP "\fBvsse\fR" 4
|
yading@10
|
3241 .IX Item "vsse"
|
yading@10
|
3242 sum of squared vertical differences
|
yading@10
|
3243 .IP "\fBnsse\fR" 4
|
yading@10
|
3244 .IX Item "nsse"
|
yading@10
|
3245 noise preserving sum of squared differences
|
yading@10
|
3246 .IP "\fBw53\fR" 4
|
yading@10
|
3247 .IX Item "w53"
|
yading@10
|
3248 5/3 wavelet, only used in snow
|
yading@10
|
3249 .IP "\fBw97\fR" 4
|
yading@10
|
3250 .IX Item "w97"
|
yading@10
|
3251 9/7 wavelet, only used in snow
|
yading@10
|
3252 .IP "\fBdctmax\fR" 4
|
yading@10
|
3253 .IX Item "dctmax"
|
yading@10
|
3254 .PD 0
|
yading@10
|
3255 .IP "\fBchroma\fR" 4
|
yading@10
|
3256 .IX Item "chroma"
|
yading@10
|
3257 .RE
|
yading@10
|
3258 .RS 4
|
yading@10
|
3259 .RE
|
yading@10
|
3260 .IP "\fBmbcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3261 .IX Item "mbcmp integer (encoding,video)"
|
yading@10
|
3262 .PD
|
yading@10
|
3263 Set macroblock compare function.
|
yading@10
|
3264 .Sp
|
yading@10
|
3265 Possible values:
|
yading@10
|
3266 .RS 4
|
yading@10
|
3267 .IP "\fBsad\fR" 4
|
yading@10
|
3268 .IX Item "sad"
|
yading@10
|
3269 sum of absolute differences, fast (default)
|
yading@10
|
3270 .IP "\fBsse\fR" 4
|
yading@10
|
3271 .IX Item "sse"
|
yading@10
|
3272 sum of squared errors
|
yading@10
|
3273 .IP "\fBsatd\fR" 4
|
yading@10
|
3274 .IX Item "satd"
|
yading@10
|
3275 sum of absolute Hadamard transformed differences
|
yading@10
|
3276 .IP "\fBdct\fR" 4
|
yading@10
|
3277 .IX Item "dct"
|
yading@10
|
3278 sum of absolute \s-1DCT\s0 transformed differences
|
yading@10
|
3279 .IP "\fBpsnr\fR" 4
|
yading@10
|
3280 .IX Item "psnr"
|
yading@10
|
3281 sum of squared quantization errors (avoid, low quality)
|
yading@10
|
3282 .IP "\fBbit\fR" 4
|
yading@10
|
3283 .IX Item "bit"
|
yading@10
|
3284 number of bits needed for the block
|
yading@10
|
3285 .IP "\fBrd\fR" 4
|
yading@10
|
3286 .IX Item "rd"
|
yading@10
|
3287 rate distortion optimal, slow
|
yading@10
|
3288 .IP "\fBzero\fR" 4
|
yading@10
|
3289 .IX Item "zero"
|
yading@10
|
3290 0
|
yading@10
|
3291 .IP "\fBvsad\fR" 4
|
yading@10
|
3292 .IX Item "vsad"
|
yading@10
|
3293 sum of absolute vertical differences
|
yading@10
|
3294 .IP "\fBvsse\fR" 4
|
yading@10
|
3295 .IX Item "vsse"
|
yading@10
|
3296 sum of squared vertical differences
|
yading@10
|
3297 .IP "\fBnsse\fR" 4
|
yading@10
|
3298 .IX Item "nsse"
|
yading@10
|
3299 noise preserving sum of squared differences
|
yading@10
|
3300 .IP "\fBw53\fR" 4
|
yading@10
|
3301 .IX Item "w53"
|
yading@10
|
3302 5/3 wavelet, only used in snow
|
yading@10
|
3303 .IP "\fBw97\fR" 4
|
yading@10
|
3304 .IX Item "w97"
|
yading@10
|
3305 9/7 wavelet, only used in snow
|
yading@10
|
3306 .IP "\fBdctmax\fR" 4
|
yading@10
|
3307 .IX Item "dctmax"
|
yading@10
|
3308 .PD 0
|
yading@10
|
3309 .IP "\fBchroma\fR" 4
|
yading@10
|
3310 .IX Item "chroma"
|
yading@10
|
3311 .RE
|
yading@10
|
3312 .RS 4
|
yading@10
|
3313 .RE
|
yading@10
|
3314 .IP "\fBildctcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3315 .IX Item "ildctcmp integer (encoding,video)"
|
yading@10
|
3316 .PD
|
yading@10
|
3317 Set interlaced dct compare function.
|
yading@10
|
3318 .Sp
|
yading@10
|
3319 Possible values:
|
yading@10
|
3320 .RS 4
|
yading@10
|
3321 .IP "\fBsad\fR" 4
|
yading@10
|
3322 .IX Item "sad"
|
yading@10
|
3323 sum of absolute differences, fast (default)
|
yading@10
|
3324 .IP "\fBsse\fR" 4
|
yading@10
|
3325 .IX Item "sse"
|
yading@10
|
3326 sum of squared errors
|
yading@10
|
3327 .IP "\fBsatd\fR" 4
|
yading@10
|
3328 .IX Item "satd"
|
yading@10
|
3329 sum of absolute Hadamard transformed differences
|
yading@10
|
3330 .IP "\fBdct\fR" 4
|
yading@10
|
3331 .IX Item "dct"
|
yading@10
|
3332 sum of absolute \s-1DCT\s0 transformed differences
|
yading@10
|
3333 .IP "\fBpsnr\fR" 4
|
yading@10
|
3334 .IX Item "psnr"
|
yading@10
|
3335 sum of squared quantization errors (avoid, low quality)
|
yading@10
|
3336 .IP "\fBbit\fR" 4
|
yading@10
|
3337 .IX Item "bit"
|
yading@10
|
3338 number of bits needed for the block
|
yading@10
|
3339 .IP "\fBrd\fR" 4
|
yading@10
|
3340 .IX Item "rd"
|
yading@10
|
3341 rate distortion optimal, slow
|
yading@10
|
3342 .IP "\fBzero\fR" 4
|
yading@10
|
3343 .IX Item "zero"
|
yading@10
|
3344 0
|
yading@10
|
3345 .IP "\fBvsad\fR" 4
|
yading@10
|
3346 .IX Item "vsad"
|
yading@10
|
3347 sum of absolute vertical differences
|
yading@10
|
3348 .IP "\fBvsse\fR" 4
|
yading@10
|
3349 .IX Item "vsse"
|
yading@10
|
3350 sum of squared vertical differences
|
yading@10
|
3351 .IP "\fBnsse\fR" 4
|
yading@10
|
3352 .IX Item "nsse"
|
yading@10
|
3353 noise preserving sum of squared differences
|
yading@10
|
3354 .IP "\fBw53\fR" 4
|
yading@10
|
3355 .IX Item "w53"
|
yading@10
|
3356 5/3 wavelet, only used in snow
|
yading@10
|
3357 .IP "\fBw97\fR" 4
|
yading@10
|
3358 .IX Item "w97"
|
yading@10
|
3359 9/7 wavelet, only used in snow
|
yading@10
|
3360 .IP "\fBdctmax\fR" 4
|
yading@10
|
3361 .IX Item "dctmax"
|
yading@10
|
3362 .PD 0
|
yading@10
|
3363 .IP "\fBchroma\fR" 4
|
yading@10
|
3364 .IX Item "chroma"
|
yading@10
|
3365 .RE
|
yading@10
|
3366 .RS 4
|
yading@10
|
3367 .RE
|
yading@10
|
3368 .IP "\fBdia_size\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3369 .IX Item "dia_size integer (encoding,video)"
|
yading@10
|
3370 .PD
|
yading@10
|
3371 Set diamond type & size for motion estimation.
|
yading@10
|
3372 .IP "\fBlast_pred\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3373 .IX Item "last_pred integer (encoding,video)"
|
yading@10
|
3374 Set amount of motion predictors from the previous frame.
|
yading@10
|
3375 .IP "\fBpreme\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3376 .IX Item "preme integer (encoding,video)"
|
yading@10
|
3377 Set pre motion estimation.
|
yading@10
|
3378 .IP "\fBprecmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3379 .IX Item "precmp integer (encoding,video)"
|
yading@10
|
3380 Set pre motion estimation compare function.
|
yading@10
|
3381 .Sp
|
yading@10
|
3382 Possible values:
|
yading@10
|
3383 .RS 4
|
yading@10
|
3384 .IP "\fBsad\fR" 4
|
yading@10
|
3385 .IX Item "sad"
|
yading@10
|
3386 sum of absolute differences, fast (default)
|
yading@10
|
3387 .IP "\fBsse\fR" 4
|
yading@10
|
3388 .IX Item "sse"
|
yading@10
|
3389 sum of squared errors
|
yading@10
|
3390 .IP "\fBsatd\fR" 4
|
yading@10
|
3391 .IX Item "satd"
|
yading@10
|
3392 sum of absolute Hadamard transformed differences
|
yading@10
|
3393 .IP "\fBdct\fR" 4
|
yading@10
|
3394 .IX Item "dct"
|
yading@10
|
3395 sum of absolute \s-1DCT\s0 transformed differences
|
yading@10
|
3396 .IP "\fBpsnr\fR" 4
|
yading@10
|
3397 .IX Item "psnr"
|
yading@10
|
3398 sum of squared quantization errors (avoid, low quality)
|
yading@10
|
3399 .IP "\fBbit\fR" 4
|
yading@10
|
3400 .IX Item "bit"
|
yading@10
|
3401 number of bits needed for the block
|
yading@10
|
3402 .IP "\fBrd\fR" 4
|
yading@10
|
3403 .IX Item "rd"
|
yading@10
|
3404 rate distortion optimal, slow
|
yading@10
|
3405 .IP "\fBzero\fR" 4
|
yading@10
|
3406 .IX Item "zero"
|
yading@10
|
3407 0
|
yading@10
|
3408 .IP "\fBvsad\fR" 4
|
yading@10
|
3409 .IX Item "vsad"
|
yading@10
|
3410 sum of absolute vertical differences
|
yading@10
|
3411 .IP "\fBvsse\fR" 4
|
yading@10
|
3412 .IX Item "vsse"
|
yading@10
|
3413 sum of squared vertical differences
|
yading@10
|
3414 .IP "\fBnsse\fR" 4
|
yading@10
|
3415 .IX Item "nsse"
|
yading@10
|
3416 noise preserving sum of squared differences
|
yading@10
|
3417 .IP "\fBw53\fR" 4
|
yading@10
|
3418 .IX Item "w53"
|
yading@10
|
3419 5/3 wavelet, only used in snow
|
yading@10
|
3420 .IP "\fBw97\fR" 4
|
yading@10
|
3421 .IX Item "w97"
|
yading@10
|
3422 9/7 wavelet, only used in snow
|
yading@10
|
3423 .IP "\fBdctmax\fR" 4
|
yading@10
|
3424 .IX Item "dctmax"
|
yading@10
|
3425 .PD 0
|
yading@10
|
3426 .IP "\fBchroma\fR" 4
|
yading@10
|
3427 .IX Item "chroma"
|
yading@10
|
3428 .RE
|
yading@10
|
3429 .RS 4
|
yading@10
|
3430 .RE
|
yading@10
|
3431 .IP "\fBpre_dia_size\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3432 .IX Item "pre_dia_size integer (encoding,video)"
|
yading@10
|
3433 .PD
|
yading@10
|
3434 Set diamond type & size for motion estimation pre-pass.
|
yading@10
|
3435 .IP "\fBsubq\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3436 .IX Item "subq integer (encoding,video)"
|
yading@10
|
3437 Set sub pel motion estimation quality.
|
yading@10
|
3438 .IP "\fBdtg_active_format\fR \fIinteger\fR" 4
|
yading@10
|
3439 .IX Item "dtg_active_format integer"
|
yading@10
|
3440 .PD 0
|
yading@10
|
3441 .IP "\fBme_range\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3442 .IX Item "me_range integer (encoding,video)"
|
yading@10
|
3443 .PD
|
yading@10
|
3444 Set limit motion vectors range (1023 for DivX player).
|
yading@10
|
3445 .IP "\fBibias\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3446 .IX Item "ibias integer (encoding,video)"
|
yading@10
|
3447 Set intra quant bias.
|
yading@10
|
3448 .IP "\fBpbias\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3449 .IX Item "pbias integer (encoding,video)"
|
yading@10
|
3450 Set inter quant bias.
|
yading@10
|
3451 .IP "\fBcolor_table_id\fR \fIinteger\fR" 4
|
yading@10
|
3452 .IX Item "color_table_id integer"
|
yading@10
|
3453 .PD 0
|
yading@10
|
3454 .IP "\fBglobal_quality\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3455 .IX Item "global_quality integer (encoding,audio,video)"
|
yading@10
|
3456 .IP "\fBcoder\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3457 .IX Item "coder integer (encoding,video)"
|
yading@10
|
3458 .PD
|
yading@10
|
3459 Possible values:
|
yading@10
|
3460 .RS 4
|
yading@10
|
3461 .IP "\fBvlc\fR" 4
|
yading@10
|
3462 .IX Item "vlc"
|
yading@10
|
3463 variable length coder / huffman coder
|
yading@10
|
3464 .IP "\fBac\fR" 4
|
yading@10
|
3465 .IX Item "ac"
|
yading@10
|
3466 arithmetic coder
|
yading@10
|
3467 .IP "\fBraw\fR" 4
|
yading@10
|
3468 .IX Item "raw"
|
yading@10
|
3469 raw (no encoding)
|
yading@10
|
3470 .IP "\fBrle\fR" 4
|
yading@10
|
3471 .IX Item "rle"
|
yading@10
|
3472 run-length coder
|
yading@10
|
3473 .IP "\fBdeflate\fR" 4
|
yading@10
|
3474 .IX Item "deflate"
|
yading@10
|
3475 deflate-based coder
|
yading@10
|
3476 .RE
|
yading@10
|
3477 .RS 4
|
yading@10
|
3478 .RE
|
yading@10
|
3479 .IP "\fBcontext\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3480 .IX Item "context integer (encoding,video)"
|
yading@10
|
3481 Set context model.
|
yading@10
|
3482 .IP "\fBslice_flags\fR \fIinteger\fR" 4
|
yading@10
|
3483 .IX Item "slice_flags integer"
|
yading@10
|
3484 .PD 0
|
yading@10
|
3485 .IP "\fBxvmc_acceleration\fR \fIinteger\fR" 4
|
yading@10
|
3486 .IX Item "xvmc_acceleration integer"
|
yading@10
|
3487 .IP "\fBmbd\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3488 .IX Item "mbd integer (encoding,video)"
|
yading@10
|
3489 .PD
|
yading@10
|
3490 Set macroblock decision algorithm (high quality mode).
|
yading@10
|
3491 .Sp
|
yading@10
|
3492 Possible values:
|
yading@10
|
3493 .RS 4
|
yading@10
|
3494 .IP "\fBsimple\fR" 4
|
yading@10
|
3495 .IX Item "simple"
|
yading@10
|
3496 use mbcmp (default)
|
yading@10
|
3497 .IP "\fBbits\fR" 4
|
yading@10
|
3498 .IX Item "bits"
|
yading@10
|
3499 use fewest bits
|
yading@10
|
3500 .IP "\fBrd\fR" 4
|
yading@10
|
3501 .IX Item "rd"
|
yading@10
|
3502 use best rate distortion
|
yading@10
|
3503 .RE
|
yading@10
|
3504 .RS 4
|
yading@10
|
3505 .RE
|
yading@10
|
3506 .IP "\fBstream_codec_tag\fR \fIinteger\fR" 4
|
yading@10
|
3507 .IX Item "stream_codec_tag integer"
|
yading@10
|
3508 .PD 0
|
yading@10
|
3509 .IP "\fBsc_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3510 .IX Item "sc_threshold integer (encoding,video)"
|
yading@10
|
3511 .PD
|
yading@10
|
3512 Set scene change threshold.
|
yading@10
|
3513 .IP "\fBlmin\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3514 .IX Item "lmin integer (encoding,video)"
|
yading@10
|
3515 Set min lagrange factor (\s-1VBR\s0).
|
yading@10
|
3516 .IP "\fBlmax\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3517 .IX Item "lmax integer (encoding,video)"
|
yading@10
|
3518 Set max lagrange factor (\s-1VBR\s0).
|
yading@10
|
3519 .IP "\fBnr\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3520 .IX Item "nr integer (encoding,video)"
|
yading@10
|
3521 Set noise reduction.
|
yading@10
|
3522 .IP "\fBrc_init_occupancy\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3523 .IX Item "rc_init_occupancy integer (encoding,video)"
|
yading@10
|
3524 Set number of bits which should be loaded into the rc buffer before
|
yading@10
|
3525 decoding starts.
|
yading@10
|
3526 .IP "\fBinter_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3527 .IX Item "inter_threshold integer (encoding,video)"
|
yading@10
|
3528 .PD 0
|
yading@10
|
3529 .IP "\fBflags2\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3530 .IX Item "flags2 flags (decoding/encoding,audio,video)"
|
yading@10
|
3531 .PD
|
yading@10
|
3532 Possible values:
|
yading@10
|
3533 .RS 4
|
yading@10
|
3534 .IP "\fBfast\fR" 4
|
yading@10
|
3535 .IX Item "fast"
|
yading@10
|
3536 allow non spec compliant speedup tricks
|
yading@10
|
3537 .IP "\fBsgop\fR" 4
|
yading@10
|
3538 .IX Item "sgop"
|
yading@10
|
3539 Deprecated, use mpegvideo private options instead
|
yading@10
|
3540 .IP "\fBnoout\fR" 4
|
yading@10
|
3541 .IX Item "noout"
|
yading@10
|
3542 skip bitstream encoding
|
yading@10
|
3543 .IP "\fBlocal_header\fR" 4
|
yading@10
|
3544 .IX Item "local_header"
|
yading@10
|
3545 place global headers at every keyframe instead of in extradata
|
yading@10
|
3546 .IP "\fBchunks\fR" 4
|
yading@10
|
3547 .IX Item "chunks"
|
yading@10
|
3548 Frame data might be split into multiple chunks
|
yading@10
|
3549 .IP "\fBshowall\fR" 4
|
yading@10
|
3550 .IX Item "showall"
|
yading@10
|
3551 Show all frames before the first keyframe
|
yading@10
|
3552 .IP "\fBskiprd\fR" 4
|
yading@10
|
3553 .IX Item "skiprd"
|
yading@10
|
3554 Deprecated, use mpegvideo private options instead
|
yading@10
|
3555 .RE
|
yading@10
|
3556 .RS 4
|
yading@10
|
3557 .RE
|
yading@10
|
3558 .IP "\fBerror\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3559 .IX Item "error integer (encoding,video)"
|
yading@10
|
3560 .PD 0
|
yading@10
|
3561 .IP "\fBqns\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3562 .IX Item "qns integer (encoding,video)"
|
yading@10
|
3563 .PD
|
yading@10
|
3564 Deprecated, use mpegvideo private options instead.
|
yading@10
|
3565 .IP "\fBthreads\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3566 .IX Item "threads integer (decoding/encoding,video)"
|
yading@10
|
3567 Possible values:
|
yading@10
|
3568 .RS 4
|
yading@10
|
3569 .IP "\fBauto\fR" 4
|
yading@10
|
3570 .IX Item "auto"
|
yading@10
|
3571 detect a good number of threads
|
yading@10
|
3572 .RE
|
yading@10
|
3573 .RS 4
|
yading@10
|
3574 .RE
|
yading@10
|
3575 .IP "\fBme_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3576 .IX Item "me_threshold integer (encoding,video)"
|
yading@10
|
3577 Set motion estimation threshold.
|
yading@10
|
3578 .IP "\fBmb_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3579 .IX Item "mb_threshold integer (encoding,video)"
|
yading@10
|
3580 Set macroblock threshold.
|
yading@10
|
3581 .IP "\fBdc\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3582 .IX Item "dc integer (encoding,video)"
|
yading@10
|
3583 Set intra_dc_precision.
|
yading@10
|
3584 .IP "\fBnssew\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3585 .IX Item "nssew integer (encoding,video)"
|
yading@10
|
3586 Set nsse weight.
|
yading@10
|
3587 .IP "\fBskip_top\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3588 .IX Item "skip_top integer (decoding,video)"
|
yading@10
|
3589 Set number of macroblock rows at the top which are skipped.
|
yading@10
|
3590 .IP "\fBskip_bottom\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3591 .IX Item "skip_bottom integer (decoding,video)"
|
yading@10
|
3592 Set number of macroblock rows at the bottom which are skipped.
|
yading@10
|
3593 .IP "\fBprofile\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3594 .IX Item "profile integer (encoding,audio,video)"
|
yading@10
|
3595 Possible values:
|
yading@10
|
3596 .RS 4
|
yading@10
|
3597 .IP "\fBunknown\fR" 4
|
yading@10
|
3598 .IX Item "unknown"
|
yading@10
|
3599 .PD 0
|
yading@10
|
3600 .IP "\fBaac_main\fR" 4
|
yading@10
|
3601 .IX Item "aac_main"
|
yading@10
|
3602 .IP "\fBaac_low\fR" 4
|
yading@10
|
3603 .IX Item "aac_low"
|
yading@10
|
3604 .IP "\fBaac_ssr\fR" 4
|
yading@10
|
3605 .IX Item "aac_ssr"
|
yading@10
|
3606 .IP "\fBaac_ltp\fR" 4
|
yading@10
|
3607 .IX Item "aac_ltp"
|
yading@10
|
3608 .IP "\fBaac_he\fR" 4
|
yading@10
|
3609 .IX Item "aac_he"
|
yading@10
|
3610 .IP "\fBaac_he_v2\fR" 4
|
yading@10
|
3611 .IX Item "aac_he_v2"
|
yading@10
|
3612 .IP "\fBaac_ld\fR" 4
|
yading@10
|
3613 .IX Item "aac_ld"
|
yading@10
|
3614 .IP "\fBaac_eld\fR" 4
|
yading@10
|
3615 .IX Item "aac_eld"
|
yading@10
|
3616 .IP "\fBdts\fR" 4
|
yading@10
|
3617 .IX Item "dts"
|
yading@10
|
3618 .IP "\fBdts_es\fR" 4
|
yading@10
|
3619 .IX Item "dts_es"
|
yading@10
|
3620 .IP "\fBdts_96_24\fR" 4
|
yading@10
|
3621 .IX Item "dts_96_24"
|
yading@10
|
3622 .IP "\fBdts_hd_hra\fR" 4
|
yading@10
|
3623 .IX Item "dts_hd_hra"
|
yading@10
|
3624 .IP "\fBdts_hd_ma\fR" 4
|
yading@10
|
3625 .IX Item "dts_hd_ma"
|
yading@10
|
3626 .RE
|
yading@10
|
3627 .RS 4
|
yading@10
|
3628 .RE
|
yading@10
|
3629 .IP "\fBlevel\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3630 .IX Item "level integer (encoding,audio,video)"
|
yading@10
|
3631 .PD
|
yading@10
|
3632 Possible values:
|
yading@10
|
3633 .RS 4
|
yading@10
|
3634 .IP "\fBunknown\fR" 4
|
yading@10
|
3635 .IX Item "unknown"
|
yading@10
|
3636 .RE
|
yading@10
|
3637 .RS 4
|
yading@10
|
3638 .RE
|
yading@10
|
3639 .PD 0
|
yading@10
|
3640 .IP "\fBlowres\fR \fIinteger\fR \fB(\fR\fIdecoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3641 .IX Item "lowres integer (decoding,audio,video)"
|
yading@10
|
3642 .PD
|
yading@10
|
3643 Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
|
yading@10
|
3644 .IP "\fBskip_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3645 .IX Item "skip_threshold integer (encoding,video)"
|
yading@10
|
3646 Set frame skip threshold.
|
yading@10
|
3647 .IP "\fBskip_factor\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3648 .IX Item "skip_factor integer (encoding,video)"
|
yading@10
|
3649 Set frame skip factor.
|
yading@10
|
3650 .IP "\fBskip_exp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3651 .IX Item "skip_exp integer (encoding,video)"
|
yading@10
|
3652 Set frame skip exponent.
|
yading@10
|
3653 .IP "\fBskipcmp\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3654 .IX Item "skipcmp integer (encoding,video)"
|
yading@10
|
3655 Set frame skip compare function.
|
yading@10
|
3656 .Sp
|
yading@10
|
3657 Possible values:
|
yading@10
|
3658 .RS 4
|
yading@10
|
3659 .IP "\fBsad\fR" 4
|
yading@10
|
3660 .IX Item "sad"
|
yading@10
|
3661 sum of absolute differences, fast (default)
|
yading@10
|
3662 .IP "\fBsse\fR" 4
|
yading@10
|
3663 .IX Item "sse"
|
yading@10
|
3664 sum of squared errors
|
yading@10
|
3665 .IP "\fBsatd\fR" 4
|
yading@10
|
3666 .IX Item "satd"
|
yading@10
|
3667 sum of absolute Hadamard transformed differences
|
yading@10
|
3668 .IP "\fBdct\fR" 4
|
yading@10
|
3669 .IX Item "dct"
|
yading@10
|
3670 sum of absolute \s-1DCT\s0 transformed differences
|
yading@10
|
3671 .IP "\fBpsnr\fR" 4
|
yading@10
|
3672 .IX Item "psnr"
|
yading@10
|
3673 sum of squared quantization errors (avoid, low quality)
|
yading@10
|
3674 .IP "\fBbit\fR" 4
|
yading@10
|
3675 .IX Item "bit"
|
yading@10
|
3676 number of bits needed for the block
|
yading@10
|
3677 .IP "\fBrd\fR" 4
|
yading@10
|
3678 .IX Item "rd"
|
yading@10
|
3679 rate distortion optimal, slow
|
yading@10
|
3680 .IP "\fBzero\fR" 4
|
yading@10
|
3681 .IX Item "zero"
|
yading@10
|
3682 0
|
yading@10
|
3683 .IP "\fBvsad\fR" 4
|
yading@10
|
3684 .IX Item "vsad"
|
yading@10
|
3685 sum of absolute vertical differences
|
yading@10
|
3686 .IP "\fBvsse\fR" 4
|
yading@10
|
3687 .IX Item "vsse"
|
yading@10
|
3688 sum of squared vertical differences
|
yading@10
|
3689 .IP "\fBnsse\fR" 4
|
yading@10
|
3690 .IX Item "nsse"
|
yading@10
|
3691 noise preserving sum of squared differences
|
yading@10
|
3692 .IP "\fBw53\fR" 4
|
yading@10
|
3693 .IX Item "w53"
|
yading@10
|
3694 5/3 wavelet, only used in snow
|
yading@10
|
3695 .IP "\fBw97\fR" 4
|
yading@10
|
3696 .IX Item "w97"
|
yading@10
|
3697 9/7 wavelet, only used in snow
|
yading@10
|
3698 .IP "\fBdctmax\fR" 4
|
yading@10
|
3699 .IX Item "dctmax"
|
yading@10
|
3700 .PD 0
|
yading@10
|
3701 .IP "\fBchroma\fR" 4
|
yading@10
|
3702 .IX Item "chroma"
|
yading@10
|
3703 .RE
|
yading@10
|
3704 .RS 4
|
yading@10
|
3705 .RE
|
yading@10
|
3706 .IP "\fBborder_mask\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3707 .IX Item "border_mask float (encoding,video)"
|
yading@10
|
3708 .PD
|
yading@10
|
3709 Increase the quantizer for macroblocks close to borders.
|
yading@10
|
3710 .IP "\fBmblmin\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3711 .IX Item "mblmin integer (encoding,video)"
|
yading@10
|
3712 Set min macroblock lagrange factor (\s-1VBR\s0).
|
yading@10
|
3713 .IP "\fBmblmax\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3714 .IX Item "mblmax integer (encoding,video)"
|
yading@10
|
3715 Set max macroblock lagrange factor (\s-1VBR\s0).
|
yading@10
|
3716 .IP "\fBmepc\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3717 .IX Item "mepc integer (encoding,video)"
|
yading@10
|
3718 Set motion estimation bitrate penalty compensation (1.0 = 256).
|
yading@10
|
3719 .IP "\fBskip_loop_filter\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3720 .IX Item "skip_loop_filter integer (decoding,video)"
|
yading@10
|
3721 .PD 0
|
yading@10
|
3722 .IP "\fBskip_idct\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3723 .IX Item "skip_idct integer (decoding,video)"
|
yading@10
|
3724 .IP "\fBskip_frame\fR \fIinteger\fR \fB(\fR\fIdecoding,video\fR\fB)\fR" 4
|
yading@10
|
3725 .IX Item "skip_frame integer (decoding,video)"
|
yading@10
|
3726 .PD
|
yading@10
|
3727 Make decoder discard processing depending on the frame type selected
|
yading@10
|
3728 by the option value.
|
yading@10
|
3729 .Sp
|
yading@10
|
3730 \&\fBskip_loop_filter\fR skips frame loop filtering, \fBskip_idct\fR
|
yading@10
|
3731 skips frame IDCT/dequantization, \fBskip_frame\fR skips decoding.
|
yading@10
|
3732 .Sp
|
yading@10
|
3733 Possible values:
|
yading@10
|
3734 .RS 4
|
yading@10
|
3735 .IP "\fBnone\fR" 4
|
yading@10
|
3736 .IX Item "none"
|
yading@10
|
3737 Discard no frame.
|
yading@10
|
3738 .IP "\fBdefault\fR" 4
|
yading@10
|
3739 .IX Item "default"
|
yading@10
|
3740 Discard useless frames like 0\-sized frames.
|
yading@10
|
3741 .IP "\fBnoref\fR" 4
|
yading@10
|
3742 .IX Item "noref"
|
yading@10
|
3743 Discard all non-reference frames.
|
yading@10
|
3744 .IP "\fBbidir\fR" 4
|
yading@10
|
3745 .IX Item "bidir"
|
yading@10
|
3746 Discard all bidirectional frames.
|
yading@10
|
3747 .IP "\fBnokey\fR" 4
|
yading@10
|
3748 .IX Item "nokey"
|
yading@10
|
3749 Discard all frames excepts keyframes.
|
yading@10
|
3750 .IP "\fBall\fR" 4
|
yading@10
|
3751 .IX Item "all"
|
yading@10
|
3752 Discard all frames.
|
yading@10
|
3753 .RE
|
yading@10
|
3754 .RS 4
|
yading@10
|
3755 .Sp
|
yading@10
|
3756 Default value is \fBdefault\fR.
|
yading@10
|
3757 .RE
|
yading@10
|
3758 .IP "\fBbidir_refine\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3759 .IX Item "bidir_refine integer (encoding,video)"
|
yading@10
|
3760 Refine the two motion vectors used in bidirectional macroblocks.
|
yading@10
|
3761 .IP "\fBbrd_scale\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3762 .IX Item "brd_scale integer (encoding,video)"
|
yading@10
|
3763 Downscale frames for dynamic B\-frame decision.
|
yading@10
|
3764 .IP "\fBkeyint_min\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3765 .IX Item "keyint_min integer (encoding,video)"
|
yading@10
|
3766 Set minimum interval between IDR-frames.
|
yading@10
|
3767 .IP "\fBrefs\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3768 .IX Item "refs integer (encoding,video)"
|
yading@10
|
3769 Set reference frames to consider for motion compensation.
|
yading@10
|
3770 .IP "\fBchromaoffset\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3771 .IX Item "chromaoffset integer (encoding,video)"
|
yading@10
|
3772 Set chroma qp offset from luma.
|
yading@10
|
3773 .IP "\fBtrellis\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3774 .IX Item "trellis integer (encoding,audio,video)"
|
yading@10
|
3775 Set rate-distortion optimal quantization.
|
yading@10
|
3776 .IP "\fBsc_factor\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3777 .IX Item "sc_factor integer (encoding,video)"
|
yading@10
|
3778 Set value multiplied by qscale for each frame and added to
|
yading@10
|
3779 scene_change_score.
|
yading@10
|
3780 .IP "\fBmv0_threshold\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3781 .IX Item "mv0_threshold integer (encoding,video)"
|
yading@10
|
3782 .PD 0
|
yading@10
|
3783 .IP "\fBb_sensitivity\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3784 .IX Item "b_sensitivity integer (encoding,video)"
|
yading@10
|
3785 .PD
|
yading@10
|
3786 Adjust sensitivity of b_frame_strategy 1.
|
yading@10
|
3787 .IP "\fBcompression_level\fR \fIinteger\fR \fB(\fR\fIencoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3788 .IX Item "compression_level integer (encoding,audio,video)"
|
yading@10
|
3789 .PD 0
|
yading@10
|
3790 .IP "\fBmin_prediction_order\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4
|
yading@10
|
3791 .IX Item "min_prediction_order integer (encoding,audio)"
|
yading@10
|
3792 .IP "\fBmax_prediction_order\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4
|
yading@10
|
3793 .IX Item "max_prediction_order integer (encoding,audio)"
|
yading@10
|
3794 .IP "\fBtimecode_frame_start\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3795 .IX Item "timecode_frame_start integer (encoding,video)"
|
yading@10
|
3796 .PD
|
yading@10
|
3797 Set \s-1GOP\s0 timecode frame start number, in non drop frame format.
|
yading@10
|
3798 .IP "\fBrequest_channels\fR \fIinteger\fR \fB(\fR\fIdecoding,audio\fR\fB)\fR" 4
|
yading@10
|
3799 .IX Item "request_channels integer (decoding,audio)"
|
yading@10
|
3800 Set desired number of audio channels.
|
yading@10
|
3801 .IP "\fBbits_per_raw_sample\fR \fIinteger\fR" 4
|
yading@10
|
3802 .IX Item "bits_per_raw_sample integer"
|
yading@10
|
3803 .PD 0
|
yading@10
|
3804 .IP "\fBchannel_layout\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio\fR\fB)\fR" 4
|
yading@10
|
3805 .IX Item "channel_layout integer (decoding/encoding,audio)"
|
yading@10
|
3806 .PD
|
yading@10
|
3807 Possible values:
|
yading@10
|
3808 .IP "\fBrequest_channel_layout\fR \fIinteger\fR \fB(\fR\fIdecoding,audio\fR\fB)\fR" 4
|
yading@10
|
3809 .IX Item "request_channel_layout integer (decoding,audio)"
|
yading@10
|
3810 Possible values:
|
yading@10
|
3811 .IP "\fBrc_max_vbv_use\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3812 .IX Item "rc_max_vbv_use float (encoding,video)"
|
yading@10
|
3813 .PD 0
|
yading@10
|
3814 .IP "\fBrc_min_vbv_use\fR \fIfloat\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3815 .IX Item "rc_min_vbv_use float (encoding,video)"
|
yading@10
|
3816 .IP "\fBticks_per_frame\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,audio,video\fR\fB)\fR" 4
|
yading@10
|
3817 .IX Item "ticks_per_frame integer (decoding/encoding,audio,video)"
|
yading@10
|
3818 .IP "\fBcolor_primaries\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3819 .IX Item "color_primaries integer (decoding/encoding,video)"
|
yading@10
|
3820 .IP "\fBcolor_trc\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3821 .IX Item "color_trc integer (decoding/encoding,video)"
|
yading@10
|
3822 .IP "\fBcolorspace\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3823 .IX Item "colorspace integer (decoding/encoding,video)"
|
yading@10
|
3824 .IP "\fBcolor_range\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3825 .IX Item "color_range integer (decoding/encoding,video)"
|
yading@10
|
3826 .IP "\fBchroma_sample_location\fR \fIinteger\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3827 .IX Item "chroma_sample_location integer (decoding/encoding,video)"
|
yading@10
|
3828 .IP "\fBlog_level_offset\fR \fIinteger\fR" 4
|
yading@10
|
3829 .IX Item "log_level_offset integer"
|
yading@10
|
3830 .PD
|
yading@10
|
3831 Set the log level offset.
|
yading@10
|
3832 .IP "\fBslices\fR \fIinteger\fR \fB(\fR\fIencoding,video\fR\fB)\fR" 4
|
yading@10
|
3833 .IX Item "slices integer (encoding,video)"
|
yading@10
|
3834 Number of slices, used in parallelized encoding.
|
yading@10
|
3835 .IP "\fBthread_type\fR \fIflags\fR \fB(\fR\fIdecoding/encoding,video\fR\fB)\fR" 4
|
yading@10
|
3836 .IX Item "thread_type flags (decoding/encoding,video)"
|
yading@10
|
3837 Select multithreading type.
|
yading@10
|
3838 .Sp
|
yading@10
|
3839 Possible values:
|
yading@10
|
3840 .RS 4
|
yading@10
|
3841 .IP "\fBslice\fR" 4
|
yading@10
|
3842 .IX Item "slice"
|
yading@10
|
3843 .PD 0
|
yading@10
|
3844 .IP "\fBframe\fR" 4
|
yading@10
|
3845 .IX Item "frame"
|
yading@10
|
3846 .RE
|
yading@10
|
3847 .RS 4
|
yading@10
|
3848 .RE
|
yading@10
|
3849 .IP "\fBaudio_service_type\fR \fIinteger\fR \fB(\fR\fIencoding,audio\fR\fB)\fR" 4
|
yading@10
|
3850 .IX Item "audio_service_type integer (encoding,audio)"
|
yading@10
|
3851 .PD
|
yading@10
|
3852 Set audio service type.
|
yading@10
|
3853 .Sp
|
yading@10
|
3854 Possible values:
|
yading@10
|
3855 .RS 4
|
yading@10
|
3856 .IP "\fBma\fR" 4
|
yading@10
|
3857 .IX Item "ma"
|
yading@10
|
3858 Main Audio Service
|
yading@10
|
3859 .IP "\fBef\fR" 4
|
yading@10
|
3860 .IX Item "ef"
|
yading@10
|
3861 Effects
|
yading@10
|
3862 .IP "\fBvi\fR" 4
|
yading@10
|
3863 .IX Item "vi"
|
yading@10
|
3864 Visually Impaired
|
yading@10
|
3865 .IP "\fBhi\fR" 4
|
yading@10
|
3866 .IX Item "hi"
|
yading@10
|
3867 Hearing Impaired
|
yading@10
|
3868 .IP "\fBdi\fR" 4
|
yading@10
|
3869 .IX Item "di"
|
yading@10
|
3870 Dialogue
|
yading@10
|
3871 .IP "\fBco\fR" 4
|
yading@10
|
3872 .IX Item "co"
|
yading@10
|
3873 Commentary
|
yading@10
|
3874 .IP "\fBem\fR" 4
|
yading@10
|
3875 .IX Item "em"
|
yading@10
|
3876 Emergency
|
yading@10
|
3877 .IP "\fBvo\fR" 4
|
yading@10
|
3878 .IX Item "vo"
|
yading@10
|
3879 Voice Over
|
yading@10
|
3880 .IP "\fBka\fR" 4
|
yading@10
|
3881 .IX Item "ka"
|
yading@10
|
3882 Karaoke
|
yading@10
|
3883 .RE
|
yading@10
|
3884 .RS 4
|
yading@10
|
3885 .RE
|
yading@10
|
3886 .IP "\fBrequest_sample_fmt\fR \fIsample_fmt\fR \fB(\fR\fIdecoding,audio\fR\fB)\fR" 4
|
yading@10
|
3887 .IX Item "request_sample_fmt sample_fmt (decoding,audio)"
|
yading@10
|
3888 Set sample format audio decoders should prefer. Default value is
|
yading@10
|
3889 \&\f(CW\*(C`none\*(C'\fR.
|
yading@10
|
3890 .IP "\fBpkt_timebase\fR \fIrational number\fR" 4
|
yading@10
|
3891 .IX Item "pkt_timebase rational number"
|
yading@10
|
3892 .PD 0
|
yading@10
|
3893 .IP "\fBsub_charenc\fR \fIencoding\fR \fB(\fR\fIdecoding,subtitles\fR\fB)\fR" 4
|
yading@10
|
3894 .IX Item "sub_charenc encoding (decoding,subtitles)"
|
yading@10
|
3895 .PD
|
yading@10
|
3896 Set the input subtitles character encoding.
|
yading@10
|
3897 .SH "DECODERS"
|
yading@10
|
3898 .IX Header "DECODERS"
|
yading@10
|
3899 Decoders are configured elements in FFmpeg which allow the decoding of
|
yading@10
|
3900 multimedia streams.
|
yading@10
|
3901 .PP
|
yading@10
|
3902 When you configure your FFmpeg build, all the supported native decoders
|
yading@10
|
3903 are enabled by default. Decoders requiring an external library must be enabled
|
yading@10
|
3904 manually via the corresponding \f(CW\*(C`\-\-enable\-lib\*(C'\fR option. You can list all
|
yading@10
|
3905 available decoders using the configure option \f(CW\*(C`\-\-list\-decoders\*(C'\fR.
|
yading@10
|
3906 .PP
|
yading@10
|
3907 You can disable all the decoders with the configure option
|
yading@10
|
3908 \&\f(CW\*(C`\-\-disable\-decoders\*(C'\fR and selectively enable / disable single decoders
|
yading@10
|
3909 with the options \f(CW\*(C`\-\-enable\-decoder=\f(CIDECODER\f(CW\*(C'\fR /
|
yading@10
|
3910 \&\f(CW\*(C`\-\-disable\-decoder=\f(CIDECODER\f(CW\*(C'\fR.
|
yading@10
|
3911 .PP
|
yading@10
|
3912 The option \f(CW\*(C`\-codecs\*(C'\fR of the ff* tools will display the list of
|
yading@10
|
3913 enabled decoders.
|
yading@10
|
3914 .SH "VIDEO DECODERS"
|
yading@10
|
3915 .IX Header "VIDEO DECODERS"
|
yading@10
|
3916 A description of some of the currently available video decoders
|
yading@10
|
3917 follows.
|
yading@10
|
3918 .SS "rawvideo"
|
yading@10
|
3919 .IX Subsection "rawvideo"
|
yading@10
|
3920 Raw video decoder.
|
yading@10
|
3921 .PP
|
yading@10
|
3922 This decoder decodes rawvideo streams.
|
yading@10
|
3923 .PP
|
yading@10
|
3924 \fIOptions\fR
|
yading@10
|
3925 .IX Subsection "Options"
|
yading@10
|
3926 .IP "\fBtop\fR \fItop_field_first\fR" 4
|
yading@10
|
3927 .IX Item "top top_field_first"
|
yading@10
|
3928 Specify the assumed field type of the input video.
|
yading@10
|
3929 .RS 4
|
yading@10
|
3930 .IP "\fB\-1\fR" 4
|
yading@10
|
3931 .IX Item "-1"
|
yading@10
|
3932 the video is assumed to be progressive (default)
|
yading@10
|
3933 .IP "\fB0\fR" 4
|
yading@10
|
3934 .IX Item "0"
|
yading@10
|
3935 bottom-field-first is assumed
|
yading@10
|
3936 .IP "\fB1\fR" 4
|
yading@10
|
3937 .IX Item "1"
|
yading@10
|
3938 top-field-first is assumed
|
yading@10
|
3939 .RE
|
yading@10
|
3940 .RS 4
|
yading@10
|
3941 .RE
|
yading@10
|
3942 .SH "AUDIO DECODERS"
|
yading@10
|
3943 .IX Header "AUDIO DECODERS"
|
yading@10
|
3944 .SS "ffwavesynth"
|
yading@10
|
3945 .IX Subsection "ffwavesynth"
|
yading@10
|
3946 Internal wave synthetizer.
|
yading@10
|
3947 .PP
|
yading@10
|
3948 This decoder generates wave patterns according to predefined sequences. Its
|
yading@10
|
3949 use is purely internal and the format of the data it accepts is not publicly
|
yading@10
|
3950 documented.
|
yading@10
|
3951 .SH "SUBTITLES DECODERS"
|
yading@10
|
3952 .IX Header "SUBTITLES DECODERS"
|
yading@10
|
3953 .SS "dvdsub"
|
yading@10
|
3954 .IX Subsection "dvdsub"
|
yading@10
|
3955 This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
|
yading@10
|
3956 also be found in VobSub file pairs and in some Matroska files.
|
yading@10
|
3957 .PP
|
yading@10
|
3958 \fIOptions\fR
|
yading@10
|
3959 .IX Subsection "Options"
|
yading@10
|
3960 .IP "\fBpalette\fR" 4
|
yading@10
|
3961 .IX Item "palette"
|
yading@10
|
3962 Specify the global palette used by the bitmaps. When stored in VobSub, the
|
yading@10
|
3963 palette is normally specified in the index file; in Matroska, the palette is
|
yading@10
|
3964 stored in the codec extra-data in the same format as in VobSub. In DVDs, the
|
yading@10
|
3965 palette is stored in the \s-1IFO\s0 file, and therefore not available when reading
|
yading@10
|
3966 from dumped \s-1VOB\s0 files.
|
yading@10
|
3967 .Sp
|
yading@10
|
3968 The format for this option is a string containing 16 24\-bits hexadecimal
|
yading@10
|
3969 numbers (without 0x prefix) separated by comas, for example \f(CW\*(C`0d00ee,
|
yading@10
|
3970 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
|
yading@10
|
3971 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b\*(C'\fR.
|
yading@10
|
3972 .SH "ENCODERS"
|
yading@10
|
3973 .IX Header "ENCODERS"
|
yading@10
|
3974 Encoders are configured elements in FFmpeg which allow the encoding of
|
yading@10
|
3975 multimedia streams.
|
yading@10
|
3976 .PP
|
yading@10
|
3977 When you configure your FFmpeg build, all the supported native encoders
|
yading@10
|
3978 are enabled by default. Encoders requiring an external library must be enabled
|
yading@10
|
3979 manually via the corresponding \f(CW\*(C`\-\-enable\-lib\*(C'\fR option. You can list all
|
yading@10
|
3980 available encoders using the configure option \f(CW\*(C`\-\-list\-encoders\*(C'\fR.
|
yading@10
|
3981 .PP
|
yading@10
|
3982 You can disable all the encoders with the configure option
|
yading@10
|
3983 \&\f(CW\*(C`\-\-disable\-encoders\*(C'\fR and selectively enable / disable single encoders
|
yading@10
|
3984 with the options \f(CW\*(C`\-\-enable\-encoder=\f(CIENCODER\f(CW\*(C'\fR /
|
yading@10
|
3985 \&\f(CW\*(C`\-\-disable\-encoder=\f(CIENCODER\f(CW\*(C'\fR.
|
yading@10
|
3986 .PP
|
yading@10
|
3987 The option \f(CW\*(C`\-codecs\*(C'\fR of the ff* tools will display the list of
|
yading@10
|
3988 enabled encoders.
|
yading@10
|
3989 .SH "AUDIO ENCODERS"
|
yading@10
|
3990 .IX Header "AUDIO ENCODERS"
|
yading@10
|
3991 A description of some of the currently available audio encoders
|
yading@10
|
3992 follows.
|
yading@10
|
3993 .SS "ac3 and ac3_fixed"
|
yading@10
|
3994 .IX Subsection "ac3 and ac3_fixed"
|
yading@10
|
3995 \&\s-1AC\-3\s0 audio encoders.
|
yading@10
|
3996 .PP
|
yading@10
|
3997 These encoders implement part of \s-1ATSC\s0 A/52:2010 and \s-1ETSI\s0 \s-1TS\s0 102 366, as well as
|
yading@10
|
3998 the undocumented RealAudio 3 (a.k.a. dnet).
|
yading@10
|
3999 .PP
|
yading@10
|
4000 The \fIac3\fR encoder uses floating-point math, while the \fIac3_fixed\fR
|
yading@10
|
4001 encoder only uses fixed-point integer math. This does not mean that one is
|
yading@10
|
4002 always faster, just that one or the other may be better suited to a
|
yading@10
|
4003 particular system. The floating-point encoder will generally produce better
|
yading@10
|
4004 quality audio for a given bitrate. The \fIac3_fixed\fR encoder is not the
|
yading@10
|
4005 default codec for any of the output formats, so it must be specified explicitly
|
yading@10
|
4006 using the option \f(CW\*(C`\-acodec ac3_fixed\*(C'\fR in order to use it.
|
yading@10
|
4007 .PP
|
yading@10
|
4008 \fI\s-1AC\-3\s0 Metadata\fR
|
yading@10
|
4009 .IX Subsection "AC-3 Metadata"
|
yading@10
|
4010 .PP
|
yading@10
|
4011 The \s-1AC\-3\s0 metadata options are used to set parameters that describe the audio,
|
yading@10
|
4012 but in most cases do not affect the audio encoding itself. Some of the options
|
yading@10
|
4013 do directly affect or influence the decoding and playback of the resulting
|
yading@10
|
4014 bitstream, while others are just for informational purposes. A few of the
|
yading@10
|
4015 options will add bits to the output stream that could otherwise be used for
|
yading@10
|
4016 audio data, and will thus affect the quality of the output. Those will be
|
yading@10
|
4017 indicated accordingly with a note in the option list below.
|
yading@10
|
4018 .PP
|
yading@10
|
4019 These parameters are described in detail in several publicly-available
|
yading@10
|
4020 documents.
|
yading@10
|
4021 .IP "*<<\fBhttp://www.atsc.org/cms/standards/a_52\-2010.pdf\fR>>" 4
|
yading@10
|
4022 .IX Item "*<<http://www.atsc.org/cms/standards/a_52-2010.pdf>>"
|
yading@10
|
4023 .PD 0
|
yading@10
|
4024 .IP "*<<\fBhttp://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf\fR>>" 4
|
yading@10
|
4025 .IX Item "*<<http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf>>"
|
yading@10
|
4026 .IP "*<<\fBhttp://www.dolby.com/uploadedFiles/zz\-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf\fR>>" 4
|
yading@10
|
4027 .IX Item "*<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf>>"
|
yading@10
|
4028 .IP "*<<\fBhttp://www.dolby.com/uploadedFiles/zz\-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf\fR>>" 4
|
yading@10
|
4029 .IX Item "*<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf>>"
|
yading@10
|
4030 .PD
|
yading@10
|
4031 .PP
|
yading@10
|
4032 Metadata Control Options
|
yading@10
|
4033 .IX Subsection "Metadata Control Options"
|
yading@10
|
4034 .IP "\fB\-per_frame_metadata\fR \fIboolean\fR" 4
|
yading@10
|
4035 .IX Item "-per_frame_metadata boolean"
|
yading@10
|
4036 Allow Per-Frame Metadata. Specifies if the encoder should check for changing
|
yading@10
|
4037 metadata for each frame.
|
yading@10
|
4038 .RS 4
|
yading@10
|
4039 .IP "\fB0\fR" 4
|
yading@10
|
4040 .IX Item "0"
|
yading@10
|
4041 The metadata values set at initialization will be used for every frame in the
|
yading@10
|
4042 stream. (default)
|
yading@10
|
4043 .IP "\fB1\fR" 4
|
yading@10
|
4044 .IX Item "1"
|
yading@10
|
4045 Metadata values can be changed before encoding each frame.
|
yading@10
|
4046 .RE
|
yading@10
|
4047 .RS 4
|
yading@10
|
4048 .RE
|
yading@10
|
4049 .PP
|
yading@10
|
4050 Downmix Levels
|
yading@10
|
4051 .IX Subsection "Downmix Levels"
|
yading@10
|
4052 .IP "\fB\-center_mixlev\fR \fIlevel\fR" 4
|
yading@10
|
4053 .IX Item "-center_mixlev level"
|
yading@10
|
4054 Center Mix Level. The amount of gain the decoder should apply to the center
|
yading@10
|
4055 channel when downmixing to stereo. This field will only be written to the
|
yading@10
|
4056 bitstream if a center channel is present. The value is specified as a scale
|
yading@10
|
4057 factor. There are 3 valid values:
|
yading@10
|
4058 .RS 4
|
yading@10
|
4059 .IP "\fB0.707\fR" 4
|
yading@10
|
4060 .IX Item "0.707"
|
yading@10
|
4061 Apply \-3dB gain
|
yading@10
|
4062 .IP "\fB0.595\fR" 4
|
yading@10
|
4063 .IX Item "0.595"
|
yading@10
|
4064 Apply \-4.5dB gain (default)
|
yading@10
|
4065 .IP "\fB0.500\fR" 4
|
yading@10
|
4066 .IX Item "0.500"
|
yading@10
|
4067 Apply \-6dB gain
|
yading@10
|
4068 .RE
|
yading@10
|
4069 .RS 4
|
yading@10
|
4070 .RE
|
yading@10
|
4071 .IP "\fB\-surround_mixlev\fR \fIlevel\fR" 4
|
yading@10
|
4072 .IX Item "-surround_mixlev level"
|
yading@10
|
4073 Surround Mix Level. The amount of gain the decoder should apply to the surround
|
yading@10
|
4074 channel(s) when downmixing to stereo. This field will only be written to the
|
yading@10
|
4075 bitstream if one or more surround channels are present. The value is specified
|
yading@10
|
4076 as a scale factor. There are 3 valid values:
|
yading@10
|
4077 .RS 4
|
yading@10
|
4078 .IP "\fB0.707\fR" 4
|
yading@10
|
4079 .IX Item "0.707"
|
yading@10
|
4080 Apply \-3dB gain
|
yading@10
|
4081 .IP "\fB0.500\fR" 4
|
yading@10
|
4082 .IX Item "0.500"
|
yading@10
|
4083 Apply \-6dB gain (default)
|
yading@10
|
4084 .IP "\fB0.000\fR" 4
|
yading@10
|
4085 .IX Item "0.000"
|
yading@10
|
4086 Silence Surround Channel(s)
|
yading@10
|
4087 .RE
|
yading@10
|
4088 .RS 4
|
yading@10
|
4089 .RE
|
yading@10
|
4090 .PP
|
yading@10
|
4091 Audio Production Information
|
yading@10
|
4092 .IX Subsection "Audio Production Information"
|
yading@10
|
4093 .PP
|
yading@10
|
4094 Audio Production Information is optional information describing the mixing
|
yading@10
|
4095 environment. Either none or both of the fields are written to the bitstream.
|
yading@10
|
4096 .IP "\fB\-mixing_level\fR \fInumber\fR" 4
|
yading@10
|
4097 .IX Item "-mixing_level number"
|
yading@10
|
4098 Mixing Level. Specifies peak sound pressure level (\s-1SPL\s0) in the production
|
yading@10
|
4099 environment when the mix was mastered. Valid values are 80 to 111, or \-1 for
|
yading@10
|
4100 unknown or not indicated. The default value is \-1, but that value cannot be
|
yading@10
|
4101 used if the Audio Production Information is written to the bitstream. Therefore,
|
yading@10
|
4102 if the \f(CW\*(C`room_type\*(C'\fR option is not the default value, the \f(CW\*(C`mixing_level\*(C'\fR
|
yading@10
|
4103 option must not be \-1.
|
yading@10
|
4104 .IP "\fB\-room_type\fR \fItype\fR" 4
|
yading@10
|
4105 .IX Item "-room_type type"
|
yading@10
|
4106 Room Type. Describes the equalization used during the final mixing session at
|
yading@10
|
4107 the studio or on the dubbing stage. A large room is a dubbing stage with the
|
yading@10
|
4108 industry standard X\-curve equalization; a small room has flat equalization.
|
yading@10
|
4109 This field will not be written to the bitstream if both the \f(CW\*(C`mixing_level\*(C'\fR
|
yading@10
|
4110 option and the \f(CW\*(C`room_type\*(C'\fR option have the default values.
|
yading@10
|
4111 .RS 4
|
yading@10
|
4112 .IP "\fB0\fR" 4
|
yading@10
|
4113 .IX Item "0"
|
yading@10
|
4114 .PD 0
|
yading@10
|
4115 .IP "\fBnotindicated\fR" 4
|
yading@10
|
4116 .IX Item "notindicated"
|
yading@10
|
4117 .PD
|
yading@10
|
4118 Not Indicated (default)
|
yading@10
|
4119 .IP "\fB1\fR" 4
|
yading@10
|
4120 .IX Item "1"
|
yading@10
|
4121 .PD 0
|
yading@10
|
4122 .IP "\fBlarge\fR" 4
|
yading@10
|
4123 .IX Item "large"
|
yading@10
|
4124 .PD
|
yading@10
|
4125 Large Room
|
yading@10
|
4126 .IP "\fB2\fR" 4
|
yading@10
|
4127 .IX Item "2"
|
yading@10
|
4128 .PD 0
|
yading@10
|
4129 .IP "\fBsmall\fR" 4
|
yading@10
|
4130 .IX Item "small"
|
yading@10
|
4131 .PD
|
yading@10
|
4132 Small Room
|
yading@10
|
4133 .RE
|
yading@10
|
4134 .RS 4
|
yading@10
|
4135 .RE
|
yading@10
|
4136 .PP
|
yading@10
|
4137 Other Metadata Options
|
yading@10
|
4138 .IX Subsection "Other Metadata Options"
|
yading@10
|
4139 .IP "\fB\-copyright\fR \fIboolean\fR" 4
|
yading@10
|
4140 .IX Item "-copyright boolean"
|
yading@10
|
4141 Copyright Indicator. Specifies whether a copyright exists for this audio.
|
yading@10
|
4142 .RS 4
|
yading@10
|
4143 .IP "\fB0\fR" 4
|
yading@10
|
4144 .IX Item "0"
|
yading@10
|
4145 .PD 0
|
yading@10
|
4146 .IP "\fBoff\fR" 4
|
yading@10
|
4147 .IX Item "off"
|
yading@10
|
4148 .PD
|
yading@10
|
4149 No Copyright Exists (default)
|
yading@10
|
4150 .IP "\fB1\fR" 4
|
yading@10
|
4151 .IX Item "1"
|
yading@10
|
4152 .PD 0
|
yading@10
|
4153 .IP "\fBon\fR" 4
|
yading@10
|
4154 .IX Item "on"
|
yading@10
|
4155 .PD
|
yading@10
|
4156 Copyright Exists
|
yading@10
|
4157 .RE
|
yading@10
|
4158 .RS 4
|
yading@10
|
4159 .RE
|
yading@10
|
4160 .IP "\fB\-dialnorm\fR \fIvalue\fR" 4
|
yading@10
|
4161 .IX Item "-dialnorm value"
|
yading@10
|
4162 Dialogue Normalization. Indicates how far the average dialogue level of the
|
yading@10
|
4163 program is below digital 100% full scale (0 dBFS). This parameter determines a
|
yading@10
|
4164 level shift during audio reproduction that sets the average volume of the
|
yading@10
|
4165 dialogue to a preset level. The goal is to match volume level between program
|
yading@10
|
4166 sources. A value of \-31dB will result in no volume level change, relative to
|
yading@10
|
4167 the source volume, during audio reproduction. Valid values are whole numbers in
|
yading@10
|
4168 the range \-31 to \-1, with \-31 being the default.
|
yading@10
|
4169 .IP "\fB\-dsur_mode\fR \fImode\fR" 4
|
yading@10
|
4170 .IX Item "-dsur_mode mode"
|
yading@10
|
4171 Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
|
yading@10
|
4172 (Pro Logic). This field will only be written to the bitstream if the audio
|
yading@10
|
4173 stream is stereo. Using this option does \fB\s-1NOT\s0\fR mean the encoder will actually
|
yading@10
|
4174 apply Dolby Surround processing.
|
yading@10
|
4175 .RS 4
|
yading@10
|
4176 .IP "\fB0\fR" 4
|
yading@10
|
4177 .IX Item "0"
|
yading@10
|
4178 .PD 0
|
yading@10
|
4179 .IP "\fBnotindicated\fR" 4
|
yading@10
|
4180 .IX Item "notindicated"
|
yading@10
|
4181 .PD
|
yading@10
|
4182 Not Indicated (default)
|
yading@10
|
4183 .IP "\fB1\fR" 4
|
yading@10
|
4184 .IX Item "1"
|
yading@10
|
4185 .PD 0
|
yading@10
|
4186 .IP "\fBoff\fR" 4
|
yading@10
|
4187 .IX Item "off"
|
yading@10
|
4188 .PD
|
yading@10
|
4189 Not Dolby Surround Encoded
|
yading@10
|
4190 .IP "\fB2\fR" 4
|
yading@10
|
4191 .IX Item "2"
|
yading@10
|
4192 .PD 0
|
yading@10
|
4193 .IP "\fBon\fR" 4
|
yading@10
|
4194 .IX Item "on"
|
yading@10
|
4195 .PD
|
yading@10
|
4196 Dolby Surround Encoded
|
yading@10
|
4197 .RE
|
yading@10
|
4198 .RS 4
|
yading@10
|
4199 .RE
|
yading@10
|
4200 .IP "\fB\-original\fR \fIboolean\fR" 4
|
yading@10
|
4201 .IX Item "-original boolean"
|
yading@10
|
4202 Original Bit Stream Indicator. Specifies whether this audio is from the
|
yading@10
|
4203 original source and not a copy.
|
yading@10
|
4204 .RS 4
|
yading@10
|
4205 .IP "\fB0\fR" 4
|
yading@10
|
4206 .IX Item "0"
|
yading@10
|
4207 .PD 0
|
yading@10
|
4208 .IP "\fBoff\fR" 4
|
yading@10
|
4209 .IX Item "off"
|
yading@10
|
4210 .PD
|
yading@10
|
4211 Not Original Source
|
yading@10
|
4212 .IP "\fB1\fR" 4
|
yading@10
|
4213 .IX Item "1"
|
yading@10
|
4214 .PD 0
|
yading@10
|
4215 .IP "\fBon\fR" 4
|
yading@10
|
4216 .IX Item "on"
|
yading@10
|
4217 .PD
|
yading@10
|
4218 Original Source (default)
|
yading@10
|
4219 .RE
|
yading@10
|
4220 .RS 4
|
yading@10
|
4221 .RE
|
yading@10
|
4222 .PP
|
yading@10
|
4223 \fIExtended Bitstream Information\fR
|
yading@10
|
4224 .IX Subsection "Extended Bitstream Information"
|
yading@10
|
4225 .PP
|
yading@10
|
4226 The extended bitstream options are part of the Alternate Bit Stream Syntax as
|
yading@10
|
4227 specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
|
yading@10
|
4228 If any one parameter in a group is specified, all values in that group will be
|
yading@10
|
4229 written to the bitstream. Default values are used for those that are written
|
yading@10
|
4230 but have not been specified. If the mixing levels are written, the decoder
|
yading@10
|
4231 will use these values instead of the ones specified in the \f(CW\*(C`center_mixlev\*(C'\fR
|
yading@10
|
4232 and \f(CW\*(C`surround_mixlev\*(C'\fR options if it supports the Alternate Bit Stream
|
yading@10
|
4233 Syntax.
|
yading@10
|
4234 .PP
|
yading@10
|
4235 Extended Bitstream Information \- Part 1
|
yading@10
|
4236 .IX Subsection "Extended Bitstream Information - Part 1"
|
yading@10
|
4237 .IP "\fB\-dmix_mode\fR \fImode\fR" 4
|
yading@10
|
4238 .IX Item "-dmix_mode mode"
|
yading@10
|
4239 Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
|
yading@10
|
4240 (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
|
yading@10
|
4241 .RS 4
|
yading@10
|
4242 .IP "\fB0\fR" 4
|
yading@10
|
4243 .IX Item "0"
|
yading@10
|
4244 .PD 0
|
yading@10
|
4245 .IP "\fBnotindicated\fR" 4
|
yading@10
|
4246 .IX Item "notindicated"
|
yading@10
|
4247 .PD
|
yading@10
|
4248 Not Indicated (default)
|
yading@10
|
4249 .IP "\fB1\fR" 4
|
yading@10
|
4250 .IX Item "1"
|
yading@10
|
4251 .PD 0
|
yading@10
|
4252 .IP "\fBltrt\fR" 4
|
yading@10
|
4253 .IX Item "ltrt"
|
yading@10
|
4254 .PD
|
yading@10
|
4255 Lt/Rt Downmix Preferred
|
yading@10
|
4256 .IP "\fB2\fR" 4
|
yading@10
|
4257 .IX Item "2"
|
yading@10
|
4258 .PD 0
|
yading@10
|
4259 .IP "\fBloro\fR" 4
|
yading@10
|
4260 .IX Item "loro"
|
yading@10
|
4261 .PD
|
yading@10
|
4262 Lo/Ro Downmix Preferred
|
yading@10
|
4263 .RE
|
yading@10
|
4264 .RS 4
|
yading@10
|
4265 .RE
|
yading@10
|
4266 .IP "\fB\-ltrt_cmixlev\fR \fIlevel\fR" 4
|
yading@10
|
4267 .IX Item "-ltrt_cmixlev level"
|
yading@10
|
4268 Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
|
yading@10
|
4269 center channel when downmixing to stereo in Lt/Rt mode.
|
yading@10
|
4270 .RS 4
|
yading@10
|
4271 .IP "\fB1.414\fR" 4
|
yading@10
|
4272 .IX Item "1.414"
|
yading@10
|
4273 Apply +3dB gain
|
yading@10
|
4274 .IP "\fB1.189\fR" 4
|
yading@10
|
4275 .IX Item "1.189"
|
yading@10
|
4276 Apply +1.5dB gain
|
yading@10
|
4277 .IP "\fB1.000\fR" 4
|
yading@10
|
4278 .IX Item "1.000"
|
yading@10
|
4279 Apply 0dB gain
|
yading@10
|
4280 .IP "\fB0.841\fR" 4
|
yading@10
|
4281 .IX Item "0.841"
|
yading@10
|
4282 Apply \-1.5dB gain
|
yading@10
|
4283 .IP "\fB0.707\fR" 4
|
yading@10
|
4284 .IX Item "0.707"
|
yading@10
|
4285 Apply \-3.0dB gain
|
yading@10
|
4286 .IP "\fB0.595\fR" 4
|
yading@10
|
4287 .IX Item "0.595"
|
yading@10
|
4288 Apply \-4.5dB gain (default)
|
yading@10
|
4289 .IP "\fB0.500\fR" 4
|
yading@10
|
4290 .IX Item "0.500"
|
yading@10
|
4291 Apply \-6.0dB gain
|
yading@10
|
4292 .IP "\fB0.000\fR" 4
|
yading@10
|
4293 .IX Item "0.000"
|
yading@10
|
4294 Silence Center Channel
|
yading@10
|
4295 .RE
|
yading@10
|
4296 .RS 4
|
yading@10
|
4297 .RE
|
yading@10
|
4298 .IP "\fB\-ltrt_surmixlev\fR \fIlevel\fR" 4
|
yading@10
|
4299 .IX Item "-ltrt_surmixlev level"
|
yading@10
|
4300 Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
|
yading@10
|
4301 surround channel(s) when downmixing to stereo in Lt/Rt mode.
|
yading@10
|
4302 .RS 4
|
yading@10
|
4303 .IP "\fB0.841\fR" 4
|
yading@10
|
4304 .IX Item "0.841"
|
yading@10
|
4305 Apply \-1.5dB gain
|
yading@10
|
4306 .IP "\fB0.707\fR" 4
|
yading@10
|
4307 .IX Item "0.707"
|
yading@10
|
4308 Apply \-3.0dB gain
|
yading@10
|
4309 .IP "\fB0.595\fR" 4
|
yading@10
|
4310 .IX Item "0.595"
|
yading@10
|
4311 Apply \-4.5dB gain
|
yading@10
|
4312 .IP "\fB0.500\fR" 4
|
yading@10
|
4313 .IX Item "0.500"
|
yading@10
|
4314 Apply \-6.0dB gain (default)
|
yading@10
|
4315 .IP "\fB0.000\fR" 4
|
yading@10
|
4316 .IX Item "0.000"
|
yading@10
|
4317 Silence Surround Channel(s)
|
yading@10
|
4318 .RE
|
yading@10
|
4319 .RS 4
|
yading@10
|
4320 .RE
|
yading@10
|
4321 .IP "\fB\-loro_cmixlev\fR \fIlevel\fR" 4
|
yading@10
|
4322 .IX Item "-loro_cmixlev level"
|
yading@10
|
4323 Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
|
yading@10
|
4324 center channel when downmixing to stereo in Lo/Ro mode.
|
yading@10
|
4325 .RS 4
|
yading@10
|
4326 .IP "\fB1.414\fR" 4
|
yading@10
|
4327 .IX Item "1.414"
|
yading@10
|
4328 Apply +3dB gain
|
yading@10
|
4329 .IP "\fB1.189\fR" 4
|
yading@10
|
4330 .IX Item "1.189"
|
yading@10
|
4331 Apply +1.5dB gain
|
yading@10
|
4332 .IP "\fB1.000\fR" 4
|
yading@10
|
4333 .IX Item "1.000"
|
yading@10
|
4334 Apply 0dB gain
|
yading@10
|
4335 .IP "\fB0.841\fR" 4
|
yading@10
|
4336 .IX Item "0.841"
|
yading@10
|
4337 Apply \-1.5dB gain
|
yading@10
|
4338 .IP "\fB0.707\fR" 4
|
yading@10
|
4339 .IX Item "0.707"
|
yading@10
|
4340 Apply \-3.0dB gain
|
yading@10
|
4341 .IP "\fB0.595\fR" 4
|
yading@10
|
4342 .IX Item "0.595"
|
yading@10
|
4343 Apply \-4.5dB gain (default)
|
yading@10
|
4344 .IP "\fB0.500\fR" 4
|
yading@10
|
4345 .IX Item "0.500"
|
yading@10
|
4346 Apply \-6.0dB gain
|
yading@10
|
4347 .IP "\fB0.000\fR" 4
|
yading@10
|
4348 .IX Item "0.000"
|
yading@10
|
4349 Silence Center Channel
|
yading@10
|
4350 .RE
|
yading@10
|
4351 .RS 4
|
yading@10
|
4352 .RE
|
yading@10
|
4353 .IP "\fB\-loro_surmixlev\fR \fIlevel\fR" 4
|
yading@10
|
4354 .IX Item "-loro_surmixlev level"
|
yading@10
|
4355 Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
|
yading@10
|
4356 surround channel(s) when downmixing to stereo in Lo/Ro mode.
|
yading@10
|
4357 .RS 4
|
yading@10
|
4358 .IP "\fB0.841\fR" 4
|
yading@10
|
4359 .IX Item "0.841"
|
yading@10
|
4360 Apply \-1.5dB gain
|
yading@10
|
4361 .IP "\fB0.707\fR" 4
|
yading@10
|
4362 .IX Item "0.707"
|
yading@10
|
4363 Apply \-3.0dB gain
|
yading@10
|
4364 .IP "\fB0.595\fR" 4
|
yading@10
|
4365 .IX Item "0.595"
|
yading@10
|
4366 Apply \-4.5dB gain
|
yading@10
|
4367 .IP "\fB0.500\fR" 4
|
yading@10
|
4368 .IX Item "0.500"
|
yading@10
|
4369 Apply \-6.0dB gain (default)
|
yading@10
|
4370 .IP "\fB0.000\fR" 4
|
yading@10
|
4371 .IX Item "0.000"
|
yading@10
|
4372 Silence Surround Channel(s)
|
yading@10
|
4373 .RE
|
yading@10
|
4374 .RS 4
|
yading@10
|
4375 .RE
|
yading@10
|
4376 .PP
|
yading@10
|
4377 Extended Bitstream Information \- Part 2
|
yading@10
|
4378 .IX Subsection "Extended Bitstream Information - Part 2"
|
yading@10
|
4379 .IP "\fB\-dsurex_mode\fR \fImode\fR" 4
|
yading@10
|
4380 .IX Item "-dsurex_mode mode"
|
yading@10
|
4381 Dolby Surround \s-1EX\s0 Mode. Indicates whether the stream uses Dolby Surround \s-1EX\s0
|
yading@10
|
4382 (7.1 matrixed to 5.1). Using this option does \fB\s-1NOT\s0\fR mean the encoder will actually
|
yading@10
|
4383 apply Dolby Surround \s-1EX\s0 processing.
|
yading@10
|
4384 .RS 4
|
yading@10
|
4385 .IP "\fB0\fR" 4
|
yading@10
|
4386 .IX Item "0"
|
yading@10
|
4387 .PD 0
|
yading@10
|
4388 .IP "\fBnotindicated\fR" 4
|
yading@10
|
4389 .IX Item "notindicated"
|
yading@10
|
4390 .PD
|
yading@10
|
4391 Not Indicated (default)
|
yading@10
|
4392 .IP "\fB1\fR" 4
|
yading@10
|
4393 .IX Item "1"
|
yading@10
|
4394 .PD 0
|
yading@10
|
4395 .IP "\fBon\fR" 4
|
yading@10
|
4396 .IX Item "on"
|
yading@10
|
4397 .PD
|
yading@10
|
4398 Dolby Surround \s-1EX\s0 Off
|
yading@10
|
4399 .IP "\fB2\fR" 4
|
yading@10
|
4400 .IX Item "2"
|
yading@10
|
4401 .PD 0
|
yading@10
|
4402 .IP "\fBoff\fR" 4
|
yading@10
|
4403 .IX Item "off"
|
yading@10
|
4404 .PD
|
yading@10
|
4405 Dolby Surround \s-1EX\s0 On
|
yading@10
|
4406 .RE
|
yading@10
|
4407 .RS 4
|
yading@10
|
4408 .RE
|
yading@10
|
4409 .IP "\fB\-dheadphone_mode\fR \fImode\fR" 4
|
yading@10
|
4410 .IX Item "-dheadphone_mode mode"
|
yading@10
|
4411 Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
|
yading@10
|
4412 encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
|
yading@10
|
4413 option does \fB\s-1NOT\s0\fR mean the encoder will actually apply Dolby Headphone
|
yading@10
|
4414 processing.
|
yading@10
|
4415 .RS 4
|
yading@10
|
4416 .IP "\fB0\fR" 4
|
yading@10
|
4417 .IX Item "0"
|
yading@10
|
4418 .PD 0
|
yading@10
|
4419 .IP "\fBnotindicated\fR" 4
|
yading@10
|
4420 .IX Item "notindicated"
|
yading@10
|
4421 .PD
|
yading@10
|
4422 Not Indicated (default)
|
yading@10
|
4423 .IP "\fB1\fR" 4
|
yading@10
|
4424 .IX Item "1"
|
yading@10
|
4425 .PD 0
|
yading@10
|
4426 .IP "\fBon\fR" 4
|
yading@10
|
4427 .IX Item "on"
|
yading@10
|
4428 .PD
|
yading@10
|
4429 Dolby Headphone Off
|
yading@10
|
4430 .IP "\fB2\fR" 4
|
yading@10
|
4431 .IX Item "2"
|
yading@10
|
4432 .PD 0
|
yading@10
|
4433 .IP "\fBoff\fR" 4
|
yading@10
|
4434 .IX Item "off"
|
yading@10
|
4435 .PD
|
yading@10
|
4436 Dolby Headphone On
|
yading@10
|
4437 .RE
|
yading@10
|
4438 .RS 4
|
yading@10
|
4439 .RE
|
yading@10
|
4440 .IP "\fB\-ad_conv_type\fR \fItype\fR" 4
|
yading@10
|
4441 .IX Item "-ad_conv_type type"
|
yading@10
|
4442 A/D Converter Type. Indicates whether the audio has passed through \s-1HDCD\s0 A/D
|
yading@10
|
4443 conversion.
|
yading@10
|
4444 .RS 4
|
yading@10
|
4445 .IP "\fB0\fR" 4
|
yading@10
|
4446 .IX Item "0"
|
yading@10
|
4447 .PD 0
|
yading@10
|
4448 .IP "\fBstandard\fR" 4
|
yading@10
|
4449 .IX Item "standard"
|
yading@10
|
4450 .PD
|
yading@10
|
4451 Standard A/D Converter (default)
|
yading@10
|
4452 .IP "\fB1\fR" 4
|
yading@10
|
4453 .IX Item "1"
|
yading@10
|
4454 .PD 0
|
yading@10
|
4455 .IP "\fBhdcd\fR" 4
|
yading@10
|
4456 .IX Item "hdcd"
|
yading@10
|
4457 .PD
|
yading@10
|
4458 \&\s-1HDCD\s0 A/D Converter
|
yading@10
|
4459 .RE
|
yading@10
|
4460 .RS 4
|
yading@10
|
4461 .RE
|
yading@10
|
4462 .PP
|
yading@10
|
4463 \fIOther \s-1AC\-3\s0 Encoding Options\fR
|
yading@10
|
4464 .IX Subsection "Other AC-3 Encoding Options"
|
yading@10
|
4465 .IP "\fB\-stereo_rematrixing\fR \fIboolean\fR" 4
|
yading@10
|
4466 .IX Item "-stereo_rematrixing boolean"
|
yading@10
|
4467 Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
|
yading@10
|
4468 is an optional \s-1AC\-3\s0 feature that increases quality by selectively encoding
|
yading@10
|
4469 the left/right channels as mid/side. This option is enabled by default, and it
|
yading@10
|
4470 is highly recommended that it be left as enabled except for testing purposes.
|
yading@10
|
4471 .PP
|
yading@10
|
4472 \fIFloating-Point-Only \s-1AC\-3\s0 Encoding Options\fR
|
yading@10
|
4473 .IX Subsection "Floating-Point-Only AC-3 Encoding Options"
|
yading@10
|
4474 .PP
|
yading@10
|
4475 These options are only valid for the floating-point encoder and do not exist
|
yading@10
|
4476 for the fixed-point encoder due to the corresponding features not being
|
yading@10
|
4477 implemented in fixed-point.
|
yading@10
|
4478 .IP "\fB\-channel_coupling\fR \fIboolean\fR" 4
|
yading@10
|
4479 .IX Item "-channel_coupling boolean"
|
yading@10
|
4480 Enables/Disables use of channel coupling, which is an optional \s-1AC\-3\s0 feature
|
yading@10
|
4481 that increases quality by combining high frequency information from multiple
|
yading@10
|
4482 channels into a single channel. The per-channel high frequency information is
|
yading@10
|
4483 sent with less accuracy in both the frequency and time domains. This allows
|
yading@10
|
4484 more bits to be used for lower frequencies while preserving enough information
|
yading@10
|
4485 to reconstruct the high frequencies. This option is enabled by default for the
|
yading@10
|
4486 floating-point encoder and should generally be left as enabled except for
|
yading@10
|
4487 testing purposes or to increase encoding speed.
|
yading@10
|
4488 .RS 4
|
yading@10
|
4489 .IP "\fB\-1\fR" 4
|
yading@10
|
4490 .IX Item "-1"
|
yading@10
|
4491 .PD 0
|
yading@10
|
4492 .IP "\fBauto\fR" 4
|
yading@10
|
4493 .IX Item "auto"
|
yading@10
|
4494 .PD
|
yading@10
|
4495 Selected by Encoder (default)
|
yading@10
|
4496 .IP "\fB0\fR" 4
|
yading@10
|
4497 .IX Item "0"
|
yading@10
|
4498 .PD 0
|
yading@10
|
4499 .IP "\fBoff\fR" 4
|
yading@10
|
4500 .IX Item "off"
|
yading@10
|
4501 .PD
|
yading@10
|
4502 Disable Channel Coupling
|
yading@10
|
4503 .IP "\fB1\fR" 4
|
yading@10
|
4504 .IX Item "1"
|
yading@10
|
4505 .PD 0
|
yading@10
|
4506 .IP "\fBon\fR" 4
|
yading@10
|
4507 .IX Item "on"
|
yading@10
|
4508 .PD
|
yading@10
|
4509 Enable Channel Coupling
|
yading@10
|
4510 .RE
|
yading@10
|
4511 .RS 4
|
yading@10
|
4512 .RE
|
yading@10
|
4513 .IP "\fB\-cpl_start_band\fR \fInumber\fR" 4
|
yading@10
|
4514 .IX Item "-cpl_start_band number"
|
yading@10
|
4515 Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
|
yading@10
|
4516 value higher than the bandwidth is used, it will be reduced to 1 less than the
|
yading@10
|
4517 coupling end band. If \fIauto\fR is used, the start band will be determined by
|
yading@10
|
4518 the encoder based on the bit rate, sample rate, and channel layout. This option
|
yading@10
|
4519 has no effect if channel coupling is disabled.
|
yading@10
|
4520 .RS 4
|
yading@10
|
4521 .IP "\fB\-1\fR" 4
|
yading@10
|
4522 .IX Item "-1"
|
yading@10
|
4523 .PD 0
|
yading@10
|
4524 .IP "\fBauto\fR" 4
|
yading@10
|
4525 .IX Item "auto"
|
yading@10
|
4526 .PD
|
yading@10
|
4527 Selected by Encoder (default)
|
yading@10
|
4528 .RE
|
yading@10
|
4529 .RS 4
|
yading@10
|
4530 .RE
|
yading@10
|
4531 .SH "VIDEO ENCODERS"
|
yading@10
|
4532 .IX Header "VIDEO ENCODERS"
|
yading@10
|
4533 A description of some of the currently available video encoders
|
yading@10
|
4534 follows.
|
yading@10
|
4535 .SS "libtheora"
|
yading@10
|
4536 .IX Subsection "libtheora"
|
yading@10
|
4537 Theora format supported through libtheora.
|
yading@10
|
4538 .PP
|
yading@10
|
4539 Requires the presence of the libtheora headers and library during
|
yading@10
|
4540 configuration. You need to explicitly configure the build with
|
yading@10
|
4541 \&\f(CW\*(C`\-\-enable\-libtheora\*(C'\fR.
|
yading@10
|
4542 .PP
|
yading@10
|
4543 \fIOptions\fR
|
yading@10
|
4544 .IX Subsection "Options"
|
yading@10
|
4545 .PP
|
yading@10
|
4546 The following global options are mapped to internal libtheora options
|
yading@10
|
4547 which affect the quality and the bitrate of the encoded stream.
|
yading@10
|
4548 .IP "\fBb\fR" 4
|
yading@10
|
4549 .IX Item "b"
|
yading@10
|
4550 Set the video bitrate, only works if the \f(CW\*(C`qscale\*(C'\fR flag in
|
yading@10
|
4551 \&\fBflags\fR is not enabled.
|
yading@10
|
4552 .IP "\fBflags\fR" 4
|
yading@10
|
4553 .IX Item "flags"
|
yading@10
|
4554 Used to enable constant quality mode encoding through the
|
yading@10
|
4555 \&\fBqscale\fR flag, and to enable the \f(CW\*(C`pass1\*(C'\fR and \f(CW\*(C`pass2\*(C'\fR
|
yading@10
|
4556 modes.
|
yading@10
|
4557 .IP "\fBg\fR" 4
|
yading@10
|
4558 .IX Item "g"
|
yading@10
|
4559 Set the \s-1GOP\s0 size.
|
yading@10
|
4560 .IP "\fBglobal_quality\fR" 4
|
yading@10
|
4561 .IX Item "global_quality"
|
yading@10
|
4562 Set the global quality in lambda units, only works if the
|
yading@10
|
4563 \&\f(CW\*(C`qscale\*(C'\fR flag in \fBflags\fR is enabled. The value is clipped
|
yading@10
|
4564 in the [0 \- 10*\f(CW\*(C`FF_QP2LAMBDA\*(C'\fR] range, and then multiplied for 6.3
|
yading@10
|
4565 to get a value in the native libtheora range [0\-63]. A higher value
|
yading@10
|
4566 corresponds to a higher quality.
|
yading@10
|
4567 .Sp
|
yading@10
|
4568 For example, to set maximum constant quality encoding with
|
yading@10
|
4569 \&\fBffmpeg\fR:
|
yading@10
|
4570 .Sp
|
yading@10
|
4571 .Vb 1
|
yading@10
|
4572 \& ffmpeg \-i INPUT \-flags:v qscale \-global_quality:v "10*QP2LAMBDA" \-codec:v libtheora OUTPUT.ogg
|
yading@10
|
4573 .Ve
|
yading@10
|
4574 .SS "libvpx"
|
yading@10
|
4575 .IX Subsection "libvpx"
|
yading@10
|
4576 \&\s-1VP8\s0 format supported through libvpx.
|
yading@10
|
4577 .PP
|
yading@10
|
4578 Requires the presence of the libvpx headers and library during configuration.
|
yading@10
|
4579 You need to explicitly configure the build with \f(CW\*(C`\-\-enable\-libvpx\*(C'\fR.
|
yading@10
|
4580 .PP
|
yading@10
|
4581 \fIOptions\fR
|
yading@10
|
4582 .IX Subsection "Options"
|
yading@10
|
4583 .PP
|
yading@10
|
4584 Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
|
yading@10
|
4585 .IP "\fBthreads\fR" 4
|
yading@10
|
4586 .IX Item "threads"
|
yading@10
|
4587 g_threads
|
yading@10
|
4588 .IP "\fBprofile\fR" 4
|
yading@10
|
4589 .IX Item "profile"
|
yading@10
|
4590 g_profile
|
yading@10
|
4591 .IP "\fBvb\fR" 4
|
yading@10
|
4592 .IX Item "vb"
|
yading@10
|
4593 rc_target_bitrate
|
yading@10
|
4594 .IP "\fBg\fR" 4
|
yading@10
|
4595 .IX Item "g"
|
yading@10
|
4596 kf_max_dist
|
yading@10
|
4597 .IP "\fBkeyint_min\fR" 4
|
yading@10
|
4598 .IX Item "keyint_min"
|
yading@10
|
4599 kf_min_dist
|
yading@10
|
4600 .IP "\fBqmin\fR" 4
|
yading@10
|
4601 .IX Item "qmin"
|
yading@10
|
4602 rc_min_quantizer
|
yading@10
|
4603 .IP "\fBqmax\fR" 4
|
yading@10
|
4604 .IX Item "qmax"
|
yading@10
|
4605 rc_max_quantizer
|
yading@10
|
4606 .IP "\fBbufsize, vb\fR" 4
|
yading@10
|
4607 .IX Item "bufsize, vb"
|
yading@10
|
4608 rc_buf_sz
|
yading@10
|
4609 \&\f(CW\*(C`(bufsize * 1000 / vb)\*(C'\fR
|
yading@10
|
4610 .Sp
|
yading@10
|
4611 rc_buf_optimal_sz
|
yading@10
|
4612 \&\f(CW\*(C`(bufsize * 1000 / vb * 5 / 6)\*(C'\fR
|
yading@10
|
4613 .IP "\fBrc_init_occupancy, vb\fR" 4
|
yading@10
|
4614 .IX Item "rc_init_occupancy, vb"
|
yading@10
|
4615 rc_buf_initial_sz
|
yading@10
|
4616 \&\f(CW\*(C`(rc_init_occupancy * 1000 / vb)\*(C'\fR
|
yading@10
|
4617 .IP "\fBrc_buffer_aggressivity\fR" 4
|
yading@10
|
4618 .IX Item "rc_buffer_aggressivity"
|
yading@10
|
4619 rc_undershoot_pct
|
yading@10
|
4620 .IP "\fBskip_threshold\fR" 4
|
yading@10
|
4621 .IX Item "skip_threshold"
|
yading@10
|
4622 rc_dropframe_thresh
|
yading@10
|
4623 .IP "\fBqcomp\fR" 4
|
yading@10
|
4624 .IX Item "qcomp"
|
yading@10
|
4625 rc_2pass_vbr_bias_pct
|
yading@10
|
4626 .IP "\fBmaxrate, vb\fR" 4
|
yading@10
|
4627 .IX Item "maxrate, vb"
|
yading@10
|
4628 rc_2pass_vbr_maxsection_pct
|
yading@10
|
4629 \&\f(CW\*(C`(maxrate * 100 / vb)\*(C'\fR
|
yading@10
|
4630 .IP "\fBminrate, vb\fR" 4
|
yading@10
|
4631 .IX Item "minrate, vb"
|
yading@10
|
4632 rc_2pass_vbr_minsection_pct
|
yading@10
|
4633 \&\f(CW\*(C`(minrate * 100 / vb)\*(C'\fR
|
yading@10
|
4634 .IP "\fBminrate, maxrate, vb\fR" 4
|
yading@10
|
4635 .IX Item "minrate, maxrate, vb"
|
yading@10
|
4636 \&\f(CW\*(C`VPX_CBR\*(C'\fR
|
yading@10
|
4637 \&\f(CW\*(C`(minrate == maxrate == vb)\*(C'\fR
|
yading@10
|
4638 .IP "\fBcrf\fR" 4
|
yading@10
|
4639 .IX Item "crf"
|
yading@10
|
4640 \&\f(CW\*(C`VPX_CQ\*(C'\fR, \f(CW\*(C`VP8E_SET_CQ_LEVEL\*(C'\fR
|
yading@10
|
4641 .IP "\fBquality\fR" 4
|
yading@10
|
4642 .IX Item "quality"
|
yading@10
|
4643 .RS 4
|
yading@10
|
4644 .PD 0
|
yading@10
|
4645 .IP "\fIbest\fR" 4
|
yading@10
|
4646 .IX Item "best"
|
yading@10
|
4647 .PD
|
yading@10
|
4648 \&\f(CW\*(C`VPX_DL_BEST_QUALITY\*(C'\fR
|
yading@10
|
4649 .IP "\fIgood\fR" 4
|
yading@10
|
4650 .IX Item "good"
|
yading@10
|
4651 \&\f(CW\*(C`VPX_DL_GOOD_QUALITY\*(C'\fR
|
yading@10
|
4652 .IP "\fIrealtime\fR" 4
|
yading@10
|
4653 .IX Item "realtime"
|
yading@10
|
4654 \&\f(CW\*(C`VPX_DL_REALTIME\*(C'\fR
|
yading@10
|
4655 .RE
|
yading@10
|
4656 .RS 4
|
yading@10
|
4657 .RE
|
yading@10
|
4658 .IP "\fBspeed\fR" 4
|
yading@10
|
4659 .IX Item "speed"
|
yading@10
|
4660 \&\f(CW\*(C`VP8E_SET_CPUUSED\*(C'\fR
|
yading@10
|
4661 .IP "\fBnr\fR" 4
|
yading@10
|
4662 .IX Item "nr"
|
yading@10
|
4663 \&\f(CW\*(C`VP8E_SET_NOISE_SENSITIVITY\*(C'\fR
|
yading@10
|
4664 .IP "\fBmb_threshold\fR" 4
|
yading@10
|
4665 .IX Item "mb_threshold"
|
yading@10
|
4666 \&\f(CW\*(C`VP8E_SET_STATIC_THRESHOLD\*(C'\fR
|
yading@10
|
4667 .IP "\fBslices\fR" 4
|
yading@10
|
4668 .IX Item "slices"
|
yading@10
|
4669 \&\f(CW\*(C`VP8E_SET_TOKEN_PARTITIONS\*(C'\fR
|
yading@10
|
4670 .IP "\fBmax-intra-rate\fR" 4
|
yading@10
|
4671 .IX Item "max-intra-rate"
|
yading@10
|
4672 \&\f(CW\*(C`VP8E_SET_MAX_INTRA_BITRATE_PCT\*(C'\fR
|
yading@10
|
4673 .IP "\fBforce_key_frames\fR" 4
|
yading@10
|
4674 .IX Item "force_key_frames"
|
yading@10
|
4675 \&\f(CW\*(C`VPX_EFLAG_FORCE_KF\*(C'\fR
|
yading@10
|
4676 .IP "\fBAlternate reference frame related\fR" 4
|
yading@10
|
4677 .IX Item "Alternate reference frame related"
|
yading@10
|
4678 .RS 4
|
yading@10
|
4679 .PD 0
|
yading@10
|
4680 .IP "\fBvp8flags altref\fR" 4
|
yading@10
|
4681 .IX Item "vp8flags altref"
|
yading@10
|
4682 .PD
|
yading@10
|
4683 \&\f(CW\*(C`VP8E_SET_ENABLEAUTOALTREF\*(C'\fR
|
yading@10
|
4684 .IP "\fIarnr_max_frames\fR" 4
|
yading@10
|
4685 .IX Item "arnr_max_frames"
|
yading@10
|
4686 \&\f(CW\*(C`VP8E_SET_ARNR_MAXFRAMES\*(C'\fR
|
yading@10
|
4687 .IP "\fIarnr_type\fR" 4
|
yading@10
|
4688 .IX Item "arnr_type"
|
yading@10
|
4689 \&\f(CW\*(C`VP8E_SET_ARNR_TYPE\*(C'\fR
|
yading@10
|
4690 .IP "\fIarnr_strength\fR" 4
|
yading@10
|
4691 .IX Item "arnr_strength"
|
yading@10
|
4692 \&\f(CW\*(C`VP8E_SET_ARNR_STRENGTH\*(C'\fR
|
yading@10
|
4693 .IP "\fIrc_lookahead\fR" 4
|
yading@10
|
4694 .IX Item "rc_lookahead"
|
yading@10
|
4695 g_lag_in_frames
|
yading@10
|
4696 .RE
|
yading@10
|
4697 .RS 4
|
yading@10
|
4698 .RE
|
yading@10
|
4699 .IP "\fBvp8flags error_resilient\fR" 4
|
yading@10
|
4700 .IX Item "vp8flags error_resilient"
|
yading@10
|
4701 g_error_resilient
|
yading@10
|
4702 .PP
|
yading@10
|
4703 For more information about libvpx see:
|
yading@10
|
4704 <\fBhttp://www.webmproject.org/\fR>
|
yading@10
|
4705 .SS "libx264"
|
yading@10
|
4706 .IX Subsection "libx264"
|
yading@10
|
4707 x264 H.264/MPEG\-4 \s-1AVC\s0 encoder wrapper
|
yading@10
|
4708 .PP
|
yading@10
|
4709 Requires the presence of the libx264 headers and library during
|
yading@10
|
4710 configuration. You need to explicitly configure the build with
|
yading@10
|
4711 \&\f(CW\*(C`\-\-enable\-libx264\*(C'\fR.
|
yading@10
|
4712 .PP
|
yading@10
|
4713 x264 supports an impressive number of features, including 8x8 and 4x4 adaptive
|
yading@10
|
4714 spatial transform, adaptive B\-frame placement, \s-1CAVLC/CABAC\s0 entropy coding,
|
yading@10
|
4715 interlacing (\s-1MBAFF\s0), lossless mode, psy optimizations for detail retention
|
yading@10
|
4716 (adaptive quantization, psy-RD, psy-trellis).
|
yading@10
|
4717 .PP
|
yading@10
|
4718 The FFmpeg wrapper provides a mapping for most of them using global options
|
yading@10
|
4719 that match those of the encoders and provides private options for the unique
|
yading@10
|
4720 encoder options. Additionally an expert override is provided to directly pass
|
yading@10
|
4721 a list of key=value tuples as accepted by x264_param_parse.
|
yading@10
|
4722 .PP
|
yading@10
|
4723 \fIOption Mapping\fR
|
yading@10
|
4724 .IX Subsection "Option Mapping"
|
yading@10
|
4725 .PP
|
yading@10
|
4726 The following options are supported by the x264 wrapper, the x264\-equivalent
|
yading@10
|
4727 options follow the FFmpeg ones.
|
yading@10
|
4728 .IP "\fBb : bitrate\fR" 4
|
yading@10
|
4729 .IX Item "b : bitrate"
|
yading@10
|
4730 FFmpeg \f(CW\*(C`b\*(C'\fR option is expressed in bits/s, x264 \f(CW\*(C`bitrate\*(C'\fR in kilobits/s.
|
yading@10
|
4731 .IP "\fBbf : bframes\fR" 4
|
yading@10
|
4732 .IX Item "bf : bframes"
|
yading@10
|
4733 Maximum number of B\-frames.
|
yading@10
|
4734 .IP "\fBg : keyint\fR" 4
|
yading@10
|
4735 .IX Item "g : keyint"
|
yading@10
|
4736 Maximum \s-1GOP\s0 size.
|
yading@10
|
4737 .IP "\fBqmin : qpmin\fR" 4
|
yading@10
|
4738 .IX Item "qmin : qpmin"
|
yading@10
|
4739 .PD 0
|
yading@10
|
4740 .IP "\fBqmax : qpmax\fR" 4
|
yading@10
|
4741 .IX Item "qmax : qpmax"
|
yading@10
|
4742 .IP "\fBqdiff : qpstep\fR" 4
|
yading@10
|
4743 .IX Item "qdiff : qpstep"
|
yading@10
|
4744 .IP "\fBqblur : qblur\fR" 4
|
yading@10
|
4745 .IX Item "qblur : qblur"
|
yading@10
|
4746 .IP "\fBqcomp : qcomp\fR" 4
|
yading@10
|
4747 .IX Item "qcomp : qcomp"
|
yading@10
|
4748 .IP "\fBrefs : ref\fR" 4
|
yading@10
|
4749 .IX Item "refs : ref"
|
yading@10
|
4750 .IP "\fBsc_threshold : scenecut\fR" 4
|
yading@10
|
4751 .IX Item "sc_threshold : scenecut"
|
yading@10
|
4752 .IP "\fBtrellis : trellis\fR" 4
|
yading@10
|
4753 .IX Item "trellis : trellis"
|
yading@10
|
4754 .IP "\fBnr : nr\fR" 4
|
yading@10
|
4755 .IX Item "nr : nr"
|
yading@10
|
4756 .PD
|
yading@10
|
4757 Noise reduction.
|
yading@10
|
4758 .IP "\fBme_range : merange\fR" 4
|
yading@10
|
4759 .IX Item "me_range : merange"
|
yading@10
|
4760 .PD 0
|
yading@10
|
4761 .IP "\fBme_method : me\fR" 4
|
yading@10
|
4762 .IX Item "me_method : me"
|
yading@10
|
4763 .IP "\fBsubq : subme\fR" 4
|
yading@10
|
4764 .IX Item "subq : subme"
|
yading@10
|
4765 .IP "\fBb_strategy : b\-adapt\fR" 4
|
yading@10
|
4766 .IX Item "b_strategy : b-adapt"
|
yading@10
|
4767 .IP "\fBkeyint_min : keyint-min\fR" 4
|
yading@10
|
4768 .IX Item "keyint_min : keyint-min"
|
yading@10
|
4769 .IP "\fBcoder : cabac\fR" 4
|
yading@10
|
4770 .IX Item "coder : cabac"
|
yading@10
|
4771 .PD
|
yading@10
|
4772 Set coder to \f(CW\*(C`ac\*(C'\fR to use \s-1CABAC\s0.
|
yading@10
|
4773 .IP "\fBcmp : chroma-me\fR" 4
|
yading@10
|
4774 .IX Item "cmp : chroma-me"
|
yading@10
|
4775 Set to \f(CW\*(C`chroma\*(C'\fR to use chroma motion estimation.
|
yading@10
|
4776 .IP "\fBthreads : threads\fR" 4
|
yading@10
|
4777 .IX Item "threads : threads"
|
yading@10
|
4778 .PD 0
|
yading@10
|
4779 .IP "\fBthread_type : sliced_threads\fR" 4
|
yading@10
|
4780 .IX Item "thread_type : sliced_threads"
|
yading@10
|
4781 .PD
|
yading@10
|
4782 Set to \f(CW\*(C`slice\*(C'\fR to use sliced threading instead of frame threading.
|
yading@10
|
4783 .IP "\fBflags \-cgop : open-gop\fR" 4
|
yading@10
|
4784 .IX Item "flags -cgop : open-gop"
|
yading@10
|
4785 Set \f(CW\*(C`\-cgop\*(C'\fR to use recovery points to close GOPs.
|
yading@10
|
4786 .IP "\fBrc_init_occupancy : vbv-init\fR" 4
|
yading@10
|
4787 .IX Item "rc_init_occupancy : vbv-init"
|
yading@10
|
4788 Initial buffer occupancy.
|
yading@10
|
4789 .PP
|
yading@10
|
4790 \fIPrivate Options\fR
|
yading@10
|
4791 .IX Subsection "Private Options"
|
yading@10
|
4792 .IP "\fB\-preset\fR \fIstring\fR" 4
|
yading@10
|
4793 .IX Item "-preset string"
|
yading@10
|
4794 Set the encoding preset (cf. x264 \-\-fullhelp).
|
yading@10
|
4795 .IP "\fB\-tune\fR \fIstring\fR" 4
|
yading@10
|
4796 .IX Item "-tune string"
|
yading@10
|
4797 Tune the encoding params (cf. x264 \-\-fullhelp).
|
yading@10
|
4798 .IP "\fB\-profile\fR \fIstring\fR" 4
|
yading@10
|
4799 .IX Item "-profile string"
|
yading@10
|
4800 Set profile restrictions (cf. x264 \-\-fullhelp).
|
yading@10
|
4801 .IP "\fB\-fastfirstpass\fR \fIinteger\fR" 4
|
yading@10
|
4802 .IX Item "-fastfirstpass integer"
|
yading@10
|
4803 Use fast settings when encoding first pass.
|
yading@10
|
4804 .IP "\fB\-crf\fR \fIfloat\fR" 4
|
yading@10
|
4805 .IX Item "-crf float"
|
yading@10
|
4806 Select the quality for constant quality mode.
|
yading@10
|
4807 .IP "\fB\-crf_max\fR \fIfloat\fR" 4
|
yading@10
|
4808 .IX Item "-crf_max float"
|
yading@10
|
4809 In \s-1CRF\s0 mode, prevents \s-1VBV\s0 from lowering quality beyond this point.
|
yading@10
|
4810 .IP "\fB\-qp\fR \fIinteger\fR" 4
|
yading@10
|
4811 .IX Item "-qp integer"
|
yading@10
|
4812 Constant quantization parameter rate control method.
|
yading@10
|
4813 .IP "\fB\-aq\-mode\fR \fIinteger\fR" 4
|
yading@10
|
4814 .IX Item "-aq-mode integer"
|
yading@10
|
4815 \&\s-1AQ\s0 method
|
yading@10
|
4816 .Sp
|
yading@10
|
4817 Possible values:
|
yading@10
|
4818 .RS 4
|
yading@10
|
4819 .IP "\fBnone\fR" 4
|
yading@10
|
4820 .IX Item "none"
|
yading@10
|
4821 .PD 0
|
yading@10
|
4822 .IP "\fBvariance\fR" 4
|
yading@10
|
4823 .IX Item "variance"
|
yading@10
|
4824 .PD
|
yading@10
|
4825 Variance \s-1AQ\s0 (complexity mask).
|
yading@10
|
4826 .IP "\fBautovariance\fR" 4
|
yading@10
|
4827 .IX Item "autovariance"
|
yading@10
|
4828 Auto-variance \s-1AQ\s0 (experimental).
|
yading@10
|
4829 .RE
|
yading@10
|
4830 .RS 4
|
yading@10
|
4831 .RE
|
yading@10
|
4832 .IP "\fB\-aq\-strength\fR \fIfloat\fR" 4
|
yading@10
|
4833 .IX Item "-aq-strength float"
|
yading@10
|
4834 \&\s-1AQ\s0 strength, reduces blocking and blurring in flat and textured areas.
|
yading@10
|
4835 .IP "\fB\-psy\fR \fIinteger\fR" 4
|
yading@10
|
4836 .IX Item "-psy integer"
|
yading@10
|
4837 Use psychovisual optimizations.
|
yading@10
|
4838 .IP "\fB\-psy\-rd\fR \fIstring\fR" 4
|
yading@10
|
4839 .IX Item "-psy-rd string"
|
yading@10
|
4840 Strength of psychovisual optimization, in <psy\-rd>:<psy\-trellis> format.
|
yading@10
|
4841 .IP "\fB\-rc\-lookahead\fR \fIinteger\fR" 4
|
yading@10
|
4842 .IX Item "-rc-lookahead integer"
|
yading@10
|
4843 Number of frames to look ahead for frametype and ratecontrol.
|
yading@10
|
4844 .IP "\fB\-weightb\fR \fIinteger\fR" 4
|
yading@10
|
4845 .IX Item "-weightb integer"
|
yading@10
|
4846 Weighted prediction for B\-frames.
|
yading@10
|
4847 .IP "\fB\-weightp\fR \fIinteger\fR" 4
|
yading@10
|
4848 .IX Item "-weightp integer"
|
yading@10
|
4849 Weighted prediction analysis method.
|
yading@10
|
4850 .Sp
|
yading@10
|
4851 Possible values:
|
yading@10
|
4852 .RS 4
|
yading@10
|
4853 .IP "\fBnone\fR" 4
|
yading@10
|
4854 .IX Item "none"
|
yading@10
|
4855 .PD 0
|
yading@10
|
4856 .IP "\fBsimple\fR" 4
|
yading@10
|
4857 .IX Item "simple"
|
yading@10
|
4858 .IP "\fBsmart\fR" 4
|
yading@10
|
4859 .IX Item "smart"
|
yading@10
|
4860 .RE
|
yading@10
|
4861 .RS 4
|
yading@10
|
4862 .RE
|
yading@10
|
4863 .IP "\fB\-ssim\fR \fIinteger\fR" 4
|
yading@10
|
4864 .IX Item "-ssim integer"
|
yading@10
|
4865 .PD
|
yading@10
|
4866 Calculate and print \s-1SSIM\s0 stats.
|
yading@10
|
4867 .IP "\fB\-intra\-refresh\fR \fIinteger\fR" 4
|
yading@10
|
4868 .IX Item "-intra-refresh integer"
|
yading@10
|
4869 Use Periodic Intra Refresh instead of \s-1IDR\s0 frames.
|
yading@10
|
4870 .IP "\fB\-b\-bias\fR \fIinteger\fR" 4
|
yading@10
|
4871 .IX Item "-b-bias integer"
|
yading@10
|
4872 Influences how often B\-frames are used.
|
yading@10
|
4873 .IP "\fB\-b\-pyramid\fR \fIinteger\fR" 4
|
yading@10
|
4874 .IX Item "-b-pyramid integer"
|
yading@10
|
4875 Keep some B\-frames as references.
|
yading@10
|
4876 .Sp
|
yading@10
|
4877 Possible values:
|
yading@10
|
4878 .RS 4
|
yading@10
|
4879 .IP "\fBnone\fR" 4
|
yading@10
|
4880 .IX Item "none"
|
yading@10
|
4881 .PD 0
|
yading@10
|
4882 .IP "\fBstrict\fR" 4
|
yading@10
|
4883 .IX Item "strict"
|
yading@10
|
4884 .PD
|
yading@10
|
4885 Strictly hierarchical pyramid.
|
yading@10
|
4886 .IP "\fBnormal\fR" 4
|
yading@10
|
4887 .IX Item "normal"
|
yading@10
|
4888 Non-strict (not Blu-ray compatible).
|
yading@10
|
4889 .RE
|
yading@10
|
4890 .RS 4
|
yading@10
|
4891 .RE
|
yading@10
|
4892 .IP "\fB\-mixed\-refs\fR \fIinteger\fR" 4
|
yading@10
|
4893 .IX Item "-mixed-refs integer"
|
yading@10
|
4894 One reference per partition, as opposed to one reference per macroblock.
|
yading@10
|
4895 .IP "\fB\-8x8dct\fR \fIinteger\fR" 4
|
yading@10
|
4896 .IX Item "-8x8dct integer"
|
yading@10
|
4897 High profile 8x8 transform.
|
yading@10
|
4898 .IP "\fB\-fast\-pskip\fR \fIinteger\fR" 4
|
yading@10
|
4899 .IX Item "-fast-pskip integer"
|
yading@10
|
4900 .PD 0
|
yading@10
|
4901 .IP "\fB\-aud\fR \fIinteger\fR" 4
|
yading@10
|
4902 .IX Item "-aud integer"
|
yading@10
|
4903 .PD
|
yading@10
|
4904 Use access unit delimiters.
|
yading@10
|
4905 .IP "\fB\-mbtree\fR \fIinteger\fR" 4
|
yading@10
|
4906 .IX Item "-mbtree integer"
|
yading@10
|
4907 Use macroblock tree ratecontrol.
|
yading@10
|
4908 .IP "\fB\-deblock\fR \fIstring\fR" 4
|
yading@10
|
4909 .IX Item "-deblock string"
|
yading@10
|
4910 Loop filter parameters, in <alpha:beta> form.
|
yading@10
|
4911 .IP "\fB\-cplxblur\fR \fIfloat\fR" 4
|
yading@10
|
4912 .IX Item "-cplxblur float"
|
yading@10
|
4913 Reduce fluctuations in \s-1QP\s0 (before curve compression).
|
yading@10
|
4914 .IP "\fB\-partitions\fR \fIstring\fR" 4
|
yading@10
|
4915 .IX Item "-partitions string"
|
yading@10
|
4916 A comma-separated list of partitions to consider, possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all.
|
yading@10
|
4917 .IP "\fB\-direct\-pred\fR \fIinteger\fR" 4
|
yading@10
|
4918 .IX Item "-direct-pred integer"
|
yading@10
|
4919 Direct \s-1MV\s0 prediction mode
|
yading@10
|
4920 .Sp
|
yading@10
|
4921 Possible values:
|
yading@10
|
4922 .RS 4
|
yading@10
|
4923 .IP "\fBnone\fR" 4
|
yading@10
|
4924 .IX Item "none"
|
yading@10
|
4925 .PD 0
|
yading@10
|
4926 .IP "\fBspatial\fR" 4
|
yading@10
|
4927 .IX Item "spatial"
|
yading@10
|
4928 .IP "\fBtemporal\fR" 4
|
yading@10
|
4929 .IX Item "temporal"
|
yading@10
|
4930 .IP "\fBauto\fR" 4
|
yading@10
|
4931 .IX Item "auto"
|
yading@10
|
4932 .RE
|
yading@10
|
4933 .RS 4
|
yading@10
|
4934 .RE
|
yading@10
|
4935 .IP "\fB\-slice\-max\-size\fR \fIinteger\fR" 4
|
yading@10
|
4936 .IX Item "-slice-max-size integer"
|
yading@10
|
4937 .PD
|
yading@10
|
4938 Limit the size of each slice in bytes.
|
yading@10
|
4939 .IP "\fB\-stats\fR \fIstring\fR" 4
|
yading@10
|
4940 .IX Item "-stats string"
|
yading@10
|
4941 Filename for 2 pass stats.
|
yading@10
|
4942 .IP "\fB\-nal\-hrd\fR \fIinteger\fR" 4
|
yading@10
|
4943 .IX Item "-nal-hrd integer"
|
yading@10
|
4944 Signal \s-1HRD\s0 information (requires vbv-bufsize; cbr not allowed in .mp4).
|
yading@10
|
4945 .Sp
|
yading@10
|
4946 Possible values:
|
yading@10
|
4947 .RS 4
|
yading@10
|
4948 .IP "\fBnone\fR" 4
|
yading@10
|
4949 .IX Item "none"
|
yading@10
|
4950 .PD 0
|
yading@10
|
4951 .IP "\fBvbr\fR" 4
|
yading@10
|
4952 .IX Item "vbr"
|
yading@10
|
4953 .IP "\fBcbr\fR" 4
|
yading@10
|
4954 .IX Item "cbr"
|
yading@10
|
4955 .RE
|
yading@10
|
4956 .RS 4
|
yading@10
|
4957 .RE
|
yading@10
|
4958 .IP "\fBx264opts\fR \fIoptions\fR" 4
|
yading@10
|
4959 .IX Item "x264opts options"
|
yading@10
|
4960 .PD
|
yading@10
|
4961 Allow to set any x264 option, see \f(CW\*(C`x264 \-\-fullhelp\*(C'\fR for a list.
|
yading@10
|
4962 .Sp
|
yading@10
|
4963 \&\fIoptions\fR is a list of \fIkey\fR=\fIvalue\fR couples separated by
|
yading@10
|
4964 \&\*(L":\*(R". In \fIfilter\fR and \fIpsy-rd\fR options that use \*(L":\*(R" as a separator
|
yading@10
|
4965 themselves, use \*(L",\*(R" instead. They accept it as well since long ago but this
|
yading@10
|
4966 is kept undocumented for some reason.
|
yading@10
|
4967 .Sp
|
yading@10
|
4968 For example to specify libx264 encoding options with \fBffmpeg\fR:
|
yading@10
|
4969 .Sp
|
yading@10
|
4970 .Vb 1
|
yading@10
|
4971 \& ffmpeg \-i foo.mpg \-vcodec libx264 \-x264opts keyint=123:min\-keyint=20 \-an out.mkv
|
yading@10
|
4972 .Ve
|
yading@10
|
4973 .Sp
|
yading@10
|
4974 For more information about libx264 and the supported options see:
|
yading@10
|
4975 <\fBhttp://www.videolan.org/developers/x264.html\fR>
|
yading@10
|
4976 .IP "\fB\-x264\-params\fR \fIstring\fR" 4
|
yading@10
|
4977 .IX Item "-x264-params string"
|
yading@10
|
4978 Override the x264 configuration using a :\-separated list of key=value parameters.
|
yading@10
|
4979 .Sp
|
yading@10
|
4980 .Vb 1
|
yading@10
|
4981 \& \-x264\-params level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv\-maxrate=768:vbv\-bufsize=2000:analyse=all:me=umh:no\-fast\-pskip=1:subq=6:8x8dct=0:trellis=0
|
yading@10
|
4982 .Ve
|
yading@10
|
4983 .PP
|
yading@10
|
4984 Encoding avpresets for common usages are provided so they can be used with the
|
yading@10
|
4985 general presets system (e.g. passing the \f(CW\*(C`\-pre\*(C'\fR option).
|
yading@10
|
4986 .SS "ProRes"
|
yading@10
|
4987 .IX Subsection "ProRes"
|
yading@10
|
4988 Apple ProRes encoder.
|
yading@10
|
4989 .PP
|
yading@10
|
4990 FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
|
yading@10
|
4991 The used encoder can be choosen with the \f(CW\*(C`\-vcodec\*(C'\fR option.
|
yading@10
|
4992 .PP
|
yading@10
|
4993 \fIPrivate Options for prores-ks\fR
|
yading@10
|
4994 .IX Subsection "Private Options for prores-ks"
|
yading@10
|
4995 .IP "\fBprofile\fR \fIinteger\fR" 4
|
yading@10
|
4996 .IX Item "profile integer"
|
yading@10
|
4997 Select the ProRes profile to encode
|
yading@10
|
4998 .RS 4
|
yading@10
|
4999 .IP "\fBproxy\fR" 4
|
yading@10
|
5000 .IX Item "proxy"
|
yading@10
|
5001 .PD 0
|
yading@10
|
5002 .IP "\fBlt\fR" 4
|
yading@10
|
5003 .IX Item "lt"
|
yading@10
|
5004 .IP "\fBstandard\fR" 4
|
yading@10
|
5005 .IX Item "standard"
|
yading@10
|
5006 .IP "\fBhq\fR" 4
|
yading@10
|
5007 .IX Item "hq"
|
yading@10
|
5008 .RE
|
yading@10
|
5009 .RS 4
|
yading@10
|
5010 .RE
|
yading@10
|
5011 .IP "\fBquant_mat\fR \fIinteger\fR" 4
|
yading@10
|
5012 .IX Item "quant_mat integer"
|
yading@10
|
5013 .PD
|
yading@10
|
5014 Select quantization matrix.
|
yading@10
|
5015 .RS 4
|
yading@10
|
5016 .IP "\fBauto\fR" 4
|
yading@10
|
5017 .IX Item "auto"
|
yading@10
|
5018 .PD 0
|
yading@10
|
5019 .IP "\fBdefault\fR" 4
|
yading@10
|
5020 .IX Item "default"
|
yading@10
|
5021 .IP "\fBproxy\fR" 4
|
yading@10
|
5022 .IX Item "proxy"
|
yading@10
|
5023 .IP "\fBlt\fR" 4
|
yading@10
|
5024 .IX Item "lt"
|
yading@10
|
5025 .IP "\fBstandard\fR" 4
|
yading@10
|
5026 .IX Item "standard"
|
yading@10
|
5027 .IP "\fBhq\fR" 4
|
yading@10
|
5028 .IX Item "hq"
|
yading@10
|
5029 .RE
|
yading@10
|
5030 .RS 4
|
yading@10
|
5031 .PD
|
yading@10
|
5032 .Sp
|
yading@10
|
5033 If set to \fIauto\fR, the matrix matching the profile will be picked.
|
yading@10
|
5034 If not set, the matrix providing the highest quality, \fIdefault\fR, will be
|
yading@10
|
5035 picked.
|
yading@10
|
5036 .RE
|
yading@10
|
5037 .IP "\fBbits_per_mb\fR \fIinteger\fR" 4
|
yading@10
|
5038 .IX Item "bits_per_mb integer"
|
yading@10
|
5039 How many bits to allot for coding one macroblock. Different profiles use
|
yading@10
|
5040 between 200 and 2400 bits per macroblock, the maximum is 8000.
|
yading@10
|
5041 .IP "\fBmbs_per_slice\fR \fIinteger\fR" 4
|
yading@10
|
5042 .IX Item "mbs_per_slice integer"
|
yading@10
|
5043 Number of macroblocks in each slice (1\-8); the default value (8)
|
yading@10
|
5044 should be good in almost all situations.
|
yading@10
|
5045 .IP "\fBvendor\fR \fIstring\fR" 4
|
yading@10
|
5046 .IX Item "vendor string"
|
yading@10
|
5047 Override the 4\-byte vendor \s-1ID\s0.
|
yading@10
|
5048 A custom vendor \s-1ID\s0 like \fIapl0\fR would claim the stream was produced by
|
yading@10
|
5049 the Apple encoder.
|
yading@10
|
5050 .PP
|
yading@10
|
5051 \fISpeed considerations\fR
|
yading@10
|
5052 .IX Subsection "Speed considerations"
|
yading@10
|
5053 .PP
|
yading@10
|
5054 In the default mode of operation the encoder has to honor frame constraints
|
yading@10
|
5055 (i.e. not produc frames with size bigger than requested) while still making
|
yading@10
|
5056 output picture as good as possible.
|
yading@10
|
5057 A frame containing a lot of small details is harder to compress and the encoder
|
yading@10
|
5058 would spend more time searching for appropriate quantizers for each slice.
|
yading@10
|
5059 .PP
|
yading@10
|
5060 Setting a higher \fBbits_per_mb\fR limit will improve the speed.
|
yading@10
|
5061 .PP
|
yading@10
|
5062 For the fastest encoding speed set the \fBqscale\fR parameter (4 is the
|
yading@10
|
5063 recommended value) and do not set a size constraint.
|
yading@10
|
5064 .SH "BITSTREAM FILTERS"
|
yading@10
|
5065 .IX Header "BITSTREAM FILTERS"
|
yading@10
|
5066 When you configure your FFmpeg build, all the supported bitstream
|
yading@10
|
5067 filters are enabled by default. You can list all available ones using
|
yading@10
|
5068 the configure option \f(CW\*(C`\-\-list\-bsfs\*(C'\fR.
|
yading@10
|
5069 .PP
|
yading@10
|
5070 You can disable all the bitstream filters using the configure option
|
yading@10
|
5071 \&\f(CW\*(C`\-\-disable\-bsfs\*(C'\fR, and selectively enable any bitstream filter using
|
yading@10
|
5072 the option \f(CW\*(C`\-\-enable\-bsf=BSF\*(C'\fR, or you can disable a particular
|
yading@10
|
5073 bitstream filter using the option \f(CW\*(C`\-\-disable\-bsf=BSF\*(C'\fR.
|
yading@10
|
5074 .PP
|
yading@10
|
5075 The option \f(CW\*(C`\-bsfs\*(C'\fR of the ff* tools will display the list of
|
yading@10
|
5076 all the supported bitstream filters included in your build.
|
yading@10
|
5077 .PP
|
yading@10
|
5078 Below is a description of the currently available bitstream filters.
|
yading@10
|
5079 .SS "aac_adtstoasc"
|
yading@10
|
5080 .IX Subsection "aac_adtstoasc"
|
yading@10
|
5081 .SS "chomp"
|
yading@10
|
5082 .IX Subsection "chomp"
|
yading@10
|
5083 .SS "dump_extradata"
|
yading@10
|
5084 .IX Subsection "dump_extradata"
|
yading@10
|
5085 .SS "h264_mp4toannexb"
|
yading@10
|
5086 .IX Subsection "h264_mp4toannexb"
|
yading@10
|
5087 Convert an H.264 bitstream from length prefixed mode to start code
|
yading@10
|
5088 prefixed mode (as defined in the Annex B of the ITU-T H.264
|
yading@10
|
5089 specification).
|
yading@10
|
5090 .PP
|
yading@10
|
5091 This is required by some streaming formats, typically the \s-1MPEG\-2\s0
|
yading@10
|
5092 transport stream format (\*(L"mpegts\*(R").
|
yading@10
|
5093 .PP
|
yading@10
|
5094 For example to remux an \s-1MP4\s0 file containing an H.264 stream to mpegts
|
yading@10
|
5095 format with \fBffmpeg\fR, you can use the command:
|
yading@10
|
5096 .PP
|
yading@10
|
5097 .Vb 1
|
yading@10
|
5098 \& ffmpeg \-i INPUT.mp4 \-codec copy \-bsf:v h264_mp4toannexb OUTPUT.ts
|
yading@10
|
5099 .Ve
|
yading@10
|
5100 .SS "imx_dump_header"
|
yading@10
|
5101 .IX Subsection "imx_dump_header"
|
yading@10
|
5102 .SS "mjpeg2jpeg"
|
yading@10
|
5103 .IX Subsection "mjpeg2jpeg"
|
yading@10
|
5104 Convert \s-1MJPEG/AVI1\s0 packets to full \s-1JPEG/JFIF\s0 packets.
|
yading@10
|
5105 .PP
|
yading@10
|
5106 \&\s-1MJPEG\s0 is a video codec wherein each video frame is essentially a
|
yading@10
|
5107 \&\s-1JPEG\s0 image. The individual frames can be extracted without loss,
|
yading@10
|
5108 e.g. by
|
yading@10
|
5109 .PP
|
yading@10
|
5110 .Vb 1
|
yading@10
|
5111 \& ffmpeg \-i ../some_mjpeg.avi \-c:v copy frames_%d.jpg
|
yading@10
|
5112 .Ve
|
yading@10
|
5113 .PP
|
yading@10
|
5114 Unfortunately, these chunks are incomplete \s-1JPEG\s0 images, because
|
yading@10
|
5115 they lack the \s-1DHT\s0 segment required for decoding. Quoting from
|
yading@10
|
5116 <\fBhttp://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml\fR>:
|
yading@10
|
5117 .PP
|
yading@10
|
5118 Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
|
yading@10
|
5119 commented that \*(L"\s-1MJPEG\s0, or at least the \s-1MJPEG\s0 in AVIs having the
|
yading@10
|
5120 \&\s-1MJPG\s0 fourcc, is restricted \s-1JPEG\s0 with a fixed \*(-- and *omitted* \*(--
|
yading@10
|
5121 Huffman table. The \s-1JPEG\s0 must be YCbCr colorspace, it must be 4:2:2,
|
yading@10
|
5122 and it must use basic Huffman encoding, not arithmetic or
|
yading@10
|
5123 progressive. . . . You can indeed extract the \s-1MJPEG\s0 frames and
|
yading@10
|
5124 decode them with a regular \s-1JPEG\s0 decoder, but you have to prepend
|
yading@10
|
5125 the \s-1DHT\s0 segment to them, or else the decoder won't have any idea
|
yading@10
|
5126 how to decompress the data. The exact table necessary is given in
|
yading@10
|
5127 the OpenDML spec.\*(R"
|
yading@10
|
5128 .PP
|
yading@10
|
5129 This bitstream filter patches the header of frames extracted from an \s-1MJPEG\s0
|
yading@10
|
5130 stream (carrying the \s-1AVI1\s0 header \s-1ID\s0 and lacking a \s-1DHT\s0 segment) to
|
yading@10
|
5131 produce fully qualified \s-1JPEG\s0 images.
|
yading@10
|
5132 .PP
|
yading@10
|
5133 .Vb 3
|
yading@10
|
5134 \& ffmpeg \-i mjpeg\-movie.avi \-c:v copy \-bsf:v mjpeg2jpeg frame_%d.jpg
|
yading@10
|
5135 \& exiftran \-i \-9 frame*.jpg
|
yading@10
|
5136 \& ffmpeg \-i frame_%d.jpg \-c:v copy rotated.avi
|
yading@10
|
5137 .Ve
|
yading@10
|
5138 .SS "mjpega_dump_header"
|
yading@10
|
5139 .IX Subsection "mjpega_dump_header"
|
yading@10
|
5140 .SS "movsub"
|
yading@10
|
5141 .IX Subsection "movsub"
|
yading@10
|
5142 .SS "mp3_header_compress"
|
yading@10
|
5143 .IX Subsection "mp3_header_compress"
|
yading@10
|
5144 .SS "mp3_header_decompress"
|
yading@10
|
5145 .IX Subsection "mp3_header_decompress"
|
yading@10
|
5146 .SS "noise"
|
yading@10
|
5147 .IX Subsection "noise"
|
yading@10
|
5148 .SS "remove_extradata"
|
yading@10
|
5149 .IX Subsection "remove_extradata"
|
yading@10
|
5150 .SH "FORMAT OPTIONS"
|
yading@10
|
5151 .IX Header "FORMAT OPTIONS"
|
yading@10
|
5152 The libavformat library provides some generic global options, which
|
yading@10
|
5153 can be set on all the muxers and demuxers. In addition each muxer or
|
yading@10
|
5154 demuxer may support so-called private options, which are specific for
|
yading@10
|
5155 that component.
|
yading@10
|
5156 .PP
|
yading@10
|
5157 Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
|
yading@10
|
5158 FFmpeg tools, or by setting the value explicitly in the
|
yading@10
|
5159 \&\f(CW\*(C`AVFormatContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0
|
yading@10
|
5160 for programmatic use.
|
yading@10
|
5161 .PP
|
yading@10
|
5162 The list of supported options follows:
|
yading@10
|
5163 .IP "\fBavioflags\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
5164 .IX Item "avioflags flags (input/output)"
|
yading@10
|
5165 Possible values:
|
yading@10
|
5166 .RS 4
|
yading@10
|
5167 .IP "\fBdirect\fR" 4
|
yading@10
|
5168 .IX Item "direct"
|
yading@10
|
5169 Reduce buffering.
|
yading@10
|
5170 .RE
|
yading@10
|
5171 .RS 4
|
yading@10
|
5172 .RE
|
yading@10
|
5173 .IP "\fBprobesize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5174 .IX Item "probesize integer (input)"
|
yading@10
|
5175 Set probing size in bytes, i.e. the size of the data to analyze to get
|
yading@10
|
5176 stream information. A higher value will allow to detect more
|
yading@10
|
5177 information in case it is dispersed into the stream, but will increase
|
yading@10
|
5178 latency. Must be an integer not lesser than 32. It is 5000000 by default.
|
yading@10
|
5179 .IP "\fBpacketsize\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
5180 .IX Item "packetsize integer (output)"
|
yading@10
|
5181 Set packet size.
|
yading@10
|
5182 .IP "\fBfflags\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
5183 .IX Item "fflags flags (input/output)"
|
yading@10
|
5184 Set format flags.
|
yading@10
|
5185 .Sp
|
yading@10
|
5186 Possible values:
|
yading@10
|
5187 .RS 4
|
yading@10
|
5188 .IP "\fBignidx\fR" 4
|
yading@10
|
5189 .IX Item "ignidx"
|
yading@10
|
5190 Ignore index.
|
yading@10
|
5191 .IP "\fBgenpts\fR" 4
|
yading@10
|
5192 .IX Item "genpts"
|
yading@10
|
5193 Generate \s-1PTS\s0.
|
yading@10
|
5194 .IP "\fBnofillin\fR" 4
|
yading@10
|
5195 .IX Item "nofillin"
|
yading@10
|
5196 Do not fill in missing values that can be exactly calculated.
|
yading@10
|
5197 .IP "\fBnoparse\fR" 4
|
yading@10
|
5198 .IX Item "noparse"
|
yading@10
|
5199 Disable AVParsers, this needs \f(CW\*(C`+nofillin\*(C'\fR too.
|
yading@10
|
5200 .IP "\fBigndts\fR" 4
|
yading@10
|
5201 .IX Item "igndts"
|
yading@10
|
5202 Ignore \s-1DTS\s0.
|
yading@10
|
5203 .IP "\fBdiscardcorrupt\fR" 4
|
yading@10
|
5204 .IX Item "discardcorrupt"
|
yading@10
|
5205 Discard corrupted frames.
|
yading@10
|
5206 .IP "\fBsortdts\fR" 4
|
yading@10
|
5207 .IX Item "sortdts"
|
yading@10
|
5208 Try to interleave output packets by \s-1DTS\s0.
|
yading@10
|
5209 .IP "\fBkeepside\fR" 4
|
yading@10
|
5210 .IX Item "keepside"
|
yading@10
|
5211 Do not merge side data.
|
yading@10
|
5212 .IP "\fBlatm\fR" 4
|
yading@10
|
5213 .IX Item "latm"
|
yading@10
|
5214 Enable \s-1RTP\s0 \s-1MP4A\-LATM\s0 payload.
|
yading@10
|
5215 .IP "\fBnobuffer\fR" 4
|
yading@10
|
5216 .IX Item "nobuffer"
|
yading@10
|
5217 Reduce the latency introduced by optional buffering
|
yading@10
|
5218 .RE
|
yading@10
|
5219 .RS 4
|
yading@10
|
5220 .RE
|
yading@10
|
5221 .IP "\fBanalyzeduration\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5222 .IX Item "analyzeduration integer (input)"
|
yading@10
|
5223 Specify how many microseconds are analyzed to probe the input. A
|
yading@10
|
5224 higher value will allow to detect more accurate information, but will
|
yading@10
|
5225 increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
|
yading@10
|
5226 .IP "\fBcryptokey\fR \fIhexadecimal string\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5227 .IX Item "cryptokey hexadecimal string (input)"
|
yading@10
|
5228 Set decryption key.
|
yading@10
|
5229 .IP "\fBindexmem\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5230 .IX Item "indexmem integer (input)"
|
yading@10
|
5231 Set max memory used for timestamp index (per stream).
|
yading@10
|
5232 .IP "\fBrtbufsize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5233 .IX Item "rtbufsize integer (input)"
|
yading@10
|
5234 Set max memory used for buffering real-time frames.
|
yading@10
|
5235 .IP "\fBfdebug\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
5236 .IX Item "fdebug flags (input/output)"
|
yading@10
|
5237 Print specific debug info.
|
yading@10
|
5238 .Sp
|
yading@10
|
5239 Possible values:
|
yading@10
|
5240 .RS 4
|
yading@10
|
5241 .IP "\fBts\fR" 4
|
yading@10
|
5242 .IX Item "ts"
|
yading@10
|
5243 .RE
|
yading@10
|
5244 .RS 4
|
yading@10
|
5245 .RE
|
yading@10
|
5246 .PD 0
|
yading@10
|
5247 .IP "\fBmax_delay\fR \fIinteger\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4
|
yading@10
|
5248 .IX Item "max_delay integer (input/output)"
|
yading@10
|
5249 .PD
|
yading@10
|
5250 Set maximum muxing or demuxing delay in microseconds.
|
yading@10
|
5251 .IP "\fBfpsprobesize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5252 .IX Item "fpsprobesize integer (input)"
|
yading@10
|
5253 Set number of frames used to probe fps.
|
yading@10
|
5254 .IP "\fBaudio_preload\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
5255 .IX Item "audio_preload integer (output)"
|
yading@10
|
5256 Set microseconds by which audio packets should be interleaved earlier.
|
yading@10
|
5257 .IP "\fBchunk_duration\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
5258 .IX Item "chunk_duration integer (output)"
|
yading@10
|
5259 Set microseconds for each chunk.
|
yading@10
|
5260 .IP "\fBchunk_size\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
5261 .IX Item "chunk_size integer (output)"
|
yading@10
|
5262 Set size in bytes for each chunk.
|
yading@10
|
5263 .IP "\fBerr_detect, f_err_detect\fR \fIflags\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5264 .IX Item "err_detect, f_err_detect flags (input)"
|
yading@10
|
5265 Set error detection flags. \f(CW\*(C`f_err_detect\*(C'\fR is deprecated and
|
yading@10
|
5266 should be used only via the \fBffmpeg\fR tool.
|
yading@10
|
5267 .Sp
|
yading@10
|
5268 Possible values:
|
yading@10
|
5269 .RS 4
|
yading@10
|
5270 .IP "\fBcrccheck\fR" 4
|
yading@10
|
5271 .IX Item "crccheck"
|
yading@10
|
5272 Verify embedded CRCs.
|
yading@10
|
5273 .IP "\fBbitstream\fR" 4
|
yading@10
|
5274 .IX Item "bitstream"
|
yading@10
|
5275 Detect bitstream specification deviations.
|
yading@10
|
5276 .IP "\fBbuffer\fR" 4
|
yading@10
|
5277 .IX Item "buffer"
|
yading@10
|
5278 Detect improper bitstream length.
|
yading@10
|
5279 .IP "\fBexplode\fR" 4
|
yading@10
|
5280 .IX Item "explode"
|
yading@10
|
5281 Abort decoding on minor error detection.
|
yading@10
|
5282 .IP "\fBcareful\fR" 4
|
yading@10
|
5283 .IX Item "careful"
|
yading@10
|
5284 Consider things that violate the spec and have not been seen in the
|
yading@10
|
5285 wild as errors.
|
yading@10
|
5286 .IP "\fBcompliant\fR" 4
|
yading@10
|
5287 .IX Item "compliant"
|
yading@10
|
5288 Consider all spec non compliancies as errors.
|
yading@10
|
5289 .IP "\fBaggressive\fR" 4
|
yading@10
|
5290 .IX Item "aggressive"
|
yading@10
|
5291 Consider things that a sane encoder should not do as an error.
|
yading@10
|
5292 .RE
|
yading@10
|
5293 .RS 4
|
yading@10
|
5294 .RE
|
yading@10
|
5295 .IP "\fBuse_wallclock_as_timestamps\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4
|
yading@10
|
5296 .IX Item "use_wallclock_as_timestamps integer (input)"
|
yading@10
|
5297 Use wallclock as timestamps.
|
yading@10
|
5298 .IP "\fBavoid_negative_ts\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
5299 .IX Item "avoid_negative_ts integer (output)"
|
yading@10
|
5300 Shift timestamps to make them positive. A value of 1 enables shifting,
|
yading@10
|
5301 a value of 0 disables it, the default value of \-1 enables shifting
|
yading@10
|
5302 when required by the target format.
|
yading@10
|
5303 .Sp
|
yading@10
|
5304 When shifting is enabled, all output timestamps are shifted by the
|
yading@10
|
5305 same amount. Audio, video, and subtitles desynching and relative
|
yading@10
|
5306 timestamp differences are preserved compared to how they would have
|
yading@10
|
5307 been without shifting.
|
yading@10
|
5308 .Sp
|
yading@10
|
5309 Also note that this affects only leading negative timestamps, and not
|
yading@10
|
5310 non-monotonic negative timestamps.
|
yading@10
|
5311 .IP "\fBflush_packets\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4
|
yading@10
|
5312 .IX Item "flush_packets integer (output)"
|
yading@10
|
5313 Flush the underlying I/O stream after each packet. Default 1 enables it, and
|
yading@10
|
5314 has the effect of reducing the latency; 0 disables it and may slightly
|
yading@10
|
5315 increase performance in some cases.
|
yading@10
|
5316 .SH "DEMUXERS"
|
yading@10
|
5317 .IX Header "DEMUXERS"
|
yading@10
|
5318 Demuxers are configured elements in FFmpeg which allow to read the
|
yading@10
|
5319 multimedia streams from a particular type of file.
|
yading@10
|
5320 .PP
|
yading@10
|
5321 When you configure your FFmpeg build, all the supported demuxers
|
yading@10
|
5322 are enabled by default. You can list all available ones using the
|
yading@10
|
5323 configure option \f(CW\*(C`\-\-list\-demuxers\*(C'\fR.
|
yading@10
|
5324 .PP
|
yading@10
|
5325 You can disable all the demuxers using the configure option
|
yading@10
|
5326 \&\f(CW\*(C`\-\-disable\-demuxers\*(C'\fR, and selectively enable a single demuxer with
|
yading@10
|
5327 the option \f(CW\*(C`\-\-enable\-demuxer=\f(CIDEMUXER\f(CW\*(C'\fR, or disable it
|
yading@10
|
5328 with the option \f(CW\*(C`\-\-disable\-demuxer=\f(CIDEMUXER\f(CW\*(C'\fR.
|
yading@10
|
5329 .PP
|
yading@10
|
5330 The option \f(CW\*(C`\-formats\*(C'\fR of the ff* tools will display the list of
|
yading@10
|
5331 enabled demuxers.
|
yading@10
|
5332 .PP
|
yading@10
|
5333 The description of some of the currently available demuxers follows.
|
yading@10
|
5334 .SS "applehttp"
|
yading@10
|
5335 .IX Subsection "applehttp"
|
yading@10
|
5336 Apple \s-1HTTP\s0 Live Streaming demuxer.
|
yading@10
|
5337 .PP
|
yading@10
|
5338 This demuxer presents all AVStreams from all variant streams.
|
yading@10
|
5339 The id field is set to the bitrate variant index number. By setting
|
yading@10
|
5340 the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay),
|
yading@10
|
5341 the caller can decide which variant streams to actually receive.
|
yading@10
|
5342 The total bitrate of the variant that the stream belongs to is
|
yading@10
|
5343 available in a metadata key named \*(L"variant_bitrate\*(R".
|
yading@10
|
5344 .SS "concat"
|
yading@10
|
5345 .IX Subsection "concat"
|
yading@10
|
5346 Virtual concatenation script demuxer.
|
yading@10
|
5347 .PP
|
yading@10
|
5348 This demuxer reads a list of files and other directives from a text file and
|
yading@10
|
5349 demuxes them one after the other, as if all their packet had been muxed
|
yading@10
|
5350 together.
|
yading@10
|
5351 .PP
|
yading@10
|
5352 The timestamps in the files are adjusted so that the first file starts at 0
|
yading@10
|
5353 and each next file starts where the previous one finishes. Note that it is
|
yading@10
|
5354 done globally and may cause gaps if all streams do not have exactly the same
|
yading@10
|
5355 length.
|
yading@10
|
5356 .PP
|
yading@10
|
5357 All files must have the same streams (same codecs, same time base, etc.).
|
yading@10
|
5358 .PP
|
yading@10
|
5359 The duration of each file is used to adjust the timestamps of the next file:
|
yading@10
|
5360 if the duration is incorrect (because it was computed using the bit-rate or
|
yading@10
|
5361 because the file is truncated, for example), it can cause artifacts. The
|
yading@10
|
5362 \&\f(CW\*(C`duration\*(C'\fR directive can be used to override the duration stored in
|
yading@10
|
5363 each file.
|
yading@10
|
5364 .PP
|
yading@10
|
5365 \fISyntax\fR
|
yading@10
|
5366 .IX Subsection "Syntax"
|
yading@10
|
5367 .PP
|
yading@10
|
5368 The script is a text file in extended-ASCII, with one directive per line.
|
yading@10
|
5369 Empty lines, leading spaces and lines starting with '#' are ignored. The
|
yading@10
|
5370 following directive is recognized:
|
yading@10
|
5371 .ie n .IP "\fB\fB""file \f(BIpath\f(CB""\fB\fR" 4
|
yading@10
|
5372 .el .IP "\fB\f(CBfile \f(CBpath\f(CB\fB\fR" 4
|
yading@10
|
5373 .IX Item "file path"
|
yading@10
|
5374 Path to a file to read; special characters and spaces must be escaped with
|
yading@10
|
5375 backslash or single quotes.
|
yading@10
|
5376 .Sp
|
yading@10
|
5377 All subsequent directives apply to that file.
|
yading@10
|
5378 .ie n .IP "\fB\fB""ffconcat version 1.0""\fB\fR" 4
|
yading@10
|
5379 .el .IP "\fB\f(CBffconcat version 1.0\fB\fR" 4
|
yading@10
|
5380 .IX Item "ffconcat version 1.0"
|
yading@10
|
5381 Identify the script type and version. It also sets the \fBsafe\fR option
|
yading@10
|
5382 to 1 if it was to its default \-1.
|
yading@10
|
5383 .Sp
|
yading@10
|
5384 To make FFmpeg recognize the format automatically, this directive must
|
yading@10
|
5385 appears exactly as is (no extra space or byte-order-mark) on the very first
|
yading@10
|
5386 line of the script.
|
yading@10
|
5387 .ie n .IP "\fB\fB""duration \f(BIdur\f(CB""\fB\fR" 4
|
yading@10
|
5388 .el .IP "\fB\f(CBduration \f(CBdur\f(CB\fB\fR" 4
|
yading@10
|
5389 .IX Item "duration dur"
|
yading@10
|
5390 Duration of the file. This information can be specified from the file;
|
yading@10
|
5391 specifying it here may be more efficient or help if the information from the
|
yading@10
|
5392 file is not available or accurate.
|
yading@10
|
5393 .Sp
|
yading@10
|
5394 If the duration is set for all files, then it is possible to seek in the
|
yading@10
|
5395 whole concatenated video.
|
yading@10
|
5396 .PP
|
yading@10
|
5397 \fIOptions\fR
|
yading@10
|
5398 .IX Subsection "Options"
|
yading@10
|
5399 .PP
|
yading@10
|
5400 This demuxer accepts the following option:
|
yading@10
|
5401 .IP "\fBsafe\fR" 4
|
yading@10
|
5402 .IX Item "safe"
|
yading@10
|
5403 If set to 1, reject unsafe file paths. A file path is considered safe if it
|
yading@10
|
5404 does not contain a protocol specification and is relative and all components
|
yading@10
|
5405 only contain characters from the portable character set (letters, digits,
|
yading@10
|
5406 period, underscore and hyphen) and have no period at the beginning of a
|
yading@10
|
5407 component.
|
yading@10
|
5408 .Sp
|
yading@10
|
5409 If set to 0, any file name is accepted.
|
yading@10
|
5410 .Sp
|
yading@10
|
5411 The default is \-1, it is equivalent to 1 if the format was automatically
|
yading@10
|
5412 probed and 0 otherwise.
|
yading@10
|
5413 .SS "libquvi"
|
yading@10
|
5414 .IX Subsection "libquvi"
|
yading@10
|
5415 Play media from Internet services using the quvi project.
|
yading@10
|
5416 .PP
|
yading@10
|
5417 The demuxer accepts a \fBformat\fR option to request a specific quality. It
|
yading@10
|
5418 is by default set to \fIbest\fR.
|
yading@10
|
5419 .PP
|
yading@10
|
5420 See <\fBhttp://quvi.sourceforge.net/\fR> for more information.
|
yading@10
|
5421 .PP
|
yading@10
|
5422 FFmpeg needs to be built with \f(CW\*(C`\-\-enable\-libquvi\*(C'\fR for this demuxer to be
|
yading@10
|
5423 enabled.
|
yading@10
|
5424 .SS "image2"
|
yading@10
|
5425 .IX Subsection "image2"
|
yading@10
|
5426 Image file demuxer.
|
yading@10
|
5427 .PP
|
yading@10
|
5428 This demuxer reads from a list of image files specified by a pattern.
|
yading@10
|
5429 The syntax and meaning of the pattern is specified by the
|
yading@10
|
5430 option \fIpattern_type\fR.
|
yading@10
|
5431 .PP
|
yading@10
|
5432 The pattern may contain a suffix which is used to automatically
|
yading@10
|
5433 determine the format of the images contained in the files.
|
yading@10
|
5434 .PP
|
yading@10
|
5435 The size, the pixel format, and the format of each image must be the
|
yading@10
|
5436 same for all the files in the sequence.
|
yading@10
|
5437 .PP
|
yading@10
|
5438 This demuxer accepts the following options:
|
yading@10
|
5439 .IP "\fBframerate\fR" 4
|
yading@10
|
5440 .IX Item "framerate"
|
yading@10
|
5441 Set the frame rate for the video stream. It defaults to 25.
|
yading@10
|
5442 .IP "\fBloop\fR" 4
|
yading@10
|
5443 .IX Item "loop"
|
yading@10
|
5444 If set to 1, loop over the input. Default value is 0.
|
yading@10
|
5445 .IP "\fBpattern_type\fR" 4
|
yading@10
|
5446 .IX Item "pattern_type"
|
yading@10
|
5447 Select the pattern type used to interpret the provided filename.
|
yading@10
|
5448 .Sp
|
yading@10
|
5449 \&\fIpattern_type\fR accepts one of the following values.
|
yading@10
|
5450 .RS 4
|
yading@10
|
5451 .IP "\fBsequence\fR" 4
|
yading@10
|
5452 .IX Item "sequence"
|
yading@10
|
5453 Select a sequence pattern type, used to specify a sequence of files
|
yading@10
|
5454 indexed by sequential numbers.
|
yading@10
|
5455 .Sp
|
yading@10
|
5456 A sequence pattern may contain the string \*(L"%d\*(R" or "%0\fIN\fRd\*(L", which
|
yading@10
|
5457 specifies the position of the characters representing a sequential
|
yading@10
|
5458 number in each filename matched by the pattern. If the form
|
yading@10
|
5459 \&\*(R"%d0\fIN\fRd" is used, the string representing the number in each
|
yading@10
|
5460 filename is 0\-padded and \fIN\fR is the total number of 0\-padded
|
yading@10
|
5461 digits representing the number. The literal character '%' can be
|
yading@10
|
5462 specified in the pattern with the string \*(L"%%\*(R".
|
yading@10
|
5463 .Sp
|
yading@10
|
5464 If the sequence pattern contains \*(L"%d\*(R" or "%0\fIN\fRd", the first filename of
|
yading@10
|
5465 the file list specified by the pattern must contain a number
|
yading@10
|
5466 inclusively contained between \fIstart_number\fR and
|
yading@10
|
5467 \&\fIstart_number\fR+\fIstart_number_range\fR\-1, and all the following
|
yading@10
|
5468 numbers must be sequential.
|
yading@10
|
5469 .Sp
|
yading@10
|
5470 For example the pattern \*(L"img\-%03d.bmp\*(R" will match a sequence of
|
yading@10
|
5471 filenames of the form \fIimg\-001.bmp\fR, \fIimg\-002.bmp\fR, ...,
|
yading@10
|
5472 \&\fIimg\-010.bmp\fR, etc.; the pattern \*(L"i%%m%%g\-%d.jpg\*(R" will match a
|
yading@10
|
5473 sequence of filenames of the form \fIi%m%g\-1.jpg\fR,
|
yading@10
|
5474 \&\fIi%m%g\-2.jpg\fR, ..., \fIi%m%g\-10.jpg\fR, etc.
|
yading@10
|
5475 .Sp
|
yading@10
|
5476 Note that the pattern must not necessarily contain \*(L"%d\*(R" or
|
yading@10
|
5477 "%0\fIN\fRd", for example to convert a single image file
|
yading@10
|
5478 \&\fIimg.jpeg\fR you can employ the command:
|
yading@10
|
5479 .Sp
|
yading@10
|
5480 .Vb 1
|
yading@10
|
5481 \& ffmpeg \-i img.jpeg img.png
|
yading@10
|
5482 .Ve
|
yading@10
|
5483 .IP "\fBglob\fR" 4
|
yading@10
|
5484 .IX Item "glob"
|
yading@10
|
5485 Select a glob wildcard pattern type.
|
yading@10
|
5486 .Sp
|
yading@10
|
5487 The pattern is interpreted like a \f(CW\*(C`glob()\*(C'\fR pattern. This is only
|
yading@10
|
5488 selectable if libavformat was compiled with globbing support.
|
yading@10
|
5489 .IP "\fBglob_sequence\fR \fI(deprecated, will be removed)\fR" 4
|
yading@10
|
5490 .IX Item "glob_sequence (deprecated, will be removed)"
|
yading@10
|
5491 Select a mixed glob wildcard/sequence pattern.
|
yading@10
|
5492 .Sp
|
yading@10
|
5493 If your version of libavformat was compiled with globbing support, and
|
yading@10
|
5494 the provided pattern contains at least one glob meta character among
|
yading@10
|
5495 \&\f(CW\*(C`%*?[]{}\*(C'\fR that is preceded by an unescaped \*(L"%\*(R", the pattern is
|
yading@10
|
5496 interpreted like a \f(CW\*(C`glob()\*(C'\fR pattern, otherwise it is interpreted
|
yading@10
|
5497 like a sequence pattern.
|
yading@10
|
5498 .Sp
|
yading@10
|
5499 All glob special characters \f(CW\*(C`%*?[]{}\*(C'\fR must be prefixed
|
yading@10
|
5500 with \*(L"%\*(R". To escape a literal \*(L"%\*(R" you shall use \*(L"%%\*(R".
|
yading@10
|
5501 .Sp
|
yading@10
|
5502 For example the pattern \f(CW\*(C`foo\-%*.jpeg\*(C'\fR will match all the
|
yading@10
|
5503 filenames prefixed by \*(L"foo\-\*(R" and terminating with \*(L".jpeg\*(R", and
|
yading@10
|
5504 \&\f(CW\*(C`foo\-%?%?%?.jpeg\*(C'\fR will match all the filenames prefixed with
|
yading@10
|
5505 \&\*(L"foo\-\*(R", followed by a sequence of three characters, and terminating
|
yading@10
|
5506 with \*(L".jpeg\*(R".
|
yading@10
|
5507 .Sp
|
yading@10
|
5508 This pattern type is deprecated in favor of \fIglob\fR and
|
yading@10
|
5509 \&\fIsequence\fR.
|
yading@10
|
5510 .RE
|
yading@10
|
5511 .RS 4
|
yading@10
|
5512 .Sp
|
yading@10
|
5513 Default value is \fIglob_sequence\fR.
|
yading@10
|
5514 .RE
|
yading@10
|
5515 .IP "\fBpixel_format\fR" 4
|
yading@10
|
5516 .IX Item "pixel_format"
|
yading@10
|
5517 Set the pixel format of the images to read. If not specified the pixel
|
yading@10
|
5518 format is guessed from the first image file in the sequence.
|
yading@10
|
5519 .IP "\fBstart_number\fR" 4
|
yading@10
|
5520 .IX Item "start_number"
|
yading@10
|
5521 Set the index of the file matched by the image file pattern to start
|
yading@10
|
5522 to read from. Default value is 0.
|
yading@10
|
5523 .IP "\fBstart_number_range\fR" 4
|
yading@10
|
5524 .IX Item "start_number_range"
|
yading@10
|
5525 Set the index interval range to check when looking for the first image
|
yading@10
|
5526 file in the sequence, starting from \fIstart_number\fR. Default value
|
yading@10
|
5527 is 5.
|
yading@10
|
5528 .IP "\fBvideo_size\fR" 4
|
yading@10
|
5529 .IX Item "video_size"
|
yading@10
|
5530 Set the video size of the images to read. If not specified the video
|
yading@10
|
5531 size is guessed from the first image file in the sequence.
|
yading@10
|
5532 .PP
|
yading@10
|
5533 \fIExamples\fR
|
yading@10
|
5534 .IX Subsection "Examples"
|
yading@10
|
5535 .IP "\(bu" 4
|
yading@10
|
5536 Use \fBffmpeg\fR for creating a video from the images in the file
|
yading@10
|
5537 sequence \fIimg\-001.jpeg\fR, \fIimg\-002.jpeg\fR, ..., assuming an
|
yading@10
|
5538 input frame rate of 10 frames per second:
|
yading@10
|
5539 .Sp
|
yading@10
|
5540 .Vb 1
|
yading@10
|
5541 \& ffmpeg \-i \*(Aqimg\-%03d.jpeg\*(Aq \-r 10 out.mkv
|
yading@10
|
5542 .Ve
|
yading@10
|
5543 .IP "\(bu" 4
|
yading@10
|
5544 As above, but start by reading from a file with index 100 in the sequence:
|
yading@10
|
5545 .Sp
|
yading@10
|
5546 .Vb 1
|
yading@10
|
5547 \& ffmpeg \-start_number 100 \-i \*(Aqimg\-%03d.jpeg\*(Aq \-r 10 out.mkv
|
yading@10
|
5548 .Ve
|
yading@10
|
5549 .IP "\(bu" 4
|
yading@10
|
5550 Read images matching the \*(L"*.png\*(R" glob pattern , that is all the files
|
yading@10
|
5551 terminating with the \*(L".png\*(R" suffix:
|
yading@10
|
5552 .Sp
|
yading@10
|
5553 .Vb 1
|
yading@10
|
5554 \& ffmpeg \-pattern_type glob \-i "*.png" \-r 10 out.mkv
|
yading@10
|
5555 .Ve
|
yading@10
|
5556 .SS "rawvideo"
|
yading@10
|
5557 .IX Subsection "rawvideo"
|
yading@10
|
5558 Raw video demuxer.
|
yading@10
|
5559 .PP
|
yading@10
|
5560 This demuxer allows to read raw video data. Since there is no header
|
yading@10
|
5561 specifying the assumed video parameters, the user must specify them
|
yading@10
|
5562 in order to be able to decode the data correctly.
|
yading@10
|
5563 .PP
|
yading@10
|
5564 This demuxer accepts the following options:
|
yading@10
|
5565 .IP "\fBframerate\fR" 4
|
yading@10
|
5566 .IX Item "framerate"
|
yading@10
|
5567 Set input video frame rate. Default value is 25.
|
yading@10
|
5568 .IP "\fBpixel_format\fR" 4
|
yading@10
|
5569 .IX Item "pixel_format"
|
yading@10
|
5570 Set the input video pixel format. Default value is \f(CW\*(C`yuv420p\*(C'\fR.
|
yading@10
|
5571 .IP "\fBvideo_size\fR" 4
|
yading@10
|
5572 .IX Item "video_size"
|
yading@10
|
5573 Set the input video size. This value must be specified explicitly.
|
yading@10
|
5574 .PP
|
yading@10
|
5575 For example to read a rawvideo file \fIinput.raw\fR with
|
yading@10
|
5576 \&\fBffplay\fR, assuming a pixel format of \f(CW\*(C`rgb24\*(C'\fR, a video
|
yading@10
|
5577 size of \f(CW\*(C`320x240\*(C'\fR, and a frame rate of 10 images per second, use
|
yading@10
|
5578 the command:
|
yading@10
|
5579 .PP
|
yading@10
|
5580 .Vb 1
|
yading@10
|
5581 \& ffplay \-f rawvideo \-pixel_format rgb24 \-video_size 320x240 \-framerate 10 input.raw
|
yading@10
|
5582 .Ve
|
yading@10
|
5583 .SS "sbg"
|
yading@10
|
5584 .IX Subsection "sbg"
|
yading@10
|
5585 SBaGen script demuxer.
|
yading@10
|
5586 .PP
|
yading@10
|
5587 This demuxer reads the script language used by SBaGen
|
yading@10
|
5588 <\fBhttp://uazu.net/sbagen/\fR> to generate binaural beats sessions. A \s-1SBG\s0
|
yading@10
|
5589 script looks like that:
|
yading@10
|
5590 .PP
|
yading@10
|
5591 .Vb 9
|
yading@10
|
5592 \& \-SE
|
yading@10
|
5593 \& a: 300\-2.5/3 440+4.5/0
|
yading@10
|
5594 \& b: 300\-2.5/0 440+4.5/3
|
yading@10
|
5595 \& off: \-
|
yading@10
|
5596 \& NOW == a
|
yading@10
|
5597 \& +0:07:00 == b
|
yading@10
|
5598 \& +0:14:00 == a
|
yading@10
|
5599 \& +0:21:00 == b
|
yading@10
|
5600 \& +0:30:00 off
|
yading@10
|
5601 .Ve
|
yading@10
|
5602 .PP
|
yading@10
|
5603 A \s-1SBG\s0 script can mix absolute and relative timestamps. If the script uses
|
yading@10
|
5604 either only absolute timestamps (including the script start time) or only
|
yading@10
|
5605 relative ones, then its layout is fixed, and the conversion is
|
yading@10
|
5606 straightforward. On the other hand, if the script mixes both kind of
|
yading@10
|
5607 timestamps, then the \fI\s-1NOW\s0\fR reference for relative timestamps will be
|
yading@10
|
5608 taken from the current time of day at the time the script is read, and the
|
yading@10
|
5609 script layout will be frozen according to that reference. That means that if
|
yading@10
|
5610 the script is directly played, the actual times will match the absolute
|
yading@10
|
5611 timestamps up to the sound controller's clock accuracy, but if the user
|
yading@10
|
5612 somehow pauses the playback or seeks, all times will be shifted accordingly.
|
yading@10
|
5613 .SS "tedcaptions"
|
yading@10
|
5614 .IX Subsection "tedcaptions"
|
yading@10
|
5615 \&\s-1JSON\s0 captions used for <\fBhttp://www.ted.com/\fR>.
|
yading@10
|
5616 .PP
|
yading@10
|
5617 \&\s-1TED\s0 does not provide links to the captions, but they can be guessed from the
|
yading@10
|
5618 page. The file \fItools/bookmarklets.html\fR from the FFmpeg source tree
|
yading@10
|
5619 contains a bookmarklet to expose them.
|
yading@10
|
5620 .PP
|
yading@10
|
5621 This demuxer accepts the following option:
|
yading@10
|
5622 .IP "\fBstart_time\fR" 4
|
yading@10
|
5623 .IX Item "start_time"
|
yading@10
|
5624 Set the start time of the \s-1TED\s0 talk, in milliseconds. The default is 15000
|
yading@10
|
5625 (15s). It is used to sync the captions with the downloadable videos, because
|
yading@10
|
5626 they include a 15s intro.
|
yading@10
|
5627 .PP
|
yading@10
|
5628 Example: convert the captions to a format most players understand:
|
yading@10
|
5629 .PP
|
yading@10
|
5630 .Vb 1
|
yading@10
|
5631 \& ffmpeg \-i http://www.ted.com/talks/subtitles/id/1/lang/en talk1\-en.srt
|
yading@10
|
5632 .Ve
|
yading@10
|
5633 .SH "MUXERS"
|
yading@10
|
5634 .IX Header "MUXERS"
|
yading@10
|
5635 Muxers are configured elements in FFmpeg which allow writing
|
yading@10
|
5636 multimedia streams to a particular type of file.
|
yading@10
|
5637 .PP
|
yading@10
|
5638 When you configure your FFmpeg build, all the supported muxers
|
yading@10
|
5639 are enabled by default. You can list all available muxers using the
|
yading@10
|
5640 configure option \f(CW\*(C`\-\-list\-muxers\*(C'\fR.
|
yading@10
|
5641 .PP
|
yading@10
|
5642 You can disable all the muxers with the configure option
|
yading@10
|
5643 \&\f(CW\*(C`\-\-disable\-muxers\*(C'\fR and selectively enable / disable single muxers
|
yading@10
|
5644 with the options \f(CW\*(C`\-\-enable\-muxer=\f(CIMUXER\f(CW\*(C'\fR /
|
yading@10
|
5645 \&\f(CW\*(C`\-\-disable\-muxer=\f(CIMUXER\f(CW\*(C'\fR.
|
yading@10
|
5646 .PP
|
yading@10
|
5647 The option \f(CW\*(C`\-formats\*(C'\fR of the ff* tools will display the list of
|
yading@10
|
5648 enabled muxers.
|
yading@10
|
5649 .PP
|
yading@10
|
5650 A description of some of the currently available muxers follows.
|
yading@10
|
5651 .SS "crc"
|
yading@10
|
5652 .IX Subsection "crc"
|
yading@10
|
5653 \&\s-1CRC\s0 (Cyclic Redundancy Check) testing format.
|
yading@10
|
5654 .PP
|
yading@10
|
5655 This muxer computes and prints the Adler\-32 \s-1CRC\s0 of all the input audio
|
yading@10
|
5656 and video frames. By default audio frames are converted to signed
|
yading@10
|
5657 16\-bit raw audio and video frames to raw video before computing the
|
yading@10
|
5658 \&\s-1CRC\s0.
|
yading@10
|
5659 .PP
|
yading@10
|
5660 The output of the muxer consists of a single line of the form:
|
yading@10
|
5661 CRC=0x\fI\s-1CRC\s0\fR, where \fI\s-1CRC\s0\fR is a hexadecimal number 0\-padded to
|
yading@10
|
5662 8 digits containing the \s-1CRC\s0 for all the decoded input frames.
|
yading@10
|
5663 .PP
|
yading@10
|
5664 For example to compute the \s-1CRC\s0 of the input, and store it in the file
|
yading@10
|
5665 \&\fIout.crc\fR:
|
yading@10
|
5666 .PP
|
yading@10
|
5667 .Vb 1
|
yading@10
|
5668 \& ffmpeg \-i INPUT \-f crc out.crc
|
yading@10
|
5669 .Ve
|
yading@10
|
5670 .PP
|
yading@10
|
5671 You can print the \s-1CRC\s0 to stdout with the command:
|
yading@10
|
5672 .PP
|
yading@10
|
5673 .Vb 1
|
yading@10
|
5674 \& ffmpeg \-i INPUT \-f crc \-
|
yading@10
|
5675 .Ve
|
yading@10
|
5676 .PP
|
yading@10
|
5677 You can select the output format of each frame with \fBffmpeg\fR by
|
yading@10
|
5678 specifying the audio and video codec and format. For example to
|
yading@10
|
5679 compute the \s-1CRC\s0 of the input audio converted to \s-1PCM\s0 unsigned 8\-bit
|
yading@10
|
5680 and the input video converted to \s-1MPEG\-2\s0 video, use the command:
|
yading@10
|
5681 .PP
|
yading@10
|
5682 .Vb 1
|
yading@10
|
5683 \& ffmpeg \-i INPUT \-c:a pcm_u8 \-c:v mpeg2video \-f crc \-
|
yading@10
|
5684 .Ve
|
yading@10
|
5685 .PP
|
yading@10
|
5686 See also the framecrc muxer.
|
yading@10
|
5687 .SS "framecrc"
|
yading@10
|
5688 .IX Subsection "framecrc"
|
yading@10
|
5689 Per-packet \s-1CRC\s0 (Cyclic Redundancy Check) testing format.
|
yading@10
|
5690 .PP
|
yading@10
|
5691 This muxer computes and prints the Adler\-32 \s-1CRC\s0 for each audio
|
yading@10
|
5692 and video packet. By default audio frames are converted to signed
|
yading@10
|
5693 16\-bit raw audio and video frames to raw video before computing the
|
yading@10
|
5694 \&\s-1CRC\s0.
|
yading@10
|
5695 .PP
|
yading@10
|
5696 The output of the muxer consists of a line for each audio and video
|
yading@10
|
5697 packet of the form:
|
yading@10
|
5698 .PP
|
yading@10
|
5699 .Vb 1
|
yading@10
|
5700 \& <stream_index>, <packet_dts>, <packet_pts>, <packet_duration>, <packet_size>, 0x<CRC>
|
yading@10
|
5701 .Ve
|
yading@10
|
5702 .PP
|
yading@10
|
5703 \&\fI\s-1CRC\s0\fR is a hexadecimal number 0\-padded to 8 digits containing the
|
yading@10
|
5704 \&\s-1CRC\s0 of the packet.
|
yading@10
|
5705 .PP
|
yading@10
|
5706 For example to compute the \s-1CRC\s0 of the audio and video frames in
|
yading@10
|
5707 \&\fI\s-1INPUT\s0\fR, converted to raw audio and video packets, and store it
|
yading@10
|
5708 in the file \fIout.crc\fR:
|
yading@10
|
5709 .PP
|
yading@10
|
5710 .Vb 1
|
yading@10
|
5711 \& ffmpeg \-i INPUT \-f framecrc out.crc
|
yading@10
|
5712 .Ve
|
yading@10
|
5713 .PP
|
yading@10
|
5714 To print the information to stdout, use the command:
|
yading@10
|
5715 .PP
|
yading@10
|
5716 .Vb 1
|
yading@10
|
5717 \& ffmpeg \-i INPUT \-f framecrc \-
|
yading@10
|
5718 .Ve
|
yading@10
|
5719 .PP
|
yading@10
|
5720 With \fBffmpeg\fR, you can select the output format to which the
|
yading@10
|
5721 audio and video frames are encoded before computing the \s-1CRC\s0 for each
|
yading@10
|
5722 packet by specifying the audio and video codec. For example, to
|
yading@10
|
5723 compute the \s-1CRC\s0 of each decoded input audio frame converted to \s-1PCM\s0
|
yading@10
|
5724 unsigned 8\-bit and of each decoded input video frame converted to
|
yading@10
|
5725 \&\s-1MPEG\-2\s0 video, use the command:
|
yading@10
|
5726 .PP
|
yading@10
|
5727 .Vb 1
|
yading@10
|
5728 \& ffmpeg \-i INPUT \-c:a pcm_u8 \-c:v mpeg2video \-f framecrc \-
|
yading@10
|
5729 .Ve
|
yading@10
|
5730 .PP
|
yading@10
|
5731 See also the crc muxer.
|
yading@10
|
5732 .SS "framemd5"
|
yading@10
|
5733 .IX Subsection "framemd5"
|
yading@10
|
5734 Per-packet \s-1MD5\s0 testing format.
|
yading@10
|
5735 .PP
|
yading@10
|
5736 This muxer computes and prints the \s-1MD5\s0 hash for each audio
|
yading@10
|
5737 and video packet. By default audio frames are converted to signed
|
yading@10
|
5738 16\-bit raw audio and video frames to raw video before computing the
|
yading@10
|
5739 hash.
|
yading@10
|
5740 .PP
|
yading@10
|
5741 The output of the muxer consists of a line for each audio and video
|
yading@10
|
5742 packet of the form:
|
yading@10
|
5743 .PP
|
yading@10
|
5744 .Vb 1
|
yading@10
|
5745 \& <stream_index>, <packet_dts>, <packet_pts>, <packet_duration>, <packet_size>, <MD5>
|
yading@10
|
5746 .Ve
|
yading@10
|
5747 .PP
|
yading@10
|
5748 \&\fI\s-1MD5\s0\fR is a hexadecimal number representing the computed \s-1MD5\s0 hash
|
yading@10
|
5749 for the packet.
|
yading@10
|
5750 .PP
|
yading@10
|
5751 For example to compute the \s-1MD5\s0 of the audio and video frames in
|
yading@10
|
5752 \&\fI\s-1INPUT\s0\fR, converted to raw audio and video packets, and store it
|
yading@10
|
5753 in the file \fIout.md5\fR:
|
yading@10
|
5754 .PP
|
yading@10
|
5755 .Vb 1
|
yading@10
|
5756 \& ffmpeg \-i INPUT \-f framemd5 out.md5
|
yading@10
|
5757 .Ve
|
yading@10
|
5758 .PP
|
yading@10
|
5759 To print the information to stdout, use the command:
|
yading@10
|
5760 .PP
|
yading@10
|
5761 .Vb 1
|
yading@10
|
5762 \& ffmpeg \-i INPUT \-f framemd5 \-
|
yading@10
|
5763 .Ve
|
yading@10
|
5764 .PP
|
yading@10
|
5765 See also the md5 muxer.
|
yading@10
|
5766 .SS "hls"
|
yading@10
|
5767 .IX Subsection "hls"
|
yading@10
|
5768 Apple \s-1HTTP\s0 Live Streaming muxer that segments MPEG-TS according to
|
yading@10
|
5769 the \s-1HTTP\s0 Live Streaming specification.
|
yading@10
|
5770 .PP
|
yading@10
|
5771 It creates a playlist file and numbered segment files. The output
|
yading@10
|
5772 filename specifies the playlist filename; the segment filenames
|
yading@10
|
5773 receive the same basename as the playlist, a sequential number and
|
yading@10
|
5774 a .ts extension.
|
yading@10
|
5775 .PP
|
yading@10
|
5776 .Vb 1
|
yading@10
|
5777 \& ffmpeg \-i in.nut out.m3u8
|
yading@10
|
5778 .Ve
|
yading@10
|
5779 .IP "\fB\-hls_time\fR \fIseconds\fR" 4
|
yading@10
|
5780 .IX Item "-hls_time seconds"
|
yading@10
|
5781 Set the segment length in seconds.
|
yading@10
|
5782 .IP "\fB\-hls_list_size\fR \fIsize\fR" 4
|
yading@10
|
5783 .IX Item "-hls_list_size size"
|
yading@10
|
5784 Set the maximum number of playlist entries.
|
yading@10
|
5785 .IP "\fB\-hls_wrap\fR \fIwrap\fR" 4
|
yading@10
|
5786 .IX Item "-hls_wrap wrap"
|
yading@10
|
5787 Set the number after which index wraps.
|
yading@10
|
5788 .IP "\fB\-start_number\fR \fInumber\fR" 4
|
yading@10
|
5789 .IX Item "-start_number number"
|
yading@10
|
5790 Start the sequence from \fInumber\fR.
|
yading@10
|
5791 .SS "ico"
|
yading@10
|
5792 .IX Subsection "ico"
|
yading@10
|
5793 \&\s-1ICO\s0 file muxer.
|
yading@10
|
5794 .PP
|
yading@10
|
5795 Microsoft's icon file format (\s-1ICO\s0) has some strict limitations that should be noted:
|
yading@10
|
5796 .IP "\(bu" 4
|
yading@10
|
5797 Size cannot exceed 256 pixels in any dimension
|
yading@10
|
5798 .IP "\(bu" 4
|
yading@10
|
5799 Only \s-1BMP\s0 and \s-1PNG\s0 images can be stored
|
yading@10
|
5800 .IP "\(bu" 4
|
yading@10
|
5801 If a \s-1BMP\s0 image is used, it must be one of the following pixel formats:
|
yading@10
|
5802 .Sp
|
yading@10
|
5803 .Vb 7
|
yading@10
|
5804 \& BMP Bit Depth FFmpeg Pixel Format
|
yading@10
|
5805 \& 1bit pal8
|
yading@10
|
5806 \& 4bit pal8
|
yading@10
|
5807 \& 8bit pal8
|
yading@10
|
5808 \& 16bit rgb555le
|
yading@10
|
5809 \& 24bit bgr24
|
yading@10
|
5810 \& 32bit bgra
|
yading@10
|
5811 .Ve
|
yading@10
|
5812 .IP "\(bu" 4
|
yading@10
|
5813 If a \s-1BMP\s0 image is used, it must use the \s-1BITMAPINFOHEADER\s0 \s-1DIB\s0 header
|
yading@10
|
5814 .IP "\(bu" 4
|
yading@10
|
5815 If a \s-1PNG\s0 image is used, it must use the rgba pixel format
|
yading@10
|
5816 .SS "image2"
|
yading@10
|
5817 .IX Subsection "image2"
|
yading@10
|
5818 Image file muxer.
|
yading@10
|
5819 .PP
|
yading@10
|
5820 The image file muxer writes video frames to image files.
|
yading@10
|
5821 .PP
|
yading@10
|
5822 The output filenames are specified by a pattern, which can be used to
|
yading@10
|
5823 produce sequentially numbered series of files.
|
yading@10
|
5824 The pattern may contain the string \*(L"%d\*(R" or "%0\fIN\fRd\*(L", this string
|
yading@10
|
5825 specifies the position of the characters representing a numbering in
|
yading@10
|
5826 the filenames. If the form \*(R"%0\fIN\fRd" is used, the string
|
yading@10
|
5827 representing the number in each filename is 0\-padded to \fIN\fR
|
yading@10
|
5828 digits. The literal character '%' can be specified in the pattern with
|
yading@10
|
5829 the string \*(L"%%\*(R".
|
yading@10
|
5830 .PP
|
yading@10
|
5831 If the pattern contains \*(L"%d\*(R" or "%0\fIN\fRd", the first filename of
|
yading@10
|
5832 the file list specified will contain the number 1, all the following
|
yading@10
|
5833 numbers will be sequential.
|
yading@10
|
5834 .PP
|
yading@10
|
5835 The pattern may contain a suffix which is used to automatically
|
yading@10
|
5836 determine the format of the image files to write.
|
yading@10
|
5837 .PP
|
yading@10
|
5838 For example the pattern \*(L"img\-%03d.bmp\*(R" will specify a sequence of
|
yading@10
|
5839 filenames of the form \fIimg\-001.bmp\fR, \fIimg\-002.bmp\fR, ...,
|
yading@10
|
5840 \&\fIimg\-010.bmp\fR, etc.
|
yading@10
|
5841 The pattern \*(L"img%%\-%d.jpg\*(R" will specify a sequence of filenames of the
|
yading@10
|
5842 form \fIimg%\-1.jpg\fR, \fIimg%\-2.jpg\fR, ..., \fIimg%\-10.jpg\fR,
|
yading@10
|
5843 etc.
|
yading@10
|
5844 .PP
|
yading@10
|
5845 The following example shows how to use \fBffmpeg\fR for creating a
|
yading@10
|
5846 sequence of files \fIimg\-001.jpeg\fR, \fIimg\-002.jpeg\fR, ...,
|
yading@10
|
5847 taking one image every second from the input video:
|
yading@10
|
5848 .PP
|
yading@10
|
5849 .Vb 1
|
yading@10
|
5850 \& ffmpeg \-i in.avi \-vsync 1 \-r 1 \-f image2 \*(Aqimg\-%03d.jpeg\*(Aq
|
yading@10
|
5851 .Ve
|
yading@10
|
5852 .PP
|
yading@10
|
5853 Note that with \fBffmpeg\fR, if the format is not specified with the
|
yading@10
|
5854 \&\f(CW\*(C`\-f\*(C'\fR option and the output filename specifies an image file
|
yading@10
|
5855 format, the image2 muxer is automatically selected, so the previous
|
yading@10
|
5856 command can be written as:
|
yading@10
|
5857 .PP
|
yading@10
|
5858 .Vb 1
|
yading@10
|
5859 \& ffmpeg \-i in.avi \-vsync 1 \-r 1 \*(Aqimg\-%03d.jpeg\*(Aq
|
yading@10
|
5860 .Ve
|
yading@10
|
5861 .PP
|
yading@10
|
5862 Note also that the pattern must not necessarily contain \*(L"%d\*(R" or
|
yading@10
|
5863 "%0\fIN\fRd", for example to create a single image file
|
yading@10
|
5864 \&\fIimg.jpeg\fR from the input video you can employ the command:
|
yading@10
|
5865 .PP
|
yading@10
|
5866 .Vb 1
|
yading@10
|
5867 \& ffmpeg \-i in.avi \-f image2 \-frames:v 1 img.jpeg
|
yading@10
|
5868 .Ve
|
yading@10
|
5869 .IP "\fBstart_number\fR \fInumber\fR" 4
|
yading@10
|
5870 .IX Item "start_number number"
|
yading@10
|
5871 Start the sequence from \fInumber\fR. Default value is 1. Must be a
|
yading@10
|
5872 positive number.
|
yading@10
|
5873 .IP "\fB\-update\fR \fInumber\fR" 4
|
yading@10
|
5874 .IX Item "-update number"
|
yading@10
|
5875 If \fInumber\fR is nonzero, the filename will always be interpreted as just a
|
yading@10
|
5876 filename, not a pattern, and this file will be continuously overwritten with new
|
yading@10
|
5877 images.
|
yading@10
|
5878 .PP
|
yading@10
|
5879 The image muxer supports the .Y.U.V image file format. This format is
|
yading@10
|
5880 special in that that each image frame consists of three files, for
|
yading@10
|
5881 each of the \s-1YUV420P\s0 components. To read or write this image file format,
|
yading@10
|
5882 specify the name of the '.Y' file. The muxer will automatically open the
|
yading@10
|
5883 \&'.U' and '.V' files as required.
|
yading@10
|
5884 .SS "md5"
|
yading@10
|
5885 .IX Subsection "md5"
|
yading@10
|
5886 \&\s-1MD5\s0 testing format.
|
yading@10
|
5887 .PP
|
yading@10
|
5888 This muxer computes and prints the \s-1MD5\s0 hash of all the input audio
|
yading@10
|
5889 and video frames. By default audio frames are converted to signed
|
yading@10
|
5890 16\-bit raw audio and video frames to raw video before computing the
|
yading@10
|
5891 hash.
|
yading@10
|
5892 .PP
|
yading@10
|
5893 The output of the muxer consists of a single line of the form:
|
yading@10
|
5894 MD5=\fI\s-1MD5\s0\fR, where \fI\s-1MD5\s0\fR is a hexadecimal number representing
|
yading@10
|
5895 the computed \s-1MD5\s0 hash.
|
yading@10
|
5896 .PP
|
yading@10
|
5897 For example to compute the \s-1MD5\s0 hash of the input converted to raw
|
yading@10
|
5898 audio and video, and store it in the file \fIout.md5\fR:
|
yading@10
|
5899 .PP
|
yading@10
|
5900 .Vb 1
|
yading@10
|
5901 \& ffmpeg \-i INPUT \-f md5 out.md5
|
yading@10
|
5902 .Ve
|
yading@10
|
5903 .PP
|
yading@10
|
5904 You can print the \s-1MD5\s0 to stdout with the command:
|
yading@10
|
5905 .PP
|
yading@10
|
5906 .Vb 1
|
yading@10
|
5907 \& ffmpeg \-i INPUT \-f md5 \-
|
yading@10
|
5908 .Ve
|
yading@10
|
5909 .PP
|
yading@10
|
5910 See also the framemd5 muxer.
|
yading@10
|
5911 .SS "\s-1MOV/MP4/ISMV\s0"
|
yading@10
|
5912 .IX Subsection "MOV/MP4/ISMV"
|
yading@10
|
5913 The mov/mp4/ismv muxer supports fragmentation. Normally, a \s-1MOV/MP4\s0
|
yading@10
|
5914 file has all the metadata about all packets stored in one location
|
yading@10
|
5915 (written at the end of the file, it can be moved to the start for
|
yading@10
|
5916 better playback by adding \fIfaststart\fR to the \fImovflags\fR, or
|
yading@10
|
5917 using the \fBqt-faststart\fR tool). A fragmented
|
yading@10
|
5918 file consists of a number of fragments, where packets and metadata
|
yading@10
|
5919 about these packets are stored together. Writing a fragmented
|
yading@10
|
5920 file has the advantage that the file is decodable even if the
|
yading@10
|
5921 writing is interrupted (while a normal \s-1MOV/MP4\s0 is undecodable if
|
yading@10
|
5922 it is not properly finished), and it requires less memory when writing
|
yading@10
|
5923 very long files (since writing normal \s-1MOV/MP4\s0 files stores info about
|
yading@10
|
5924 every single packet in memory until the file is closed). The downside
|
yading@10
|
5925 is that it is less compatible with other applications.
|
yading@10
|
5926 .PP
|
yading@10
|
5927 Fragmentation is enabled by setting one of the AVOptions that define
|
yading@10
|
5928 how to cut the file into fragments:
|
yading@10
|
5929 .IP "\fB\-moov_size\fR \fIbytes\fR" 4
|
yading@10
|
5930 .IX Item "-moov_size bytes"
|
yading@10
|
5931 Reserves space for the moov atom at the beginning of the file instead of placing the
|
yading@10
|
5932 moov atom at the end. If the space reserved is insufficient, muxing will fail.
|
yading@10
|
5933 .IP "\fB\-movflags frag_keyframe\fR" 4
|
yading@10
|
5934 .IX Item "-movflags frag_keyframe"
|
yading@10
|
5935 Start a new fragment at each video keyframe.
|
yading@10
|
5936 .IP "\fB\-frag_duration\fR \fIduration\fR" 4
|
yading@10
|
5937 .IX Item "-frag_duration duration"
|
yading@10
|
5938 Create fragments that are \fIduration\fR microseconds long.
|
yading@10
|
5939 .IP "\fB\-frag_size\fR \fIsize\fR" 4
|
yading@10
|
5940 .IX Item "-frag_size size"
|
yading@10
|
5941 Create fragments that contain up to \fIsize\fR bytes of payload data.
|
yading@10
|
5942 .IP "\fB\-movflags frag_custom\fR" 4
|
yading@10
|
5943 .IX Item "-movflags frag_custom"
|
yading@10
|
5944 Allow the caller to manually choose when to cut fragments, by
|
yading@10
|
5945 calling \f(CW\*(C`av_write_frame(ctx, NULL)\*(C'\fR to write a fragment with
|
yading@10
|
5946 the packets written so far. (This is only useful with other
|
yading@10
|
5947 applications integrating libavformat, not from \fBffmpeg\fR.)
|
yading@10
|
5948 .IP "\fB\-min_frag_duration\fR \fIduration\fR" 4
|
yading@10
|
5949 .IX Item "-min_frag_duration duration"
|
yading@10
|
5950 Don't create fragments that are shorter than \fIduration\fR microseconds long.
|
yading@10
|
5951 .PP
|
yading@10
|
5952 If more than one condition is specified, fragments are cut when
|
yading@10
|
5953 one of the specified conditions is fulfilled. The exception to this is
|
yading@10
|
5954 \&\f(CW\*(C`\-min_frag_duration\*(C'\fR, which has to be fulfilled for any of the other
|
yading@10
|
5955 conditions to apply.
|
yading@10
|
5956 .PP
|
yading@10
|
5957 Additionally, the way the output file is written can be adjusted
|
yading@10
|
5958 through a few other options:
|
yading@10
|
5959 .IP "\fB\-movflags empty_moov\fR" 4
|
yading@10
|
5960 .IX Item "-movflags empty_moov"
|
yading@10
|
5961 Write an initial moov atom directly at the start of the file, without
|
yading@10
|
5962 describing any samples in it. Generally, an mdat/moov pair is written
|
yading@10
|
5963 at the start of the file, as a normal \s-1MOV/MP4\s0 file, containing only
|
yading@10
|
5964 a short portion of the file. With this option set, there is no initial
|
yading@10
|
5965 mdat atom, and the moov atom only describes the tracks but has
|
yading@10
|
5966 a zero duration.
|
yading@10
|
5967 .Sp
|
yading@10
|
5968 Files written with this option set do not work in QuickTime.
|
yading@10
|
5969 This option is implicitly set when writing ismv (Smooth Streaming) files.
|
yading@10
|
5970 .IP "\fB\-movflags separate_moof\fR" 4
|
yading@10
|
5971 .IX Item "-movflags separate_moof"
|
yading@10
|
5972 Write a separate moof (movie fragment) atom for each track. Normally,
|
yading@10
|
5973 packets for all tracks are written in a moof atom (which is slightly
|
yading@10
|
5974 more efficient), but with this option set, the muxer writes one moof/mdat
|
yading@10
|
5975 pair for each track, making it easier to separate tracks.
|
yading@10
|
5976 .Sp
|
yading@10
|
5977 This option is implicitly set when writing ismv (Smooth Streaming) files.
|
yading@10
|
5978 .IP "\fB\-movflags faststart\fR" 4
|
yading@10
|
5979 .IX Item "-movflags faststart"
|
yading@10
|
5980 Run a second pass moving the moov atom on top of the file. This
|
yading@10
|
5981 operation can take a while, and will not work in various situations such
|
yading@10
|
5982 as fragmented output, thus it is not enabled by default.
|
yading@10
|
5983 .IP "\fB\-movflags rtphint\fR" 4
|
yading@10
|
5984 .IX Item "-movflags rtphint"
|
yading@10
|
5985 Add \s-1RTP\s0 hinting tracks to the output file.
|
yading@10
|
5986 .PP
|
yading@10
|
5987 Smooth Streaming content can be pushed in real time to a publishing
|
yading@10
|
5988 point on \s-1IIS\s0 with this muxer. Example:
|
yading@10
|
5989 .PP
|
yading@10
|
5990 .Vb 1
|
yading@10
|
5991 \& ffmpeg \-re <<normal input/transcoding options>> \-movflags isml+frag_keyframe \-f ismv http://server/publishingpoint.isml/Streams(Encoder1)
|
yading@10
|
5992 .Ve
|
yading@10
|
5993 .SS "mpegts"
|
yading@10
|
5994 .IX Subsection "mpegts"
|
yading@10
|
5995 \&\s-1MPEG\s0 transport stream muxer.
|
yading@10
|
5996 .PP
|
yading@10
|
5997 This muxer implements \s-1ISO\s0 13818\-1 and part of \s-1ETSI\s0 \s-1EN\s0 300 468.
|
yading@10
|
5998 .PP
|
yading@10
|
5999 The muxer options are:
|
yading@10
|
6000 .IP "\fB\-mpegts_original_network_id\fR \fInumber\fR" 4
|
yading@10
|
6001 .IX Item "-mpegts_original_network_id number"
|
yading@10
|
6002 Set the original_network_id (default 0x0001). This is unique identifier
|
yading@10
|
6003 of a network in \s-1DVB\s0. Its main use is in the unique identification of a
|
yading@10
|
6004 service through the path Original_Network_ID, Transport_Stream_ID.
|
yading@10
|
6005 .IP "\fB\-mpegts_transport_stream_id\fR \fInumber\fR" 4
|
yading@10
|
6006 .IX Item "-mpegts_transport_stream_id number"
|
yading@10
|
6007 Set the transport_stream_id (default 0x0001). This identifies a
|
yading@10
|
6008 transponder in \s-1DVB\s0.
|
yading@10
|
6009 .IP "\fB\-mpegts_service_id\fR \fInumber\fR" 4
|
yading@10
|
6010 .IX Item "-mpegts_service_id number"
|
yading@10
|
6011 Set the service_id (default 0x0001) also known as program in \s-1DVB\s0.
|
yading@10
|
6012 .IP "\fB\-mpegts_pmt_start_pid\fR \fInumber\fR" 4
|
yading@10
|
6013 .IX Item "-mpegts_pmt_start_pid number"
|
yading@10
|
6014 Set the first \s-1PID\s0 for \s-1PMT\s0 (default 0x1000, max 0x1f00).
|
yading@10
|
6015 .IP "\fB\-mpegts_start_pid\fR \fInumber\fR" 4
|
yading@10
|
6016 .IX Item "-mpegts_start_pid number"
|
yading@10
|
6017 Set the first \s-1PID\s0 for data packets (default 0x0100, max 0x0f00).
|
yading@10
|
6018 .PP
|
yading@10
|
6019 The recognized metadata settings in mpegts muxer are \f(CW\*(C`service_provider\*(C'\fR
|
yading@10
|
6020 and \f(CW\*(C`service_name\*(C'\fR. If they are not set the default for
|
yading@10
|
6021 \&\f(CW\*(C`service_provider\*(C'\fR is \*(L"FFmpeg\*(R" and the default for
|
yading@10
|
6022 \&\f(CW\*(C`service_name\*(C'\fR is \*(L"Service01\*(R".
|
yading@10
|
6023 .PP
|
yading@10
|
6024 .Vb 9
|
yading@10
|
6025 \& ffmpeg \-i file.mpg \-c copy \e
|
yading@10
|
6026 \& \-mpegts_original_network_id 0x1122 \e
|
yading@10
|
6027 \& \-mpegts_transport_stream_id 0x3344 \e
|
yading@10
|
6028 \& \-mpegts_service_id 0x5566 \e
|
yading@10
|
6029 \& \-mpegts_pmt_start_pid 0x1500 \e
|
yading@10
|
6030 \& \-mpegts_start_pid 0x150 \e
|
yading@10
|
6031 \& \-metadata service_provider="Some provider" \e
|
yading@10
|
6032 \& \-metadata service_name="Some Channel" \e
|
yading@10
|
6033 \& \-y out.ts
|
yading@10
|
6034 .Ve
|
yading@10
|
6035 .SS "null"
|
yading@10
|
6036 .IX Subsection "null"
|
yading@10
|
6037 Null muxer.
|
yading@10
|
6038 .PP
|
yading@10
|
6039 This muxer does not generate any output file, it is mainly useful for
|
yading@10
|
6040 testing or benchmarking purposes.
|
yading@10
|
6041 .PP
|
yading@10
|
6042 For example to benchmark decoding with \fBffmpeg\fR you can use the
|
yading@10
|
6043 command:
|
yading@10
|
6044 .PP
|
yading@10
|
6045 .Vb 1
|
yading@10
|
6046 \& ffmpeg \-benchmark \-i INPUT \-f null out.null
|
yading@10
|
6047 .Ve
|
yading@10
|
6048 .PP
|
yading@10
|
6049 Note that the above command does not read or write the \fIout.null\fR
|
yading@10
|
6050 file, but specifying the output file is required by the \fBffmpeg\fR
|
yading@10
|
6051 syntax.
|
yading@10
|
6052 .PP
|
yading@10
|
6053 Alternatively you can write the command as:
|
yading@10
|
6054 .PP
|
yading@10
|
6055 .Vb 1
|
yading@10
|
6056 \& ffmpeg \-benchmark \-i INPUT \-f null \-
|
yading@10
|
6057 .Ve
|
yading@10
|
6058 .SS "matroska"
|
yading@10
|
6059 .IX Subsection "matroska"
|
yading@10
|
6060 Matroska container muxer.
|
yading@10
|
6061 .PP
|
yading@10
|
6062 This muxer implements the matroska and webm container specs.
|
yading@10
|
6063 .PP
|
yading@10
|
6064 The recognized metadata settings in this muxer are:
|
yading@10
|
6065 .IP "\fBtitle=\fR\fItitle name\fR" 4
|
yading@10
|
6066 .IX Item "title=title name"
|
yading@10
|
6067 Name provided to a single track
|
yading@10
|
6068 .IP "\fBlanguage=\fR\fIlanguage name\fR" 4
|
yading@10
|
6069 .IX Item "language=language name"
|
yading@10
|
6070 Specifies the language of the track in the Matroska languages form
|
yading@10
|
6071 .IP "\fBstereo_mode=\fR\fImode\fR" 4
|
yading@10
|
6072 .IX Item "stereo_mode=mode"
|
yading@10
|
6073 Stereo 3D video layout of two views in a single video track
|
yading@10
|
6074 .RS 4
|
yading@10
|
6075 .IP "\fBmono\fR" 4
|
yading@10
|
6076 .IX Item "mono"
|
yading@10
|
6077 video is not stereo
|
yading@10
|
6078 .IP "\fBleft_right\fR" 4
|
yading@10
|
6079 .IX Item "left_right"
|
yading@10
|
6080 Both views are arranged side by side, Left-eye view is on the left
|
yading@10
|
6081 .IP "\fBbottom_top\fR" 4
|
yading@10
|
6082 .IX Item "bottom_top"
|
yading@10
|
6083 Both views are arranged in top-bottom orientation, Left-eye view is at bottom
|
yading@10
|
6084 .IP "\fBtop_bottom\fR" 4
|
yading@10
|
6085 .IX Item "top_bottom"
|
yading@10
|
6086 Both views are arranged in top-bottom orientation, Left-eye view is on top
|
yading@10
|
6087 .IP "\fBcheckerboard_rl\fR" 4
|
yading@10
|
6088 .IX Item "checkerboard_rl"
|
yading@10
|
6089 Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
|
yading@10
|
6090 .IP "\fBcheckerboard_lr\fR" 4
|
yading@10
|
6091 .IX Item "checkerboard_lr"
|
yading@10
|
6092 Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
|
yading@10
|
6093 .IP "\fBrow_interleaved_rl\fR" 4
|
yading@10
|
6094 .IX Item "row_interleaved_rl"
|
yading@10
|
6095 Each view is constituted by a row based interleaving, Right-eye view is first row
|
yading@10
|
6096 .IP "\fBrow_interleaved_lr\fR" 4
|
yading@10
|
6097 .IX Item "row_interleaved_lr"
|
yading@10
|
6098 Each view is constituted by a row based interleaving, Left-eye view is first row
|
yading@10
|
6099 .IP "\fBcol_interleaved_rl\fR" 4
|
yading@10
|
6100 .IX Item "col_interleaved_rl"
|
yading@10
|
6101 Both views are arranged in a column based interleaving manner, Right-eye view is first column
|
yading@10
|
6102 .IP "\fBcol_interleaved_lr\fR" 4
|
yading@10
|
6103 .IX Item "col_interleaved_lr"
|
yading@10
|
6104 Both views are arranged in a column based interleaving manner, Left-eye view is first column
|
yading@10
|
6105 .IP "\fBanaglyph_cyan_red\fR" 4
|
yading@10
|
6106 .IX Item "anaglyph_cyan_red"
|
yading@10
|
6107 All frames are in anaglyph format viewable through red-cyan filters
|
yading@10
|
6108 .IP "\fBright_left\fR" 4
|
yading@10
|
6109 .IX Item "right_left"
|
yading@10
|
6110 Both views are arranged side by side, Right-eye view is on the left
|
yading@10
|
6111 .IP "\fBanaglyph_green_magenta\fR" 4
|
yading@10
|
6112 .IX Item "anaglyph_green_magenta"
|
yading@10
|
6113 All frames are in anaglyph format viewable through green-magenta filters
|
yading@10
|
6114 .IP "\fBblock_lr\fR" 4
|
yading@10
|
6115 .IX Item "block_lr"
|
yading@10
|
6116 Both eyes laced in one Block, Left-eye view is first
|
yading@10
|
6117 .IP "\fBblock_rl\fR" 4
|
yading@10
|
6118 .IX Item "block_rl"
|
yading@10
|
6119 Both eyes laced in one Block, Right-eye view is first
|
yading@10
|
6120 .RE
|
yading@10
|
6121 .RS 4
|
yading@10
|
6122 .RE
|
yading@10
|
6123 .PP
|
yading@10
|
6124 For example a 3D WebM clip can be created using the following command line:
|
yading@10
|
6125 .PP
|
yading@10
|
6126 .Vb 1
|
yading@10
|
6127 \& ffmpeg \-i sample_left_right_clip.mpg \-an \-c:v libvpx \-metadata stereo_mode=left_right \-y stereo_clip.webm
|
yading@10
|
6128 .Ve
|
yading@10
|
6129 .SS "segment, stream_segment, ssegment"
|
yading@10
|
6130 .IX Subsection "segment, stream_segment, ssegment"
|
yading@10
|
6131 Basic stream segmenter.
|
yading@10
|
6132 .PP
|
yading@10
|
6133 The segmenter muxer outputs streams to a number of separate files of nearly
|
yading@10
|
6134 fixed duration. Output filename pattern can be set in a fashion similar to
|
yading@10
|
6135 image2.
|
yading@10
|
6136 .PP
|
yading@10
|
6137 \&\f(CW\*(C`stream_segment\*(C'\fR is a variant of the muxer used to write to
|
yading@10
|
6138 streaming output formats, i.e. which do not require global headers,
|
yading@10
|
6139 and is recommended for outputting e.g. to \s-1MPEG\s0 transport stream segments.
|
yading@10
|
6140 \&\f(CW\*(C`ssegment\*(C'\fR is a shorter alias for \f(CW\*(C`stream_segment\*(C'\fR.
|
yading@10
|
6141 .PP
|
yading@10
|
6142 Every segment starts with a keyframe of the selected reference stream,
|
yading@10
|
6143 which is set through the \fBreference_stream\fR option.
|
yading@10
|
6144 .PP
|
yading@10
|
6145 Note that if you want accurate splitting for a video file, you need to
|
yading@10
|
6146 make the input key frames correspond to the exact splitting times
|
yading@10
|
6147 expected by the segmenter, or the segment muxer will start the new
|
yading@10
|
6148 segment with the key frame found next after the specified start
|
yading@10
|
6149 time.
|
yading@10
|
6150 .PP
|
yading@10
|
6151 The segment muxer works best with a single constant frame rate video.
|
yading@10
|
6152 .PP
|
yading@10
|
6153 Optionally it can generate a list of the created segments, by setting
|
yading@10
|
6154 the option \fIsegment_list\fR. The list type is specified by the
|
yading@10
|
6155 \&\fIsegment_list_type\fR option.
|
yading@10
|
6156 .PP
|
yading@10
|
6157 The segment muxer supports the following options:
|
yading@10
|
6158 .IP "\fBreference_stream\fR \fIspecifier\fR" 4
|
yading@10
|
6159 .IX Item "reference_stream specifier"
|
yading@10
|
6160 Set the reference stream, as specified by the string \fIspecifier\fR.
|
yading@10
|
6161 If \fIspecifier\fR is set to \f(CW\*(C`auto\*(C'\fR, the reference is choosen
|
yading@10
|
6162 automatically. Otherwise it must be a stream specifier (see the ``Stream
|
yading@10
|
6163 specifiers'' chapter in the ffmpeg manual) which specifies the
|
yading@10
|
6164 reference stream. The default value is ``auto''.
|
yading@10
|
6165 .IP "\fBsegment_format\fR \fIformat\fR" 4
|
yading@10
|
6166 .IX Item "segment_format format"
|
yading@10
|
6167 Override the inner container format, by default it is guessed by the filename
|
yading@10
|
6168 extension.
|
yading@10
|
6169 .IP "\fBsegment_list\fR \fIname\fR" 4
|
yading@10
|
6170 .IX Item "segment_list name"
|
yading@10
|
6171 Generate also a listfile named \fIname\fR. If not specified no
|
yading@10
|
6172 listfile is generated.
|
yading@10
|
6173 .IP "\fBsegment_list_flags\fR \fIflags\fR" 4
|
yading@10
|
6174 .IX Item "segment_list_flags flags"
|
yading@10
|
6175 Set flags affecting the segment list generation.
|
yading@10
|
6176 .Sp
|
yading@10
|
6177 It currently supports the following flags:
|
yading@10
|
6178 .RS 4
|
yading@10
|
6179 .IP "\fIcache\fR" 4
|
yading@10
|
6180 .IX Item "cache"
|
yading@10
|
6181 Allow caching (only affects M3U8 list files).
|
yading@10
|
6182 .IP "\fIlive\fR" 4
|
yading@10
|
6183 .IX Item "live"
|
yading@10
|
6184 Allow live-friendly file generation.
|
yading@10
|
6185 .RE
|
yading@10
|
6186 .RS 4
|
yading@10
|
6187 .Sp
|
yading@10
|
6188 Default value is \f(CW\*(C`cache\*(C'\fR.
|
yading@10
|
6189 .RE
|
yading@10
|
6190 .IP "\fBsegment_list_size\fR \fIsize\fR" 4
|
yading@10
|
6191 .IX Item "segment_list_size size"
|
yading@10
|
6192 Update the list file so that it contains at most the last \fIsize\fR
|
yading@10
|
6193 segments. If 0 the list file will contain all the segments. Default
|
yading@10
|
6194 value is 0.
|
yading@10
|
6195 .IP "\fBsegment_list type\fR \fItype\fR" 4
|
yading@10
|
6196 .IX Item "segment_list type type"
|
yading@10
|
6197 Specify the format for the segment list file.
|
yading@10
|
6198 .Sp
|
yading@10
|
6199 The following values are recognized:
|
yading@10
|
6200 .RS 4
|
yading@10
|
6201 .IP "\fBflat\fR" 4
|
yading@10
|
6202 .IX Item "flat"
|
yading@10
|
6203 Generate a flat list for the created segments, one segment per line.
|
yading@10
|
6204 .IP "\fBcsv, ext\fR" 4
|
yading@10
|
6205 .IX Item "csv, ext"
|
yading@10
|
6206 Generate a list for the created segments, one segment per line,
|
yading@10
|
6207 each line matching the format (comma-separated values):
|
yading@10
|
6208 .Sp
|
yading@10
|
6209 .Vb 1
|
yading@10
|
6210 \& <segment_filename>,<segment_start_time>,<segment_end_time>
|
yading@10
|
6211 .Ve
|
yading@10
|
6212 .Sp
|
yading@10
|
6213 \&\fIsegment_filename\fR is the name of the output file generated by the
|
yading@10
|
6214 muxer according to the provided pattern. \s-1CSV\s0 escaping (according to
|
yading@10
|
6215 \&\s-1RFC4180\s0) is applied if required.
|
yading@10
|
6216 .Sp
|
yading@10
|
6217 \&\fIsegment_start_time\fR and \fIsegment_end_time\fR specify
|
yading@10
|
6218 the segment start and end time expressed in seconds.
|
yading@10
|
6219 .Sp
|
yading@10
|
6220 A list file with the suffix \f(CW".csv"\fR or \f(CW".ext"\fR will
|
yading@10
|
6221 auto-select this format.
|
yading@10
|
6222 .Sp
|
yading@10
|
6223 \&\f(CW\*(C`ext\*(C'\fR is deprecated in favor or \f(CW\*(C`csv\*(C'\fR.
|
yading@10
|
6224 .IP "\fBffconcat\fR" 4
|
yading@10
|
6225 .IX Item "ffconcat"
|
yading@10
|
6226 Generate an ffconcat file for the created segments. The resulting file
|
yading@10
|
6227 can be read using the FFmpeg concat demuxer.
|
yading@10
|
6228 .Sp
|
yading@10
|
6229 A list file with the suffix \f(CW".ffcat"\fR or \f(CW".ffconcat"\fR will
|
yading@10
|
6230 auto-select this format.
|
yading@10
|
6231 .IP "\fBm3u8\fR" 4
|
yading@10
|
6232 .IX Item "m3u8"
|
yading@10
|
6233 Generate an extended M3U8 file, version 3, compliant with
|
yading@10
|
6234 <\fBhttp://tools.ietf.org/id/draft\-pantos\-http\-live\-streaming\fR>.
|
yading@10
|
6235 .Sp
|
yading@10
|
6236 A list file with the suffix \f(CW".m3u8"\fR will auto-select this format.
|
yading@10
|
6237 .RE
|
yading@10
|
6238 .RS 4
|
yading@10
|
6239 .Sp
|
yading@10
|
6240 If not specified the type is guessed from the list file name suffix.
|
yading@10
|
6241 .RE
|
yading@10
|
6242 .IP "\fBsegment_time\fR \fItime\fR" 4
|
yading@10
|
6243 .IX Item "segment_time time"
|
yading@10
|
6244 Set segment duration to \fItime\fR, the value must be a duration
|
yading@10
|
6245 specification. Default value is \*(L"2\*(R". See also the
|
yading@10
|
6246 \&\fBsegment_times\fR option.
|
yading@10
|
6247 .Sp
|
yading@10
|
6248 Note that splitting may not be accurate, unless you force the
|
yading@10
|
6249 reference stream key-frames at the given time. See the introductory
|
yading@10
|
6250 notice and the examples below.
|
yading@10
|
6251 .IP "\fBsegment_time_delta\fR \fIdelta\fR" 4
|
yading@10
|
6252 .IX Item "segment_time_delta delta"
|
yading@10
|
6253 Specify the accuracy time when selecting the start time for a
|
yading@10
|
6254 segment, expressed as a duration specification. Default value is \*(L"0\*(R".
|
yading@10
|
6255 .Sp
|
yading@10
|
6256 When delta is specified a key-frame will start a new segment if its
|
yading@10
|
6257 \&\s-1PTS\s0 satisfies the relation:
|
yading@10
|
6258 .Sp
|
yading@10
|
6259 .Vb 1
|
yading@10
|
6260 \& PTS >= start_time \- time_delta
|
yading@10
|
6261 .Ve
|
yading@10
|
6262 .Sp
|
yading@10
|
6263 This option is useful when splitting video content, which is always
|
yading@10
|
6264 split at \s-1GOP\s0 boundaries, in case a key frame is found just before the
|
yading@10
|
6265 specified split time.
|
yading@10
|
6266 .Sp
|
yading@10
|
6267 In particular may be used in combination with the \fIffmpeg\fR option
|
yading@10
|
6268 \&\fIforce_key_frames\fR. The key frame times specified by
|
yading@10
|
6269 \&\fIforce_key_frames\fR may not be set accurately because of rounding
|
yading@10
|
6270 issues, with the consequence that a key frame time may result set just
|
yading@10
|
6271 before the specified time. For constant frame rate videos a value of
|
yading@10
|
6272 1/2*\fIframe_rate\fR should address the worst case mismatch between
|
yading@10
|
6273 the specified time and the time set by \fIforce_key_frames\fR.
|
yading@10
|
6274 .IP "\fBsegment_times\fR \fItimes\fR" 4
|
yading@10
|
6275 .IX Item "segment_times times"
|
yading@10
|
6276 Specify a list of split points. \fItimes\fR contains a list of comma
|
yading@10
|
6277 separated duration specifications, in increasing order. See also
|
yading@10
|
6278 the \fBsegment_time\fR option.
|
yading@10
|
6279 .IP "\fBsegment_frames\fR \fIframes\fR" 4
|
yading@10
|
6280 .IX Item "segment_frames frames"
|
yading@10
|
6281 Specify a list of split video frame numbers. \fIframes\fR contains a
|
yading@10
|
6282 list of comma separated integer numbers, in increasing order.
|
yading@10
|
6283 .Sp
|
yading@10
|
6284 This option specifies to start a new segment whenever a reference
|
yading@10
|
6285 stream key frame is found and the sequential number (starting from 0)
|
yading@10
|
6286 of the frame is greater or equal to the next value in the list.
|
yading@10
|
6287 .IP "\fBsegment_wrap\fR \fIlimit\fR" 4
|
yading@10
|
6288 .IX Item "segment_wrap limit"
|
yading@10
|
6289 Wrap around segment index once it reaches \fIlimit\fR.
|
yading@10
|
6290 .IP "\fBsegment_start_number\fR \fInumber\fR" 4
|
yading@10
|
6291 .IX Item "segment_start_number number"
|
yading@10
|
6292 Set the sequence number of the first segment. Defaults to \f(CW0\fR.
|
yading@10
|
6293 .IP "\fBreset_timestamps\fR \fI1|0\fR" 4
|
yading@10
|
6294 .IX Item "reset_timestamps 1|0"
|
yading@10
|
6295 Reset timestamps at the begin of each segment, so that each segment
|
yading@10
|
6296 will start with near-zero timestamps. It is meant to ease the playback
|
yading@10
|
6297 of the generated segments. May not work with some combinations of
|
yading@10
|
6298 muxers/codecs. It is set to \f(CW0\fR by default.
|
yading@10
|
6299 .PP
|
yading@10
|
6300 \fIExamples\fR
|
yading@10
|
6301 .IX Subsection "Examples"
|
yading@10
|
6302 .IP "\(bu" 4
|
yading@10
|
6303 To remux the content of file \fIin.mkv\fR to a list of segments
|
yading@10
|
6304 \&\fIout\-000.nut\fR, \fIout\-001.nut\fR, etc., and write the list of
|
yading@10
|
6305 generated segments to \fIout.list\fR:
|
yading@10
|
6306 .Sp
|
yading@10
|
6307 .Vb 1
|
yading@10
|
6308 \& ffmpeg \-i in.mkv \-codec copy \-map 0 \-f segment \-segment_list out.list out%03d.nut
|
yading@10
|
6309 .Ve
|
yading@10
|
6310 .IP "\(bu" 4
|
yading@10
|
6311 As the example above, but segment the input file according to the split
|
yading@10
|
6312 points specified by the \fIsegment_times\fR option:
|
yading@10
|
6313 .Sp
|
yading@10
|
6314 .Vb 1
|
yading@10
|
6315 \& 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
|
yading@10
|
6316 .Ve
|
yading@10
|
6317 .IP "\(bu" 4
|
yading@10
|
6318 As the example above, but use the \f(CW\*(C`ffmpeg\*(C'\fR \fIforce_key_frames\fR
|
yading@10
|
6319 option to force key frames in the input at the specified location, together
|
yading@10
|
6320 with the segment option \fIsegment_time_delta\fR to account for
|
yading@10
|
6321 possible roundings operated when setting key frame times.
|
yading@10
|
6322 .Sp
|
yading@10
|
6323 .Vb 2
|
yading@10
|
6324 \& ffmpeg \-i in.mkv \-force_key_frames 1,2,3,5,8,13,21 \-codec:v mpeg4 \-codec:a pcm_s16le \-map 0 \e
|
yading@10
|
6325 \& \-f segment \-segment_list out.csv \-segment_times 1,2,3,5,8,13,21 \-segment_time_delta 0.05 out%03d.nut
|
yading@10
|
6326 .Ve
|
yading@10
|
6327 .Sp
|
yading@10
|
6328 In order to force key frames on the input file, transcoding is
|
yading@10
|
6329 required.
|
yading@10
|
6330 .IP "\(bu" 4
|
yading@10
|
6331 Segment the input file by splitting the input file according to the
|
yading@10
|
6332 frame numbers sequence specified with the \fIsegment_frames\fR option:
|
yading@10
|
6333 .Sp
|
yading@10
|
6334 .Vb 1
|
yading@10
|
6335 \& ffmpeg \-i in.mkv \-codec copy \-map 0 \-f segment \-segment_list out.csv \-segment_frames 100,200,300,500,800 out%03d.nut
|
yading@10
|
6336 .Ve
|
yading@10
|
6337 .IP "\(bu" 4
|
yading@10
|
6338 To convert the \fIin.mkv\fR to \s-1TS\s0 segments using the \f(CW\*(C`libx264\*(C'\fR
|
yading@10
|
6339 and \f(CW\*(C`libfaac\*(C'\fR encoders:
|
yading@10
|
6340 .Sp
|
yading@10
|
6341 .Vb 1
|
yading@10
|
6342 \& ffmpeg \-i in.mkv \-map 0 \-codec:v libx264 \-codec:a libfaac \-f ssegment \-segment_list out.list out%03d.ts
|
yading@10
|
6343 .Ve
|
yading@10
|
6344 .IP "\(bu" 4
|
yading@10
|
6345 Segment the input file, and create an M3U8 live playlist (can be used
|
yading@10
|
6346 as live \s-1HLS\s0 source):
|
yading@10
|
6347 .Sp
|
yading@10
|
6348 .Vb 2
|
yading@10
|
6349 \& ffmpeg \-re \-i in.mkv \-codec copy \-map 0 \-f segment \-segment_list playlist.m3u8 \e
|
yading@10
|
6350 \& \-segment_list_flags +live \-segment_time 10 out%03d.mkv
|
yading@10
|
6351 .Ve
|
yading@10
|
6352 .SS "mp3"
|
yading@10
|
6353 .IX Subsection "mp3"
|
yading@10
|
6354 The \s-1MP3\s0 muxer writes a raw \s-1MP3\s0 stream with an ID3v2 header at the beginning and
|
yading@10
|
6355 optionally an ID3v1 tag at the end. ID3v2.3 and ID3v2.4 are supported, the
|
yading@10
|
6356 \&\f(CW\*(C`id3v2_version\*(C'\fR option controls which one is used. The legacy ID3v1 tag is
|
yading@10
|
6357 not written by default, but may be enabled with the \f(CW\*(C`write_id3v1\*(C'\fR option.
|
yading@10
|
6358 .PP
|
yading@10
|
6359 For seekable output the muxer also writes a Xing frame at the beginning, which
|
yading@10
|
6360 contains the number of frames in the file. It is useful for computing duration
|
yading@10
|
6361 of \s-1VBR\s0 files.
|
yading@10
|
6362 .PP
|
yading@10
|
6363 The muxer supports writing ID3v2 attached pictures (\s-1APIC\s0 frames). The pictures
|
yading@10
|
6364 are supplied to the muxer in form of a video stream with a single packet. There
|
yading@10
|
6365 can be any number of those streams, each will correspond to a single \s-1APIC\s0 frame.
|
yading@10
|
6366 The stream metadata tags \fItitle\fR and \fIcomment\fR map to \s-1APIC\s0
|
yading@10
|
6367 \&\fIdescription\fR and \fIpicture type\fR respectively. See
|
yading@10
|
6368 <\fBhttp://id3.org/id3v2.4.0\-frames\fR> for allowed picture types.
|
yading@10
|
6369 .PP
|
yading@10
|
6370 Note that the \s-1APIC\s0 frames must be written at the beginning, so the muxer will
|
yading@10
|
6371 buffer the audio frames until it gets all the pictures. It is therefore advised
|
yading@10
|
6372 to provide the pictures as soon as possible to avoid excessive buffering.
|
yading@10
|
6373 .PP
|
yading@10
|
6374 Examples:
|
yading@10
|
6375 .PP
|
yading@10
|
6376 Write an mp3 with an ID3v2.3 header and an ID3v1 footer:
|
yading@10
|
6377 .PP
|
yading@10
|
6378 .Vb 1
|
yading@10
|
6379 \& ffmpeg \-i INPUT \-id3v2_version 3 \-write_id3v1 1 out.mp3
|
yading@10
|
6380 .Ve
|
yading@10
|
6381 .PP
|
yading@10
|
6382 To attach a picture to an mp3 file select both the audio and the picture stream
|
yading@10
|
6383 with \f(CW\*(C`map\*(C'\fR:
|
yading@10
|
6384 .PP
|
yading@10
|
6385 .Vb 2
|
yading@10
|
6386 \& ffmpeg \-i input.mp3 \-i cover.png \-c copy \-map 0 \-map 1
|
yading@10
|
6387 \& \-metadata:s:v title="Album cover" \-metadata:s:v comment="Cover (Front)" out.mp3
|
yading@10
|
6388 .Ve
|
yading@10
|
6389 .SS "ogg"
|
yading@10
|
6390 .IX Subsection "ogg"
|
yading@10
|
6391 Ogg container muxer.
|
yading@10
|
6392 .IP "\fB\-page_duration\fR \fIduration\fR" 4
|
yading@10
|
6393 .IX Item "-page_duration duration"
|
yading@10
|
6394 Preferred page duration, in microseconds. The muxer will attempt to create
|
yading@10
|
6395 pages that are approximately \fIduration\fR microseconds long. This allows the
|
yading@10
|
6396 user to compromise between seek granularity and container overhead. The default
|
yading@10
|
6397 is 1 second. A value of 0 will fill all segments, making pages as large as
|
yading@10
|
6398 possible. A value of 1 will effectively use 1 packet-per-page in most
|
yading@10
|
6399 situations, giving a small seek granularity at the cost of additional container
|
yading@10
|
6400 overhead.
|
yading@10
|
6401 .SS "tee"
|
yading@10
|
6402 .IX Subsection "tee"
|
yading@10
|
6403 The tee muxer can be used to write the same data to several files or any
|
yading@10
|
6404 other kind of muxer. It can be used, for example, to both stream a video to
|
yading@10
|
6405 the network and save it to disk at the same time.
|
yading@10
|
6406 .PP
|
yading@10
|
6407 It is different from specifying several outputs to the \fBffmpeg\fR
|
yading@10
|
6408 command-line tool because the audio and video data will be encoded only once
|
yading@10
|
6409 with the tee muxer; encoding can be a very expensive process. It is not
|
yading@10
|
6410 useful when using the libavformat \s-1API\s0 directly because it is then possible
|
yading@10
|
6411 to feed the same packets to several muxers directly.
|
yading@10
|
6412 .PP
|
yading@10
|
6413 The slave outputs are specified in the file name given to the muxer,
|
yading@10
|
6414 separated by '|'. If any of the slave name contains the '|' separator,
|
yading@10
|
6415 leading or trailing spaces or any special character, it must be
|
yading@10
|
6416 escaped (see the ``Quoting and escaping'' section in the ffmpeg-utils
|
yading@10
|
6417 manual).
|
yading@10
|
6418 .PP
|
yading@10
|
6419 Options can be specified for each slave by prepending them as a list of
|
yading@10
|
6420 \&\fIkey\fR=\fIvalue\fR pairs separated by ':', between square brackets. If
|
yading@10
|
6421 the options values contain a special character or the ':' separator, they
|
yading@10
|
6422 must be escaped; note that this is a second level escaping.
|
yading@10
|
6423 .PP
|
yading@10
|
6424 Example: encode something and both archive it in a WebM file and stream it
|
yading@10
|
6425 as MPEG-TS over \s-1UDP\s0 (the streams need to be explicitly mapped):
|
yading@10
|
6426 .PP
|
yading@10
|
6427 .Vb 2
|
yading@10
|
6428 \& ffmpeg \-i ... \-c:v libx264 \-c:a mp2 \-f tee \-map 0:v \-map 0:a
|
yading@10
|
6429 \& "archive\-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
|
yading@10
|
6430 .Ve
|
yading@10
|
6431 .PP
|
yading@10
|
6432 Note: some codecs may need different options depending on the output format;
|
yading@10
|
6433 the auto-detection of this can not work with the tee muxer. The main example
|
yading@10
|
6434 is the \fBglobal_header\fR flag.
|
yading@10
|
6435 .SH "METADATA"
|
yading@10
|
6436 .IX Header "METADATA"
|
yading@10
|
6437 FFmpeg is able to dump metadata from media files into a simple UTF\-8\-encoded
|
yading@10
|
6438 INI-like text file and then load it back using the metadata muxer/demuxer.
|
yading@10
|
6439 .PP
|
yading@10
|
6440 The file format is as follows:
|
yading@10
|
6441 .IP "1." 4
|
yading@10
|
6442 A file consists of a header and a number of metadata tags divided into sections,
|
yading@10
|
6443 each on its own line.
|
yading@10
|
6444 .IP "2." 4
|
yading@10
|
6445 The header is a ';FFMETADATA' string, followed by a version number (now 1).
|
yading@10
|
6446 .IP "3." 4
|
yading@10
|
6447 Metadata tags are of the form 'key=value'
|
yading@10
|
6448 .IP "4." 4
|
yading@10
|
6449 Immediately after header follows global metadata
|
yading@10
|
6450 .IP "5." 4
|
yading@10
|
6451 After global metadata there may be sections with per\-stream/per\-chapter
|
yading@10
|
6452 metadata.
|
yading@10
|
6453 .IP "6." 4
|
yading@10
|
6454 A section starts with the section name in uppercase (i.e. \s-1STREAM\s0 or \s-1CHAPTER\s0) in
|
yading@10
|
6455 brackets ('[', ']') and ends with next section or end of file.
|
yading@10
|
6456 .IP "7." 4
|
yading@10
|
6457 At the beginning of a chapter section there may be an optional timebase to be
|
yading@10
|
6458 used for start/end values. It must be in form 'TIMEBASE=num/den', where num and
|
yading@10
|
6459 den are integers. If the timebase is missing then start/end times are assumed to
|
yading@10
|
6460 be in milliseconds.
|
yading@10
|
6461 Next a chapter section must contain chapter start and end times in form
|
yading@10
|
6462 \&'START=num', 'END=num', where num is a positive integer.
|
yading@10
|
6463 .IP "8." 4
|
yading@10
|
6464 Empty lines and lines starting with ';' or '#' are ignored.
|
yading@10
|
6465 .IP "9." 4
|
yading@10
|
6466 Metadata keys or values containing special characters ('=', ';', '#', '\e' and a
|
yading@10
|
6467 newline) must be escaped with a backslash '\e'.
|
yading@10
|
6468 .IP "10." 4
|
yading@10
|
6469 Note that whitespace in metadata (e.g. foo = bar) is considered to be a part of
|
yading@10
|
6470 the tag (in the example above key is 'foo ', value is ' bar').
|
yading@10
|
6471 .PP
|
yading@10
|
6472 A ffmetadata file might look like this:
|
yading@10
|
6473 .PP
|
yading@10
|
6474 .Vb 4
|
yading@10
|
6475 \& ;FFMETADATA1
|
yading@10
|
6476 \& title=bike\e\eshed
|
yading@10
|
6477 \& ;this is a comment
|
yading@10
|
6478 \& artist=FFmpeg troll team
|
yading@10
|
6479 \&
|
yading@10
|
6480 \& [CHAPTER]
|
yading@10
|
6481 \& TIMEBASE=1/1000
|
yading@10
|
6482 \& START=0
|
yading@10
|
6483 \& #chapter ends at 0:01:00
|
yading@10
|
6484 \& END=60000
|
yading@10
|
6485 \& title=chapter \e#1
|
yading@10
|
6486 \& [STREAM]
|
yading@10
|
6487 \& title=multi\e
|
yading@10
|
6488 \& line
|
yading@10
|
6489 .Ve
|
yading@10
|
6490 .SH "PROTOCOLS"
|
yading@10
|
6491 .IX Header "PROTOCOLS"
|
yading@10
|
6492 Protocols are configured elements in FFmpeg which allow to access
|
yading@10
|
6493 resources which require the use of a particular protocol.
|
yading@10
|
6494 .PP
|
yading@10
|
6495 When you configure your FFmpeg build, all the supported protocols are
|
yading@10
|
6496 enabled by default. You can list all available ones using the
|
yading@10
|
6497 configure option \*(L"\-\-list\-protocols\*(R".
|
yading@10
|
6498 .PP
|
yading@10
|
6499 You can disable all the protocols using the configure option
|
yading@10
|
6500 \&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the
|
yading@10
|
6501 option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a
|
yading@10
|
6502 particular protocol using the option
|
yading@10
|
6503 \&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR".
|
yading@10
|
6504 .PP
|
yading@10
|
6505 The option \*(L"\-protocols\*(R" of the ff* tools will display the list of
|
yading@10
|
6506 supported protocols.
|
yading@10
|
6507 .PP
|
yading@10
|
6508 A description of the currently available protocols follows.
|
yading@10
|
6509 .SS "bluray"
|
yading@10
|
6510 .IX Subsection "bluray"
|
yading@10
|
6511 Read BluRay playlist.
|
yading@10
|
6512 .PP
|
yading@10
|
6513 The accepted options are:
|
yading@10
|
6514 .IP "\fBangle\fR" 4
|
yading@10
|
6515 .IX Item "angle"
|
yading@10
|
6516 BluRay angle
|
yading@10
|
6517 .IP "\fBchapter\fR" 4
|
yading@10
|
6518 .IX Item "chapter"
|
yading@10
|
6519 Start chapter (1...N)
|
yading@10
|
6520 .IP "\fBplaylist\fR" 4
|
yading@10
|
6521 .IX Item "playlist"
|
yading@10
|
6522 Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls)
|
yading@10
|
6523 .PP
|
yading@10
|
6524 Examples:
|
yading@10
|
6525 .PP
|
yading@10
|
6526 Read longest playlist from BluRay mounted to /mnt/bluray:
|
yading@10
|
6527 .PP
|
yading@10
|
6528 .Vb 1
|
yading@10
|
6529 \& bluray:/mnt/bluray
|
yading@10
|
6530 .Ve
|
yading@10
|
6531 .PP
|
yading@10
|
6532 Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
|
yading@10
|
6533 .PP
|
yading@10
|
6534 .Vb 1
|
yading@10
|
6535 \& \-playlist 4 \-angle 2 \-chapter 2 bluray:/mnt/bluray
|
yading@10
|
6536 .Ve
|
yading@10
|
6537 .SS "concat"
|
yading@10
|
6538 .IX Subsection "concat"
|
yading@10
|
6539 Physical concatenation protocol.
|
yading@10
|
6540 .PP
|
yading@10
|
6541 Allow to read and seek from many resource in sequence as if they were
|
yading@10
|
6542 a unique resource.
|
yading@10
|
6543 .PP
|
yading@10
|
6544 A \s-1URL\s0 accepted by this protocol has the syntax:
|
yading@10
|
6545 .PP
|
yading@10
|
6546 .Vb 1
|
yading@10
|
6547 \& concat:<URL1>|<URL2>|...|<URLN>
|
yading@10
|
6548 .Ve
|
yading@10
|
6549 .PP
|
yading@10
|
6550 where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the
|
yading@10
|
6551 resource to be concatenated, each one possibly specifying a distinct
|
yading@10
|
6552 protocol.
|
yading@10
|
6553 .PP
|
yading@10
|
6554 For example to read a sequence of files \fIsplit1.mpeg\fR,
|
yading@10
|
6555 \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the
|
yading@10
|
6556 command:
|
yading@10
|
6557 .PP
|
yading@10
|
6558 .Vb 1
|
yading@10
|
6559 \& ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg
|
yading@10
|
6560 .Ve
|
yading@10
|
6561 .PP
|
yading@10
|
6562 Note that you may need to escape the character \*(L"|\*(R" which is special for
|
yading@10
|
6563 many shells.
|
yading@10
|
6564 .SS "data"
|
yading@10
|
6565 .IX Subsection "data"
|
yading@10
|
6566 Data in-line in the \s-1URI\s0. See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>.
|
yading@10
|
6567 .PP
|
yading@10
|
6568 For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR:
|
yading@10
|
6569 .PP
|
yading@10
|
6570 .Vb 1
|
yading@10
|
6571 \& ffmpeg \-i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
|
yading@10
|
6572 .Ve
|
yading@10
|
6573 .SS "file"
|
yading@10
|
6574 .IX Subsection "file"
|
yading@10
|
6575 File access protocol.
|
yading@10
|
6576 .PP
|
yading@10
|
6577 Allow to read from or read to a file.
|
yading@10
|
6578 .PP
|
yading@10
|
6579 For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR
|
yading@10
|
6580 use the command:
|
yading@10
|
6581 .PP
|
yading@10
|
6582 .Vb 1
|
yading@10
|
6583 \& ffmpeg \-i file:input.mpeg output.mpeg
|
yading@10
|
6584 .Ve
|
yading@10
|
6585 .PP
|
yading@10
|
6586 The ff* tools default to the file protocol, that is a resource
|
yading@10
|
6587 specified with the name \*(L"\s-1FILE\s0.mpeg\*(R" is interpreted as the \s-1URL\s0
|
yading@10
|
6588 \&\*(L"file:FILE.mpeg\*(R".
|
yading@10
|
6589 .SS "gopher"
|
yading@10
|
6590 .IX Subsection "gopher"
|
yading@10
|
6591 Gopher protocol.
|
yading@10
|
6592 .SS "hls"
|
yading@10
|
6593 .IX Subsection "hls"
|
yading@10
|
6594 Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as
|
yading@10
|
6595 a uniform one. The M3U8 playlists describing the segments can be
|
yading@10
|
6596 remote \s-1HTTP\s0 resources or local files, accessed using the standard
|
yading@10
|
6597 file protocol.
|
yading@10
|
6598 The nested protocol is declared by specifying
|
yading@10
|
6599 "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR
|
yading@10
|
6600 is either \*(L"file\*(R" or \*(L"http\*(R".
|
yading@10
|
6601 .PP
|
yading@10
|
6602 .Vb 2
|
yading@10
|
6603 \& hls+http://host/path/to/remote/resource.m3u8
|
yading@10
|
6604 \& hls+file://path/to/local/resource.m3u8
|
yading@10
|
6605 .Ve
|
yading@10
|
6606 .PP
|
yading@10
|
6607 Using this protocol is discouraged \- the hls demuxer should work
|
yading@10
|
6608 just as well (if not, please report the issues) and is more complete.
|
yading@10
|
6609 To use the hls demuxer instead, simply use the direct URLs to the
|
yading@10
|
6610 m3u8 files.
|
yading@10
|
6611 .SS "http"
|
yading@10
|
6612 .IX Subsection "http"
|
yading@10
|
6613 \&\s-1HTTP\s0 (Hyper Text Transfer Protocol).
|
yading@10
|
6614 .PP
|
yading@10
|
6615 This protocol accepts the following options.
|
yading@10
|
6616 .IP "\fBseekable\fR" 4
|
yading@10
|
6617 .IX Item "seekable"
|
yading@10
|
6618 Control seekability of connection. If set to 1 the resource is
|
yading@10
|
6619 supposed to be seekable, if set to 0 it is assumed not to be seekable,
|
yading@10
|
6620 if set to \-1 it will try to autodetect if it is seekable. Default
|
yading@10
|
6621 value is \-1.
|
yading@10
|
6622 .IP "\fBchunked_post\fR" 4
|
yading@10
|
6623 .IX Item "chunked_post"
|
yading@10
|
6624 If set to 1 use chunked transfer-encoding for posts, default is 1.
|
yading@10
|
6625 .IP "\fBheaders\fR" 4
|
yading@10
|
6626 .IX Item "headers"
|
yading@10
|
6627 Set custom \s-1HTTP\s0 headers, can override built in default headers. The
|
yading@10
|
6628 value must be a string encoding the headers.
|
yading@10
|
6629 .IP "\fBcontent_type\fR" 4
|
yading@10
|
6630 .IX Item "content_type"
|
yading@10
|
6631 Force a content type.
|
yading@10
|
6632 .IP "\fBuser-agent\fR" 4
|
yading@10
|
6633 .IX Item "user-agent"
|
yading@10
|
6634 Override User-Agent header. If not specified the protocol will use a
|
yading@10
|
6635 string describing the libavformat build.
|
yading@10
|
6636 .IP "\fBmultiple_requests\fR" 4
|
yading@10
|
6637 .IX Item "multiple_requests"
|
yading@10
|
6638 Use persistent connections if set to 1. By default it is 0.
|
yading@10
|
6639 .IP "\fBpost_data\fR" 4
|
yading@10
|
6640 .IX Item "post_data"
|
yading@10
|
6641 Set custom \s-1HTTP\s0 post data.
|
yading@10
|
6642 .IP "\fBtimeout\fR" 4
|
yading@10
|
6643 .IX Item "timeout"
|
yading@10
|
6644 Set timeout of socket I/O operations used by the underlying low level
|
yading@10
|
6645 operation. By default it is set to \-1, which means that the timeout is
|
yading@10
|
6646 not specified.
|
yading@10
|
6647 .IP "\fBmime_type\fR" 4
|
yading@10
|
6648 .IX Item "mime_type"
|
yading@10
|
6649 Set \s-1MIME\s0 type.
|
yading@10
|
6650 .IP "\fBcookies\fR" 4
|
yading@10
|
6651 .IX Item "cookies"
|
yading@10
|
6652 Set the cookies to be sent in future requests. The format of each cookie is the
|
yading@10
|
6653 same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be
|
yading@10
|
6654 delimited by a newline character.
|
yading@10
|
6655 .PP
|
yading@10
|
6656 \fI\s-1HTTP\s0 Cookies\fR
|
yading@10
|
6657 .IX Subsection "HTTP Cookies"
|
yading@10
|
6658 .PP
|
yading@10
|
6659 Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the
|
yading@10
|
6660 request. The \fBcookies\fR option allows these cookies to be specified. At
|
yading@10
|
6661 the very least, each cookie must specify a value along with a path and domain.
|
yading@10
|
6662 \&\s-1HTTP\s0 requests that match both the domain and path will automatically include the
|
yading@10
|
6663 cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited
|
yading@10
|
6664 by a newline.
|
yading@10
|
6665 .PP
|
yading@10
|
6666 The required syntax to play a stream specifying a cookie is:
|
yading@10
|
6667 .PP
|
yading@10
|
6668 .Vb 1
|
yading@10
|
6669 \& ffplay \-cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
|
yading@10
|
6670 .Ve
|
yading@10
|
6671 .SS "mmst"
|
yading@10
|
6672 .IX Subsection "mmst"
|
yading@10
|
6673 \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP\s0.
|
yading@10
|
6674 .SS "mmsh"
|
yading@10
|
6675 .IX Subsection "mmsh"
|
yading@10
|
6676 \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP\s0.
|
yading@10
|
6677 .PP
|
yading@10
|
6678 The required syntax is:
|
yading@10
|
6679 .PP
|
yading@10
|
6680 .Vb 1
|
yading@10
|
6681 \& mmsh://<server>[:<port>][/<app>][/<playpath>]
|
yading@10
|
6682 .Ve
|
yading@10
|
6683 .SS "md5"
|
yading@10
|
6684 .IX Subsection "md5"
|
yading@10
|
6685 \&\s-1MD5\s0 output protocol.
|
yading@10
|
6686 .PP
|
yading@10
|
6687 Computes the \s-1MD5\s0 hash of the data to be written, and on close writes
|
yading@10
|
6688 this to the designated output or stdout if none is specified. It can
|
yading@10
|
6689 be used to test muxers without writing an actual file.
|
yading@10
|
6690 .PP
|
yading@10
|
6691 Some examples follow.
|
yading@10
|
6692 .PP
|
yading@10
|
6693 .Vb 2
|
yading@10
|
6694 \& # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
|
yading@10
|
6695 \& ffmpeg \-i input.flv \-f avi \-y md5:output.avi.md5
|
yading@10
|
6696 \&
|
yading@10
|
6697 \& # Write the MD5 hash of the encoded AVI file to stdout.
|
yading@10
|
6698 \& ffmpeg \-i input.flv \-f avi \-y md5:
|
yading@10
|
6699 .Ve
|
yading@10
|
6700 .PP
|
yading@10
|
6701 Note that some formats (typically \s-1MOV\s0) require the output protocol to
|
yading@10
|
6702 be seekable, so they will fail with the \s-1MD5\s0 output protocol.
|
yading@10
|
6703 .SS "pipe"
|
yading@10
|
6704 .IX Subsection "pipe"
|
yading@10
|
6705 \&\s-1UNIX\s0 pipe access protocol.
|
yading@10
|
6706 .PP
|
yading@10
|
6707 Allow to read and write from \s-1UNIX\s0 pipes.
|
yading@10
|
6708 .PP
|
yading@10
|
6709 The accepted syntax is:
|
yading@10
|
6710 .PP
|
yading@10
|
6711 .Vb 1
|
yading@10
|
6712 \& pipe:[<number>]
|
yading@10
|
6713 .Ve
|
yading@10
|
6714 .PP
|
yading@10
|
6715 \&\fInumber\fR is the number corresponding to the file descriptor of the
|
yading@10
|
6716 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If \fInumber\fR
|
yading@10
|
6717 is not specified, by default the stdout file descriptor will be used
|
yading@10
|
6718 for writing, stdin for reading.
|
yading@10
|
6719 .PP
|
yading@10
|
6720 For example to read from stdin with \fBffmpeg\fR:
|
yading@10
|
6721 .PP
|
yading@10
|
6722 .Vb 3
|
yading@10
|
6723 \& cat test.wav | ffmpeg \-i pipe:0
|
yading@10
|
6724 \& # ...this is the same as...
|
yading@10
|
6725 \& cat test.wav | ffmpeg \-i pipe:
|
yading@10
|
6726 .Ve
|
yading@10
|
6727 .PP
|
yading@10
|
6728 For writing to stdout with \fBffmpeg\fR:
|
yading@10
|
6729 .PP
|
yading@10
|
6730 .Vb 3
|
yading@10
|
6731 \& ffmpeg \-i test.wav \-f avi pipe:1 | cat > test.avi
|
yading@10
|
6732 \& # ...this is the same as...
|
yading@10
|
6733 \& ffmpeg \-i test.wav \-f avi pipe: | cat > test.avi
|
yading@10
|
6734 .Ve
|
yading@10
|
6735 .PP
|
yading@10
|
6736 Note that some formats (typically \s-1MOV\s0), require the output protocol to
|
yading@10
|
6737 be seekable, so they will fail with the pipe output protocol.
|
yading@10
|
6738 .SS "rtmp"
|
yading@10
|
6739 .IX Subsection "rtmp"
|
yading@10
|
6740 Real-Time Messaging Protocol.
|
yading@10
|
6741 .PP
|
yading@10
|
6742 The Real-Time Messaging Protocol (\s-1RTMP\s0) is used for streaming multimedia
|
yading@10
|
6743 content across a \s-1TCP/IP\s0 network.
|
yading@10
|
6744 .PP
|
yading@10
|
6745 The required syntax is:
|
yading@10
|
6746 .PP
|
yading@10
|
6747 .Vb 1
|
yading@10
|
6748 \& rtmp://<server>[:<port>][/<app>][/<instance>][/<playpath>]
|
yading@10
|
6749 .Ve
|
yading@10
|
6750 .PP
|
yading@10
|
6751 The accepted parameters are:
|
yading@10
|
6752 .IP "\fBserver\fR" 4
|
yading@10
|
6753 .IX Item "server"
|
yading@10
|
6754 The address of the \s-1RTMP\s0 server.
|
yading@10
|
6755 .IP "\fBport\fR" 4
|
yading@10
|
6756 .IX Item "port"
|
yading@10
|
6757 The number of the \s-1TCP\s0 port to use (by default is 1935).
|
yading@10
|
6758 .IP "\fBapp\fR" 4
|
yading@10
|
6759 .IX Item "app"
|
yading@10
|
6760 It is the name of the application to access. It usually corresponds to
|
yading@10
|
6761 the path where the application is installed on the \s-1RTMP\s0 server
|
yading@10
|
6762 (e.g. \fI/ondemand/\fR, \fI/flash/live/\fR, etc.). You can override
|
yading@10
|
6763 the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_app\*(C'\fR option, too.
|
yading@10
|
6764 .IP "\fBplaypath\fR" 4
|
yading@10
|
6765 .IX Item "playpath"
|
yading@10
|
6766 It is the path or name of the resource to play with reference to the
|
yading@10
|
6767 application specified in \fIapp\fR, may be prefixed by \*(L"mp4:\*(R". You
|
yading@10
|
6768 can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_playpath\*(C'\fR
|
yading@10
|
6769 option, too.
|
yading@10
|
6770 .IP "\fBlisten\fR" 4
|
yading@10
|
6771 .IX Item "listen"
|
yading@10
|
6772 Act as a server, listening for an incoming connection.
|
yading@10
|
6773 .IP "\fBtimeout\fR" 4
|
yading@10
|
6774 .IX Item "timeout"
|
yading@10
|
6775 Maximum time to wait for the incoming connection. Implies listen.
|
yading@10
|
6776 .PP
|
yading@10
|
6777 Additionally, the following parameters can be set via command line options
|
yading@10
|
6778 (or in code via \f(CW\*(C`AVOption\*(C'\fRs):
|
yading@10
|
6779 .IP "\fBrtmp_app\fR" 4
|
yading@10
|
6780 .IX Item "rtmp_app"
|
yading@10
|
6781 Name of application to connect on the \s-1RTMP\s0 server. This option
|
yading@10
|
6782 overrides the parameter specified in the \s-1URI\s0.
|
yading@10
|
6783 .IP "\fBrtmp_buffer\fR" 4
|
yading@10
|
6784 .IX Item "rtmp_buffer"
|
yading@10
|
6785 Set the client buffer time in milliseconds. The default is 3000.
|
yading@10
|
6786 .IP "\fBrtmp_conn\fR" 4
|
yading@10
|
6787 .IX Item "rtmp_conn"
|
yading@10
|
6788 Extra arbitrary \s-1AMF\s0 connection parameters, parsed from a string,
|
yading@10
|
6789 e.g. like \f(CW\*(C`B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0\*(C'\fR.
|
yading@10
|
6790 Each value is prefixed by a single character denoting the type,
|
yading@10
|
6791 B for Boolean, N for number, S for string, O for object, or Z for null,
|
yading@10
|
6792 followed by a colon. For Booleans the data must be either 0 or 1 for
|
yading@10
|
6793 \&\s-1FALSE\s0 or \s-1TRUE\s0, respectively. Likewise for Objects the data must be 0 or
|
yading@10
|
6794 1 to end or begin an object, respectively. Data items in subobjects may
|
yading@10
|
6795 be named, by prefixing the type with 'N' and specifying the name before
|
yading@10
|
6796 the value (i.e. \f(CW\*(C`NB:myFlag:1\*(C'\fR). This option may be used multiple
|
yading@10
|
6797 times to construct arbitrary \s-1AMF\s0 sequences.
|
yading@10
|
6798 .IP "\fBrtmp_flashver\fR" 4
|
yading@10
|
6799 .IX Item "rtmp_flashver"
|
yading@10
|
6800 Version of the Flash plugin used to run the \s-1SWF\s0 player. The default
|
yading@10
|
6801 is \s-1LNX\s0 9,0,124,2.
|
yading@10
|
6802 .IP "\fBrtmp_flush_interval\fR" 4
|
yading@10
|
6803 .IX Item "rtmp_flush_interval"
|
yading@10
|
6804 Number of packets flushed in the same request (\s-1RTMPT\s0 only). The default
|
yading@10
|
6805 is 10.
|
yading@10
|
6806 .IP "\fBrtmp_live\fR" 4
|
yading@10
|
6807 .IX Item "rtmp_live"
|
yading@10
|
6808 Specify that the media is a live stream. No resuming or seeking in
|
yading@10
|
6809 live streams is possible. The default value is \f(CW\*(C`any\*(C'\fR, which means the
|
yading@10
|
6810 subscriber first tries to play the live stream specified in the
|
yading@10
|
6811 playpath. If a live stream of that name is not found, it plays the
|
yading@10
|
6812 recorded stream. The other possible values are \f(CW\*(C`live\*(C'\fR and
|
yading@10
|
6813 \&\f(CW\*(C`recorded\*(C'\fR.
|
yading@10
|
6814 .IP "\fBrtmp_pageurl\fR" 4
|
yading@10
|
6815 .IX Item "rtmp_pageurl"
|
yading@10
|
6816 \&\s-1URL\s0 of the web page in which the media was embedded. By default no
|
yading@10
|
6817 value will be sent.
|
yading@10
|
6818 .IP "\fBrtmp_playpath\fR" 4
|
yading@10
|
6819 .IX Item "rtmp_playpath"
|
yading@10
|
6820 Stream identifier to play or to publish. This option overrides the
|
yading@10
|
6821 parameter specified in the \s-1URI\s0.
|
yading@10
|
6822 .IP "\fBrtmp_subscribe\fR" 4
|
yading@10
|
6823 .IX Item "rtmp_subscribe"
|
yading@10
|
6824 Name of live stream to subscribe to. By default no value will be sent.
|
yading@10
|
6825 It is only sent if the option is specified or if rtmp_live
|
yading@10
|
6826 is set to live.
|
yading@10
|
6827 .IP "\fBrtmp_swfhash\fR" 4
|
yading@10
|
6828 .IX Item "rtmp_swfhash"
|
yading@10
|
6829 \&\s-1SHA256\s0 hash of the decompressed \s-1SWF\s0 file (32 bytes).
|
yading@10
|
6830 .IP "\fBrtmp_swfsize\fR" 4
|
yading@10
|
6831 .IX Item "rtmp_swfsize"
|
yading@10
|
6832 Size of the decompressed \s-1SWF\s0 file, required for SWFVerification.
|
yading@10
|
6833 .IP "\fBrtmp_swfurl\fR" 4
|
yading@10
|
6834 .IX Item "rtmp_swfurl"
|
yading@10
|
6835 \&\s-1URL\s0 of the \s-1SWF\s0 player for the media. By default no value will be sent.
|
yading@10
|
6836 .IP "\fBrtmp_swfverify\fR" 4
|
yading@10
|
6837 .IX Item "rtmp_swfverify"
|
yading@10
|
6838 \&\s-1URL\s0 to player swf file, compute hash/size automatically.
|
yading@10
|
6839 .IP "\fBrtmp_tcurl\fR" 4
|
yading@10
|
6840 .IX Item "rtmp_tcurl"
|
yading@10
|
6841 \&\s-1URL\s0 of the target stream. Defaults to proto://host[:port]/app.
|
yading@10
|
6842 .PP
|
yading@10
|
6843 For example to read with \fBffplay\fR a multimedia resource named
|
yading@10
|
6844 \&\*(L"sample\*(R" from the application \*(L"vod\*(R" from an \s-1RTMP\s0 server \*(L"myserver\*(R":
|
yading@10
|
6845 .PP
|
yading@10
|
6846 .Vb 1
|
yading@10
|
6847 \& ffplay rtmp://myserver/vod/sample
|
yading@10
|
6848 .Ve
|
yading@10
|
6849 .SS "rtmpe"
|
yading@10
|
6850 .IX Subsection "rtmpe"
|
yading@10
|
6851 Encrypted Real-Time Messaging Protocol.
|
yading@10
|
6852 .PP
|
yading@10
|
6853 The Encrypted Real-Time Messaging Protocol (\s-1RTMPE\s0) is used for
|
yading@10
|
6854 streaming multimedia content within standard cryptographic primitives,
|
yading@10
|
6855 consisting of Diffie-Hellman key exchange and \s-1HMACSHA256\s0, generating
|
yading@10
|
6856 a pair of \s-1RC4\s0 keys.
|
yading@10
|
6857 .SS "rtmps"
|
yading@10
|
6858 .IX Subsection "rtmps"
|
yading@10
|
6859 Real-Time Messaging Protocol over a secure \s-1SSL\s0 connection.
|
yading@10
|
6860 .PP
|
yading@10
|
6861 The Real-Time Messaging Protocol (\s-1RTMPS\s0) is used for streaming
|
yading@10
|
6862 multimedia content across an encrypted connection.
|
yading@10
|
6863 .SS "rtmpt"
|
yading@10
|
6864 .IX Subsection "rtmpt"
|
yading@10
|
6865 Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
|
yading@10
|
6866 .PP
|
yading@10
|
6867 The Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPT\s0) is used
|
yading@10
|
6868 for streaming multimedia content within \s-1HTTP\s0 requests to traverse
|
yading@10
|
6869 firewalls.
|
yading@10
|
6870 .SS "rtmpte"
|
yading@10
|
6871 .IX Subsection "rtmpte"
|
yading@10
|
6872 Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
|
yading@10
|
6873 .PP
|
yading@10
|
6874 The Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPTE\s0)
|
yading@10
|
6875 is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse
|
yading@10
|
6876 firewalls.
|
yading@10
|
6877 .SS "rtmpts"
|
yading@10
|
6878 .IX Subsection "rtmpts"
|
yading@10
|
6879 Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0.
|
yading@10
|
6880 .PP
|
yading@10
|
6881 The Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0 (\s-1RTMPTS\s0) is used
|
yading@10
|
6882 for streaming multimedia content within \s-1HTTPS\s0 requests to traverse
|
yading@10
|
6883 firewalls.
|
yading@10
|
6884 .SS "rtmp, rtmpe, rtmps, rtmpt, rtmpte"
|
yading@10
|
6885 .IX Subsection "rtmp, rtmpe, rtmps, rtmpt, rtmpte"
|
yading@10
|
6886 Real-Time Messaging Protocol and its variants supported through
|
yading@10
|
6887 librtmp.
|
yading@10
|
6888 .PP
|
yading@10
|
6889 Requires the presence of the librtmp headers and library during
|
yading@10
|
6890 configuration. You need to explicitly configure the build with
|
yading@10
|
6891 \&\*(L"\-\-enable\-librtmp\*(R". If enabled this will replace the native \s-1RTMP\s0
|
yading@10
|
6892 protocol.
|
yading@10
|
6893 .PP
|
yading@10
|
6894 This protocol provides most client functions and a few server
|
yading@10
|
6895 functions needed to support \s-1RTMP\s0, \s-1RTMP\s0 tunneled in \s-1HTTP\s0 (\s-1RTMPT\s0),
|
yading@10
|
6896 encrypted \s-1RTMP\s0 (\s-1RTMPE\s0), \s-1RTMP\s0 over \s-1SSL/TLS\s0 (\s-1RTMPS\s0) and tunneled
|
yading@10
|
6897 variants of these encrypted types (\s-1RTMPTE\s0, \s-1RTMPTS\s0).
|
yading@10
|
6898 .PP
|
yading@10
|
6899 The required syntax is:
|
yading@10
|
6900 .PP
|
yading@10
|
6901 .Vb 1
|
yading@10
|
6902 \& <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
|
yading@10
|
6903 .Ve
|
yading@10
|
6904 .PP
|
yading@10
|
6905 where \fIrtmp_proto\fR is one of the strings \*(L"rtmp\*(R", \*(L"rtmpt\*(R", \*(L"rtmpe\*(R",
|
yading@10
|
6906 \&\*(L"rtmps\*(R", \*(L"rtmpte\*(R", \*(L"rtmpts\*(R" corresponding to each \s-1RTMP\s0 variant, and
|
yading@10
|
6907 \&\fIserver\fR, \fIport\fR, \fIapp\fR and \fIplaypath\fR have the same
|
yading@10
|
6908 meaning as specified for the \s-1RTMP\s0 native protocol.
|
yading@10
|
6909 \&\fIoptions\fR contains a list of space-separated options of the form
|
yading@10
|
6910 \&\fIkey\fR=\fIval\fR.
|
yading@10
|
6911 .PP
|
yading@10
|
6912 See the librtmp manual page (man 3 librtmp) for more information.
|
yading@10
|
6913 .PP
|
yading@10
|
6914 For example, to stream a file in real-time to an \s-1RTMP\s0 server using
|
yading@10
|
6915 \&\fBffmpeg\fR:
|
yading@10
|
6916 .PP
|
yading@10
|
6917 .Vb 1
|
yading@10
|
6918 \& ffmpeg \-re \-i myfile \-f flv rtmp://myserver/live/mystream
|
yading@10
|
6919 .Ve
|
yading@10
|
6920 .PP
|
yading@10
|
6921 To play the same stream using \fBffplay\fR:
|
yading@10
|
6922 .PP
|
yading@10
|
6923 .Vb 1
|
yading@10
|
6924 \& ffplay "rtmp://myserver/live/mystream live=1"
|
yading@10
|
6925 .Ve
|
yading@10
|
6926 .SS "rtp"
|
yading@10
|
6927 .IX Subsection "rtp"
|
yading@10
|
6928 Real-Time Protocol.
|
yading@10
|
6929 .SS "rtsp"
|
yading@10
|
6930 .IX Subsection "rtsp"
|
yading@10
|
6931 \&\s-1RTSP\s0 is not technically a protocol handler in libavformat, it is a demuxer
|
yading@10
|
6932 and muxer. The demuxer supports both normal \s-1RTSP\s0 (with data transferred
|
yading@10
|
6933 over \s-1RTP\s0; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
|
yading@10
|
6934 data transferred over \s-1RDT\s0).
|
yading@10
|
6935 .PP
|
yading@10
|
6936 The muxer can be used to send a stream using \s-1RTSP\s0 \s-1ANNOUNCE\s0 to a server
|
yading@10
|
6937 supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
yading@10
|
6938 <\fBhttp://github.com/revmischa/rtsp\-server\fR>).
|
yading@10
|
6939 .PP
|
yading@10
|
6940 The required syntax for a \s-1RTSP\s0 url is:
|
yading@10
|
6941 .PP
|
yading@10
|
6942 .Vb 1
|
yading@10
|
6943 \& rtsp://<hostname>[:<port>]/<path>
|
yading@10
|
6944 .Ve
|
yading@10
|
6945 .PP
|
yading@10
|
6946 The following options (set on the \fBffmpeg\fR/\fBffplay\fR command
|
yading@10
|
6947 line, or set in code via \f(CW\*(C`AVOption\*(C'\fRs or in \f(CW\*(C`avformat_open_input\*(C'\fR),
|
yading@10
|
6948 are supported:
|
yading@10
|
6949 .PP
|
yading@10
|
6950 Flags for \f(CW\*(C`rtsp_transport\*(C'\fR:
|
yading@10
|
6951 .IP "\fBudp\fR" 4
|
yading@10
|
6952 .IX Item "udp"
|
yading@10
|
6953 Use \s-1UDP\s0 as lower transport protocol.
|
yading@10
|
6954 .IP "\fBtcp\fR" 4
|
yading@10
|
6955 .IX Item "tcp"
|
yading@10
|
6956 Use \s-1TCP\s0 (interleaving within the \s-1RTSP\s0 control channel) as lower
|
yading@10
|
6957 transport protocol.
|
yading@10
|
6958 .IP "\fBudp_multicast\fR" 4
|
yading@10
|
6959 .IX Item "udp_multicast"
|
yading@10
|
6960 Use \s-1UDP\s0 multicast as lower transport protocol.
|
yading@10
|
6961 .IP "\fBhttp\fR" 4
|
yading@10
|
6962 .IX Item "http"
|
yading@10
|
6963 Use \s-1HTTP\s0 tunneling as lower transport protocol, which is useful for
|
yading@10
|
6964 passing proxies.
|
yading@10
|
6965 .PP
|
yading@10
|
6966 Multiple lower transport protocols may be specified, in that case they are
|
yading@10
|
6967 tried one at a time (if the setup of one fails, the next one is tried).
|
yading@10
|
6968 For the muxer, only the \f(CW\*(C`tcp\*(C'\fR and \f(CW\*(C`udp\*(C'\fR options are supported.
|
yading@10
|
6969 .PP
|
yading@10
|
6970 Flags for \f(CW\*(C`rtsp_flags\*(C'\fR:
|
yading@10
|
6971 .IP "\fBfilter_src\fR" 4
|
yading@10
|
6972 .IX Item "filter_src"
|
yading@10
|
6973 Accept packets only from negotiated peer address and port.
|
yading@10
|
6974 .IP "\fBlisten\fR" 4
|
yading@10
|
6975 .IX Item "listen"
|
yading@10
|
6976 Act as a server, listening for an incoming connection.
|
yading@10
|
6977 .PP
|
yading@10
|
6978 When receiving data over \s-1UDP\s0, the demuxer tries to reorder received packets
|
yading@10
|
6979 (since they may arrive out of order, or packets may get lost totally). This
|
yading@10
|
6980 can be disabled by setting the maximum demuxing delay to zero (via
|
yading@10
|
6981 the \f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext).
|
yading@10
|
6982 .PP
|
yading@10
|
6983 When watching multi-bitrate Real-RTSP streams with \fBffplay\fR, the
|
yading@10
|
6984 streams to display can be chosen with \f(CW\*(C`\-vst\*(C'\fR \fIn\fR and
|
yading@10
|
6985 \&\f(CW\*(C`\-ast\*(C'\fR \fIn\fR for video and audio respectively, and can be switched
|
yading@10
|
6986 on the fly by pressing \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`a\*(C'\fR.
|
yading@10
|
6987 .PP
|
yading@10
|
6988 Example command lines:
|
yading@10
|
6989 .PP
|
yading@10
|
6990 To watch a stream over \s-1UDP\s0, with a max reordering delay of 0.5 seconds:
|
yading@10
|
6991 .PP
|
yading@10
|
6992 .Vb 1
|
yading@10
|
6993 \& ffplay \-max_delay 500000 \-rtsp_transport udp rtsp://server/video.mp4
|
yading@10
|
6994 .Ve
|
yading@10
|
6995 .PP
|
yading@10
|
6996 To watch a stream tunneled over \s-1HTTP:\s0
|
yading@10
|
6997 .PP
|
yading@10
|
6998 .Vb 1
|
yading@10
|
6999 \& ffplay \-rtsp_transport http rtsp://server/video.mp4
|
yading@10
|
7000 .Ve
|
yading@10
|
7001 .PP
|
yading@10
|
7002 To send a stream in realtime to a \s-1RTSP\s0 server, for others to watch:
|
yading@10
|
7003 .PP
|
yading@10
|
7004 .Vb 1
|
yading@10
|
7005 \& ffmpeg \-re \-i <input> \-f rtsp \-muxdelay 0.1 rtsp://server/live.sdp
|
yading@10
|
7006 .Ve
|
yading@10
|
7007 .PP
|
yading@10
|
7008 To receive a stream in realtime:
|
yading@10
|
7009 .PP
|
yading@10
|
7010 .Vb 1
|
yading@10
|
7011 \& ffmpeg \-rtsp_flags listen \-i rtsp://ownaddress/live.sdp <output>
|
yading@10
|
7012 .Ve
|
yading@10
|
7013 .IP "\fBstimeout\fR" 4
|
yading@10
|
7014 .IX Item "stimeout"
|
yading@10
|
7015 Socket \s-1IO\s0 timeout in micro seconds.
|
yading@10
|
7016 .SS "sap"
|
yading@10
|
7017 .IX Subsection "sap"
|
yading@10
|
7018 Session Announcement Protocol (\s-1RFC\s0 2974). This is not technically a
|
yading@10
|
7019 protocol handler in libavformat, it is a muxer and demuxer.
|
yading@10
|
7020 It is used for signalling of \s-1RTP\s0 streams, by announcing the \s-1SDP\s0 for the
|
yading@10
|
7021 streams regularly on a separate port.
|
yading@10
|
7022 .PP
|
yading@10
|
7023 \fIMuxer\fR
|
yading@10
|
7024 .IX Subsection "Muxer"
|
yading@10
|
7025 .PP
|
yading@10
|
7026 The syntax for a \s-1SAP\s0 url given to the muxer is:
|
yading@10
|
7027 .PP
|
yading@10
|
7028 .Vb 1
|
yading@10
|
7029 \& sap://<destination>[:<port>][?<options>]
|
yading@10
|
7030 .Ve
|
yading@10
|
7031 .PP
|
yading@10
|
7032 The \s-1RTP\s0 packets are sent to \fIdestination\fR on port \fIport\fR,
|
yading@10
|
7033 or to port 5004 if no port is specified.
|
yading@10
|
7034 \&\fIoptions\fR is a \f(CW\*(C`&\*(C'\fR\-separated list. The following options
|
yading@10
|
7035 are supported:
|
yading@10
|
7036 .IP "\fBannounce_addr=\fR\fIaddress\fR" 4
|
yading@10
|
7037 .IX Item "announce_addr=address"
|
yading@10
|
7038 Specify the destination \s-1IP\s0 address for sending the announcements to.
|
yading@10
|
7039 If omitted, the announcements are sent to the commonly used \s-1SAP\s0
|
yading@10
|
7040 announcement multicast address 224.2.127.254 (sap.mcast.net), or
|
yading@10
|
7041 ff0e::2:7ffe if \fIdestination\fR is an IPv6 address.
|
yading@10
|
7042 .IP "\fBannounce_port=\fR\fIport\fR" 4
|
yading@10
|
7043 .IX Item "announce_port=port"
|
yading@10
|
7044 Specify the port to send the announcements on, defaults to
|
yading@10
|
7045 9875 if not specified.
|
yading@10
|
7046 .IP "\fBttl=\fR\fIttl\fR" 4
|
yading@10
|
7047 .IX Item "ttl=ttl"
|
yading@10
|
7048 Specify the time to live value for the announcements and \s-1RTP\s0 packets,
|
yading@10
|
7049 defaults to 255.
|
yading@10
|
7050 .IP "\fBsame_port=\fR\fI0|1\fR" 4
|
yading@10
|
7051 .IX Item "same_port=0|1"
|
yading@10
|
7052 If set to 1, send all \s-1RTP\s0 streams on the same port pair. If zero (the
|
yading@10
|
7053 default), all streams are sent on unique ports, with each stream on a
|
yading@10
|
7054 port 2 numbers higher than the previous.
|
yading@10
|
7055 VLC/Live555 requires this to be set to 1, to be able to receive the stream.
|
yading@10
|
7056 The \s-1RTP\s0 stack in libavformat for receiving requires all streams to be sent
|
yading@10
|
7057 on unique ports.
|
yading@10
|
7058 .PP
|
yading@10
|
7059 Example command lines follow.
|
yading@10
|
7060 .PP
|
yading@10
|
7061 To broadcast a stream on the local subnet, for watching in \s-1VLC:\s0
|
yading@10
|
7062 .PP
|
yading@10
|
7063 .Vb 1
|
yading@10
|
7064 \& ffmpeg \-re \-i <input> \-f sap sap://224.0.0.255?same_port=1
|
yading@10
|
7065 .Ve
|
yading@10
|
7066 .PP
|
yading@10
|
7067 Similarly, for watching in \fBffplay\fR:
|
yading@10
|
7068 .PP
|
yading@10
|
7069 .Vb 1
|
yading@10
|
7070 \& ffmpeg \-re \-i <input> \-f sap sap://224.0.0.255
|
yading@10
|
7071 .Ve
|
yading@10
|
7072 .PP
|
yading@10
|
7073 And for watching in \fBffplay\fR, over IPv6:
|
yading@10
|
7074 .PP
|
yading@10
|
7075 .Vb 1
|
yading@10
|
7076 \& ffmpeg \-re \-i <input> \-f sap sap://[ff0e::1:2:3:4]
|
yading@10
|
7077 .Ve
|
yading@10
|
7078 .PP
|
yading@10
|
7079 \fIDemuxer\fR
|
yading@10
|
7080 .IX Subsection "Demuxer"
|
yading@10
|
7081 .PP
|
yading@10
|
7082 The syntax for a \s-1SAP\s0 url given to the demuxer is:
|
yading@10
|
7083 .PP
|
yading@10
|
7084 .Vb 1
|
yading@10
|
7085 \& sap://[<address>][:<port>]
|
yading@10
|
7086 .Ve
|
yading@10
|
7087 .PP
|
yading@10
|
7088 \&\fIaddress\fR is the multicast address to listen for announcements on,
|
yading@10
|
7089 if omitted, the default 224.2.127.254 (sap.mcast.net) is used. \fIport\fR
|
yading@10
|
7090 is the port that is listened on, 9875 if omitted.
|
yading@10
|
7091 .PP
|
yading@10
|
7092 The demuxers listens for announcements on the given address and port.
|
yading@10
|
7093 Once an announcement is received, it tries to receive that particular stream.
|
yading@10
|
7094 .PP
|
yading@10
|
7095 Example command lines follow.
|
yading@10
|
7096 .PP
|
yading@10
|
7097 To play back the first stream announced on the normal \s-1SAP\s0 multicast address:
|
yading@10
|
7098 .PP
|
yading@10
|
7099 .Vb 1
|
yading@10
|
7100 \& ffplay sap://
|
yading@10
|
7101 .Ve
|
yading@10
|
7102 .PP
|
yading@10
|
7103 To play back the first stream announced on one the default IPv6 \s-1SAP\s0 multicast address:
|
yading@10
|
7104 .PP
|
yading@10
|
7105 .Vb 1
|
yading@10
|
7106 \& ffplay sap://[ff0e::2:7ffe]
|
yading@10
|
7107 .Ve
|
yading@10
|
7108 .SS "tcp"
|
yading@10
|
7109 .IX Subsection "tcp"
|
yading@10
|
7110 Trasmission Control Protocol.
|
yading@10
|
7111 .PP
|
yading@10
|
7112 The required syntax for a \s-1TCP\s0 url is:
|
yading@10
|
7113 .PP
|
yading@10
|
7114 .Vb 1
|
yading@10
|
7115 \& tcp://<hostname>:<port>[?<options>]
|
yading@10
|
7116 .Ve
|
yading@10
|
7117 .IP "\fBlisten\fR" 4
|
yading@10
|
7118 .IX Item "listen"
|
yading@10
|
7119 Listen for an incoming connection
|
yading@10
|
7120 .IP "\fBtimeout=\fR\fImicroseconds\fR" 4
|
yading@10
|
7121 .IX Item "timeout=microseconds"
|
yading@10
|
7122 In read mode: if no data arrived in more than this time interval, raise error.
|
yading@10
|
7123 In write mode: if socket cannot be written in more than this time interval, raise error.
|
yading@10
|
7124 This also sets timeout on \s-1TCP\s0 connection establishing.
|
yading@10
|
7125 .Sp
|
yading@10
|
7126 .Vb 2
|
yading@10
|
7127 \& ffmpeg \-i <input> \-f <format> tcp://<hostname>:<port>?listen
|
yading@10
|
7128 \& ffplay tcp://<hostname>:<port>
|
yading@10
|
7129 .Ve
|
yading@10
|
7130 .SS "tls"
|
yading@10
|
7131 .IX Subsection "tls"
|
yading@10
|
7132 Transport Layer Security/Secure Sockets Layer
|
yading@10
|
7133 .PP
|
yading@10
|
7134 The required syntax for a \s-1TLS/SSL\s0 url is:
|
yading@10
|
7135 .PP
|
yading@10
|
7136 .Vb 1
|
yading@10
|
7137 \& tls://<hostname>:<port>[?<options>]
|
yading@10
|
7138 .Ve
|
yading@10
|
7139 .IP "\fBlisten\fR" 4
|
yading@10
|
7140 .IX Item "listen"
|
yading@10
|
7141 Act as a server, listening for an incoming connection.
|
yading@10
|
7142 .IP "\fBcafile=\fR\fIfilename\fR" 4
|
yading@10
|
7143 .IX Item "cafile=filename"
|
yading@10
|
7144 Certificate authority file. The file must be in OpenSSL \s-1PEM\s0 format.
|
yading@10
|
7145 .IP "\fBcert=\fR\fIfilename\fR" 4
|
yading@10
|
7146 .IX Item "cert=filename"
|
yading@10
|
7147 Certificate file. The file must be in OpenSSL \s-1PEM\s0 format.
|
yading@10
|
7148 .IP "\fBkey=\fR\fIfilename\fR" 4
|
yading@10
|
7149 .IX Item "key=filename"
|
yading@10
|
7150 Private key file.
|
yading@10
|
7151 .IP "\fBverify=\fR\fI0|1\fR" 4
|
yading@10
|
7152 .IX Item "verify=0|1"
|
yading@10
|
7153 Verify the peer's certificate.
|
yading@10
|
7154 .PP
|
yading@10
|
7155 Example command lines:
|
yading@10
|
7156 .PP
|
yading@10
|
7157 To create a \s-1TLS/SSL\s0 server that serves an input stream.
|
yading@10
|
7158 .PP
|
yading@10
|
7159 .Vb 1
|
yading@10
|
7160 \& ffmpeg \-i <input> \-f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
|
yading@10
|
7161 .Ve
|
yading@10
|
7162 .PP
|
yading@10
|
7163 To play back a stream from the \s-1TLS/SSL\s0 server using \fBffplay\fR:
|
yading@10
|
7164 .PP
|
yading@10
|
7165 .Vb 1
|
yading@10
|
7166 \& ffplay tls://<hostname>:<port>
|
yading@10
|
7167 .Ve
|
yading@10
|
7168 .SS "udp"
|
yading@10
|
7169 .IX Subsection "udp"
|
yading@10
|
7170 User Datagram Protocol.
|
yading@10
|
7171 .PP
|
yading@10
|
7172 The required syntax for a \s-1UDP\s0 url is:
|
yading@10
|
7173 .PP
|
yading@10
|
7174 .Vb 1
|
yading@10
|
7175 \& udp://<hostname>:<port>[?<options>]
|
yading@10
|
7176 .Ve
|
yading@10
|
7177 .PP
|
yading@10
|
7178 \&\fIoptions\fR contains a list of &\-separated options of the form \fIkey\fR=\fIval\fR.
|
yading@10
|
7179 .PP
|
yading@10
|
7180 In case threading is enabled on the system, a circular buffer is used
|
yading@10
|
7181 to store the incoming data, which allows to reduce loss of data due to
|
yading@10
|
7182 \&\s-1UDP\s0 socket buffer overruns. The \fIfifo_size\fR and
|
yading@10
|
7183 \&\fIoverrun_nonfatal\fR options are related to this buffer.
|
yading@10
|
7184 .PP
|
yading@10
|
7185 The list of supported options follows.
|
yading@10
|
7186 .IP "\fBbuffer_size=\fR\fIsize\fR" 4
|
yading@10
|
7187 .IX Item "buffer_size=size"
|
yading@10
|
7188 Set the \s-1UDP\s0 socket buffer size in bytes. This is used both for the
|
yading@10
|
7189 receiving and the sending buffer size.
|
yading@10
|
7190 .IP "\fBlocalport=\fR\fIport\fR" 4
|
yading@10
|
7191 .IX Item "localport=port"
|
yading@10
|
7192 Override the local \s-1UDP\s0 port to bind with.
|
yading@10
|
7193 .IP "\fBlocaladdr=\fR\fIaddr\fR" 4
|
yading@10
|
7194 .IX Item "localaddr=addr"
|
yading@10
|
7195 Choose the local \s-1IP\s0 address. This is useful e.g. if sending multicast
|
yading@10
|
7196 and the host has multiple interfaces, where the user can choose
|
yading@10
|
7197 which interface to send on by specifying the \s-1IP\s0 address of that interface.
|
yading@10
|
7198 .IP "\fBpkt_size=\fR\fIsize\fR" 4
|
yading@10
|
7199 .IX Item "pkt_size=size"
|
yading@10
|
7200 Set the size in bytes of \s-1UDP\s0 packets.
|
yading@10
|
7201 .IP "\fBreuse=\fR\fI1|0\fR" 4
|
yading@10
|
7202 .IX Item "reuse=1|0"
|
yading@10
|
7203 Explicitly allow or disallow reusing \s-1UDP\s0 sockets.
|
yading@10
|
7204 .IP "\fBttl=\fR\fIttl\fR" 4
|
yading@10
|
7205 .IX Item "ttl=ttl"
|
yading@10
|
7206 Set the time to live value (for multicast only).
|
yading@10
|
7207 .IP "\fBconnect=\fR\fI1|0\fR" 4
|
yading@10
|
7208 .IX Item "connect=1|0"
|
yading@10
|
7209 Initialize the \s-1UDP\s0 socket with \f(CW\*(C`connect()\*(C'\fR. In this case, the
|
yading@10
|
7210 destination address can't be changed with ff_udp_set_remote_url later.
|
yading@10
|
7211 If the destination address isn't known at the start, this option can
|
yading@10
|
7212 be specified in ff_udp_set_remote_url, too.
|
yading@10
|
7213 This allows finding out the source address for the packets with getsockname,
|
yading@10
|
7214 and makes writes return with \s-1AVERROR\s0(\s-1ECONNREFUSED\s0) if \*(L"destination
|
yading@10
|
7215 unreachable\*(R" is received.
|
yading@10
|
7216 For receiving, this gives the benefit of only receiving packets from
|
yading@10
|
7217 the specified peer address/port.
|
yading@10
|
7218 .IP "\fBsources=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
|
yading@10
|
7219 .IX Item "sources=address[,address]"
|
yading@10
|
7220 Only receive packets sent to the multicast group from one of the
|
yading@10
|
7221 specified sender \s-1IP\s0 addresses.
|
yading@10
|
7222 .IP "\fBblock=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
|
yading@10
|
7223 .IX Item "block=address[,address]"
|
yading@10
|
7224 Ignore packets sent to the multicast group from the specified
|
yading@10
|
7225 sender \s-1IP\s0 addresses.
|
yading@10
|
7226 .IP "\fBfifo_size=\fR\fIunits\fR" 4
|
yading@10
|
7227 .IX Item "fifo_size=units"
|
yading@10
|
7228 Set the \s-1UDP\s0 receiving circular buffer size, expressed as a number of
|
yading@10
|
7229 packets with size of 188 bytes. If not specified defaults to 7*4096.
|
yading@10
|
7230 .IP "\fBoverrun_nonfatal=\fR\fI1|0\fR" 4
|
yading@10
|
7231 .IX Item "overrun_nonfatal=1|0"
|
yading@10
|
7232 Survive in case of \s-1UDP\s0 receiving circular buffer overrun. Default
|
yading@10
|
7233 value is 0.
|
yading@10
|
7234 .IP "\fBtimeout=\fR\fImicroseconds\fR" 4
|
yading@10
|
7235 .IX Item "timeout=microseconds"
|
yading@10
|
7236 In read mode: if no data arrived in more than this time interval, raise error.
|
yading@10
|
7237 .PP
|
yading@10
|
7238 Some usage examples of the \s-1UDP\s0 protocol with \fBffmpeg\fR follow.
|
yading@10
|
7239 .PP
|
yading@10
|
7240 To stream over \s-1UDP\s0 to a remote endpoint:
|
yading@10
|
7241 .PP
|
yading@10
|
7242 .Vb 1
|
yading@10
|
7243 \& ffmpeg \-i <input> \-f <format> udp://<hostname>:<port>
|
yading@10
|
7244 .Ve
|
yading@10
|
7245 .PP
|
yading@10
|
7246 To stream in mpegts format over \s-1UDP\s0 using 188 sized \s-1UDP\s0 packets, using a large input buffer:
|
yading@10
|
7247 .PP
|
yading@10
|
7248 .Vb 1
|
yading@10
|
7249 \& ffmpeg \-i <input> \-f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
|
yading@10
|
7250 .Ve
|
yading@10
|
7251 .PP
|
yading@10
|
7252 To receive over \s-1UDP\s0 from a remote endpoint:
|
yading@10
|
7253 .PP
|
yading@10
|
7254 .Vb 1
|
yading@10
|
7255 \& ffmpeg \-i udp://[<multicast\-address>]:<port>
|
yading@10
|
7256 .Ve
|
yading@10
|
7257 .SH "DEVICE OPTIONS"
|
yading@10
|
7258 .IX Header "DEVICE OPTIONS"
|
yading@10
|
7259 The libavdevice library provides the same interface as
|
yading@10
|
7260 libavformat. Namely, an input device is considered like a demuxer, and
|
yading@10
|
7261 an output device like a muxer, and the interface and generic device
|
yading@10
|
7262 options are the same provided by libavformat (see the ffmpeg-formats
|
yading@10
|
7263 manual).
|
yading@10
|
7264 .PP
|
yading@10
|
7265 In addition each input or output device may support so-called private
|
yading@10
|
7266 options, which are specific for that component.
|
yading@10
|
7267 .PP
|
yading@10
|
7268 Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
|
yading@10
|
7269 FFmpeg tools, or by setting the value explicitly in the device
|
yading@10
|
7270 \&\f(CW\*(C`AVFormatContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0
|
yading@10
|
7271 for programmatic use.
|
yading@10
|
7272 .SH "INPUT DEVICES"
|
yading@10
|
7273 .IX Header "INPUT DEVICES"
|
yading@10
|
7274 Input devices are configured elements in FFmpeg which allow to access
|
yading@10
|
7275 the data coming from a multimedia device attached to your system.
|
yading@10
|
7276 .PP
|
yading@10
|
7277 When you configure your FFmpeg build, all the supported input devices
|
yading@10
|
7278 are enabled by default. You can list all available ones using the
|
yading@10
|
7279 configure option \*(L"\-\-list\-indevs\*(R".
|
yading@10
|
7280 .PP
|
yading@10
|
7281 You can disable all the input devices using the configure option
|
yading@10
|
7282 \&\*(L"\-\-disable\-indevs\*(R", and selectively enable an input device using the
|
yading@10
|
7283 option "\-\-enable\-indev=\fI\s-1INDEV\s0\fR\*(L", or you can disable a particular
|
yading@10
|
7284 input device using the option \*(R"\-\-disable\-indev=\fI\s-1INDEV\s0\fR".
|
yading@10
|
7285 .PP
|
yading@10
|
7286 The option \*(L"\-formats\*(R" of the ff* tools will display the list of
|
yading@10
|
7287 supported input devices (amongst the demuxers).
|
yading@10
|
7288 .PP
|
yading@10
|
7289 A description of the currently available input devices follows.
|
yading@10
|
7290 .SS "alsa"
|
yading@10
|
7291 .IX Subsection "alsa"
|
yading@10
|
7292 \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) input device.
|
yading@10
|
7293 .PP
|
yading@10
|
7294 To enable this input device during configuration you need libasound
|
yading@10
|
7295 installed on your system.
|
yading@10
|
7296 .PP
|
yading@10
|
7297 This device allows capturing from an \s-1ALSA\s0 device. The name of the
|
yading@10
|
7298 device to capture has to be an \s-1ALSA\s0 card identifier.
|
yading@10
|
7299 .PP
|
yading@10
|
7300 An \s-1ALSA\s0 identifier has the syntax:
|
yading@10
|
7301 .PP
|
yading@10
|
7302 .Vb 1
|
yading@10
|
7303 \& hw:<CARD>[,<DEV>[,<SUBDEV>]]
|
yading@10
|
7304 .Ve
|
yading@10
|
7305 .PP
|
yading@10
|
7306 where the \fI\s-1DEV\s0\fR and \fI\s-1SUBDEV\s0\fR components are optional.
|
yading@10
|
7307 .PP
|
yading@10
|
7308 The three arguments (in order: \fI\s-1CARD\s0\fR,\fI\s-1DEV\s0\fR,\fI\s-1SUBDEV\s0\fR)
|
yading@10
|
7309 specify card number or identifier, device number and subdevice number
|
yading@10
|
7310 (\-1 means any).
|
yading@10
|
7311 .PP
|
yading@10
|
7312 To see the list of cards currently recognized by your system check the
|
yading@10
|
7313 files \fI/proc/asound/cards\fR and \fI/proc/asound/devices\fR.
|
yading@10
|
7314 .PP
|
yading@10
|
7315 For example to capture with \fBffmpeg\fR from an \s-1ALSA\s0 device with
|
yading@10
|
7316 card id 0, you may run the command:
|
yading@10
|
7317 .PP
|
yading@10
|
7318 .Vb 1
|
yading@10
|
7319 \& ffmpeg \-f alsa \-i hw:0 alsaout.wav
|
yading@10
|
7320 .Ve
|
yading@10
|
7321 .PP
|
yading@10
|
7322 For more information see:
|
yading@10
|
7323 <\fBhttp://www.alsa\-project.org/alsa\-doc/alsa\-lib/pcm.html\fR>
|
yading@10
|
7324 .SS "bktr"
|
yading@10
|
7325 .IX Subsection "bktr"
|
yading@10
|
7326 \&\s-1BSD\s0 video input device.
|
yading@10
|
7327 .SS "dshow"
|
yading@10
|
7328 .IX Subsection "dshow"
|
yading@10
|
7329 Windows DirectShow input device.
|
yading@10
|
7330 .PP
|
yading@10
|
7331 DirectShow support is enabled when FFmpeg is built with the mingw\-w64 project.
|
yading@10
|
7332 Currently only audio and video devices are supported.
|
yading@10
|
7333 .PP
|
yading@10
|
7334 Multiple devices may be opened as separate inputs, but they may also be
|
yading@10
|
7335 opened on the same input, which should improve synchronism between them.
|
yading@10
|
7336 .PP
|
yading@10
|
7337 The input name should be in the format:
|
yading@10
|
7338 .PP
|
yading@10
|
7339 .Vb 1
|
yading@10
|
7340 \& <TYPE>=<NAME>[:<TYPE>=<NAME>]
|
yading@10
|
7341 .Ve
|
yading@10
|
7342 .PP
|
yading@10
|
7343 where \fI\s-1TYPE\s0\fR can be either \fIaudio\fR or \fIvideo\fR,
|
yading@10
|
7344 and \fI\s-1NAME\s0\fR is the device's name.
|
yading@10
|
7345 .PP
|
yading@10
|
7346 \fIOptions\fR
|
yading@10
|
7347 .IX Subsection "Options"
|
yading@10
|
7348 .PP
|
yading@10
|
7349 If no options are specified, the device's defaults are used.
|
yading@10
|
7350 If the device does not support the requested options, it will
|
yading@10
|
7351 fail to open.
|
yading@10
|
7352 .IP "\fBvideo_size\fR" 4
|
yading@10
|
7353 .IX Item "video_size"
|
yading@10
|
7354 Set the video size in the captured video.
|
yading@10
|
7355 .IP "\fBframerate\fR" 4
|
yading@10
|
7356 .IX Item "framerate"
|
yading@10
|
7357 Set the frame rate in the captured video.
|
yading@10
|
7358 .IP "\fBsample_rate\fR" 4
|
yading@10
|
7359 .IX Item "sample_rate"
|
yading@10
|
7360 Set the sample rate (in Hz) of the captured audio.
|
yading@10
|
7361 .IP "\fBsample_size\fR" 4
|
yading@10
|
7362 .IX Item "sample_size"
|
yading@10
|
7363 Set the sample size (in bits) of the captured audio.
|
yading@10
|
7364 .IP "\fBchannels\fR" 4
|
yading@10
|
7365 .IX Item "channels"
|
yading@10
|
7366 Set the number of channels in the captured audio.
|
yading@10
|
7367 .IP "\fBlist_devices\fR" 4
|
yading@10
|
7368 .IX Item "list_devices"
|
yading@10
|
7369 If set to \fBtrue\fR, print a list of devices and exit.
|
yading@10
|
7370 .IP "\fBlist_options\fR" 4
|
yading@10
|
7371 .IX Item "list_options"
|
yading@10
|
7372 If set to \fBtrue\fR, print a list of selected device's options
|
yading@10
|
7373 and exit.
|
yading@10
|
7374 .IP "\fBvideo_device_number\fR" 4
|
yading@10
|
7375 .IX Item "video_device_number"
|
yading@10
|
7376 Set video device number for devices with same name (starts at 0,
|
yading@10
|
7377 defaults to 0).
|
yading@10
|
7378 .IP "\fBaudio_device_number\fR" 4
|
yading@10
|
7379 .IX Item "audio_device_number"
|
yading@10
|
7380 Set audio device number for devices with same name (starts at 0,
|
yading@10
|
7381 defaults to 0).
|
yading@10
|
7382 .IP "\fBpixel_format\fR" 4
|
yading@10
|
7383 .IX Item "pixel_format"
|
yading@10
|
7384 Select pixel format to be used by DirectShow. This may only be set when
|
yading@10
|
7385 the video codec is not set or set to rawvideo.
|
yading@10
|
7386 .IP "\fBaudio_buffer_size\fR" 4
|
yading@10
|
7387 .IX Item "audio_buffer_size"
|
yading@10
|
7388 Set audio device buffer size in milliseconds (which can directly
|
yading@10
|
7389 impact latency, depending on the device).
|
yading@10
|
7390 Defaults to using the audio device's
|
yading@10
|
7391 default buffer size (typically some multiple of 500ms).
|
yading@10
|
7392 Setting this value too low can degrade performance.
|
yading@10
|
7393 See also
|
yading@10
|
7394 <\fBhttp://msdn.microsoft.com/en\-us/library/windows/desktop/dd377582(v=vs.85).aspx\fR>
|
yading@10
|
7395 .PP
|
yading@10
|
7396 \fIExamples\fR
|
yading@10
|
7397 .IX Subsection "Examples"
|
yading@10
|
7398 .IP "\(bu" 4
|
yading@10
|
7399 Print the list of DirectShow supported devices and exit:
|
yading@10
|
7400 .Sp
|
yading@10
|
7401 .Vb 1
|
yading@10
|
7402 \& $ ffmpeg \-list_devices true \-f dshow \-i dummy
|
yading@10
|
7403 .Ve
|
yading@10
|
7404 .IP "\(bu" 4
|
yading@10
|
7405 Open video device \fICamera\fR:
|
yading@10
|
7406 .Sp
|
yading@10
|
7407 .Vb 1
|
yading@10
|
7408 \& $ ffmpeg \-f dshow \-i video="Camera"
|
yading@10
|
7409 .Ve
|
yading@10
|
7410 .IP "\(bu" 4
|
yading@10
|
7411 Open second video device with name \fICamera\fR:
|
yading@10
|
7412 .Sp
|
yading@10
|
7413 .Vb 1
|
yading@10
|
7414 \& $ ffmpeg \-f dshow \-video_device_number 1 \-i video="Camera"
|
yading@10
|
7415 .Ve
|
yading@10
|
7416 .IP "\(bu" 4
|
yading@10
|
7417 Open video device \fICamera\fR and audio device \fIMicrophone\fR:
|
yading@10
|
7418 .Sp
|
yading@10
|
7419 .Vb 1
|
yading@10
|
7420 \& $ ffmpeg \-f dshow \-i video="Camera":audio="Microphone"
|
yading@10
|
7421 .Ve
|
yading@10
|
7422 .IP "\(bu" 4
|
yading@10
|
7423 Print the list of supported options in selected device and exit:
|
yading@10
|
7424 .Sp
|
yading@10
|
7425 .Vb 1
|
yading@10
|
7426 \& $ ffmpeg \-list_options true \-f dshow \-i video="Camera"
|
yading@10
|
7427 .Ve
|
yading@10
|
7428 .SS "dv1394"
|
yading@10
|
7429 .IX Subsection "dv1394"
|
yading@10
|
7430 Linux \s-1DV\s0 1394 input device.
|
yading@10
|
7431 .SS "fbdev"
|
yading@10
|
7432 .IX Subsection "fbdev"
|
yading@10
|
7433 Linux framebuffer input device.
|
yading@10
|
7434 .PP
|
yading@10
|
7435 The Linux framebuffer is a graphic hardware-independent abstraction
|
yading@10
|
7436 layer to show graphics on a computer monitor, typically on the
|
yading@10
|
7437 console. It is accessed through a file device node, usually
|
yading@10
|
7438 \&\fI/dev/fb0\fR.
|
yading@10
|
7439 .PP
|
yading@10
|
7440 For more detailed information read the file
|
yading@10
|
7441 Documentation/fb/framebuffer.txt included in the Linux source tree.
|
yading@10
|
7442 .PP
|
yading@10
|
7443 To record from the framebuffer device \fI/dev/fb0\fR with
|
yading@10
|
7444 \&\fBffmpeg\fR:
|
yading@10
|
7445 .PP
|
yading@10
|
7446 .Vb 1
|
yading@10
|
7447 \& ffmpeg \-f fbdev \-r 10 \-i /dev/fb0 out.avi
|
yading@10
|
7448 .Ve
|
yading@10
|
7449 .PP
|
yading@10
|
7450 You can take a single screenshot image with the command:
|
yading@10
|
7451 .PP
|
yading@10
|
7452 .Vb 1
|
yading@10
|
7453 \& ffmpeg \-f fbdev \-frames:v 1 \-r 1 \-i /dev/fb0 screenshot.jpeg
|
yading@10
|
7454 .Ve
|
yading@10
|
7455 .PP
|
yading@10
|
7456 See also <\fBhttp://linux\-fbdev.sourceforge.net/\fR>, and \fIfbset\fR\|(1).
|
yading@10
|
7457 .SS "iec61883"
|
yading@10
|
7458 .IX Subsection "iec61883"
|
yading@10
|
7459 FireWire \s-1DV/HDV\s0 input device using libiec61883.
|
yading@10
|
7460 .PP
|
yading@10
|
7461 To enable this input device, you need libiec61883, libraw1394 and
|
yading@10
|
7462 libavc1394 installed on your system. Use the configure option
|
yading@10
|
7463 \&\f(CW\*(C`\-\-enable\-libiec61883\*(C'\fR to compile with the device enabled.
|
yading@10
|
7464 .PP
|
yading@10
|
7465 The iec61883 capture device supports capturing from a video device
|
yading@10
|
7466 connected via \s-1IEEE1394\s0 (FireWire), using libiec61883 and the new Linux
|
yading@10
|
7467 FireWire stack (juju). This is the default \s-1DV/HDV\s0 input method in Linux
|
yading@10
|
7468 Kernel 2.6.37 and later, since the old FireWire stack was removed.
|
yading@10
|
7469 .PP
|
yading@10
|
7470 Specify the FireWire port to be used as input file, or \*(L"auto\*(R"
|
yading@10
|
7471 to choose the first port connected.
|
yading@10
|
7472 .PP
|
yading@10
|
7473 \fIOptions\fR
|
yading@10
|
7474 .IX Subsection "Options"
|
yading@10
|
7475 .IP "\fBdvtype\fR" 4
|
yading@10
|
7476 .IX Item "dvtype"
|
yading@10
|
7477 Override autodetection of \s-1DV/HDV\s0. This should only be used if auto
|
yading@10
|
7478 detection does not work, or if usage of a different device type
|
yading@10
|
7479 should be prohibited. Treating a \s-1DV\s0 device as \s-1HDV\s0 (or vice versa) will
|
yading@10
|
7480 not work and result in undefined behavior.
|
yading@10
|
7481 The values \fBauto\fR, \fBdv\fR and \fBhdv\fR are supported.
|
yading@10
|
7482 .IP "\fBdvbuffer\fR" 4
|
yading@10
|
7483 .IX Item "dvbuffer"
|
yading@10
|
7484 Set maxiumum size of buffer for incoming data, in frames. For \s-1DV\s0, this
|
yading@10
|
7485 is an exact value. For \s-1HDV\s0, it is not frame exact, since \s-1HDV\s0 does
|
yading@10
|
7486 not have a fixed frame size.
|
yading@10
|
7487 .IP "\fBdvguid\fR" 4
|
yading@10
|
7488 .IX Item "dvguid"
|
yading@10
|
7489 Select the capture device by specifying it's \s-1GUID\s0. Capturing will only
|
yading@10
|
7490 be performed from the specified device and fails if no device with the
|
yading@10
|
7491 given \s-1GUID\s0 is found. This is useful to select the input if multiple
|
yading@10
|
7492 devices are connected at the same time.
|
yading@10
|
7493 Look at /sys/bus/firewire/devices to find out the GUIDs.
|
yading@10
|
7494 .PP
|
yading@10
|
7495 \fIExamples\fR
|
yading@10
|
7496 .IX Subsection "Examples"
|
yading@10
|
7497 .IP "\(bu" 4
|
yading@10
|
7498 Grab and show the input of a FireWire \s-1DV/HDV\s0 device.
|
yading@10
|
7499 .Sp
|
yading@10
|
7500 .Vb 1
|
yading@10
|
7501 \& ffplay \-f iec61883 \-i auto
|
yading@10
|
7502 .Ve
|
yading@10
|
7503 .IP "\(bu" 4
|
yading@10
|
7504 Grab and record the input of a FireWire \s-1DV/HDV\s0 device,
|
yading@10
|
7505 using a packet buffer of 100000 packets if the source is \s-1HDV\s0.
|
yading@10
|
7506 .Sp
|
yading@10
|
7507 .Vb 1
|
yading@10
|
7508 \& ffmpeg \-f iec61883 \-i auto \-hdvbuffer 100000 out.mpg
|
yading@10
|
7509 .Ve
|
yading@10
|
7510 .SS "jack"
|
yading@10
|
7511 .IX Subsection "jack"
|
yading@10
|
7512 \&\s-1JACK\s0 input device.
|
yading@10
|
7513 .PP
|
yading@10
|
7514 To enable this input device during configuration you need libjack
|
yading@10
|
7515 installed on your system.
|
yading@10
|
7516 .PP
|
yading@10
|
7517 A \s-1JACK\s0 input device creates one or more \s-1JACK\s0 writable clients, one for
|
yading@10
|
7518 each audio channel, with name \fIclient_name\fR:input_\fIN\fR, where
|
yading@10
|
7519 \&\fIclient_name\fR is the name provided by the application, and \fIN\fR
|
yading@10
|
7520 is a number which identifies the channel.
|
yading@10
|
7521 Each writable client will send the acquired data to the FFmpeg input
|
yading@10
|
7522 device.
|
yading@10
|
7523 .PP
|
yading@10
|
7524 Once you have created one or more \s-1JACK\s0 readable clients, you need to
|
yading@10
|
7525 connect them to one or more \s-1JACK\s0 writable clients.
|
yading@10
|
7526 .PP
|
yading@10
|
7527 To connect or disconnect \s-1JACK\s0 clients you can use the \fBjack_connect\fR
|
yading@10
|
7528 and \fBjack_disconnect\fR programs, or do it through a graphical interface,
|
yading@10
|
7529 for example with \fBqjackctl\fR.
|
yading@10
|
7530 .PP
|
yading@10
|
7531 To list the \s-1JACK\s0 clients and their properties you can invoke the command
|
yading@10
|
7532 \&\fBjack_lsp\fR.
|
yading@10
|
7533 .PP
|
yading@10
|
7534 Follows an example which shows how to capture a \s-1JACK\s0 readable client
|
yading@10
|
7535 with \fBffmpeg\fR.
|
yading@10
|
7536 .PP
|
yading@10
|
7537 .Vb 2
|
yading@10
|
7538 \& # Create a JACK writable client with name "ffmpeg".
|
yading@10
|
7539 \& $ ffmpeg \-f jack \-i ffmpeg \-y out.wav
|
yading@10
|
7540 \&
|
yading@10
|
7541 \& # Start the sample jack_metro readable client.
|
yading@10
|
7542 \& $ jack_metro \-b 120 \-d 0.2 \-f 4000
|
yading@10
|
7543 \&
|
yading@10
|
7544 \& # List the current JACK clients.
|
yading@10
|
7545 \& $ jack_lsp \-c
|
yading@10
|
7546 \& system:capture_1
|
yading@10
|
7547 \& system:capture_2
|
yading@10
|
7548 \& system:playback_1
|
yading@10
|
7549 \& system:playback_2
|
yading@10
|
7550 \& ffmpeg:input_1
|
yading@10
|
7551 \& metro:120_bpm
|
yading@10
|
7552 \&
|
yading@10
|
7553 \& # Connect metro to the ffmpeg writable client.
|
yading@10
|
7554 \& $ jack_connect metro:120_bpm ffmpeg:input_1
|
yading@10
|
7555 .Ve
|
yading@10
|
7556 .PP
|
yading@10
|
7557 For more information read:
|
yading@10
|
7558 <\fBhttp://jackaudio.org/\fR>
|
yading@10
|
7559 .SS "lavfi"
|
yading@10
|
7560 .IX Subsection "lavfi"
|
yading@10
|
7561 Libavfilter input virtual device.
|
yading@10
|
7562 .PP
|
yading@10
|
7563 This input device reads data from the open output pads of a libavfilter
|
yading@10
|
7564 filtergraph.
|
yading@10
|
7565 .PP
|
yading@10
|
7566 For each filtergraph open output, the input device will create a
|
yading@10
|
7567 corresponding stream which is mapped to the generated output. Currently
|
yading@10
|
7568 only video data is supported. The filtergraph is specified through the
|
yading@10
|
7569 option \fBgraph\fR.
|
yading@10
|
7570 .PP
|
yading@10
|
7571 \fIOptions\fR
|
yading@10
|
7572 .IX Subsection "Options"
|
yading@10
|
7573 .IP "\fBgraph\fR" 4
|
yading@10
|
7574 .IX Item "graph"
|
yading@10
|
7575 Specify the filtergraph to use as input. Each video open output must be
|
yading@10
|
7576 labelled by a unique string of the form "out\fIN\fR", where \fIN\fR is a
|
yading@10
|
7577 number starting from 0 corresponding to the mapped input stream
|
yading@10
|
7578 generated by the device.
|
yading@10
|
7579 The first unlabelled output is automatically assigned to the \*(L"out0\*(R"
|
yading@10
|
7580 label, but all the others need to be specified explicitly.
|
yading@10
|
7581 .Sp
|
yading@10
|
7582 If not specified defaults to the filename specified for the input
|
yading@10
|
7583 device.
|
yading@10
|
7584 .IP "\fBgraph_file\fR" 4
|
yading@10
|
7585 .IX Item "graph_file"
|
yading@10
|
7586 Set the filename of the filtergraph to be read and sent to the other
|
yading@10
|
7587 filters. Syntax of the filtergraph is the same as the one specified by
|
yading@10
|
7588 the option \fIgraph\fR.
|
yading@10
|
7589 .PP
|
yading@10
|
7590 \fIExamples\fR
|
yading@10
|
7591 .IX Subsection "Examples"
|
yading@10
|
7592 .IP "\(bu" 4
|
yading@10
|
7593 Create a color video stream and play it back with \fBffplay\fR:
|
yading@10
|
7594 .Sp
|
yading@10
|
7595 .Vb 1
|
yading@10
|
7596 \& ffplay \-f lavfi \-graph "color=c=pink [out0]" dummy
|
yading@10
|
7597 .Ve
|
yading@10
|
7598 .IP "\(bu" 4
|
yading@10
|
7599 As the previous example, but use filename for specifying the graph
|
yading@10
|
7600 description, and omit the \*(L"out0\*(R" label:
|
yading@10
|
7601 .Sp
|
yading@10
|
7602 .Vb 1
|
yading@10
|
7603 \& ffplay \-f lavfi color=c=pink
|
yading@10
|
7604 .Ve
|
yading@10
|
7605 .IP "\(bu" 4
|
yading@10
|
7606 Create three different video test filtered sources and play them:
|
yading@10
|
7607 .Sp
|
yading@10
|
7608 .Vb 1
|
yading@10
|
7609 \& ffplay \-f lavfi \-graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
|
yading@10
|
7610 .Ve
|
yading@10
|
7611 .IP "\(bu" 4
|
yading@10
|
7612 Read an audio stream from a file using the amovie source and play it
|
yading@10
|
7613 back with \fBffplay\fR:
|
yading@10
|
7614 .Sp
|
yading@10
|
7615 .Vb 1
|
yading@10
|
7616 \& ffplay \-f lavfi "amovie=test.wav"
|
yading@10
|
7617 .Ve
|
yading@10
|
7618 .IP "\(bu" 4
|
yading@10
|
7619 Read an audio stream and a video stream and play it back with
|
yading@10
|
7620 \&\fBffplay\fR:
|
yading@10
|
7621 .Sp
|
yading@10
|
7622 .Vb 1
|
yading@10
|
7623 \& ffplay \-f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
|
yading@10
|
7624 .Ve
|
yading@10
|
7625 .SS "libdc1394"
|
yading@10
|
7626 .IX Subsection "libdc1394"
|
yading@10
|
7627 \&\s-1IIDC1394\s0 input device, based on libdc1394 and libraw1394.
|
yading@10
|
7628 .SS "openal"
|
yading@10
|
7629 .IX Subsection "openal"
|
yading@10
|
7630 The OpenAL input device provides audio capture on all systems with a
|
yading@10
|
7631 working OpenAL 1.1 implementation.
|
yading@10
|
7632 .PP
|
yading@10
|
7633 To enable this input device during configuration, you need OpenAL
|
yading@10
|
7634 headers and libraries installed on your system, and need to configure
|
yading@10
|
7635 FFmpeg with \f(CW\*(C`\-\-enable\-openal\*(C'\fR.
|
yading@10
|
7636 .PP
|
yading@10
|
7637 OpenAL headers and libraries should be provided as part of your OpenAL
|
yading@10
|
7638 implementation, or as an additional download (an \s-1SDK\s0). Depending on your
|
yading@10
|
7639 installation you may need to specify additional flags via the
|
yading@10
|
7640 \&\f(CW\*(C`\-\-extra\-cflags\*(C'\fR and \f(CW\*(C`\-\-extra\-ldflags\*(C'\fR for allowing the build
|
yading@10
|
7641 system to locate the OpenAL headers and libraries.
|
yading@10
|
7642 .PP
|
yading@10
|
7643 An incomplete list of OpenAL implementations follows:
|
yading@10
|
7644 .IP "\fBCreative\fR" 4
|
yading@10
|
7645 .IX Item "Creative"
|
yading@10
|
7646 The official Windows implementation, providing hardware acceleration
|
yading@10
|
7647 with supported devices and software fallback.
|
yading@10
|
7648 See <\fBhttp://openal.org/\fR>.
|
yading@10
|
7649 .IP "\fBOpenAL Soft\fR" 4
|
yading@10
|
7650 .IX Item "OpenAL Soft"
|
yading@10
|
7651 Portable, open source (\s-1LGPL\s0) software implementation. Includes
|
yading@10
|
7652 backends for the most common sound APIs on the Windows, Linux,
|
yading@10
|
7653 Solaris, and \s-1BSD\s0 operating systems.
|
yading@10
|
7654 See <\fBhttp://kcat.strangesoft.net/openal.html\fR>.
|
yading@10
|
7655 .IP "\fBApple\fR" 4
|
yading@10
|
7656 .IX Item "Apple"
|
yading@10
|
7657 OpenAL is part of Core Audio, the official Mac \s-1OS\s0 X Audio interface.
|
yading@10
|
7658 See <\fBhttp://developer.apple.com/technologies/mac/audio\-and\-video.html\fR>
|
yading@10
|
7659 .PP
|
yading@10
|
7660 This device allows to capture from an audio input device handled
|
yading@10
|
7661 through OpenAL.
|
yading@10
|
7662 .PP
|
yading@10
|
7663 You need to specify the name of the device to capture in the provided
|
yading@10
|
7664 filename. If the empty string is provided, the device will
|
yading@10
|
7665 automatically select the default device. You can get the list of the
|
yading@10
|
7666 supported devices by using the option \fIlist_devices\fR.
|
yading@10
|
7667 .PP
|
yading@10
|
7668 \fIOptions\fR
|
yading@10
|
7669 .IX Subsection "Options"
|
yading@10
|
7670 .IP "\fBchannels\fR" 4
|
yading@10
|
7671 .IX Item "channels"
|
yading@10
|
7672 Set the number of channels in the captured audio. Only the values
|
yading@10
|
7673 \&\fB1\fR (monaural) and \fB2\fR (stereo) are currently supported.
|
yading@10
|
7674 Defaults to \fB2\fR.
|
yading@10
|
7675 .IP "\fBsample_size\fR" 4
|
yading@10
|
7676 .IX Item "sample_size"
|
yading@10
|
7677 Set the sample size (in bits) of the captured audio. Only the values
|
yading@10
|
7678 \&\fB8\fR and \fB16\fR are currently supported. Defaults to
|
yading@10
|
7679 \&\fB16\fR.
|
yading@10
|
7680 .IP "\fBsample_rate\fR" 4
|
yading@10
|
7681 .IX Item "sample_rate"
|
yading@10
|
7682 Set the sample rate (in Hz) of the captured audio.
|
yading@10
|
7683 Defaults to \fB44.1k\fR.
|
yading@10
|
7684 .IP "\fBlist_devices\fR" 4
|
yading@10
|
7685 .IX Item "list_devices"
|
yading@10
|
7686 If set to \fBtrue\fR, print a list of devices and exit.
|
yading@10
|
7687 Defaults to \fBfalse\fR.
|
yading@10
|
7688 .PP
|
yading@10
|
7689 \fIExamples\fR
|
yading@10
|
7690 .IX Subsection "Examples"
|
yading@10
|
7691 .PP
|
yading@10
|
7692 Print the list of OpenAL supported devices and exit:
|
yading@10
|
7693 .PP
|
yading@10
|
7694 .Vb 1
|
yading@10
|
7695 \& $ ffmpeg \-list_devices true \-f openal \-i dummy out.ogg
|
yading@10
|
7696 .Ve
|
yading@10
|
7697 .PP
|
yading@10
|
7698 Capture from the OpenAL device \fI\s-1DR\-BT101\s0 via PulseAudio\fR:
|
yading@10
|
7699 .PP
|
yading@10
|
7700 .Vb 1
|
yading@10
|
7701 \& $ ffmpeg \-f openal \-i \*(AqDR\-BT101 via PulseAudio\*(Aq out.ogg
|
yading@10
|
7702 .Ve
|
yading@10
|
7703 .PP
|
yading@10
|
7704 Capture from the default device (note the empty string '' as filename):
|
yading@10
|
7705 .PP
|
yading@10
|
7706 .Vb 1
|
yading@10
|
7707 \& $ ffmpeg \-f openal \-i \*(Aq\*(Aq out.ogg
|
yading@10
|
7708 .Ve
|
yading@10
|
7709 .PP
|
yading@10
|
7710 Capture from two devices simultaneously, writing to two different files,
|
yading@10
|
7711 within the same \fBffmpeg\fR command:
|
yading@10
|
7712 .PP
|
yading@10
|
7713 .Vb 1
|
yading@10
|
7714 \& $ ffmpeg \-f openal \-i \*(AqDR\-BT101 via PulseAudio\*(Aq out1.ogg \-f openal \-i \*(AqALSA Default\*(Aq out2.ogg
|
yading@10
|
7715 .Ve
|
yading@10
|
7716 .PP
|
yading@10
|
7717 Note: not all OpenAL implementations support multiple simultaneous capture \-
|
yading@10
|
7718 try the latest OpenAL Soft if the above does not work.
|
yading@10
|
7719 .SS "oss"
|
yading@10
|
7720 .IX Subsection "oss"
|
yading@10
|
7721 Open Sound System input device.
|
yading@10
|
7722 .PP
|
yading@10
|
7723 The filename to provide to the input device is the device node
|
yading@10
|
7724 representing the \s-1OSS\s0 input device, and is usually set to
|
yading@10
|
7725 \&\fI/dev/dsp\fR.
|
yading@10
|
7726 .PP
|
yading@10
|
7727 For example to grab from \fI/dev/dsp\fR using \fBffmpeg\fR use the
|
yading@10
|
7728 command:
|
yading@10
|
7729 .PP
|
yading@10
|
7730 .Vb 1
|
yading@10
|
7731 \& ffmpeg \-f oss \-i /dev/dsp /tmp/oss.wav
|
yading@10
|
7732 .Ve
|
yading@10
|
7733 .PP
|
yading@10
|
7734 For more information about \s-1OSS\s0 see:
|
yading@10
|
7735 <\fBhttp://manuals.opensound.com/usersguide/dsp.html\fR>
|
yading@10
|
7736 .SS "pulse"
|
yading@10
|
7737 .IX Subsection "pulse"
|
yading@10
|
7738 pulseaudio input device.
|
yading@10
|
7739 .PP
|
yading@10
|
7740 To enable this input device during configuration you need libpulse-simple
|
yading@10
|
7741 installed in your system.
|
yading@10
|
7742 .PP
|
yading@10
|
7743 The filename to provide to the input device is a source device or the
|
yading@10
|
7744 string \*(L"default\*(R"
|
yading@10
|
7745 .PP
|
yading@10
|
7746 To list the pulse source devices and their properties you can invoke
|
yading@10
|
7747 the command \fBpactl list sources\fR.
|
yading@10
|
7748 .PP
|
yading@10
|
7749 .Vb 1
|
yading@10
|
7750 \& ffmpeg \-f pulse \-i default /tmp/pulse.wav
|
yading@10
|
7751 .Ve
|
yading@10
|
7752 .PP
|
yading@10
|
7753 \fI\fIserver\fI AVOption\fR
|
yading@10
|
7754 .IX Subsection "server AVOption"
|
yading@10
|
7755 .PP
|
yading@10
|
7756 The syntax is:
|
yading@10
|
7757 .PP
|
yading@10
|
7758 .Vb 1
|
yading@10
|
7759 \& \-server <server name>
|
yading@10
|
7760 .Ve
|
yading@10
|
7761 .PP
|
yading@10
|
7762 Connects to a specific server.
|
yading@10
|
7763 .PP
|
yading@10
|
7764 \fI\fIname\fI AVOption\fR
|
yading@10
|
7765 .IX Subsection "name AVOption"
|
yading@10
|
7766 .PP
|
yading@10
|
7767 The syntax is:
|
yading@10
|
7768 .PP
|
yading@10
|
7769 .Vb 1
|
yading@10
|
7770 \& \-name <application name>
|
yading@10
|
7771 .Ve
|
yading@10
|
7772 .PP
|
yading@10
|
7773 Specify the application name pulse will use when showing active clients,
|
yading@10
|
7774 by default it is the \s-1LIBAVFORMAT_IDENT\s0 string
|
yading@10
|
7775 .PP
|
yading@10
|
7776 \fI\fIstream_name\fI AVOption\fR
|
yading@10
|
7777 .IX Subsection "stream_name AVOption"
|
yading@10
|
7778 .PP
|
yading@10
|
7779 The syntax is:
|
yading@10
|
7780 .PP
|
yading@10
|
7781 .Vb 1
|
yading@10
|
7782 \& \-stream_name <stream name>
|
yading@10
|
7783 .Ve
|
yading@10
|
7784 .PP
|
yading@10
|
7785 Specify the stream name pulse will use when showing active streams,
|
yading@10
|
7786 by default it is \*(L"record\*(R"
|
yading@10
|
7787 .PP
|
yading@10
|
7788 \fI\fIsample_rate\fI AVOption\fR
|
yading@10
|
7789 .IX Subsection "sample_rate AVOption"
|
yading@10
|
7790 .PP
|
yading@10
|
7791 The syntax is:
|
yading@10
|
7792 .PP
|
yading@10
|
7793 .Vb 1
|
yading@10
|
7794 \& \-sample_rate <samplerate>
|
yading@10
|
7795 .Ve
|
yading@10
|
7796 .PP
|
yading@10
|
7797 Specify the samplerate in Hz, by default 48kHz is used.
|
yading@10
|
7798 .PP
|
yading@10
|
7799 \fI\fIchannels\fI AVOption\fR
|
yading@10
|
7800 .IX Subsection "channels AVOption"
|
yading@10
|
7801 .PP
|
yading@10
|
7802 The syntax is:
|
yading@10
|
7803 .PP
|
yading@10
|
7804 .Vb 1
|
yading@10
|
7805 \& \-channels <N>
|
yading@10
|
7806 .Ve
|
yading@10
|
7807 .PP
|
yading@10
|
7808 Specify the channels in use, by default 2 (stereo) is set.
|
yading@10
|
7809 .PP
|
yading@10
|
7810 \fI\fIframe_size\fI AVOption\fR
|
yading@10
|
7811 .IX Subsection "frame_size AVOption"
|
yading@10
|
7812 .PP
|
yading@10
|
7813 The syntax is:
|
yading@10
|
7814 .PP
|
yading@10
|
7815 .Vb 1
|
yading@10
|
7816 \& \-frame_size <bytes>
|
yading@10
|
7817 .Ve
|
yading@10
|
7818 .PP
|
yading@10
|
7819 Specify the number of byte per frame, by default it is set to 1024.
|
yading@10
|
7820 .PP
|
yading@10
|
7821 \fI\fIfragment_size\fI AVOption\fR
|
yading@10
|
7822 .IX Subsection "fragment_size AVOption"
|
yading@10
|
7823 .PP
|
yading@10
|
7824 The syntax is:
|
yading@10
|
7825 .PP
|
yading@10
|
7826 .Vb 1
|
yading@10
|
7827 \& \-fragment_size <bytes>
|
yading@10
|
7828 .Ve
|
yading@10
|
7829 .PP
|
yading@10
|
7830 Specify the minimal buffering fragment in pulseaudio, it will affect the
|
yading@10
|
7831 audio latency. By default it is unset.
|
yading@10
|
7832 .SS "sndio"
|
yading@10
|
7833 .IX Subsection "sndio"
|
yading@10
|
7834 sndio input device.
|
yading@10
|
7835 .PP
|
yading@10
|
7836 To enable this input device during configuration you need libsndio
|
yading@10
|
7837 installed on your system.
|
yading@10
|
7838 .PP
|
yading@10
|
7839 The filename to provide to the input device is the device node
|
yading@10
|
7840 representing the sndio input device, and is usually set to
|
yading@10
|
7841 \&\fI/dev/audio0\fR.
|
yading@10
|
7842 .PP
|
yading@10
|
7843 For example to grab from \fI/dev/audio0\fR using \fBffmpeg\fR use the
|
yading@10
|
7844 command:
|
yading@10
|
7845 .PP
|
yading@10
|
7846 .Vb 1
|
yading@10
|
7847 \& ffmpeg \-f sndio \-i /dev/audio0 /tmp/oss.wav
|
yading@10
|
7848 .Ve
|
yading@10
|
7849 .SS "video4linux2, v4l2"
|
yading@10
|
7850 .IX Subsection "video4linux2, v4l2"
|
yading@10
|
7851 Video4Linux2 input video device.
|
yading@10
|
7852 .PP
|
yading@10
|
7853 \&\*(L"v4l2\*(R" can be used as alias for \*(L"video4linux2\*(R".
|
yading@10
|
7854 .PP
|
yading@10
|
7855 If FFmpeg is built with v4l\-utils support (by using the
|
yading@10
|
7856 \&\f(CW\*(C`\-\-enable\-libv4l2\*(C'\fR configure option), the device will always rely
|
yading@10
|
7857 on libv4l2.
|
yading@10
|
7858 .PP
|
yading@10
|
7859 The name of the device to grab is a file device node, usually Linux
|
yading@10
|
7860 systems tend to automatically create such nodes when the device
|
yading@10
|
7861 (e.g. an \s-1USB\s0 webcam) is plugged into the system, and has a name of the
|
yading@10
|
7862 kind \fI/dev/video\fIN\fI\fR, where \fIN\fR is a number associated to
|
yading@10
|
7863 the device.
|
yading@10
|
7864 .PP
|
yading@10
|
7865 Video4Linux2 devices usually support a limited set of
|
yading@10
|
7866 \&\fIwidth\fRx\fIheight\fR sizes and frame rates. You can check which are
|
yading@10
|
7867 supported using \fB\-list_formats all\fR for Video4Linux2 devices.
|
yading@10
|
7868 Some devices, like \s-1TV\s0 cards, support one or more standards. It is possible
|
yading@10
|
7869 to list all the supported standards using \fB\-list_standards all\fR.
|
yading@10
|
7870 .PP
|
yading@10
|
7871 The time base for the timestamps is 1 microsecond. Depending on the kernel
|
yading@10
|
7872 version and configuration, the timestamps may be derived from the real time
|
yading@10
|
7873 clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
|
yading@10
|
7874 boot time, unaffected by \s-1NTP\s0 or manual changes to the clock). The
|
yading@10
|
7875 \&\fB\-timestamps abs\fR or \fB\-ts abs\fR option can be used to force
|
yading@10
|
7876 conversion into the real time clock.
|
yading@10
|
7877 .PP
|
yading@10
|
7878 Some usage examples of the video4linux2 device with \fBffmpeg\fR
|
yading@10
|
7879 and \fBffplay\fR:
|
yading@10
|
7880 .IP "\(bu" 4
|
yading@10
|
7881 Grab and show the input of a video4linux2 device:
|
yading@10
|
7882 .Sp
|
yading@10
|
7883 .Vb 1
|
yading@10
|
7884 \& ffplay \-f video4linux2 \-framerate 30 \-video_size hd720 /dev/video0
|
yading@10
|
7885 .Ve
|
yading@10
|
7886 .IP "\(bu" 4
|
yading@10
|
7887 Grab and record the input of a video4linux2 device, leave the
|
yading@10
|
7888 frame rate and size as previously set:
|
yading@10
|
7889 .Sp
|
yading@10
|
7890 .Vb 1
|
yading@10
|
7891 \& ffmpeg \-f video4linux2 \-input_format mjpeg \-i /dev/video0 out.mpeg
|
yading@10
|
7892 .Ve
|
yading@10
|
7893 .PP
|
yading@10
|
7894 For more information about Video4Linux, check <\fBhttp://linuxtv.org/\fR>.
|
yading@10
|
7895 .PP
|
yading@10
|
7896 \fIOptions\fR
|
yading@10
|
7897 .IX Subsection "Options"
|
yading@10
|
7898 .IP "\fBstandard\fR" 4
|
yading@10
|
7899 .IX Item "standard"
|
yading@10
|
7900 Set the standard. Must be the name of a supported standard. To get a
|
yading@10
|
7901 list of the supported standards, use the \fBlist_standards\fR
|
yading@10
|
7902 option.
|
yading@10
|
7903 .IP "\fBchannel\fR" 4
|
yading@10
|
7904 .IX Item "channel"
|
yading@10
|
7905 Set the input channel number. Default to \-1, which means using the
|
yading@10
|
7906 previously selected channel.
|
yading@10
|
7907 .IP "\fBvideo_size\fR" 4
|
yading@10
|
7908 .IX Item "video_size"
|
yading@10
|
7909 Set the video frame size. The argument must be a string in the form
|
yading@10
|
7910 \&\fI\s-1WIDTH\s0\fRx\fI\s-1HEIGHT\s0\fR or a valid size abbreviation.
|
yading@10
|
7911 .IP "\fBpixel_format\fR" 4
|
yading@10
|
7912 .IX Item "pixel_format"
|
yading@10
|
7913 Select the pixel format (only valid for raw video input).
|
yading@10
|
7914 .IP "\fBinput_format\fR" 4
|
yading@10
|
7915 .IX Item "input_format"
|
yading@10
|
7916 Set the preferred pixel format (for raw video) or a codec name.
|
yading@10
|
7917 This option allows to select the input format, when several are
|
yading@10
|
7918 available.
|
yading@10
|
7919 .IP "\fBframerate\fR" 4
|
yading@10
|
7920 .IX Item "framerate"
|
yading@10
|
7921 Set the preferred video frame rate.
|
yading@10
|
7922 .IP "\fBlist_formats\fR" 4
|
yading@10
|
7923 .IX Item "list_formats"
|
yading@10
|
7924 List available formats (supported pixel formats, codecs, and frame
|
yading@10
|
7925 sizes) and exit.
|
yading@10
|
7926 .Sp
|
yading@10
|
7927 Available values are:
|
yading@10
|
7928 .RS 4
|
yading@10
|
7929 .IP "\fBall\fR" 4
|
yading@10
|
7930 .IX Item "all"
|
yading@10
|
7931 Show all available (compressed and non-compressed) formats.
|
yading@10
|
7932 .IP "\fBraw\fR" 4
|
yading@10
|
7933 .IX Item "raw"
|
yading@10
|
7934 Show only raw video (non-compressed) formats.
|
yading@10
|
7935 .IP "\fBcompressed\fR" 4
|
yading@10
|
7936 .IX Item "compressed"
|
yading@10
|
7937 Show only compressed formats.
|
yading@10
|
7938 .RE
|
yading@10
|
7939 .RS 4
|
yading@10
|
7940 .RE
|
yading@10
|
7941 .IP "\fBlist_standards\fR" 4
|
yading@10
|
7942 .IX Item "list_standards"
|
yading@10
|
7943 List supported standards and exit.
|
yading@10
|
7944 .Sp
|
yading@10
|
7945 Available values are:
|
yading@10
|
7946 .RS 4
|
yading@10
|
7947 .IP "\fBall\fR" 4
|
yading@10
|
7948 .IX Item "all"
|
yading@10
|
7949 Show all supported standards.
|
yading@10
|
7950 .RE
|
yading@10
|
7951 .RS 4
|
yading@10
|
7952 .RE
|
yading@10
|
7953 .IP "\fBtimestamps, ts\fR" 4
|
yading@10
|
7954 .IX Item "timestamps, ts"
|
yading@10
|
7955 Set type of timestamps for grabbed frames.
|
yading@10
|
7956 .Sp
|
yading@10
|
7957 Available values are:
|
yading@10
|
7958 .RS 4
|
yading@10
|
7959 .IP "\fBdefault\fR" 4
|
yading@10
|
7960 .IX Item "default"
|
yading@10
|
7961 Use timestamps from the kernel.
|
yading@10
|
7962 .IP "\fBabs\fR" 4
|
yading@10
|
7963 .IX Item "abs"
|
yading@10
|
7964 Use absolute timestamps (wall clock).
|
yading@10
|
7965 .IP "\fBmono2abs\fR" 4
|
yading@10
|
7966 .IX Item "mono2abs"
|
yading@10
|
7967 Force conversion from monotonic to absolute timestamps.
|
yading@10
|
7968 .RE
|
yading@10
|
7969 .RS 4
|
yading@10
|
7970 .Sp
|
yading@10
|
7971 Default value is \f(CW\*(C`default\*(C'\fR.
|
yading@10
|
7972 .RE
|
yading@10
|
7973 .SS "vfwcap"
|
yading@10
|
7974 .IX Subsection "vfwcap"
|
yading@10
|
7975 VfW (Video for Windows) capture input device.
|
yading@10
|
7976 .PP
|
yading@10
|
7977 The filename passed as input is the capture driver number, ranging from
|
yading@10
|
7978 0 to 9. You may use \*(L"list\*(R" as filename to print a list of drivers. Any
|
yading@10
|
7979 other filename will be interpreted as device number 0.
|
yading@10
|
7980 .SS "x11grab"
|
yading@10
|
7981 .IX Subsection "x11grab"
|
yading@10
|
7982 X11 video input device.
|
yading@10
|
7983 .PP
|
yading@10
|
7984 This device allows to capture a region of an X11 display.
|
yading@10
|
7985 .PP
|
yading@10
|
7986 The filename passed as input has the syntax:
|
yading@10
|
7987 .PP
|
yading@10
|
7988 .Vb 1
|
yading@10
|
7989 \& [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
|
yading@10
|
7990 .Ve
|
yading@10
|
7991 .PP
|
yading@10
|
7992 \&\fIhostname\fR:\fIdisplay_number\fR.\fIscreen_number\fR specifies the
|
yading@10
|
7993 X11 display name of the screen to grab from. \fIhostname\fR can be
|
yading@10
|
7994 omitted, and defaults to \*(L"localhost\*(R". The environment variable
|
yading@10
|
7995 \&\fB\s-1DISPLAY\s0\fR contains the default display name.
|
yading@10
|
7996 .PP
|
yading@10
|
7997 \&\fIx_offset\fR and \fIy_offset\fR specify the offsets of the grabbed
|
yading@10
|
7998 area with respect to the top-left border of the X11 screen. They
|
yading@10
|
7999 default to 0.
|
yading@10
|
8000 .PP
|
yading@10
|
8001 Check the X11 documentation (e.g. man X) for more detailed information.
|
yading@10
|
8002 .PP
|
yading@10
|
8003 Use the \fBdpyinfo\fR program for getting basic information about the
|
yading@10
|
8004 properties of your X11 display (e.g. grep for \*(L"name\*(R" or \*(L"dimensions\*(R").
|
yading@10
|
8005 .PP
|
yading@10
|
8006 For example to grab from \fI:0.0\fR using \fBffmpeg\fR:
|
yading@10
|
8007 .PP
|
yading@10
|
8008 .Vb 1
|
yading@10
|
8009 \& ffmpeg \-f x11grab \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
8010 .Ve
|
yading@10
|
8011 .PP
|
yading@10
|
8012 Grab at position \f(CW\*(C`10,20\*(C'\fR:
|
yading@10
|
8013 .PP
|
yading@10
|
8014 .Vb 1
|
yading@10
|
8015 \& ffmpeg \-f x11grab \-r 25 \-s cif \-i :0.0+10,20 out.mpg
|
yading@10
|
8016 .Ve
|
yading@10
|
8017 .PP
|
yading@10
|
8018 \fIOptions\fR
|
yading@10
|
8019 .IX Subsection "Options"
|
yading@10
|
8020 .IP "\fBdraw_mouse\fR" 4
|
yading@10
|
8021 .IX Item "draw_mouse"
|
yading@10
|
8022 Specify whether to draw the mouse pointer. A value of \f(CW0\fR specify
|
yading@10
|
8023 not to draw the pointer. Default value is \f(CW1\fR.
|
yading@10
|
8024 .IP "\fBfollow_mouse\fR" 4
|
yading@10
|
8025 .IX Item "follow_mouse"
|
yading@10
|
8026 Make the grabbed area follow the mouse. The argument can be
|
yading@10
|
8027 \&\f(CW\*(C`centered\*(C'\fR or a number of pixels \fI\s-1PIXELS\s0\fR.
|
yading@10
|
8028 .Sp
|
yading@10
|
8029 When it is specified with \*(L"centered\*(R", the grabbing region follows the mouse
|
yading@10
|
8030 pointer and keeps the pointer at the center of region; otherwise, the region
|
yading@10
|
8031 follows only when the mouse pointer reaches within \fI\s-1PIXELS\s0\fR (greater than
|
yading@10
|
8032 zero) to the edge of region.
|
yading@10
|
8033 .Sp
|
yading@10
|
8034 For example:
|
yading@10
|
8035 .Sp
|
yading@10
|
8036 .Vb 1
|
yading@10
|
8037 \& ffmpeg \-f x11grab \-follow_mouse centered \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
8038 .Ve
|
yading@10
|
8039 .Sp
|
yading@10
|
8040 To follow only when the mouse pointer reaches within 100 pixels to edge:
|
yading@10
|
8041 .Sp
|
yading@10
|
8042 .Vb 1
|
yading@10
|
8043 \& ffmpeg \-f x11grab \-follow_mouse 100 \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
8044 .Ve
|
yading@10
|
8045 .IP "\fBframerate\fR" 4
|
yading@10
|
8046 .IX Item "framerate"
|
yading@10
|
8047 Set the grabbing frame rate. Default value is \f(CW\*(C`ntsc\*(C'\fR,
|
yading@10
|
8048 corresponding to a frame rate of \f(CW\*(C`30000/1001\*(C'\fR.
|
yading@10
|
8049 .IP "\fBshow_region\fR" 4
|
yading@10
|
8050 .IX Item "show_region"
|
yading@10
|
8051 Show grabbed region on screen.
|
yading@10
|
8052 .Sp
|
yading@10
|
8053 If \fIshow_region\fR is specified with \f(CW1\fR, then the grabbing
|
yading@10
|
8054 region will be indicated on screen. With this option, it is easy to
|
yading@10
|
8055 know what is being grabbed if only a portion of the screen is grabbed.
|
yading@10
|
8056 .Sp
|
yading@10
|
8057 For example:
|
yading@10
|
8058 .Sp
|
yading@10
|
8059 .Vb 1
|
yading@10
|
8060 \& ffmpeg \-f x11grab \-show_region 1 \-r 25 \-s cif \-i :0.0+10,20 out.mpg
|
yading@10
|
8061 .Ve
|
yading@10
|
8062 .Sp
|
yading@10
|
8063 With \fIfollow_mouse\fR:
|
yading@10
|
8064 .Sp
|
yading@10
|
8065 .Vb 1
|
yading@10
|
8066 \& ffmpeg \-f x11grab \-follow_mouse centered \-show_region 1 \-r 25 \-s cif \-i :0.0 out.mpg
|
yading@10
|
8067 .Ve
|
yading@10
|
8068 .IP "\fBvideo_size\fR" 4
|
yading@10
|
8069 .IX Item "video_size"
|
yading@10
|
8070 Set the video frame size. Default value is \f(CW\*(C`vga\*(C'\fR.
|
yading@10
|
8071 .SH "OUTPUT DEVICES"
|
yading@10
|
8072 .IX Header "OUTPUT DEVICES"
|
yading@10
|
8073 Output devices are configured elements in FFmpeg which allow to write
|
yading@10
|
8074 multimedia data to an output device attached to your system.
|
yading@10
|
8075 .PP
|
yading@10
|
8076 When you configure your FFmpeg build, all the supported output devices
|
yading@10
|
8077 are enabled by default. You can list all available ones using the
|
yading@10
|
8078 configure option \*(L"\-\-list\-outdevs\*(R".
|
yading@10
|
8079 .PP
|
yading@10
|
8080 You can disable all the output devices using the configure option
|
yading@10
|
8081 \&\*(L"\-\-disable\-outdevs\*(R", and selectively enable an output device using the
|
yading@10
|
8082 option "\-\-enable\-outdev=\fI\s-1OUTDEV\s0\fR\*(L", or you can disable a particular
|
yading@10
|
8083 input device using the option \*(R"\-\-disable\-outdev=\fI\s-1OUTDEV\s0\fR".
|
yading@10
|
8084 .PP
|
yading@10
|
8085 The option \*(L"\-formats\*(R" of the ff* tools will display the list of
|
yading@10
|
8086 enabled output devices (amongst the muxers).
|
yading@10
|
8087 .PP
|
yading@10
|
8088 A description of the currently available output devices follows.
|
yading@10
|
8089 .SS "alsa"
|
yading@10
|
8090 .IX Subsection "alsa"
|
yading@10
|
8091 \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) output device.
|
yading@10
|
8092 .SS "caca"
|
yading@10
|
8093 .IX Subsection "caca"
|
yading@10
|
8094 \&\s-1CACA\s0 output device.
|
yading@10
|
8095 .PP
|
yading@10
|
8096 This output devices allows to show a video stream in \s-1CACA\s0 window.
|
yading@10
|
8097 Only one \s-1CACA\s0 window is allowed per application, so you can
|
yading@10
|
8098 have only one instance of this output device in an application.
|
yading@10
|
8099 .PP
|
yading@10
|
8100 To enable this output device you need to configure FFmpeg with
|
yading@10
|
8101 \&\f(CW\*(C`\-\-enable\-libcaca\*(C'\fR.
|
yading@10
|
8102 libcaca is a graphics library that outputs text instead of pixels.
|
yading@10
|
8103 .PP
|
yading@10
|
8104 For more information about libcaca, check:
|
yading@10
|
8105 <\fBhttp://caca.zoy.org/wiki/libcaca\fR>
|
yading@10
|
8106 .PP
|
yading@10
|
8107 \fIOptions\fR
|
yading@10
|
8108 .IX Subsection "Options"
|
yading@10
|
8109 .IP "\fBwindow_title\fR" 4
|
yading@10
|
8110 .IX Item "window_title"
|
yading@10
|
8111 Set the \s-1CACA\s0 window title, if not specified default to the filename
|
yading@10
|
8112 specified for the output device.
|
yading@10
|
8113 .IP "\fBwindow_size\fR" 4
|
yading@10
|
8114 .IX Item "window_size"
|
yading@10
|
8115 Set the \s-1CACA\s0 window size, can be a string of the form
|
yading@10
|
8116 \&\fIwidth\fRx\fIheight\fR or a video size abbreviation.
|
yading@10
|
8117 If not specified it defaults to the size of the input video.
|
yading@10
|
8118 .IP "\fBdriver\fR" 4
|
yading@10
|
8119 .IX Item "driver"
|
yading@10
|
8120 Set display driver.
|
yading@10
|
8121 .IP "\fBalgorithm\fR" 4
|
yading@10
|
8122 .IX Item "algorithm"
|
yading@10
|
8123 Set dithering algorithm. Dithering is necessary
|
yading@10
|
8124 because the picture being rendered has usually far more colours than
|
yading@10
|
8125 the available palette.
|
yading@10
|
8126 The accepted values are listed with \f(CW\*(C`\-list_dither algorithms\*(C'\fR.
|
yading@10
|
8127 .IP "\fBantialias\fR" 4
|
yading@10
|
8128 .IX Item "antialias"
|
yading@10
|
8129 Set antialias method. Antialiasing smoothens the rendered
|
yading@10
|
8130 image and avoids the commonly seen staircase effect.
|
yading@10
|
8131 The accepted values are listed with \f(CW\*(C`\-list_dither antialiases\*(C'\fR.
|
yading@10
|
8132 .IP "\fBcharset\fR" 4
|
yading@10
|
8133 .IX Item "charset"
|
yading@10
|
8134 Set which characters are going to be used when rendering text.
|
yading@10
|
8135 The accepted values are listed with \f(CW\*(C`\-list_dither charsets\*(C'\fR.
|
yading@10
|
8136 .IP "\fBcolor\fR" 4
|
yading@10
|
8137 .IX Item "color"
|
yading@10
|
8138 Set color to be used when rendering text.
|
yading@10
|
8139 The accepted values are listed with \f(CW\*(C`\-list_dither colors\*(C'\fR.
|
yading@10
|
8140 .IP "\fBlist_drivers\fR" 4
|
yading@10
|
8141 .IX Item "list_drivers"
|
yading@10
|
8142 If set to \fBtrue\fR, print a list of available drivers and exit.
|
yading@10
|
8143 .IP "\fBlist_dither\fR" 4
|
yading@10
|
8144 .IX Item "list_dither"
|
yading@10
|
8145 List available dither options related to the argument.
|
yading@10
|
8146 The argument must be one of \f(CW\*(C`algorithms\*(C'\fR, \f(CW\*(C`antialiases\*(C'\fR,
|
yading@10
|
8147 \&\f(CW\*(C`charsets\*(C'\fR, \f(CW\*(C`colors\*(C'\fR.
|
yading@10
|
8148 .PP
|
yading@10
|
8149 \fIExamples\fR
|
yading@10
|
8150 .IX Subsection "Examples"
|
yading@10
|
8151 .IP "\(bu" 4
|
yading@10
|
8152 The following command shows the \fBffmpeg\fR output is an
|
yading@10
|
8153 \&\s-1CACA\s0 window, forcing its size to 80x25:
|
yading@10
|
8154 .Sp
|
yading@10
|
8155 .Vb 1
|
yading@10
|
8156 \& ffmpeg \-i INPUT \-vcodec rawvideo \-pix_fmt rgb24 \-window_size 80x25 \-f caca \-
|
yading@10
|
8157 .Ve
|
yading@10
|
8158 .IP "\(bu" 4
|
yading@10
|
8159 Show the list of available drivers and exit:
|
yading@10
|
8160 .Sp
|
yading@10
|
8161 .Vb 1
|
yading@10
|
8162 \& ffmpeg \-i INPUT \-pix_fmt rgb24 \-f caca \-list_drivers true \-
|
yading@10
|
8163 .Ve
|
yading@10
|
8164 .IP "\(bu" 4
|
yading@10
|
8165 Show the list of available dither colors and exit:
|
yading@10
|
8166 .Sp
|
yading@10
|
8167 .Vb 1
|
yading@10
|
8168 \& ffmpeg \-i INPUT \-pix_fmt rgb24 \-f caca \-list_dither colors \-
|
yading@10
|
8169 .Ve
|
yading@10
|
8170 .SS "oss"
|
yading@10
|
8171 .IX Subsection "oss"
|
yading@10
|
8172 \&\s-1OSS\s0 (Open Sound System) output device.
|
yading@10
|
8173 .SS "sdl"
|
yading@10
|
8174 .IX Subsection "sdl"
|
yading@10
|
8175 \&\s-1SDL\s0 (Simple DirectMedia Layer) output device.
|
yading@10
|
8176 .PP
|
yading@10
|
8177 This output devices allows to show a video stream in an \s-1SDL\s0
|
yading@10
|
8178 window. Only one \s-1SDL\s0 window is allowed per application, so you can
|
yading@10
|
8179 have only one instance of this output device in an application.
|
yading@10
|
8180 .PP
|
yading@10
|
8181 To enable this output device you need libsdl installed on your system
|
yading@10
|
8182 when configuring your build.
|
yading@10
|
8183 .PP
|
yading@10
|
8184 For more information about \s-1SDL\s0, check:
|
yading@10
|
8185 <\fBhttp://www.libsdl.org/\fR>
|
yading@10
|
8186 .PP
|
yading@10
|
8187 \fIOptions\fR
|
yading@10
|
8188 .IX Subsection "Options"
|
yading@10
|
8189 .IP "\fBwindow_title\fR" 4
|
yading@10
|
8190 .IX Item "window_title"
|
yading@10
|
8191 Set the \s-1SDL\s0 window title, if not specified default to the filename
|
yading@10
|
8192 specified for the output device.
|
yading@10
|
8193 .IP "\fBicon_title\fR" 4
|
yading@10
|
8194 .IX Item "icon_title"
|
yading@10
|
8195 Set the name of the iconified \s-1SDL\s0 window, if not specified it is set
|
yading@10
|
8196 to the same value of \fIwindow_title\fR.
|
yading@10
|
8197 .IP "\fBwindow_size\fR" 4
|
yading@10
|
8198 .IX Item "window_size"
|
yading@10
|
8199 Set the \s-1SDL\s0 window size, can be a string of the form
|
yading@10
|
8200 \&\fIwidth\fRx\fIheight\fR or a video size abbreviation.
|
yading@10
|
8201 If not specified it defaults to the size of the input video,
|
yading@10
|
8202 downscaled according to the aspect ratio.
|
yading@10
|
8203 .PP
|
yading@10
|
8204 \fIExamples\fR
|
yading@10
|
8205 .IX Subsection "Examples"
|
yading@10
|
8206 .PP
|
yading@10
|
8207 The following command shows the \fBffmpeg\fR output is an
|
yading@10
|
8208 \&\s-1SDL\s0 window, forcing its size to the qcif format:
|
yading@10
|
8209 .PP
|
yading@10
|
8210 .Vb 1
|
yading@10
|
8211 \& ffmpeg \-i INPUT \-vcodec rawvideo \-pix_fmt yuv420p \-window_size qcif \-f sdl "SDL output"
|
yading@10
|
8212 .Ve
|
yading@10
|
8213 .SS "sndio"
|
yading@10
|
8214 .IX Subsection "sndio"
|
yading@10
|
8215 sndio audio output device.
|
yading@10
|
8216 .SH "RESAMPLER OPTIONS"
|
yading@10
|
8217 .IX Header "RESAMPLER OPTIONS"
|
yading@10
|
8218 The audio resampler supports the following named options.
|
yading@10
|
8219 .PP
|
yading@10
|
8220 Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
|
yading@10
|
8221 FFmpeg tools, \fIoption\fR=\fIvalue\fR for the aresample filter,
|
yading@10
|
8222 by setting the value explicitly in the
|
yading@10
|
8223 \&\f(CW\*(C`SwrContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0 for
|
yading@10
|
8224 programmatic use.
|
yading@10
|
8225 .IP "\fBich, in_channel_count\fR" 4
|
yading@10
|
8226 .IX Item "ich, in_channel_count"
|
yading@10
|
8227 Set the number of input channels. Default value is 0. Setting this
|
yading@10
|
8228 value is not mandatory if the corresponding channel layout
|
yading@10
|
8229 \&\fBin_channel_layout\fR is set.
|
yading@10
|
8230 .IP "\fBoch, out_channel_count\fR" 4
|
yading@10
|
8231 .IX Item "och, out_channel_count"
|
yading@10
|
8232 Set the number of output channels. Default value is 0. Setting this
|
yading@10
|
8233 value is not mandatory if the corresponding channel layout
|
yading@10
|
8234 \&\fBout_channel_layout\fR is set.
|
yading@10
|
8235 .IP "\fBuch, used_channel_count\fR" 4
|
yading@10
|
8236 .IX Item "uch, used_channel_count"
|
yading@10
|
8237 Set the number of used input channels. Default value is 0. This option is
|
yading@10
|
8238 only used for special remapping.
|
yading@10
|
8239 .IP "\fBisr, in_sample_rate\fR" 4
|
yading@10
|
8240 .IX Item "isr, in_sample_rate"
|
yading@10
|
8241 Set the input sample rate. Default value is 0.
|
yading@10
|
8242 .IP "\fBosr, out_sample_rate\fR" 4
|
yading@10
|
8243 .IX Item "osr, out_sample_rate"
|
yading@10
|
8244 Set the output sample rate. Default value is 0.
|
yading@10
|
8245 .IP "\fBisf, in_sample_fmt\fR" 4
|
yading@10
|
8246 .IX Item "isf, in_sample_fmt"
|
yading@10
|
8247 Specify the input sample format. It is set by default to \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
8248 .IP "\fBosf, out_sample_fmt\fR" 4
|
yading@10
|
8249 .IX Item "osf, out_sample_fmt"
|
yading@10
|
8250 Specify the output sample format. It is set by default to \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
8251 .IP "\fBtsf, internal_sample_fmt\fR" 4
|
yading@10
|
8252 .IX Item "tsf, internal_sample_fmt"
|
yading@10
|
8253 Set the internal sample format. Default value is \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
8254 This will automatically be chosen when it is not explicitly set.
|
yading@10
|
8255 .IP "\fBicl, in_channel_layout\fR" 4
|
yading@10
|
8256 .IX Item "icl, in_channel_layout"
|
yading@10
|
8257 Set the input channel layout.
|
yading@10
|
8258 .IP "\fBocl, out_channel_layout\fR" 4
|
yading@10
|
8259 .IX Item "ocl, out_channel_layout"
|
yading@10
|
8260 Set the output channel layout.
|
yading@10
|
8261 .IP "\fBclev, center_mix_level\fR" 4
|
yading@10
|
8262 .IX Item "clev, center_mix_level"
|
yading@10
|
8263 Set the center mix level. It is a value expressed in deciBel, and must be
|
yading@10
|
8264 in the interval [\-32,32].
|
yading@10
|
8265 .IP "\fBslev, surround_mix_level\fR" 4
|
yading@10
|
8266 .IX Item "slev, surround_mix_level"
|
yading@10
|
8267 Set the surround mix level. It is a value expressed in deciBel, and must
|
yading@10
|
8268 be in the interval [\-32,32].
|
yading@10
|
8269 .IP "\fBlfe_mix_level\fR" 4
|
yading@10
|
8270 .IX Item "lfe_mix_level"
|
yading@10
|
8271 Set \s-1LFE\s0 mix into non \s-1LFE\s0 level. It is used when there is a \s-1LFE\s0 input but no
|
yading@10
|
8272 \&\s-1LFE\s0 output. It is a value expressed in deciBel, and must
|
yading@10
|
8273 be in the interval [\-32,32].
|
yading@10
|
8274 .IP "\fBrmvol, rematrix_volume\fR" 4
|
yading@10
|
8275 .IX Item "rmvol, rematrix_volume"
|
yading@10
|
8276 Set rematrix volume. Default value is 1.0.
|
yading@10
|
8277 .IP "\fBflags, swr_flags\fR" 4
|
yading@10
|
8278 .IX Item "flags, swr_flags"
|
yading@10
|
8279 Set flags used by the converter. Default value is 0.
|
yading@10
|
8280 .Sp
|
yading@10
|
8281 It supports the following individual flags:
|
yading@10
|
8282 .RS 4
|
yading@10
|
8283 .IP "\fBres\fR" 4
|
yading@10
|
8284 .IX Item "res"
|
yading@10
|
8285 force resampling, this flag forces resampling to be used even when the
|
yading@10
|
8286 input and output sample rates match.
|
yading@10
|
8287 .RE
|
yading@10
|
8288 .RS 4
|
yading@10
|
8289 .RE
|
yading@10
|
8290 .IP "\fBdither_scale\fR" 4
|
yading@10
|
8291 .IX Item "dither_scale"
|
yading@10
|
8292 Set the dither scale. Default value is 1.
|
yading@10
|
8293 .IP "\fBdither_method\fR" 4
|
yading@10
|
8294 .IX Item "dither_method"
|
yading@10
|
8295 Set dither method. Default value is 0.
|
yading@10
|
8296 .Sp
|
yading@10
|
8297 Supported values:
|
yading@10
|
8298 .RS 4
|
yading@10
|
8299 .IP "\fBrectangular\fR" 4
|
yading@10
|
8300 .IX Item "rectangular"
|
yading@10
|
8301 select rectangular dither
|
yading@10
|
8302 .IP "\fBtriangular\fR" 4
|
yading@10
|
8303 .IX Item "triangular"
|
yading@10
|
8304 select triangular dither
|
yading@10
|
8305 .IP "\fBtriangular_hp\fR" 4
|
yading@10
|
8306 .IX Item "triangular_hp"
|
yading@10
|
8307 select triangular dither with high pass
|
yading@10
|
8308 .IP "\fBlipshitz\fR" 4
|
yading@10
|
8309 .IX Item "lipshitz"
|
yading@10
|
8310 select lipshitz noise shaping dither
|
yading@10
|
8311 .IP "\fBshibata\fR" 4
|
yading@10
|
8312 .IX Item "shibata"
|
yading@10
|
8313 select shibata noise shaping dither
|
yading@10
|
8314 .IP "\fBlow_shibata\fR" 4
|
yading@10
|
8315 .IX Item "low_shibata"
|
yading@10
|
8316 select low shibata noise shaping dither
|
yading@10
|
8317 .IP "\fBhigh_shibata\fR" 4
|
yading@10
|
8318 .IX Item "high_shibata"
|
yading@10
|
8319 select high shibata noise shaping dither
|
yading@10
|
8320 .IP "\fBf_weighted\fR" 4
|
yading@10
|
8321 .IX Item "f_weighted"
|
yading@10
|
8322 select f\-weighted noise shaping dither
|
yading@10
|
8323 .IP "\fBmodified_e_weighted\fR" 4
|
yading@10
|
8324 .IX Item "modified_e_weighted"
|
yading@10
|
8325 select modified-e-weighted noise shaping dither
|
yading@10
|
8326 .IP "\fBimproved_e_weighted\fR" 4
|
yading@10
|
8327 .IX Item "improved_e_weighted"
|
yading@10
|
8328 select improved-e-weighted noise shaping dither
|
yading@10
|
8329 .RE
|
yading@10
|
8330 .RS 4
|
yading@10
|
8331 .RE
|
yading@10
|
8332 .IP "\fBresampler\fR" 4
|
yading@10
|
8333 .IX Item "resampler"
|
yading@10
|
8334 Set resampling engine. Default value is swr.
|
yading@10
|
8335 .Sp
|
yading@10
|
8336 Supported values:
|
yading@10
|
8337 .RS 4
|
yading@10
|
8338 .IP "\fBswr\fR" 4
|
yading@10
|
8339 .IX Item "swr"
|
yading@10
|
8340 select the native \s-1SW\s0 Resampler; filter options precision and cheby are not
|
yading@10
|
8341 applicable in this case.
|
yading@10
|
8342 .IP "\fBsoxr\fR" 4
|
yading@10
|
8343 .IX Item "soxr"
|
yading@10
|
8344 select the SoX Resampler (where available); compensation, and filter options
|
yading@10
|
8345 filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
|
yading@10
|
8346 case.
|
yading@10
|
8347 .RE
|
yading@10
|
8348 .RS 4
|
yading@10
|
8349 .RE
|
yading@10
|
8350 .IP "\fBfilter_size\fR" 4
|
yading@10
|
8351 .IX Item "filter_size"
|
yading@10
|
8352 For swr only, set resampling filter size, default value is 32.
|
yading@10
|
8353 .IP "\fBphase_shift\fR" 4
|
yading@10
|
8354 .IX Item "phase_shift"
|
yading@10
|
8355 For swr only, set resampling phase shift, default value is 10, and must be in
|
yading@10
|
8356 the interval [0,30].
|
yading@10
|
8357 .IP "\fBlinear_interp\fR" 4
|
yading@10
|
8358 .IX Item "linear_interp"
|
yading@10
|
8359 Use Linear Interpolation if set to 1, default value is 0.
|
yading@10
|
8360 .IP "\fBcutoff\fR" 4
|
yading@10
|
8361 .IX Item "cutoff"
|
yading@10
|
8362 Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
|
yading@10
|
8363 value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
|
yading@10
|
8364 (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
|
yading@10
|
8365 .IP "\fBprecision\fR" 4
|
yading@10
|
8366 .IX Item "precision"
|
yading@10
|
8367 For soxr only, the precision in bits to which the resampled signal will be
|
yading@10
|
8368 calculated. The default value of 20 (which, with suitable dithering, is
|
yading@10
|
8369 appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
|
yading@10
|
8370 value of 28 gives SoX's 'Very High Quality'.
|
yading@10
|
8371 .IP "\fBcheby\fR" 4
|
yading@10
|
8372 .IX Item "cheby"
|
yading@10
|
8373 For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
|
yading@10
|
8374 approximation for 'irrational' ratios. Default value is 0.
|
yading@10
|
8375 .IP "\fBasync\fR" 4
|
yading@10
|
8376 .IX Item "async"
|
yading@10
|
8377 For swr only, simple 1 parameter audio sync to timestamps using stretching,
|
yading@10
|
8378 squeezing, filling and trimming. Setting this to 1 will enable filling and
|
yading@10
|
8379 trimming, larger values represent the maximum amount in samples that the data
|
yading@10
|
8380 may be stretched or squeezed for each second.
|
yading@10
|
8381 Default value is 0, thus no compensation is applied to make the samples match
|
yading@10
|
8382 the audio timestamps.
|
yading@10
|
8383 .IP "\fBfirst_pts\fR" 4
|
yading@10
|
8384 .IX Item "first_pts"
|
yading@10
|
8385 For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
|
yading@10
|
8386 This allows for padding/trimming at the start of stream. By default, no
|
yading@10
|
8387 assumption is made about the first frame's expected pts, so no padding or
|
yading@10
|
8388 trimming is done. For example, this could be set to 0 to pad the beginning with
|
yading@10
|
8389 silence if an audio stream starts after the video stream or to trim any samples
|
yading@10
|
8390 with a negative pts due to encoder delay.
|
yading@10
|
8391 .IP "\fBmin_comp\fR" 4
|
yading@10
|
8392 .IX Item "min_comp"
|
yading@10
|
8393 For swr only, set the minimum difference between timestamps and audio data (in
|
yading@10
|
8394 seconds) to trigger stretching/squeezing/filling or trimming of the
|
yading@10
|
8395 data to make it match the timestamps. The default is that
|
yading@10
|
8396 stretching/squeezing/filling and trimming is disabled
|
yading@10
|
8397 (\fBmin_comp\fR = \f(CW\*(C`FLT_MAX\*(C'\fR).
|
yading@10
|
8398 .IP "\fBmin_hard_comp\fR" 4
|
yading@10
|
8399 .IX Item "min_hard_comp"
|
yading@10
|
8400 For swr only, set the minimum difference between timestamps and audio data (in
|
yading@10
|
8401 seconds) to trigger adding/dropping samples to make it match the
|
yading@10
|
8402 timestamps. This option effectively is a threshold to select between
|
yading@10
|
8403 hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
|
yading@10
|
8404 all compensation is by default disabled through \fBmin_comp\fR.
|
yading@10
|
8405 The default is 0.1.
|
yading@10
|
8406 .IP "\fBcomp_duration\fR" 4
|
yading@10
|
8407 .IX Item "comp_duration"
|
yading@10
|
8408 For swr only, set duration (in seconds) over which data is stretched/squeezed
|
yading@10
|
8409 to make it match the timestamps. Must be a non-negative double float value,
|
yading@10
|
8410 default value is 1.0.
|
yading@10
|
8411 .IP "\fBmax_soft_comp\fR" 4
|
yading@10
|
8412 .IX Item "max_soft_comp"
|
yading@10
|
8413 For swr only, set maximum factor by which data is stretched/squeezed to make it
|
yading@10
|
8414 match the timestamps. Must be a non-negative double float value, default value
|
yading@10
|
8415 is 0.
|
yading@10
|
8416 .IP "\fBmatrix_encoding\fR" 4
|
yading@10
|
8417 .IX Item "matrix_encoding"
|
yading@10
|
8418 Select matrixed stereo encoding.
|
yading@10
|
8419 .Sp
|
yading@10
|
8420 It accepts the following values:
|
yading@10
|
8421 .RS 4
|
yading@10
|
8422 .IP "\fBnone\fR" 4
|
yading@10
|
8423 .IX Item "none"
|
yading@10
|
8424 select none
|
yading@10
|
8425 .IP "\fBdolby\fR" 4
|
yading@10
|
8426 .IX Item "dolby"
|
yading@10
|
8427 select Dolby
|
yading@10
|
8428 .IP "\fBdplii\fR" 4
|
yading@10
|
8429 .IX Item "dplii"
|
yading@10
|
8430 select Dolby Pro Logic \s-1II\s0
|
yading@10
|
8431 .RE
|
yading@10
|
8432 .RS 4
|
yading@10
|
8433 .Sp
|
yading@10
|
8434 Default value is \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
8435 .RE
|
yading@10
|
8436 .IP "\fBfilter_type\fR" 4
|
yading@10
|
8437 .IX Item "filter_type"
|
yading@10
|
8438 For swr only, select resampling filter type. This only affects resampling
|
yading@10
|
8439 operations.
|
yading@10
|
8440 .Sp
|
yading@10
|
8441 It accepts the following values:
|
yading@10
|
8442 .RS 4
|
yading@10
|
8443 .IP "\fBcubic\fR" 4
|
yading@10
|
8444 .IX Item "cubic"
|
yading@10
|
8445 select cubic
|
yading@10
|
8446 .IP "\fBblackman_nuttall\fR" 4
|
yading@10
|
8447 .IX Item "blackman_nuttall"
|
yading@10
|
8448 select Blackman Nuttall Windowed Sinc
|
yading@10
|
8449 .IP "\fBkaiser\fR" 4
|
yading@10
|
8450 .IX Item "kaiser"
|
yading@10
|
8451 select Kaiser Windowed Sinc
|
yading@10
|
8452 .RE
|
yading@10
|
8453 .RS 4
|
yading@10
|
8454 .RE
|
yading@10
|
8455 .IP "\fBkaiser_beta\fR" 4
|
yading@10
|
8456 .IX Item "kaiser_beta"
|
yading@10
|
8457 For swr only, set Kaiser Window Beta value. Must be an integer in the
|
yading@10
|
8458 interval [2,16], default value is 9.
|
yading@10
|
8459 .SH "SCALER OPTIONS"
|
yading@10
|
8460 .IX Header "SCALER OPTIONS"
|
yading@10
|
8461 The video scaler supports the following named options.
|
yading@10
|
8462 .PP
|
yading@10
|
8463 Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the
|
yading@10
|
8464 FFmpeg tools. For programmatic use, they can be set explicitly in the
|
yading@10
|
8465 \&\f(CW\*(C`SwsContext\*(C'\fR options or through the \fIlibavutil/opt.h\fR \s-1API\s0.
|
yading@10
|
8466 .IP "\fBsws_flags\fR" 4
|
yading@10
|
8467 .IX Item "sws_flags"
|
yading@10
|
8468 Set the scaler flags. This is also used to set the scaling
|
yading@10
|
8469 algorithm. Only a single algorithm should be selected.
|
yading@10
|
8470 .Sp
|
yading@10
|
8471 It accepts the following values:
|
yading@10
|
8472 .RS 4
|
yading@10
|
8473 .IP "\fBfast_bilinear\fR" 4
|
yading@10
|
8474 .IX Item "fast_bilinear"
|
yading@10
|
8475 Select fast bilinear scaling algorithm.
|
yading@10
|
8476 .IP "\fBbilinear\fR" 4
|
yading@10
|
8477 .IX Item "bilinear"
|
yading@10
|
8478 Select bilinear scaling algorithm.
|
yading@10
|
8479 .IP "\fBbicubic\fR" 4
|
yading@10
|
8480 .IX Item "bicubic"
|
yading@10
|
8481 Select bicubic scaling algorithm.
|
yading@10
|
8482 .IP "\fBexperimental\fR" 4
|
yading@10
|
8483 .IX Item "experimental"
|
yading@10
|
8484 Select experimental scaling algorithm.
|
yading@10
|
8485 .IP "\fBneighbor\fR" 4
|
yading@10
|
8486 .IX Item "neighbor"
|
yading@10
|
8487 Select nearest neighbor rescaling algorithm.
|
yading@10
|
8488 .IP "\fBarea\fR" 4
|
yading@10
|
8489 .IX Item "area"
|
yading@10
|
8490 Select averaging area rescaling algorithm.
|
yading@10
|
8491 .IP "\fBbicubiclin\fR" 4
|
yading@10
|
8492 .IX Item "bicubiclin"
|
yading@10
|
8493 Select bicubic scaling algorithm for the luma component, bilinear for
|
yading@10
|
8494 chroma components.
|
yading@10
|
8495 .IP "\fBgauss\fR" 4
|
yading@10
|
8496 .IX Item "gauss"
|
yading@10
|
8497 Select Gaussian rescaling algorithm.
|
yading@10
|
8498 .IP "\fBsinc\fR" 4
|
yading@10
|
8499 .IX Item "sinc"
|
yading@10
|
8500 Select sinc rescaling algorithm.
|
yading@10
|
8501 .IP "\fBlanczos\fR" 4
|
yading@10
|
8502 .IX Item "lanczos"
|
yading@10
|
8503 Select lanczos rescaling algorithm.
|
yading@10
|
8504 .IP "\fBspline\fR" 4
|
yading@10
|
8505 .IX Item "spline"
|
yading@10
|
8506 Select natural bicubic spline rescaling algorithm.
|
yading@10
|
8507 .IP "\fBprint_info\fR" 4
|
yading@10
|
8508 .IX Item "print_info"
|
yading@10
|
8509 Enable printing/debug logging.
|
yading@10
|
8510 .IP "\fBaccurate_rnd\fR" 4
|
yading@10
|
8511 .IX Item "accurate_rnd"
|
yading@10
|
8512 Enable accurate rounding.
|
yading@10
|
8513 .IP "\fBfull_chroma_int\fR" 4
|
yading@10
|
8514 .IX Item "full_chroma_int"
|
yading@10
|
8515 Enable full chroma interpolation.
|
yading@10
|
8516 .IP "\fBfull_chroma_inp\fR" 4
|
yading@10
|
8517 .IX Item "full_chroma_inp"
|
yading@10
|
8518 Select full chroma input.
|
yading@10
|
8519 .IP "\fBbitexact\fR" 4
|
yading@10
|
8520 .IX Item "bitexact"
|
yading@10
|
8521 Enable bitexact output.
|
yading@10
|
8522 .RE
|
yading@10
|
8523 .RS 4
|
yading@10
|
8524 .RE
|
yading@10
|
8525 .IP "\fBsrcw\fR" 4
|
yading@10
|
8526 .IX Item "srcw"
|
yading@10
|
8527 Set source width.
|
yading@10
|
8528 .IP "\fBsrch\fR" 4
|
yading@10
|
8529 .IX Item "srch"
|
yading@10
|
8530 Set source height.
|
yading@10
|
8531 .IP "\fBdstw\fR" 4
|
yading@10
|
8532 .IX Item "dstw"
|
yading@10
|
8533 Set destination width.
|
yading@10
|
8534 .IP "\fBdsth\fR" 4
|
yading@10
|
8535 .IX Item "dsth"
|
yading@10
|
8536 Set destination height.
|
yading@10
|
8537 .IP "\fBsrc_format\fR" 4
|
yading@10
|
8538 .IX Item "src_format"
|
yading@10
|
8539 Set source pixel format (must be expressed as an integer).
|
yading@10
|
8540 .IP "\fBdst_format\fR" 4
|
yading@10
|
8541 .IX Item "dst_format"
|
yading@10
|
8542 Set destination pixel format (must be expressed as an integer).
|
yading@10
|
8543 .IP "\fBsrc_range\fR" 4
|
yading@10
|
8544 .IX Item "src_range"
|
yading@10
|
8545 Select source range.
|
yading@10
|
8546 .IP "\fBdst_range\fR" 4
|
yading@10
|
8547 .IX Item "dst_range"
|
yading@10
|
8548 Select destination range.
|
yading@10
|
8549 .IP "\fBparam0, param1\fR" 4
|
yading@10
|
8550 .IX Item "param0, param1"
|
yading@10
|
8551 Set scaling algorithm parameters. The specified values are specific of
|
yading@10
|
8552 some scaling algorithms and ignored by others. The specified values
|
yading@10
|
8553 are floating point number values.
|
yading@10
|
8554 .SH "FILTERING INTRODUCTION"
|
yading@10
|
8555 .IX Header "FILTERING INTRODUCTION"
|
yading@10
|
8556 Filtering in FFmpeg is enabled through the libavfilter library.
|
yading@10
|
8557 .PP
|
yading@10
|
8558 In libavfilter, a filter can have multiple inputs and multiple
|
yading@10
|
8559 outputs.
|
yading@10
|
8560 To illustrate the sorts of things that are possible, we consider the
|
yading@10
|
8561 following filtergraph.
|
yading@10
|
8562 .PP
|
yading@10
|
8563 .Vb 4
|
yading@10
|
8564 \& input \-\-> split \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> overlay \-\-> output
|
yading@10
|
8565 \& | ^
|
yading@10
|
8566 \& | |
|
yading@10
|
8567 \& +\-\-\-\-\-> crop \-\-> vflip \-\-\-\-\-\-\-+
|
yading@10
|
8568 .Ve
|
yading@10
|
8569 .PP
|
yading@10
|
8570 This filtergraph splits the input stream in two streams, sends one
|
yading@10
|
8571 stream through the crop filter and the vflip filter before merging it
|
yading@10
|
8572 back with the other stream by overlaying it on top. You can use the
|
yading@10
|
8573 following command to achieve this:
|
yading@10
|
8574 .PP
|
yading@10
|
8575 .Vb 1
|
yading@10
|
8576 \& ffmpeg \-i INPUT \-vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" OUTPUT
|
yading@10
|
8577 .Ve
|
yading@10
|
8578 .PP
|
yading@10
|
8579 The result will be that in output the top half of the video is mirrored
|
yading@10
|
8580 onto the bottom half.
|
yading@10
|
8581 .PP
|
yading@10
|
8582 Filters in the same linear chain are separated by commas, and distinct
|
yading@10
|
8583 linear chains of filters are separated by semicolons. In our example,
|
yading@10
|
8584 \&\fIcrop,vflip\fR are in one linear chain, \fIsplit\fR and
|
yading@10
|
8585 \&\fIoverlay\fR are separately in another. The points where the linear
|
yading@10
|
8586 chains join are labelled by names enclosed in square brackets. In the
|
yading@10
|
8587 example, the split filter generates two outputs that are associated to
|
yading@10
|
8588 the labels \fI[main]\fR and \fI[tmp]\fR.
|
yading@10
|
8589 .PP
|
yading@10
|
8590 The stream sent to the second output of \fIsplit\fR, labelled as
|
yading@10
|
8591 \&\fI[tmp]\fR, is processed through the \fIcrop\fR filter, which crops
|
yading@10
|
8592 away the lower half part of the video, and then vertically flipped. The
|
yading@10
|
8593 \&\fIoverlay\fR filter takes in input the first unchanged output of the
|
yading@10
|
8594 split filter (which was labelled as \fI[main]\fR), and overlay on its
|
yading@10
|
8595 lower half the output generated by the \fIcrop,vflip\fR filterchain.
|
yading@10
|
8596 .PP
|
yading@10
|
8597 Some filters take in input a list of parameters: they are specified
|
yading@10
|
8598 after the filter name and an equal sign, and are separated from each other
|
yading@10
|
8599 by a colon.
|
yading@10
|
8600 .PP
|
yading@10
|
8601 There exist so-called \fIsource filters\fR that do not have an
|
yading@10
|
8602 audio/video input, and \fIsink filters\fR that will not have audio/video
|
yading@10
|
8603 output.
|
yading@10
|
8604 .SH "GRAPH"
|
yading@10
|
8605 .IX Header "GRAPH"
|
yading@10
|
8606 The \fIgraph2dot\fR program included in the FFmpeg \fItools\fR
|
yading@10
|
8607 directory can be used to parse a filtergraph description and issue a
|
yading@10
|
8608 corresponding textual representation in the dot language.
|
yading@10
|
8609 .PP
|
yading@10
|
8610 Invoke the command:
|
yading@10
|
8611 .PP
|
yading@10
|
8612 .Vb 1
|
yading@10
|
8613 \& graph2dot \-h
|
yading@10
|
8614 .Ve
|
yading@10
|
8615 .PP
|
yading@10
|
8616 to see how to use \fIgraph2dot\fR.
|
yading@10
|
8617 .PP
|
yading@10
|
8618 You can then pass the dot description to the \fIdot\fR program (from
|
yading@10
|
8619 the graphviz suite of programs) and obtain a graphical representation
|
yading@10
|
8620 of the filtergraph.
|
yading@10
|
8621 .PP
|
yading@10
|
8622 For example the sequence of commands:
|
yading@10
|
8623 .PP
|
yading@10
|
8624 .Vb 4
|
yading@10
|
8625 \& echo <GRAPH_DESCRIPTION> | \e
|
yading@10
|
8626 \& tools/graph2dot \-o graph.tmp && \e
|
yading@10
|
8627 \& dot \-Tpng graph.tmp \-o graph.png && \e
|
yading@10
|
8628 \& display graph.png
|
yading@10
|
8629 .Ve
|
yading@10
|
8630 .PP
|
yading@10
|
8631 can be used to create and display an image representing the graph
|
yading@10
|
8632 described by the \fI\s-1GRAPH_DESCRIPTION\s0\fR string. Note that this string must be
|
yading@10
|
8633 a complete self-contained graph, with its inputs and outputs explicitly defined.
|
yading@10
|
8634 For example if your command line is of the form:
|
yading@10
|
8635 .PP
|
yading@10
|
8636 .Vb 1
|
yading@10
|
8637 \& ffmpeg \-i infile \-vf scale=640:360 outfile
|
yading@10
|
8638 .Ve
|
yading@10
|
8639 .PP
|
yading@10
|
8640 your \fI\s-1GRAPH_DESCRIPTION\s0\fR string will need to be of the form:
|
yading@10
|
8641 .PP
|
yading@10
|
8642 .Vb 1
|
yading@10
|
8643 \& nullsrc,scale=640:360,nullsink
|
yading@10
|
8644 .Ve
|
yading@10
|
8645 .PP
|
yading@10
|
8646 you may also need to set the \fInullsrc\fR parameters and add a \fIformat\fR
|
yading@10
|
8647 filter in order to simulate a specific input file.
|
yading@10
|
8648 .SH "FILTERGRAPH DESCRIPTION"
|
yading@10
|
8649 .IX Header "FILTERGRAPH DESCRIPTION"
|
yading@10
|
8650 A filtergraph is a directed graph of connected filters. It can contain
|
yading@10
|
8651 cycles, and there can be multiple links between a pair of
|
yading@10
|
8652 filters. Each link has one input pad on one side connecting it to one
|
yading@10
|
8653 filter from which it takes its input, and one output pad on the other
|
yading@10
|
8654 side connecting it to the one filter accepting its output.
|
yading@10
|
8655 .PP
|
yading@10
|
8656 Each filter in a filtergraph is an instance of a filter class
|
yading@10
|
8657 registered in the application, which defines the features and the
|
yading@10
|
8658 number of input and output pads of the filter.
|
yading@10
|
8659 .PP
|
yading@10
|
8660 A filter with no input pads is called a \*(L"source\*(R", a filter with no
|
yading@10
|
8661 output pads is called a \*(L"sink\*(R".
|
yading@10
|
8662 .SS "Filtergraph syntax"
|
yading@10
|
8663 .IX Subsection "Filtergraph syntax"
|
yading@10
|
8664 A filtergraph can be represented using a textual representation, which is
|
yading@10
|
8665 recognized by the \fB\-filter\fR/\fB\-vf\fR and \fB\-filter_complex\fR
|
yading@10
|
8666 options in \fBffmpeg\fR and \fB\-vf\fR in \fBffplay\fR, and by the
|
yading@10
|
8667 \&\f(CW\*(C`avfilter_graph_parse()\*(C'\fR/\f(CW\*(C`avfilter_graph_parse2()\*(C'\fR function defined in
|
yading@10
|
8668 \&\fIlibavfilter/avfilter.h\fR.
|
yading@10
|
8669 .PP
|
yading@10
|
8670 A filterchain consists of a sequence of connected filters, each one
|
yading@10
|
8671 connected to the previous one in the sequence. A filterchain is
|
yading@10
|
8672 represented by a list of \*(L",\*(R"\-separated filter descriptions.
|
yading@10
|
8673 .PP
|
yading@10
|
8674 A filtergraph consists of a sequence of filterchains. A sequence of
|
yading@10
|
8675 filterchains is represented by a list of \*(L";\*(R"\-separated filterchain
|
yading@10
|
8676 descriptions.
|
yading@10
|
8677 .PP
|
yading@10
|
8678 A filter is represented by a string of the form:
|
yading@10
|
8679 [\fIin_link_1\fR]...[\fIin_link_N\fR]\fIfilter_name\fR=\fIarguments\fR[\fIout_link_1\fR]...[\fIout_link_M\fR]
|
yading@10
|
8680 .PP
|
yading@10
|
8681 \&\fIfilter_name\fR is the name of the filter class of which the
|
yading@10
|
8682 described filter is an instance of, and has to be the name of one of
|
yading@10
|
8683 the filter classes registered in the program.
|
yading@10
|
8684 The name of the filter class is optionally followed by a string
|
yading@10
|
8685 "=\fIarguments\fR".
|
yading@10
|
8686 .PP
|
yading@10
|
8687 \&\fIarguments\fR is a string which contains the parameters used to
|
yading@10
|
8688 initialize the filter instance. It may have one of the following forms:
|
yading@10
|
8689 .IP "\(bu" 4
|
yading@10
|
8690 A ':'\-separated list of \fIkey=value\fR pairs.
|
yading@10
|
8691 .IP "\(bu" 4
|
yading@10
|
8692 A ':'\-separated list of \fIvalue\fR. In this case, the keys are assumed to be
|
yading@10
|
8693 the option names in the order they are declared. E.g. the \f(CW\*(C`fade\*(C'\fR filter
|
yading@10
|
8694 declares three options in this order \*(-- \fBtype\fR, \fBstart_frame\fR and
|
yading@10
|
8695 \&\fBnb_frames\fR. Then the parameter list \fIin:0:30\fR means that the value
|
yading@10
|
8696 \&\fIin\fR is assigned to the option \fBtype\fR, \fI0\fR to
|
yading@10
|
8697 \&\fBstart_frame\fR and \fI30\fR to \fBnb_frames\fR.
|
yading@10
|
8698 .IP "\(bu" 4
|
yading@10
|
8699 A ':'\-separated list of mixed direct \fIvalue\fR and long \fIkey=value\fR
|
yading@10
|
8700 pairs. The direct \fIvalue\fR must precede the \fIkey=value\fR pairs, and
|
yading@10
|
8701 follow the same constraints order of the previous point. The following
|
yading@10
|
8702 \&\fIkey=value\fR pairs can be set in any preferred order.
|
yading@10
|
8703 .PP
|
yading@10
|
8704 If the option value itself is a list of items (e.g. the \f(CW\*(C`format\*(C'\fR filter
|
yading@10
|
8705 takes a list of pixel formats), the items in the list are usually separated by
|
yading@10
|
8706 \&'|'.
|
yading@10
|
8707 .PP
|
yading@10
|
8708 The list of arguments can be quoted using the character \*(L"'\*(R" as initial
|
yading@10
|
8709 and ending mark, and the character '\e' for escaping the characters
|
yading@10
|
8710 within the quoted text; otherwise the argument string is considered
|
yading@10
|
8711 terminated when the next special character (belonging to the set
|
yading@10
|
8712 \&\*(L"[]=;,\*(R") is encountered.
|
yading@10
|
8713 .PP
|
yading@10
|
8714 The name and arguments of the filter are optionally preceded and
|
yading@10
|
8715 followed by a list of link labels.
|
yading@10
|
8716 A link label allows to name a link and associate it to a filter output
|
yading@10
|
8717 or input pad. The preceding labels \fIin_link_1\fR
|
yading@10
|
8718 \&... \fIin_link_N\fR, are associated to the filter input pads,
|
yading@10
|
8719 the following labels \fIout_link_1\fR ... \fIout_link_M\fR, are
|
yading@10
|
8720 associated to the output pads.
|
yading@10
|
8721 .PP
|
yading@10
|
8722 When two link labels with the same name are found in the
|
yading@10
|
8723 filtergraph, a link between the corresponding input and output pad is
|
yading@10
|
8724 created.
|
yading@10
|
8725 .PP
|
yading@10
|
8726 If an output pad is not labelled, it is linked by default to the first
|
yading@10
|
8727 unlabelled input pad of the next filter in the filterchain.
|
yading@10
|
8728 For example in the filterchain:
|
yading@10
|
8729 .PP
|
yading@10
|
8730 .Vb 1
|
yading@10
|
8731 \& nullsrc, split[L1], [L2]overlay, nullsink
|
yading@10
|
8732 .Ve
|
yading@10
|
8733 .PP
|
yading@10
|
8734 the split filter instance has two output pads, and the overlay filter
|
yading@10
|
8735 instance two input pads. The first output pad of split is labelled
|
yading@10
|
8736 \&\*(L"L1\*(R", the first input pad of overlay is labelled \*(L"L2\*(R", and the second
|
yading@10
|
8737 output pad of split is linked to the second input pad of overlay,
|
yading@10
|
8738 which are both unlabelled.
|
yading@10
|
8739 .PP
|
yading@10
|
8740 In a complete filterchain all the unlabelled filter input and output
|
yading@10
|
8741 pads must be connected. A filtergraph is considered valid if all the
|
yading@10
|
8742 filter input and output pads of all the filterchains are connected.
|
yading@10
|
8743 .PP
|
yading@10
|
8744 Libavfilter will automatically insert scale filters where format
|
yading@10
|
8745 conversion is required. It is possible to specify swscale flags
|
yading@10
|
8746 for those automatically inserted scalers by prepending
|
yading@10
|
8747 \&\f(CW\*(C`sws_flags=\f(CIflags\f(CW;\*(C'\fR
|
yading@10
|
8748 to the filtergraph description.
|
yading@10
|
8749 .PP
|
yading@10
|
8750 Follows a \s-1BNF\s0 description for the filtergraph syntax:
|
yading@10
|
8751 .PP
|
yading@10
|
8752 .Vb 7
|
yading@10
|
8753 \& <NAME> ::= sequence of alphanumeric characters and \*(Aq_\*(Aq
|
yading@10
|
8754 \& <LINKLABEL> ::= "[" <NAME> "]"
|
yading@10
|
8755 \& <LINKLABELS> ::= <LINKLABEL> [<LINKLABELS>]
|
yading@10
|
8756 \& <FILTER_ARGUMENTS> ::= sequence of chars (eventually quoted)
|
yading@10
|
8757 \& <FILTER> ::= [<LINKLABELS>] <NAME> ["=" <FILTER_ARGUMENTS>] [<LINKLABELS>]
|
yading@10
|
8758 \& <FILTERCHAIN> ::= <FILTER> [,<FILTERCHAIN>]
|
yading@10
|
8759 \& <FILTERGRAPH> ::= [sws_flags=<flags>;] <FILTERCHAIN> [;<FILTERGRAPH>]
|
yading@10
|
8760 .Ve
|
yading@10
|
8761 .SS "Notes on filtergraph escaping"
|
yading@10
|
8762 .IX Subsection "Notes on filtergraph escaping"
|
yading@10
|
8763 Some filter arguments require the use of special characters, typically
|
yading@10
|
8764 \&\f(CW\*(C`:\*(C'\fR to separate key=value pairs in a named options list. In this
|
yading@10
|
8765 case the user should perform a first level escaping when specifying
|
yading@10
|
8766 the filter arguments. For example, consider the following literal
|
yading@10
|
8767 string to be embedded in the drawtext filter arguments:
|
yading@10
|
8768 .PP
|
yading@10
|
8769 .Vb 1
|
yading@10
|
8770 \& this is a \*(Aqstring\*(Aq: may contain one, or more, special characters
|
yading@10
|
8771 .Ve
|
yading@10
|
8772 .PP
|
yading@10
|
8773 Since \f(CW\*(C`:\*(C'\fR is special for the filter arguments syntax, it needs to
|
yading@10
|
8774 be escaped, so you get:
|
yading@10
|
8775 .PP
|
yading@10
|
8776 .Vb 1
|
yading@10
|
8777 \& text=this is a \e\*(Aqstring\e\*(Aq\e: may contain one, or more, special characters
|
yading@10
|
8778 .Ve
|
yading@10
|
8779 .PP
|
yading@10
|
8780 A second level of escaping is required when embedding the filter
|
yading@10
|
8781 arguments in a filtergraph description, in order to escape all the
|
yading@10
|
8782 filtergraph special characters. Thus the example above becomes:
|
yading@10
|
8783 .PP
|
yading@10
|
8784 .Vb 1
|
yading@10
|
8785 \& drawtext=text=this is a \e\e\e\*(Aqstring\e\e\e\*(Aq\e\e: may contain one\e, or more\e, special characters
|
yading@10
|
8786 .Ve
|
yading@10
|
8787 .PP
|
yading@10
|
8788 Finally an additional level of escaping may be needed when writing the
|
yading@10
|
8789 filtergraph description in a shell command, which depends on the
|
yading@10
|
8790 escaping rules of the adopted shell. For example, assuming that
|
yading@10
|
8791 \&\f(CW\*(C`\e\*(C'\fR is special and needs to be escaped with another \f(CW\*(C`\e\*(C'\fR, the
|
yading@10
|
8792 previous string will finally result in:
|
yading@10
|
8793 .PP
|
yading@10
|
8794 .Vb 1
|
yading@10
|
8795 \& \-vf "drawtext=text=this is a \e\e\e\e\e\e\*(Aqstring\e\e\e\e\e\e\*(Aq\e\e\e\e: may contain one\e\e, or more\e\e, special characters"
|
yading@10
|
8796 .Ve
|
yading@10
|
8797 .PP
|
yading@10
|
8798 Sometimes, it might be more convenient to employ quoting in place of
|
yading@10
|
8799 escaping. For example the string:
|
yading@10
|
8800 .PP
|
yading@10
|
8801 .Vb 1
|
yading@10
|
8802 \& Caesar: tu quoque, Brute, fili mi
|
yading@10
|
8803 .Ve
|
yading@10
|
8804 .PP
|
yading@10
|
8805 Can be quoted in the filter arguments as:
|
yading@10
|
8806 .PP
|
yading@10
|
8807 .Vb 1
|
yading@10
|
8808 \& text=\*(AqCaesar: tu quoque, Brute, fili mi\*(Aq
|
yading@10
|
8809 .Ve
|
yading@10
|
8810 .PP
|
yading@10
|
8811 And finally inserted in a filtergraph like:
|
yading@10
|
8812 .PP
|
yading@10
|
8813 .Vb 1
|
yading@10
|
8814 \& drawtext=text=\e\*(AqCaesar: tu quoque\e, Brute\e, fili mi\e\*(Aq
|
yading@10
|
8815 .Ve
|
yading@10
|
8816 .PP
|
yading@10
|
8817 See the ``Quoting and escaping'' section in the ffmpeg-utils manual
|
yading@10
|
8818 for more information about the escaping and quoting rules adopted by
|
yading@10
|
8819 FFmpeg.
|
yading@10
|
8820 .SH "AUDIO FILTERS"
|
yading@10
|
8821 .IX Header "AUDIO FILTERS"
|
yading@10
|
8822 When you configure your FFmpeg build, you can disable any of the
|
yading@10
|
8823 existing filters using \f(CW\*(C`\-\-disable\-filters\*(C'\fR.
|
yading@10
|
8824 The configure output will show the audio filters included in your
|
yading@10
|
8825 build.
|
yading@10
|
8826 .PP
|
yading@10
|
8827 Below is a description of the currently available audio filters.
|
yading@10
|
8828 .SS "aconvert"
|
yading@10
|
8829 .IX Subsection "aconvert"
|
yading@10
|
8830 Convert the input audio format to the specified formats.
|
yading@10
|
8831 .PP
|
yading@10
|
8832 \&\fIThis filter is deprecated. Use aformat\fR instead.
|
yading@10
|
8833 .PP
|
yading@10
|
8834 The filter accepts a string of the form:
|
yading@10
|
8835 "\fIsample_format\fR:\fIchannel_layout\fR".
|
yading@10
|
8836 .PP
|
yading@10
|
8837 \&\fIsample_format\fR specifies the sample format, and can be a string or the
|
yading@10
|
8838 corresponding numeric value defined in \fIlibavutil/samplefmt.h\fR. Use 'p'
|
yading@10
|
8839 suffix for a planar sample format.
|
yading@10
|
8840 .PP
|
yading@10
|
8841 \&\fIchannel_layout\fR specifies the channel layout, and can be a string
|
yading@10
|
8842 or the corresponding number value defined in \fIlibavutil/channel_layout.h\fR.
|
yading@10
|
8843 .PP
|
yading@10
|
8844 The special parameter \*(L"auto\*(R", signifies that the filter will
|
yading@10
|
8845 automatically select the output format depending on the output filter.
|
yading@10
|
8846 .PP
|
yading@10
|
8847 \fIExamples\fR
|
yading@10
|
8848 .IX Subsection "Examples"
|
yading@10
|
8849 .IP "\(bu" 4
|
yading@10
|
8850 Convert input to float, planar, stereo:
|
yading@10
|
8851 .Sp
|
yading@10
|
8852 .Vb 1
|
yading@10
|
8853 \& aconvert=fltp:stereo
|
yading@10
|
8854 .Ve
|
yading@10
|
8855 .IP "\(bu" 4
|
yading@10
|
8856 Convert input to unsigned 8\-bit, automatically select out channel layout:
|
yading@10
|
8857 .Sp
|
yading@10
|
8858 .Vb 1
|
yading@10
|
8859 \& aconvert=u8:auto
|
yading@10
|
8860 .Ve
|
yading@10
|
8861 .SS "allpass"
|
yading@10
|
8862 .IX Subsection "allpass"
|
yading@10
|
8863 Apply a two-pole all-pass filter with central frequency (in Hz)
|
yading@10
|
8864 \&\fIfrequency\fR, and filter-width \fIwidth\fR.
|
yading@10
|
8865 An all-pass filter changes the audio's frequency to phase relationship
|
yading@10
|
8866 without changing its frequency to amplitude relationship.
|
yading@10
|
8867 .PP
|
yading@10
|
8868 The filter accepts the following options:
|
yading@10
|
8869 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
8870 .IX Item "frequency, f"
|
yading@10
|
8871 Set frequency in Hz.
|
yading@10
|
8872 .IP "\fBwidth_type\fR" 4
|
yading@10
|
8873 .IX Item "width_type"
|
yading@10
|
8874 Set method to specify band-width of filter.
|
yading@10
|
8875 .RS 4
|
yading@10
|
8876 .IP "\fBh\fR" 4
|
yading@10
|
8877 .IX Item "h"
|
yading@10
|
8878 Hz
|
yading@10
|
8879 .IP "\fBq\fR" 4
|
yading@10
|
8880 .IX Item "q"
|
yading@10
|
8881 Q\-Factor
|
yading@10
|
8882 .IP "\fBo\fR" 4
|
yading@10
|
8883 .IX Item "o"
|
yading@10
|
8884 octave
|
yading@10
|
8885 .IP "\fBs\fR" 4
|
yading@10
|
8886 .IX Item "s"
|
yading@10
|
8887 slope
|
yading@10
|
8888 .RE
|
yading@10
|
8889 .RS 4
|
yading@10
|
8890 .RE
|
yading@10
|
8891 .IP "\fBwidth, w\fR" 4
|
yading@10
|
8892 .IX Item "width, w"
|
yading@10
|
8893 Specify the band-width of a filter in width_type units.
|
yading@10
|
8894 .SS "highpass"
|
yading@10
|
8895 .IX Subsection "highpass"
|
yading@10
|
8896 Apply a high-pass filter with 3dB point frequency.
|
yading@10
|
8897 The filter can be either single-pole, or double-pole (the default).
|
yading@10
|
8898 The filter roll off at 6dB per pole per octave (20dB per pole per decade).
|
yading@10
|
8899 .PP
|
yading@10
|
8900 The filter accepts the following options:
|
yading@10
|
8901 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
8902 .IX Item "frequency, f"
|
yading@10
|
8903 Set frequency in Hz. Default is 3000.
|
yading@10
|
8904 .IP "\fBpoles, p\fR" 4
|
yading@10
|
8905 .IX Item "poles, p"
|
yading@10
|
8906 Set number of poles. Default is 2.
|
yading@10
|
8907 .IP "\fBwidth_type\fR" 4
|
yading@10
|
8908 .IX Item "width_type"
|
yading@10
|
8909 Set method to specify band-width of filter.
|
yading@10
|
8910 .RS 4
|
yading@10
|
8911 .IP "\fBh\fR" 4
|
yading@10
|
8912 .IX Item "h"
|
yading@10
|
8913 Hz
|
yading@10
|
8914 .IP "\fBq\fR" 4
|
yading@10
|
8915 .IX Item "q"
|
yading@10
|
8916 Q\-Factor
|
yading@10
|
8917 .IP "\fBo\fR" 4
|
yading@10
|
8918 .IX Item "o"
|
yading@10
|
8919 octave
|
yading@10
|
8920 .IP "\fBs\fR" 4
|
yading@10
|
8921 .IX Item "s"
|
yading@10
|
8922 slope
|
yading@10
|
8923 .RE
|
yading@10
|
8924 .RS 4
|
yading@10
|
8925 .RE
|
yading@10
|
8926 .IP "\fBwidth, w\fR" 4
|
yading@10
|
8927 .IX Item "width, w"
|
yading@10
|
8928 Specify the band-width of a filter in width_type units.
|
yading@10
|
8929 Applies only to double-pole filter.
|
yading@10
|
8930 The default is 0.707q and gives a Butterworth response.
|
yading@10
|
8931 .SS "lowpass"
|
yading@10
|
8932 .IX Subsection "lowpass"
|
yading@10
|
8933 Apply a low-pass filter with 3dB point frequency.
|
yading@10
|
8934 The filter can be either single-pole or double-pole (the default).
|
yading@10
|
8935 The filter roll off at 6dB per pole per octave (20dB per pole per decade).
|
yading@10
|
8936 .PP
|
yading@10
|
8937 The filter accepts the following options:
|
yading@10
|
8938 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
8939 .IX Item "frequency, f"
|
yading@10
|
8940 Set frequency in Hz. Default is 500.
|
yading@10
|
8941 .IP "\fBpoles, p\fR" 4
|
yading@10
|
8942 .IX Item "poles, p"
|
yading@10
|
8943 Set number of poles. Default is 2.
|
yading@10
|
8944 .IP "\fBwidth_type\fR" 4
|
yading@10
|
8945 .IX Item "width_type"
|
yading@10
|
8946 Set method to specify band-width of filter.
|
yading@10
|
8947 .RS 4
|
yading@10
|
8948 .IP "\fBh\fR" 4
|
yading@10
|
8949 .IX Item "h"
|
yading@10
|
8950 Hz
|
yading@10
|
8951 .IP "\fBq\fR" 4
|
yading@10
|
8952 .IX Item "q"
|
yading@10
|
8953 Q\-Factor
|
yading@10
|
8954 .IP "\fBo\fR" 4
|
yading@10
|
8955 .IX Item "o"
|
yading@10
|
8956 octave
|
yading@10
|
8957 .IP "\fBs\fR" 4
|
yading@10
|
8958 .IX Item "s"
|
yading@10
|
8959 slope
|
yading@10
|
8960 .RE
|
yading@10
|
8961 .RS 4
|
yading@10
|
8962 .RE
|
yading@10
|
8963 .IP "\fBwidth, w\fR" 4
|
yading@10
|
8964 .IX Item "width, w"
|
yading@10
|
8965 Specify the band-width of a filter in width_type units.
|
yading@10
|
8966 Applies only to double-pole filter.
|
yading@10
|
8967 The default is 0.707q and gives a Butterworth response.
|
yading@10
|
8968 .SS "bass"
|
yading@10
|
8969 .IX Subsection "bass"
|
yading@10
|
8970 Boost or cut the bass (lower) frequencies of the audio using a two-pole
|
yading@10
|
8971 shelving filter with a response similar to that of a standard
|
yading@10
|
8972 hi-fi's tone-controls. This is also known as shelving equalisation (\s-1EQ\s0).
|
yading@10
|
8973 .PP
|
yading@10
|
8974 The filter accepts the following options:
|
yading@10
|
8975 .IP "\fBgain, g\fR" 4
|
yading@10
|
8976 .IX Item "gain, g"
|
yading@10
|
8977 Give the gain at 0 Hz. Its useful range is about \-20
|
yading@10
|
8978 (for a large cut) to +20 (for a large boost).
|
yading@10
|
8979 Beware of clipping when using a positive gain.
|
yading@10
|
8980 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
8981 .IX Item "frequency, f"
|
yading@10
|
8982 Set the filter's central frequency and so can be used
|
yading@10
|
8983 to extend or reduce the frequency range to be boosted or cut.
|
yading@10
|
8984 The default value is \f(CW100\fR Hz.
|
yading@10
|
8985 .IP "\fBwidth_type\fR" 4
|
yading@10
|
8986 .IX Item "width_type"
|
yading@10
|
8987 Set method to specify band-width of filter.
|
yading@10
|
8988 .RS 4
|
yading@10
|
8989 .IP "\fBh\fR" 4
|
yading@10
|
8990 .IX Item "h"
|
yading@10
|
8991 Hz
|
yading@10
|
8992 .IP "\fBq\fR" 4
|
yading@10
|
8993 .IX Item "q"
|
yading@10
|
8994 Q\-Factor
|
yading@10
|
8995 .IP "\fBo\fR" 4
|
yading@10
|
8996 .IX Item "o"
|
yading@10
|
8997 octave
|
yading@10
|
8998 .IP "\fBs\fR" 4
|
yading@10
|
8999 .IX Item "s"
|
yading@10
|
9000 slope
|
yading@10
|
9001 .RE
|
yading@10
|
9002 .RS 4
|
yading@10
|
9003 .RE
|
yading@10
|
9004 .IP "\fBwidth, w\fR" 4
|
yading@10
|
9005 .IX Item "width, w"
|
yading@10
|
9006 Determine how steep is the filter's shelf transition.
|
yading@10
|
9007 .SS "treble"
|
yading@10
|
9008 .IX Subsection "treble"
|
yading@10
|
9009 Boost or cut treble (upper) frequencies of the audio using a two-pole
|
yading@10
|
9010 shelving filter with a response similar to that of a standard
|
yading@10
|
9011 hi-fi's tone-controls. This is also known as shelving equalisation (\s-1EQ\s0).
|
yading@10
|
9012 .PP
|
yading@10
|
9013 The filter accepts the following options:
|
yading@10
|
9014 .IP "\fBgain, g\fR" 4
|
yading@10
|
9015 .IX Item "gain, g"
|
yading@10
|
9016 Give the gain at whichever is the lower of ~22 kHz and the
|
yading@10
|
9017 Nyquist frequency. Its useful range is about \-20 (for a large cut)
|
yading@10
|
9018 to +20 (for a large boost). Beware of clipping when using a positive gain.
|
yading@10
|
9019 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
9020 .IX Item "frequency, f"
|
yading@10
|
9021 Set the filter's central frequency and so can be used
|
yading@10
|
9022 to extend or reduce the frequency range to be boosted or cut.
|
yading@10
|
9023 The default value is \f(CW3000\fR Hz.
|
yading@10
|
9024 .IP "\fBwidth_type\fR" 4
|
yading@10
|
9025 .IX Item "width_type"
|
yading@10
|
9026 Set method to specify band-width of filter.
|
yading@10
|
9027 .RS 4
|
yading@10
|
9028 .IP "\fBh\fR" 4
|
yading@10
|
9029 .IX Item "h"
|
yading@10
|
9030 Hz
|
yading@10
|
9031 .IP "\fBq\fR" 4
|
yading@10
|
9032 .IX Item "q"
|
yading@10
|
9033 Q\-Factor
|
yading@10
|
9034 .IP "\fBo\fR" 4
|
yading@10
|
9035 .IX Item "o"
|
yading@10
|
9036 octave
|
yading@10
|
9037 .IP "\fBs\fR" 4
|
yading@10
|
9038 .IX Item "s"
|
yading@10
|
9039 slope
|
yading@10
|
9040 .RE
|
yading@10
|
9041 .RS 4
|
yading@10
|
9042 .RE
|
yading@10
|
9043 .IP "\fBwidth, w\fR" 4
|
yading@10
|
9044 .IX Item "width, w"
|
yading@10
|
9045 Determine how steep is the filter's shelf transition.
|
yading@10
|
9046 .SS "bandpass"
|
yading@10
|
9047 .IX Subsection "bandpass"
|
yading@10
|
9048 Apply a two-pole Butterworth band-pass filter with central
|
yading@10
|
9049 frequency \fIfrequency\fR, and (3dB\-point) band-width width.
|
yading@10
|
9050 The \fIcsg\fR option selects a constant skirt gain (peak gain = Q)
|
yading@10
|
9051 instead of the default: constant 0dB peak gain.
|
yading@10
|
9052 The filter roll off at 6dB per octave (20dB per decade).
|
yading@10
|
9053 .PP
|
yading@10
|
9054 The filter accepts the following options:
|
yading@10
|
9055 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
9056 .IX Item "frequency, f"
|
yading@10
|
9057 Set the filter's central frequency. Default is \f(CW3000\fR.
|
yading@10
|
9058 .IP "\fBcsg\fR" 4
|
yading@10
|
9059 .IX Item "csg"
|
yading@10
|
9060 Constant skirt gain if set to 1. Defaults to 0.
|
yading@10
|
9061 .IP "\fBwidth_type\fR" 4
|
yading@10
|
9062 .IX Item "width_type"
|
yading@10
|
9063 Set method to specify band-width of filter.
|
yading@10
|
9064 .RS 4
|
yading@10
|
9065 .IP "\fBh\fR" 4
|
yading@10
|
9066 .IX Item "h"
|
yading@10
|
9067 Hz
|
yading@10
|
9068 .IP "\fBq\fR" 4
|
yading@10
|
9069 .IX Item "q"
|
yading@10
|
9070 Q\-Factor
|
yading@10
|
9071 .IP "\fBo\fR" 4
|
yading@10
|
9072 .IX Item "o"
|
yading@10
|
9073 octave
|
yading@10
|
9074 .IP "\fBs\fR" 4
|
yading@10
|
9075 .IX Item "s"
|
yading@10
|
9076 slope
|
yading@10
|
9077 .RE
|
yading@10
|
9078 .RS 4
|
yading@10
|
9079 .RE
|
yading@10
|
9080 .IP "\fBwidth, w\fR" 4
|
yading@10
|
9081 .IX Item "width, w"
|
yading@10
|
9082 Specify the band-width of a filter in width_type units.
|
yading@10
|
9083 .SS "bandreject"
|
yading@10
|
9084 .IX Subsection "bandreject"
|
yading@10
|
9085 Apply a two-pole Butterworth band-reject filter with central
|
yading@10
|
9086 frequency \fIfrequency\fR, and (3dB\-point) band-width \fIwidth\fR.
|
yading@10
|
9087 The filter roll off at 6dB per octave (20dB per decade).
|
yading@10
|
9088 .PP
|
yading@10
|
9089 The filter accepts the following options:
|
yading@10
|
9090 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
9091 .IX Item "frequency, f"
|
yading@10
|
9092 Set the filter's central frequency. Default is \f(CW3000\fR.
|
yading@10
|
9093 .IP "\fBwidth_type\fR" 4
|
yading@10
|
9094 .IX Item "width_type"
|
yading@10
|
9095 Set method to specify band-width of filter.
|
yading@10
|
9096 .RS 4
|
yading@10
|
9097 .IP "\fBh\fR" 4
|
yading@10
|
9098 .IX Item "h"
|
yading@10
|
9099 Hz
|
yading@10
|
9100 .IP "\fBq\fR" 4
|
yading@10
|
9101 .IX Item "q"
|
yading@10
|
9102 Q\-Factor
|
yading@10
|
9103 .IP "\fBo\fR" 4
|
yading@10
|
9104 .IX Item "o"
|
yading@10
|
9105 octave
|
yading@10
|
9106 .IP "\fBs\fR" 4
|
yading@10
|
9107 .IX Item "s"
|
yading@10
|
9108 slope
|
yading@10
|
9109 .RE
|
yading@10
|
9110 .RS 4
|
yading@10
|
9111 .RE
|
yading@10
|
9112 .IP "\fBwidth, w\fR" 4
|
yading@10
|
9113 .IX Item "width, w"
|
yading@10
|
9114 Specify the band-width of a filter in width_type units.
|
yading@10
|
9115 .SS "biquad"
|
yading@10
|
9116 .IX Subsection "biquad"
|
yading@10
|
9117 Apply a biquad \s-1IIR\s0 filter with the given coefficients.
|
yading@10
|
9118 Where \fIb0\fR, \fIb1\fR, \fIb2\fR and \fIa0\fR, \fIa1\fR, \fIa2\fR
|
yading@10
|
9119 are the numerator and denominator coefficients respectively.
|
yading@10
|
9120 .SS "equalizer"
|
yading@10
|
9121 .IX Subsection "equalizer"
|
yading@10
|
9122 Apply a two-pole peaking equalisation (\s-1EQ\s0) filter. With this
|
yading@10
|
9123 filter, the signal-level at and around a selected frequency can
|
yading@10
|
9124 be increased or decreased, whilst (unlike bandpass and bandreject
|
yading@10
|
9125 filters) that at all other frequencies is unchanged.
|
yading@10
|
9126 .PP
|
yading@10
|
9127 In order to produce complex equalisation curves, this filter can
|
yading@10
|
9128 be given several times, each with a different central frequency.
|
yading@10
|
9129 .PP
|
yading@10
|
9130 The filter accepts the following options:
|
yading@10
|
9131 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
9132 .IX Item "frequency, f"
|
yading@10
|
9133 Set the filter's central frequency in Hz.
|
yading@10
|
9134 .IP "\fBwidth_type\fR" 4
|
yading@10
|
9135 .IX Item "width_type"
|
yading@10
|
9136 Set method to specify band-width of filter.
|
yading@10
|
9137 .RS 4
|
yading@10
|
9138 .IP "\fBh\fR" 4
|
yading@10
|
9139 .IX Item "h"
|
yading@10
|
9140 Hz
|
yading@10
|
9141 .IP "\fBq\fR" 4
|
yading@10
|
9142 .IX Item "q"
|
yading@10
|
9143 Q\-Factor
|
yading@10
|
9144 .IP "\fBo\fR" 4
|
yading@10
|
9145 .IX Item "o"
|
yading@10
|
9146 octave
|
yading@10
|
9147 .IP "\fBs\fR" 4
|
yading@10
|
9148 .IX Item "s"
|
yading@10
|
9149 slope
|
yading@10
|
9150 .RE
|
yading@10
|
9151 .RS 4
|
yading@10
|
9152 .RE
|
yading@10
|
9153 .IP "\fBwidth, w\fR" 4
|
yading@10
|
9154 .IX Item "width, w"
|
yading@10
|
9155 Specify the band-width of a filter in width_type units.
|
yading@10
|
9156 .IP "\fBgain, g\fR" 4
|
yading@10
|
9157 .IX Item "gain, g"
|
yading@10
|
9158 Set the required gain or attenuation in dB.
|
yading@10
|
9159 Beware of clipping when using a positive gain.
|
yading@10
|
9160 .SS "afade"
|
yading@10
|
9161 .IX Subsection "afade"
|
yading@10
|
9162 Apply fade\-in/out effect to input audio.
|
yading@10
|
9163 .PP
|
yading@10
|
9164 A description of the accepted parameters follows.
|
yading@10
|
9165 .IP "\fBtype, t\fR" 4
|
yading@10
|
9166 .IX Item "type, t"
|
yading@10
|
9167 Specify the effect type, can be either \f(CW\*(C`in\*(C'\fR for fade-in, or
|
yading@10
|
9168 \&\f(CW\*(C`out\*(C'\fR for a fade-out effect. Default is \f(CW\*(C`in\*(C'\fR.
|
yading@10
|
9169 .IP "\fBstart_sample, ss\fR" 4
|
yading@10
|
9170 .IX Item "start_sample, ss"
|
yading@10
|
9171 Specify the number of the start sample for starting to apply the fade
|
yading@10
|
9172 effect. Default is 0.
|
yading@10
|
9173 .IP "\fBnb_samples, ns\fR" 4
|
yading@10
|
9174 .IX Item "nb_samples, ns"
|
yading@10
|
9175 Specify the number of samples for which the fade effect has to last. At
|
yading@10
|
9176 the end of the fade-in effect the output audio will have the same
|
yading@10
|
9177 volume as the input audio, at the end of the fade-out transition
|
yading@10
|
9178 the output audio will be silence. Default is 44100.
|
yading@10
|
9179 .IP "\fBstart_time, st\fR" 4
|
yading@10
|
9180 .IX Item "start_time, st"
|
yading@10
|
9181 Specify time for starting to apply the fade effect. Default is 0.
|
yading@10
|
9182 The accepted syntax is:
|
yading@10
|
9183 .Sp
|
yading@10
|
9184 .Vb 2
|
yading@10
|
9185 \& [\-]HH[:MM[:SS[.m...]]]
|
yading@10
|
9186 \& [\-]S+[.m...]
|
yading@10
|
9187 .Ve
|
yading@10
|
9188 .Sp
|
yading@10
|
9189 See also the function \f(CW\*(C`av_parse_time()\*(C'\fR.
|
yading@10
|
9190 If set this option is used instead of \fIstart_sample\fR one.
|
yading@10
|
9191 .IP "\fBduration, d\fR" 4
|
yading@10
|
9192 .IX Item "duration, d"
|
yading@10
|
9193 Specify the duration for which the fade effect has to last. Default is 0.
|
yading@10
|
9194 The accepted syntax is:
|
yading@10
|
9195 .Sp
|
yading@10
|
9196 .Vb 2
|
yading@10
|
9197 \& [\-]HH[:MM[:SS[.m...]]]
|
yading@10
|
9198 \& [\-]S+[.m...]
|
yading@10
|
9199 .Ve
|
yading@10
|
9200 .Sp
|
yading@10
|
9201 See also the function \f(CW\*(C`av_parse_time()\*(C'\fR.
|
yading@10
|
9202 At the end of the fade-in effect the output audio will have the same
|
yading@10
|
9203 volume as the input audio, at the end of the fade-out transition
|
yading@10
|
9204 the output audio will be silence.
|
yading@10
|
9205 If set this option is used instead of \fInb_samples\fR one.
|
yading@10
|
9206 .IP "\fBcurve\fR" 4
|
yading@10
|
9207 .IX Item "curve"
|
yading@10
|
9208 Set curve for fade transition.
|
yading@10
|
9209 .Sp
|
yading@10
|
9210 It accepts the following values:
|
yading@10
|
9211 .RS 4
|
yading@10
|
9212 .IP "\fBtri\fR" 4
|
yading@10
|
9213 .IX Item "tri"
|
yading@10
|
9214 select triangular, linear slope (default)
|
yading@10
|
9215 .IP "\fBqsin\fR" 4
|
yading@10
|
9216 .IX Item "qsin"
|
yading@10
|
9217 select quarter of sine wave
|
yading@10
|
9218 .IP "\fBhsin\fR" 4
|
yading@10
|
9219 .IX Item "hsin"
|
yading@10
|
9220 select half of sine wave
|
yading@10
|
9221 .IP "\fBesin\fR" 4
|
yading@10
|
9222 .IX Item "esin"
|
yading@10
|
9223 select exponential sine wave
|
yading@10
|
9224 .IP "\fBlog\fR" 4
|
yading@10
|
9225 .IX Item "log"
|
yading@10
|
9226 select logarithmic
|
yading@10
|
9227 .IP "\fBpar\fR" 4
|
yading@10
|
9228 .IX Item "par"
|
yading@10
|
9229 select inverted parabola
|
yading@10
|
9230 .IP "\fBqua\fR" 4
|
yading@10
|
9231 .IX Item "qua"
|
yading@10
|
9232 select quadratic
|
yading@10
|
9233 .IP "\fBcub\fR" 4
|
yading@10
|
9234 .IX Item "cub"
|
yading@10
|
9235 select cubic
|
yading@10
|
9236 .IP "\fBsqu\fR" 4
|
yading@10
|
9237 .IX Item "squ"
|
yading@10
|
9238 select square root
|
yading@10
|
9239 .IP "\fBcbr\fR" 4
|
yading@10
|
9240 .IX Item "cbr"
|
yading@10
|
9241 select cubic root
|
yading@10
|
9242 .RE
|
yading@10
|
9243 .RS 4
|
yading@10
|
9244 .RE
|
yading@10
|
9245 .PP
|
yading@10
|
9246 \fIExamples\fR
|
yading@10
|
9247 .IX Subsection "Examples"
|
yading@10
|
9248 .IP "\(bu" 4
|
yading@10
|
9249 Fade in first 15 seconds of audio:
|
yading@10
|
9250 .Sp
|
yading@10
|
9251 .Vb 1
|
yading@10
|
9252 \& afade=t=in:ss=0:d=15
|
yading@10
|
9253 .Ve
|
yading@10
|
9254 .IP "\(bu" 4
|
yading@10
|
9255 Fade out last 25 seconds of a 900 seconds audio:
|
yading@10
|
9256 .Sp
|
yading@10
|
9257 .Vb 1
|
yading@10
|
9258 \& afade=t=out:ss=875:d=25
|
yading@10
|
9259 .Ve
|
yading@10
|
9260 .SS "aformat"
|
yading@10
|
9261 .IX Subsection "aformat"
|
yading@10
|
9262 Set output format constraints for the input audio. The framework will
|
yading@10
|
9263 negotiate the most appropriate format to minimize conversions.
|
yading@10
|
9264 .PP
|
yading@10
|
9265 The filter accepts the following named parameters:
|
yading@10
|
9266 .IP "\fBsample_fmts\fR" 4
|
yading@10
|
9267 .IX Item "sample_fmts"
|
yading@10
|
9268 A '|'\-separated list of requested sample formats.
|
yading@10
|
9269 .IP "\fBsample_rates\fR" 4
|
yading@10
|
9270 .IX Item "sample_rates"
|
yading@10
|
9271 A '|'\-separated list of requested sample rates.
|
yading@10
|
9272 .IP "\fBchannel_layouts\fR" 4
|
yading@10
|
9273 .IX Item "channel_layouts"
|
yading@10
|
9274 A '|'\-separated list of requested channel layouts.
|
yading@10
|
9275 .PP
|
yading@10
|
9276 If a parameter is omitted, all values are allowed.
|
yading@10
|
9277 .PP
|
yading@10
|
9278 For example to force the output to either unsigned 8\-bit or signed 16\-bit stereo:
|
yading@10
|
9279 .PP
|
yading@10
|
9280 .Vb 1
|
yading@10
|
9281 \& aformat=sample_fmts=u8|s16:channel_layouts=stereo
|
yading@10
|
9282 .Ve
|
yading@10
|
9283 .SS "amerge"
|
yading@10
|
9284 .IX Subsection "amerge"
|
yading@10
|
9285 Merge two or more audio streams into a single multi-channel stream.
|
yading@10
|
9286 .PP
|
yading@10
|
9287 The filter accepts the following options:
|
yading@10
|
9288 .IP "\fBinputs\fR" 4
|
yading@10
|
9289 .IX Item "inputs"
|
yading@10
|
9290 Set the number of inputs. Default is 2.
|
yading@10
|
9291 .PP
|
yading@10
|
9292 If the channel layouts of the inputs are disjoint, and therefore compatible,
|
yading@10
|
9293 the channel layout of the output will be set accordingly and the channels
|
yading@10
|
9294 will be reordered as necessary. If the channel layouts of the inputs are not
|
yading@10
|
9295 disjoint, the output will have all the channels of the first input then all
|
yading@10
|
9296 the channels of the second input, in that order, and the channel layout of
|
yading@10
|
9297 the output will be the default value corresponding to the total number of
|
yading@10
|
9298 channels.
|
yading@10
|
9299 .PP
|
yading@10
|
9300 For example, if the first input is in 2.1 (\s-1FL+FR+LF\s0) and the second input
|
yading@10
|
9301 is \s-1FC+BL+BR\s0, then the output will be in 5.1, with the channels in the
|
yading@10
|
9302 following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the
|
yading@10
|
9303 first input, b1 is the first channel of the second input).
|
yading@10
|
9304 .PP
|
yading@10
|
9305 On the other hand, if both input are in stereo, the output channels will be
|
yading@10
|
9306 in the default order: a1, a2, b1, b2, and the channel layout will be
|
yading@10
|
9307 arbitrarily set to 4.0, which may or may not be the expected value.
|
yading@10
|
9308 .PP
|
yading@10
|
9309 All inputs must have the same sample rate, and format.
|
yading@10
|
9310 .PP
|
yading@10
|
9311 If inputs do not have the same duration, the output will stop with the
|
yading@10
|
9312 shortest.
|
yading@10
|
9313 .PP
|
yading@10
|
9314 \fIExamples\fR
|
yading@10
|
9315 .IX Subsection "Examples"
|
yading@10
|
9316 .IP "\(bu" 4
|
yading@10
|
9317 Merge two mono files into a stereo stream:
|
yading@10
|
9318 .Sp
|
yading@10
|
9319 .Vb 1
|
yading@10
|
9320 \& amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
|
yading@10
|
9321 .Ve
|
yading@10
|
9322 .IP "\(bu" 4
|
yading@10
|
9323 Multiple merges assuming 1 video stream and 6 audio streams in \fIinput.mkv\fR:
|
yading@10
|
9324 .Sp
|
yading@10
|
9325 .Vb 1
|
yading@10
|
9326 \& 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
|
yading@10
|
9327 .Ve
|
yading@10
|
9328 .SS "amix"
|
yading@10
|
9329 .IX Subsection "amix"
|
yading@10
|
9330 Mixes multiple audio inputs into a single output.
|
yading@10
|
9331 .PP
|
yading@10
|
9332 For example
|
yading@10
|
9333 .PP
|
yading@10
|
9334 .Vb 1
|
yading@10
|
9335 \& ffmpeg \-i INPUT1 \-i INPUT2 \-i INPUT3 \-filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
|
yading@10
|
9336 .Ve
|
yading@10
|
9337 .PP
|
yading@10
|
9338 will mix 3 input audio streams to a single output with the same duration as the
|
yading@10
|
9339 first input and a dropout transition time of 3 seconds.
|
yading@10
|
9340 .PP
|
yading@10
|
9341 The filter accepts the following named parameters:
|
yading@10
|
9342 .IP "\fBinputs\fR" 4
|
yading@10
|
9343 .IX Item "inputs"
|
yading@10
|
9344 Number of inputs. If unspecified, it defaults to 2.
|
yading@10
|
9345 .IP "\fBduration\fR" 4
|
yading@10
|
9346 .IX Item "duration"
|
yading@10
|
9347 How to determine the end-of-stream.
|
yading@10
|
9348 .RS 4
|
yading@10
|
9349 .IP "\fBlongest\fR" 4
|
yading@10
|
9350 .IX Item "longest"
|
yading@10
|
9351 Duration of longest input. (default)
|
yading@10
|
9352 .IP "\fBshortest\fR" 4
|
yading@10
|
9353 .IX Item "shortest"
|
yading@10
|
9354 Duration of shortest input.
|
yading@10
|
9355 .IP "\fBfirst\fR" 4
|
yading@10
|
9356 .IX Item "first"
|
yading@10
|
9357 Duration of first input.
|
yading@10
|
9358 .RE
|
yading@10
|
9359 .RS 4
|
yading@10
|
9360 .RE
|
yading@10
|
9361 .IP "\fBdropout_transition\fR" 4
|
yading@10
|
9362 .IX Item "dropout_transition"
|
yading@10
|
9363 Transition time, in seconds, for volume renormalization when an input
|
yading@10
|
9364 stream ends. The default value is 2 seconds.
|
yading@10
|
9365 .SS "anull"
|
yading@10
|
9366 .IX Subsection "anull"
|
yading@10
|
9367 Pass the audio source unchanged to the output.
|
yading@10
|
9368 .SS "apad"
|
yading@10
|
9369 .IX Subsection "apad"
|
yading@10
|
9370 Pad the end of a audio stream with silence, this can be used together with
|
yading@10
|
9371 \&\-shortest to extend audio streams to the same length as the video stream.
|
yading@10
|
9372 .SS "aphaser"
|
yading@10
|
9373 .IX Subsection "aphaser"
|
yading@10
|
9374 Add a phasing effect to the input audio.
|
yading@10
|
9375 .PP
|
yading@10
|
9376 A phaser filter creates series of peaks and troughs in the frequency spectrum.
|
yading@10
|
9377 The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.
|
yading@10
|
9378 .PP
|
yading@10
|
9379 A description of the accepted parameters follows.
|
yading@10
|
9380 .IP "\fBin_gain\fR" 4
|
yading@10
|
9381 .IX Item "in_gain"
|
yading@10
|
9382 Set input gain. Default is 0.4.
|
yading@10
|
9383 .IP "\fBout_gain\fR" 4
|
yading@10
|
9384 .IX Item "out_gain"
|
yading@10
|
9385 Set output gain. Default is 0.74
|
yading@10
|
9386 .IP "\fBdelay\fR" 4
|
yading@10
|
9387 .IX Item "delay"
|
yading@10
|
9388 Set delay in milliseconds. Default is 3.0.
|
yading@10
|
9389 .IP "\fBdecay\fR" 4
|
yading@10
|
9390 .IX Item "decay"
|
yading@10
|
9391 Set decay. Default is 0.4.
|
yading@10
|
9392 .IP "\fBspeed\fR" 4
|
yading@10
|
9393 .IX Item "speed"
|
yading@10
|
9394 Set modulation speed in Hz. Default is 0.5.
|
yading@10
|
9395 .IP "\fBtype\fR" 4
|
yading@10
|
9396 .IX Item "type"
|
yading@10
|
9397 Set modulation type. Default is triangular.
|
yading@10
|
9398 .Sp
|
yading@10
|
9399 It accepts the following values:
|
yading@10
|
9400 .RS 4
|
yading@10
|
9401 .IP "\fBtriangular, t\fR" 4
|
yading@10
|
9402 .IX Item "triangular, t"
|
yading@10
|
9403 .PD 0
|
yading@10
|
9404 .IP "\fBsinusoidal, s\fR" 4
|
yading@10
|
9405 .IX Item "sinusoidal, s"
|
yading@10
|
9406 .RE
|
yading@10
|
9407 .RS 4
|
yading@10
|
9408 .RE
|
yading@10
|
9409 .PD
|
yading@10
|
9410 .SS "aresample"
|
yading@10
|
9411 .IX Subsection "aresample"
|
yading@10
|
9412 Resample the input audio to the specified parameters, using the
|
yading@10
|
9413 libswresample library. If none are specified then the filter will
|
yading@10
|
9414 automatically convert between its input and output.
|
yading@10
|
9415 .PP
|
yading@10
|
9416 This filter is also able to stretch/squeeze the audio data to make it match
|
yading@10
|
9417 the timestamps or to inject silence / cut out audio to make it match the
|
yading@10
|
9418 timestamps, do a combination of both or do neither.
|
yading@10
|
9419 .PP
|
yading@10
|
9420 The filter accepts the syntax
|
yading@10
|
9421 [\fIsample_rate\fR:]\fIresampler_options\fR, where \fIsample_rate\fR
|
yading@10
|
9422 expresses a sample rate and \fIresampler_options\fR is a list of
|
yading@10
|
9423 \&\fIkey\fR=\fIvalue\fR pairs, separated by \*(L":\*(R". See the
|
yading@10
|
9424 ffmpeg-resampler manual for the complete list of supported options.
|
yading@10
|
9425 .PP
|
yading@10
|
9426 \fIExamples\fR
|
yading@10
|
9427 .IX Subsection "Examples"
|
yading@10
|
9428 .IP "\(bu" 4
|
yading@10
|
9429 Resample the input audio to 44100Hz:
|
yading@10
|
9430 .Sp
|
yading@10
|
9431 .Vb 1
|
yading@10
|
9432 \& aresample=44100
|
yading@10
|
9433 .Ve
|
yading@10
|
9434 .IP "\(bu" 4
|
yading@10
|
9435 Stretch/squeeze samples to the given timestamps, with a maximum of 1000
|
yading@10
|
9436 samples per second compensation:
|
yading@10
|
9437 .Sp
|
yading@10
|
9438 .Vb 1
|
yading@10
|
9439 \& aresample=async=1000
|
yading@10
|
9440 .Ve
|
yading@10
|
9441 .SS "asetnsamples"
|
yading@10
|
9442 .IX Subsection "asetnsamples"
|
yading@10
|
9443 Set the number of samples per each output audio frame.
|
yading@10
|
9444 .PP
|
yading@10
|
9445 The last output packet may contain a different number of samples, as
|
yading@10
|
9446 the filter will flush all the remaining samples when the input audio
|
yading@10
|
9447 signal its end.
|
yading@10
|
9448 .PP
|
yading@10
|
9449 The filter accepts the following options:
|
yading@10
|
9450 .IP "\fBnb_out_samples, n\fR" 4
|
yading@10
|
9451 .IX Item "nb_out_samples, n"
|
yading@10
|
9452 Set the number of frames per each output audio frame. The number is
|
yading@10
|
9453 intended as the number of samples \fIper each channel\fR.
|
yading@10
|
9454 Default value is 1024.
|
yading@10
|
9455 .IP "\fBpad, p\fR" 4
|
yading@10
|
9456 .IX Item "pad, p"
|
yading@10
|
9457 If set to 1, the filter will pad the last audio frame with zeroes, so
|
yading@10
|
9458 that the last frame will contain the same number of samples as the
|
yading@10
|
9459 previous ones. Default value is 1.
|
yading@10
|
9460 .PP
|
yading@10
|
9461 For example, to set the number of per-frame samples to 1234 and
|
yading@10
|
9462 disable padding for the last frame, use:
|
yading@10
|
9463 .PP
|
yading@10
|
9464 .Vb 1
|
yading@10
|
9465 \& asetnsamples=n=1234:p=0
|
yading@10
|
9466 .Ve
|
yading@10
|
9467 .SS "ashowinfo"
|
yading@10
|
9468 .IX Subsection "ashowinfo"
|
yading@10
|
9469 Show a line containing various information for each input audio frame.
|
yading@10
|
9470 The input audio is not modified.
|
yading@10
|
9471 .PP
|
yading@10
|
9472 The shown line contains a sequence of key/value pairs of the form
|
yading@10
|
9473 \&\fIkey\fR:\fIvalue\fR.
|
yading@10
|
9474 .PP
|
yading@10
|
9475 A description of each shown parameter follows:
|
yading@10
|
9476 .IP "\fBn\fR" 4
|
yading@10
|
9477 .IX Item "n"
|
yading@10
|
9478 sequential number of the input frame, starting from 0
|
yading@10
|
9479 .IP "\fBpts\fR" 4
|
yading@10
|
9480 .IX Item "pts"
|
yading@10
|
9481 Presentation timestamp of the input frame, in time base units; the time base
|
yading@10
|
9482 depends on the filter input pad, and is usually 1/\fIsample_rate\fR.
|
yading@10
|
9483 .IP "\fBpts_time\fR" 4
|
yading@10
|
9484 .IX Item "pts_time"
|
yading@10
|
9485 presentation timestamp of the input frame in seconds
|
yading@10
|
9486 .IP "\fBpos\fR" 4
|
yading@10
|
9487 .IX Item "pos"
|
yading@10
|
9488 position of the frame in the input stream, \-1 if this information in
|
yading@10
|
9489 unavailable and/or meaningless (for example in case of synthetic audio)
|
yading@10
|
9490 .IP "\fBfmt\fR" 4
|
yading@10
|
9491 .IX Item "fmt"
|
yading@10
|
9492 sample format
|
yading@10
|
9493 .IP "\fBchlayout\fR" 4
|
yading@10
|
9494 .IX Item "chlayout"
|
yading@10
|
9495 channel layout
|
yading@10
|
9496 .IP "\fBrate\fR" 4
|
yading@10
|
9497 .IX Item "rate"
|
yading@10
|
9498 sample rate for the audio frame
|
yading@10
|
9499 .IP "\fBnb_samples\fR" 4
|
yading@10
|
9500 .IX Item "nb_samples"
|
yading@10
|
9501 number of samples (per channel) in the frame
|
yading@10
|
9502 .IP "\fBchecksum\fR" 4
|
yading@10
|
9503 .IX Item "checksum"
|
yading@10
|
9504 Adler\-32 checksum (printed in hexadecimal) of the audio data. For planar audio
|
yading@10
|
9505 the data is treated as if all the planes were concatenated.
|
yading@10
|
9506 .IP "\fBplane_checksums\fR" 4
|
yading@10
|
9507 .IX Item "plane_checksums"
|
yading@10
|
9508 A list of Adler\-32 checksums for each data plane.
|
yading@10
|
9509 .SS "astreamsync"
|
yading@10
|
9510 .IX Subsection "astreamsync"
|
yading@10
|
9511 Forward two audio streams and control the order the buffers are forwarded.
|
yading@10
|
9512 .PP
|
yading@10
|
9513 The filter accepts the following options:
|
yading@10
|
9514 .IP "\fBexpr, e\fR" 4
|
yading@10
|
9515 .IX Item "expr, e"
|
yading@10
|
9516 Set the expression deciding which stream should be
|
yading@10
|
9517 forwarded next: if the result is negative, the first stream is forwarded; if
|
yading@10
|
9518 the result is positive or zero, the second stream is forwarded. It can use
|
yading@10
|
9519 the following variables:
|
yading@10
|
9520 .RS 4
|
yading@10
|
9521 .IP "\fIb1 b2\fR" 4
|
yading@10
|
9522 .IX Item "b1 b2"
|
yading@10
|
9523 number of buffers forwarded so far on each stream
|
yading@10
|
9524 .IP "\fIs1 s2\fR" 4
|
yading@10
|
9525 .IX Item "s1 s2"
|
yading@10
|
9526 number of samples forwarded so far on each stream
|
yading@10
|
9527 .IP "\fIt1 t2\fR" 4
|
yading@10
|
9528 .IX Item "t1 t2"
|
yading@10
|
9529 current timestamp of each stream
|
yading@10
|
9530 .RE
|
yading@10
|
9531 .RS 4
|
yading@10
|
9532 .Sp
|
yading@10
|
9533 The default value is \f(CW\*(C`t1\-t2\*(C'\fR, which means to always forward the stream
|
yading@10
|
9534 that has a smaller timestamp.
|
yading@10
|
9535 .RE
|
yading@10
|
9536 .PP
|
yading@10
|
9537 \fIExamples\fR
|
yading@10
|
9538 .IX Subsection "Examples"
|
yading@10
|
9539 .PP
|
yading@10
|
9540 Stress-test \f(CW\*(C`amerge\*(C'\fR by randomly sending buffers on the wrong
|
yading@10
|
9541 input, while avoiding too much of a desynchronization:
|
yading@10
|
9542 .PP
|
yading@10
|
9543 .Vb 3
|
yading@10
|
9544 \& amovie=file.ogg [a] ; amovie=file.mp3 [b] ;
|
yading@10
|
9545 \& [a] [b] astreamsync=(2*random(1))\-1+tanh(5*(t1\-t2)) [a2] [b2] ;
|
yading@10
|
9546 \& [a2] [b2] amerge
|
yading@10
|
9547 .Ve
|
yading@10
|
9548 .SS "atempo"
|
yading@10
|
9549 .IX Subsection "atempo"
|
yading@10
|
9550 Adjust audio tempo.
|
yading@10
|
9551 .PP
|
yading@10
|
9552 The filter accepts exactly one parameter, the audio tempo. If not
|
yading@10
|
9553 specified then the filter will assume nominal 1.0 tempo. Tempo must
|
yading@10
|
9554 be in the [0.5, 2.0] range.
|
yading@10
|
9555 .PP
|
yading@10
|
9556 \fIExamples\fR
|
yading@10
|
9557 .IX Subsection "Examples"
|
yading@10
|
9558 .IP "\(bu" 4
|
yading@10
|
9559 Slow down audio to 80% tempo:
|
yading@10
|
9560 .Sp
|
yading@10
|
9561 .Vb 1
|
yading@10
|
9562 \& atempo=0.8
|
yading@10
|
9563 .Ve
|
yading@10
|
9564 .IP "\(bu" 4
|
yading@10
|
9565 To speed up audio to 125% tempo:
|
yading@10
|
9566 .Sp
|
yading@10
|
9567 .Vb 1
|
yading@10
|
9568 \& atempo=1.25
|
yading@10
|
9569 .Ve
|
yading@10
|
9570 .SS "earwax"
|
yading@10
|
9571 .IX Subsection "earwax"
|
yading@10
|
9572 Make audio easier to listen to on headphones.
|
yading@10
|
9573 .PP
|
yading@10
|
9574 This filter adds `cues' to 44.1kHz stereo (i.e. audio \s-1CD\s0 format) audio
|
yading@10
|
9575 so that when listened to on headphones the stereo image is moved from
|
yading@10
|
9576 inside your head (standard for headphones) to outside and in front of
|
yading@10
|
9577 the listener (standard for speakers).
|
yading@10
|
9578 .PP
|
yading@10
|
9579 Ported from SoX.
|
yading@10
|
9580 .SS "pan"
|
yading@10
|
9581 .IX Subsection "pan"
|
yading@10
|
9582 Mix channels with specific gain levels. The filter accepts the output
|
yading@10
|
9583 channel layout followed by a set of channels definitions.
|
yading@10
|
9584 .PP
|
yading@10
|
9585 This filter is also designed to remap efficiently the channels of an audio
|
yading@10
|
9586 stream.
|
yading@10
|
9587 .PP
|
yading@10
|
9588 The filter accepts parameters of the form:
|
yading@10
|
9589 "\fIl\fR:\fIoutdef\fR:\fIoutdef\fR:..."
|
yading@10
|
9590 .IP "\fBl\fR" 4
|
yading@10
|
9591 .IX Item "l"
|
yading@10
|
9592 output channel layout or number of channels
|
yading@10
|
9593 .IP "\fBoutdef\fR" 4
|
yading@10
|
9594 .IX Item "outdef"
|
yading@10
|
9595 output channel specification, of the form:
|
yading@10
|
9596 "\fIout_name\fR=[\fIgain\fR*]\fIin_name\fR[+[\fIgain\fR*]\fIin_name\fR...]"
|
yading@10
|
9597 .IP "\fBout_name\fR" 4
|
yading@10
|
9598 .IX Item "out_name"
|
yading@10
|
9599 output channel to define, either a channel name (\s-1FL\s0, \s-1FR\s0, etc.) or a channel
|
yading@10
|
9600 number (c0, c1, etc.)
|
yading@10
|
9601 .IP "\fBgain\fR" 4
|
yading@10
|
9602 .IX Item "gain"
|
yading@10
|
9603 multiplicative coefficient for the channel, 1 leaving the volume unchanged
|
yading@10
|
9604 .IP "\fBin_name\fR" 4
|
yading@10
|
9605 .IX Item "in_name"
|
yading@10
|
9606 input channel to use, see out_name for details; it is not possible to mix
|
yading@10
|
9607 named and numbered input channels
|
yading@10
|
9608 .PP
|
yading@10
|
9609 If the `=' in a channel specification is replaced by `<', then the gains for
|
yading@10
|
9610 that specification will be renormalized so that the total is 1, thus
|
yading@10
|
9611 avoiding clipping noise.
|
yading@10
|
9612 .PP
|
yading@10
|
9613 \fIMixing examples\fR
|
yading@10
|
9614 .IX Subsection "Mixing examples"
|
yading@10
|
9615 .PP
|
yading@10
|
9616 For example, if you want to down-mix from stereo to mono, but with a bigger
|
yading@10
|
9617 factor for the left channel:
|
yading@10
|
9618 .PP
|
yading@10
|
9619 .Vb 1
|
yading@10
|
9620 \& pan=1:c0=0.9*c0+0.1*c1
|
yading@10
|
9621 .Ve
|
yading@10
|
9622 .PP
|
yading@10
|
9623 A customized down-mix to stereo that works automatically for 3\-, 4\-, 5\- and
|
yading@10
|
9624 7\-channels surround:
|
yading@10
|
9625 .PP
|
yading@10
|
9626 .Vb 1
|
yading@10
|
9627 \& pan=stereo: FL < FL + 0.5*FC + 0.6*BL + 0.6*SL : FR < FR + 0.5*FC + 0.6*BR + 0.6*SR
|
yading@10
|
9628 .Ve
|
yading@10
|
9629 .PP
|
yading@10
|
9630 Note that \fBffmpeg\fR integrates a default down-mix (and up-mix) system
|
yading@10
|
9631 that should be preferred (see \*(L"\-ac\*(R" option) unless you have very specific
|
yading@10
|
9632 needs.
|
yading@10
|
9633 .PP
|
yading@10
|
9634 \fIRemapping examples\fR
|
yading@10
|
9635 .IX Subsection "Remapping examples"
|
yading@10
|
9636 .PP
|
yading@10
|
9637 The channel remapping will be effective if, and only if:
|
yading@10
|
9638 .IP "*<gain coefficients are zeroes or ones,>" 4
|
yading@10
|
9639 .IX Item "*<gain coefficients are zeroes or ones,>"
|
yading@10
|
9640 .PD 0
|
yading@10
|
9641 .IP "*<only one input per channel output,>" 4
|
yading@10
|
9642 .IX Item "*<only one input per channel output,>"
|
yading@10
|
9643 .PD
|
yading@10
|
9644 .PP
|
yading@10
|
9645 If all these conditions are satisfied, the filter will notify the user (\*(L"Pure
|
yading@10
|
9646 channel mapping detected\*(R"), and use an optimized and lossless method to do the
|
yading@10
|
9647 remapping.
|
yading@10
|
9648 .PP
|
yading@10
|
9649 For example, if you have a 5.1 source and want a stereo audio stream by
|
yading@10
|
9650 dropping the extra channels:
|
yading@10
|
9651 .PP
|
yading@10
|
9652 .Vb 1
|
yading@10
|
9653 \& pan="stereo: c0=FL : c1=FR"
|
yading@10
|
9654 .Ve
|
yading@10
|
9655 .PP
|
yading@10
|
9656 Given the same source, you can also switch front left and front right channels
|
yading@10
|
9657 and keep the input channel layout:
|
yading@10
|
9658 .PP
|
yading@10
|
9659 .Vb 1
|
yading@10
|
9660 \& pan="5.1: c0=c1 : c1=c0 : c2=c2 : c3=c3 : c4=c4 : c5=c5"
|
yading@10
|
9661 .Ve
|
yading@10
|
9662 .PP
|
yading@10
|
9663 If the input is a stereo audio stream, you can mute the front left channel (and
|
yading@10
|
9664 still keep the stereo channel layout) with:
|
yading@10
|
9665 .PP
|
yading@10
|
9666 .Vb 1
|
yading@10
|
9667 \& pan="stereo:c1=c1"
|
yading@10
|
9668 .Ve
|
yading@10
|
9669 .PP
|
yading@10
|
9670 Still with a stereo audio stream input, you can copy the right channel in both
|
yading@10
|
9671 front left and right:
|
yading@10
|
9672 .PP
|
yading@10
|
9673 .Vb 1
|
yading@10
|
9674 \& pan="stereo: c0=FR : c1=FR"
|
yading@10
|
9675 .Ve
|
yading@10
|
9676 .SS "silencedetect"
|
yading@10
|
9677 .IX Subsection "silencedetect"
|
yading@10
|
9678 Detect silence in an audio stream.
|
yading@10
|
9679 .PP
|
yading@10
|
9680 This filter logs a message when it detects that the input audio volume is less
|
yading@10
|
9681 or equal to a noise tolerance value for a duration greater or equal to the
|
yading@10
|
9682 minimum detected noise duration.
|
yading@10
|
9683 .PP
|
yading@10
|
9684 The printed times and duration are expressed in seconds.
|
yading@10
|
9685 .PP
|
yading@10
|
9686 The filter accepts the following options:
|
yading@10
|
9687 .IP "\fBduration, d\fR" 4
|
yading@10
|
9688 .IX Item "duration, d"
|
yading@10
|
9689 Set silence duration until notification (default is 2 seconds).
|
yading@10
|
9690 .IP "\fBnoise, n\fR" 4
|
yading@10
|
9691 .IX Item "noise, n"
|
yading@10
|
9692 Set noise tolerance. Can be specified in dB (in case \*(L"dB\*(R" is appended to the
|
yading@10
|
9693 specified value) or amplitude ratio. Default is \-60dB, or 0.001.
|
yading@10
|
9694 .PP
|
yading@10
|
9695 \fIExamples\fR
|
yading@10
|
9696 .IX Subsection "Examples"
|
yading@10
|
9697 .IP "\(bu" 4
|
yading@10
|
9698 Detect 5 seconds of silence with \-50dB noise tolerance:
|
yading@10
|
9699 .Sp
|
yading@10
|
9700 .Vb 1
|
yading@10
|
9701 \& silencedetect=n=\-50dB:d=5
|
yading@10
|
9702 .Ve
|
yading@10
|
9703 .IP "\(bu" 4
|
yading@10
|
9704 Complete example with \fBffmpeg\fR to detect silence with 0.0001 noise
|
yading@10
|
9705 tolerance in \fIsilence.mp3\fR:
|
yading@10
|
9706 .Sp
|
yading@10
|
9707 .Vb 1
|
yading@10
|
9708 \& ffmpeg \-i silence.mp3 \-af silencedetect=noise=0.0001 \-f null \-
|
yading@10
|
9709 .Ve
|
yading@10
|
9710 .SS "asyncts"
|
yading@10
|
9711 .IX Subsection "asyncts"
|
yading@10
|
9712 Synchronize audio data with timestamps by squeezing/stretching it and/or
|
yading@10
|
9713 dropping samples/adding silence when needed.
|
yading@10
|
9714 .PP
|
yading@10
|
9715 This filter is not built by default, please use aresample to do squeezing/stretching.
|
yading@10
|
9716 .PP
|
yading@10
|
9717 The filter accepts the following named parameters:
|
yading@10
|
9718 .IP "\fBcompensate\fR" 4
|
yading@10
|
9719 .IX Item "compensate"
|
yading@10
|
9720 Enable stretching/squeezing the data to make it match the timestamps. Disabled
|
yading@10
|
9721 by default. When disabled, time gaps are covered with silence.
|
yading@10
|
9722 .IP "\fBmin_delta\fR" 4
|
yading@10
|
9723 .IX Item "min_delta"
|
yading@10
|
9724 Minimum difference between timestamps and audio data (in seconds) to trigger
|
yading@10
|
9725 adding/dropping samples. Default value is 0.1. If you get non-perfect sync with
|
yading@10
|
9726 this filter, try setting this parameter to 0.
|
yading@10
|
9727 .IP "\fBmax_comp\fR" 4
|
yading@10
|
9728 .IX Item "max_comp"
|
yading@10
|
9729 Maximum compensation in samples per second. Relevant only with compensate=1.
|
yading@10
|
9730 Default value 500.
|
yading@10
|
9731 .IP "\fBfirst_pts\fR" 4
|
yading@10
|
9732 .IX Item "first_pts"
|
yading@10
|
9733 Assume the first pts should be this value. The time base is 1 / sample rate.
|
yading@10
|
9734 This allows for padding/trimming at the start of stream. By default, no
|
yading@10
|
9735 assumption is made about the first frame's expected pts, so no padding or
|
yading@10
|
9736 trimming is done. For example, this could be set to 0 to pad the beginning with
|
yading@10
|
9737 silence if an audio stream starts after the video stream or to trim any samples
|
yading@10
|
9738 with a negative pts due to encoder delay.
|
yading@10
|
9739 .SS "channelsplit"
|
yading@10
|
9740 .IX Subsection "channelsplit"
|
yading@10
|
9741 Split each channel in input audio stream into a separate output stream.
|
yading@10
|
9742 .PP
|
yading@10
|
9743 This filter accepts the following named parameters:
|
yading@10
|
9744 .IP "\fBchannel_layout\fR" 4
|
yading@10
|
9745 .IX Item "channel_layout"
|
yading@10
|
9746 Channel layout of the input stream. Default is \*(L"stereo\*(R".
|
yading@10
|
9747 .PP
|
yading@10
|
9748 For example, assuming a stereo input \s-1MP3\s0 file
|
yading@10
|
9749 .PP
|
yading@10
|
9750 .Vb 1
|
yading@10
|
9751 \& ffmpeg \-i in.mp3 \-filter_complex channelsplit out.mkv
|
yading@10
|
9752 .Ve
|
yading@10
|
9753 .PP
|
yading@10
|
9754 will create an output Matroska file with two audio streams, one containing only
|
yading@10
|
9755 the left channel and the other the right channel.
|
yading@10
|
9756 .PP
|
yading@10
|
9757 To split a 5.1 \s-1WAV\s0 file into per-channel files
|
yading@10
|
9758 .PP
|
yading@10
|
9759 .Vb 5
|
yading@10
|
9760 \& ffmpeg \-i in.wav \-filter_complex
|
yading@10
|
9761 \& \*(Aqchannelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]\*(Aq
|
yading@10
|
9762 \& \-map \*(Aq[FL]\*(Aq front_left.wav \-map \*(Aq[FR]\*(Aq front_right.wav \-map \*(Aq[FC]\*(Aq
|
yading@10
|
9763 \& front_center.wav \-map \*(Aq[LFE]\*(Aq lfe.wav \-map \*(Aq[SL]\*(Aq side_left.wav \-map \*(Aq[SR]\*(Aq
|
yading@10
|
9764 \& side_right.wav
|
yading@10
|
9765 .Ve
|
yading@10
|
9766 .SS "channelmap"
|
yading@10
|
9767 .IX Subsection "channelmap"
|
yading@10
|
9768 Remap input channels to new locations.
|
yading@10
|
9769 .PP
|
yading@10
|
9770 This filter accepts the following named parameters:
|
yading@10
|
9771 .IP "\fBchannel_layout\fR" 4
|
yading@10
|
9772 .IX Item "channel_layout"
|
yading@10
|
9773 Channel layout of the output stream.
|
yading@10
|
9774 .IP "\fBmap\fR" 4
|
yading@10
|
9775 .IX Item "map"
|
yading@10
|
9776 Map channels from input to output. The argument is a '|'\-separated list of
|
yading@10
|
9777 mappings, each in the \f(CW\*(C`\f(CIin_channel\f(CW\-\f(CIout_channel\f(CW\*(C'\fR or
|
yading@10
|
9778 \&\fIin_channel\fR form. \fIin_channel\fR can be either the name of the input
|
yading@10
|
9779 channel (e.g. \s-1FL\s0 for front left) or its index in the input channel layout.
|
yading@10
|
9780 \&\fIout_channel\fR is the name of the output channel or its index in the output
|
yading@10
|
9781 channel layout. If \fIout_channel\fR is not given then it is implicitly an
|
yading@10
|
9782 index, starting with zero and increasing by one for each mapping.
|
yading@10
|
9783 .PP
|
yading@10
|
9784 If no mapping is present, the filter will implicitly map input channels to
|
yading@10
|
9785 output channels preserving index.
|
yading@10
|
9786 .PP
|
yading@10
|
9787 For example, assuming a 5.1+downmix input \s-1MOV\s0 file
|
yading@10
|
9788 .PP
|
yading@10
|
9789 .Vb 1
|
yading@10
|
9790 \& ffmpeg \-i in.mov \-filter \*(Aqchannelmap=map=DL\-FL|DR\-FR\*(Aq out.wav
|
yading@10
|
9791 .Ve
|
yading@10
|
9792 .PP
|
yading@10
|
9793 will create an output \s-1WAV\s0 file tagged as stereo from the downmix channels of
|
yading@10
|
9794 the input.
|
yading@10
|
9795 .PP
|
yading@10
|
9796 To fix a 5.1 \s-1WAV\s0 improperly encoded in \s-1AAC\s0's native channel order
|
yading@10
|
9797 .PP
|
yading@10
|
9798 .Vb 1
|
yading@10
|
9799 \& ffmpeg \-i in.wav \-filter \*(Aqchannelmap=1|2|0|5|3|4:channel_layout=5.1\*(Aq out.wav
|
yading@10
|
9800 .Ve
|
yading@10
|
9801 .SS "join"
|
yading@10
|
9802 .IX Subsection "join"
|
yading@10
|
9803 Join multiple input streams into one multi-channel stream.
|
yading@10
|
9804 .PP
|
yading@10
|
9805 The filter accepts the following named parameters:
|
yading@10
|
9806 .IP "\fBinputs\fR" 4
|
yading@10
|
9807 .IX Item "inputs"
|
yading@10
|
9808 Number of input streams. Defaults to 2.
|
yading@10
|
9809 .IP "\fBchannel_layout\fR" 4
|
yading@10
|
9810 .IX Item "channel_layout"
|
yading@10
|
9811 Desired output channel layout. Defaults to stereo.
|
yading@10
|
9812 .IP "\fBmap\fR" 4
|
yading@10
|
9813 .IX Item "map"
|
yading@10
|
9814 Map channels from inputs to output. The argument is a '|'\-separated list of
|
yading@10
|
9815 mappings, each in the \f(CW\*(C`\f(CIinput_idx\f(CW.\f(CIin_channel\f(CW\-\f(CIout_channel\f(CW\*(C'\fR
|
yading@10
|
9816 form. \fIinput_idx\fR is the 0\-based index of the input stream. \fIin_channel\fR
|
yading@10
|
9817 can be either the name of the input channel (e.g. \s-1FL\s0 for front left) or its
|
yading@10
|
9818 index in the specified input stream. \fIout_channel\fR is the name of the output
|
yading@10
|
9819 channel.
|
yading@10
|
9820 .PP
|
yading@10
|
9821 The filter will attempt to guess the mappings when those are not specified
|
yading@10
|
9822 explicitly. It does so by first trying to find an unused matching input channel
|
yading@10
|
9823 and if that fails it picks the first unused input channel.
|
yading@10
|
9824 .PP
|
yading@10
|
9825 E.g. to join 3 inputs (with properly set channel layouts)
|
yading@10
|
9826 .PP
|
yading@10
|
9827 .Vb 1
|
yading@10
|
9828 \& ffmpeg \-i INPUT1 \-i INPUT2 \-i INPUT3 \-filter_complex join=inputs=3 OUTPUT
|
yading@10
|
9829 .Ve
|
yading@10
|
9830 .PP
|
yading@10
|
9831 To build a 5.1 output from 6 single-channel streams:
|
yading@10
|
9832 .PP
|
yading@10
|
9833 .Vb 3
|
yading@10
|
9834 \& ffmpeg \-i fl \-i fr \-i fc \-i sl \-i sr \-i lfe \-filter_complex
|
yading@10
|
9835 \& \*(Aqjoin=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\*(Aq
|
yading@10
|
9836 \& out
|
yading@10
|
9837 .Ve
|
yading@10
|
9838 .SS "resample"
|
yading@10
|
9839 .IX Subsection "resample"
|
yading@10
|
9840 Convert the audio sample format, sample rate and channel layout. This filter is
|
yading@10
|
9841 not meant to be used directly.
|
yading@10
|
9842 .SS "volume"
|
yading@10
|
9843 .IX Subsection "volume"
|
yading@10
|
9844 Adjust the input audio volume.
|
yading@10
|
9845 .PP
|
yading@10
|
9846 The filter accepts the following options:
|
yading@10
|
9847 .IP "\fBvolume\fR" 4
|
yading@10
|
9848 .IX Item "volume"
|
yading@10
|
9849 Expresses how the audio volume will be increased or decreased.
|
yading@10
|
9850 .Sp
|
yading@10
|
9851 Output values are clipped to the maximum value.
|
yading@10
|
9852 .Sp
|
yading@10
|
9853 The output audio volume is given by the relation:
|
yading@10
|
9854 .Sp
|
yading@10
|
9855 .Vb 1
|
yading@10
|
9856 \& <output_volume> = <volume> * <input_volume>
|
yading@10
|
9857 .Ve
|
yading@10
|
9858 .Sp
|
yading@10
|
9859 Default value for \fIvolume\fR is 1.0.
|
yading@10
|
9860 .IP "\fBprecision\fR" 4
|
yading@10
|
9861 .IX Item "precision"
|
yading@10
|
9862 Set the mathematical precision.
|
yading@10
|
9863 .Sp
|
yading@10
|
9864 This determines which input sample formats will be allowed, which affects the
|
yading@10
|
9865 precision of the volume scaling.
|
yading@10
|
9866 .RS 4
|
yading@10
|
9867 .IP "\fBfixed\fR" 4
|
yading@10
|
9868 .IX Item "fixed"
|
yading@10
|
9869 8\-bit fixed-point; limits input sample format to U8, S16, and S32.
|
yading@10
|
9870 .IP "\fBfloat\fR" 4
|
yading@10
|
9871 .IX Item "float"
|
yading@10
|
9872 32\-bit floating-point; limits input sample format to \s-1FLT\s0. (default)
|
yading@10
|
9873 .IP "\fBdouble\fR" 4
|
yading@10
|
9874 .IX Item "double"
|
yading@10
|
9875 64\-bit floating-point; limits input sample format to \s-1DBL\s0.
|
yading@10
|
9876 .RE
|
yading@10
|
9877 .RS 4
|
yading@10
|
9878 .RE
|
yading@10
|
9879 .PP
|
yading@10
|
9880 \fIExamples\fR
|
yading@10
|
9881 .IX Subsection "Examples"
|
yading@10
|
9882 .IP "\(bu" 4
|
yading@10
|
9883 Halve the input audio volume:
|
yading@10
|
9884 .Sp
|
yading@10
|
9885 .Vb 3
|
yading@10
|
9886 \& volume=volume=0.5
|
yading@10
|
9887 \& volume=volume=1/2
|
yading@10
|
9888 \& volume=volume=\-6.0206dB
|
yading@10
|
9889 .Ve
|
yading@10
|
9890 .Sp
|
yading@10
|
9891 In all the above example the named key for \fBvolume\fR can be
|
yading@10
|
9892 omitted, for example like in:
|
yading@10
|
9893 .Sp
|
yading@10
|
9894 .Vb 1
|
yading@10
|
9895 \& volume=0.5
|
yading@10
|
9896 .Ve
|
yading@10
|
9897 .IP "\(bu" 4
|
yading@10
|
9898 Increase input audio power by 6 decibels using fixed-point precision:
|
yading@10
|
9899 .Sp
|
yading@10
|
9900 .Vb 1
|
yading@10
|
9901 \& volume=volume=6dB:precision=fixed
|
yading@10
|
9902 .Ve
|
yading@10
|
9903 .SS "volumedetect"
|
yading@10
|
9904 .IX Subsection "volumedetect"
|
yading@10
|
9905 Detect the volume of the input video.
|
yading@10
|
9906 .PP
|
yading@10
|
9907 The filter has no parameters. The input is not modified. Statistics about
|
yading@10
|
9908 the volume will be printed in the log when the input stream end is reached.
|
yading@10
|
9909 .PP
|
yading@10
|
9910 In particular it will show the mean volume (root mean square), maximum
|
yading@10
|
9911 volume (on a per-sample basis), and the beginning of an histogram of the
|
yading@10
|
9912 registered volume values (from the maximum value to a cumulated 1/1000 of
|
yading@10
|
9913 the samples).
|
yading@10
|
9914 .PP
|
yading@10
|
9915 All volumes are in decibels relative to the maximum \s-1PCM\s0 value.
|
yading@10
|
9916 .PP
|
yading@10
|
9917 \fIExamples\fR
|
yading@10
|
9918 .IX Subsection "Examples"
|
yading@10
|
9919 .PP
|
yading@10
|
9920 Here is an excerpt of the output:
|
yading@10
|
9921 .PP
|
yading@10
|
9922 .Vb 9
|
yading@10
|
9923 \& [Parsed_volumedetect_0 0xa23120] mean_volume: \-27 dB
|
yading@10
|
9924 \& [Parsed_volumedetect_0 0xa23120] max_volume: \-4 dB
|
yading@10
|
9925 \& [Parsed_volumedetect_0 0xa23120] histogram_4db: 6
|
yading@10
|
9926 \& [Parsed_volumedetect_0 0xa23120] histogram_5db: 62
|
yading@10
|
9927 \& [Parsed_volumedetect_0 0xa23120] histogram_6db: 286
|
yading@10
|
9928 \& [Parsed_volumedetect_0 0xa23120] histogram_7db: 1042
|
yading@10
|
9929 \& [Parsed_volumedetect_0 0xa23120] histogram_8db: 2551
|
yading@10
|
9930 \& [Parsed_volumedetect_0 0xa23120] histogram_9db: 4609
|
yading@10
|
9931 \& [Parsed_volumedetect_0 0xa23120] histogram_10db: 8409
|
yading@10
|
9932 .Ve
|
yading@10
|
9933 .PP
|
yading@10
|
9934 It means that:
|
yading@10
|
9935 .IP "\(bu" 4
|
yading@10
|
9936 The mean square energy is approximately \-27 dB, or 10^\-2.7.
|
yading@10
|
9937 .IP "\(bu" 4
|
yading@10
|
9938 The largest sample is at \-4 dB, or more precisely between \-4 dB and \-5 dB.
|
yading@10
|
9939 .IP "\(bu" 4
|
yading@10
|
9940 There are 6 samples at \-4 dB, 62 at \-5 dB, 286 at \-6 dB, etc.
|
yading@10
|
9941 .PP
|
yading@10
|
9942 In other words, raising the volume by +4 dB does not cause any clipping,
|
yading@10
|
9943 raising it by +5 dB causes clipping for 6 samples, etc.
|
yading@10
|
9944 .SH "AUDIO SOURCES"
|
yading@10
|
9945 .IX Header "AUDIO SOURCES"
|
yading@10
|
9946 Below is a description of the currently available audio sources.
|
yading@10
|
9947 .SS "abuffer"
|
yading@10
|
9948 .IX Subsection "abuffer"
|
yading@10
|
9949 Buffer audio frames, and make them available to the filter chain.
|
yading@10
|
9950 .PP
|
yading@10
|
9951 This source is mainly intended for a programmatic use, in particular
|
yading@10
|
9952 through the interface defined in \fIlibavfilter/asrc_abuffer.h\fR.
|
yading@10
|
9953 .PP
|
yading@10
|
9954 It accepts the following named parameters:
|
yading@10
|
9955 .IP "\fBtime_base\fR" 4
|
yading@10
|
9956 .IX Item "time_base"
|
yading@10
|
9957 Timebase which will be used for timestamps of submitted frames. It must be
|
yading@10
|
9958 either a floating-point number or in \fInumerator\fR/\fIdenominator\fR form.
|
yading@10
|
9959 .IP "\fBsample_rate\fR" 4
|
yading@10
|
9960 .IX Item "sample_rate"
|
yading@10
|
9961 The sample rate of the incoming audio buffers.
|
yading@10
|
9962 .IP "\fBsample_fmt\fR" 4
|
yading@10
|
9963 .IX Item "sample_fmt"
|
yading@10
|
9964 The sample format of the incoming audio buffers.
|
yading@10
|
9965 Either a sample format name or its corresponging integer representation from
|
yading@10
|
9966 the enum AVSampleFormat in \fIlibavutil/samplefmt.h\fR
|
yading@10
|
9967 .IP "\fBchannel_layout\fR" 4
|
yading@10
|
9968 .IX Item "channel_layout"
|
yading@10
|
9969 The channel layout of the incoming audio buffers.
|
yading@10
|
9970 Either a channel layout name from channel_layout_map in
|
yading@10
|
9971 \&\fIlibavutil/channel_layout.c\fR or its corresponding integer representation
|
yading@10
|
9972 from the AV_CH_LAYOUT_* macros in \fIlibavutil/channel_layout.h\fR
|
yading@10
|
9973 .IP "\fBchannels\fR" 4
|
yading@10
|
9974 .IX Item "channels"
|
yading@10
|
9975 The number of channels of the incoming audio buffers.
|
yading@10
|
9976 If both \fIchannels\fR and \fIchannel_layout\fR are specified, then they
|
yading@10
|
9977 must be consistent.
|
yading@10
|
9978 .PP
|
yading@10
|
9979 \fIExamples\fR
|
yading@10
|
9980 .IX Subsection "Examples"
|
yading@10
|
9981 .PP
|
yading@10
|
9982 .Vb 1
|
yading@10
|
9983 \& abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
|
yading@10
|
9984 .Ve
|
yading@10
|
9985 .PP
|
yading@10
|
9986 will instruct the source to accept planar 16bit signed stereo at 44100Hz.
|
yading@10
|
9987 Since the sample format with name \*(L"s16p\*(R" corresponds to the number
|
yading@10
|
9988 6 and the \*(L"stereo\*(R" channel layout corresponds to the value 0x3, this is
|
yading@10
|
9989 equivalent to:
|
yading@10
|
9990 .PP
|
yading@10
|
9991 .Vb 1
|
yading@10
|
9992 \& abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
|
yading@10
|
9993 .Ve
|
yading@10
|
9994 .SS "aevalsrc"
|
yading@10
|
9995 .IX Subsection "aevalsrc"
|
yading@10
|
9996 Generate an audio signal specified by an expression.
|
yading@10
|
9997 .PP
|
yading@10
|
9998 This source accepts in input one or more expressions (one for each
|
yading@10
|
9999 channel), which are evaluated and used to generate a corresponding
|
yading@10
|
10000 audio signal.
|
yading@10
|
10001 .PP
|
yading@10
|
10002 This source accepts the following options:
|
yading@10
|
10003 .IP "\fBexprs\fR" 4
|
yading@10
|
10004 .IX Item "exprs"
|
yading@10
|
10005 Set the '|'\-separated expressions list for each separate channel. In case the
|
yading@10
|
10006 \&\fBchannel_layout\fR option is not specified, the selected channel layout
|
yading@10
|
10007 depends on the number of provided expressions.
|
yading@10
|
10008 .IP "\fBchannel_layout, c\fR" 4
|
yading@10
|
10009 .IX Item "channel_layout, c"
|
yading@10
|
10010 Set the channel layout. The number of channels in the specified layout
|
yading@10
|
10011 must be equal to the number of specified expressions.
|
yading@10
|
10012 .IP "\fBduration, d\fR" 4
|
yading@10
|
10013 .IX Item "duration, d"
|
yading@10
|
10014 Set the minimum duration of the sourced audio. See the function
|
yading@10
|
10015 \&\f(CW\*(C`av_parse_time()\*(C'\fR for the accepted format.
|
yading@10
|
10016 Note that the resulting duration may be greater than the specified
|
yading@10
|
10017 duration, as the generated audio is always cut at the end of a
|
yading@10
|
10018 complete frame.
|
yading@10
|
10019 .Sp
|
yading@10
|
10020 If not specified, or the expressed duration is negative, the audio is
|
yading@10
|
10021 supposed to be generated forever.
|
yading@10
|
10022 .IP "\fBnb_samples, n\fR" 4
|
yading@10
|
10023 .IX Item "nb_samples, n"
|
yading@10
|
10024 Set the number of samples per channel per each output frame,
|
yading@10
|
10025 default to 1024.
|
yading@10
|
10026 .IP "\fBsample_rate, s\fR" 4
|
yading@10
|
10027 .IX Item "sample_rate, s"
|
yading@10
|
10028 Specify the sample rate, default to 44100.
|
yading@10
|
10029 .PP
|
yading@10
|
10030 Each expression in \fIexprs\fR can contain the following constants:
|
yading@10
|
10031 .IP "\fBn\fR" 4
|
yading@10
|
10032 .IX Item "n"
|
yading@10
|
10033 number of the evaluated sample, starting from 0
|
yading@10
|
10034 .IP "\fBt\fR" 4
|
yading@10
|
10035 .IX Item "t"
|
yading@10
|
10036 time of the evaluated sample expressed in seconds, starting from 0
|
yading@10
|
10037 .IP "\fBs\fR" 4
|
yading@10
|
10038 .IX Item "s"
|
yading@10
|
10039 sample rate
|
yading@10
|
10040 .PP
|
yading@10
|
10041 \fIExamples\fR
|
yading@10
|
10042 .IX Subsection "Examples"
|
yading@10
|
10043 .IP "\(bu" 4
|
yading@10
|
10044 Generate silence:
|
yading@10
|
10045 .Sp
|
yading@10
|
10046 .Vb 1
|
yading@10
|
10047 \& aevalsrc=0
|
yading@10
|
10048 .Ve
|
yading@10
|
10049 .IP "\(bu" 4
|
yading@10
|
10050 Generate a sin signal with frequency of 440 Hz, set sample rate to
|
yading@10
|
10051 8000 Hz:
|
yading@10
|
10052 .Sp
|
yading@10
|
10053 .Vb 1
|
yading@10
|
10054 \& aevalsrc="sin(440*2*PI*t):s=8000"
|
yading@10
|
10055 .Ve
|
yading@10
|
10056 .IP "\(bu" 4
|
yading@10
|
10057 Generate a two channels signal, specify the channel layout (Front
|
yading@10
|
10058 Center + Back Center) explicitly:
|
yading@10
|
10059 .Sp
|
yading@10
|
10060 .Vb 1
|
yading@10
|
10061 \& aevalsrc="sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC"
|
yading@10
|
10062 .Ve
|
yading@10
|
10063 .IP "\(bu" 4
|
yading@10
|
10064 Generate white noise:
|
yading@10
|
10065 .Sp
|
yading@10
|
10066 .Vb 1
|
yading@10
|
10067 \& aevalsrc="\-2+random(0)"
|
yading@10
|
10068 .Ve
|
yading@10
|
10069 .IP "\(bu" 4
|
yading@10
|
10070 Generate an amplitude modulated signal:
|
yading@10
|
10071 .Sp
|
yading@10
|
10072 .Vb 1
|
yading@10
|
10073 \& aevalsrc="sin(10*2*PI*t)*sin(880*2*PI*t)"
|
yading@10
|
10074 .Ve
|
yading@10
|
10075 .IP "\(bu" 4
|
yading@10
|
10076 Generate 2.5 Hz binaural beats on a 360 Hz carrier:
|
yading@10
|
10077 .Sp
|
yading@10
|
10078 .Vb 1
|
yading@10
|
10079 \& aevalsrc="0.1*sin(2*PI*(360\-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)"
|
yading@10
|
10080 .Ve
|
yading@10
|
10081 .SS "anullsrc"
|
yading@10
|
10082 .IX Subsection "anullsrc"
|
yading@10
|
10083 Null audio source, return unprocessed audio frames. It is mainly useful
|
yading@10
|
10084 as a template and to be employed in analysis / debugging tools, or as
|
yading@10
|
10085 the source for filters which ignore the input data (for example the sox
|
yading@10
|
10086 synth filter).
|
yading@10
|
10087 .PP
|
yading@10
|
10088 This source accepts the following options:
|
yading@10
|
10089 .IP "\fBchannel_layout, cl\fR" 4
|
yading@10
|
10090 .IX Item "channel_layout, cl"
|
yading@10
|
10091 Specify the channel layout, and can be either an integer or a string
|
yading@10
|
10092 representing a channel layout. The default value of \fIchannel_layout\fR
|
yading@10
|
10093 is \*(L"stereo\*(R".
|
yading@10
|
10094 .Sp
|
yading@10
|
10095 Check the channel_layout_map definition in
|
yading@10
|
10096 \&\fIlibavutil/channel_layout.c\fR for the mapping between strings and
|
yading@10
|
10097 channel layout values.
|
yading@10
|
10098 .IP "\fBsample_rate, r\fR" 4
|
yading@10
|
10099 .IX Item "sample_rate, r"
|
yading@10
|
10100 Specify the sample rate, and defaults to 44100.
|
yading@10
|
10101 .IP "\fBnb_samples, n\fR" 4
|
yading@10
|
10102 .IX Item "nb_samples, n"
|
yading@10
|
10103 Set the number of samples per requested frames.
|
yading@10
|
10104 .PP
|
yading@10
|
10105 \fIExamples\fR
|
yading@10
|
10106 .IX Subsection "Examples"
|
yading@10
|
10107 .IP "\(bu" 4
|
yading@10
|
10108 Set the sample rate to 48000 Hz and the channel layout to \s-1AV_CH_LAYOUT_MONO\s0.
|
yading@10
|
10109 .Sp
|
yading@10
|
10110 .Vb 1
|
yading@10
|
10111 \& anullsrc=r=48000:cl=4
|
yading@10
|
10112 .Ve
|
yading@10
|
10113 .IP "\(bu" 4
|
yading@10
|
10114 Do the same operation with a more obvious syntax:
|
yading@10
|
10115 .Sp
|
yading@10
|
10116 .Vb 1
|
yading@10
|
10117 \& anullsrc=r=48000:cl=mono
|
yading@10
|
10118 .Ve
|
yading@10
|
10119 .SS "abuffer"
|
yading@10
|
10120 .IX Subsection "abuffer"
|
yading@10
|
10121 Buffer audio frames, and make them available to the filter chain.
|
yading@10
|
10122 .PP
|
yading@10
|
10123 This source is not intended to be part of user-supplied graph descriptions but
|
yading@10
|
10124 for insertion by calling programs through the interface defined in
|
yading@10
|
10125 \&\fIlibavfilter/buffersrc.h\fR.
|
yading@10
|
10126 .PP
|
yading@10
|
10127 It accepts the following named parameters:
|
yading@10
|
10128 .IP "\fBtime_base\fR" 4
|
yading@10
|
10129 .IX Item "time_base"
|
yading@10
|
10130 Timebase which will be used for timestamps of submitted frames. It must be
|
yading@10
|
10131 either a floating-point number or in \fInumerator\fR/\fIdenominator\fR form.
|
yading@10
|
10132 .IP "\fBsample_rate\fR" 4
|
yading@10
|
10133 .IX Item "sample_rate"
|
yading@10
|
10134 Audio sample rate.
|
yading@10
|
10135 .IP "\fBsample_fmt\fR" 4
|
yading@10
|
10136 .IX Item "sample_fmt"
|
yading@10
|
10137 Name of the sample format, as returned by \f(CW\*(C`av_get_sample_fmt_name()\*(C'\fR.
|
yading@10
|
10138 .IP "\fBchannel_layout\fR" 4
|
yading@10
|
10139 .IX Item "channel_layout"
|
yading@10
|
10140 Channel layout of the audio data, in the form that can be accepted by
|
yading@10
|
10141 \&\f(CW\*(C`av_get_channel_layout()\*(C'\fR.
|
yading@10
|
10142 .PP
|
yading@10
|
10143 All the parameters need to be explicitly defined.
|
yading@10
|
10144 .SS "flite"
|
yading@10
|
10145 .IX Subsection "flite"
|
yading@10
|
10146 Synthesize a voice utterance using the libflite library.
|
yading@10
|
10147 .PP
|
yading@10
|
10148 To enable compilation of this filter you need to configure FFmpeg with
|
yading@10
|
10149 \&\f(CW\*(C`\-\-enable\-libflite\*(C'\fR.
|
yading@10
|
10150 .PP
|
yading@10
|
10151 Note that the flite library is not thread-safe.
|
yading@10
|
10152 .PP
|
yading@10
|
10153 The filter accepts the following options:
|
yading@10
|
10154 .IP "\fBlist_voices\fR" 4
|
yading@10
|
10155 .IX Item "list_voices"
|
yading@10
|
10156 If set to 1, list the names of the available voices and exit
|
yading@10
|
10157 immediately. Default value is 0.
|
yading@10
|
10158 .IP "\fBnb_samples, n\fR" 4
|
yading@10
|
10159 .IX Item "nb_samples, n"
|
yading@10
|
10160 Set the maximum number of samples per frame. Default value is 512.
|
yading@10
|
10161 .IP "\fBtextfile\fR" 4
|
yading@10
|
10162 .IX Item "textfile"
|
yading@10
|
10163 Set the filename containing the text to speak.
|
yading@10
|
10164 .IP "\fBtext\fR" 4
|
yading@10
|
10165 .IX Item "text"
|
yading@10
|
10166 Set the text to speak.
|
yading@10
|
10167 .IP "\fBvoice, v\fR" 4
|
yading@10
|
10168 .IX Item "voice, v"
|
yading@10
|
10169 Set the voice to use for the speech synthesis. Default value is
|
yading@10
|
10170 \&\f(CW\*(C`kal\*(C'\fR. See also the \fIlist_voices\fR option.
|
yading@10
|
10171 .PP
|
yading@10
|
10172 \fIExamples\fR
|
yading@10
|
10173 .IX Subsection "Examples"
|
yading@10
|
10174 .IP "\(bu" 4
|
yading@10
|
10175 Read from file \fIspeech.txt\fR, and synthetize the text using the
|
yading@10
|
10176 standard flite voice:
|
yading@10
|
10177 .Sp
|
yading@10
|
10178 .Vb 1
|
yading@10
|
10179 \& flite=textfile=speech.txt
|
yading@10
|
10180 .Ve
|
yading@10
|
10181 .IP "\(bu" 4
|
yading@10
|
10182 Read the specified text selecting the \f(CW\*(C`slt\*(C'\fR voice:
|
yading@10
|
10183 .Sp
|
yading@10
|
10184 .Vb 1
|
yading@10
|
10185 \& flite=text=\*(AqSo fare thee well, poor devil of a Sub\-Sub, whose commentator I am\*(Aq:voice=slt
|
yading@10
|
10186 .Ve
|
yading@10
|
10187 .IP "\(bu" 4
|
yading@10
|
10188 Input text to ffmpeg:
|
yading@10
|
10189 .Sp
|
yading@10
|
10190 .Vb 1
|
yading@10
|
10191 \& ffmpeg \-f lavfi \-i flite=text=\*(AqSo fare thee well, poor devil of a Sub\-Sub, whose commentator I am\*(Aq:voice=slt
|
yading@10
|
10192 .Ve
|
yading@10
|
10193 .IP "\(bu" 4
|
yading@10
|
10194 Make \fIffplay\fR speak the specified text, using \f(CW\*(C`flite\*(C'\fR and
|
yading@10
|
10195 the \f(CW\*(C`lavfi\*(C'\fR device:
|
yading@10
|
10196 .Sp
|
yading@10
|
10197 .Vb 1
|
yading@10
|
10198 \& ffplay \-f lavfi flite=text=\*(AqNo more be grieved for which that thou hast done.\*(Aq
|
yading@10
|
10199 .Ve
|
yading@10
|
10200 .PP
|
yading@10
|
10201 For more information about libflite, check:
|
yading@10
|
10202 <\fBhttp://www.speech.cs.cmu.edu/flite/\fR>
|
yading@10
|
10203 .SS "sine"
|
yading@10
|
10204 .IX Subsection "sine"
|
yading@10
|
10205 Generate an audio signal made of a sine wave with amplitude 1/8.
|
yading@10
|
10206 .PP
|
yading@10
|
10207 The audio signal is bit-exact.
|
yading@10
|
10208 .PP
|
yading@10
|
10209 The filter accepts the following options:
|
yading@10
|
10210 .IP "\fBfrequency, f\fR" 4
|
yading@10
|
10211 .IX Item "frequency, f"
|
yading@10
|
10212 Set the carrier frequency. Default is 440 Hz.
|
yading@10
|
10213 .IP "\fBbeep_factor, b\fR" 4
|
yading@10
|
10214 .IX Item "beep_factor, b"
|
yading@10
|
10215 Enable a periodic beep every second with frequency \fIbeep_factor\fR times
|
yading@10
|
10216 the carrier frequency. Default is 0, meaning the beep is disabled.
|
yading@10
|
10217 .IP "\fBsample_rate, s\fR" 4
|
yading@10
|
10218 .IX Item "sample_rate, s"
|
yading@10
|
10219 Specify the sample rate, default is 44100.
|
yading@10
|
10220 .IP "\fBduration, d\fR" 4
|
yading@10
|
10221 .IX Item "duration, d"
|
yading@10
|
10222 Specify the duration of the generated audio stream.
|
yading@10
|
10223 .IP "\fBsamples_per_frame\fR" 4
|
yading@10
|
10224 .IX Item "samples_per_frame"
|
yading@10
|
10225 Set the number of samples per output frame, default is 1024.
|
yading@10
|
10226 .PP
|
yading@10
|
10227 \fIExamples\fR
|
yading@10
|
10228 .IX Subsection "Examples"
|
yading@10
|
10229 .IP "\(bu" 4
|
yading@10
|
10230 Generate a simple 440 Hz sine wave:
|
yading@10
|
10231 .Sp
|
yading@10
|
10232 .Vb 1
|
yading@10
|
10233 \& sine
|
yading@10
|
10234 .Ve
|
yading@10
|
10235 .IP "\(bu" 4
|
yading@10
|
10236 Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5 seconds:
|
yading@10
|
10237 .Sp
|
yading@10
|
10238 .Vb 3
|
yading@10
|
10239 \& sine=220:4:d=5
|
yading@10
|
10240 \& sine=f=220:b=4:d=5
|
yading@10
|
10241 \& sine=frequency=220:beep_factor=4:duration=5
|
yading@10
|
10242 .Ve
|
yading@10
|
10243 .SH "AUDIO SINKS"
|
yading@10
|
10244 .IX Header "AUDIO SINKS"
|
yading@10
|
10245 Below is a description of the currently available audio sinks.
|
yading@10
|
10246 .SS "abuffersink"
|
yading@10
|
10247 .IX Subsection "abuffersink"
|
yading@10
|
10248 Buffer audio frames, and make them available to the end of filter chain.
|
yading@10
|
10249 .PP
|
yading@10
|
10250 This sink is mainly intended for programmatic use, in particular
|
yading@10
|
10251 through the interface defined in \fIlibavfilter/buffersink.h\fR
|
yading@10
|
10252 or the options system.
|
yading@10
|
10253 .PP
|
yading@10
|
10254 It accepts a pointer to an AVABufferSinkContext structure, which
|
yading@10
|
10255 defines the incoming buffers' formats, to be passed as the opaque
|
yading@10
|
10256 parameter to \f(CW\*(C`avfilter_init_filter\*(C'\fR for initialization.
|
yading@10
|
10257 .SS "anullsink"
|
yading@10
|
10258 .IX Subsection "anullsink"
|
yading@10
|
10259 Null audio sink, do absolutely nothing with the input audio. It is
|
yading@10
|
10260 mainly useful as a template and to be employed in analysis / debugging
|
yading@10
|
10261 tools.
|
yading@10
|
10262 .SH "VIDEO FILTERS"
|
yading@10
|
10263 .IX Header "VIDEO FILTERS"
|
yading@10
|
10264 When you configure your FFmpeg build, you can disable any of the
|
yading@10
|
10265 existing filters using \f(CW\*(C`\-\-disable\-filters\*(C'\fR.
|
yading@10
|
10266 The configure output will show the video filters included in your
|
yading@10
|
10267 build.
|
yading@10
|
10268 .PP
|
yading@10
|
10269 Below is a description of the currently available video filters.
|
yading@10
|
10270 .SS "alphaextract"
|
yading@10
|
10271 .IX Subsection "alphaextract"
|
yading@10
|
10272 Extract the alpha component from the input as a grayscale video. This
|
yading@10
|
10273 is especially useful with the \fIalphamerge\fR filter.
|
yading@10
|
10274 .SS "alphamerge"
|
yading@10
|
10275 .IX Subsection "alphamerge"
|
yading@10
|
10276 Add or replace the alpha component of the primary input with the
|
yading@10
|
10277 grayscale value of a second input. This is intended for use with
|
yading@10
|
10278 \&\fIalphaextract\fR to allow the transmission or storage of frame
|
yading@10
|
10279 sequences that have alpha in a format that doesn't support an alpha
|
yading@10
|
10280 channel.
|
yading@10
|
10281 .PP
|
yading@10
|
10282 For example, to reconstruct full frames from a normal YUV-encoded video
|
yading@10
|
10283 and a separate video created with \fIalphaextract\fR, you might use:
|
yading@10
|
10284 .PP
|
yading@10
|
10285 .Vb 1
|
yading@10
|
10286 \& movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
|
yading@10
|
10287 .Ve
|
yading@10
|
10288 .PP
|
yading@10
|
10289 Since this filter is designed for reconstruction, it operates on frame
|
yading@10
|
10290 sequences without considering timestamps, and terminates when either
|
yading@10
|
10291 input reaches end of stream. This will cause problems if your encoding
|
yading@10
|
10292 pipeline drops frames. If you're trying to apply an image as an
|
yading@10
|
10293 overlay to a video stream, consider the \fIoverlay\fR filter instead.
|
yading@10
|
10294 .SS "ass"
|
yading@10
|
10295 .IX Subsection "ass"
|
yading@10
|
10296 Same as the subtitles filter, except that it doesn't require libavcodec
|
yading@10
|
10297 and libavformat to work. On the other hand, it is limited to \s-1ASS\s0 (Advanced
|
yading@10
|
10298 Substation Alpha) subtitles files.
|
yading@10
|
10299 .SS "bbox"
|
yading@10
|
10300 .IX Subsection "bbox"
|
yading@10
|
10301 Compute the bounding box for the non-black pixels in the input frame
|
yading@10
|
10302 luminance plane.
|
yading@10
|
10303 .PP
|
yading@10
|
10304 This filter computes the bounding box containing all the pixels with a
|
yading@10
|
10305 luminance value greater than the minimum allowed value.
|
yading@10
|
10306 The parameters describing the bounding box are printed on the filter
|
yading@10
|
10307 log.
|
yading@10
|
10308 .SS "blackdetect"
|
yading@10
|
10309 .IX Subsection "blackdetect"
|
yading@10
|
10310 Detect video intervals that are (almost) completely black. Can be
|
yading@10
|
10311 useful to detect chapter transitions, commercials, or invalid
|
yading@10
|
10312 recordings. Output lines contains the time for the start, end and
|
yading@10
|
10313 duration of the detected black interval expressed in seconds.
|
yading@10
|
10314 .PP
|
yading@10
|
10315 In order to display the output lines, you need to set the loglevel at
|
yading@10
|
10316 least to the \s-1AV_LOG_INFO\s0 value.
|
yading@10
|
10317 .PP
|
yading@10
|
10318 The filter accepts the following options:
|
yading@10
|
10319 .IP "\fBblack_min_duration, d\fR" 4
|
yading@10
|
10320 .IX Item "black_min_duration, d"
|
yading@10
|
10321 Set the minimum detected black duration expressed in seconds. It must
|
yading@10
|
10322 be a non-negative floating point number.
|
yading@10
|
10323 .Sp
|
yading@10
|
10324 Default value is 2.0.
|
yading@10
|
10325 .IP "\fBpicture_black_ratio_th, pic_th\fR" 4
|
yading@10
|
10326 .IX Item "picture_black_ratio_th, pic_th"
|
yading@10
|
10327 Set the threshold for considering a picture \*(L"black\*(R".
|
yading@10
|
10328 Express the minimum value for the ratio:
|
yading@10
|
10329 .Sp
|
yading@10
|
10330 .Vb 1
|
yading@10
|
10331 \& <nb_black_pixels> / <nb_pixels>
|
yading@10
|
10332 .Ve
|
yading@10
|
10333 .Sp
|
yading@10
|
10334 for which a picture is considered black.
|
yading@10
|
10335 Default value is 0.98.
|
yading@10
|
10336 .IP "\fBpixel_black_th, pix_th\fR" 4
|
yading@10
|
10337 .IX Item "pixel_black_th, pix_th"
|
yading@10
|
10338 Set the threshold for considering a pixel \*(L"black\*(R".
|
yading@10
|
10339 .Sp
|
yading@10
|
10340 The threshold expresses the maximum pixel luminance value for which a
|
yading@10
|
10341 pixel is considered \*(L"black\*(R". The provided value is scaled according to
|
yading@10
|
10342 the following equation:
|
yading@10
|
10343 .Sp
|
yading@10
|
10344 .Vb 1
|
yading@10
|
10345 \& <absolute_threshold> = <luminance_minimum_value> + <pixel_black_th> * <luminance_range_size>
|
yading@10
|
10346 .Ve
|
yading@10
|
10347 .Sp
|
yading@10
|
10348 \&\fIluminance_range_size\fR and \fIluminance_minimum_value\fR depend on
|
yading@10
|
10349 the input video format, the range is [0\-255] for \s-1YUV\s0 full-range
|
yading@10
|
10350 formats and [16\-235] for \s-1YUV\s0 non full-range formats.
|
yading@10
|
10351 .Sp
|
yading@10
|
10352 Default value is 0.10.
|
yading@10
|
10353 .PP
|
yading@10
|
10354 The following example sets the maximum pixel threshold to the minimum
|
yading@10
|
10355 value, and detects only black intervals of 2 or more seconds:
|
yading@10
|
10356 .PP
|
yading@10
|
10357 .Vb 1
|
yading@10
|
10358 \& blackdetect=d=2:pix_th=0.00
|
yading@10
|
10359 .Ve
|
yading@10
|
10360 .SS "blackframe"
|
yading@10
|
10361 .IX Subsection "blackframe"
|
yading@10
|
10362 Detect frames that are (almost) completely black. Can be useful to
|
yading@10
|
10363 detect chapter transitions or commercials. Output lines consist of
|
yading@10
|
10364 the frame number of the detected frame, the percentage of blackness,
|
yading@10
|
10365 the position in the file if known or \-1 and the timestamp in seconds.
|
yading@10
|
10366 .PP
|
yading@10
|
10367 In order to display the output lines, you need to set the loglevel at
|
yading@10
|
10368 least to the \s-1AV_LOG_INFO\s0 value.
|
yading@10
|
10369 .PP
|
yading@10
|
10370 The filter accepts the following options:
|
yading@10
|
10371 .IP "\fBamount\fR" 4
|
yading@10
|
10372 .IX Item "amount"
|
yading@10
|
10373 Set the percentage of the pixels that have to be below the threshold, defaults
|
yading@10
|
10374 to \f(CW98\fR.
|
yading@10
|
10375 .IP "\fBthreshold, thresh\fR" 4
|
yading@10
|
10376 .IX Item "threshold, thresh"
|
yading@10
|
10377 Set the threshold below which a pixel value is considered black, defaults to
|
yading@10
|
10378 \&\f(CW32\fR.
|
yading@10
|
10379 .SS "blend"
|
yading@10
|
10380 .IX Subsection "blend"
|
yading@10
|
10381 Blend two video frames into each other.
|
yading@10
|
10382 .PP
|
yading@10
|
10383 It takes two input streams and outputs one stream, the first input is the
|
yading@10
|
10384 \&\*(L"top\*(R" layer and second input is \*(L"bottom\*(R" layer.
|
yading@10
|
10385 Output terminates when shortest input terminates.
|
yading@10
|
10386 .PP
|
yading@10
|
10387 A description of the accepted options follows.
|
yading@10
|
10388 .IP "\fBc0_mode\fR" 4
|
yading@10
|
10389 .IX Item "c0_mode"
|
yading@10
|
10390 .PD 0
|
yading@10
|
10391 .IP "\fBc1_mode\fR" 4
|
yading@10
|
10392 .IX Item "c1_mode"
|
yading@10
|
10393 .IP "\fBc2_mode\fR" 4
|
yading@10
|
10394 .IX Item "c2_mode"
|
yading@10
|
10395 .IP "\fBc3_mode\fR" 4
|
yading@10
|
10396 .IX Item "c3_mode"
|
yading@10
|
10397 .IP "\fBall_mode\fR" 4
|
yading@10
|
10398 .IX Item "all_mode"
|
yading@10
|
10399 .PD
|
yading@10
|
10400 Set blend mode for specific pixel component or all pixel components in case
|
yading@10
|
10401 of \fIall_mode\fR. Default value is \f(CW\*(C`normal\*(C'\fR.
|
yading@10
|
10402 .Sp
|
yading@10
|
10403 Available values for component modes are:
|
yading@10
|
10404 .RS 4
|
yading@10
|
10405 .IP "\fBaddition\fR" 4
|
yading@10
|
10406 .IX Item "addition"
|
yading@10
|
10407 .PD 0
|
yading@10
|
10408 .IP "\fBand\fR" 4
|
yading@10
|
10409 .IX Item "and"
|
yading@10
|
10410 .IP "\fBaverage\fR" 4
|
yading@10
|
10411 .IX Item "average"
|
yading@10
|
10412 .IP "\fBburn\fR" 4
|
yading@10
|
10413 .IX Item "burn"
|
yading@10
|
10414 .IP "\fBdarken\fR" 4
|
yading@10
|
10415 .IX Item "darken"
|
yading@10
|
10416 .IP "\fBdifference\fR" 4
|
yading@10
|
10417 .IX Item "difference"
|
yading@10
|
10418 .IP "\fBdivide\fR" 4
|
yading@10
|
10419 .IX Item "divide"
|
yading@10
|
10420 .IP "\fBdodge\fR" 4
|
yading@10
|
10421 .IX Item "dodge"
|
yading@10
|
10422 .IP "\fBexclusion\fR" 4
|
yading@10
|
10423 .IX Item "exclusion"
|
yading@10
|
10424 .IP "\fBhardlight\fR" 4
|
yading@10
|
10425 .IX Item "hardlight"
|
yading@10
|
10426 .IP "\fBlighten\fR" 4
|
yading@10
|
10427 .IX Item "lighten"
|
yading@10
|
10428 .IP "\fBmultiply\fR" 4
|
yading@10
|
10429 .IX Item "multiply"
|
yading@10
|
10430 .IP "\fBnegation\fR" 4
|
yading@10
|
10431 .IX Item "negation"
|
yading@10
|
10432 .IP "\fBnormal\fR" 4
|
yading@10
|
10433 .IX Item "normal"
|
yading@10
|
10434 .IP "\fBor\fR" 4
|
yading@10
|
10435 .IX Item "or"
|
yading@10
|
10436 .IP "\fBoverlay\fR" 4
|
yading@10
|
10437 .IX Item "overlay"
|
yading@10
|
10438 .IP "\fBphoenix\fR" 4
|
yading@10
|
10439 .IX Item "phoenix"
|
yading@10
|
10440 .IP "\fBpinlight\fR" 4
|
yading@10
|
10441 .IX Item "pinlight"
|
yading@10
|
10442 .IP "\fBreflect\fR" 4
|
yading@10
|
10443 .IX Item "reflect"
|
yading@10
|
10444 .IP "\fBscreen\fR" 4
|
yading@10
|
10445 .IX Item "screen"
|
yading@10
|
10446 .IP "\fBsoftlight\fR" 4
|
yading@10
|
10447 .IX Item "softlight"
|
yading@10
|
10448 .IP "\fBsubtract\fR" 4
|
yading@10
|
10449 .IX Item "subtract"
|
yading@10
|
10450 .IP "\fBvividlight\fR" 4
|
yading@10
|
10451 .IX Item "vividlight"
|
yading@10
|
10452 .IP "\fBxor\fR" 4
|
yading@10
|
10453 .IX Item "xor"
|
yading@10
|
10454 .RE
|
yading@10
|
10455 .RS 4
|
yading@10
|
10456 .RE
|
yading@10
|
10457 .IP "\fBc0_opacity\fR" 4
|
yading@10
|
10458 .IX Item "c0_opacity"
|
yading@10
|
10459 .IP "\fBc1_opacity\fR" 4
|
yading@10
|
10460 .IX Item "c1_opacity"
|
yading@10
|
10461 .IP "\fBc2_opacity\fR" 4
|
yading@10
|
10462 .IX Item "c2_opacity"
|
yading@10
|
10463 .IP "\fBc3_opacity\fR" 4
|
yading@10
|
10464 .IX Item "c3_opacity"
|
yading@10
|
10465 .IP "\fBall_opacity\fR" 4
|
yading@10
|
10466 .IX Item "all_opacity"
|
yading@10
|
10467 .PD
|
yading@10
|
10468 Set blend opacity for specific pixel component or all pixel components in case
|
yading@10
|
10469 of \fIall_opacity\fR. Only used in combination with pixel component blend modes.
|
yading@10
|
10470 .IP "\fBc0_expr\fR" 4
|
yading@10
|
10471 .IX Item "c0_expr"
|
yading@10
|
10472 .PD 0
|
yading@10
|
10473 .IP "\fBc1_expr\fR" 4
|
yading@10
|
10474 .IX Item "c1_expr"
|
yading@10
|
10475 .IP "\fBc2_expr\fR" 4
|
yading@10
|
10476 .IX Item "c2_expr"
|
yading@10
|
10477 .IP "\fBc3_expr\fR" 4
|
yading@10
|
10478 .IX Item "c3_expr"
|
yading@10
|
10479 .IP "\fBall_expr\fR" 4
|
yading@10
|
10480 .IX Item "all_expr"
|
yading@10
|
10481 .PD
|
yading@10
|
10482 Set blend expression for specific pixel component or all pixel components in case
|
yading@10
|
10483 of \fIall_expr\fR. Note that related mode options will be ignored if those are set.
|
yading@10
|
10484 .Sp
|
yading@10
|
10485 The expressions can use the following variables:
|
yading@10
|
10486 .RS 4
|
yading@10
|
10487 .IP "\fBN\fR" 4
|
yading@10
|
10488 .IX Item "N"
|
yading@10
|
10489 The sequential number of the filtered frame, starting from \f(CW0\fR.
|
yading@10
|
10490 .IP "\fBX\fR" 4
|
yading@10
|
10491 .IX Item "X"
|
yading@10
|
10492 .PD 0
|
yading@10
|
10493 .IP "\fBY\fR" 4
|
yading@10
|
10494 .IX Item "Y"
|
yading@10
|
10495 .PD
|
yading@10
|
10496 the coordinates of the current sample
|
yading@10
|
10497 .IP "\fBW\fR" 4
|
yading@10
|
10498 .IX Item "W"
|
yading@10
|
10499 .PD 0
|
yading@10
|
10500 .IP "\fBH\fR" 4
|
yading@10
|
10501 .IX Item "H"
|
yading@10
|
10502 .PD
|
yading@10
|
10503 the width and height of currently filtered plane
|
yading@10
|
10504 .IP "\fB\s-1SW\s0\fR" 4
|
yading@10
|
10505 .IX Item "SW"
|
yading@10
|
10506 .PD 0
|
yading@10
|
10507 .IP "\fB\s-1SH\s0\fR" 4
|
yading@10
|
10508 .IX Item "SH"
|
yading@10
|
10509 .PD
|
yading@10
|
10510 Width and height scale depending on the currently filtered plane. It is the
|
yading@10
|
10511 ratio between the corresponding luma plane number of pixels and the current
|
yading@10
|
10512 plane ones. E.g. for \s-1YUV4:2:0\s0 the values are \f(CW\*(C`1,1\*(C'\fR for the luma plane, and
|
yading@10
|
10513 \&\f(CW\*(C`0.5,0.5\*(C'\fR for chroma planes.
|
yading@10
|
10514 .IP "\fBT\fR" 4
|
yading@10
|
10515 .IX Item "T"
|
yading@10
|
10516 Time of the current frame, expressed in seconds.
|
yading@10
|
10517 .IP "\fB\s-1TOP\s0, A\fR" 4
|
yading@10
|
10518 .IX Item "TOP, A"
|
yading@10
|
10519 Value of pixel component at current location for first video frame (top layer).
|
yading@10
|
10520 .IP "\fB\s-1BOTTOM\s0, B\fR" 4
|
yading@10
|
10521 .IX Item "BOTTOM, B"
|
yading@10
|
10522 Value of pixel component at current location for second video frame (bottom layer).
|
yading@10
|
10523 .RE
|
yading@10
|
10524 .RS 4
|
yading@10
|
10525 .RE
|
yading@10
|
10526 .PP
|
yading@10
|
10527 \fIExamples\fR
|
yading@10
|
10528 .IX Subsection "Examples"
|
yading@10
|
10529 .IP "\(bu" 4
|
yading@10
|
10530 Apply transition from bottom layer to top layer in first 10 seconds:
|
yading@10
|
10531 .Sp
|
yading@10
|
10532 .Vb 1
|
yading@10
|
10533 \& blend=all_expr=\*(AqA*(if(gte(T,10),1,T/10))+B*(1\-(if(gte(T,10),1,T/10)))\*(Aq
|
yading@10
|
10534 .Ve
|
yading@10
|
10535 .IP "\(bu" 4
|
yading@10
|
10536 Apply 1x1 checkerboard effect:
|
yading@10
|
10537 .Sp
|
yading@10
|
10538 .Vb 1
|
yading@10
|
10539 \& blend=all_expr=\*(Aqif(eq(mod(X,2),mod(Y,2)),A,B)\*(Aq
|
yading@10
|
10540 .Ve
|
yading@10
|
10541 .SS "boxblur"
|
yading@10
|
10542 .IX Subsection "boxblur"
|
yading@10
|
10543 Apply boxblur algorithm to the input video.
|
yading@10
|
10544 .PP
|
yading@10
|
10545 The filter accepts the following options:
|
yading@10
|
10546 .IP "\fBluma_radius, lr\fR" 4
|
yading@10
|
10547 .IX Item "luma_radius, lr"
|
yading@10
|
10548 .PD 0
|
yading@10
|
10549 .IP "\fBluma_power, lp\fR" 4
|
yading@10
|
10550 .IX Item "luma_power, lp"
|
yading@10
|
10551 .IP "\fBchroma_radius, cr\fR" 4
|
yading@10
|
10552 .IX Item "chroma_radius, cr"
|
yading@10
|
10553 .IP "\fBchroma_power, cp\fR" 4
|
yading@10
|
10554 .IX Item "chroma_power, cp"
|
yading@10
|
10555 .IP "\fBalpha_radius, ar\fR" 4
|
yading@10
|
10556 .IX Item "alpha_radius, ar"
|
yading@10
|
10557 .IP "\fBalpha_power, ap\fR" 4
|
yading@10
|
10558 .IX Item "alpha_power, ap"
|
yading@10
|
10559 .PD
|
yading@10
|
10560 .PP
|
yading@10
|
10561 A description of the accepted options follows.
|
yading@10
|
10562 .IP "\fBluma_radius, lr\fR" 4
|
yading@10
|
10563 .IX Item "luma_radius, lr"
|
yading@10
|
10564 .PD 0
|
yading@10
|
10565 .IP "\fBchroma_radius, cr\fR" 4
|
yading@10
|
10566 .IX Item "chroma_radius, cr"
|
yading@10
|
10567 .IP "\fBalpha_radius, ar\fR" 4
|
yading@10
|
10568 .IX Item "alpha_radius, ar"
|
yading@10
|
10569 .PD
|
yading@10
|
10570 Set an expression for the box radius in pixels used for blurring the
|
yading@10
|
10571 corresponding input plane.
|
yading@10
|
10572 .Sp
|
yading@10
|
10573 The radius value must be a non-negative number, and must not be
|
yading@10
|
10574 greater than the value of the expression \f(CW\*(C`min(w,h)/2\*(C'\fR for the
|
yading@10
|
10575 luma and alpha planes, and of \f(CW\*(C`min(cw,ch)/2\*(C'\fR for the chroma
|
yading@10
|
10576 planes.
|
yading@10
|
10577 .Sp
|
yading@10
|
10578 Default value for \fBluma_radius\fR is \*(L"2\*(R". If not specified,
|
yading@10
|
10579 \&\fBchroma_radius\fR and \fBalpha_radius\fR default to the
|
yading@10
|
10580 corresponding value set for \fBluma_radius\fR.
|
yading@10
|
10581 .Sp
|
yading@10
|
10582 The expressions can contain the following constants:
|
yading@10
|
10583 .RS 4
|
yading@10
|
10584 .IP "\fBw, h\fR" 4
|
yading@10
|
10585 .IX Item "w, h"
|
yading@10
|
10586 the input width and height in pixels
|
yading@10
|
10587 .IP "\fBcw, ch\fR" 4
|
yading@10
|
10588 .IX Item "cw, ch"
|
yading@10
|
10589 the input chroma image width and height in pixels
|
yading@10
|
10590 .IP "\fBhsub, vsub\fR" 4
|
yading@10
|
10591 .IX Item "hsub, vsub"
|
yading@10
|
10592 horizontal and vertical chroma subsample values. For example for the
|
yading@10
|
10593 pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1.
|
yading@10
|
10594 .RE
|
yading@10
|
10595 .RS 4
|
yading@10
|
10596 .RE
|
yading@10
|
10597 .IP "\fBluma_power, lp\fR" 4
|
yading@10
|
10598 .IX Item "luma_power, lp"
|
yading@10
|
10599 .PD 0
|
yading@10
|
10600 .IP "\fBchroma_power, cp\fR" 4
|
yading@10
|
10601 .IX Item "chroma_power, cp"
|
yading@10
|
10602 .IP "\fBalpha_power, ap\fR" 4
|
yading@10
|
10603 .IX Item "alpha_power, ap"
|
yading@10
|
10604 .PD
|
yading@10
|
10605 Specify how many times the boxblur filter is applied to the
|
yading@10
|
10606 corresponding plane.
|
yading@10
|
10607 .Sp
|
yading@10
|
10608 Default value for \fBluma_power\fR is 2. If not specified,
|
yading@10
|
10609 \&\fBchroma_power\fR and \fBalpha_power\fR default to the
|
yading@10
|
10610 corresponding value set for \fBluma_power\fR.
|
yading@10
|
10611 .Sp
|
yading@10
|
10612 A value of 0 will disable the effect.
|
yading@10
|
10613 .PP
|
yading@10
|
10614 \fIExamples\fR
|
yading@10
|
10615 .IX Subsection "Examples"
|
yading@10
|
10616 .IP "\(bu" 4
|
yading@10
|
10617 Apply a boxblur filter with luma, chroma, and alpha radius
|
yading@10
|
10618 set to 2:
|
yading@10
|
10619 .Sp
|
yading@10
|
10620 .Vb 2
|
yading@10
|
10621 \& boxblur=luma_radius=2:luma_power=1
|
yading@10
|
10622 \& boxblur=2:1
|
yading@10
|
10623 .Ve
|
yading@10
|
10624 .IP "\(bu" 4
|
yading@10
|
10625 Set luma radius to 2, alpha and chroma radius to 0:
|
yading@10
|
10626 .Sp
|
yading@10
|
10627 .Vb 1
|
yading@10
|
10628 \& boxblur=2:1:cr=0:ar=0
|
yading@10
|
10629 .Ve
|
yading@10
|
10630 .IP "\(bu" 4
|
yading@10
|
10631 Set luma and chroma radius to a fraction of the video dimension:
|
yading@10
|
10632 .Sp
|
yading@10
|
10633 .Vb 1
|
yading@10
|
10634 \& boxblur=luma_radius=min(h\e,w)/10:luma_power=1:chroma_radius=min(cw\e,ch)/10:chroma_power=1
|
yading@10
|
10635 .Ve
|
yading@10
|
10636 .SS "colorbalance"
|
yading@10
|
10637 .IX Subsection "colorbalance"
|
yading@10
|
10638 Modify intensity of primary colors (red, green and blue) of input frames.
|
yading@10
|
10639 .PP
|
yading@10
|
10640 The filter allows an input frame to be adjusted in the shadows, midtones or highlights
|
yading@10
|
10641 regions for the red-cyan, green-magenta or blue-yellow balance.
|
yading@10
|
10642 .PP
|
yading@10
|
10643 A positive adjustment value shifts the balance towards the primary color, a negative
|
yading@10
|
10644 value towards the complementary color.
|
yading@10
|
10645 .PP
|
yading@10
|
10646 The filter accepts the following options:
|
yading@10
|
10647 .IP "\fBrs\fR" 4
|
yading@10
|
10648 .IX Item "rs"
|
yading@10
|
10649 .PD 0
|
yading@10
|
10650 .IP "\fBgs\fR" 4
|
yading@10
|
10651 .IX Item "gs"
|
yading@10
|
10652 .IP "\fBbs\fR" 4
|
yading@10
|
10653 .IX Item "bs"
|
yading@10
|
10654 .PD
|
yading@10
|
10655 Adjust red, green and blue shadows (darkest pixels).
|
yading@10
|
10656 .IP "\fBrm\fR" 4
|
yading@10
|
10657 .IX Item "rm"
|
yading@10
|
10658 .PD 0
|
yading@10
|
10659 .IP "\fBgm\fR" 4
|
yading@10
|
10660 .IX Item "gm"
|
yading@10
|
10661 .IP "\fBbm\fR" 4
|
yading@10
|
10662 .IX Item "bm"
|
yading@10
|
10663 .PD
|
yading@10
|
10664 Adjust red, green and blue midtones (medium pixels).
|
yading@10
|
10665 .IP "\fBrh\fR" 4
|
yading@10
|
10666 .IX Item "rh"
|
yading@10
|
10667 .PD 0
|
yading@10
|
10668 .IP "\fBgh\fR" 4
|
yading@10
|
10669 .IX Item "gh"
|
yading@10
|
10670 .IP "\fBbh\fR" 4
|
yading@10
|
10671 .IX Item "bh"
|
yading@10
|
10672 .PD
|
yading@10
|
10673 Adjust red, green and blue highlights (brightest pixels).
|
yading@10
|
10674 .Sp
|
yading@10
|
10675 Allowed ranges for options are \f(CW\*(C`[\-1.0, 1.0]\*(C'\fR. Defaults are \f(CW0\fR.
|
yading@10
|
10676 .PP
|
yading@10
|
10677 \fIExamples\fR
|
yading@10
|
10678 .IX Subsection "Examples"
|
yading@10
|
10679 .IP "\(bu" 4
|
yading@10
|
10680 Add red color cast to shadows:
|
yading@10
|
10681 .Sp
|
yading@10
|
10682 .Vb 1
|
yading@10
|
10683 \& colorbalance=rs=.3
|
yading@10
|
10684 .Ve
|
yading@10
|
10685 .SS "colorchannelmixer"
|
yading@10
|
10686 .IX Subsection "colorchannelmixer"
|
yading@10
|
10687 Adjust video input frames by re-mixing color channels.
|
yading@10
|
10688 .PP
|
yading@10
|
10689 This filter modifies a color channel by adding the values associated to
|
yading@10
|
10690 the other channels of the same pixels. For example if the value to
|
yading@10
|
10691 modify is red, the output value will be:
|
yading@10
|
10692 .PP
|
yading@10
|
10693 .Vb 1
|
yading@10
|
10694 \& <red>=<red>*<rr> + <blue>*<rb> + <green>*<rg> + <alpha>*<ra>
|
yading@10
|
10695 .Ve
|
yading@10
|
10696 .PP
|
yading@10
|
10697 The filter accepts the following options:
|
yading@10
|
10698 .IP "\fBrr\fR" 4
|
yading@10
|
10699 .IX Item "rr"
|
yading@10
|
10700 .PD 0
|
yading@10
|
10701 .IP "\fBrg\fR" 4
|
yading@10
|
10702 .IX Item "rg"
|
yading@10
|
10703 .IP "\fBrb\fR" 4
|
yading@10
|
10704 .IX Item "rb"
|
yading@10
|
10705 .IP "\fBra\fR" 4
|
yading@10
|
10706 .IX Item "ra"
|
yading@10
|
10707 .PD
|
yading@10
|
10708 Adjust contribution of input red, green, blue and alpha channels for output red channel.
|
yading@10
|
10709 Default is \f(CW1\fR for \fIrr\fR, and \f(CW0\fR for \fIrg\fR, \fIrb\fR and \fIra\fR.
|
yading@10
|
10710 .IP "\fBgr\fR" 4
|
yading@10
|
10711 .IX Item "gr"
|
yading@10
|
10712 .PD 0
|
yading@10
|
10713 .IP "\fBgg\fR" 4
|
yading@10
|
10714 .IX Item "gg"
|
yading@10
|
10715 .IP "\fBgb\fR" 4
|
yading@10
|
10716 .IX Item "gb"
|
yading@10
|
10717 .IP "\fBga\fR" 4
|
yading@10
|
10718 .IX Item "ga"
|
yading@10
|
10719 .PD
|
yading@10
|
10720 Adjust contribution of input red, green, blue and alpha channels for output green channel.
|
yading@10
|
10721 Default is \f(CW1\fR for \fIgg\fR, and \f(CW0\fR for \fIgr\fR, \fIgb\fR and \fIga\fR.
|
yading@10
|
10722 .IP "\fBbr\fR" 4
|
yading@10
|
10723 .IX Item "br"
|
yading@10
|
10724 .PD 0
|
yading@10
|
10725 .IP "\fBbg\fR" 4
|
yading@10
|
10726 .IX Item "bg"
|
yading@10
|
10727 .IP "\fBbb\fR" 4
|
yading@10
|
10728 .IX Item "bb"
|
yading@10
|
10729 .IP "\fBba\fR" 4
|
yading@10
|
10730 .IX Item "ba"
|
yading@10
|
10731 .PD
|
yading@10
|
10732 Adjust contribution of input red, green, blue and alpha channels for output blue channel.
|
yading@10
|
10733 Default is \f(CW1\fR for \fIbb\fR, and \f(CW0\fR for \fIbr\fR, \fIbg\fR and \fIba\fR.
|
yading@10
|
10734 .IP "\fBar\fR" 4
|
yading@10
|
10735 .IX Item "ar"
|
yading@10
|
10736 .PD 0
|
yading@10
|
10737 .IP "\fBag\fR" 4
|
yading@10
|
10738 .IX Item "ag"
|
yading@10
|
10739 .IP "\fBab\fR" 4
|
yading@10
|
10740 .IX Item "ab"
|
yading@10
|
10741 .IP "\fBaa\fR" 4
|
yading@10
|
10742 .IX Item "aa"
|
yading@10
|
10743 .PD
|
yading@10
|
10744 Adjust contribution of input red, green, blue and alpha channels for output alpha channel.
|
yading@10
|
10745 Default is \f(CW1\fR for \fIaa\fR, and \f(CW0\fR for \fIar\fR, \fIag\fR and \fIab\fR.
|
yading@10
|
10746 .Sp
|
yading@10
|
10747 Allowed ranges for options are \f(CW\*(C`[\-2.0, 2.0]\*(C'\fR.
|
yading@10
|
10748 .PP
|
yading@10
|
10749 \fIExamples\fR
|
yading@10
|
10750 .IX Subsection "Examples"
|
yading@10
|
10751 .IP "\(bu" 4
|
yading@10
|
10752 Convert source to grayscale:
|
yading@10
|
10753 .Sp
|
yading@10
|
10754 .Vb 1
|
yading@10
|
10755 \& colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
|
yading@10
|
10756 .Ve
|
yading@10
|
10757 .SS "colormatrix"
|
yading@10
|
10758 .IX Subsection "colormatrix"
|
yading@10
|
10759 Convert color matrix.
|
yading@10
|
10760 .PP
|
yading@10
|
10761 The filter accepts the following options:
|
yading@10
|
10762 .IP "\fBsrc\fR" 4
|
yading@10
|
10763 .IX Item "src"
|
yading@10
|
10764 .PD 0
|
yading@10
|
10765 .IP "\fBdst\fR" 4
|
yading@10
|
10766 .IX Item "dst"
|
yading@10
|
10767 .PD
|
yading@10
|
10768 Specify the source and destination color matrix. Both values must be
|
yading@10
|
10769 specified.
|
yading@10
|
10770 .Sp
|
yading@10
|
10771 The accepted values are:
|
yading@10
|
10772 .RS 4
|
yading@10
|
10773 .IP "\fBbt709\fR" 4
|
yading@10
|
10774 .IX Item "bt709"
|
yading@10
|
10775 \&\s-1BT\s0.709
|
yading@10
|
10776 .IP "\fBbt601\fR" 4
|
yading@10
|
10777 .IX Item "bt601"
|
yading@10
|
10778 \&\s-1BT\s0.601
|
yading@10
|
10779 .IP "\fBsmpte240m\fR" 4
|
yading@10
|
10780 .IX Item "smpte240m"
|
yading@10
|
10781 \&\s-1SMPTE\-240M\s0
|
yading@10
|
10782 .IP "\fBfcc\fR" 4
|
yading@10
|
10783 .IX Item "fcc"
|
yading@10
|
10784 \&\s-1FCC\s0
|
yading@10
|
10785 .RE
|
yading@10
|
10786 .RS 4
|
yading@10
|
10787 .RE
|
yading@10
|
10788 .PP
|
yading@10
|
10789 For example to convert from \s-1BT\s0.601 to \s-1SMPTE\-240M\s0, use the command:
|
yading@10
|
10790 .PP
|
yading@10
|
10791 .Vb 1
|
yading@10
|
10792 \& colormatrix=bt601:smpte240m
|
yading@10
|
10793 .Ve
|
yading@10
|
10794 .SS "copy"
|
yading@10
|
10795 .IX Subsection "copy"
|
yading@10
|
10796 Copy the input source unchanged to the output. Mainly useful for
|
yading@10
|
10797 testing purposes.
|
yading@10
|
10798 .SS "crop"
|
yading@10
|
10799 .IX Subsection "crop"
|
yading@10
|
10800 Crop the input video to given dimensions.
|
yading@10
|
10801 .PP
|
yading@10
|
10802 The filter accepts the following options:
|
yading@10
|
10803 .IP "\fBw, out_w\fR" 4
|
yading@10
|
10804 .IX Item "w, out_w"
|
yading@10
|
10805 Width of the output video. It defaults to \f(CW\*(C`iw\*(C'\fR.
|
yading@10
|
10806 This expression is evaluated only once during the filter
|
yading@10
|
10807 configuration.
|
yading@10
|
10808 .IP "\fBh, out_h\fR" 4
|
yading@10
|
10809 .IX Item "h, out_h"
|
yading@10
|
10810 Height of the output video. It defaults to \f(CW\*(C`ih\*(C'\fR.
|
yading@10
|
10811 This expression is evaluated only once during the filter
|
yading@10
|
10812 configuration.
|
yading@10
|
10813 .IP "\fBx\fR" 4
|
yading@10
|
10814 .IX Item "x"
|
yading@10
|
10815 Horizontal position, in the input video, of the left edge of the output video.
|
yading@10
|
10816 It defaults to \f(CW\*(C`(in_w\-out_w)/2\*(C'\fR.
|
yading@10
|
10817 This expression is evaluated per-frame.
|
yading@10
|
10818 .IP "\fBy\fR" 4
|
yading@10
|
10819 .IX Item "y"
|
yading@10
|
10820 Vertical position, in the input video, of the top edge of the output video.
|
yading@10
|
10821 It defaults to \f(CW\*(C`(in_h\-out_h)/2\*(C'\fR.
|
yading@10
|
10822 This expression is evaluated per-frame.
|
yading@10
|
10823 .IP "\fBkeep_aspect\fR" 4
|
yading@10
|
10824 .IX Item "keep_aspect"
|
yading@10
|
10825 If set to 1 will force the output display aspect ratio
|
yading@10
|
10826 to be the same of the input, by changing the output sample aspect
|
yading@10
|
10827 ratio. It defaults to 0.
|
yading@10
|
10828 .PP
|
yading@10
|
10829 The \fIout_w\fR, \fIout_h\fR, \fIx\fR, \fIy\fR parameters are
|
yading@10
|
10830 expressions containing the following constants:
|
yading@10
|
10831 .IP "\fBx, y\fR" 4
|
yading@10
|
10832 .IX Item "x, y"
|
yading@10
|
10833 the computed values for \fIx\fR and \fIy\fR. They are evaluated for
|
yading@10
|
10834 each new frame.
|
yading@10
|
10835 .IP "\fBin_w, in_h\fR" 4
|
yading@10
|
10836 .IX Item "in_w, in_h"
|
yading@10
|
10837 the input width and height
|
yading@10
|
10838 .IP "\fBiw, ih\fR" 4
|
yading@10
|
10839 .IX Item "iw, ih"
|
yading@10
|
10840 same as \fIin_w\fR and \fIin_h\fR
|
yading@10
|
10841 .IP "\fBout_w, out_h\fR" 4
|
yading@10
|
10842 .IX Item "out_w, out_h"
|
yading@10
|
10843 the output (cropped) width and height
|
yading@10
|
10844 .IP "\fBow, oh\fR" 4
|
yading@10
|
10845 .IX Item "ow, oh"
|
yading@10
|
10846 same as \fIout_w\fR and \fIout_h\fR
|
yading@10
|
10847 .IP "\fBa\fR" 4
|
yading@10
|
10848 .IX Item "a"
|
yading@10
|
10849 same as \fIiw\fR / \fIih\fR
|
yading@10
|
10850 .IP "\fBsar\fR" 4
|
yading@10
|
10851 .IX Item "sar"
|
yading@10
|
10852 input sample aspect ratio
|
yading@10
|
10853 .IP "\fBdar\fR" 4
|
yading@10
|
10854 .IX Item "dar"
|
yading@10
|
10855 input display aspect ratio, it is the same as (\fIiw\fR / \fIih\fR) * \fIsar\fR
|
yading@10
|
10856 .IP "\fBhsub, vsub\fR" 4
|
yading@10
|
10857 .IX Item "hsub, vsub"
|
yading@10
|
10858 horizontal and vertical chroma subsample values. For example for the
|
yading@10
|
10859 pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1.
|
yading@10
|
10860 .IP "\fBn\fR" 4
|
yading@10
|
10861 .IX Item "n"
|
yading@10
|
10862 the number of input frame, starting from 0
|
yading@10
|
10863 .IP "\fBpos\fR" 4
|
yading@10
|
10864 .IX Item "pos"
|
yading@10
|
10865 the position in the file of the input frame, \s-1NAN\s0 if unknown
|
yading@10
|
10866 .IP "\fBt\fR" 4
|
yading@10
|
10867 .IX Item "t"
|
yading@10
|
10868 timestamp expressed in seconds, \s-1NAN\s0 if the input timestamp is unknown
|
yading@10
|
10869 .PP
|
yading@10
|
10870 The expression for \fIout_w\fR may depend on the value of \fIout_h\fR,
|
yading@10
|
10871 and the expression for \fIout_h\fR may depend on \fIout_w\fR, but they
|
yading@10
|
10872 cannot depend on \fIx\fR and \fIy\fR, as \fIx\fR and \fIy\fR are
|
yading@10
|
10873 evaluated after \fIout_w\fR and \fIout_h\fR.
|
yading@10
|
10874 .PP
|
yading@10
|
10875 The \fIx\fR and \fIy\fR parameters specify the expressions for the
|
yading@10
|
10876 position of the top-left corner of the output (non-cropped) area. They
|
yading@10
|
10877 are evaluated for each frame. If the evaluated value is not valid, it
|
yading@10
|
10878 is approximated to the nearest valid value.
|
yading@10
|
10879 .PP
|
yading@10
|
10880 The expression for \fIx\fR may depend on \fIy\fR, and the expression
|
yading@10
|
10881 for \fIy\fR may depend on \fIx\fR.
|
yading@10
|
10882 .PP
|
yading@10
|
10883 \fIExamples\fR
|
yading@10
|
10884 .IX Subsection "Examples"
|
yading@10
|
10885 .IP "\(bu" 4
|
yading@10
|
10886 Crop area with size 100x100 at position (12,34).
|
yading@10
|
10887 .Sp
|
yading@10
|
10888 .Vb 1
|
yading@10
|
10889 \& crop=100:100:12:34
|
yading@10
|
10890 .Ve
|
yading@10
|
10891 .Sp
|
yading@10
|
10892 Using named options, the example above becomes:
|
yading@10
|
10893 .Sp
|
yading@10
|
10894 .Vb 1
|
yading@10
|
10895 \& crop=w=100:h=100:x=12:y=34
|
yading@10
|
10896 .Ve
|
yading@10
|
10897 .IP "\(bu" 4
|
yading@10
|
10898 Crop the central input area with size 100x100:
|
yading@10
|
10899 .Sp
|
yading@10
|
10900 .Vb 1
|
yading@10
|
10901 \& crop=100:100
|
yading@10
|
10902 .Ve
|
yading@10
|
10903 .IP "\(bu" 4
|
yading@10
|
10904 Crop the central input area with size 2/3 of the input video:
|
yading@10
|
10905 .Sp
|
yading@10
|
10906 .Vb 1
|
yading@10
|
10907 \& crop=2/3*in_w:2/3*in_h
|
yading@10
|
10908 .Ve
|
yading@10
|
10909 .IP "\(bu" 4
|
yading@10
|
10910 Crop the input video central square:
|
yading@10
|
10911 .Sp
|
yading@10
|
10912 .Vb 2
|
yading@10
|
10913 \& crop=out_w=in_h
|
yading@10
|
10914 \& crop=in_h
|
yading@10
|
10915 .Ve
|
yading@10
|
10916 .IP "\(bu" 4
|
yading@10
|
10917 Delimit the rectangle with the top-left corner placed at position
|
yading@10
|
10918 100:100 and the right-bottom corner corresponding to the right-bottom
|
yading@10
|
10919 corner of the input image:
|
yading@10
|
10920 .Sp
|
yading@10
|
10921 .Vb 1
|
yading@10
|
10922 \& crop=in_w\-100:in_h\-100:100:100
|
yading@10
|
10923 .Ve
|
yading@10
|
10924 .IP "\(bu" 4
|
yading@10
|
10925 Crop 10 pixels from the left and right borders, and 20 pixels from
|
yading@10
|
10926 the top and bottom borders
|
yading@10
|
10927 .Sp
|
yading@10
|
10928 .Vb 1
|
yading@10
|
10929 \& crop=in_w\-2*10:in_h\-2*20
|
yading@10
|
10930 .Ve
|
yading@10
|
10931 .IP "\(bu" 4
|
yading@10
|
10932 Keep only the bottom right quarter of the input image:
|
yading@10
|
10933 .Sp
|
yading@10
|
10934 .Vb 1
|
yading@10
|
10935 \& crop=in_w/2:in_h/2:in_w/2:in_h/2
|
yading@10
|
10936 .Ve
|
yading@10
|
10937 .IP "\(bu" 4
|
yading@10
|
10938 Crop height for getting Greek harmony:
|
yading@10
|
10939 .Sp
|
yading@10
|
10940 .Vb 1
|
yading@10
|
10941 \& crop=in_w:1/PHI*in_w
|
yading@10
|
10942 .Ve
|
yading@10
|
10943 .IP "\(bu" 4
|
yading@10
|
10944 Appply trembling effect:
|
yading@10
|
10945 .Sp
|
yading@10
|
10946 .Vb 1
|
yading@10
|
10947 \& 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)
|
yading@10
|
10948 .Ve
|
yading@10
|
10949 .IP "\(bu" 4
|
yading@10
|
10950 Apply erratic camera effect depending on timestamp:
|
yading@10
|
10951 .Sp
|
yading@10
|
10952 .Vb 1
|
yading@10
|
10953 \& 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)"
|
yading@10
|
10954 .Ve
|
yading@10
|
10955 .IP "\(bu" 4
|
yading@10
|
10956 Set x depending on the value of y:
|
yading@10
|
10957 .Sp
|
yading@10
|
10958 .Vb 1
|
yading@10
|
10959 \& crop=in_w/2:in_h/2:y:10+10*sin(n/10)
|
yading@10
|
10960 .Ve
|
yading@10
|
10961 .SS "cropdetect"
|
yading@10
|
10962 .IX Subsection "cropdetect"
|
yading@10
|
10963 Auto-detect crop size.
|
yading@10
|
10964 .PP
|
yading@10
|
10965 Calculate necessary cropping parameters and prints the recommended
|
yading@10
|
10966 parameters through the logging system. The detected dimensions
|
yading@10
|
10967 correspond to the non-black area of the input video.
|
yading@10
|
10968 .PP
|
yading@10
|
10969 The filter accepts the following options:
|
yading@10
|
10970 .IP "\fBlimit\fR" 4
|
yading@10
|
10971 .IX Item "limit"
|
yading@10
|
10972 Set higher black value threshold, which can be optionally specified
|
yading@10
|
10973 from nothing (0) to everything (255). An intensity value greater
|
yading@10
|
10974 to the set value is considered non-black. Default value is 24.
|
yading@10
|
10975 .IP "\fBround\fR" 4
|
yading@10
|
10976 .IX Item "round"
|
yading@10
|
10977 Set the value for which the width/height should be divisible by. The
|
yading@10
|
10978 offset is automatically adjusted to center the video. Use 2 to get
|
yading@10
|
10979 only even dimensions (needed for 4:2:2 video). 16 is best when
|
yading@10
|
10980 encoding to most video codecs. Default value is 16.
|
yading@10
|
10981 .IP "\fBreset_count, reset\fR" 4
|
yading@10
|
10982 .IX Item "reset_count, reset"
|
yading@10
|
10983 Set the counter that determines after how many frames cropdetect will
|
yading@10
|
10984 reset the previously detected largest video area and start over to
|
yading@10
|
10985 detect the current optimal crop area. Default value is 0.
|
yading@10
|
10986 .Sp
|
yading@10
|
10987 This can be useful when channel logos distort the video area. 0
|
yading@10
|
10988 indicates never reset and return the largest area encountered during
|
yading@10
|
10989 playback.
|
yading@10
|
10990 .SS "curves"
|
yading@10
|
10991 .IX Subsection "curves"
|
yading@10
|
10992 Apply color adjustments using curves.
|
yading@10
|
10993 .PP
|
yading@10
|
10994 This filter is similar to the Adobe Photoshop and \s-1GIMP\s0 curves tools. Each
|
yading@10
|
10995 component (red, green and blue) has its values defined by \fIN\fR key points
|
yading@10
|
10996 tied from each other using a smooth curve. The x\-axis represents the pixel
|
yading@10
|
10997 values from the input frame, and the y\-axis the new pixel values to be set for
|
yading@10
|
10998 the output frame.
|
yading@10
|
10999 .PP
|
yading@10
|
11000 By default, a component curve is defined by the two points \fI(0;0)\fR and
|
yading@10
|
11001 \&\fI(1;1)\fR. This creates a straight line where each original pixel value is
|
yading@10
|
11002 \&\*(L"adjusted\*(R" to its own value, which means no change to the image.
|
yading@10
|
11003 .PP
|
yading@10
|
11004 The filter allows you to redefine these two points and add some more. A new
|
yading@10
|
11005 curve (using a natural cubic spline interpolation) will be define to pass
|
yading@10
|
11006 smoothly through all these new coordinates. The new defined points needs to be
|
yading@10
|
11007 strictly increasing over the x\-axis, and their \fIx\fR and \fIy\fR values must
|
yading@10
|
11008 be in the \fI[0;1]\fR interval. If the computed curves happened to go outside
|
yading@10
|
11009 the vector spaces, the values will be clipped accordingly.
|
yading@10
|
11010 .PP
|
yading@10
|
11011 If there is no key point defined in \f(CW\*(C`x=0\*(C'\fR, the filter will automatically
|
yading@10
|
11012 insert a \fI(0;0)\fR point. In the same way, if there is no key point defined
|
yading@10
|
11013 in \f(CW\*(C`x=1\*(C'\fR, the filter will automatically insert a \fI(1;1)\fR point.
|
yading@10
|
11014 .PP
|
yading@10
|
11015 The filter accepts the following options:
|
yading@10
|
11016 .IP "\fBpreset\fR" 4
|
yading@10
|
11017 .IX Item "preset"
|
yading@10
|
11018 Select one of the available color presets. This option can be used in addition
|
yading@10
|
11019 to the \fBr\fR, \fBg\fR, \fBb\fR parameters; in this case, the later
|
yading@10
|
11020 options takes priority on the preset values.
|
yading@10
|
11021 Available presets are:
|
yading@10
|
11022 .RS 4
|
yading@10
|
11023 .IP "\fBnone\fR" 4
|
yading@10
|
11024 .IX Item "none"
|
yading@10
|
11025 .PD 0
|
yading@10
|
11026 .IP "\fBcolor_negative\fR" 4
|
yading@10
|
11027 .IX Item "color_negative"
|
yading@10
|
11028 .IP "\fBcross_process\fR" 4
|
yading@10
|
11029 .IX Item "cross_process"
|
yading@10
|
11030 .IP "\fBdarker\fR" 4
|
yading@10
|
11031 .IX Item "darker"
|
yading@10
|
11032 .IP "\fBincrease_contrast\fR" 4
|
yading@10
|
11033 .IX Item "increase_contrast"
|
yading@10
|
11034 .IP "\fBlighter\fR" 4
|
yading@10
|
11035 .IX Item "lighter"
|
yading@10
|
11036 .IP "\fBlinear_contrast\fR" 4
|
yading@10
|
11037 .IX Item "linear_contrast"
|
yading@10
|
11038 .IP "\fBmedium_contrast\fR" 4
|
yading@10
|
11039 .IX Item "medium_contrast"
|
yading@10
|
11040 .IP "\fBnegative\fR" 4
|
yading@10
|
11041 .IX Item "negative"
|
yading@10
|
11042 .IP "\fBstrong_contrast\fR" 4
|
yading@10
|
11043 .IX Item "strong_contrast"
|
yading@10
|
11044 .IP "\fBvintage\fR" 4
|
yading@10
|
11045 .IX Item "vintage"
|
yading@10
|
11046 .RE
|
yading@10
|
11047 .RS 4
|
yading@10
|
11048 .PD
|
yading@10
|
11049 .Sp
|
yading@10
|
11050 Default is \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
11051 .RE
|
yading@10
|
11052 .IP "\fBmaster, m\fR" 4
|
yading@10
|
11053 .IX Item "master, m"
|
yading@10
|
11054 Set the master key points. These points will define a second pass mapping. It
|
yading@10
|
11055 is sometimes called a \*(L"luminance\*(R" or \*(L"value\*(R" mapping. It can be used with
|
yading@10
|
11056 \&\fBr\fR, \fBg\fR, \fBb\fR or \fBall\fR since it acts like a
|
yading@10
|
11057 post-processing \s-1LUT\s0.
|
yading@10
|
11058 .IP "\fBred, r\fR" 4
|
yading@10
|
11059 .IX Item "red, r"
|
yading@10
|
11060 Set the key points for the red component.
|
yading@10
|
11061 .IP "\fBgreen, g\fR" 4
|
yading@10
|
11062 .IX Item "green, g"
|
yading@10
|
11063 Set the key points for the green component.
|
yading@10
|
11064 .IP "\fBblue, b\fR" 4
|
yading@10
|
11065 .IX Item "blue, b"
|
yading@10
|
11066 Set the key points for the blue component.
|
yading@10
|
11067 .IP "\fBall\fR" 4
|
yading@10
|
11068 .IX Item "all"
|
yading@10
|
11069 Set the key points for all components (not including master).
|
yading@10
|
11070 Can be used in addition to the other key points component
|
yading@10
|
11071 options. In this case, the unset component(s) will fallback on this
|
yading@10
|
11072 \&\fBall\fR setting.
|
yading@10
|
11073 .IP "\fBpsfile\fR" 4
|
yading@10
|
11074 .IX Item "psfile"
|
yading@10
|
11075 Specify a Photoshop curves file (\f(CW\*(C`.asv\*(C'\fR) to import the settings from.
|
yading@10
|
11076 .PP
|
yading@10
|
11077 To avoid some filtergraph syntax conflicts, each key points list need to be
|
yading@10
|
11078 defined using the following syntax: \f(CW\*(C`x0/y0 x1/y1 x2/y2 ...\*(C'\fR.
|
yading@10
|
11079 .PP
|
yading@10
|
11080 \fIExamples\fR
|
yading@10
|
11081 .IX Subsection "Examples"
|
yading@10
|
11082 .IP "\(bu" 4
|
yading@10
|
11083 Increase slightly the middle level of blue:
|
yading@10
|
11084 .Sp
|
yading@10
|
11085 .Vb 1
|
yading@10
|
11086 \& curves=blue=\*(Aq0.5/0.58\*(Aq
|
yading@10
|
11087 .Ve
|
yading@10
|
11088 .IP "\(bu" 4
|
yading@10
|
11089 Vintage effect:
|
yading@10
|
11090 .Sp
|
yading@10
|
11091 .Vb 1
|
yading@10
|
11092 \& curves=r=\*(Aq0/0.11 .42/.51 1/0.95\*(Aq:g=\*(Aq0.50/0.48\*(Aq:b=\*(Aq0/0.22 .49/.44 1/0.8\*(Aq
|
yading@10
|
11093 .Ve
|
yading@10
|
11094 .Sp
|
yading@10
|
11095 Here we obtain the following coordinates for each components:
|
yading@10
|
11096 .RS 4
|
yading@10
|
11097 .IP "\fIred\fR" 4
|
yading@10
|
11098 .IX Item "red"
|
yading@10
|
11099 \&\f(CW\*(C`(0;0.11) (0.42;0.51) (1;0.95)\*(C'\fR
|
yading@10
|
11100 .IP "\fIgreen\fR" 4
|
yading@10
|
11101 .IX Item "green"
|
yading@10
|
11102 \&\f(CW\*(C`(0;0) (0.50;0.48) (1;1)\*(C'\fR
|
yading@10
|
11103 .IP "\fIblue\fR" 4
|
yading@10
|
11104 .IX Item "blue"
|
yading@10
|
11105 \&\f(CW\*(C`(0;0.22) (0.49;0.44) (1;0.80)\*(C'\fR
|
yading@10
|
11106 .RE
|
yading@10
|
11107 .RS 4
|
yading@10
|
11108 .RE
|
yading@10
|
11109 .IP "\(bu" 4
|
yading@10
|
11110 The previous example can also be achieved with the associated built-in preset:
|
yading@10
|
11111 .Sp
|
yading@10
|
11112 .Vb 1
|
yading@10
|
11113 \& curves=preset=vintage
|
yading@10
|
11114 .Ve
|
yading@10
|
11115 .IP "\(bu" 4
|
yading@10
|
11116 Or simply:
|
yading@10
|
11117 .Sp
|
yading@10
|
11118 .Vb 1
|
yading@10
|
11119 \& curves=vintage
|
yading@10
|
11120 .Ve
|
yading@10
|
11121 .IP "\(bu" 4
|
yading@10
|
11122 Use a Photoshop preset and redefine the points of the green component:
|
yading@10
|
11123 .Sp
|
yading@10
|
11124 .Vb 1
|
yading@10
|
11125 \& curves=psfile=\*(AqMyCurvesPresets/purple.asv\*(Aq:green=\*(Aq0.45/0.53\*(Aq
|
yading@10
|
11126 .Ve
|
yading@10
|
11127 .SS "decimate"
|
yading@10
|
11128 .IX Subsection "decimate"
|
yading@10
|
11129 Drop duplicated frames at regular intervals.
|
yading@10
|
11130 .PP
|
yading@10
|
11131 The filter accepts the following options:
|
yading@10
|
11132 .IP "\fBcycle\fR" 4
|
yading@10
|
11133 .IX Item "cycle"
|
yading@10
|
11134 Set the number of frames from which one will be dropped. Setting this to
|
yading@10
|
11135 \&\fIN\fR means one frame in every batch of \fIN\fR frames will be dropped.
|
yading@10
|
11136 Default is \f(CW5\fR.
|
yading@10
|
11137 .IP "\fBdupthresh\fR" 4
|
yading@10
|
11138 .IX Item "dupthresh"
|
yading@10
|
11139 Set the threshold for duplicate detection. If the difference metric for a frame
|
yading@10
|
11140 is less than or equal to this value, then it is declared as duplicate. Default
|
yading@10
|
11141 is \f(CW1.1\fR
|
yading@10
|
11142 .IP "\fBscthresh\fR" 4
|
yading@10
|
11143 .IX Item "scthresh"
|
yading@10
|
11144 Set scene change threshold. Default is \f(CW15\fR.
|
yading@10
|
11145 .IP "\fBblockx\fR" 4
|
yading@10
|
11146 .IX Item "blockx"
|
yading@10
|
11147 .PD 0
|
yading@10
|
11148 .IP "\fBblocky\fR" 4
|
yading@10
|
11149 .IX Item "blocky"
|
yading@10
|
11150 .PD
|
yading@10
|
11151 Set the size of the x and y\-axis blocks used during metric calculations.
|
yading@10
|
11152 Larger blocks give better noise suppression, but also give worse detection of
|
yading@10
|
11153 small movements. Must be a power of two. Default is \f(CW32\fR.
|
yading@10
|
11154 .IP "\fBppsrc\fR" 4
|
yading@10
|
11155 .IX Item "ppsrc"
|
yading@10
|
11156 Mark main input as a pre-processed input and activate clean source input
|
yading@10
|
11157 stream. This allows the input to be pre-processed with various filters to help
|
yading@10
|
11158 the metrics calculation while keeping the frame selection lossless. When set to
|
yading@10
|
11159 \&\f(CW1\fR, the first stream is for the pre-processed input, and the second
|
yading@10
|
11160 stream is the clean source from where the kept frames are chosen. Default is
|
yading@10
|
11161 \&\f(CW0\fR.
|
yading@10
|
11162 .IP "\fBchroma\fR" 4
|
yading@10
|
11163 .IX Item "chroma"
|
yading@10
|
11164 Set whether or not chroma is considered in the metric calculations. Default is
|
yading@10
|
11165 \&\f(CW1\fR.
|
yading@10
|
11166 .SS "delogo"
|
yading@10
|
11167 .IX Subsection "delogo"
|
yading@10
|
11168 Suppress a \s-1TV\s0 station logo by a simple interpolation of the surrounding
|
yading@10
|
11169 pixels. Just set a rectangle covering the logo and watch it disappear
|
yading@10
|
11170 (and sometimes something even uglier appear \- your mileage may vary).
|
yading@10
|
11171 .PP
|
yading@10
|
11172 This filter accepts the following options:
|
yading@10
|
11173 .IP "\fBx, y\fR" 4
|
yading@10
|
11174 .IX Item "x, y"
|
yading@10
|
11175 Specify the top left corner coordinates of the logo. They must be
|
yading@10
|
11176 specified.
|
yading@10
|
11177 .IP "\fBw, h\fR" 4
|
yading@10
|
11178 .IX Item "w, h"
|
yading@10
|
11179 Specify the width and height of the logo to clear. They must be
|
yading@10
|
11180 specified.
|
yading@10
|
11181 .IP "\fBband, t\fR" 4
|
yading@10
|
11182 .IX Item "band, t"
|
yading@10
|
11183 Specify the thickness of the fuzzy edge of the rectangle (added to
|
yading@10
|
11184 \&\fIw\fR and \fIh\fR). The default value is 4.
|
yading@10
|
11185 .IP "\fBshow\fR" 4
|
yading@10
|
11186 .IX Item "show"
|
yading@10
|
11187 When set to 1, a green rectangle is drawn on the screen to simplify
|
yading@10
|
11188 finding the right \fIx\fR, \fIy\fR, \fIw\fR, \fIh\fR parameters, and
|
yading@10
|
11189 \&\fIband\fR is set to 4. The default value is 0.
|
yading@10
|
11190 .PP
|
yading@10
|
11191 \fIExamples\fR
|
yading@10
|
11192 .IX Subsection "Examples"
|
yading@10
|
11193 .IP "\(bu" 4
|
yading@10
|
11194 Set a rectangle covering the area with top left corner coordinates 0,0
|
yading@10
|
11195 and size 100x77, setting a band of size 10:
|
yading@10
|
11196 .Sp
|
yading@10
|
11197 .Vb 1
|
yading@10
|
11198 \& delogo=x=0:y=0:w=100:h=77:band=10
|
yading@10
|
11199 .Ve
|
yading@10
|
11200 .SS "deshake"
|
yading@10
|
11201 .IX Subsection "deshake"
|
yading@10
|
11202 Attempt to fix small changes in horizontal and/or vertical shift. This
|
yading@10
|
11203 filter helps remove camera shake from hand-holding a camera, bumping a
|
yading@10
|
11204 tripod, moving on a vehicle, etc.
|
yading@10
|
11205 .PP
|
yading@10
|
11206 The filter accepts the following options:
|
yading@10
|
11207 .IP "\fBx\fR" 4
|
yading@10
|
11208 .IX Item "x"
|
yading@10
|
11209 .PD 0
|
yading@10
|
11210 .IP "\fBy\fR" 4
|
yading@10
|
11211 .IX Item "y"
|
yading@10
|
11212 .IP "\fBw\fR" 4
|
yading@10
|
11213 .IX Item "w"
|
yading@10
|
11214 .IP "\fBh\fR" 4
|
yading@10
|
11215 .IX Item "h"
|
yading@10
|
11216 .PD
|
yading@10
|
11217 Specify a rectangular area where to limit the search for motion
|
yading@10
|
11218 vectors.
|
yading@10
|
11219 If desired the search for motion vectors can be limited to a
|
yading@10
|
11220 rectangular area of the frame defined by its top left corner, width
|
yading@10
|
11221 and height. These parameters have the same meaning as the drawbox
|
yading@10
|
11222 filter which can be used to visualise the position of the bounding
|
yading@10
|
11223 box.
|
yading@10
|
11224 .Sp
|
yading@10
|
11225 This is useful when simultaneous movement of subjects within the frame
|
yading@10
|
11226 might be confused for camera motion by the motion vector search.
|
yading@10
|
11227 .Sp
|
yading@10
|
11228 If any or all of \fIx\fR, \fIy\fR, \fIw\fR and \fIh\fR are set to \-1
|
yading@10
|
11229 then the full frame is used. This allows later options to be set
|
yading@10
|
11230 without specifying the bounding box for the motion vector search.
|
yading@10
|
11231 .Sp
|
yading@10
|
11232 Default \- search the whole frame.
|
yading@10
|
11233 .IP "\fBrx\fR" 4
|
yading@10
|
11234 .IX Item "rx"
|
yading@10
|
11235 .PD 0
|
yading@10
|
11236 .IP "\fBry\fR" 4
|
yading@10
|
11237 .IX Item "ry"
|
yading@10
|
11238 .PD
|
yading@10
|
11239 Specify the maximum extent of movement in x and y directions in the
|
yading@10
|
11240 range 0\-64 pixels. Default 16.
|
yading@10
|
11241 .IP "\fBedge\fR" 4
|
yading@10
|
11242 .IX Item "edge"
|
yading@10
|
11243 Specify how to generate pixels to fill blanks at the edge of the
|
yading@10
|
11244 frame. Available values are:
|
yading@10
|
11245 .RS 4
|
yading@10
|
11246 .IP "\fBblank, 0\fR" 4
|
yading@10
|
11247 .IX Item "blank, 0"
|
yading@10
|
11248 Fill zeroes at blank locations
|
yading@10
|
11249 .IP "\fBoriginal, 1\fR" 4
|
yading@10
|
11250 .IX Item "original, 1"
|
yading@10
|
11251 Original image at blank locations
|
yading@10
|
11252 .IP "\fBclamp, 2\fR" 4
|
yading@10
|
11253 .IX Item "clamp, 2"
|
yading@10
|
11254 Extruded edge value at blank locations
|
yading@10
|
11255 .IP "\fBmirror, 3\fR" 4
|
yading@10
|
11256 .IX Item "mirror, 3"
|
yading@10
|
11257 Mirrored edge at blank locations
|
yading@10
|
11258 .RE
|
yading@10
|
11259 .RS 4
|
yading@10
|
11260 .Sp
|
yading@10
|
11261 Default value is \fBmirror\fR.
|
yading@10
|
11262 .RE
|
yading@10
|
11263 .IP "\fBblocksize\fR" 4
|
yading@10
|
11264 .IX Item "blocksize"
|
yading@10
|
11265 Specify the blocksize to use for motion search. Range 4\-128 pixels,
|
yading@10
|
11266 default 8.
|
yading@10
|
11267 .IP "\fBcontrast\fR" 4
|
yading@10
|
11268 .IX Item "contrast"
|
yading@10
|
11269 Specify the contrast threshold for blocks. Only blocks with more than
|
yading@10
|
11270 the specified contrast (difference between darkest and lightest
|
yading@10
|
11271 pixels) will be considered. Range 1\-255, default 125.
|
yading@10
|
11272 .IP "\fBsearch\fR" 4
|
yading@10
|
11273 .IX Item "search"
|
yading@10
|
11274 Specify the search strategy. Available values are:
|
yading@10
|
11275 .RS 4
|
yading@10
|
11276 .IP "\fBexhaustive, 0\fR" 4
|
yading@10
|
11277 .IX Item "exhaustive, 0"
|
yading@10
|
11278 Set exhaustive search
|
yading@10
|
11279 .IP "\fBless, 1\fR" 4
|
yading@10
|
11280 .IX Item "less, 1"
|
yading@10
|
11281 Set less exhaustive search.
|
yading@10
|
11282 .RE
|
yading@10
|
11283 .RS 4
|
yading@10
|
11284 .Sp
|
yading@10
|
11285 Default value is \fBexhaustive\fR.
|
yading@10
|
11286 .RE
|
yading@10
|
11287 .IP "\fBfilename\fR" 4
|
yading@10
|
11288 .IX Item "filename"
|
yading@10
|
11289 If set then a detailed log of the motion search is written to the
|
yading@10
|
11290 specified file.
|
yading@10
|
11291 .IP "\fBopencl\fR" 4
|
yading@10
|
11292 .IX Item "opencl"
|
yading@10
|
11293 If set to 1, specify using OpenCL capabilities, only available if
|
yading@10
|
11294 FFmpeg was configured with \f(CW\*(C`\-\-enable\-opencl\*(C'\fR. Default value is 0.
|
yading@10
|
11295 .SS "drawbox"
|
yading@10
|
11296 .IX Subsection "drawbox"
|
yading@10
|
11297 Draw a colored box on the input image.
|
yading@10
|
11298 .PP
|
yading@10
|
11299 This filter accepts the following options:
|
yading@10
|
11300 .IP "\fBx, y\fR" 4
|
yading@10
|
11301 .IX Item "x, y"
|
yading@10
|
11302 Specify the top left corner coordinates of the box. Default to 0.
|
yading@10
|
11303 .IP "\fBwidth, w\fR" 4
|
yading@10
|
11304 .IX Item "width, w"
|
yading@10
|
11305 .PD 0
|
yading@10
|
11306 .IP "\fBheight, h\fR" 4
|
yading@10
|
11307 .IX Item "height, h"
|
yading@10
|
11308 .PD
|
yading@10
|
11309 Specify the width and height of the box, if 0 they are interpreted as
|
yading@10
|
11310 the input width and height. Default to 0.
|
yading@10
|
11311 .IP "\fBcolor, c\fR" 4
|
yading@10
|
11312 .IX Item "color, c"
|
yading@10
|
11313 Specify the color of the box to write, it can be the name of a color
|
yading@10
|
11314 (case insensitive match) or a 0xRRGGBB[\s-1AA\s0] sequence. If the special
|
yading@10
|
11315 value \f(CW\*(C`invert\*(C'\fR is used, the box edge color is the same as the
|
yading@10
|
11316 video with inverted luma.
|
yading@10
|
11317 .IP "\fBthickness, t\fR" 4
|
yading@10
|
11318 .IX Item "thickness, t"
|
yading@10
|
11319 Set the thickness of the box edge. Default value is \f(CW4\fR.
|
yading@10
|
11320 .PP
|
yading@10
|
11321 \fIExamples\fR
|
yading@10
|
11322 .IX Subsection "Examples"
|
yading@10
|
11323 .IP "\(bu" 4
|
yading@10
|
11324 Draw a black box around the edge of the input image:
|
yading@10
|
11325 .Sp
|
yading@10
|
11326 .Vb 1
|
yading@10
|
11327 \& drawbox
|
yading@10
|
11328 .Ve
|
yading@10
|
11329 .IP "\(bu" 4
|
yading@10
|
11330 Draw a box with color red and an opacity of 50%:
|
yading@10
|
11331 .Sp
|
yading@10
|
11332 .Vb 1
|
yading@10
|
11333 \& drawbox=10:20:200:60:red@0.5
|
yading@10
|
11334 .Ve
|
yading@10
|
11335 .Sp
|
yading@10
|
11336 The previous example can be specified as:
|
yading@10
|
11337 .Sp
|
yading@10
|
11338 .Vb 1
|
yading@10
|
11339 \& drawbox=x=10:y=20:w=200:h=60:color=red@0.5
|
yading@10
|
11340 .Ve
|
yading@10
|
11341 .IP "\(bu" 4
|
yading@10
|
11342 Fill the box with pink color:
|
yading@10
|
11343 .Sp
|
yading@10
|
11344 .Vb 1
|
yading@10
|
11345 \& drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=max
|
yading@10
|
11346 .Ve
|
yading@10
|
11347 .SS "drawtext"
|
yading@10
|
11348 .IX Subsection "drawtext"
|
yading@10
|
11349 Draw text string or text from specified file on top of video using the
|
yading@10
|
11350 libfreetype library.
|
yading@10
|
11351 .PP
|
yading@10
|
11352 To enable compilation of this filter you need to configure FFmpeg with
|
yading@10
|
11353 \&\f(CW\*(C`\-\-enable\-libfreetype\*(C'\fR.
|
yading@10
|
11354 .PP
|
yading@10
|
11355 \fISyntax\fR
|
yading@10
|
11356 .IX Subsection "Syntax"
|
yading@10
|
11357 .PP
|
yading@10
|
11358 The description of the accepted parameters follows.
|
yading@10
|
11359 .IP "\fBbox\fR" 4
|
yading@10
|
11360 .IX Item "box"
|
yading@10
|
11361 Used to draw a box around text using background color.
|
yading@10
|
11362 Value should be either 1 (enable) or 0 (disable).
|
yading@10
|
11363 The default value of \fIbox\fR is 0.
|
yading@10
|
11364 .IP "\fBboxcolor\fR" 4
|
yading@10
|
11365 .IX Item "boxcolor"
|
yading@10
|
11366 The color to be used for drawing box around text.
|
yading@10
|
11367 Either a string (e.g. \*(L"yellow\*(R") or in 0xRRGGBB[\s-1AA\s0] format
|
yading@10
|
11368 (e.g. \*(L"0xff00ff\*(R"), possibly followed by an alpha specifier.
|
yading@10
|
11369 The default value of \fIboxcolor\fR is \*(L"white\*(R".
|
yading@10
|
11370 .IP "\fBdraw\fR" 4
|
yading@10
|
11371 .IX Item "draw"
|
yading@10
|
11372 Set an expression which specifies if the text should be drawn. If the
|
yading@10
|
11373 expression evaluates to 0, the text is not drawn. This is useful for
|
yading@10
|
11374 specifying that the text should be drawn only when specific conditions
|
yading@10
|
11375 are met.
|
yading@10
|
11376 .Sp
|
yading@10
|
11377 Default value is \*(L"1\*(R".
|
yading@10
|
11378 .Sp
|
yading@10
|
11379 See below for the list of accepted constants and functions.
|
yading@10
|
11380 .IP "\fBexpansion\fR" 4
|
yading@10
|
11381 .IX Item "expansion"
|
yading@10
|
11382 Select how the \fItext\fR is expanded. Can be either \f(CW\*(C`none\*(C'\fR,
|
yading@10
|
11383 \&\f(CW\*(C`strftime\*(C'\fR (deprecated) or
|
yading@10
|
11384 \&\f(CW\*(C`normal\*(C'\fR (default). See the drawtext_expansion, Text expansion section
|
yading@10
|
11385 below for details.
|
yading@10
|
11386 .IP "\fBfix_bounds\fR" 4
|
yading@10
|
11387 .IX Item "fix_bounds"
|
yading@10
|
11388 If true, check and fix text coords to avoid clipping.
|
yading@10
|
11389 .IP "\fBfontcolor\fR" 4
|
yading@10
|
11390 .IX Item "fontcolor"
|
yading@10
|
11391 The color to be used for drawing fonts.
|
yading@10
|
11392 Either a string (e.g. \*(L"red\*(R") or in 0xRRGGBB[\s-1AA\s0] format
|
yading@10
|
11393 (e.g. \*(L"0xff000033\*(R"), possibly followed by an alpha specifier.
|
yading@10
|
11394 The default value of \fIfontcolor\fR is \*(L"black\*(R".
|
yading@10
|
11395 .IP "\fBfontfile\fR" 4
|
yading@10
|
11396 .IX Item "fontfile"
|
yading@10
|
11397 The font file to be used for drawing text. Path must be included.
|
yading@10
|
11398 This parameter is mandatory.
|
yading@10
|
11399 .IP "\fBfontsize\fR" 4
|
yading@10
|
11400 .IX Item "fontsize"
|
yading@10
|
11401 The font size to be used for drawing text.
|
yading@10
|
11402 The default value of \fIfontsize\fR is 16.
|
yading@10
|
11403 .IP "\fBft_load_flags\fR" 4
|
yading@10
|
11404 .IX Item "ft_load_flags"
|
yading@10
|
11405 Flags to be used for loading the fonts.
|
yading@10
|
11406 .Sp
|
yading@10
|
11407 The flags map the corresponding flags supported by libfreetype, and are
|
yading@10
|
11408 a combination of the following values:
|
yading@10
|
11409 .RS 4
|
yading@10
|
11410 .IP "\fIdefault\fR" 4
|
yading@10
|
11411 .IX Item "default"
|
yading@10
|
11412 .PD 0
|
yading@10
|
11413 .IP "\fIno_scale\fR" 4
|
yading@10
|
11414 .IX Item "no_scale"
|
yading@10
|
11415 .IP "\fIno_hinting\fR" 4
|
yading@10
|
11416 .IX Item "no_hinting"
|
yading@10
|
11417 .IP "\fIrender\fR" 4
|
yading@10
|
11418 .IX Item "render"
|
yading@10
|
11419 .IP "\fIno_bitmap\fR" 4
|
yading@10
|
11420 .IX Item "no_bitmap"
|
yading@10
|
11421 .IP "\fIvertical_layout\fR" 4
|
yading@10
|
11422 .IX Item "vertical_layout"
|
yading@10
|
11423 .IP "\fIforce_autohint\fR" 4
|
yading@10
|
11424 .IX Item "force_autohint"
|
yading@10
|
11425 .IP "\fIcrop_bitmap\fR" 4
|
yading@10
|
11426 .IX Item "crop_bitmap"
|
yading@10
|
11427 .IP "\fIpedantic\fR" 4
|
yading@10
|
11428 .IX Item "pedantic"
|
yading@10
|
11429 .IP "\fIignore_global_advance_width\fR" 4
|
yading@10
|
11430 .IX Item "ignore_global_advance_width"
|
yading@10
|
11431 .IP "\fIno_recurse\fR" 4
|
yading@10
|
11432 .IX Item "no_recurse"
|
yading@10
|
11433 .IP "\fIignore_transform\fR" 4
|
yading@10
|
11434 .IX Item "ignore_transform"
|
yading@10
|
11435 .IP "\fImonochrome\fR" 4
|
yading@10
|
11436 .IX Item "monochrome"
|
yading@10
|
11437 .IP "\fIlinear_design\fR" 4
|
yading@10
|
11438 .IX Item "linear_design"
|
yading@10
|
11439 .IP "\fIno_autohint\fR" 4
|
yading@10
|
11440 .IX Item "no_autohint"
|
yading@10
|
11441 .IP "\fIend table\fR" 4
|
yading@10
|
11442 .IX Item "end table"
|
yading@10
|
11443 .RE
|
yading@10
|
11444 .RS 4
|
yading@10
|
11445 .PD
|
yading@10
|
11446 .Sp
|
yading@10
|
11447 Default value is \*(L"render\*(R".
|
yading@10
|
11448 .Sp
|
yading@10
|
11449 For more information consult the documentation for the FT_LOAD_*
|
yading@10
|
11450 libfreetype flags.
|
yading@10
|
11451 .RE
|
yading@10
|
11452 .IP "\fBshadowcolor\fR" 4
|
yading@10
|
11453 .IX Item "shadowcolor"
|
yading@10
|
11454 The color to be used for drawing a shadow behind the drawn text. It
|
yading@10
|
11455 can be a color name (e.g. \*(L"yellow\*(R") or a string in the 0xRRGGBB[\s-1AA\s0]
|
yading@10
|
11456 form (e.g. \*(L"0xff00ff\*(R"), possibly followed by an alpha specifier.
|
yading@10
|
11457 The default value of \fIshadowcolor\fR is \*(L"black\*(R".
|
yading@10
|
11458 .IP "\fBshadowx, shadowy\fR" 4
|
yading@10
|
11459 .IX Item "shadowx, shadowy"
|
yading@10
|
11460 The x and y offsets for the text shadow position with respect to the
|
yading@10
|
11461 position of the text. They can be either positive or negative
|
yading@10
|
11462 values. Default value for both is \*(L"0\*(R".
|
yading@10
|
11463 .IP "\fBtabsize\fR" 4
|
yading@10
|
11464 .IX Item "tabsize"
|
yading@10
|
11465 The size in number of spaces to use for rendering the tab.
|
yading@10
|
11466 Default value is 4.
|
yading@10
|
11467 .IP "\fBtimecode\fR" 4
|
yading@10
|
11468 .IX Item "timecode"
|
yading@10
|
11469 Set the initial timecode representation in \*(L"hh:mm:ss[:;.]ff\*(R"
|
yading@10
|
11470 format. It can be used with or without text parameter. \fItimecode_rate\fR
|
yading@10
|
11471 option must be specified.
|
yading@10
|
11472 .IP "\fBtimecode_rate, rate, r\fR" 4
|
yading@10
|
11473 .IX Item "timecode_rate, rate, r"
|
yading@10
|
11474 Set the timecode frame rate (timecode only).
|
yading@10
|
11475 .IP "\fBtext\fR" 4
|
yading@10
|
11476 .IX Item "text"
|
yading@10
|
11477 The text string to be drawn. The text must be a sequence of \s-1UTF\-8\s0
|
yading@10
|
11478 encoded characters.
|
yading@10
|
11479 This parameter is mandatory if no file is specified with the parameter
|
yading@10
|
11480 \&\fItextfile\fR.
|
yading@10
|
11481 .IP "\fBtextfile\fR" 4
|
yading@10
|
11482 .IX Item "textfile"
|
yading@10
|
11483 A text file containing text to be drawn. The text must be a sequence
|
yading@10
|
11484 of \s-1UTF\-8\s0 encoded characters.
|
yading@10
|
11485 .Sp
|
yading@10
|
11486 This parameter is mandatory if no text string is specified with the
|
yading@10
|
11487 parameter \fItext\fR.
|
yading@10
|
11488 .Sp
|
yading@10
|
11489 If both \fItext\fR and \fItextfile\fR are specified, an error is thrown.
|
yading@10
|
11490 .IP "\fBreload\fR" 4
|
yading@10
|
11491 .IX Item "reload"
|
yading@10
|
11492 If set to 1, the \fItextfile\fR will be reloaded before each frame.
|
yading@10
|
11493 Be sure to update it atomically, or it may be read partially, or even fail.
|
yading@10
|
11494 .IP "\fBx, y\fR" 4
|
yading@10
|
11495 .IX Item "x, y"
|
yading@10
|
11496 The expressions which specify the offsets where text will be drawn
|
yading@10
|
11497 within the video frame. They are relative to the top/left border of the
|
yading@10
|
11498 output image.
|
yading@10
|
11499 .Sp
|
yading@10
|
11500 The default value of \fIx\fR and \fIy\fR is \*(L"0\*(R".
|
yading@10
|
11501 .Sp
|
yading@10
|
11502 See below for the list of accepted constants and functions.
|
yading@10
|
11503 .PP
|
yading@10
|
11504 The parameters for \fIx\fR and \fIy\fR are expressions containing the
|
yading@10
|
11505 following constants and functions:
|
yading@10
|
11506 .IP "\fBdar\fR" 4
|
yading@10
|
11507 .IX Item "dar"
|
yading@10
|
11508 input display aspect ratio, it is the same as (\fIw\fR / \fIh\fR) * \fIsar\fR
|
yading@10
|
11509 .IP "\fBhsub, vsub\fR" 4
|
yading@10
|
11510 .IX Item "hsub, vsub"
|
yading@10
|
11511 horizontal and vertical chroma subsample values. For example for the
|
yading@10
|
11512 pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1.
|
yading@10
|
11513 .IP "\fBline_h, lh\fR" 4
|
yading@10
|
11514 .IX Item "line_h, lh"
|
yading@10
|
11515 the height of each text line
|
yading@10
|
11516 .IP "\fBmain_h, h, H\fR" 4
|
yading@10
|
11517 .IX Item "main_h, h, H"
|
yading@10
|
11518 the input height
|
yading@10
|
11519 .IP "\fBmain_w, w, W\fR" 4
|
yading@10
|
11520 .IX Item "main_w, w, W"
|
yading@10
|
11521 the input width
|
yading@10
|
11522 .IP "\fBmax_glyph_a, ascent\fR" 4
|
yading@10
|
11523 .IX Item "max_glyph_a, ascent"
|
yading@10
|
11524 the maximum distance from the baseline to the highest/upper grid
|
yading@10
|
11525 coordinate used to place a glyph outline point, for all the rendered
|
yading@10
|
11526 glyphs.
|
yading@10
|
11527 It is a positive value, due to the grid's orientation with the Y axis
|
yading@10
|
11528 upwards.
|
yading@10
|
11529 .IP "\fBmax_glyph_d, descent\fR" 4
|
yading@10
|
11530 .IX Item "max_glyph_d, descent"
|
yading@10
|
11531 the maximum distance from the baseline to the lowest grid coordinate
|
yading@10
|
11532 used to place a glyph outline point, for all the rendered glyphs.
|
yading@10
|
11533 This is a negative value, due to the grid's orientation, with the Y axis
|
yading@10
|
11534 upwards.
|
yading@10
|
11535 .IP "\fBmax_glyph_h\fR" 4
|
yading@10
|
11536 .IX Item "max_glyph_h"
|
yading@10
|
11537 maximum glyph height, that is the maximum height for all the glyphs
|
yading@10
|
11538 contained in the rendered text, it is equivalent to \fIascent\fR \-
|
yading@10
|
11539 \&\fIdescent\fR.
|
yading@10
|
11540 .IP "\fBmax_glyph_w\fR" 4
|
yading@10
|
11541 .IX Item "max_glyph_w"
|
yading@10
|
11542 maximum glyph width, that is the maximum width for all the glyphs
|
yading@10
|
11543 contained in the rendered text
|
yading@10
|
11544 .IP "\fBn\fR" 4
|
yading@10
|
11545 .IX Item "n"
|
yading@10
|
11546 the number of input frame, starting from 0
|
yading@10
|
11547 .IP "\fBrand(min, max)\fR" 4
|
yading@10
|
11548 .IX Item "rand(min, max)"
|
yading@10
|
11549 return a random number included between \fImin\fR and \fImax\fR
|
yading@10
|
11550 .IP "\fBsar\fR" 4
|
yading@10
|
11551 .IX Item "sar"
|
yading@10
|
11552 input sample aspect ratio
|
yading@10
|
11553 .IP "\fBt\fR" 4
|
yading@10
|
11554 .IX Item "t"
|
yading@10
|
11555 timestamp expressed in seconds, \s-1NAN\s0 if the input timestamp is unknown
|
yading@10
|
11556 .IP "\fBtext_h, th\fR" 4
|
yading@10
|
11557 .IX Item "text_h, th"
|
yading@10
|
11558 the height of the rendered text
|
yading@10
|
11559 .IP "\fBtext_w, tw\fR" 4
|
yading@10
|
11560 .IX Item "text_w, tw"
|
yading@10
|
11561 the width of the rendered text
|
yading@10
|
11562 .IP "\fBx, y\fR" 4
|
yading@10
|
11563 .IX Item "x, y"
|
yading@10
|
11564 the x and y offset coordinates where the text is drawn.
|
yading@10
|
11565 .Sp
|
yading@10
|
11566 These parameters allow the \fIx\fR and \fIy\fR expressions to refer
|
yading@10
|
11567 each other, so you can for example specify \f(CW\*(C`y=x/dar\*(C'\fR.
|
yading@10
|
11568 .PP
|
yading@10
|
11569 If libavfilter was built with \f(CW\*(C`\-\-enable\-fontconfig\*(C'\fR, then
|
yading@10
|
11570 \&\fBfontfile\fR can be a fontconfig pattern or omitted.
|
yading@10
|
11571 .PP
|
yading@10
|
11572 \fIText expansion\fR
|
yading@10
|
11573 .IX Subsection "Text expansion"
|
yading@10
|
11574 .PP
|
yading@10
|
11575 If \fBexpansion\fR is set to \f(CW\*(C`strftime\*(C'\fR,
|
yading@10
|
11576 the filter recognizes \fIstrftime()\fR sequences in the provided text and
|
yading@10
|
11577 expands them accordingly. Check the documentation of \fIstrftime()\fR. This
|
yading@10
|
11578 feature is deprecated.
|
yading@10
|
11579 .PP
|
yading@10
|
11580 If \fBexpansion\fR is set to \f(CW\*(C`none\*(C'\fR, the text is printed verbatim.
|
yading@10
|
11581 .PP
|
yading@10
|
11582 If \fBexpansion\fR is set to \f(CW\*(C`normal\*(C'\fR (which is the default),
|
yading@10
|
11583 the following expansion mechanism is used.
|
yading@10
|
11584 .PP
|
yading@10
|
11585 The backslash character '\e', followed by any character, always expands to
|
yading@10
|
11586 the second character.
|
yading@10
|
11587 .PP
|
yading@10
|
11588 Sequence of the form \f(CW\*(C`%{...}\*(C'\fR are expanded. The text between the
|
yading@10
|
11589 braces is a function name, possibly followed by arguments separated by ':'.
|
yading@10
|
11590 If the arguments contain special characters or delimiters (':' or '}'),
|
yading@10
|
11591 they should be escaped.
|
yading@10
|
11592 .PP
|
yading@10
|
11593 Note that they probably must also be escaped as the value for the
|
yading@10
|
11594 \&\fBtext\fR option in the filter argument string and as the filter
|
yading@10
|
11595 argument in the filtergraph description, and possibly also for the shell,
|
yading@10
|
11596 that makes up to four levels of escaping; using a text file avoids these
|
yading@10
|
11597 problems.
|
yading@10
|
11598 .PP
|
yading@10
|
11599 The following functions are available:
|
yading@10
|
11600 .IP "\fBexpr, e\fR" 4
|
yading@10
|
11601 .IX Item "expr, e"
|
yading@10
|
11602 The expression evaluation result.
|
yading@10
|
11603 .Sp
|
yading@10
|
11604 It must take one argument specifying the expression to be evaluated,
|
yading@10
|
11605 which accepts the same constants and functions as the \fIx\fR and
|
yading@10
|
11606 \&\fIy\fR values. Note that not all constants should be used, for
|
yading@10
|
11607 example the text size is not known when evaluating the expression, so
|
yading@10
|
11608 the constants \fItext_w\fR and \fItext_h\fR will have an undefined
|
yading@10
|
11609 value.
|
yading@10
|
11610 .IP "\fBgmtime\fR" 4
|
yading@10
|
11611 .IX Item "gmtime"
|
yading@10
|
11612 The time at which the filter is running, expressed in \s-1UTC\s0.
|
yading@10
|
11613 It can accept an argument: a \fIstrftime()\fR format string.
|
yading@10
|
11614 .IP "\fBlocaltime\fR" 4
|
yading@10
|
11615 .IX Item "localtime"
|
yading@10
|
11616 The time at which the filter is running, expressed in the local time zone.
|
yading@10
|
11617 It can accept an argument: a \fIstrftime()\fR format string.
|
yading@10
|
11618 .IP "\fBn, frame_num\fR" 4
|
yading@10
|
11619 .IX Item "n, frame_num"
|
yading@10
|
11620 The frame number, starting from 0.
|
yading@10
|
11621 .IP "\fBpts\fR" 4
|
yading@10
|
11622 .IX Item "pts"
|
yading@10
|
11623 The timestamp of the current frame, in seconds, with microsecond accuracy.
|
yading@10
|
11624 .PP
|
yading@10
|
11625 \fIExamples\fR
|
yading@10
|
11626 .IX Subsection "Examples"
|
yading@10
|
11627 .IP "\(bu" 4
|
yading@10
|
11628 Draw \*(L"Test Text\*(R" with font FreeSerif, using the default values for the
|
yading@10
|
11629 optional parameters.
|
yading@10
|
11630 .Sp
|
yading@10
|
11631 .Vb 1
|
yading@10
|
11632 \& drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text=\*(AqTest Text\*(Aq"
|
yading@10
|
11633 .Ve
|
yading@10
|
11634 .IP "\(bu" 4
|
yading@10
|
11635 Draw 'Test Text' with font FreeSerif of size 24 at position x=100
|
yading@10
|
11636 and y=50 (counting from the top-left corner of the screen), text is
|
yading@10
|
11637 yellow with a red box around it. Both the text and the box have an
|
yading@10
|
11638 opacity of 20%.
|
yading@10
|
11639 .Sp
|
yading@10
|
11640 .Vb 2
|
yading@10
|
11641 \& drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text=\*(AqTest Text\*(Aq:\e
|
yading@10
|
11642 \& x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2"
|
yading@10
|
11643 .Ve
|
yading@10
|
11644 .Sp
|
yading@10
|
11645 Note that the double quotes are not necessary if spaces are not used
|
yading@10
|
11646 within the parameter list.
|
yading@10
|
11647 .IP "\(bu" 4
|
yading@10
|
11648 Show the text at the center of the video frame:
|
yading@10
|
11649 .Sp
|
yading@10
|
11650 .Vb 1
|
yading@10
|
11651 \& drawtext="fontsize=30:fontfile=FreeSerif.ttf:text=\*(Aqhello world\*(Aq:x=(w\-text_w)/2:y=(h\-text_h\-line_h)/2"
|
yading@10
|
11652 .Ve
|
yading@10
|
11653 .IP "\(bu" 4
|
yading@10
|
11654 Show a text line sliding from right to left in the last row of the video
|
yading@10
|
11655 frame. The file \fI\s-1LONG_LINE\s0\fR is assumed to contain a single line
|
yading@10
|
11656 with no newlines.
|
yading@10
|
11657 .Sp
|
yading@10
|
11658 .Vb 1
|
yading@10
|
11659 \& drawtext="fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h\-line_h:x=\-50*t"
|
yading@10
|
11660 .Ve
|
yading@10
|
11661 .IP "\(bu" 4
|
yading@10
|
11662 Show the content of file \fI\s-1CREDITS\s0\fR off the bottom of the frame and scroll up.
|
yading@10
|
11663 .Sp
|
yading@10
|
11664 .Vb 1
|
yading@10
|
11665 \& drawtext="fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h\-20*t"
|
yading@10
|
11666 .Ve
|
yading@10
|
11667 .IP "\(bu" 4
|
yading@10
|
11668 Draw a single green letter \*(L"g\*(R", at the center of the input video.
|
yading@10
|
11669 The glyph baseline is placed at half screen height.
|
yading@10
|
11670 .Sp
|
yading@10
|
11671 .Vb 1
|
yading@10
|
11672 \& drawtext="fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w\-max_glyph_w)/2:y=h/2\-ascent"
|
yading@10
|
11673 .Ve
|
yading@10
|
11674 .IP "\(bu" 4
|
yading@10
|
11675 Show text for 1 second every 3 seconds:
|
yading@10
|
11676 .Sp
|
yading@10
|
11677 .Vb 1
|
yading@10
|
11678 \& drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\e,3)\e,1):text=\*(Aqblink\*(Aq"
|
yading@10
|
11679 .Ve
|
yading@10
|
11680 .IP "\(bu" 4
|
yading@10
|
11681 Use fontconfig to set the font. Note that the colons need to be escaped.
|
yading@10
|
11682 .Sp
|
yading@10
|
11683 .Vb 1
|
yading@10
|
11684 \& drawtext=\*(Aqfontfile=Linux Libertine O\-40\e:style=Semibold:text=FFmpeg\*(Aq
|
yading@10
|
11685 .Ve
|
yading@10
|
11686 .IP "\(bu" 4
|
yading@10
|
11687 Print the date of a real-time encoding (see \fIstrftime\fR\|(3)):
|
yading@10
|
11688 .Sp
|
yading@10
|
11689 .Vb 1
|
yading@10
|
11690 \& drawtext=\*(Aqfontfile=FreeSans.ttf:text=%{localtime:%a %b %d %Y}\*(Aq
|
yading@10
|
11691 .Ve
|
yading@10
|
11692 .PP
|
yading@10
|
11693 For more information about libfreetype, check:
|
yading@10
|
11694 <\fBhttp://www.freetype.org/\fR>.
|
yading@10
|
11695 .PP
|
yading@10
|
11696 For more information about fontconfig, check:
|
yading@10
|
11697 <\fBhttp://freedesktop.org/software/fontconfig/fontconfig\-user.html\fR>.
|
yading@10
|
11698 .SS "edgedetect"
|
yading@10
|
11699 .IX Subsection "edgedetect"
|
yading@10
|
11700 Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
|
yading@10
|
11701 .PP
|
yading@10
|
11702 The filter accepts the following options:
|
yading@10
|
11703 .IP "\fBlow, high\fR" 4
|
yading@10
|
11704 .IX Item "low, high"
|
yading@10
|
11705 Set low and high threshold values used by the Canny thresholding
|
yading@10
|
11706 algorithm.
|
yading@10
|
11707 .Sp
|
yading@10
|
11708 The high threshold selects the \*(L"strong\*(R" edge pixels, which are then
|
yading@10
|
11709 connected through 8\-connectivity with the \*(L"weak\*(R" edge pixels selected
|
yading@10
|
11710 by the low threshold.
|
yading@10
|
11711 .Sp
|
yading@10
|
11712 \&\fIlow\fR and \fIhigh\fR threshold values must be choosen in the range
|
yading@10
|
11713 [0,1], and \fIlow\fR should be lesser or equal to \fIhigh\fR.
|
yading@10
|
11714 .Sp
|
yading@10
|
11715 Default value for \fIlow\fR is \f(CW\*(C`20/255\*(C'\fR, and default value for \fIhigh\fR
|
yading@10
|
11716 is \f(CW\*(C`50/255\*(C'\fR.
|
yading@10
|
11717 .PP
|
yading@10
|
11718 Example:
|
yading@10
|
11719 .PP
|
yading@10
|
11720 .Vb 1
|
yading@10
|
11721 \& edgedetect=low=0.1:high=0.4
|
yading@10
|
11722 .Ve
|
yading@10
|
11723 .SS "fade"
|
yading@10
|
11724 .IX Subsection "fade"
|
yading@10
|
11725 Apply fade\-in/out effect to input video.
|
yading@10
|
11726 .PP
|
yading@10
|
11727 This filter accepts the following options:
|
yading@10
|
11728 .IP "\fBtype, t\fR" 4
|
yading@10
|
11729 .IX Item "type, t"
|
yading@10
|
11730 The effect type \*(-- can be either \*(L"in\*(R" for fade-in, or \*(L"out\*(R" for a fade-out
|
yading@10
|
11731 effect.
|
yading@10
|
11732 Default is \f(CW\*(C`in\*(C'\fR.
|
yading@10
|
11733 .IP "\fBstart_frame, s\fR" 4
|
yading@10
|
11734 .IX Item "start_frame, s"
|
yading@10
|
11735 Specify the number of the start frame for starting to apply the fade
|
yading@10
|
11736 effect. Default is 0.
|
yading@10
|
11737 .IP "\fBnb_frames, n\fR" 4
|
yading@10
|
11738 .IX Item "nb_frames, n"
|
yading@10
|
11739 The number of frames for which the fade effect has to last. At the end of the
|
yading@10
|
11740 fade-in effect the output video will have the same intensity as the input video,
|
yading@10
|
11741 at the end of the fade-out transition the output video will be completely black.
|
yading@10
|
11742 Default is 25.
|
yading@10
|
11743 .IP "\fBalpha\fR" 4
|
yading@10
|
11744 .IX Item "alpha"
|
yading@10
|
11745 If set to 1, fade only alpha channel, if one exists on the input.
|
yading@10
|
11746 Default value is 0.
|
yading@10
|
11747 .PP
|
yading@10
|
11748 \fIExamples\fR
|
yading@10
|
11749 .IX Subsection "Examples"
|
yading@10
|
11750 .IP "\(bu" 4
|
yading@10
|
11751 Fade in first 30 frames of video:
|
yading@10
|
11752 .Sp
|
yading@10
|
11753 .Vb 1
|
yading@10
|
11754 \& fade=in:0:30
|
yading@10
|
11755 .Ve
|
yading@10
|
11756 .Sp
|
yading@10
|
11757 The command above is equivalent to:
|
yading@10
|
11758 .Sp
|
yading@10
|
11759 .Vb 1
|
yading@10
|
11760 \& fade=t=in:s=0:n=30
|
yading@10
|
11761 .Ve
|
yading@10
|
11762 .IP "\(bu" 4
|
yading@10
|
11763 Fade out last 45 frames of a 200\-frame video:
|
yading@10
|
11764 .Sp
|
yading@10
|
11765 .Vb 2
|
yading@10
|
11766 \& fade=out:155:45
|
yading@10
|
11767 \& fade=type=out:start_frame=155:nb_frames=45
|
yading@10
|
11768 .Ve
|
yading@10
|
11769 .IP "\(bu" 4
|
yading@10
|
11770 Fade in first 25 frames and fade out last 25 frames of a 1000\-frame video:
|
yading@10
|
11771 .Sp
|
yading@10
|
11772 .Vb 1
|
yading@10
|
11773 \& fade=in:0:25, fade=out:975:25
|
yading@10
|
11774 .Ve
|
yading@10
|
11775 .IP "\(bu" 4
|
yading@10
|
11776 Make first 5 frames black, then fade in from frame 5\-24:
|
yading@10
|
11777 .Sp
|
yading@10
|
11778 .Vb 1
|
yading@10
|
11779 \& fade=in:5:20
|
yading@10
|
11780 .Ve
|
yading@10
|
11781 .IP "\(bu" 4
|
yading@10
|
11782 Fade in alpha over first 25 frames of video:
|
yading@10
|
11783 .Sp
|
yading@10
|
11784 .Vb 1
|
yading@10
|
11785 \& fade=in:0:25:alpha=1
|
yading@10
|
11786 .Ve
|
yading@10
|
11787 .SS "field"
|
yading@10
|
11788 .IX Subsection "field"
|
yading@10
|
11789 Extract a single field from an interlaced image using stride
|
yading@10
|
11790 arithmetic to avoid wasting \s-1CPU\s0 time. The output frames are marked as
|
yading@10
|
11791 non-interlaced.
|
yading@10
|
11792 .PP
|
yading@10
|
11793 The filter accepts the following options:
|
yading@10
|
11794 .IP "\fBtype\fR" 4
|
yading@10
|
11795 .IX Item "type"
|
yading@10
|
11796 Specify whether to extract the top (if the value is \f(CW0\fR or
|
yading@10
|
11797 \&\f(CW\*(C`top\*(C'\fR) or the bottom field (if the value is \f(CW1\fR or
|
yading@10
|
11798 \&\f(CW\*(C`bottom\*(C'\fR).
|
yading@10
|
11799 .SS "fieldmatch"
|
yading@10
|
11800 .IX Subsection "fieldmatch"
|
yading@10
|
11801 Field matching filter for inverse telecine. It is meant to reconstruct the
|
yading@10
|
11802 progressive frames from a telecined stream. The filter does not drop duplicated
|
yading@10
|
11803 frames, so to achieve a complete inverse telecine \f(CW\*(C`fieldmatch\*(C'\fR needs to be
|
yading@10
|
11804 followed by a decimation filter such as decimate in the filtergraph.
|
yading@10
|
11805 .PP
|
yading@10
|
11806 The separation of the field matching and the decimation is notably motivated by
|
yading@10
|
11807 the possibility of inserting a de-interlacing filter fallback between the two.
|
yading@10
|
11808 If the source has mixed telecined and real interlaced content,
|
yading@10
|
11809 \&\f(CW\*(C`fieldmatch\*(C'\fR will not be able to match fields for the interlaced parts.
|
yading@10
|
11810 But these remaining combed frames will be marked as interlaced, and thus can be
|
yading@10
|
11811 de-interlaced by a later filter such as yadif before decimation.
|
yading@10
|
11812 .PP
|
yading@10
|
11813 In addition to the various configuration options, \f(CW\*(C`fieldmatch\*(C'\fR can take an
|
yading@10
|
11814 optional second stream, activated through the \fBppsrc\fR option. If
|
yading@10
|
11815 enabled, the frames reconstruction will be based on the fields and frames from
|
yading@10
|
11816 this second stream. This allows the first input to be pre-processed in order to
|
yading@10
|
11817 help the various algorithms of the filter, while keeping the output lossless
|
yading@10
|
11818 (assuming the fields are matched properly). Typically, a field-aware denoiser,
|
yading@10
|
11819 or brightness/contrast adjustments can help.
|
yading@10
|
11820 .PP
|
yading@10
|
11821 Note that this filter uses the same algorithms as \s-1TIVTC/TFM\s0 (AviSynth project)
|
yading@10
|
11822 and \s-1VIVTC/VFM\s0 (VapourSynth project). The later is a light clone of \s-1TFM\s0 from
|
yading@10
|
11823 which \f(CW\*(C`fieldmatch\*(C'\fR is based on. While the semantic and usage are very
|
yading@10
|
11824 close, some behaviour and options names can differ.
|
yading@10
|
11825 .PP
|
yading@10
|
11826 The filter accepts the following options:
|
yading@10
|
11827 .IP "\fBorder\fR" 4
|
yading@10
|
11828 .IX Item "order"
|
yading@10
|
11829 Specify the assumed field order of the input stream. Available values are:
|
yading@10
|
11830 .RS 4
|
yading@10
|
11831 .IP "\fBauto\fR" 4
|
yading@10
|
11832 .IX Item "auto"
|
yading@10
|
11833 Auto detect parity (use FFmpeg's internal parity value).
|
yading@10
|
11834 .IP "\fBbff\fR" 4
|
yading@10
|
11835 .IX Item "bff"
|
yading@10
|
11836 Assume bottom field first.
|
yading@10
|
11837 .IP "\fBtff\fR" 4
|
yading@10
|
11838 .IX Item "tff"
|
yading@10
|
11839 Assume top field first.
|
yading@10
|
11840 .RE
|
yading@10
|
11841 .RS 4
|
yading@10
|
11842 .Sp
|
yading@10
|
11843 Note that it is sometimes recommended not to trust the parity announced by the
|
yading@10
|
11844 stream.
|
yading@10
|
11845 .Sp
|
yading@10
|
11846 Default value is \fIauto\fR.
|
yading@10
|
11847 .RE
|
yading@10
|
11848 .IP "\fBmode\fR" 4
|
yading@10
|
11849 .IX Item "mode"
|
yading@10
|
11850 Set the matching mode or strategy to use. \fBpc\fR mode is the safest in the
|
yading@10
|
11851 sense that it wont risk creating jerkiness due to duplicate frames when
|
yading@10
|
11852 possible, but if there are bad edits or blended fields it will end up
|
yading@10
|
11853 outputting combed frames when a good match might actually exist. On the other
|
yading@10
|
11854 hand, \fBpcn_ub\fR mode is the most risky in terms of creating jerkiness,
|
yading@10
|
11855 but will almost always find a good frame if there is one. The other values are
|
yading@10
|
11856 all somewhere in between \fBpc\fR and \fBpcn_ub\fR in terms of risking
|
yading@10
|
11857 jerkiness and creating duplicate frames versus finding good matches in sections
|
yading@10
|
11858 with bad edits, orphaned fields, blended fields, etc.
|
yading@10
|
11859 .Sp
|
yading@10
|
11860 More details about p/c/n/u/b are available in p/c/n/u/b meaning section.
|
yading@10
|
11861 .Sp
|
yading@10
|
11862 Available values are:
|
yading@10
|
11863 .RS 4
|
yading@10
|
11864 .IP "\fBpc\fR" 4
|
yading@10
|
11865 .IX Item "pc"
|
yading@10
|
11866 2\-way matching (p/c)
|
yading@10
|
11867 .IP "\fBpc_n\fR" 4
|
yading@10
|
11868 .IX Item "pc_n"
|
yading@10
|
11869 2\-way matching, and trying 3rd match if still combed (p/c + n)
|
yading@10
|
11870 .IP "\fBpc_u\fR" 4
|
yading@10
|
11871 .IX Item "pc_u"
|
yading@10
|
11872 2\-way matching, and trying 3rd match (same order) if still combed (p/c + u)
|
yading@10
|
11873 .IP "\fBpc_n_ub\fR" 4
|
yading@10
|
11874 .IX Item "pc_n_ub"
|
yading@10
|
11875 2\-way matching, trying 3rd match if still combed, and trying 4th/5th matches if
|
yading@10
|
11876 still combed (p/c + n + u/b)
|
yading@10
|
11877 .IP "\fBpcn\fR" 4
|
yading@10
|
11878 .IX Item "pcn"
|
yading@10
|
11879 3\-way matching (p/c/n)
|
yading@10
|
11880 .IP "\fBpcn_ub\fR" 4
|
yading@10
|
11881 .IX Item "pcn_ub"
|
yading@10
|
11882 3\-way matching, and trying 4th/5th matches if all 3 of the original matches are
|
yading@10
|
11883 detected as combed (p/c/n + u/b)
|
yading@10
|
11884 .RE
|
yading@10
|
11885 .RS 4
|
yading@10
|
11886 .Sp
|
yading@10
|
11887 The parenthesis at the end indicate the matches that would be used for that
|
yading@10
|
11888 mode assuming \fBorder\fR=\fItff\fR (and \fBfield\fR on \fIauto\fR or
|
yading@10
|
11889 \&\fItop\fR).
|
yading@10
|
11890 .Sp
|
yading@10
|
11891 In terms of speed \fBpc\fR mode is by far the fastest and \fBpcn_ub\fR is
|
yading@10
|
11892 the slowest.
|
yading@10
|
11893 .Sp
|
yading@10
|
11894 Default value is \fIpc_n\fR.
|
yading@10
|
11895 .RE
|
yading@10
|
11896 .IP "\fBppsrc\fR" 4
|
yading@10
|
11897 .IX Item "ppsrc"
|
yading@10
|
11898 Mark the main input stream as a pre-processed input, and enable the secondary
|
yading@10
|
11899 input stream as the clean source to pick the fields from. See the filter
|
yading@10
|
11900 introduction for more details. It is similar to the \fBclip2\fR feature from
|
yading@10
|
11901 \&\s-1VFM/TFM\s0.
|
yading@10
|
11902 .Sp
|
yading@10
|
11903 Default value is \f(CW0\fR (disabled).
|
yading@10
|
11904 .IP "\fBfield\fR" 4
|
yading@10
|
11905 .IX Item "field"
|
yading@10
|
11906 Set the field to match from. It is recommended to set this to the same value as
|
yading@10
|
11907 \&\fBorder\fR unless you experience matching failures with that setting. In
|
yading@10
|
11908 certain circumstances changing the field that is used to match from can have a
|
yading@10
|
11909 large impact on matching performance. Available values are:
|
yading@10
|
11910 .RS 4
|
yading@10
|
11911 .IP "\fBauto\fR" 4
|
yading@10
|
11912 .IX Item "auto"
|
yading@10
|
11913 Automatic (same value as \fBorder\fR).
|
yading@10
|
11914 .IP "\fBbottom\fR" 4
|
yading@10
|
11915 .IX Item "bottom"
|
yading@10
|
11916 Match from the bottom field.
|
yading@10
|
11917 .IP "\fBtop\fR" 4
|
yading@10
|
11918 .IX Item "top"
|
yading@10
|
11919 Match from the top field.
|
yading@10
|
11920 .RE
|
yading@10
|
11921 .RS 4
|
yading@10
|
11922 .Sp
|
yading@10
|
11923 Default value is \fIauto\fR.
|
yading@10
|
11924 .RE
|
yading@10
|
11925 .IP "\fBmchroma\fR" 4
|
yading@10
|
11926 .IX Item "mchroma"
|
yading@10
|
11927 Set whether or not chroma is included during the match comparisons. In most
|
yading@10
|
11928 cases it is recommended to leave this enabled. You should set this to \f(CW0\fR
|
yading@10
|
11929 only if your clip has bad chroma problems such as heavy rainbowing or other
|
yading@10
|
11930 artifacts. Setting this to \f(CW0\fR could also be used to speed things up at
|
yading@10
|
11931 the cost of some accuracy.
|
yading@10
|
11932 .Sp
|
yading@10
|
11933 Default value is \f(CW1\fR.
|
yading@10
|
11934 .IP "\fBy0\fR" 4
|
yading@10
|
11935 .IX Item "y0"
|
yading@10
|
11936 .PD 0
|
yading@10
|
11937 .IP "\fBy1\fR" 4
|
yading@10
|
11938 .IX Item "y1"
|
yading@10
|
11939 .PD
|
yading@10
|
11940 These define an exclusion band which excludes the lines between \fBy0\fR and
|
yading@10
|
11941 \&\fBy1\fR from being included in the field matching decision. An exclusion
|
yading@10
|
11942 band can be used to ignore subtitles, a logo, or other things that may
|
yading@10
|
11943 interfere with the matching. \fBy0\fR sets the starting scan line and
|
yading@10
|
11944 \&\fBy1\fR sets the ending line; all lines in between \fBy0\fR and
|
yading@10
|
11945 \&\fBy1\fR (including \fBy0\fR and \fBy1\fR) will be ignored. Setting
|
yading@10
|
11946 \&\fBy0\fR and \fBy1\fR to the same value will disable the feature.
|
yading@10
|
11947 \&\fBy0\fR and \fBy1\fR defaults to \f(CW0\fR.
|
yading@10
|
11948 .IP "\fBscthresh\fR" 4
|
yading@10
|
11949 .IX Item "scthresh"
|
yading@10
|
11950 Set the scene change detection threshold as a percentage of maximum change on
|
yading@10
|
11951 the luma plane. Good values are in the \f(CW\*(C`[8.0, 14.0]\*(C'\fR range. Scene change
|
yading@10
|
11952 detection is only relevant in case \fBcombmatch\fR=\fIsc\fR. The range for
|
yading@10
|
11953 \&\fBscthresh\fR is \f(CW\*(C`[0.0, 100.0]\*(C'\fR.
|
yading@10
|
11954 .Sp
|
yading@10
|
11955 Default value is \f(CW12.0\fR.
|
yading@10
|
11956 .IP "\fBcombmatch\fR" 4
|
yading@10
|
11957 .IX Item "combmatch"
|
yading@10
|
11958 When \fBcombatch\fR is not \fInone\fR, \f(CW\*(C`fieldmatch\*(C'\fR will take into
|
yading@10
|
11959 account the combed scores of matches when deciding what match to use as the
|
yading@10
|
11960 final match. Available values are:
|
yading@10
|
11961 .RS 4
|
yading@10
|
11962 .IP "\fBnone\fR" 4
|
yading@10
|
11963 .IX Item "none"
|
yading@10
|
11964 No final matching based on combed scores.
|
yading@10
|
11965 .IP "\fBsc\fR" 4
|
yading@10
|
11966 .IX Item "sc"
|
yading@10
|
11967 Combed scores are only used when a scene change is detected.
|
yading@10
|
11968 .IP "\fBfull\fR" 4
|
yading@10
|
11969 .IX Item "full"
|
yading@10
|
11970 Use combed scores all the time.
|
yading@10
|
11971 .RE
|
yading@10
|
11972 .RS 4
|
yading@10
|
11973 .Sp
|
yading@10
|
11974 Default is \fIsc\fR.
|
yading@10
|
11975 .RE
|
yading@10
|
11976 .IP "\fBcombdbg\fR" 4
|
yading@10
|
11977 .IX Item "combdbg"
|
yading@10
|
11978 Force \f(CW\*(C`fieldmatch\*(C'\fR to calculate the combed metrics for certain matches and
|
yading@10
|
11979 print them. This setting is known as \fBmicout\fR in \s-1TFM/VFM\s0 vocabulary.
|
yading@10
|
11980 Available values are:
|
yading@10
|
11981 .RS 4
|
yading@10
|
11982 .IP "\fBnone\fR" 4
|
yading@10
|
11983 .IX Item "none"
|
yading@10
|
11984 No forced calculation.
|
yading@10
|
11985 .IP "\fBpcn\fR" 4
|
yading@10
|
11986 .IX Item "pcn"
|
yading@10
|
11987 Force p/c/n calculations.
|
yading@10
|
11988 .IP "\fBpcnub\fR" 4
|
yading@10
|
11989 .IX Item "pcnub"
|
yading@10
|
11990 Force p/c/n/u/b calculations.
|
yading@10
|
11991 .RE
|
yading@10
|
11992 .RS 4
|
yading@10
|
11993 .Sp
|
yading@10
|
11994 Default value is \fInone\fR.
|
yading@10
|
11995 .RE
|
yading@10
|
11996 .IP "\fBcthresh\fR" 4
|
yading@10
|
11997 .IX Item "cthresh"
|
yading@10
|
11998 This is the area combing threshold used for combed frame detection. This
|
yading@10
|
11999 essentially controls how \*(L"strong\*(R" or \*(L"visible\*(R" combing must be to be detected.
|
yading@10
|
12000 Larger values mean combing must be more visible and smaller values mean combing
|
yading@10
|
12001 can be less visible or strong and still be detected. Valid settings are from
|
yading@10
|
12002 \&\f(CW\*(C`\-1\*(C'\fR (every pixel will be detected as combed) to \f(CW255\fR (no pixel will
|
yading@10
|
12003 be detected as combed). This is basically a pixel difference value. A good
|
yading@10
|
12004 range is \f(CW\*(C`[8, 12]\*(C'\fR.
|
yading@10
|
12005 .Sp
|
yading@10
|
12006 Default value is \f(CW9\fR.
|
yading@10
|
12007 .IP "\fBchroma\fR" 4
|
yading@10
|
12008 .IX Item "chroma"
|
yading@10
|
12009 Sets whether or not chroma is considered in the combed frame decision. Only
|
yading@10
|
12010 disable this if your source has chroma problems (rainbowing, etc.) that are
|
yading@10
|
12011 causing problems for the combed frame detection with chroma enabled. Actually,
|
yading@10
|
12012 using \fBchroma\fR=\fI0\fR is usually more reliable, except for the case
|
yading@10
|
12013 where there is chroma only combing in the source.
|
yading@10
|
12014 .Sp
|
yading@10
|
12015 Default value is \f(CW0\fR.
|
yading@10
|
12016 .IP "\fBblockx\fR" 4
|
yading@10
|
12017 .IX Item "blockx"
|
yading@10
|
12018 .PD 0
|
yading@10
|
12019 .IP "\fBblocky\fR" 4
|
yading@10
|
12020 .IX Item "blocky"
|
yading@10
|
12021 .PD
|
yading@10
|
12022 Respectively set the x\-axis and y\-axis size of the window used during combed
|
yading@10
|
12023 frame detection. This has to do with the size of the area in which
|
yading@10
|
12024 \&\fBcombpel\fR pixels are required to be detected as combed for a frame to be
|
yading@10
|
12025 declared combed. See the \fBcombpel\fR parameter description for more info.
|
yading@10
|
12026 Possible values are any number that is a power of 2 starting at 4 and going up
|
yading@10
|
12027 to 512.
|
yading@10
|
12028 .Sp
|
yading@10
|
12029 Default value is \f(CW16\fR.
|
yading@10
|
12030 .IP "\fBcombpel\fR" 4
|
yading@10
|
12031 .IX Item "combpel"
|
yading@10
|
12032 The number of combed pixels inside any of the \fBblocky\fR by
|
yading@10
|
12033 \&\fBblockx\fR size blocks on the frame for the frame to be detected as
|
yading@10
|
12034 combed. While \fBcthresh\fR controls how \*(L"visible\*(R" the combing must be, this
|
yading@10
|
12035 setting controls \*(L"how much\*(R" combing there must be in any localized area (a
|
yading@10
|
12036 window defined by the \fBblockx\fR and \fBblocky\fR settings) on the
|
yading@10
|
12037 frame. Minimum value is \f(CW0\fR and maximum is \f(CW\*(C`blocky x blockx\*(C'\fR (at
|
yading@10
|
12038 which point no frames will ever be detected as combed). This setting is known
|
yading@10
|
12039 as \fB\s-1MI\s0\fR in \s-1TFM/VFM\s0 vocabulary.
|
yading@10
|
12040 .Sp
|
yading@10
|
12041 Default value is \f(CW80\fR.
|
yading@10
|
12042 .PP
|
yading@10
|
12043 \fIp/c/n/u/b meaning\fR
|
yading@10
|
12044 .IX Subsection "p/c/n/u/b meaning"
|
yading@10
|
12045 .PP
|
yading@10
|
12046 p/c/n
|
yading@10
|
12047 .IX Subsection "p/c/n"
|
yading@10
|
12048 .PP
|
yading@10
|
12049 We assume the following telecined stream:
|
yading@10
|
12050 .PP
|
yading@10
|
12051 .Vb 2
|
yading@10
|
12052 \& Top fields: 1 2 2 3 4
|
yading@10
|
12053 \& Bottom fields: 1 2 3 4 4
|
yading@10
|
12054 .Ve
|
yading@10
|
12055 .PP
|
yading@10
|
12056 The numbers correspond to the progressive frame the fields relate to. Here, the
|
yading@10
|
12057 first two frames are progressive, the 3rd and 4th are combed, and so on.
|
yading@10
|
12058 .PP
|
yading@10
|
12059 When \f(CW\*(C`fieldmatch\*(C'\fR is configured to run a matching from bottom
|
yading@10
|
12060 (\fBfield\fR=\fIbottom\fR) this is how this input stream get transformed:
|
yading@10
|
12061 .PP
|
yading@10
|
12062 .Vb 3
|
yading@10
|
12063 \& Input stream:
|
yading@10
|
12064 \& T 1 2 2 3 4
|
yading@10
|
12065 \& B 1 2 3 4 4 <\-\- matching reference
|
yading@10
|
12066 \&
|
yading@10
|
12067 \& Matches: c c n n c
|
yading@10
|
12068 \&
|
yading@10
|
12069 \& Output stream:
|
yading@10
|
12070 \& T 1 2 3 4 4
|
yading@10
|
12071 \& B 1 2 3 4 4
|
yading@10
|
12072 .Ve
|
yading@10
|
12073 .PP
|
yading@10
|
12074 As a result of the field matching, we can see that some frames get duplicated.
|
yading@10
|
12075 To perform a complete inverse telecine, you need to rely on a decimation filter
|
yading@10
|
12076 after this operation. See for instance the decimate filter.
|
yading@10
|
12077 .PP
|
yading@10
|
12078 The same operation now matching from top fields (\fBfield\fR=\fItop\fR)
|
yading@10
|
12079 looks like this:
|
yading@10
|
12080 .PP
|
yading@10
|
12081 .Vb 3
|
yading@10
|
12082 \& Input stream:
|
yading@10
|
12083 \& T 1 2 2 3 4 <\-\- matching reference
|
yading@10
|
12084 \& B 1 2 3 4 4
|
yading@10
|
12085 \&
|
yading@10
|
12086 \& Matches: c c p p c
|
yading@10
|
12087 \&
|
yading@10
|
12088 \& Output stream:
|
yading@10
|
12089 \& T 1 2 2 3 4
|
yading@10
|
12090 \& B 1 2 2 3 4
|
yading@10
|
12091 .Ve
|
yading@10
|
12092 .PP
|
yading@10
|
12093 In these examples, we can see what \fIp\fR, \fIc\fR and \fIn\fR mean;
|
yading@10
|
12094 basically, they refer to the frame and field of the opposite parity:
|
yading@10
|
12095 .IP "*<\fIp\fR matches the field of the opposite parity in the previous frame>" 4
|
yading@10
|
12096 .IX Item "*<p matches the field of the opposite parity in the previous frame>"
|
yading@10
|
12097 .PD 0
|
yading@10
|
12098 .IP "*<\fIc\fR matches the field of the opposite parity in the current frame>" 4
|
yading@10
|
12099 .IX Item "*<c matches the field of the opposite parity in the current frame>"
|
yading@10
|
12100 .IP "*<\fIn\fR matches the field of the opposite parity in the next frame>" 4
|
yading@10
|
12101 .IX Item "*<n matches the field of the opposite parity in the next frame>"
|
yading@10
|
12102 .PD
|
yading@10
|
12103 .PP
|
yading@10
|
12104 u/b
|
yading@10
|
12105 .IX Subsection "u/b"
|
yading@10
|
12106 .PP
|
yading@10
|
12107 The \fIu\fR and \fIb\fR matching are a bit special in the sense that they match
|
yading@10
|
12108 from the opposite parity flag. In the following examples, we assume that we are
|
yading@10
|
12109 currently matching the 2nd frame (Top:2, bottom:2). According to the match, a
|
yading@10
|
12110 \&'x' is placed above and below each matched fields.
|
yading@10
|
12111 .PP
|
yading@10
|
12112 With bottom matching (\fBfield\fR=\fIbottom\fR):
|
yading@10
|
12113 .PP
|
yading@10
|
12114 .Vb 1
|
yading@10
|
12115 \& Match: c p n b u
|
yading@10
|
12116 \&
|
yading@10
|
12117 \& x x x x x
|
yading@10
|
12118 \& Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
|
yading@10
|
12119 \& Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
|
yading@10
|
12120 \& x x x x x
|
yading@10
|
12121 \&
|
yading@10
|
12122 \& Output frames:
|
yading@10
|
12123 \& 2 1 2 2 2
|
yading@10
|
12124 \& 2 2 2 1 3
|
yading@10
|
12125 .Ve
|
yading@10
|
12126 .PP
|
yading@10
|
12127 With top matching (\fBfield\fR=\fItop\fR):
|
yading@10
|
12128 .PP
|
yading@10
|
12129 .Vb 1
|
yading@10
|
12130 \& Match: c p n b u
|
yading@10
|
12131 \&
|
yading@10
|
12132 \& x x x x x
|
yading@10
|
12133 \& Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
|
yading@10
|
12134 \& Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
|
yading@10
|
12135 \& x x x x x
|
yading@10
|
12136 \&
|
yading@10
|
12137 \& Output frames:
|
yading@10
|
12138 \& 2 2 2 1 2
|
yading@10
|
12139 \& 2 1 3 2 2
|
yading@10
|
12140 .Ve
|
yading@10
|
12141 .PP
|
yading@10
|
12142 \fIExamples\fR
|
yading@10
|
12143 .IX Subsection "Examples"
|
yading@10
|
12144 .PP
|
yading@10
|
12145 Simple \s-1IVTC\s0 of a top field first telecined stream:
|
yading@10
|
12146 .PP
|
yading@10
|
12147 .Vb 1
|
yading@10
|
12148 \& fieldmatch=order=tff:combmatch=none, decimate
|
yading@10
|
12149 .Ve
|
yading@10
|
12150 .PP
|
yading@10
|
12151 Advanced \s-1IVTC\s0, with fallback on yadif for still combed frames:
|
yading@10
|
12152 .PP
|
yading@10
|
12153 .Vb 1
|
yading@10
|
12154 \& fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
|
yading@10
|
12155 .Ve
|
yading@10
|
12156 .SS "fieldorder"
|
yading@10
|
12157 .IX Subsection "fieldorder"
|
yading@10
|
12158 Transform the field order of the input video.
|
yading@10
|
12159 .PP
|
yading@10
|
12160 This filter accepts the following options:
|
yading@10
|
12161 .IP "\fBorder\fR" 4
|
yading@10
|
12162 .IX Item "order"
|
yading@10
|
12163 Output field order. Valid values are \fItff\fR for top field first or \fIbff\fR
|
yading@10
|
12164 for bottom field first.
|
yading@10
|
12165 .PP
|
yading@10
|
12166 Default value is \fBtff\fR.
|
yading@10
|
12167 .PP
|
yading@10
|
12168 Transformation is achieved by shifting the picture content up or down
|
yading@10
|
12169 by one line, and filling the remaining line with appropriate picture content.
|
yading@10
|
12170 This method is consistent with most broadcast field order converters.
|
yading@10
|
12171 .PP
|
yading@10
|
12172 If the input video is not flagged as being interlaced, or it is already
|
yading@10
|
12173 flagged as being of the required output field order then this filter does
|
yading@10
|
12174 not alter the incoming video.
|
yading@10
|
12175 .PP
|
yading@10
|
12176 This filter is very useful when converting to or from \s-1PAL\s0 \s-1DV\s0 material,
|
yading@10
|
12177 which is bottom field first.
|
yading@10
|
12178 .PP
|
yading@10
|
12179 For example:
|
yading@10
|
12180 .PP
|
yading@10
|
12181 .Vb 1
|
yading@10
|
12182 \& ffmpeg \-i in.vob \-vf "fieldorder=bff" out.dv
|
yading@10
|
12183 .Ve
|
yading@10
|
12184 .SS "fifo"
|
yading@10
|
12185 .IX Subsection "fifo"
|
yading@10
|
12186 Buffer input images and send them when they are requested.
|
yading@10
|
12187 .PP
|
yading@10
|
12188 This filter is mainly useful when auto-inserted by the libavfilter
|
yading@10
|
12189 framework.
|
yading@10
|
12190 .PP
|
yading@10
|
12191 The filter does not take parameters.
|
yading@10
|
12192 .SS "format"
|
yading@10
|
12193 .IX Subsection "format"
|
yading@10
|
12194 Convert the input video to one of the specified pixel formats.
|
yading@10
|
12195 Libavfilter will try to pick one that is supported for the input to
|
yading@10
|
12196 the next filter.
|
yading@10
|
12197 .PP
|
yading@10
|
12198 This filter accepts the following parameters:
|
yading@10
|
12199 .IP "\fBpix_fmts\fR" 4
|
yading@10
|
12200 .IX Item "pix_fmts"
|
yading@10
|
12201 A '|'\-separated list of pixel format names, for example
|
yading@10
|
12202 \&\*(L"pix_fmts=yuv420p|monow|rgb24\*(R".
|
yading@10
|
12203 .PP
|
yading@10
|
12204 \fIExamples\fR
|
yading@10
|
12205 .IX Subsection "Examples"
|
yading@10
|
12206 .IP "\(bu" 4
|
yading@10
|
12207 Convert the input video to the format \fIyuv420p\fR
|
yading@10
|
12208 .Sp
|
yading@10
|
12209 .Vb 1
|
yading@10
|
12210 \& format=pix_fmts=yuv420p
|
yading@10
|
12211 .Ve
|
yading@10
|
12212 .Sp
|
yading@10
|
12213 Convert the input video to any of the formats in the list
|
yading@10
|
12214 .Sp
|
yading@10
|
12215 .Vb 1
|
yading@10
|
12216 \& format=pix_fmts=yuv420p|yuv444p|yuv410p
|
yading@10
|
12217 .Ve
|
yading@10
|
12218 .SS "fps"
|
yading@10
|
12219 .IX Subsection "fps"
|
yading@10
|
12220 Convert the video to specified constant frame rate by duplicating or dropping
|
yading@10
|
12221 frames as necessary.
|
yading@10
|
12222 .PP
|
yading@10
|
12223 This filter accepts the following named parameters:
|
yading@10
|
12224 .IP "\fBfps\fR" 4
|
yading@10
|
12225 .IX Item "fps"
|
yading@10
|
12226 Desired output frame rate. The default is \f(CW25\fR.
|
yading@10
|
12227 .IP "\fBround\fR" 4
|
yading@10
|
12228 .IX Item "round"
|
yading@10
|
12229 Rounding method.
|
yading@10
|
12230 .Sp
|
yading@10
|
12231 Possible values are:
|
yading@10
|
12232 .RS 4
|
yading@10
|
12233 .IP "\fBzero\fR" 4
|
yading@10
|
12234 .IX Item "zero"
|
yading@10
|
12235 zero round towards 0
|
yading@10
|
12236 .IP "\fBinf\fR" 4
|
yading@10
|
12237 .IX Item "inf"
|
yading@10
|
12238 round away from 0
|
yading@10
|
12239 .IP "\fBdown\fR" 4
|
yading@10
|
12240 .IX Item "down"
|
yading@10
|
12241 round towards \-infinity
|
yading@10
|
12242 .IP "\fBup\fR" 4
|
yading@10
|
12243 .IX Item "up"
|
yading@10
|
12244 round towards +infinity
|
yading@10
|
12245 .IP "\fBnear\fR" 4
|
yading@10
|
12246 .IX Item "near"
|
yading@10
|
12247 round to nearest
|
yading@10
|
12248 .RE
|
yading@10
|
12249 .RS 4
|
yading@10
|
12250 .Sp
|
yading@10
|
12251 The default is \f(CW\*(C`near\*(C'\fR.
|
yading@10
|
12252 .RE
|
yading@10
|
12253 .PP
|
yading@10
|
12254 Alternatively, the options can be specified as a flat string:
|
yading@10
|
12255 \&\fIfps\fR[:\fIround\fR].
|
yading@10
|
12256 .PP
|
yading@10
|
12257 See also the setpts filter.
|
yading@10
|
12258 .SS "framestep"
|
yading@10
|
12259 .IX Subsection "framestep"
|
yading@10
|
12260 Select one frame every N\-th frame.
|
yading@10
|
12261 .PP
|
yading@10
|
12262 This filter accepts the following option:
|
yading@10
|
12263 .IP "\fBstep\fR" 4
|
yading@10
|
12264 .IX Item "step"
|
yading@10
|
12265 Select frame after every \f(CW\*(C`step\*(C'\fR frames.
|
yading@10
|
12266 Allowed values are positive integers higher than 0. Default value is \f(CW1\fR.
|
yading@10
|
12267 .SS "frei0r"
|
yading@10
|
12268 .IX Subsection "frei0r"
|
yading@10
|
12269 Apply a frei0r effect to the input video.
|
yading@10
|
12270 .PP
|
yading@10
|
12271 To enable compilation of this filter you need to install the frei0r
|
yading@10
|
12272 header and configure FFmpeg with \f(CW\*(C`\-\-enable\-frei0r\*(C'\fR.
|
yading@10
|
12273 .PP
|
yading@10
|
12274 This filter accepts the following options:
|
yading@10
|
12275 .IP "\fBfilter_name\fR" 4
|
yading@10
|
12276 .IX Item "filter_name"
|
yading@10
|
12277 The name to the frei0r effect to load. If the environment variable
|
yading@10
|
12278 \&\fB\s-1FREI0R_PATH\s0\fR is defined, the frei0r effect is searched in each one of the
|
yading@10
|
12279 directories specified by the colon separated list in \fB\s-1FREIOR_PATH\s0\fR,
|
yading@10
|
12280 otherwise in the standard frei0r paths, which are in this order:
|
yading@10
|
12281 \&\fI\s-1HOME/\s0.frei0r\-1/lib/\fR, \fI/usr/local/lib/frei0r\-1/\fR,
|
yading@10
|
12282 \&\fI/usr/lib/frei0r\-1/\fR.
|
yading@10
|
12283 .IP "\fBfilter_params\fR" 4
|
yading@10
|
12284 .IX Item "filter_params"
|
yading@10
|
12285 A '|'\-separated list of parameters to pass to the frei0r effect.
|
yading@10
|
12286 .PP
|
yading@10
|
12287 A frei0r effect parameter can be a boolean (whose values are specified
|
yading@10
|
12288 with \*(L"y\*(R" and \*(L"n\*(R"), a double, a color (specified by the syntax
|
yading@10
|
12289 \&\fIR\fR/\fIG\fR/\fIB\fR, \fIR\fR, \fIG\fR, and \fIB\fR being float
|
yading@10
|
12290 numbers from 0.0 to 1.0) or by an \f(CW\*(C`av_parse_color()\*(C'\fR color
|
yading@10
|
12291 description), a position (specified by the syntax \fIX\fR/\fIY\fR,
|
yading@10
|
12292 \&\fIX\fR and \fIY\fR being float numbers) and a string.
|
yading@10
|
12293 .PP
|
yading@10
|
12294 The number and kind of parameters depend on the loaded effect. If an
|
yading@10
|
12295 effect parameter is not specified the default value is set.
|
yading@10
|
12296 .PP
|
yading@10
|
12297 \fIExamples\fR
|
yading@10
|
12298 .IX Subsection "Examples"
|
yading@10
|
12299 .IP "\(bu" 4
|
yading@10
|
12300 Apply the distort0r effect, set the first two double parameters:
|
yading@10
|
12301 .Sp
|
yading@10
|
12302 .Vb 1
|
yading@10
|
12303 \& frei0r=filter_name=distort0r:filter_params=0.5|0.01
|
yading@10
|
12304 .Ve
|
yading@10
|
12305 .IP "\(bu" 4
|
yading@10
|
12306 Apply the colordistance effect, take a color as first parameter:
|
yading@10
|
12307 .Sp
|
yading@10
|
12308 .Vb 3
|
yading@10
|
12309 \& frei0r=colordistance:0.2/0.3/0.4
|
yading@10
|
12310 \& frei0r=colordistance:violet
|
yading@10
|
12311 \& frei0r=colordistance:0x112233
|
yading@10
|
12312 .Ve
|
yading@10
|
12313 .IP "\(bu" 4
|
yading@10
|
12314 Apply the perspective effect, specify the top left and top right image
|
yading@10
|
12315 positions:
|
yading@10
|
12316 .Sp
|
yading@10
|
12317 .Vb 1
|
yading@10
|
12318 \& frei0r=perspective:0.2/0.2|0.8/0.2
|
yading@10
|
12319 .Ve
|
yading@10
|
12320 .PP
|
yading@10
|
12321 For more information see:
|
yading@10
|
12322 <\fBhttp://frei0r.dyne.org\fR>
|
yading@10
|
12323 .SS "geq"
|
yading@10
|
12324 .IX Subsection "geq"
|
yading@10
|
12325 The filter accepts the following options:
|
yading@10
|
12326 .IP "\fBlum_expr\fR" 4
|
yading@10
|
12327 .IX Item "lum_expr"
|
yading@10
|
12328 the luminance expression
|
yading@10
|
12329 .IP "\fBcb_expr\fR" 4
|
yading@10
|
12330 .IX Item "cb_expr"
|
yading@10
|
12331 the chrominance blue expression
|
yading@10
|
12332 .IP "\fBcr_expr\fR" 4
|
yading@10
|
12333 .IX Item "cr_expr"
|
yading@10
|
12334 the chrominance red expression
|
yading@10
|
12335 .IP "\fBalpha_expr\fR" 4
|
yading@10
|
12336 .IX Item "alpha_expr"
|
yading@10
|
12337 the alpha expression
|
yading@10
|
12338 .PP
|
yading@10
|
12339 If one of the chrominance expression is not defined, it falls back on the other
|
yading@10
|
12340 one. If no alpha expression is specified it will evaluate to opaque value.
|
yading@10
|
12341 If none of chrominance expressions are
|
yading@10
|
12342 specified, they will evaluate the luminance expression.
|
yading@10
|
12343 .PP
|
yading@10
|
12344 The expressions can use the following variables and functions:
|
yading@10
|
12345 .IP "\fBN\fR" 4
|
yading@10
|
12346 .IX Item "N"
|
yading@10
|
12347 The sequential number of the filtered frame, starting from \f(CW0\fR.
|
yading@10
|
12348 .IP "\fBX\fR" 4
|
yading@10
|
12349 .IX Item "X"
|
yading@10
|
12350 .PD 0
|
yading@10
|
12351 .IP "\fBY\fR" 4
|
yading@10
|
12352 .IX Item "Y"
|
yading@10
|
12353 .PD
|
yading@10
|
12354 The coordinates of the current sample.
|
yading@10
|
12355 .IP "\fBW\fR" 4
|
yading@10
|
12356 .IX Item "W"
|
yading@10
|
12357 .PD 0
|
yading@10
|
12358 .IP "\fBH\fR" 4
|
yading@10
|
12359 .IX Item "H"
|
yading@10
|
12360 .PD
|
yading@10
|
12361 The width and height of the image.
|
yading@10
|
12362 .IP "\fB\s-1SW\s0\fR" 4
|
yading@10
|
12363 .IX Item "SW"
|
yading@10
|
12364 .PD 0
|
yading@10
|
12365 .IP "\fB\s-1SH\s0\fR" 4
|
yading@10
|
12366 .IX Item "SH"
|
yading@10
|
12367 .PD
|
yading@10
|
12368 Width and height scale depending on the currently filtered plane. It is the
|
yading@10
|
12369 ratio between the corresponding luma plane number of pixels and the current
|
yading@10
|
12370 plane ones. E.g. for \s-1YUV4:2:0\s0 the values are \f(CW\*(C`1,1\*(C'\fR for the luma plane, and
|
yading@10
|
12371 \&\f(CW\*(C`0.5,0.5\*(C'\fR for chroma planes.
|
yading@10
|
12372 .IP "\fBT\fR" 4
|
yading@10
|
12373 .IX Item "T"
|
yading@10
|
12374 Time of the current frame, expressed in seconds.
|
yading@10
|
12375 .IP "\fBp(x, y)\fR" 4
|
yading@10
|
12376 .IX Item "p(x, y)"
|
yading@10
|
12377 Return the value of the pixel at location (\fIx\fR,\fIy\fR) of the current
|
yading@10
|
12378 plane.
|
yading@10
|
12379 .IP "\fBlum(x, y)\fR" 4
|
yading@10
|
12380 .IX Item "lum(x, y)"
|
yading@10
|
12381 Return the value of the pixel at location (\fIx\fR,\fIy\fR) of the luminance
|
yading@10
|
12382 plane.
|
yading@10
|
12383 .IP "\fBcb(x, y)\fR" 4
|
yading@10
|
12384 .IX Item "cb(x, y)"
|
yading@10
|
12385 Return the value of the pixel at location (\fIx\fR,\fIy\fR) of the
|
yading@10
|
12386 blue-difference chroma plane. Returns 0 if there is no such plane.
|
yading@10
|
12387 .IP "\fBcr(x, y)\fR" 4
|
yading@10
|
12388 .IX Item "cr(x, y)"
|
yading@10
|
12389 Return the value of the pixel at location (\fIx\fR,\fIy\fR) of the
|
yading@10
|
12390 red-difference chroma plane. Returns 0 if there is no such plane.
|
yading@10
|
12391 .IP "\fBalpha(x, y)\fR" 4
|
yading@10
|
12392 .IX Item "alpha(x, y)"
|
yading@10
|
12393 Return the value of the pixel at location (\fIx\fR,\fIy\fR) of the alpha
|
yading@10
|
12394 plane. Returns 0 if there is no such plane.
|
yading@10
|
12395 .PP
|
yading@10
|
12396 For functions, if \fIx\fR and \fIy\fR are outside the area, the value will be
|
yading@10
|
12397 automatically clipped to the closer edge.
|
yading@10
|
12398 .PP
|
yading@10
|
12399 \fIExamples\fR
|
yading@10
|
12400 .IX Subsection "Examples"
|
yading@10
|
12401 .IP "\(bu" 4
|
yading@10
|
12402 Flip the image horizontally:
|
yading@10
|
12403 .Sp
|
yading@10
|
12404 .Vb 1
|
yading@10
|
12405 \& geq=p(W\-X\e,Y)
|
yading@10
|
12406 .Ve
|
yading@10
|
12407 .IP "\(bu" 4
|
yading@10
|
12408 Generate a bidimensional sine wave, with angle \f(CW\*(C`PI/3\*(C'\fR and a
|
yading@10
|
12409 wavelength of 100 pixels:
|
yading@10
|
12410 .Sp
|
yading@10
|
12411 .Vb 1
|
yading@10
|
12412 \& geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X\-50*T) + sin(PI/3)*Y)):128:128
|
yading@10
|
12413 .Ve
|
yading@10
|
12414 .IP "\(bu" 4
|
yading@10
|
12415 Generate a fancy enigmatic moving light:
|
yading@10
|
12416 .Sp
|
yading@10
|
12417 .Vb 1
|
yading@10
|
12418 \& nullsrc=s=256x256,geq=random(1)/hypot(X\-cos(N*0.07)*W/2\-W/2\e,Y\-sin(N*0.09)*H/2\-H/2)^2*1000000*sin(N*0.02):128:128
|
yading@10
|
12419 .Ve
|
yading@10
|
12420 .IP "\(bu" 4
|
yading@10
|
12421 Generate a quick emboss effect:
|
yading@10
|
12422 .Sp
|
yading@10
|
12423 .Vb 1
|
yading@10
|
12424 \& format=gray,geq=lum_expr=\*(Aq(p(X,Y)+(256\-p(X\-4,Y\-4)))/2\*(Aq
|
yading@10
|
12425 .Ve
|
yading@10
|
12426 .SS "gradfun"
|
yading@10
|
12427 .IX Subsection "gradfun"
|
yading@10
|
12428 Fix the banding artifacts that are sometimes introduced into nearly flat
|
yading@10
|
12429 regions by truncation to 8bit color depth.
|
yading@10
|
12430 Interpolate the gradients that should go where the bands are, and
|
yading@10
|
12431 dither them.
|
yading@10
|
12432 .PP
|
yading@10
|
12433 This filter is designed for playback only. Do not use it prior to
|
yading@10
|
12434 lossy compression, because compression tends to lose the dither and
|
yading@10
|
12435 bring back the bands.
|
yading@10
|
12436 .PP
|
yading@10
|
12437 This filter accepts the following options:
|
yading@10
|
12438 .IP "\fBstrength\fR" 4
|
yading@10
|
12439 .IX Item "strength"
|
yading@10
|
12440 The maximum amount by which the filter will change any one pixel. Also the
|
yading@10
|
12441 threshold for detecting nearly flat regions. Acceptable values range from .51 to
|
yading@10
|
12442 64, default value is 1.2, out-of-range values will be clipped to the valid
|
yading@10
|
12443 range.
|
yading@10
|
12444 .IP "\fBradius\fR" 4
|
yading@10
|
12445 .IX Item "radius"
|
yading@10
|
12446 The neighborhood to fit the gradient to. A larger radius makes for smoother
|
yading@10
|
12447 gradients, but also prevents the filter from modifying the pixels near detailed
|
yading@10
|
12448 regions. Acceptable values are 8\-32, default value is 16, out-of-range values
|
yading@10
|
12449 will be clipped to the valid range.
|
yading@10
|
12450 .PP
|
yading@10
|
12451 Alternatively, the options can be specified as a flat string:
|
yading@10
|
12452 \&\fIstrength\fR[:\fIradius\fR]
|
yading@10
|
12453 .PP
|
yading@10
|
12454 \fIExamples\fR
|
yading@10
|
12455 .IX Subsection "Examples"
|
yading@10
|
12456 .IP "\(bu" 4
|
yading@10
|
12457 Apply the filter with a \f(CW3.5\fR strength and radius of \f(CW8\fR:
|
yading@10
|
12458 .Sp
|
yading@10
|
12459 .Vb 1
|
yading@10
|
12460 \& gradfun=3.5:8
|
yading@10
|
12461 .Ve
|
yading@10
|
12462 .IP "\(bu" 4
|
yading@10
|
12463 Specify radius, omitting the strength (which will fall-back to the default
|
yading@10
|
12464 value):
|
yading@10
|
12465 .Sp
|
yading@10
|
12466 .Vb 1
|
yading@10
|
12467 \& gradfun=radius=8
|
yading@10
|
12468 .Ve
|
yading@10
|
12469 .SS "hflip"
|
yading@10
|
12470 .IX Subsection "hflip"
|
yading@10
|
12471 Flip the input video horizontally.
|
yading@10
|
12472 .PP
|
yading@10
|
12473 For example to horizontally flip the input video with \fBffmpeg\fR:
|
yading@10
|
12474 .PP
|
yading@10
|
12475 .Vb 1
|
yading@10
|
12476 \& ffmpeg \-i in.avi \-vf "hflip" out.avi
|
yading@10
|
12477 .Ve
|
yading@10
|
12478 .SS "histeq"
|
yading@10
|
12479 .IX Subsection "histeq"
|
yading@10
|
12480 This filter applies a global color histogram equalization on a
|
yading@10
|
12481 per-frame basis.
|
yading@10
|
12482 .PP
|
yading@10
|
12483 It can be used to correct video that has a compressed range of pixel
|
yading@10
|
12484 intensities. The filter redistributes the pixel intensities to
|
yading@10
|
12485 equalize their distribution across the intensity range. It may be
|
yading@10
|
12486 viewed as an \*(L"automatically adjusting contrast filter\*(R". This filter is
|
yading@10
|
12487 useful only for correcting degraded or poorly captured source
|
yading@10
|
12488 video.
|
yading@10
|
12489 .PP
|
yading@10
|
12490 The filter accepts the following options:
|
yading@10
|
12491 .IP "\fBstrength\fR" 4
|
yading@10
|
12492 .IX Item "strength"
|
yading@10
|
12493 Determine the amount of equalization to be applied. As the strength
|
yading@10
|
12494 is reduced, the distribution of pixel intensities more-and-more
|
yading@10
|
12495 approaches that of the input frame. The value must be a float number
|
yading@10
|
12496 in the range [0,1] and defaults to 0.200.
|
yading@10
|
12497 .IP "\fBintensity\fR" 4
|
yading@10
|
12498 .IX Item "intensity"
|
yading@10
|
12499 Set the maximum intensity that can generated and scale the output
|
yading@10
|
12500 values appropriately. The strength should be set as desired and then
|
yading@10
|
12501 the intensity can be limited if needed to avoid washing-out. The value
|
yading@10
|
12502 must be a float number in the range [0,1] and defaults to 0.210.
|
yading@10
|
12503 .IP "\fBantibanding\fR" 4
|
yading@10
|
12504 .IX Item "antibanding"
|
yading@10
|
12505 Set the antibanding level. If enabled the filter will randomly vary
|
yading@10
|
12506 the luminance of output pixels by a small amount to avoid banding of
|
yading@10
|
12507 the histogram. Possible values are \f(CW\*(C`none\*(C'\fR, \f(CW\*(C`weak\*(C'\fR or
|
yading@10
|
12508 \&\f(CW\*(C`strong\*(C'\fR. It defaults to \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
12509 .SS "histogram"
|
yading@10
|
12510 .IX Subsection "histogram"
|
yading@10
|
12511 Compute and draw a color distribution histogram for the input video.
|
yading@10
|
12512 .PP
|
yading@10
|
12513 The computed histogram is a representation of distribution of color components
|
yading@10
|
12514 in an image.
|
yading@10
|
12515 .PP
|
yading@10
|
12516 The filter accepts the following options:
|
yading@10
|
12517 .IP "\fBmode\fR" 4
|
yading@10
|
12518 .IX Item "mode"
|
yading@10
|
12519 Set histogram mode.
|
yading@10
|
12520 .Sp
|
yading@10
|
12521 It accepts the following values:
|
yading@10
|
12522 .RS 4
|
yading@10
|
12523 .IP "\fBlevels\fR" 4
|
yading@10
|
12524 .IX Item "levels"
|
yading@10
|
12525 standard histogram that display color components distribution in an image.
|
yading@10
|
12526 Displays color graph for each color component. Shows distribution
|
yading@10
|
12527 of the Y, U, V, A or G, B, R components, depending on input format,
|
yading@10
|
12528 in current frame. Bellow each graph is color component scale meter.
|
yading@10
|
12529 .IP "\fBcolor\fR" 4
|
yading@10
|
12530 .IX Item "color"
|
yading@10
|
12531 chroma values in vectorscope, if brighter more such chroma values are
|
yading@10
|
12532 distributed in an image.
|
yading@10
|
12533 Displays chroma values (U/V color placement) in two dimensional graph
|
yading@10
|
12534 (which is called a vectorscope). It can be used to read of the hue and
|
yading@10
|
12535 saturation of the current frame. At a same time it is a histogram.
|
yading@10
|
12536 The whiter a pixel in the vectorscope, the more pixels of the input frame
|
yading@10
|
12537 correspond to that pixel (that is the more pixels have this chroma value).
|
yading@10
|
12538 The V component is displayed on the horizontal (X) axis, with the leftmost
|
yading@10
|
12539 side being V = 0 and the rightmost side being V = 255.
|
yading@10
|
12540 The U component is displayed on the vertical (Y) axis, with the top
|
yading@10
|
12541 representing U = 0 and the bottom representing U = 255.
|
yading@10
|
12542 .Sp
|
yading@10
|
12543 The position of a white pixel in the graph corresponds to the chroma value
|
yading@10
|
12544 of a pixel of the input clip. So the graph can be used to read of the
|
yading@10
|
12545 hue (color flavor) and the saturation (the dominance of the hue in the color).
|
yading@10
|
12546 As the hue of a color changes, it moves around the square. At the center of
|
yading@10
|
12547 the square, the saturation is zero, which means that the corresponding pixel
|
yading@10
|
12548 has no color. If you increase the amount of a specific color, while leaving
|
yading@10
|
12549 the other colors unchanged, the saturation increases, and you move towards
|
yading@10
|
12550 the edge of the square.
|
yading@10
|
12551 .IP "\fBcolor2\fR" 4
|
yading@10
|
12552 .IX Item "color2"
|
yading@10
|
12553 chroma values in vectorscope, similar as \f(CW\*(C`color\*(C'\fR but actual chroma values
|
yading@10
|
12554 are displayed.
|
yading@10
|
12555 .IP "\fBwaveform\fR" 4
|
yading@10
|
12556 .IX Item "waveform"
|
yading@10
|
12557 per row/column color component graph. In row mode graph in the left side represents
|
yading@10
|
12558 color component value 0 and right side represents value = 255. In column mode top
|
yading@10
|
12559 side represents color component value = 0 and bottom side represents value = 255.
|
yading@10
|
12560 .RE
|
yading@10
|
12561 .RS 4
|
yading@10
|
12562 .Sp
|
yading@10
|
12563 Default value is \f(CW\*(C`levels\*(C'\fR.
|
yading@10
|
12564 .RE
|
yading@10
|
12565 .IP "\fBlevel_height\fR" 4
|
yading@10
|
12566 .IX Item "level_height"
|
yading@10
|
12567 Set height of level in \f(CW\*(C`levels\*(C'\fR. Default value is \f(CW200\fR.
|
yading@10
|
12568 Allowed range is [50, 2048].
|
yading@10
|
12569 .IP "\fBscale_height\fR" 4
|
yading@10
|
12570 .IX Item "scale_height"
|
yading@10
|
12571 Set height of color scale in \f(CW\*(C`levels\*(C'\fR. Default value is \f(CW12\fR.
|
yading@10
|
12572 Allowed range is [0, 40].
|
yading@10
|
12573 .IP "\fBstep\fR" 4
|
yading@10
|
12574 .IX Item "step"
|
yading@10
|
12575 Set step for \f(CW\*(C`waveform\*(C'\fR mode. Smaller values are useful to find out how much
|
yading@10
|
12576 of same luminance values across input rows/columns are distributed.
|
yading@10
|
12577 Default value is \f(CW10\fR. Allowed range is [1, 255].
|
yading@10
|
12578 .IP "\fBwaveform_mode\fR" 4
|
yading@10
|
12579 .IX Item "waveform_mode"
|
yading@10
|
12580 Set mode for \f(CW\*(C`waveform\*(C'\fR. Can be either \f(CW\*(C`row\*(C'\fR, or \f(CW\*(C`column\*(C'\fR.
|
yading@10
|
12581 Default is \f(CW\*(C`row\*(C'\fR.
|
yading@10
|
12582 .IP "\fBdisplay_mode\fR" 4
|
yading@10
|
12583 .IX Item "display_mode"
|
yading@10
|
12584 Set display mode for \f(CW\*(C`waveform\*(C'\fR and \f(CW\*(C`levels\*(C'\fR.
|
yading@10
|
12585 It accepts the following values:
|
yading@10
|
12586 .RS 4
|
yading@10
|
12587 .IP "\fBparade\fR" 4
|
yading@10
|
12588 .IX Item "parade"
|
yading@10
|
12589 Display separate graph for the color components side by side in
|
yading@10
|
12590 \&\f(CW\*(C`row\*(C'\fR waveform mode or one below other in \f(CW\*(C`column\*(C'\fR waveform mode
|
yading@10
|
12591 for \f(CW\*(C`waveform\*(C'\fR histogram mode. For \f(CW\*(C`levels\*(C'\fR histogram mode
|
yading@10
|
12592 per color component graphs are placed one bellow other.
|
yading@10
|
12593 .Sp
|
yading@10
|
12594 This display mode in \f(CW\*(C`waveform\*(C'\fR histogram mode makes it easy to spot
|
yading@10
|
12595 color casts in the highlights and shadows of an image, by comparing the
|
yading@10
|
12596 contours of the top and the bottom of each waveform.
|
yading@10
|
12597 Since whites, grays, and blacks are characterized by
|
yading@10
|
12598 exactly equal amounts of red, green, and blue, neutral areas of the
|
yading@10
|
12599 picture should display three waveforms of roughly equal width/height.
|
yading@10
|
12600 If not, the correction is easy to make by making adjustments to level the
|
yading@10
|
12601 three waveforms.
|
yading@10
|
12602 .IP "\fBoverlay\fR" 4
|
yading@10
|
12603 .IX Item "overlay"
|
yading@10
|
12604 Presents information that's identical to that in the \f(CW\*(C`parade\*(C'\fR, except
|
yading@10
|
12605 that the graphs representing color components are superimposed directly
|
yading@10
|
12606 over one another.
|
yading@10
|
12607 .Sp
|
yading@10
|
12608 This display mode in \f(CW\*(C`waveform\*(C'\fR histogram mode can make it easier to spot
|
yading@10
|
12609 the relative differences or similarities in overlapping areas of the color
|
yading@10
|
12610 components that are supposed to be identical, such as neutral whites, grays,
|
yading@10
|
12611 or blacks.
|
yading@10
|
12612 .RE
|
yading@10
|
12613 .RS 4
|
yading@10
|
12614 .Sp
|
yading@10
|
12615 Default is \f(CW\*(C`parade\*(C'\fR.
|
yading@10
|
12616 .RE
|
yading@10
|
12617 .PP
|
yading@10
|
12618 \fIExamples\fR
|
yading@10
|
12619 .IX Subsection "Examples"
|
yading@10
|
12620 .IP "\(bu" 4
|
yading@10
|
12621 Calculate and draw histogram:
|
yading@10
|
12622 .Sp
|
yading@10
|
12623 .Vb 1
|
yading@10
|
12624 \& ffplay \-i input \-vf histogram
|
yading@10
|
12625 .Ve
|
yading@10
|
12626 .SS "hqdn3d"
|
yading@10
|
12627 .IX Subsection "hqdn3d"
|
yading@10
|
12628 High precision/quality 3d denoise filter. This filter aims to reduce
|
yading@10
|
12629 image noise producing smooth images and making still images really
|
yading@10
|
12630 still. It should enhance compressibility.
|
yading@10
|
12631 .PP
|
yading@10
|
12632 It accepts the following optional parameters:
|
yading@10
|
12633 .IP "\fBluma_spatial\fR" 4
|
yading@10
|
12634 .IX Item "luma_spatial"
|
yading@10
|
12635 a non-negative float number which specifies spatial luma strength,
|
yading@10
|
12636 defaults to 4.0
|
yading@10
|
12637 .IP "\fBchroma_spatial\fR" 4
|
yading@10
|
12638 .IX Item "chroma_spatial"
|
yading@10
|
12639 a non-negative float number which specifies spatial chroma strength,
|
yading@10
|
12640 defaults to 3.0*\fIluma_spatial\fR/4.0
|
yading@10
|
12641 .IP "\fBluma_tmp\fR" 4
|
yading@10
|
12642 .IX Item "luma_tmp"
|
yading@10
|
12643 a float number which specifies luma temporal strength, defaults to
|
yading@10
|
12644 6.0*\fIluma_spatial\fR/4.0
|
yading@10
|
12645 .IP "\fBchroma_tmp\fR" 4
|
yading@10
|
12646 .IX Item "chroma_tmp"
|
yading@10
|
12647 a float number which specifies chroma temporal strength, defaults to
|
yading@10
|
12648 \&\fIluma_tmp\fR*\fIchroma_spatial\fR/\fIluma_spatial\fR
|
yading@10
|
12649 .SS "hue"
|
yading@10
|
12650 .IX Subsection "hue"
|
yading@10
|
12651 Modify the hue and/or the saturation of the input.
|
yading@10
|
12652 .PP
|
yading@10
|
12653 This filter accepts the following options:
|
yading@10
|
12654 .IP "\fBh\fR" 4
|
yading@10
|
12655 .IX Item "h"
|
yading@10
|
12656 Specify the hue angle as a number of degrees. It accepts an expression,
|
yading@10
|
12657 and defaults to \*(L"0\*(R".
|
yading@10
|
12658 .IP "\fBs\fR" 4
|
yading@10
|
12659 .IX Item "s"
|
yading@10
|
12660 Specify the saturation in the [\-10,10] range. It accepts a float number and
|
yading@10
|
12661 defaults to \*(L"1\*(R".
|
yading@10
|
12662 .IP "\fBH\fR" 4
|
yading@10
|
12663 .IX Item "H"
|
yading@10
|
12664 Specify the hue angle as a number of radians. It accepts a float
|
yading@10
|
12665 number or an expression, and defaults to \*(L"0\*(R".
|
yading@10
|
12666 .PP
|
yading@10
|
12667 \&\fBh\fR and \fBH\fR are mutually exclusive, and can't be
|
yading@10
|
12668 specified at the same time.
|
yading@10
|
12669 .PP
|
yading@10
|
12670 The \fBh\fR, \fBH\fR and \fBs\fR option values are
|
yading@10
|
12671 expressions containing the following constants:
|
yading@10
|
12672 .IP "\fBn\fR" 4
|
yading@10
|
12673 .IX Item "n"
|
yading@10
|
12674 frame count of the input frame starting from 0
|
yading@10
|
12675 .IP "\fBpts\fR" 4
|
yading@10
|
12676 .IX Item "pts"
|
yading@10
|
12677 presentation timestamp of the input frame expressed in time base units
|
yading@10
|
12678 .IP "\fBr\fR" 4
|
yading@10
|
12679 .IX Item "r"
|
yading@10
|
12680 frame rate of the input video, \s-1NAN\s0 if the input frame rate is unknown
|
yading@10
|
12681 .IP "\fBt\fR" 4
|
yading@10
|
12682 .IX Item "t"
|
yading@10
|
12683 timestamp expressed in seconds, \s-1NAN\s0 if the input timestamp is unknown
|
yading@10
|
12684 .IP "\fBtb\fR" 4
|
yading@10
|
12685 .IX Item "tb"
|
yading@10
|
12686 time base of the input video
|
yading@10
|
12687 .PP
|
yading@10
|
12688 \fIExamples\fR
|
yading@10
|
12689 .IX Subsection "Examples"
|
yading@10
|
12690 .IP "\(bu" 4
|
yading@10
|
12691 Set the hue to 90 degrees and the saturation to 1.0:
|
yading@10
|
12692 .Sp
|
yading@10
|
12693 .Vb 1
|
yading@10
|
12694 \& hue=h=90:s=1
|
yading@10
|
12695 .Ve
|
yading@10
|
12696 .IP "\(bu" 4
|
yading@10
|
12697 Same command but expressing the hue in radians:
|
yading@10
|
12698 .Sp
|
yading@10
|
12699 .Vb 1
|
yading@10
|
12700 \& hue=H=PI/2:s=1
|
yading@10
|
12701 .Ve
|
yading@10
|
12702 .IP "\(bu" 4
|
yading@10
|
12703 Rotate hue and make the saturation swing between 0
|
yading@10
|
12704 and 2 over a period of 1 second:
|
yading@10
|
12705 .Sp
|
yading@10
|
12706 .Vb 1
|
yading@10
|
12707 \& hue="H=2*PI*t: s=sin(2*PI*t)+1"
|
yading@10
|
12708 .Ve
|
yading@10
|
12709 .IP "\(bu" 4
|
yading@10
|
12710 Apply a 3 seconds saturation fade-in effect starting at 0:
|
yading@10
|
12711 .Sp
|
yading@10
|
12712 .Vb 1
|
yading@10
|
12713 \& hue="s=min(t/3\e,1)"
|
yading@10
|
12714 .Ve
|
yading@10
|
12715 .Sp
|
yading@10
|
12716 The general fade-in expression can be written as:
|
yading@10
|
12717 .Sp
|
yading@10
|
12718 .Vb 1
|
yading@10
|
12719 \& hue="s=min(0\e, max((t\-START)/DURATION\e, 1))"
|
yading@10
|
12720 .Ve
|
yading@10
|
12721 .IP "\(bu" 4
|
yading@10
|
12722 Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
|
yading@10
|
12723 .Sp
|
yading@10
|
12724 .Vb 1
|
yading@10
|
12725 \& hue="s=max(0\e, min(1\e, (8\-t)/3))"
|
yading@10
|
12726 .Ve
|
yading@10
|
12727 .Sp
|
yading@10
|
12728 The general fade-out expression can be written as:
|
yading@10
|
12729 .Sp
|
yading@10
|
12730 .Vb 1
|
yading@10
|
12731 \& hue="s=max(0\e, min(1\e, (START+DURATION\-t)/DURATION))"
|
yading@10
|
12732 .Ve
|
yading@10
|
12733 .PP
|
yading@10
|
12734 \fICommands\fR
|
yading@10
|
12735 .IX Subsection "Commands"
|
yading@10
|
12736 .PP
|
yading@10
|
12737 This filter supports the following commands:
|
yading@10
|
12738 .IP "\fBs\fR" 4
|
yading@10
|
12739 .IX Item "s"
|
yading@10
|
12740 .PD 0
|
yading@10
|
12741 .IP "\fBh\fR" 4
|
yading@10
|
12742 .IX Item "h"
|
yading@10
|
12743 .IP "\fBH\fR" 4
|
yading@10
|
12744 .IX Item "H"
|
yading@10
|
12745 .PD
|
yading@10
|
12746 Modify the hue and/or the saturation of the input video.
|
yading@10
|
12747 The command accepts the same syntax of the corresponding option.
|
yading@10
|
12748 .Sp
|
yading@10
|
12749 If the specified expression is not valid, it is kept at its current
|
yading@10
|
12750 value.
|
yading@10
|
12751 .SS "idet"
|
yading@10
|
12752 .IX Subsection "idet"
|
yading@10
|
12753 Detect video interlacing type.
|
yading@10
|
12754 .PP
|
yading@10
|
12755 This filter tries to detect if the input is interlaced or progressive,
|
yading@10
|
12756 top or bottom field first.
|
yading@10
|
12757 .PP
|
yading@10
|
12758 The filter accepts the following options:
|
yading@10
|
12759 .IP "\fBintl_thres\fR" 4
|
yading@10
|
12760 .IX Item "intl_thres"
|
yading@10
|
12761 Set interlacing threshold.
|
yading@10
|
12762 .IP "\fBprog_thres\fR" 4
|
yading@10
|
12763 .IX Item "prog_thres"
|
yading@10
|
12764 Set progressive threshold.
|
yading@10
|
12765 .SS "il"
|
yading@10
|
12766 .IX Subsection "il"
|
yading@10
|
12767 Deinterleave or interleave fields.
|
yading@10
|
12768 .PP
|
yading@10
|
12769 This filter allows to process interlaced images fields without
|
yading@10
|
12770 deinterlacing them. Deinterleaving splits the input frame into 2
|
yading@10
|
12771 fields (so called half pictures). Odd lines are moved to the top
|
yading@10
|
12772 half of the output image, even lines to the bottom half.
|
yading@10
|
12773 You can process (filter) them independently and then re-interleave them.
|
yading@10
|
12774 .PP
|
yading@10
|
12775 The filter accepts the following options:
|
yading@10
|
12776 .IP "\fBluma_mode, l\fR" 4
|
yading@10
|
12777 .IX Item "luma_mode, l"
|
yading@10
|
12778 .PD 0
|
yading@10
|
12779 .IP "\fBchroma_mode, s\fR" 4
|
yading@10
|
12780 .IX Item "chroma_mode, s"
|
yading@10
|
12781 .IP "\fBalpha_mode, a\fR" 4
|
yading@10
|
12782 .IX Item "alpha_mode, a"
|
yading@10
|
12783 .PD
|
yading@10
|
12784 Available values for \fIluma_mode\fR, \fIchroma_mode\fR and
|
yading@10
|
12785 \&\fIalpha_mode\fR are:
|
yading@10
|
12786 .RS 4
|
yading@10
|
12787 .IP "\fBnone\fR" 4
|
yading@10
|
12788 .IX Item "none"
|
yading@10
|
12789 Do nothing.
|
yading@10
|
12790 .IP "\fBdeinterleave, d\fR" 4
|
yading@10
|
12791 .IX Item "deinterleave, d"
|
yading@10
|
12792 Deinterleave fields, placing one above the other.
|
yading@10
|
12793 .IP "\fBinterleave, i\fR" 4
|
yading@10
|
12794 .IX Item "interleave, i"
|
yading@10
|
12795 Interleave fields. Reverse the effect of deinterleaving.
|
yading@10
|
12796 .RE
|
yading@10
|
12797 .RS 4
|
yading@10
|
12798 .Sp
|
yading@10
|
12799 Default value is \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
12800 .RE
|
yading@10
|
12801 .IP "\fBluma_swap, ls\fR" 4
|
yading@10
|
12802 .IX Item "luma_swap, ls"
|
yading@10
|
12803 .PD 0
|
yading@10
|
12804 .IP "\fBchroma_swap, cs\fR" 4
|
yading@10
|
12805 .IX Item "chroma_swap, cs"
|
yading@10
|
12806 .IP "\fBalpha_swap, as\fR" 4
|
yading@10
|
12807 .IX Item "alpha_swap, as"
|
yading@10
|
12808 .PD
|
yading@10
|
12809 Swap luma/chroma/alpha fields. Exchange even & odd lines. Default value is \f(CW0\fR.
|
yading@10
|
12810 .SS "interlace"
|
yading@10
|
12811 .IX Subsection "interlace"
|
yading@10
|
12812 Simple interlacing filter from progressive contents. This interleaves upper (or
|
yading@10
|
12813 lower) lines from odd frames with lower (or upper) lines from even frames,
|
yading@10
|
12814 halving the frame rate and preserving image height.
|
yading@10
|
12815 .PP
|
yading@10
|
12816 .Vb 9
|
yading@10
|
12817 \& Original Original New Frame
|
yading@10
|
12818 \& Frame \*(Aqj\*(Aq Frame \*(Aqj+1\*(Aq (tff)
|
yading@10
|
12819 \& ========== =========== ==================
|
yading@10
|
12820 \& Line 0 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> Frame \*(Aqj\*(Aq Line 0
|
yading@10
|
12821 \& Line 1 Line 1 \-\-\-\-> Frame \*(Aqj+1\*(Aq Line 1
|
yading@10
|
12822 \& Line 2 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> Frame \*(Aqj\*(Aq Line 2
|
yading@10
|
12823 \& Line 3 Line 3 \-\-\-\-> Frame \*(Aqj+1\*(Aq Line 3
|
yading@10
|
12824 \& ... ... ...
|
yading@10
|
12825 \& New Frame + 1 will be generated by Frame \*(Aqj+2\*(Aq and Frame \*(Aqj+3\*(Aq and so on
|
yading@10
|
12826 .Ve
|
yading@10
|
12827 .PP
|
yading@10
|
12828 It accepts the following optional parameters:
|
yading@10
|
12829 .IP "\fBscan\fR" 4
|
yading@10
|
12830 .IX Item "scan"
|
yading@10
|
12831 determines whether the interlaced frame is taken from the even (tff \- default)
|
yading@10
|
12832 or odd (bff) lines of the progressive frame.
|
yading@10
|
12833 .IP "\fBlowpass\fR" 4
|
yading@10
|
12834 .IX Item "lowpass"
|
yading@10
|
12835 Enable (default) or disable the vertical lowpass filter to avoid twitter
|
yading@10
|
12836 interlacing and reduce moire patterns.
|
yading@10
|
12837 .SS "kerndeint"
|
yading@10
|
12838 .IX Subsection "kerndeint"
|
yading@10
|
12839 Deinterlace input video by applying Donald Graft's adaptive kernel
|
yading@10
|
12840 deinterling. Work on interlaced parts of a video to produce
|
yading@10
|
12841 progressive frames.
|
yading@10
|
12842 .PP
|
yading@10
|
12843 The description of the accepted parameters follows.
|
yading@10
|
12844 .IP "\fBthresh\fR" 4
|
yading@10
|
12845 .IX Item "thresh"
|
yading@10
|
12846 Set the threshold which affects the filter's tolerance when
|
yading@10
|
12847 determining if a pixel line must be processed. It must be an integer
|
yading@10
|
12848 in the range [0,255] and defaults to 10. A value of 0 will result in
|
yading@10
|
12849 applying the process on every pixels.
|
yading@10
|
12850 .IP "\fBmap\fR" 4
|
yading@10
|
12851 .IX Item "map"
|
yading@10
|
12852 Paint pixels exceeding the threshold value to white if set to 1.
|
yading@10
|
12853 Default is 0.
|
yading@10
|
12854 .IP "\fBorder\fR" 4
|
yading@10
|
12855 .IX Item "order"
|
yading@10
|
12856 Set the fields order. Swap fields if set to 1, leave fields alone if
|
yading@10
|
12857 0. Default is 0.
|
yading@10
|
12858 .IP "\fBsharp\fR" 4
|
yading@10
|
12859 .IX Item "sharp"
|
yading@10
|
12860 Enable additional sharpening if set to 1. Default is 0.
|
yading@10
|
12861 .IP "\fBtwoway\fR" 4
|
yading@10
|
12862 .IX Item "twoway"
|
yading@10
|
12863 Enable twoway sharpening if set to 1. Default is 0.
|
yading@10
|
12864 .PP
|
yading@10
|
12865 \fIExamples\fR
|
yading@10
|
12866 .IX Subsection "Examples"
|
yading@10
|
12867 .IP "\(bu" 4
|
yading@10
|
12868 Apply default values:
|
yading@10
|
12869 .Sp
|
yading@10
|
12870 .Vb 1
|
yading@10
|
12871 \& kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
|
yading@10
|
12872 .Ve
|
yading@10
|
12873 .IP "\(bu" 4
|
yading@10
|
12874 Enable additional sharpening:
|
yading@10
|
12875 .Sp
|
yading@10
|
12876 .Vb 1
|
yading@10
|
12877 \& kerndeint=sharp=1
|
yading@10
|
12878 .Ve
|
yading@10
|
12879 .IP "\(bu" 4
|
yading@10
|
12880 Paint processed pixels in white:
|
yading@10
|
12881 .Sp
|
yading@10
|
12882 .Vb 1
|
yading@10
|
12883 \& kerndeint=map=1
|
yading@10
|
12884 .Ve
|
yading@10
|
12885 .SS "lut, lutrgb, lutyuv"
|
yading@10
|
12886 .IX Subsection "lut, lutrgb, lutyuv"
|
yading@10
|
12887 Compute a look-up table for binding each pixel component input value
|
yading@10
|
12888 to an output value, and apply it to input video.
|
yading@10
|
12889 .PP
|
yading@10
|
12890 \&\fIlutyuv\fR applies a lookup table to a \s-1YUV\s0 input video, \fIlutrgb\fR
|
yading@10
|
12891 to an \s-1RGB\s0 input video.
|
yading@10
|
12892 .PP
|
yading@10
|
12893 These filters accept the following options:
|
yading@10
|
12894 .IP "\fBc0\fR" 4
|
yading@10
|
12895 .IX Item "c0"
|
yading@10
|
12896 set first pixel component expression
|
yading@10
|
12897 .IP "\fBc1\fR" 4
|
yading@10
|
12898 .IX Item "c1"
|
yading@10
|
12899 set second pixel component expression
|
yading@10
|
12900 .IP "\fBc2\fR" 4
|
yading@10
|
12901 .IX Item "c2"
|
yading@10
|
12902 set third pixel component expression
|
yading@10
|
12903 .IP "\fBc3\fR" 4
|
yading@10
|
12904 .IX Item "c3"
|
yading@10
|
12905 set fourth pixel component expression, corresponds to the alpha component
|
yading@10
|
12906 .IP "\fBr\fR" 4
|
yading@10
|
12907 .IX Item "r"
|
yading@10
|
12908 set red component expression
|
yading@10
|
12909 .IP "\fBg\fR" 4
|
yading@10
|
12910 .IX Item "g"
|
yading@10
|
12911 set green component expression
|
yading@10
|
12912 .IP "\fBb\fR" 4
|
yading@10
|
12913 .IX Item "b"
|
yading@10
|
12914 set blue component expression
|
yading@10
|
12915 .IP "\fBa\fR" 4
|
yading@10
|
12916 .IX Item "a"
|
yading@10
|
12917 alpha component expression
|
yading@10
|
12918 .IP "\fBy\fR" 4
|
yading@10
|
12919 .IX Item "y"
|
yading@10
|
12920 set Y/luminance component expression
|
yading@10
|
12921 .IP "\fBu\fR" 4
|
yading@10
|
12922 .IX Item "u"
|
yading@10
|
12923 set U/Cb component expression
|
yading@10
|
12924 .IP "\fBv\fR" 4
|
yading@10
|
12925 .IX Item "v"
|
yading@10
|
12926 set V/Cr component expression
|
yading@10
|
12927 .PP
|
yading@10
|
12928 Each of them specifies the expression to use for computing the lookup table for
|
yading@10
|
12929 the corresponding pixel component values.
|
yading@10
|
12930 .PP
|
yading@10
|
12931 The exact component associated to each of the \fIc*\fR options depends on the
|
yading@10
|
12932 format in input.
|
yading@10
|
12933 .PP
|
yading@10
|
12934 The \fIlut\fR filter requires either \s-1YUV\s0 or \s-1RGB\s0 pixel formats in input,
|
yading@10
|
12935 \&\fIlutrgb\fR requires \s-1RGB\s0 pixel formats in input, and \fIlutyuv\fR requires \s-1YUV\s0.
|
yading@10
|
12936 .PP
|
yading@10
|
12937 The expressions can contain the following constants and functions:
|
yading@10
|
12938 .IP "\fBw, h\fR" 4
|
yading@10
|
12939 .IX Item "w, h"
|
yading@10
|
12940 the input width and height
|
yading@10
|
12941 .IP "\fBval\fR" 4
|
yading@10
|
12942 .IX Item "val"
|
yading@10
|
12943 input value for the pixel component
|
yading@10
|
12944 .IP "\fBclipval\fR" 4
|
yading@10
|
12945 .IX Item "clipval"
|
yading@10
|
12946 the input value clipped in the \fIminval\fR\-\fImaxval\fR range
|
yading@10
|
12947 .IP "\fBmaxval\fR" 4
|
yading@10
|
12948 .IX Item "maxval"
|
yading@10
|
12949 maximum value for the pixel component
|
yading@10
|
12950 .IP "\fBminval\fR" 4
|
yading@10
|
12951 .IX Item "minval"
|
yading@10
|
12952 minimum value for the pixel component
|
yading@10
|
12953 .IP "\fBnegval\fR" 4
|
yading@10
|
12954 .IX Item "negval"
|
yading@10
|
12955 the negated value for the pixel component value clipped in the
|
yading@10
|
12956 \&\fIminval\fR\-\fImaxval\fR range , it corresponds to the expression
|
yading@10
|
12957 \&\*(L"maxval\-clipval+minval\*(R"
|
yading@10
|
12958 .IP "\fBclip(val)\fR" 4
|
yading@10
|
12959 .IX Item "clip(val)"
|
yading@10
|
12960 the computed value in \fIval\fR clipped in the
|
yading@10
|
12961 \&\fIminval\fR\-\fImaxval\fR range
|
yading@10
|
12962 .IP "\fBgammaval(gamma)\fR" 4
|
yading@10
|
12963 .IX Item "gammaval(gamma)"
|
yading@10
|
12964 the computed gamma correction value of the pixel component value
|
yading@10
|
12965 clipped in the \fIminval\fR\-\fImaxval\fR range, corresponds to the
|
yading@10
|
12966 expression
|
yading@10
|
12967 "pow((clipval\-minval)/(maxval\-minval)\e,\fIgamma\fR)*(maxval\-minval)+minval"
|
yading@10
|
12968 .PP
|
yading@10
|
12969 All expressions default to \*(L"val\*(R".
|
yading@10
|
12970 .PP
|
yading@10
|
12971 \fIExamples\fR
|
yading@10
|
12972 .IX Subsection "Examples"
|
yading@10
|
12973 .IP "\(bu" 4
|
yading@10
|
12974 Negate input video:
|
yading@10
|
12975 .Sp
|
yading@10
|
12976 .Vb 2
|
yading@10
|
12977 \& lutrgb="r=maxval+minval\-val:g=maxval+minval\-val:b=maxval+minval\-val"
|
yading@10
|
12978 \& lutyuv="y=maxval+minval\-val:u=maxval+minval\-val:v=maxval+minval\-val"
|
yading@10
|
12979 .Ve
|
yading@10
|
12980 .Sp
|
yading@10
|
12981 The above is the same as:
|
yading@10
|
12982 .Sp
|
yading@10
|
12983 .Vb 2
|
yading@10
|
12984 \& lutrgb="r=negval:g=negval:b=negval"
|
yading@10
|
12985 \& lutyuv="y=negval:u=negval:v=negval"
|
yading@10
|
12986 .Ve
|
yading@10
|
12987 .IP "\(bu" 4
|
yading@10
|
12988 Negate luminance:
|
yading@10
|
12989 .Sp
|
yading@10
|
12990 .Vb 1
|
yading@10
|
12991 \& lutyuv=y=negval
|
yading@10
|
12992 .Ve
|
yading@10
|
12993 .IP "\(bu" 4
|
yading@10
|
12994 Remove chroma components, turns the video into a graytone image:
|
yading@10
|
12995 .Sp
|
yading@10
|
12996 .Vb 1
|
yading@10
|
12997 \& lutyuv="u=128:v=128"
|
yading@10
|
12998 .Ve
|
yading@10
|
12999 .IP "\(bu" 4
|
yading@10
|
13000 Apply a luma burning effect:
|
yading@10
|
13001 .Sp
|
yading@10
|
13002 .Vb 1
|
yading@10
|
13003 \& lutyuv="y=2*val"
|
yading@10
|
13004 .Ve
|
yading@10
|
13005 .IP "\(bu" 4
|
yading@10
|
13006 Remove green and blue components:
|
yading@10
|
13007 .Sp
|
yading@10
|
13008 .Vb 1
|
yading@10
|
13009 \& lutrgb="g=0:b=0"
|
yading@10
|
13010 .Ve
|
yading@10
|
13011 .IP "\(bu" 4
|
yading@10
|
13012 Set a constant alpha channel value on input:
|
yading@10
|
13013 .Sp
|
yading@10
|
13014 .Vb 1
|
yading@10
|
13015 \& format=rgba,lutrgb=a="maxval\-minval/2"
|
yading@10
|
13016 .Ve
|
yading@10
|
13017 .IP "\(bu" 4
|
yading@10
|
13018 Correct luminance gamma by a 0.5 factor:
|
yading@10
|
13019 .Sp
|
yading@10
|
13020 .Vb 1
|
yading@10
|
13021 \& lutyuv=y=gammaval(0.5)
|
yading@10
|
13022 .Ve
|
yading@10
|
13023 .IP "\(bu" 4
|
yading@10
|
13024 Discard least significant bits of luma:
|
yading@10
|
13025 .Sp
|
yading@10
|
13026 .Vb 1
|
yading@10
|
13027 \& lutyuv=y=\*(Aqbitand(val, 128+64+32)\*(Aq
|
yading@10
|
13028 .Ve
|
yading@10
|
13029 .SS "mp"
|
yading@10
|
13030 .IX Subsection "mp"
|
yading@10
|
13031 Apply an MPlayer filter to the input video.
|
yading@10
|
13032 .PP
|
yading@10
|
13033 This filter provides a wrapper around most of the filters of
|
yading@10
|
13034 MPlayer/MEncoder.
|
yading@10
|
13035 .PP
|
yading@10
|
13036 This wrapper is considered experimental. Some of the wrapped filters
|
yading@10
|
13037 may not work properly and we may drop support for them, as they will
|
yading@10
|
13038 be implemented natively into FFmpeg. Thus you should avoid
|
yading@10
|
13039 depending on them when writing portable scripts.
|
yading@10
|
13040 .PP
|
yading@10
|
13041 The filters accepts the parameters:
|
yading@10
|
13042 \&\fIfilter_name\fR[:=]\fIfilter_params\fR
|
yading@10
|
13043 .PP
|
yading@10
|
13044 \&\fIfilter_name\fR is the name of a supported MPlayer filter,
|
yading@10
|
13045 \&\fIfilter_params\fR is a string containing the parameters accepted by
|
yading@10
|
13046 the named filter.
|
yading@10
|
13047 .PP
|
yading@10
|
13048 The list of the currently supported filters follows:
|
yading@10
|
13049 .IP "\fIdint\fR" 4
|
yading@10
|
13050 .IX Item "dint"
|
yading@10
|
13051 .PD 0
|
yading@10
|
13052 .IP "\fIdown3dright\fR" 4
|
yading@10
|
13053 .IX Item "down3dright"
|
yading@10
|
13054 .IP "\fIeq2\fR" 4
|
yading@10
|
13055 .IX Item "eq2"
|
yading@10
|
13056 .IP "\fIeq\fR" 4
|
yading@10
|
13057 .IX Item "eq"
|
yading@10
|
13058 .IP "\fIfil\fR" 4
|
yading@10
|
13059 .IX Item "fil"
|
yading@10
|
13060 .IP "\fIfspp\fR" 4
|
yading@10
|
13061 .IX Item "fspp"
|
yading@10
|
13062 .IP "\fIilpack\fR" 4
|
yading@10
|
13063 .IX Item "ilpack"
|
yading@10
|
13064 .IP "\fImcdeint\fR" 4
|
yading@10
|
13065 .IX Item "mcdeint"
|
yading@10
|
13066 .IP "\fIow\fR" 4
|
yading@10
|
13067 .IX Item "ow"
|
yading@10
|
13068 .IP "\fIperspective\fR" 4
|
yading@10
|
13069 .IX Item "perspective"
|
yading@10
|
13070 .IP "\fIphase\fR" 4
|
yading@10
|
13071 .IX Item "phase"
|
yading@10
|
13072 .IP "\fIpp7\fR" 4
|
yading@10
|
13073 .IX Item "pp7"
|
yading@10
|
13074 .IP "\fIpullup\fR" 4
|
yading@10
|
13075 .IX Item "pullup"
|
yading@10
|
13076 .IP "\fIqp\fR" 4
|
yading@10
|
13077 .IX Item "qp"
|
yading@10
|
13078 .IP "\fIsab\fR" 4
|
yading@10
|
13079 .IX Item "sab"
|
yading@10
|
13080 .IP "\fIsoftpulldown\fR" 4
|
yading@10
|
13081 .IX Item "softpulldown"
|
yading@10
|
13082 .IP "\fIspp\fR" 4
|
yading@10
|
13083 .IX Item "spp"
|
yading@10
|
13084 .IP "\fItinterlace\fR" 4
|
yading@10
|
13085 .IX Item "tinterlace"
|
yading@10
|
13086 .IP "\fIuspp\fR" 4
|
yading@10
|
13087 .IX Item "uspp"
|
yading@10
|
13088 .PD
|
yading@10
|
13089 .PP
|
yading@10
|
13090 The parameter syntax and behavior for the listed filters are the same
|
yading@10
|
13091 of the corresponding MPlayer filters. For detailed instructions check
|
yading@10
|
13092 the \*(L"\s-1VIDEO\s0 \s-1FILTERS\s0\*(R" section in the MPlayer manual.
|
yading@10
|
13093 .PP
|
yading@10
|
13094 \fIExamples\fR
|
yading@10
|
13095 .IX Subsection "Examples"
|
yading@10
|
13096 .IP "\(bu" 4
|
yading@10
|
13097 Adjust gamma, brightness, contrast:
|
yading@10
|
13098 .Sp
|
yading@10
|
13099 .Vb 1
|
yading@10
|
13100 \& mp=eq2=1.0:2:0.5
|
yading@10
|
13101 .Ve
|
yading@10
|
13102 .PP
|
yading@10
|
13103 See also \fImplayer\fR\|(1), <\fBhttp://www.mplayerhq.hu/\fR>.
|
yading@10
|
13104 .SS "mpdecimate"
|
yading@10
|
13105 .IX Subsection "mpdecimate"
|
yading@10
|
13106 Drop frames that do not differ greatly from the previous frame in
|
yading@10
|
13107 order to reduce frame rate.
|
yading@10
|
13108 .PP
|
yading@10
|
13109 The main use of this filter is for very-low-bitrate encoding
|
yading@10
|
13110 (e.g. streaming over dialup modem), but it could in theory be used for
|
yading@10
|
13111 fixing movies that were inverse-telecined incorrectly.
|
yading@10
|
13112 .PP
|
yading@10
|
13113 A description of the accepted options follows.
|
yading@10
|
13114 .IP "\fBmax\fR" 4
|
yading@10
|
13115 .IX Item "max"
|
yading@10
|
13116 Set the maximum number of consecutive frames which can be dropped (if
|
yading@10
|
13117 positive), or the minimum interval between dropped frames (if
|
yading@10
|
13118 negative). If the value is 0, the frame is dropped unregarding the
|
yading@10
|
13119 number of previous sequentially dropped frames.
|
yading@10
|
13120 .Sp
|
yading@10
|
13121 Default value is 0.
|
yading@10
|
13122 .IP "\fBhi\fR" 4
|
yading@10
|
13123 .IX Item "hi"
|
yading@10
|
13124 .PD 0
|
yading@10
|
13125 .IP "\fBlo\fR" 4
|
yading@10
|
13126 .IX Item "lo"
|
yading@10
|
13127 .IP "\fBfrac\fR" 4
|
yading@10
|
13128 .IX Item "frac"
|
yading@10
|
13129 .PD
|
yading@10
|
13130 Set the dropping threshold values.
|
yading@10
|
13131 .Sp
|
yading@10
|
13132 Values for \fBhi\fR and \fBlo\fR are for 8x8 pixel blocks and
|
yading@10
|
13133 represent actual pixel value differences, so a threshold of 64
|
yading@10
|
13134 corresponds to 1 unit of difference for each pixel, or the same spread
|
yading@10
|
13135 out differently over the block.
|
yading@10
|
13136 .Sp
|
yading@10
|
13137 A frame is a candidate for dropping if no 8x8 blocks differ by more
|
yading@10
|
13138 than a threshold of \fBhi\fR, and if no more than \fBfrac\fR blocks (1
|
yading@10
|
13139 meaning the whole image) differ by more than a threshold of \fBlo\fR.
|
yading@10
|
13140 .Sp
|
yading@10
|
13141 Default value for \fBhi\fR is 64*12, default value for \fBlo\fR is
|
yading@10
|
13142 64*5, and default value for \fBfrac\fR is 0.33.
|
yading@10
|
13143 .SS "negate"
|
yading@10
|
13144 .IX Subsection "negate"
|
yading@10
|
13145 Negate input video.
|
yading@10
|
13146 .PP
|
yading@10
|
13147 This filter accepts an integer in input, if non-zero it negates the
|
yading@10
|
13148 alpha component (if available). The default value in input is 0.
|
yading@10
|
13149 .SS "noformat"
|
yading@10
|
13150 .IX Subsection "noformat"
|
yading@10
|
13151 Force libavfilter not to use any of the specified pixel formats for the
|
yading@10
|
13152 input to the next filter.
|
yading@10
|
13153 .PP
|
yading@10
|
13154 This filter accepts the following parameters:
|
yading@10
|
13155 .IP "\fBpix_fmts\fR" 4
|
yading@10
|
13156 .IX Item "pix_fmts"
|
yading@10
|
13157 A '|'\-separated list of pixel format names, for example
|
yading@10
|
13158 \&\*(L"pix_fmts=yuv420p|monow|rgb24\*(R".
|
yading@10
|
13159 .PP
|
yading@10
|
13160 \fIExamples\fR
|
yading@10
|
13161 .IX Subsection "Examples"
|
yading@10
|
13162 .IP "\(bu" 4
|
yading@10
|
13163 Force libavfilter to use a format different from \fIyuv420p\fR for the
|
yading@10
|
13164 input to the vflip filter:
|
yading@10
|
13165 .Sp
|
yading@10
|
13166 .Vb 1
|
yading@10
|
13167 \& noformat=pix_fmts=yuv420p,vflip
|
yading@10
|
13168 .Ve
|
yading@10
|
13169 .IP "\(bu" 4
|
yading@10
|
13170 Convert the input video to any of the formats not contained in the list:
|
yading@10
|
13171 .Sp
|
yading@10
|
13172 .Vb 1
|
yading@10
|
13173 \& noformat=yuv420p|yuv444p|yuv410p
|
yading@10
|
13174 .Ve
|
yading@10
|
13175 .SS "noise"
|
yading@10
|
13176 .IX Subsection "noise"
|
yading@10
|
13177 Add noise on video input frame.
|
yading@10
|
13178 .PP
|
yading@10
|
13179 The filter accepts the following options:
|
yading@10
|
13180 .IP "\fBall_seed\fR" 4
|
yading@10
|
13181 .IX Item "all_seed"
|
yading@10
|
13182 .PD 0
|
yading@10
|
13183 .IP "\fBc0_seed\fR" 4
|
yading@10
|
13184 .IX Item "c0_seed"
|
yading@10
|
13185 .IP "\fBc1_seed\fR" 4
|
yading@10
|
13186 .IX Item "c1_seed"
|
yading@10
|
13187 .IP "\fBc2_seed\fR" 4
|
yading@10
|
13188 .IX Item "c2_seed"
|
yading@10
|
13189 .IP "\fBc3_seed\fR" 4
|
yading@10
|
13190 .IX Item "c3_seed"
|
yading@10
|
13191 .PD
|
yading@10
|
13192 Set noise seed for specific pixel component or all pixel components in case
|
yading@10
|
13193 of \fIall_seed\fR. Default value is \f(CW123457\fR.
|
yading@10
|
13194 .IP "\fBall_strength, alls\fR" 4
|
yading@10
|
13195 .IX Item "all_strength, alls"
|
yading@10
|
13196 .PD 0
|
yading@10
|
13197 .IP "\fBc0_strength, c0s\fR" 4
|
yading@10
|
13198 .IX Item "c0_strength, c0s"
|
yading@10
|
13199 .IP "\fBc1_strength, c1s\fR" 4
|
yading@10
|
13200 .IX Item "c1_strength, c1s"
|
yading@10
|
13201 .IP "\fBc2_strength, c2s\fR" 4
|
yading@10
|
13202 .IX Item "c2_strength, c2s"
|
yading@10
|
13203 .IP "\fBc3_strength, c3s\fR" 4
|
yading@10
|
13204 .IX Item "c3_strength, c3s"
|
yading@10
|
13205 .PD
|
yading@10
|
13206 Set noise strength for specific pixel component or all pixel components in case
|
yading@10
|
13207 \&\fIall_strength\fR. Default value is \f(CW0\fR. Allowed range is [0, 100].
|
yading@10
|
13208 .IP "\fBall_flags, allf\fR" 4
|
yading@10
|
13209 .IX Item "all_flags, allf"
|
yading@10
|
13210 .PD 0
|
yading@10
|
13211 .IP "\fBc0_flags, c0f\fR" 4
|
yading@10
|
13212 .IX Item "c0_flags, c0f"
|
yading@10
|
13213 .IP "\fBc1_flags, c1f\fR" 4
|
yading@10
|
13214 .IX Item "c1_flags, c1f"
|
yading@10
|
13215 .IP "\fBc2_flags, c2f\fR" 4
|
yading@10
|
13216 .IX Item "c2_flags, c2f"
|
yading@10
|
13217 .IP "\fBc3_flags, c3f\fR" 4
|
yading@10
|
13218 .IX Item "c3_flags, c3f"
|
yading@10
|
13219 .PD
|
yading@10
|
13220 Set pixel component flags or set flags for all components if \fIall_flags\fR.
|
yading@10
|
13221 Available values for component flags are:
|
yading@10
|
13222 .RS 4
|
yading@10
|
13223 .IP "\fBa\fR" 4
|
yading@10
|
13224 .IX Item "a"
|
yading@10
|
13225 averaged temporal noise (smoother)
|
yading@10
|
13226 .IP "\fBp\fR" 4
|
yading@10
|
13227 .IX Item "p"
|
yading@10
|
13228 mix random noise with a (semi)regular pattern
|
yading@10
|
13229 .IP "\fBq\fR" 4
|
yading@10
|
13230 .IX Item "q"
|
yading@10
|
13231 higher quality (slightly better looking, slightly slower)
|
yading@10
|
13232 .IP "\fBt\fR" 4
|
yading@10
|
13233 .IX Item "t"
|
yading@10
|
13234 temporal noise (noise pattern changes between frames)
|
yading@10
|
13235 .IP "\fBu\fR" 4
|
yading@10
|
13236 .IX Item "u"
|
yading@10
|
13237 uniform noise (gaussian otherwise)
|
yading@10
|
13238 .RE
|
yading@10
|
13239 .RS 4
|
yading@10
|
13240 .RE
|
yading@10
|
13241 .PP
|
yading@10
|
13242 \fIExamples\fR
|
yading@10
|
13243 .IX Subsection "Examples"
|
yading@10
|
13244 .PP
|
yading@10
|
13245 Add temporal and uniform noise to input video:
|
yading@10
|
13246 .PP
|
yading@10
|
13247 .Vb 1
|
yading@10
|
13248 \& noise=alls=20:allf=t+u
|
yading@10
|
13249 .Ve
|
yading@10
|
13250 .SS "null"
|
yading@10
|
13251 .IX Subsection "null"
|
yading@10
|
13252 Pass the video source unchanged to the output.
|
yading@10
|
13253 .SS "ocv"
|
yading@10
|
13254 .IX Subsection "ocv"
|
yading@10
|
13255 Apply video transform using libopencv.
|
yading@10
|
13256 .PP
|
yading@10
|
13257 To enable this filter install libopencv library and headers and
|
yading@10
|
13258 configure FFmpeg with \f(CW\*(C`\-\-enable\-libopencv\*(C'\fR.
|
yading@10
|
13259 .PP
|
yading@10
|
13260 This filter accepts the following parameters:
|
yading@10
|
13261 .IP "\fBfilter_name\fR" 4
|
yading@10
|
13262 .IX Item "filter_name"
|
yading@10
|
13263 The name of the libopencv filter to apply.
|
yading@10
|
13264 .IP "\fBfilter_params\fR" 4
|
yading@10
|
13265 .IX Item "filter_params"
|
yading@10
|
13266 The parameters to pass to the libopencv filter. If not specified the default
|
yading@10
|
13267 values are assumed.
|
yading@10
|
13268 .PP
|
yading@10
|
13269 Refer to the official libopencv documentation for more precise
|
yading@10
|
13270 information:
|
yading@10
|
13271 <\fBhttp://opencv.willowgarage.com/documentation/c/image_filtering.html\fR>
|
yading@10
|
13272 .PP
|
yading@10
|
13273 Follows the list of supported libopencv filters.
|
yading@10
|
13274 .PP
|
yading@10
|
13275 \fIdilate\fR
|
yading@10
|
13276 .IX Subsection "dilate"
|
yading@10
|
13277 .PP
|
yading@10
|
13278 Dilate an image by using a specific structuring element.
|
yading@10
|
13279 This filter corresponds to the libopencv function \f(CW\*(C`cvDilate\*(C'\fR.
|
yading@10
|
13280 .PP
|
yading@10
|
13281 It accepts the parameters: \fIstruct_el\fR|\fInb_iterations\fR.
|
yading@10
|
13282 .PP
|
yading@10
|
13283 \&\fIstruct_el\fR represents a structuring element, and has the syntax:
|
yading@10
|
13284 \&\fIcols\fRx\fIrows\fR+\fIanchor_x\fRx\fIanchor_y\fR/\fIshape\fR
|
yading@10
|
13285 .PP
|
yading@10
|
13286 \&\fIcols\fR and \fIrows\fR represent the number of columns and rows of
|
yading@10
|
13287 the structuring element, \fIanchor_x\fR and \fIanchor_y\fR the anchor
|
yading@10
|
13288 point, and \fIshape\fR the shape for the structuring element, and
|
yading@10
|
13289 can be one of the values \*(L"rect\*(R", \*(L"cross\*(R", \*(L"ellipse\*(R", \*(L"custom\*(R".
|
yading@10
|
13290 .PP
|
yading@10
|
13291 If the value for \fIshape\fR is \*(L"custom\*(R", it must be followed by a
|
yading@10
|
13292 string of the form "=\fIfilename\fR". The file with name
|
yading@10
|
13293 \&\fIfilename\fR is assumed to represent a binary image, with each
|
yading@10
|
13294 printable character corresponding to a bright pixel. When a custom
|
yading@10
|
13295 \&\fIshape\fR is used, \fIcols\fR and \fIrows\fR are ignored, the number
|
yading@10
|
13296 or columns and rows of the read file are assumed instead.
|
yading@10
|
13297 .PP
|
yading@10
|
13298 The default value for \fIstruct_el\fR is \*(L"3x3+0x0/rect\*(R".
|
yading@10
|
13299 .PP
|
yading@10
|
13300 \&\fInb_iterations\fR specifies the number of times the transform is
|
yading@10
|
13301 applied to the image, and defaults to 1.
|
yading@10
|
13302 .PP
|
yading@10
|
13303 Follow some example:
|
yading@10
|
13304 .PP
|
yading@10
|
13305 .Vb 2
|
yading@10
|
13306 \& # use the default values
|
yading@10
|
13307 \& ocv=dilate
|
yading@10
|
13308 \&
|
yading@10
|
13309 \& # dilate using a structuring element with a 5x5 cross, iterate two times
|
yading@10
|
13310 \& ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
|
yading@10
|
13311 \&
|
yading@10
|
13312 \& # read the shape from the file diamond.shape, iterate two times
|
yading@10
|
13313 \& # the file diamond.shape may contain a pattern of characters like this:
|
yading@10
|
13314 \& # *
|
yading@10
|
13315 \& # ***
|
yading@10
|
13316 \& # *****
|
yading@10
|
13317 \& # ***
|
yading@10
|
13318 \& # *
|
yading@10
|
13319 \& # the specified cols and rows are ignored (but not the anchor point coordinates)
|
yading@10
|
13320 \& ocv=dilate:0x0+2x2/custom=diamond.shape|2
|
yading@10
|
13321 .Ve
|
yading@10
|
13322 .PP
|
yading@10
|
13323 \fIerode\fR
|
yading@10
|
13324 .IX Subsection "erode"
|
yading@10
|
13325 .PP
|
yading@10
|
13326 Erode an image by using a specific structuring element.
|
yading@10
|
13327 This filter corresponds to the libopencv function \f(CW\*(C`cvErode\*(C'\fR.
|
yading@10
|
13328 .PP
|
yading@10
|
13329 The filter accepts the parameters: \fIstruct_el\fR:\fInb_iterations\fR,
|
yading@10
|
13330 with the same syntax and semantics as the dilate filter.
|
yading@10
|
13331 .PP
|
yading@10
|
13332 \fIsmooth\fR
|
yading@10
|
13333 .IX Subsection "smooth"
|
yading@10
|
13334 .PP
|
yading@10
|
13335 Smooth the input video.
|
yading@10
|
13336 .PP
|
yading@10
|
13337 The filter takes the following parameters:
|
yading@10
|
13338 \&\fItype\fR|\fIparam1\fR|\fIparam2\fR|\fIparam3\fR|\fIparam4\fR.
|
yading@10
|
13339 .PP
|
yading@10
|
13340 \&\fItype\fR is the type of smooth filter to apply, and can be one of
|
yading@10
|
13341 the following values: \*(L"blur\*(R", \*(L"blur_no_scale\*(R", \*(L"median\*(R", \*(L"gaussian\*(R",
|
yading@10
|
13342 \&\*(L"bilateral\*(R". The default value is \*(L"gaussian\*(R".
|
yading@10
|
13343 .PP
|
yading@10
|
13344 \&\fIparam1\fR, \fIparam2\fR, \fIparam3\fR, and \fIparam4\fR are
|
yading@10
|
13345 parameters whose meanings depend on smooth type. \fIparam1\fR and
|
yading@10
|
13346 \&\fIparam2\fR accept integer positive values or 0, \fIparam3\fR and
|
yading@10
|
13347 \&\fIparam4\fR accept float values.
|
yading@10
|
13348 .PP
|
yading@10
|
13349 The default value for \fIparam1\fR is 3, the default value for the
|
yading@10
|
13350 other parameters is 0.
|
yading@10
|
13351 .PP
|
yading@10
|
13352 These parameters correspond to the parameters assigned to the
|
yading@10
|
13353 libopencv function \f(CW\*(C`cvSmooth\*(C'\fR.
|
yading@10
|
13354 .SS "overlay"
|
yading@10
|
13355 .IX Subsection "overlay"
|
yading@10
|
13356 Overlay one video on top of another.
|
yading@10
|
13357 .PP
|
yading@10
|
13358 It takes two inputs and one output, the first input is the \*(L"main\*(R"
|
yading@10
|
13359 video on which the second input is overlayed.
|
yading@10
|
13360 .PP
|
yading@10
|
13361 This filter accepts the following parameters:
|
yading@10
|
13362 .PP
|
yading@10
|
13363 A description of the accepted options follows.
|
yading@10
|
13364 .IP "\fBx\fR" 4
|
yading@10
|
13365 .IX Item "x"
|
yading@10
|
13366 .PD 0
|
yading@10
|
13367 .IP "\fBy\fR" 4
|
yading@10
|
13368 .IX Item "y"
|
yading@10
|
13369 .PD
|
yading@10
|
13370 Set the expression for the x and y coordinates of the overlayed video
|
yading@10
|
13371 on the main video. Default value is \*(L"0\*(R" for both expressions. In case
|
yading@10
|
13372 the expression is invalid, it is set to a huge value (meaning that the
|
yading@10
|
13373 overlay will not be displayed within the output visible area).
|
yading@10
|
13374 .IP "\fBenable\fR" 4
|
yading@10
|
13375 .IX Item "enable"
|
yading@10
|
13376 Set the expression which enables the overlay. If the evaluation is
|
yading@10
|
13377 different from 0, the overlay is displayed on top of the input
|
yading@10
|
13378 frame. By default it is \*(L"1\*(R".
|
yading@10
|
13379 .IP "\fBeval\fR" 4
|
yading@10
|
13380 .IX Item "eval"
|
yading@10
|
13381 Set when the expressions for \fBx\fR, \fBy\fR, and
|
yading@10
|
13382 \&\fBenable\fR are evaluated.
|
yading@10
|
13383 .Sp
|
yading@10
|
13384 It accepts the following values:
|
yading@10
|
13385 .RS 4
|
yading@10
|
13386 .IP "\fBinit\fR" 4
|
yading@10
|
13387 .IX Item "init"
|
yading@10
|
13388 only evaluate expressions once during the filter initialization or
|
yading@10
|
13389 when a command is processed
|
yading@10
|
13390 .IP "\fBframe\fR" 4
|
yading@10
|
13391 .IX Item "frame"
|
yading@10
|
13392 evaluate expressions for each incoming frame
|
yading@10
|
13393 .RE
|
yading@10
|
13394 .RS 4
|
yading@10
|
13395 .Sp
|
yading@10
|
13396 Default value is \fBframe\fR.
|
yading@10
|
13397 .RE
|
yading@10
|
13398 .IP "\fBshortest\fR" 4
|
yading@10
|
13399 .IX Item "shortest"
|
yading@10
|
13400 If set to 1, force the output to terminate when the shortest input
|
yading@10
|
13401 terminates. Default value is 0.
|
yading@10
|
13402 .IP "\fBformat\fR" 4
|
yading@10
|
13403 .IX Item "format"
|
yading@10
|
13404 Set the format for the output video.
|
yading@10
|
13405 .Sp
|
yading@10
|
13406 It accepts the following values:
|
yading@10
|
13407 .RS 4
|
yading@10
|
13408 .IP "\fByuv420\fR" 4
|
yading@10
|
13409 .IX Item "yuv420"
|
yading@10
|
13410 force \s-1YUV420\s0 output
|
yading@10
|
13411 .IP "\fByuv444\fR" 4
|
yading@10
|
13412 .IX Item "yuv444"
|
yading@10
|
13413 force \s-1YUV444\s0 output
|
yading@10
|
13414 .IP "\fBrgb\fR" 4
|
yading@10
|
13415 .IX Item "rgb"
|
yading@10
|
13416 force \s-1RGB\s0 output
|
yading@10
|
13417 .RE
|
yading@10
|
13418 .RS 4
|
yading@10
|
13419 .Sp
|
yading@10
|
13420 Default value is \fByuv420\fR.
|
yading@10
|
13421 .RE
|
yading@10
|
13422 .IP "\fBrgb\fR \fI(deprecated)\fR" 4
|
yading@10
|
13423 .IX Item "rgb (deprecated)"
|
yading@10
|
13424 If set to 1, force the filter to accept inputs in the \s-1RGB\s0
|
yading@10
|
13425 color space. Default value is 0. This option is deprecated, use
|
yading@10
|
13426 \&\fBformat\fR instead.
|
yading@10
|
13427 .IP "\fBrepeatlast\fR" 4
|
yading@10
|
13428 .IX Item "repeatlast"
|
yading@10
|
13429 If set to 1, force the filter to draw the last overlay frame over the
|
yading@10
|
13430 main input until the end of the stream. A value of 0 disables this
|
yading@10
|
13431 behavior, which is enabled by default.
|
yading@10
|
13432 .PP
|
yading@10
|
13433 The \fBx\fR, \fBy\fR, and \fBenable\fR expressions can
|
yading@10
|
13434 contain the following parameters.
|
yading@10
|
13435 .IP "\fBmain_w, W\fR" 4
|
yading@10
|
13436 .IX Item "main_w, W"
|
yading@10
|
13437 .PD 0
|
yading@10
|
13438 .IP "\fBmain_h, H\fR" 4
|
yading@10
|
13439 .IX Item "main_h, H"
|
yading@10
|
13440 .PD
|
yading@10
|
13441 main input width and height
|
yading@10
|
13442 .IP "\fBoverlay_w, w\fR" 4
|
yading@10
|
13443 .IX Item "overlay_w, w"
|
yading@10
|
13444 .PD 0
|
yading@10
|
13445 .IP "\fBoverlay_h, h\fR" 4
|
yading@10
|
13446 .IX Item "overlay_h, h"
|
yading@10
|
13447 .PD
|
yading@10
|
13448 overlay input width and height
|
yading@10
|
13449 .IP "\fBx\fR" 4
|
yading@10
|
13450 .IX Item "x"
|
yading@10
|
13451 .PD 0
|
yading@10
|
13452 .IP "\fBy\fR" 4
|
yading@10
|
13453 .IX Item "y"
|
yading@10
|
13454 .PD
|
yading@10
|
13455 the computed values for \fIx\fR and \fIy\fR. They are evaluated for
|
yading@10
|
13456 each new frame.
|
yading@10
|
13457 .IP "\fBhsub\fR" 4
|
yading@10
|
13458 .IX Item "hsub"
|
yading@10
|
13459 .PD 0
|
yading@10
|
13460 .IP "\fBvsub\fR" 4
|
yading@10
|
13461 .IX Item "vsub"
|
yading@10
|
13462 .PD
|
yading@10
|
13463 horizontal and vertical chroma subsample values of the output
|
yading@10
|
13464 format. For example for the pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and
|
yading@10
|
13465 \&\fIvsub\fR is 1.
|
yading@10
|
13466 .IP "\fBn\fR" 4
|
yading@10
|
13467 .IX Item "n"
|
yading@10
|
13468 the number of input frame, starting from 0
|
yading@10
|
13469 .IP "\fBpos\fR" 4
|
yading@10
|
13470 .IX Item "pos"
|
yading@10
|
13471 the position in the file of the input frame, \s-1NAN\s0 if unknown
|
yading@10
|
13472 .IP "\fBt\fR" 4
|
yading@10
|
13473 .IX Item "t"
|
yading@10
|
13474 timestamp expressed in seconds, \s-1NAN\s0 if the input timestamp is unknown
|
yading@10
|
13475 .PP
|
yading@10
|
13476 Note that the \fIn\fR, \fIpos\fR, \fIt\fR variables are available only
|
yading@10
|
13477 when evaluation is done \fIper frame\fR, and will evaluate to \s-1NAN\s0
|
yading@10
|
13478 when \fBeval\fR is set to \fBinit\fR.
|
yading@10
|
13479 .PP
|
yading@10
|
13480 Be aware that frames are taken from each input video in timestamp
|
yading@10
|
13481 order, hence, if their initial timestamps differ, it is a a good idea
|
yading@10
|
13482 to pass the two inputs through a \fIsetpts=PTS\-STARTPTS\fR filter to
|
yading@10
|
13483 have them begin in the same zero timestamp, as it does the example for
|
yading@10
|
13484 the \fImovie\fR filter.
|
yading@10
|
13485 .PP
|
yading@10
|
13486 You can chain together more overlays but you should test the
|
yading@10
|
13487 efficiency of such approach.
|
yading@10
|
13488 .PP
|
yading@10
|
13489 \fICommands\fR
|
yading@10
|
13490 .IX Subsection "Commands"
|
yading@10
|
13491 .PP
|
yading@10
|
13492 This filter supports the following commands:
|
yading@10
|
13493 .IP "\fBx\fR" 4
|
yading@10
|
13494 .IX Item "x"
|
yading@10
|
13495 .PD 0
|
yading@10
|
13496 .IP "\fBy\fR" 4
|
yading@10
|
13497 .IX Item "y"
|
yading@10
|
13498 .IP "\fBenable\fR" 4
|
yading@10
|
13499 .IX Item "enable"
|
yading@10
|
13500 .PD
|
yading@10
|
13501 Modify the x/y and enable overlay of the overlay input.
|
yading@10
|
13502 The command accepts the same syntax of the corresponding option.
|
yading@10
|
13503 .Sp
|
yading@10
|
13504 If the specified expression is not valid, it is kept at its current
|
yading@10
|
13505 value.
|
yading@10
|
13506 .PP
|
yading@10
|
13507 \fIExamples\fR
|
yading@10
|
13508 .IX Subsection "Examples"
|
yading@10
|
13509 .IP "\(bu" 4
|
yading@10
|
13510 Draw the overlay at 10 pixels from the bottom right corner of the main
|
yading@10
|
13511 video:
|
yading@10
|
13512 .Sp
|
yading@10
|
13513 .Vb 1
|
yading@10
|
13514 \& overlay=main_w\-overlay_w\-10:main_h\-overlay_h\-10
|
yading@10
|
13515 .Ve
|
yading@10
|
13516 .Sp
|
yading@10
|
13517 Using named options the example above becomes:
|
yading@10
|
13518 .Sp
|
yading@10
|
13519 .Vb 1
|
yading@10
|
13520 \& overlay=x=main_w\-overlay_w\-10:y=main_h\-overlay_h\-10
|
yading@10
|
13521 .Ve
|
yading@10
|
13522 .IP "\(bu" 4
|
yading@10
|
13523 Insert a transparent \s-1PNG\s0 logo in the bottom left corner of the input,
|
yading@10
|
13524 using the \fBffmpeg\fR tool with the \f(CW\*(C`\-filter_complex\*(C'\fR option:
|
yading@10
|
13525 .Sp
|
yading@10
|
13526 .Vb 1
|
yading@10
|
13527 \& ffmpeg \-i input \-i logo \-filter_complex \*(Aqoverlay=10:main_h\-overlay_h\-10\*(Aq output
|
yading@10
|
13528 .Ve
|
yading@10
|
13529 .IP "\(bu" 4
|
yading@10
|
13530 Insert 2 different transparent \s-1PNG\s0 logos (second logo on bottom
|
yading@10
|
13531 right corner) using the \fBffmpeg\fR tool:
|
yading@10
|
13532 .Sp
|
yading@10
|
13533 .Vb 1
|
yading@10
|
13534 \& ffmpeg \-i input \-i logo1 \-i logo2 \-filter_complex \*(Aqoverlay=x=10:y=H\-h\-10,overlay=x=W\-w\-10:y=H\-h\-10\*(Aq output
|
yading@10
|
13535 .Ve
|
yading@10
|
13536 .IP "\(bu" 4
|
yading@10
|
13537 Add a transparent color layer on top of the main video, \f(CW\*(C`WxH\*(C'\fR
|
yading@10
|
13538 must specify the size of the main input to the overlay filter:
|
yading@10
|
13539 .Sp
|
yading@10
|
13540 .Vb 1
|
yading@10
|
13541 \& color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
|
yading@10
|
13542 .Ve
|
yading@10
|
13543 .IP "\(bu" 4
|
yading@10
|
13544 Play an original video and a filtered version (here with the deshake
|
yading@10
|
13545 filter) side by side using the \fBffplay\fR tool:
|
yading@10
|
13546 .Sp
|
yading@10
|
13547 .Vb 1
|
yading@10
|
13548 \& ffplay input.avi \-vf \*(Aqsplit[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w\*(Aq
|
yading@10
|
13549 .Ve
|
yading@10
|
13550 .Sp
|
yading@10
|
13551 The above command is the same as:
|
yading@10
|
13552 .Sp
|
yading@10
|
13553 .Vb 1
|
yading@10
|
13554 \& ffplay input.avi \-vf \*(Aqsplit[b], pad=iw*2[src], [b]deshake, [src]overlay=w\*(Aq
|
yading@10
|
13555 .Ve
|
yading@10
|
13556 .IP "\(bu" 4
|
yading@10
|
13557 Make a sliding overlay appearing from the left to the right top part of the
|
yading@10
|
13558 screen starting since time 2:
|
yading@10
|
13559 .Sp
|
yading@10
|
13560 .Vb 1
|
yading@10
|
13561 \& overlay=x=\*(Aqif(gte(t,2), \-w+(t\-2)*20, NAN)\*(Aq:y=0
|
yading@10
|
13562 .Ve
|
yading@10
|
13563 .IP "\(bu" 4
|
yading@10
|
13564 Compose output by putting two input videos side to side:
|
yading@10
|
13565 .Sp
|
yading@10
|
13566 .Vb 7
|
yading@10
|
13567 \& ffmpeg \-i left.avi \-i right.avi \-filter_complex "
|
yading@10
|
13568 \& nullsrc=size=200x100 [background];
|
yading@10
|
13569 \& [0:v] setpts=PTS\-STARTPTS, scale=100x100 [left];
|
yading@10
|
13570 \& [1:v] setpts=PTS\-STARTPTS, scale=100x100 [right];
|
yading@10
|
13571 \& [background][left] overlay=shortest=1 [background+left];
|
yading@10
|
13572 \& [background+left][right] overlay=shortest=1:x=100 [left+right]
|
yading@10
|
13573 \& "
|
yading@10
|
13574 .Ve
|
yading@10
|
13575 .IP "\(bu" 4
|
yading@10
|
13576 Chain several overlays in cascade:
|
yading@10
|
13577 .Sp
|
yading@10
|
13578 .Vb 6
|
yading@10
|
13579 \& nullsrc=s=200x200 [bg];
|
yading@10
|
13580 \& testsrc=s=100x100, split=4 [in0][in1][in2][in3];
|
yading@10
|
13581 \& [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
|
yading@10
|
13582 \& [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
|
yading@10
|
13583 \& [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
|
yading@10
|
13584 \& [in3] null, [mid2] overlay=100:100 [out0]
|
yading@10
|
13585 .Ve
|
yading@10
|
13586 .SS "pad"
|
yading@10
|
13587 .IX Subsection "pad"
|
yading@10
|
13588 Add paddings to the input image, and place the original input at the
|
yading@10
|
13589 given coordinates \fIx\fR, \fIy\fR.
|
yading@10
|
13590 .PP
|
yading@10
|
13591 This filter accepts the following parameters:
|
yading@10
|
13592 .IP "\fBwidth, w\fR" 4
|
yading@10
|
13593 .IX Item "width, w"
|
yading@10
|
13594 .PD 0
|
yading@10
|
13595 .IP "\fBheight, h\fR" 4
|
yading@10
|
13596 .IX Item "height, h"
|
yading@10
|
13597 .PD
|
yading@10
|
13598 Specify an expression for the size of the output image with the
|
yading@10
|
13599 paddings added. If the value for \fIwidth\fR or \fIheight\fR is 0, the
|
yading@10
|
13600 corresponding input size is used for the output.
|
yading@10
|
13601 .Sp
|
yading@10
|
13602 The \fIwidth\fR expression can reference the value set by the
|
yading@10
|
13603 \&\fIheight\fR expression, and vice versa.
|
yading@10
|
13604 .Sp
|
yading@10
|
13605 The default value of \fIwidth\fR and \fIheight\fR is 0.
|
yading@10
|
13606 .IP "\fBx\fR" 4
|
yading@10
|
13607 .IX Item "x"
|
yading@10
|
13608 .PD 0
|
yading@10
|
13609 .IP "\fBy\fR" 4
|
yading@10
|
13610 .IX Item "y"
|
yading@10
|
13611 .PD
|
yading@10
|
13612 Specify an expression for the offsets where to place the input image
|
yading@10
|
13613 in the padded area with respect to the top/left border of the output
|
yading@10
|
13614 image.
|
yading@10
|
13615 .Sp
|
yading@10
|
13616 The \fIx\fR expression can reference the value set by the \fIy\fR
|
yading@10
|
13617 expression, and vice versa.
|
yading@10
|
13618 .Sp
|
yading@10
|
13619 The default value of \fIx\fR and \fIy\fR is 0.
|
yading@10
|
13620 .IP "\fBcolor\fR" 4
|
yading@10
|
13621 .IX Item "color"
|
yading@10
|
13622 Specify the color of the padded area, it can be the name of a color
|
yading@10
|
13623 (case insensitive match) or a 0xRRGGBB[\s-1AA\s0] sequence.
|
yading@10
|
13624 .Sp
|
yading@10
|
13625 The default value of \fIcolor\fR is \*(L"black\*(R".
|
yading@10
|
13626 .PP
|
yading@10
|
13627 The value for the \fIwidth\fR, \fIheight\fR, \fIx\fR, and \fIy\fR
|
yading@10
|
13628 options are expressions containing the following constants:
|
yading@10
|
13629 .IP "\fBin_w, in_h\fR" 4
|
yading@10
|
13630 .IX Item "in_w, in_h"
|
yading@10
|
13631 the input video width and height
|
yading@10
|
13632 .IP "\fBiw, ih\fR" 4
|
yading@10
|
13633 .IX Item "iw, ih"
|
yading@10
|
13634 same as \fIin_w\fR and \fIin_h\fR
|
yading@10
|
13635 .IP "\fBout_w, out_h\fR" 4
|
yading@10
|
13636 .IX Item "out_w, out_h"
|
yading@10
|
13637 the output width and height, that is the size of the padded area as
|
yading@10
|
13638 specified by the \fIwidth\fR and \fIheight\fR expressions
|
yading@10
|
13639 .IP "\fBow, oh\fR" 4
|
yading@10
|
13640 .IX Item "ow, oh"
|
yading@10
|
13641 same as \fIout_w\fR and \fIout_h\fR
|
yading@10
|
13642 .IP "\fBx, y\fR" 4
|
yading@10
|
13643 .IX Item "x, y"
|
yading@10
|
13644 x and y offsets as specified by the \fIx\fR and \fIy\fR
|
yading@10
|
13645 expressions, or \s-1NAN\s0 if not yet specified
|
yading@10
|
13646 .IP "\fBa\fR" 4
|
yading@10
|
13647 .IX Item "a"
|
yading@10
|
13648 same as \fIiw\fR / \fIih\fR
|
yading@10
|
13649 .IP "\fBsar\fR" 4
|
yading@10
|
13650 .IX Item "sar"
|
yading@10
|
13651 input sample aspect ratio
|
yading@10
|
13652 .IP "\fBdar\fR" 4
|
yading@10
|
13653 .IX Item "dar"
|
yading@10
|
13654 input display aspect ratio, it is the same as (\fIiw\fR / \fIih\fR) * \fIsar\fR
|
yading@10
|
13655 .IP "\fBhsub, vsub\fR" 4
|
yading@10
|
13656 .IX Item "hsub, vsub"
|
yading@10
|
13657 horizontal and vertical chroma subsample values. For example for the
|
yading@10
|
13658 pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1.
|
yading@10
|
13659 .PP
|
yading@10
|
13660 \fIExamples\fR
|
yading@10
|
13661 .IX Subsection "Examples"
|
yading@10
|
13662 .IP "\(bu" 4
|
yading@10
|
13663 Add paddings with color \*(L"violet\*(R" to the input video. Output video
|
yading@10
|
13664 size is 640x480, the top-left corner of the input video is placed at
|
yading@10
|
13665 column 0, row 40:
|
yading@10
|
13666 .Sp
|
yading@10
|
13667 .Vb 1
|
yading@10
|
13668 \& pad=640:480:0:40:violet
|
yading@10
|
13669 .Ve
|
yading@10
|
13670 .Sp
|
yading@10
|
13671 The example above is equivalent to the following command:
|
yading@10
|
13672 .Sp
|
yading@10
|
13673 .Vb 1
|
yading@10
|
13674 \& pad=width=640:height=480:x=0:y=40:color=violet
|
yading@10
|
13675 .Ve
|
yading@10
|
13676 .IP "\(bu" 4
|
yading@10
|
13677 Pad the input to get an output with dimensions increased by 3/2,
|
yading@10
|
13678 and put the input video at the center of the padded area:
|
yading@10
|
13679 .Sp
|
yading@10
|
13680 .Vb 1
|
yading@10
|
13681 \& pad="3/2*iw:3/2*ih:(ow\-iw)/2:(oh\-ih)/2"
|
yading@10
|
13682 .Ve
|
yading@10
|
13683 .IP "\(bu" 4
|
yading@10
|
13684 Pad the input to get a squared output with size equal to the maximum
|
yading@10
|
13685 value between the input width and height, and put the input video at
|
yading@10
|
13686 the center of the padded area:
|
yading@10
|
13687 .Sp
|
yading@10
|
13688 .Vb 1
|
yading@10
|
13689 \& pad="max(iw\e,ih):ow:(ow\-iw)/2:(oh\-ih)/2"
|
yading@10
|
13690 .Ve
|
yading@10
|
13691 .IP "\(bu" 4
|
yading@10
|
13692 Pad the input to get a final w/h ratio of 16:9:
|
yading@10
|
13693 .Sp
|
yading@10
|
13694 .Vb 1
|
yading@10
|
13695 \& pad="ih*16/9:ih:(ow\-iw)/2:(oh\-ih)/2"
|
yading@10
|
13696 .Ve
|
yading@10
|
13697 .IP "\(bu" 4
|
yading@10
|
13698 In case of anamorphic video, in order to set the output display aspect
|
yading@10
|
13699 correctly, it is necessary to use \fIsar\fR in the expression,
|
yading@10
|
13700 according to the relation:
|
yading@10
|
13701 .Sp
|
yading@10
|
13702 .Vb 2
|
yading@10
|
13703 \& (ih * X / ih) * sar = output_dar
|
yading@10
|
13704 \& X = output_dar / sar
|
yading@10
|
13705 .Ve
|
yading@10
|
13706 .Sp
|
yading@10
|
13707 Thus the previous example needs to be modified to:
|
yading@10
|
13708 .Sp
|
yading@10
|
13709 .Vb 1
|
yading@10
|
13710 \& pad="ih*16/9/sar:ih:(ow\-iw)/2:(oh\-ih)/2"
|
yading@10
|
13711 .Ve
|
yading@10
|
13712 .IP "\(bu" 4
|
yading@10
|
13713 Double output size and put the input video in the bottom-right
|
yading@10
|
13714 corner of the output padded area:
|
yading@10
|
13715 .Sp
|
yading@10
|
13716 .Vb 1
|
yading@10
|
13717 \& pad="2*iw:2*ih:ow\-iw:oh\-ih"
|
yading@10
|
13718 .Ve
|
yading@10
|
13719 .SS "pixdesctest"
|
yading@10
|
13720 .IX Subsection "pixdesctest"
|
yading@10
|
13721 Pixel format descriptor test filter, mainly useful for internal
|
yading@10
|
13722 testing. The output video should be equal to the input video.
|
yading@10
|
13723 .PP
|
yading@10
|
13724 For example:
|
yading@10
|
13725 .PP
|
yading@10
|
13726 .Vb 1
|
yading@10
|
13727 \& format=monow, pixdesctest
|
yading@10
|
13728 .Ve
|
yading@10
|
13729 .PP
|
yading@10
|
13730 can be used to test the monowhite pixel format descriptor definition.
|
yading@10
|
13731 .SS "pp"
|
yading@10
|
13732 .IX Subsection "pp"
|
yading@10
|
13733 Enable the specified chain of postprocessing subfilters using libpostproc. This
|
yading@10
|
13734 library should be automatically selected with a \s-1GPL\s0 build (\f(CW\*(C`\-\-enable\-gpl\*(C'\fR).
|
yading@10
|
13735 Subfilters must be separated by '/' and can be disabled by prepending a '\-'.
|
yading@10
|
13736 Each subfilter and some options have a short and a long name that can be used
|
yading@10
|
13737 interchangeably, i.e. dr/dering are the same.
|
yading@10
|
13738 .PP
|
yading@10
|
13739 The filters accept the following options:
|
yading@10
|
13740 .IP "\fBsubfilters\fR" 4
|
yading@10
|
13741 .IX Item "subfilters"
|
yading@10
|
13742 Set postprocessing subfilters string.
|
yading@10
|
13743 .PP
|
yading@10
|
13744 All subfilters share common options to determine their scope:
|
yading@10
|
13745 .IP "\fBa/autoq\fR" 4
|
yading@10
|
13746 .IX Item "a/autoq"
|
yading@10
|
13747 Honor the quality commands for this subfilter.
|
yading@10
|
13748 .IP "\fBc/chrom\fR" 4
|
yading@10
|
13749 .IX Item "c/chrom"
|
yading@10
|
13750 Do chrominance filtering, too (default).
|
yading@10
|
13751 .IP "\fBy/nochrom\fR" 4
|
yading@10
|
13752 .IX Item "y/nochrom"
|
yading@10
|
13753 Do luminance filtering only (no chrominance).
|
yading@10
|
13754 .IP "\fBn/noluma\fR" 4
|
yading@10
|
13755 .IX Item "n/noluma"
|
yading@10
|
13756 Do chrominance filtering only (no luminance).
|
yading@10
|
13757 .PP
|
yading@10
|
13758 These options can be appended after the subfilter name, separated by a '|'.
|
yading@10
|
13759 .PP
|
yading@10
|
13760 Available subfilters are:
|
yading@10
|
13761 .IP "\fBhb/hdeblock[|difference[|flatness]]\fR" 4
|
yading@10
|
13762 .IX Item "hb/hdeblock[|difference[|flatness]]"
|
yading@10
|
13763 Horizontal deblocking filter
|
yading@10
|
13764 .RS 4
|
yading@10
|
13765 .IP "\fBdifference\fR" 4
|
yading@10
|
13766 .IX Item "difference"
|
yading@10
|
13767 Difference factor where higher values mean more deblocking (default: \f(CW32\fR).
|
yading@10
|
13768 .IP "\fBflatness\fR" 4
|
yading@10
|
13769 .IX Item "flatness"
|
yading@10
|
13770 Flatness threshold where lower values mean more deblocking (default: \f(CW39\fR).
|
yading@10
|
13771 .RE
|
yading@10
|
13772 .RS 4
|
yading@10
|
13773 .RE
|
yading@10
|
13774 .IP "\fBvb/vdeblock[|difference[|flatness]]\fR" 4
|
yading@10
|
13775 .IX Item "vb/vdeblock[|difference[|flatness]]"
|
yading@10
|
13776 Vertical deblocking filter
|
yading@10
|
13777 .RS 4
|
yading@10
|
13778 .IP "\fBdifference\fR" 4
|
yading@10
|
13779 .IX Item "difference"
|
yading@10
|
13780 Difference factor where higher values mean more deblocking (default: \f(CW32\fR).
|
yading@10
|
13781 .IP "\fBflatness\fR" 4
|
yading@10
|
13782 .IX Item "flatness"
|
yading@10
|
13783 Flatness threshold where lower values mean more deblocking (default: \f(CW39\fR).
|
yading@10
|
13784 .RE
|
yading@10
|
13785 .RS 4
|
yading@10
|
13786 .RE
|
yading@10
|
13787 .IP "\fBha/hadeblock[|difference[|flatness]]\fR" 4
|
yading@10
|
13788 .IX Item "ha/hadeblock[|difference[|flatness]]"
|
yading@10
|
13789 Accurate horizontal deblocking filter
|
yading@10
|
13790 .RS 4
|
yading@10
|
13791 .IP "\fBdifference\fR" 4
|
yading@10
|
13792 .IX Item "difference"
|
yading@10
|
13793 Difference factor where higher values mean more deblocking (default: \f(CW32\fR).
|
yading@10
|
13794 .IP "\fBflatness\fR" 4
|
yading@10
|
13795 .IX Item "flatness"
|
yading@10
|
13796 Flatness threshold where lower values mean more deblocking (default: \f(CW39\fR).
|
yading@10
|
13797 .RE
|
yading@10
|
13798 .RS 4
|
yading@10
|
13799 .RE
|
yading@10
|
13800 .IP "\fBva/vadeblock[|difference[|flatness]]\fR" 4
|
yading@10
|
13801 .IX Item "va/vadeblock[|difference[|flatness]]"
|
yading@10
|
13802 Accurate vertical deblocking filter
|
yading@10
|
13803 .RS 4
|
yading@10
|
13804 .IP "\fBdifference\fR" 4
|
yading@10
|
13805 .IX Item "difference"
|
yading@10
|
13806 Difference factor where higher values mean more deblocking (default: \f(CW32\fR).
|
yading@10
|
13807 .IP "\fBflatness\fR" 4
|
yading@10
|
13808 .IX Item "flatness"
|
yading@10
|
13809 Flatness threshold where lower values mean more deblocking (default: \f(CW39\fR).
|
yading@10
|
13810 .RE
|
yading@10
|
13811 .RS 4
|
yading@10
|
13812 .RE
|
yading@10
|
13813 .PP
|
yading@10
|
13814 The horizontal and vertical deblocking filters share the difference and
|
yading@10
|
13815 flatness values so you cannot set different horizontal and vertical
|
yading@10
|
13816 thresholds.
|
yading@10
|
13817 .IP "\fBh1/x1hdeblock\fR" 4
|
yading@10
|
13818 .IX Item "h1/x1hdeblock"
|
yading@10
|
13819 Experimental horizontal deblocking filter
|
yading@10
|
13820 .IP "\fBv1/x1vdeblock\fR" 4
|
yading@10
|
13821 .IX Item "v1/x1vdeblock"
|
yading@10
|
13822 Experimental vertical deblocking filter
|
yading@10
|
13823 .IP "\fBdr/dering\fR" 4
|
yading@10
|
13824 .IX Item "dr/dering"
|
yading@10
|
13825 Deringing filter
|
yading@10
|
13826 .IP "\fBtn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise reducer\fR" 4
|
yading@10
|
13827 .IX Item "tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise reducer"
|
yading@10
|
13828 .RS 4
|
yading@10
|
13829 .PD 0
|
yading@10
|
13830 .IP "\fBthreshold1\fR" 4
|
yading@10
|
13831 .IX Item "threshold1"
|
yading@10
|
13832 .PD
|
yading@10
|
13833 larger \-> stronger filtering
|
yading@10
|
13834 .IP "\fBthreshold2\fR" 4
|
yading@10
|
13835 .IX Item "threshold2"
|
yading@10
|
13836 larger \-> stronger filtering
|
yading@10
|
13837 .IP "\fBthreshold3\fR" 4
|
yading@10
|
13838 .IX Item "threshold3"
|
yading@10
|
13839 larger \-> stronger filtering
|
yading@10
|
13840 .RE
|
yading@10
|
13841 .RS 4
|
yading@10
|
13842 .RE
|
yading@10
|
13843 .IP "\fBal/autolevels[:f/fullyrange], automatic brightness / contrast correction\fR" 4
|
yading@10
|
13844 .IX Item "al/autolevels[:f/fullyrange], automatic brightness / contrast correction"
|
yading@10
|
13845 .RS 4
|
yading@10
|
13846 .PD 0
|
yading@10
|
13847 .IP "\fBf/fullyrange\fR" 4
|
yading@10
|
13848 .IX Item "f/fullyrange"
|
yading@10
|
13849 .PD
|
yading@10
|
13850 Stretch luminance to \f(CW\*(C`0\-255\*(C'\fR.
|
yading@10
|
13851 .RE
|
yading@10
|
13852 .RS 4
|
yading@10
|
13853 .RE
|
yading@10
|
13854 .IP "\fBlb/linblenddeint\fR" 4
|
yading@10
|
13855 .IX Item "lb/linblenddeint"
|
yading@10
|
13856 Linear blend deinterlacing filter that deinterlaces the given block by
|
yading@10
|
13857 filtering all lines with a \f(CW\*(C`(1 2 1)\*(C'\fR filter.
|
yading@10
|
13858 .IP "\fBli/linipoldeint\fR" 4
|
yading@10
|
13859 .IX Item "li/linipoldeint"
|
yading@10
|
13860 Linear interpolating deinterlacing filter that deinterlaces the given block by
|
yading@10
|
13861 linearly interpolating every second line.
|
yading@10
|
13862 .IP "\fBci/cubicipoldeint\fR" 4
|
yading@10
|
13863 .IX Item "ci/cubicipoldeint"
|
yading@10
|
13864 Cubic interpolating deinterlacing filter deinterlaces the given block by
|
yading@10
|
13865 cubically interpolating every second line.
|
yading@10
|
13866 .IP "\fBmd/mediandeint\fR" 4
|
yading@10
|
13867 .IX Item "md/mediandeint"
|
yading@10
|
13868 Median deinterlacing filter that deinterlaces the given block by applying a
|
yading@10
|
13869 median filter to every second line.
|
yading@10
|
13870 .IP "\fBfd/ffmpegdeint\fR" 4
|
yading@10
|
13871 .IX Item "fd/ffmpegdeint"
|
yading@10
|
13872 FFmpeg deinterlacing filter that deinterlaces the given block by filtering every
|
yading@10
|
13873 second line with a \f(CW\*(C`(\-1 4 2 4 \-1)\*(C'\fR filter.
|
yading@10
|
13874 .IP "\fBl5/lowpass5\fR" 4
|
yading@10
|
13875 .IX Item "l5/lowpass5"
|
yading@10
|
13876 Vertically applied \s-1FIR\s0 lowpass deinterlacing filter that deinterlaces the given
|
yading@10
|
13877 block by filtering all lines with a \f(CW\*(C`(\-1 2 6 2 \-1)\*(C'\fR filter.
|
yading@10
|
13878 .IP "\fBfq/forceQuant[|quantizer]\fR" 4
|
yading@10
|
13879 .IX Item "fq/forceQuant[|quantizer]"
|
yading@10
|
13880 Overrides the quantizer table from the input with the constant quantizer you
|
yading@10
|
13881 specify.
|
yading@10
|
13882 .RS 4
|
yading@10
|
13883 .IP "\fBquantizer\fR" 4
|
yading@10
|
13884 .IX Item "quantizer"
|
yading@10
|
13885 Quantizer to use
|
yading@10
|
13886 .RE
|
yading@10
|
13887 .RS 4
|
yading@10
|
13888 .RE
|
yading@10
|
13889 .IP "\fBde/default\fR" 4
|
yading@10
|
13890 .IX Item "de/default"
|
yading@10
|
13891 Default pp filter combination (\f(CW\*(C`hb|a,vb|a,dr|a\*(C'\fR)
|
yading@10
|
13892 .IP "\fBfa/fast\fR" 4
|
yading@10
|
13893 .IX Item "fa/fast"
|
yading@10
|
13894 Fast pp filter combination (\f(CW\*(C`h1|a,v1|a,dr|a\*(C'\fR)
|
yading@10
|
13895 .IP "\fBac\fR" 4
|
yading@10
|
13896 .IX Item "ac"
|
yading@10
|
13897 High quality pp filter combination (\f(CW\*(C`ha|a|128|7,va|a,dr|a\*(C'\fR)
|
yading@10
|
13898 .PP
|
yading@10
|
13899 \fIExamples\fR
|
yading@10
|
13900 .IX Subsection "Examples"
|
yading@10
|
13901 .IP "\(bu" 4
|
yading@10
|
13902 Apply horizontal and vertical deblocking, deringing and automatic
|
yading@10
|
13903 brightness/contrast:
|
yading@10
|
13904 .Sp
|
yading@10
|
13905 .Vb 1
|
yading@10
|
13906 \& pp=hb/vb/dr/al
|
yading@10
|
13907 .Ve
|
yading@10
|
13908 .IP "\(bu" 4
|
yading@10
|
13909 Apply default filters without brightness/contrast correction:
|
yading@10
|
13910 .Sp
|
yading@10
|
13911 .Vb 1
|
yading@10
|
13912 \& pp=de/\-al
|
yading@10
|
13913 .Ve
|
yading@10
|
13914 .IP "\(bu" 4
|
yading@10
|
13915 Apply default filters and temporal denoiser:
|
yading@10
|
13916 .Sp
|
yading@10
|
13917 .Vb 1
|
yading@10
|
13918 \& pp=default/tmpnoise|1|2|3
|
yading@10
|
13919 .Ve
|
yading@10
|
13920 .IP "\(bu" 4
|
yading@10
|
13921 Apply deblocking on luminance only, and switch vertical deblocking on or off
|
yading@10
|
13922 automatically depending on available \s-1CPU\s0 time:
|
yading@10
|
13923 .Sp
|
yading@10
|
13924 .Vb 1
|
yading@10
|
13925 \& pp=hb|y/vb|a
|
yading@10
|
13926 .Ve
|
yading@10
|
13927 .SS "removelogo"
|
yading@10
|
13928 .IX Subsection "removelogo"
|
yading@10
|
13929 Suppress a \s-1TV\s0 station logo, using an image file to determine which
|
yading@10
|
13930 pixels comprise the logo. It works by filling in the pixels that
|
yading@10
|
13931 comprise the logo with neighboring pixels.
|
yading@10
|
13932 .PP
|
yading@10
|
13933 The filters accept the following options:
|
yading@10
|
13934 .IP "\fBfilename, f\fR" 4
|
yading@10
|
13935 .IX Item "filename, f"
|
yading@10
|
13936 Set the filter bitmap file, which can be any image format supported by
|
yading@10
|
13937 libavformat. The width and height of the image file must match those of the
|
yading@10
|
13938 video stream being processed.
|
yading@10
|
13939 .PP
|
yading@10
|
13940 Pixels in the provided bitmap image with a value of zero are not
|
yading@10
|
13941 considered part of the logo, non-zero pixels are considered part of
|
yading@10
|
13942 the logo. If you use white (255) for the logo and black (0) for the
|
yading@10
|
13943 rest, you will be safe. For making the filter bitmap, it is
|
yading@10
|
13944 recommended to take a screen capture of a black frame with the logo
|
yading@10
|
13945 visible, and then using a threshold filter followed by the erode
|
yading@10
|
13946 filter once or twice.
|
yading@10
|
13947 .PP
|
yading@10
|
13948 If needed, little splotches can be fixed manually. Remember that if
|
yading@10
|
13949 logo pixels are not covered, the filter quality will be much
|
yading@10
|
13950 reduced. Marking too many pixels as part of the logo does not hurt as
|
yading@10
|
13951 much, but it will increase the amount of blurring needed to cover over
|
yading@10
|
13952 the image and will destroy more information than necessary, and extra
|
yading@10
|
13953 pixels will slow things down on a large logo.
|
yading@10
|
13954 .SS "scale"
|
yading@10
|
13955 .IX Subsection "scale"
|
yading@10
|
13956 Scale (resize) the input video, using the libswscale library.
|
yading@10
|
13957 .PP
|
yading@10
|
13958 The scale filter forces the output display aspect ratio to be the same
|
yading@10
|
13959 of the input, by changing the output sample aspect ratio.
|
yading@10
|
13960 .PP
|
yading@10
|
13961 The filter accepts the following options:
|
yading@10
|
13962 .IP "\fBwidth, w\fR" 4
|
yading@10
|
13963 .IX Item "width, w"
|
yading@10
|
13964 Output video width.
|
yading@10
|
13965 default value is \f(CW\*(C`iw\*(C'\fR. See below
|
yading@10
|
13966 for the list of accepted constants.
|
yading@10
|
13967 .IP "\fBheight, h\fR" 4
|
yading@10
|
13968 .IX Item "height, h"
|
yading@10
|
13969 Output video height.
|
yading@10
|
13970 default value is \f(CW\*(C`ih\*(C'\fR.
|
yading@10
|
13971 See below for the list of accepted constants.
|
yading@10
|
13972 .IP "\fBinterl\fR" 4
|
yading@10
|
13973 .IX Item "interl"
|
yading@10
|
13974 Set the interlacing. It accepts the following values:
|
yading@10
|
13975 .RS 4
|
yading@10
|
13976 .IP "\fB1\fR" 4
|
yading@10
|
13977 .IX Item "1"
|
yading@10
|
13978 force interlaced aware scaling
|
yading@10
|
13979 .IP "\fB0\fR" 4
|
yading@10
|
13980 .IX Item "0"
|
yading@10
|
13981 do not apply interlaced scaling
|
yading@10
|
13982 .IP "\fB\-1\fR" 4
|
yading@10
|
13983 .IX Item "-1"
|
yading@10
|
13984 select interlaced aware scaling depending on whether the source frames
|
yading@10
|
13985 are flagged as interlaced or not
|
yading@10
|
13986 .RE
|
yading@10
|
13987 .RS 4
|
yading@10
|
13988 .Sp
|
yading@10
|
13989 Default value is \f(CW0\fR.
|
yading@10
|
13990 .RE
|
yading@10
|
13991 .IP "\fBflags\fR" 4
|
yading@10
|
13992 .IX Item "flags"
|
yading@10
|
13993 Set libswscale scaling flags. If not explictly specified the filter
|
yading@10
|
13994 applies a bilinear scaling algorithm.
|
yading@10
|
13995 .IP "\fBsize, s\fR" 4
|
yading@10
|
13996 .IX Item "size, s"
|
yading@10
|
13997 Set the video size, the value must be a valid abbreviation or in the
|
yading@10
|
13998 form \fIwidth\fRx\fIheight\fR.
|
yading@10
|
13999 .PP
|
yading@10
|
14000 The values of the \fIw\fR and \fIh\fR options are expressions
|
yading@10
|
14001 containing the following constants:
|
yading@10
|
14002 .IP "\fBin_w, in_h\fR" 4
|
yading@10
|
14003 .IX Item "in_w, in_h"
|
yading@10
|
14004 the input width and height
|
yading@10
|
14005 .IP "\fBiw, ih\fR" 4
|
yading@10
|
14006 .IX Item "iw, ih"
|
yading@10
|
14007 same as \fIin_w\fR and \fIin_h\fR
|
yading@10
|
14008 .IP "\fBout_w, out_h\fR" 4
|
yading@10
|
14009 .IX Item "out_w, out_h"
|
yading@10
|
14010 the output (cropped) width and height
|
yading@10
|
14011 .IP "\fBow, oh\fR" 4
|
yading@10
|
14012 .IX Item "ow, oh"
|
yading@10
|
14013 same as \fIout_w\fR and \fIout_h\fR
|
yading@10
|
14014 .IP "\fBa\fR" 4
|
yading@10
|
14015 .IX Item "a"
|
yading@10
|
14016 same as \fIiw\fR / \fIih\fR
|
yading@10
|
14017 .IP "\fBsar\fR" 4
|
yading@10
|
14018 .IX Item "sar"
|
yading@10
|
14019 input sample aspect ratio
|
yading@10
|
14020 .IP "\fBdar\fR" 4
|
yading@10
|
14021 .IX Item "dar"
|
yading@10
|
14022 input display aspect ratio, it is the same as (\fIiw\fR / \fIih\fR) * \fIsar\fR
|
yading@10
|
14023 .IP "\fBhsub, vsub\fR" 4
|
yading@10
|
14024 .IX Item "hsub, vsub"
|
yading@10
|
14025 horizontal and vertical chroma subsample values. For example for the
|
yading@10
|
14026 pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1.
|
yading@10
|
14027 .PP
|
yading@10
|
14028 If the input image format is different from the format requested by
|
yading@10
|
14029 the next filter, the scale filter will convert the input to the
|
yading@10
|
14030 requested format.
|
yading@10
|
14031 .PP
|
yading@10
|
14032 If the value for \fIw\fR or \fIh\fR is 0, the respective input
|
yading@10
|
14033 size is used for the output.
|
yading@10
|
14034 .PP
|
yading@10
|
14035 If the value for \fIw\fR or \fIh\fR is \-1, the scale filter will use, for the
|
yading@10
|
14036 respective output size, a value that maintains the aspect ratio of the input
|
yading@10
|
14037 image.
|
yading@10
|
14038 .PP
|
yading@10
|
14039 \fIExamples\fR
|
yading@10
|
14040 .IX Subsection "Examples"
|
yading@10
|
14041 .IP "\(bu" 4
|
yading@10
|
14042 Scale the input video to a size of 200x100:
|
yading@10
|
14043 .Sp
|
yading@10
|
14044 .Vb 1
|
yading@10
|
14045 \& scale=w=200:h=100
|
yading@10
|
14046 .Ve
|
yading@10
|
14047 .Sp
|
yading@10
|
14048 This is equivalent to:
|
yading@10
|
14049 .Sp
|
yading@10
|
14050 .Vb 1
|
yading@10
|
14051 \& scale=w=200:h=100
|
yading@10
|
14052 .Ve
|
yading@10
|
14053 .Sp
|
yading@10
|
14054 or:
|
yading@10
|
14055 .Sp
|
yading@10
|
14056 .Vb 1
|
yading@10
|
14057 \& scale=200x100
|
yading@10
|
14058 .Ve
|
yading@10
|
14059 .IP "\(bu" 4
|
yading@10
|
14060 Specify a size abbreviation for the output size:
|
yading@10
|
14061 .Sp
|
yading@10
|
14062 .Vb 1
|
yading@10
|
14063 \& scale=qcif
|
yading@10
|
14064 .Ve
|
yading@10
|
14065 .Sp
|
yading@10
|
14066 which can also be written as:
|
yading@10
|
14067 .Sp
|
yading@10
|
14068 .Vb 1
|
yading@10
|
14069 \& scale=size=qcif
|
yading@10
|
14070 .Ve
|
yading@10
|
14071 .IP "\(bu" 4
|
yading@10
|
14072 Scale the input to 2x:
|
yading@10
|
14073 .Sp
|
yading@10
|
14074 .Vb 1
|
yading@10
|
14075 \& scale=w=2*iw:h=2*ih
|
yading@10
|
14076 .Ve
|
yading@10
|
14077 .IP "\(bu" 4
|
yading@10
|
14078 The above is the same as:
|
yading@10
|
14079 .Sp
|
yading@10
|
14080 .Vb 1
|
yading@10
|
14081 \& scale=2*in_w:2*in_h
|
yading@10
|
14082 .Ve
|
yading@10
|
14083 .IP "\(bu" 4
|
yading@10
|
14084 Scale the input to 2x with forced interlaced scaling:
|
yading@10
|
14085 .Sp
|
yading@10
|
14086 .Vb 1
|
yading@10
|
14087 \& scale=2*iw:2*ih:interl=1
|
yading@10
|
14088 .Ve
|
yading@10
|
14089 .IP "\(bu" 4
|
yading@10
|
14090 Scale the input to half size:
|
yading@10
|
14091 .Sp
|
yading@10
|
14092 .Vb 1
|
yading@10
|
14093 \& scale=w=iw/2:h=ih/2
|
yading@10
|
14094 .Ve
|
yading@10
|
14095 .IP "\(bu" 4
|
yading@10
|
14096 Increase the width, and set the height to the same size:
|
yading@10
|
14097 .Sp
|
yading@10
|
14098 .Vb 1
|
yading@10
|
14099 \& scale=3/2*iw:ow
|
yading@10
|
14100 .Ve
|
yading@10
|
14101 .IP "\(bu" 4
|
yading@10
|
14102 Seek for Greek harmony:
|
yading@10
|
14103 .Sp
|
yading@10
|
14104 .Vb 2
|
yading@10
|
14105 \& scale=iw:1/PHI*iw
|
yading@10
|
14106 \& scale=ih*PHI:ih
|
yading@10
|
14107 .Ve
|
yading@10
|
14108 .IP "\(bu" 4
|
yading@10
|
14109 Increase the height, and set the width to 3/2 of the height:
|
yading@10
|
14110 .Sp
|
yading@10
|
14111 .Vb 1
|
yading@10
|
14112 \& scale=w=3/2*oh:h=3/5*ih
|
yading@10
|
14113 .Ve
|
yading@10
|
14114 .IP "\(bu" 4
|
yading@10
|
14115 Increase the size, but make the size a multiple of the chroma
|
yading@10
|
14116 subsample values:
|
yading@10
|
14117 .Sp
|
yading@10
|
14118 .Vb 1
|
yading@10
|
14119 \& scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
|
yading@10
|
14120 .Ve
|
yading@10
|
14121 .IP "\(bu" 4
|
yading@10
|
14122 Increase the width to a maximum of 500 pixels, keep the same input
|
yading@10
|
14123 aspect ratio:
|
yading@10
|
14124 .Sp
|
yading@10
|
14125 .Vb 1
|
yading@10
|
14126 \& scale=w=\*(Aqmin(500\e, iw*3/2):h=\-1\*(Aq
|
yading@10
|
14127 .Ve
|
yading@10
|
14128 .SS "separatefields"
|
yading@10
|
14129 .IX Subsection "separatefields"
|
yading@10
|
14130 The \f(CW\*(C`separatefields\*(C'\fR takes a frame-based video input and splits
|
yading@10
|
14131 each frame into its components fields, producing a new half height clip
|
yading@10
|
14132 with twice the frame rate and twice the frame count.
|
yading@10
|
14133 .PP
|
yading@10
|
14134 This filter use field-dominance information in frame to decide which
|
yading@10
|
14135 of each pair of fields to place first in the output.
|
yading@10
|
14136 If it gets it wrong use setfield filter before \f(CW\*(C`separatefields\*(C'\fR filter.
|
yading@10
|
14137 .SS "setdar, setsar"
|
yading@10
|
14138 .IX Subsection "setdar, setsar"
|
yading@10
|
14139 The \f(CW\*(C`setdar\*(C'\fR filter sets the Display Aspect Ratio for the filter
|
yading@10
|
14140 output video.
|
yading@10
|
14141 .PP
|
yading@10
|
14142 This is done by changing the specified Sample (aka Pixel) Aspect
|
yading@10
|
14143 Ratio, according to the following equation:
|
yading@10
|
14144 .PP
|
yading@10
|
14145 .Vb 1
|
yading@10
|
14146 \& <DAR> = <HORIZONTAL_RESOLUTION> / <VERTICAL_RESOLUTION> * <SAR>
|
yading@10
|
14147 .Ve
|
yading@10
|
14148 .PP
|
yading@10
|
14149 Keep in mind that the \f(CW\*(C`setdar\*(C'\fR filter does not modify the pixel
|
yading@10
|
14150 dimensions of the video frame. Also the display aspect ratio set by
|
yading@10
|
14151 this filter may be changed by later filters in the filterchain,
|
yading@10
|
14152 e.g. in case of scaling or if another \*(L"setdar\*(R" or a \*(L"setsar\*(R" filter is
|
yading@10
|
14153 applied.
|
yading@10
|
14154 .PP
|
yading@10
|
14155 The \f(CW\*(C`setsar\*(C'\fR filter sets the Sample (aka Pixel) Aspect Ratio for
|
yading@10
|
14156 the filter output video.
|
yading@10
|
14157 .PP
|
yading@10
|
14158 Note that as a consequence of the application of this filter, the
|
yading@10
|
14159 output display aspect ratio will change according to the equation
|
yading@10
|
14160 above.
|
yading@10
|
14161 .PP
|
yading@10
|
14162 Keep in mind that the sample aspect ratio set by the \f(CW\*(C`setsar\*(C'\fR
|
yading@10
|
14163 filter may be changed by later filters in the filterchain, e.g. if
|
yading@10
|
14164 another \*(L"setsar\*(R" or a \*(L"setdar\*(R" filter is applied.
|
yading@10
|
14165 .PP
|
yading@10
|
14166 The filters accept the following options:
|
yading@10
|
14167 .ie n .IP "\fBr, ratio, dar (\fB""setdar""\fB only), sar (\f(BI""setsar""\fB only)\fR" 4
|
yading@10
|
14168 .el .IP "\fBr, ratio, dar (\f(CBsetdar\fB only), sar (\f(CBsetsar\fB only)\fR" 4
|
yading@10
|
14169 .IX Item "r, ratio, dar (setdar only), sar (setsar only)"
|
yading@10
|
14170 Set the aspect ratio used by the filter.
|
yading@10
|
14171 .Sp
|
yading@10
|
14172 The parameter can be a floating point number string, an expression, or
|
yading@10
|
14173 a string of the form \fInum\fR:\fIden\fR, where \fInum\fR and
|
yading@10
|
14174 \&\fIden\fR are the numerator and denominator of the aspect ratio. If
|
yading@10
|
14175 the parameter is not specified, it is assumed the value \*(L"0\*(R".
|
yading@10
|
14176 In case the form "\fInum\fR:\fIden\fR" is used, the \f(CW\*(C`:\*(C'\fR character
|
yading@10
|
14177 should be escaped.
|
yading@10
|
14178 .IP "\fBmax\fR" 4
|
yading@10
|
14179 .IX Item "max"
|
yading@10
|
14180 Set the maximum integer value to use for expressing numerator and
|
yading@10
|
14181 denominator when reducing the expressed aspect ratio to a rational.
|
yading@10
|
14182 Default value is \f(CW100\fR.
|
yading@10
|
14183 .PP
|
yading@10
|
14184 \fIExamples\fR
|
yading@10
|
14185 .IX Subsection "Examples"
|
yading@10
|
14186 .IP "\(bu" 4
|
yading@10
|
14187 To change the display aspect ratio to 16:9, specify one of the following:
|
yading@10
|
14188 .Sp
|
yading@10
|
14189 .Vb 3
|
yading@10
|
14190 \& setdar=dar=1.77777
|
yading@10
|
14191 \& setdar=dar=16/9
|
yading@10
|
14192 \& setdar=dar=1.77777
|
yading@10
|
14193 .Ve
|
yading@10
|
14194 .IP "\(bu" 4
|
yading@10
|
14195 To change the sample aspect ratio to 10:11, specify:
|
yading@10
|
14196 .Sp
|
yading@10
|
14197 .Vb 1
|
yading@10
|
14198 \& setsar=sar=10/11
|
yading@10
|
14199 .Ve
|
yading@10
|
14200 .IP "\(bu" 4
|
yading@10
|
14201 To set a display aspect ratio of 16:9, and specify a maximum integer value of
|
yading@10
|
14202 1000 in the aspect ratio reduction, use the command:
|
yading@10
|
14203 .Sp
|
yading@10
|
14204 .Vb 1
|
yading@10
|
14205 \& setdar=ratio=16/9:max=1000
|
yading@10
|
14206 .Ve
|
yading@10
|
14207 .SS "setfield"
|
yading@10
|
14208 .IX Subsection "setfield"
|
yading@10
|
14209 Force field for the output video frame.
|
yading@10
|
14210 .PP
|
yading@10
|
14211 The \f(CW\*(C`setfield\*(C'\fR filter marks the interlace type field for the
|
yading@10
|
14212 output frames. It does not change the input frame, but only sets the
|
yading@10
|
14213 corresponding property, which affects how the frame is treated by
|
yading@10
|
14214 following filters (e.g. \f(CW\*(C`fieldorder\*(C'\fR or \f(CW\*(C`yadif\*(C'\fR).
|
yading@10
|
14215 .PP
|
yading@10
|
14216 The filter accepts the following options:
|
yading@10
|
14217 .IP "\fBmode\fR" 4
|
yading@10
|
14218 .IX Item "mode"
|
yading@10
|
14219 Available values are:
|
yading@10
|
14220 .RS 4
|
yading@10
|
14221 .IP "\fBauto\fR" 4
|
yading@10
|
14222 .IX Item "auto"
|
yading@10
|
14223 Keep the same field property.
|
yading@10
|
14224 .IP "\fBbff\fR" 4
|
yading@10
|
14225 .IX Item "bff"
|
yading@10
|
14226 Mark the frame as bottom-field-first.
|
yading@10
|
14227 .IP "\fBtff\fR" 4
|
yading@10
|
14228 .IX Item "tff"
|
yading@10
|
14229 Mark the frame as top-field-first.
|
yading@10
|
14230 .IP "\fBprog\fR" 4
|
yading@10
|
14231 .IX Item "prog"
|
yading@10
|
14232 Mark the frame as progressive.
|
yading@10
|
14233 .RE
|
yading@10
|
14234 .RS 4
|
yading@10
|
14235 .RE
|
yading@10
|
14236 .SS "showinfo"
|
yading@10
|
14237 .IX Subsection "showinfo"
|
yading@10
|
14238 Show a line containing various information for each input video frame.
|
yading@10
|
14239 The input video is not modified.
|
yading@10
|
14240 .PP
|
yading@10
|
14241 The shown line contains a sequence of key/value pairs of the form
|
yading@10
|
14242 \&\fIkey\fR:\fIvalue\fR.
|
yading@10
|
14243 .PP
|
yading@10
|
14244 A description of each shown parameter follows:
|
yading@10
|
14245 .IP "\fBn\fR" 4
|
yading@10
|
14246 .IX Item "n"
|
yading@10
|
14247 sequential number of the input frame, starting from 0
|
yading@10
|
14248 .IP "\fBpts\fR" 4
|
yading@10
|
14249 .IX Item "pts"
|
yading@10
|
14250 Presentation TimeStamp of the input frame, expressed as a number of
|
yading@10
|
14251 time base units. The time base unit depends on the filter input pad.
|
yading@10
|
14252 .IP "\fBpts_time\fR" 4
|
yading@10
|
14253 .IX Item "pts_time"
|
yading@10
|
14254 Presentation TimeStamp of the input frame, expressed as a number of
|
yading@10
|
14255 seconds
|
yading@10
|
14256 .IP "\fBpos\fR" 4
|
yading@10
|
14257 .IX Item "pos"
|
yading@10
|
14258 position of the frame in the input stream, \-1 if this information in
|
yading@10
|
14259 unavailable and/or meaningless (for example in case of synthetic video)
|
yading@10
|
14260 .IP "\fBfmt\fR" 4
|
yading@10
|
14261 .IX Item "fmt"
|
yading@10
|
14262 pixel format name
|
yading@10
|
14263 .IP "\fBsar\fR" 4
|
yading@10
|
14264 .IX Item "sar"
|
yading@10
|
14265 sample aspect ratio of the input frame, expressed in the form
|
yading@10
|
14266 \&\fInum\fR/\fIden\fR
|
yading@10
|
14267 .IP "\fBs\fR" 4
|
yading@10
|
14268 .IX Item "s"
|
yading@10
|
14269 size of the input frame, expressed in the form
|
yading@10
|
14270 \&\fIwidth\fRx\fIheight\fR
|
yading@10
|
14271 .IP "\fBi\fR" 4
|
yading@10
|
14272 .IX Item "i"
|
yading@10
|
14273 interlaced mode (\*(L"P\*(R" for \*(L"progressive\*(R", \*(L"T\*(R" for top field first, \*(L"B\*(R"
|
yading@10
|
14274 for bottom field first)
|
yading@10
|
14275 .IP "\fBiskey\fR" 4
|
yading@10
|
14276 .IX Item "iskey"
|
yading@10
|
14277 1 if the frame is a key frame, 0 otherwise
|
yading@10
|
14278 .IP "\fBtype\fR" 4
|
yading@10
|
14279 .IX Item "type"
|
yading@10
|
14280 picture type of the input frame (\*(L"I\*(R" for an I\-frame, \*(L"P\*(R" for a
|
yading@10
|
14281 P\-frame, \*(L"B\*(R" for a B\-frame, \*(L"?\*(R" for unknown type).
|
yading@10
|
14282 Check also the documentation of the \f(CW\*(C`AVPictureType\*(C'\fR enum and of
|
yading@10
|
14283 the \f(CW\*(C`av_get_picture_type_char\*(C'\fR function defined in
|
yading@10
|
14284 \&\fIlibavutil/avutil.h\fR.
|
yading@10
|
14285 .IP "\fBchecksum\fR" 4
|
yading@10
|
14286 .IX Item "checksum"
|
yading@10
|
14287 Adler\-32 checksum (printed in hexadecimal) of all the planes of the input frame
|
yading@10
|
14288 .IP "\fBplane_checksum\fR" 4
|
yading@10
|
14289 .IX Item "plane_checksum"
|
yading@10
|
14290 Adler\-32 checksum (printed in hexadecimal) of each plane of the input frame,
|
yading@10
|
14291 expressed in the form "[\fIc0\fR \fIc1\fR \fIc2\fR \fIc3\fR]"
|
yading@10
|
14292 .SS "smartblur"
|
yading@10
|
14293 .IX Subsection "smartblur"
|
yading@10
|
14294 Blur the input video without impacting the outlines.
|
yading@10
|
14295 .PP
|
yading@10
|
14296 The filter accepts the following options:
|
yading@10
|
14297 .IP "\fBluma_radius, lr\fR" 4
|
yading@10
|
14298 .IX Item "luma_radius, lr"
|
yading@10
|
14299 Set the luma radius. The option value must be a float number in
|
yading@10
|
14300 the range [0.1,5.0] that specifies the variance of the gaussian filter
|
yading@10
|
14301 used to blur the image (slower if larger). Default value is 1.0.
|
yading@10
|
14302 .IP "\fBluma_strength, ls\fR" 4
|
yading@10
|
14303 .IX Item "luma_strength, ls"
|
yading@10
|
14304 Set the luma strength. The option value must be a float number
|
yading@10
|
14305 in the range [\-1.0,1.0] that configures the blurring. A value included
|
yading@10
|
14306 in [0.0,1.0] will blur the image whereas a value included in
|
yading@10
|
14307 [\-1.0,0.0] will sharpen the image. Default value is 1.0.
|
yading@10
|
14308 .IP "\fBluma_threshold, lt\fR" 4
|
yading@10
|
14309 .IX Item "luma_threshold, lt"
|
yading@10
|
14310 Set the luma threshold used as a coefficient to determine
|
yading@10
|
14311 whether a pixel should be blurred or not. The option value must be an
|
yading@10
|
14312 integer in the range [\-30,30]. A value of 0 will filter all the image,
|
yading@10
|
14313 a value included in [0,30] will filter flat areas and a value included
|
yading@10
|
14314 in [\-30,0] will filter edges. Default value is 0.
|
yading@10
|
14315 .IP "\fBchroma_radius, cr\fR" 4
|
yading@10
|
14316 .IX Item "chroma_radius, cr"
|
yading@10
|
14317 Set the chroma radius. The option value must be a float number in
|
yading@10
|
14318 the range [0.1,5.0] that specifies the variance of the gaussian filter
|
yading@10
|
14319 used to blur the image (slower if larger). Default value is 1.0.
|
yading@10
|
14320 .IP "\fBchroma_strength, cs\fR" 4
|
yading@10
|
14321 .IX Item "chroma_strength, cs"
|
yading@10
|
14322 Set the chroma strength. The option value must be a float number
|
yading@10
|
14323 in the range [\-1.0,1.0] that configures the blurring. A value included
|
yading@10
|
14324 in [0.0,1.0] will blur the image whereas a value included in
|
yading@10
|
14325 [\-1.0,0.0] will sharpen the image. Default value is 1.0.
|
yading@10
|
14326 .IP "\fBchroma_threshold, ct\fR" 4
|
yading@10
|
14327 .IX Item "chroma_threshold, ct"
|
yading@10
|
14328 Set the chroma threshold used as a coefficient to determine
|
yading@10
|
14329 whether a pixel should be blurred or not. The option value must be an
|
yading@10
|
14330 integer in the range [\-30,30]. A value of 0 will filter all the image,
|
yading@10
|
14331 a value included in [0,30] will filter flat areas and a value included
|
yading@10
|
14332 in [\-30,0] will filter edges. Default value is 0.
|
yading@10
|
14333 .PP
|
yading@10
|
14334 If a chroma option is not explicitly set, the corresponding luma value
|
yading@10
|
14335 is set.
|
yading@10
|
14336 .SS "stereo3d"
|
yading@10
|
14337 .IX Subsection "stereo3d"
|
yading@10
|
14338 Convert between different stereoscopic image formats.
|
yading@10
|
14339 .PP
|
yading@10
|
14340 The filters accept the following options:
|
yading@10
|
14341 .IP "\fBin\fR" 4
|
yading@10
|
14342 .IX Item "in"
|
yading@10
|
14343 Set stereoscopic image format of input.
|
yading@10
|
14344 .Sp
|
yading@10
|
14345 Available values for input image formats are:
|
yading@10
|
14346 .RS 4
|
yading@10
|
14347 .IP "\fBsbsl\fR" 4
|
yading@10
|
14348 .IX Item "sbsl"
|
yading@10
|
14349 side by side parallel (left eye left, right eye right)
|
yading@10
|
14350 .IP "\fBsbsr\fR" 4
|
yading@10
|
14351 .IX Item "sbsr"
|
yading@10
|
14352 side by side crosseye (right eye left, left eye right)
|
yading@10
|
14353 .IP "\fBsbs2l\fR" 4
|
yading@10
|
14354 .IX Item "sbs2l"
|
yading@10
|
14355 side by side parallel with half width resolution
|
yading@10
|
14356 (left eye left, right eye right)
|
yading@10
|
14357 .IP "\fBsbs2r\fR" 4
|
yading@10
|
14358 .IX Item "sbs2r"
|
yading@10
|
14359 side by side crosseye with half width resolution
|
yading@10
|
14360 (right eye left, left eye right)
|
yading@10
|
14361 .IP "\fBabl\fR" 4
|
yading@10
|
14362 .IX Item "abl"
|
yading@10
|
14363 above-below (left eye above, right eye below)
|
yading@10
|
14364 .IP "\fBabr\fR" 4
|
yading@10
|
14365 .IX Item "abr"
|
yading@10
|
14366 above-below (right eye above, left eye below)
|
yading@10
|
14367 .IP "\fBab2l\fR" 4
|
yading@10
|
14368 .IX Item "ab2l"
|
yading@10
|
14369 above-below with half height resolution
|
yading@10
|
14370 (left eye above, right eye below)
|
yading@10
|
14371 .IP "\fBab2r\fR" 4
|
yading@10
|
14372 .IX Item "ab2r"
|
yading@10
|
14373 above-below with half height resolution
|
yading@10
|
14374 (right eye above, left eye below)
|
yading@10
|
14375 .Sp
|
yading@10
|
14376 Default value is \fBsbsl\fR.
|
yading@10
|
14377 .RE
|
yading@10
|
14378 .RS 4
|
yading@10
|
14379 .RE
|
yading@10
|
14380 .IP "\fBout\fR" 4
|
yading@10
|
14381 .IX Item "out"
|
yading@10
|
14382 Set stereoscopic image format of output.
|
yading@10
|
14383 .Sp
|
yading@10
|
14384 Available values for output image formats are all the input formats as well as:
|
yading@10
|
14385 .RS 4
|
yading@10
|
14386 .IP "\fBarbg\fR" 4
|
yading@10
|
14387 .IX Item "arbg"
|
yading@10
|
14388 anaglyph red/blue gray
|
yading@10
|
14389 (red filter on left eye, blue filter on right eye)
|
yading@10
|
14390 .IP "\fBargg\fR" 4
|
yading@10
|
14391 .IX Item "argg"
|
yading@10
|
14392 anaglyph red/green gray
|
yading@10
|
14393 (red filter on left eye, green filter on right eye)
|
yading@10
|
14394 .IP "\fBarcg\fR" 4
|
yading@10
|
14395 .IX Item "arcg"
|
yading@10
|
14396 anaglyph red/cyan gray
|
yading@10
|
14397 (red filter on left eye, cyan filter on right eye)
|
yading@10
|
14398 .IP "\fBarch\fR" 4
|
yading@10
|
14399 .IX Item "arch"
|
yading@10
|
14400 anaglyph red/cyan half colored
|
yading@10
|
14401 (red filter on left eye, cyan filter on right eye)
|
yading@10
|
14402 .IP "\fBarcc\fR" 4
|
yading@10
|
14403 .IX Item "arcc"
|
yading@10
|
14404 anaglyph red/cyan color
|
yading@10
|
14405 (red filter on left eye, cyan filter on right eye)
|
yading@10
|
14406 .IP "\fBarcd\fR" 4
|
yading@10
|
14407 .IX Item "arcd"
|
yading@10
|
14408 anaglyph red/cyan color optimized with the least squares projection of dubois
|
yading@10
|
14409 (red filter on left eye, cyan filter on right eye)
|
yading@10
|
14410 .IP "\fBagmg\fR" 4
|
yading@10
|
14411 .IX Item "agmg"
|
yading@10
|
14412 anaglyph green/magenta gray
|
yading@10
|
14413 (green filter on left eye, magenta filter on right eye)
|
yading@10
|
14414 .IP "\fBagmh\fR" 4
|
yading@10
|
14415 .IX Item "agmh"
|
yading@10
|
14416 anaglyph green/magenta half colored
|
yading@10
|
14417 (green filter on left eye, magenta filter on right eye)
|
yading@10
|
14418 .IP "\fBagmc\fR" 4
|
yading@10
|
14419 .IX Item "agmc"
|
yading@10
|
14420 anaglyph green/magenta colored
|
yading@10
|
14421 (green filter on left eye, magenta filter on right eye)
|
yading@10
|
14422 .IP "\fBagmd\fR" 4
|
yading@10
|
14423 .IX Item "agmd"
|
yading@10
|
14424 anaglyph green/magenta color optimized with the least squares projection of dubois
|
yading@10
|
14425 (green filter on left eye, magenta filter on right eye)
|
yading@10
|
14426 .IP "\fBaybg\fR" 4
|
yading@10
|
14427 .IX Item "aybg"
|
yading@10
|
14428 anaglyph yellow/blue gray
|
yading@10
|
14429 (yellow filter on left eye, blue filter on right eye)
|
yading@10
|
14430 .IP "\fBaybh\fR" 4
|
yading@10
|
14431 .IX Item "aybh"
|
yading@10
|
14432 anaglyph yellow/blue half colored
|
yading@10
|
14433 (yellow filter on left eye, blue filter on right eye)
|
yading@10
|
14434 .IP "\fBaybc\fR" 4
|
yading@10
|
14435 .IX Item "aybc"
|
yading@10
|
14436 anaglyph yellow/blue colored
|
yading@10
|
14437 (yellow filter on left eye, blue filter on right eye)
|
yading@10
|
14438 .IP "\fBaybd\fR" 4
|
yading@10
|
14439 .IX Item "aybd"
|
yading@10
|
14440 anaglyph yellow/blue color optimized with the least squares projection of dubois
|
yading@10
|
14441 (yellow filter on left eye, blue filter on right eye)
|
yading@10
|
14442 .IP "\fBirl\fR" 4
|
yading@10
|
14443 .IX Item "irl"
|
yading@10
|
14444 interleaved rows (left eye has top row, right eye starts on next row)
|
yading@10
|
14445 .IP "\fBirr\fR" 4
|
yading@10
|
14446 .IX Item "irr"
|
yading@10
|
14447 interleaved rows (right eye has top row, left eye starts on next row)
|
yading@10
|
14448 .IP "\fBml\fR" 4
|
yading@10
|
14449 .IX Item "ml"
|
yading@10
|
14450 mono output (left eye only)
|
yading@10
|
14451 .IP "\fBmr\fR" 4
|
yading@10
|
14452 .IX Item "mr"
|
yading@10
|
14453 mono output (right eye only)
|
yading@10
|
14454 .RE
|
yading@10
|
14455 .RS 4
|
yading@10
|
14456 .Sp
|
yading@10
|
14457 Default value is \fBarcd\fR.
|
yading@10
|
14458 .RE
|
yading@10
|
14459 .SS "subtitles"
|
yading@10
|
14460 .IX Subsection "subtitles"
|
yading@10
|
14461 Draw subtitles on top of input video using the libass library.
|
yading@10
|
14462 .PP
|
yading@10
|
14463 To enable compilation of this filter you need to configure FFmpeg with
|
yading@10
|
14464 \&\f(CW\*(C`\-\-enable\-libass\*(C'\fR. This filter also requires a build with libavcodec and
|
yading@10
|
14465 libavformat to convert the passed subtitles file to \s-1ASS\s0 (Advanced Substation
|
yading@10
|
14466 Alpha) subtitles format.
|
yading@10
|
14467 .PP
|
yading@10
|
14468 The filter accepts the following options:
|
yading@10
|
14469 .IP "\fBfilename, f\fR" 4
|
yading@10
|
14470 .IX Item "filename, f"
|
yading@10
|
14471 Set the filename of the subtitle file to read. It must be specified.
|
yading@10
|
14472 .IP "\fBoriginal_size\fR" 4
|
yading@10
|
14473 .IX Item "original_size"
|
yading@10
|
14474 Specify the size of the original video, the video for which the \s-1ASS\s0 file
|
yading@10
|
14475 was composed. Due to a misdesign in \s-1ASS\s0 aspect ratio arithmetic, this is
|
yading@10
|
14476 necessary to correctly scale the fonts if the aspect ratio has been changed.
|
yading@10
|
14477 .IP "\fBcharenc\fR" 4
|
yading@10
|
14478 .IX Item "charenc"
|
yading@10
|
14479 Set subtitles input character encoding. \f(CW\*(C`subtitles\*(C'\fR filter only. Only
|
yading@10
|
14480 useful if not \s-1UTF\-8\s0.
|
yading@10
|
14481 .PP
|
yading@10
|
14482 If the first key is not specified, it is assumed that the first value
|
yading@10
|
14483 specifies the \fBfilename\fR.
|
yading@10
|
14484 .PP
|
yading@10
|
14485 For example, to render the file \fIsub.srt\fR on top of the input
|
yading@10
|
14486 video, use the command:
|
yading@10
|
14487 .PP
|
yading@10
|
14488 .Vb 1
|
yading@10
|
14489 \& subtitles=sub.srt
|
yading@10
|
14490 .Ve
|
yading@10
|
14491 .PP
|
yading@10
|
14492 which is equivalent to:
|
yading@10
|
14493 .PP
|
yading@10
|
14494 .Vb 1
|
yading@10
|
14495 \& subtitles=filename=sub.srt
|
yading@10
|
14496 .Ve
|
yading@10
|
14497 .SS "super2xsai"
|
yading@10
|
14498 .IX Subsection "super2xsai"
|
yading@10
|
14499 Scale the input by 2x and smooth using the Super2xSaI (Scale and
|
yading@10
|
14500 Interpolate) pixel art scaling algorithm.
|
yading@10
|
14501 .PP
|
yading@10
|
14502 Useful for enlarging pixel art images without reducing sharpness.
|
yading@10
|
14503 .SS "swapuv"
|
yading@10
|
14504 .IX Subsection "swapuv"
|
yading@10
|
14505 Swap U & V plane.
|
yading@10
|
14506 .SS "telecine"
|
yading@10
|
14507 .IX Subsection "telecine"
|
yading@10
|
14508 Apply telecine process to the video.
|
yading@10
|
14509 .PP
|
yading@10
|
14510 This filter accepts the following options:
|
yading@10
|
14511 .IP "\fBfirst_field\fR" 4
|
yading@10
|
14512 .IX Item "first_field"
|
yading@10
|
14513 .RS 4
|
yading@10
|
14514 .PD 0
|
yading@10
|
14515 .IP "\fBtop, t\fR" 4
|
yading@10
|
14516 .IX Item "top, t"
|
yading@10
|
14517 .PD
|
yading@10
|
14518 top field first
|
yading@10
|
14519 .IP "\fBbottom, b\fR" 4
|
yading@10
|
14520 .IX Item "bottom, b"
|
yading@10
|
14521 bottom field first
|
yading@10
|
14522 The default value is \f(CW\*(C`top\*(C'\fR.
|
yading@10
|
14523 .RE
|
yading@10
|
14524 .RS 4
|
yading@10
|
14525 .RE
|
yading@10
|
14526 .IP "\fBpattern\fR" 4
|
yading@10
|
14527 .IX Item "pattern"
|
yading@10
|
14528 A string of numbers representing the pulldown pattern you wish to apply.
|
yading@10
|
14529 The default value is \f(CW23\fR.
|
yading@10
|
14530 .PP
|
yading@10
|
14531 .Vb 1
|
yading@10
|
14532 \& Some typical patterns:
|
yading@10
|
14533 \&
|
yading@10
|
14534 \& NTSC output (30i):
|
yading@10
|
14535 \& 27.5p: 32222
|
yading@10
|
14536 \& 24p: 23 (classic)
|
yading@10
|
14537 \& 24p: 2332 (preferred)
|
yading@10
|
14538 \& 20p: 33
|
yading@10
|
14539 \& 18p: 334
|
yading@10
|
14540 \& 16p: 3444
|
yading@10
|
14541 \&
|
yading@10
|
14542 \& PAL output (25i):
|
yading@10
|
14543 \& 27.5p: 12222
|
yading@10
|
14544 \& 24p: 222222222223 ("Euro pulldown")
|
yading@10
|
14545 \& 16.67p: 33
|
yading@10
|
14546 \& 16p: 33333334
|
yading@10
|
14547 .Ve
|
yading@10
|
14548 .SS "thumbnail"
|
yading@10
|
14549 .IX Subsection "thumbnail"
|
yading@10
|
14550 Select the most representative frame in a given sequence of consecutive frames.
|
yading@10
|
14551 .PP
|
yading@10
|
14552 The filter accepts the following options:
|
yading@10
|
14553 .IP "\fBn\fR" 4
|
yading@10
|
14554 .IX Item "n"
|
yading@10
|
14555 Set the frames batch size to analyze; in a set of \fIn\fR frames, the filter
|
yading@10
|
14556 will pick one of them, and then handle the next batch of \fIn\fR frames until
|
yading@10
|
14557 the end. Default is \f(CW100\fR.
|
yading@10
|
14558 .PP
|
yading@10
|
14559 Since the filter keeps track of the whole frames sequence, a bigger \fIn\fR
|
yading@10
|
14560 value will result in a higher memory usage, so a high value is not recommended.
|
yading@10
|
14561 .PP
|
yading@10
|
14562 \fIExamples\fR
|
yading@10
|
14563 .IX Subsection "Examples"
|
yading@10
|
14564 .IP "\(bu" 4
|
yading@10
|
14565 Extract one picture each 50 frames:
|
yading@10
|
14566 .Sp
|
yading@10
|
14567 .Vb 1
|
yading@10
|
14568 \& thumbnail=50
|
yading@10
|
14569 .Ve
|
yading@10
|
14570 .IP "\(bu" 4
|
yading@10
|
14571 Complete example of a thumbnail creation with \fBffmpeg\fR:
|
yading@10
|
14572 .Sp
|
yading@10
|
14573 .Vb 1
|
yading@10
|
14574 \& ffmpeg \-i in.avi \-vf thumbnail,scale=300:200 \-frames:v 1 out.png
|
yading@10
|
14575 .Ve
|
yading@10
|
14576 .SS "tile"
|
yading@10
|
14577 .IX Subsection "tile"
|
yading@10
|
14578 Tile several successive frames together.
|
yading@10
|
14579 .PP
|
yading@10
|
14580 The filter accepts the following options:
|
yading@10
|
14581 .IP "\fBlayout\fR" 4
|
yading@10
|
14582 .IX Item "layout"
|
yading@10
|
14583 Set the grid size (i.e. the number of lines and columns) in the form
|
yading@10
|
14584 "\fIw\fRx\fIh\fR".
|
yading@10
|
14585 .IP "\fBnb_frames\fR" 4
|
yading@10
|
14586 .IX Item "nb_frames"
|
yading@10
|
14587 Set the maximum number of frames to render in the given area. It must be less
|
yading@10
|
14588 than or equal to \fIw\fRx\fIh\fR. The default value is \f(CW0\fR, meaning all
|
yading@10
|
14589 the area will be used.
|
yading@10
|
14590 .IP "\fBmargin\fR" 4
|
yading@10
|
14591 .IX Item "margin"
|
yading@10
|
14592 Set the outer border margin in pixels.
|
yading@10
|
14593 .IP "\fBpadding\fR" 4
|
yading@10
|
14594 .IX Item "padding"
|
yading@10
|
14595 Set the inner border thickness (i.e. the number of pixels between frames). For
|
yading@10
|
14596 more advanced padding options (such as having different values for the edges),
|
yading@10
|
14597 refer to the pad video filter.
|
yading@10
|
14598 .PP
|
yading@10
|
14599 \fIExamples\fR
|
yading@10
|
14600 .IX Subsection "Examples"
|
yading@10
|
14601 .IP "\(bu" 4
|
yading@10
|
14602 Produce 8x8 \s-1PNG\s0 tiles of all keyframes (\fB\-skip_frame nokey\fR) in a movie:
|
yading@10
|
14603 .Sp
|
yading@10
|
14604 .Vb 1
|
yading@10
|
14605 \& ffmpeg \-skip_frame nokey \-i file.avi \-vf \*(Aqscale=128:72,tile=8x8\*(Aq \-an \-vsync 0 keyframes%03d.png
|
yading@10
|
14606 .Ve
|
yading@10
|
14607 .Sp
|
yading@10
|
14608 The \fB\-vsync 0\fR is necessary to prevent \fBffmpeg\fR from
|
yading@10
|
14609 duplicating each output frame to accomodate the originally detected frame
|
yading@10
|
14610 rate.
|
yading@10
|
14611 .IP "\(bu" 4
|
yading@10
|
14612 Display \f(CW5\fR pictures in an area of \f(CW\*(C`3x2\*(C'\fR frames,
|
yading@10
|
14613 with \f(CW7\fR pixels between them, and \f(CW2\fR pixels of initial margin, using
|
yading@10
|
14614 mixed flat and named options:
|
yading@10
|
14615 .Sp
|
yading@10
|
14616 .Vb 1
|
yading@10
|
14617 \& tile=3x2:nb_frames=5:padding=7:margin=2
|
yading@10
|
14618 .Ve
|
yading@10
|
14619 .SS "tinterlace"
|
yading@10
|
14620 .IX Subsection "tinterlace"
|
yading@10
|
14621 Perform various types of temporal field interlacing.
|
yading@10
|
14622 .PP
|
yading@10
|
14623 Frames are counted starting from 1, so the first input frame is
|
yading@10
|
14624 considered odd.
|
yading@10
|
14625 .PP
|
yading@10
|
14626 The filter accepts the following options:
|
yading@10
|
14627 .IP "\fBmode\fR" 4
|
yading@10
|
14628 .IX Item "mode"
|
yading@10
|
14629 Specify the mode of the interlacing. This option can also be specified
|
yading@10
|
14630 as a value alone. See below for a list of values for this option.
|
yading@10
|
14631 .Sp
|
yading@10
|
14632 Available values are:
|
yading@10
|
14633 .RS 4
|
yading@10
|
14634 .IP "\fBmerge, 0\fR" 4
|
yading@10
|
14635 .IX Item "merge, 0"
|
yading@10
|
14636 Move odd frames into the upper field, even into the lower field,
|
yading@10
|
14637 generating a double height frame at half frame rate.
|
yading@10
|
14638 .IP "\fBdrop_odd, 1\fR" 4
|
yading@10
|
14639 .IX Item "drop_odd, 1"
|
yading@10
|
14640 Only output even frames, odd frames are dropped, generating a frame with
|
yading@10
|
14641 unchanged height at half frame rate.
|
yading@10
|
14642 .IP "\fBdrop_even, 2\fR" 4
|
yading@10
|
14643 .IX Item "drop_even, 2"
|
yading@10
|
14644 Only output odd frames, even frames are dropped, generating a frame with
|
yading@10
|
14645 unchanged height at half frame rate.
|
yading@10
|
14646 .IP "\fBpad, 3\fR" 4
|
yading@10
|
14647 .IX Item "pad, 3"
|
yading@10
|
14648 Expand each frame to full height, but pad alternate lines with black,
|
yading@10
|
14649 generating a frame with double height at the same input frame rate.
|
yading@10
|
14650 .IP "\fBinterleave_top, 4\fR" 4
|
yading@10
|
14651 .IX Item "interleave_top, 4"
|
yading@10
|
14652 Interleave the upper field from odd frames with the lower field from
|
yading@10
|
14653 even frames, generating a frame with unchanged height at half frame rate.
|
yading@10
|
14654 .IP "\fBinterleave_bottom, 5\fR" 4
|
yading@10
|
14655 .IX Item "interleave_bottom, 5"
|
yading@10
|
14656 Interleave the lower field from odd frames with the upper field from
|
yading@10
|
14657 even frames, generating a frame with unchanged height at half frame rate.
|
yading@10
|
14658 .IP "\fBinterlacex2, 6\fR" 4
|
yading@10
|
14659 .IX Item "interlacex2, 6"
|
yading@10
|
14660 Double frame rate with unchanged height. Frames are inserted each
|
yading@10
|
14661 containing the second temporal field from the previous input frame and
|
yading@10
|
14662 the first temporal field from the next input frame. This mode relies on
|
yading@10
|
14663 the top_field_first flag. Useful for interlaced video displays with no
|
yading@10
|
14664 field synchronisation.
|
yading@10
|
14665 .RE
|
yading@10
|
14666 .RS 4
|
yading@10
|
14667 .Sp
|
yading@10
|
14668 Numeric values are deprecated but are accepted for backward
|
yading@10
|
14669 compatibility reasons.
|
yading@10
|
14670 .Sp
|
yading@10
|
14671 Default mode is \f(CW\*(C`merge\*(C'\fR.
|
yading@10
|
14672 .RE
|
yading@10
|
14673 .IP "\fBflags\fR" 4
|
yading@10
|
14674 .IX Item "flags"
|
yading@10
|
14675 Specify flags influencing the filter process.
|
yading@10
|
14676 .Sp
|
yading@10
|
14677 Available value for \fIflags\fR is:
|
yading@10
|
14678 .RS 4
|
yading@10
|
14679 .IP "\fBlow_pass_filter, vlfp\fR" 4
|
yading@10
|
14680 .IX Item "low_pass_filter, vlfp"
|
yading@10
|
14681 Enable vertical low-pass filtering in the filter.
|
yading@10
|
14682 Vertical low-pass filtering is required when creating an interlaced
|
yading@10
|
14683 destination from a progressive source which contains high-frequency
|
yading@10
|
14684 vertical detail. Filtering will reduce interlace 'twitter' and Moire
|
yading@10
|
14685 patterning.
|
yading@10
|
14686 .Sp
|
yading@10
|
14687 Vertical low-pass filtering can only be enabled for \fBmode\fR
|
yading@10
|
14688 \&\fIinterleave_top\fR and \fIinterleave_bottom\fR.
|
yading@10
|
14689 .RE
|
yading@10
|
14690 .RS 4
|
yading@10
|
14691 .RE
|
yading@10
|
14692 .SS "transpose"
|
yading@10
|
14693 .IX Subsection "transpose"
|
yading@10
|
14694 Transpose rows with columns in the input video and optionally flip it.
|
yading@10
|
14695 .PP
|
yading@10
|
14696 This filter accepts the following options:
|
yading@10
|
14697 .IP "\fBdir\fR" 4
|
yading@10
|
14698 .IX Item "dir"
|
yading@10
|
14699 The direction of the transpose.
|
yading@10
|
14700 .RS 4
|
yading@10
|
14701 .IP "\fB0, 4, cclock_flip\fR" 4
|
yading@10
|
14702 .IX Item "0, 4, cclock_flip"
|
yading@10
|
14703 Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
|
yading@10
|
14704 .Sp
|
yading@10
|
14705 .Vb 3
|
yading@10
|
14706 \& L.R L.l
|
yading@10
|
14707 \& . . \-> . .
|
yading@10
|
14708 \& l.r R.r
|
yading@10
|
14709 .Ve
|
yading@10
|
14710 .IP "\fB1, 5, clock\fR" 4
|
yading@10
|
14711 .IX Item "1, 5, clock"
|
yading@10
|
14712 Rotate by 90 degrees clockwise, that is:
|
yading@10
|
14713 .Sp
|
yading@10
|
14714 .Vb 3
|
yading@10
|
14715 \& L.R l.L
|
yading@10
|
14716 \& . . \-> . .
|
yading@10
|
14717 \& l.r r.R
|
yading@10
|
14718 .Ve
|
yading@10
|
14719 .IP "\fB2, 6, cclock\fR" 4
|
yading@10
|
14720 .IX Item "2, 6, cclock"
|
yading@10
|
14721 Rotate by 90 degrees counterclockwise, that is:
|
yading@10
|
14722 .Sp
|
yading@10
|
14723 .Vb 3
|
yading@10
|
14724 \& L.R R.r
|
yading@10
|
14725 \& . . \-> . .
|
yading@10
|
14726 \& l.r L.l
|
yading@10
|
14727 .Ve
|
yading@10
|
14728 .IP "\fB3, 7, clock_flip\fR" 4
|
yading@10
|
14729 .IX Item "3, 7, clock_flip"
|
yading@10
|
14730 Rotate by 90 degrees clockwise and vertically flip, that is:
|
yading@10
|
14731 .Sp
|
yading@10
|
14732 .Vb 3
|
yading@10
|
14733 \& L.R r.R
|
yading@10
|
14734 \& . . \-> . .
|
yading@10
|
14735 \& l.r l.L
|
yading@10
|
14736 .Ve
|
yading@10
|
14737 .RE
|
yading@10
|
14738 .RS 4
|
yading@10
|
14739 .Sp
|
yading@10
|
14740 For values between 4\-7, the transposition is only done if the input
|
yading@10
|
14741 video geometry is portrait and not landscape. These values are
|
yading@10
|
14742 deprecated, the \f(CW\*(C`passthrough\*(C'\fR option should be used instead.
|
yading@10
|
14743 .RE
|
yading@10
|
14744 .IP "\fBpassthrough\fR" 4
|
yading@10
|
14745 .IX Item "passthrough"
|
yading@10
|
14746 Do not apply the transposition if the input geometry matches the one
|
yading@10
|
14747 specified by the specified value. It accepts the following values:
|
yading@10
|
14748 .RS 4
|
yading@10
|
14749 .IP "\fBnone\fR" 4
|
yading@10
|
14750 .IX Item "none"
|
yading@10
|
14751 Always apply transposition.
|
yading@10
|
14752 .IP "\fBportrait\fR" 4
|
yading@10
|
14753 .IX Item "portrait"
|
yading@10
|
14754 Preserve portrait geometry (when \fIheight\fR >= \fIwidth\fR).
|
yading@10
|
14755 .IP "\fBlandscape\fR" 4
|
yading@10
|
14756 .IX Item "landscape"
|
yading@10
|
14757 Preserve landscape geometry (when \fIwidth\fR >= \fIheight\fR).
|
yading@10
|
14758 .RE
|
yading@10
|
14759 .RS 4
|
yading@10
|
14760 .Sp
|
yading@10
|
14761 Default value is \f(CW\*(C`none\*(C'\fR.
|
yading@10
|
14762 .RE
|
yading@10
|
14763 .PP
|
yading@10
|
14764 For example to rotate by 90 degrees clockwise and preserve portrait
|
yading@10
|
14765 layout:
|
yading@10
|
14766 .PP
|
yading@10
|
14767 .Vb 1
|
yading@10
|
14768 \& transpose=dir=1:passthrough=portrait
|
yading@10
|
14769 .Ve
|
yading@10
|
14770 .PP
|
yading@10
|
14771 The command above can also be specified as:
|
yading@10
|
14772 .PP
|
yading@10
|
14773 .Vb 1
|
yading@10
|
14774 \& transpose=1:portrait
|
yading@10
|
14775 .Ve
|
yading@10
|
14776 .SS "unsharp"
|
yading@10
|
14777 .IX Subsection "unsharp"
|
yading@10
|
14778 Sharpen or blur the input video.
|
yading@10
|
14779 .PP
|
yading@10
|
14780 It accepts the following parameters:
|
yading@10
|
14781 .IP "\fBluma_msize_x, lx\fR" 4
|
yading@10
|
14782 .IX Item "luma_msize_x, lx"
|
yading@10
|
14783 .PD 0
|
yading@10
|
14784 .IP "\fBchroma_msize_x, cx\fR" 4
|
yading@10
|
14785 .IX Item "chroma_msize_x, cx"
|
yading@10
|
14786 .PD
|
yading@10
|
14787 Set the luma/chroma matrix horizontal size. It must be an odd integer
|
yading@10
|
14788 between 3 and 63, default value is 5.
|
yading@10
|
14789 .IP "\fBluma_msize_y, ly\fR" 4
|
yading@10
|
14790 .IX Item "luma_msize_y, ly"
|
yading@10
|
14791 .PD 0
|
yading@10
|
14792 .IP "\fBchroma_msize_y, cy\fR" 4
|
yading@10
|
14793 .IX Item "chroma_msize_y, cy"
|
yading@10
|
14794 .PD
|
yading@10
|
14795 Set the luma/chroma matrix vertical size. It must be an odd integer
|
yading@10
|
14796 between 3 and 63, default value is 5.
|
yading@10
|
14797 .IP "\fBluma_amount, la\fR" 4
|
yading@10
|
14798 .IX Item "luma_amount, la"
|
yading@10
|
14799 .PD 0
|
yading@10
|
14800 .IP "\fBchroma_amount, ca\fR" 4
|
yading@10
|
14801 .IX Item "chroma_amount, ca"
|
yading@10
|
14802 .PD
|
yading@10
|
14803 Set the luma/chroma effect strength. It can be a float number,
|
yading@10
|
14804 reasonable values lay between \-1.5 and 1.5.
|
yading@10
|
14805 .Sp
|
yading@10
|
14806 Negative values will blur the input video, while positive values will
|
yading@10
|
14807 sharpen it, a value of zero will disable the effect.
|
yading@10
|
14808 .Sp
|
yading@10
|
14809 Default value is 1.0 for \fBluma_amount\fR, 0.0 for
|
yading@10
|
14810 \&\fBchroma_amount\fR.
|
yading@10
|
14811 .PP
|
yading@10
|
14812 All parameters are optional and default to the
|
yading@10
|
14813 equivalent of the string '5:5:1.0:5:5:0.0'.
|
yading@10
|
14814 .PP
|
yading@10
|
14815 \fIExamples\fR
|
yading@10
|
14816 .IX Subsection "Examples"
|
yading@10
|
14817 .IP "\(bu" 4
|
yading@10
|
14818 Apply strong luma sharpen effect:
|
yading@10
|
14819 .Sp
|
yading@10
|
14820 .Vb 1
|
yading@10
|
14821 \& unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
|
yading@10
|
14822 .Ve
|
yading@10
|
14823 .IP "\(bu" 4
|
yading@10
|
14824 Apply strong blur of both luma and chroma parameters:
|
yading@10
|
14825 .Sp
|
yading@10
|
14826 .Vb 1
|
yading@10
|
14827 \& unsharp=7:7:\-2:7:7:\-2
|
yading@10
|
14828 .Ve
|
yading@10
|
14829 .SS "vflip"
|
yading@10
|
14830 .IX Subsection "vflip"
|
yading@10
|
14831 Flip the input video vertically.
|
yading@10
|
14832 .PP
|
yading@10
|
14833 .Vb 1
|
yading@10
|
14834 \& ffmpeg \-i in.avi \-vf "vflip" out.avi
|
yading@10
|
14835 .Ve
|
yading@10
|
14836 .SS "yadif"
|
yading@10
|
14837 .IX Subsection "yadif"
|
yading@10
|
14838 Deinterlace the input video (\*(L"yadif\*(R" means \*(L"yet another deinterlacing
|
yading@10
|
14839 filter\*(R").
|
yading@10
|
14840 .PP
|
yading@10
|
14841 This filter accepts the following options:
|
yading@10
|
14842 .IP "\fBmode\fR" 4
|
yading@10
|
14843 .IX Item "mode"
|
yading@10
|
14844 The interlacing mode to adopt, accepts one of the following values:
|
yading@10
|
14845 .RS 4
|
yading@10
|
14846 .IP "\fB0, send_frame\fR" 4
|
yading@10
|
14847 .IX Item "0, send_frame"
|
yading@10
|
14848 output 1 frame for each frame
|
yading@10
|
14849 .IP "\fB1, send_field\fR" 4
|
yading@10
|
14850 .IX Item "1, send_field"
|
yading@10
|
14851 output 1 frame for each field
|
yading@10
|
14852 .IP "\fB2, send_frame_nospatial\fR" 4
|
yading@10
|
14853 .IX Item "2, send_frame_nospatial"
|
yading@10
|
14854 like \f(CW\*(C`send_frame\*(C'\fR but skip spatial interlacing check
|
yading@10
|
14855 .IP "\fB3, send_field_nospatial\fR" 4
|
yading@10
|
14856 .IX Item "3, send_field_nospatial"
|
yading@10
|
14857 like \f(CW\*(C`send_field\*(C'\fR but skip spatial interlacing check
|
yading@10
|
14858 .RE
|
yading@10
|
14859 .RS 4
|
yading@10
|
14860 .Sp
|
yading@10
|
14861 Default value is \f(CW\*(C`send_frame\*(C'\fR.
|
yading@10
|
14862 .RE
|
yading@10
|
14863 .IP "\fBparity\fR" 4
|
yading@10
|
14864 .IX Item "parity"
|
yading@10
|
14865 The picture field parity assumed for the input interlaced video, accepts one of
|
yading@10
|
14866 the following values:
|
yading@10
|
14867 .RS 4
|
yading@10
|
14868 .IP "\fB0, tff\fR" 4
|
yading@10
|
14869 .IX Item "0, tff"
|
yading@10
|
14870 assume top field first
|
yading@10
|
14871 .IP "\fB1, bff\fR" 4
|
yading@10
|
14872 .IX Item "1, bff"
|
yading@10
|
14873 assume bottom field first
|
yading@10
|
14874 .IP "\fB\-1, auto\fR" 4
|
yading@10
|
14875 .IX Item "-1, auto"
|
yading@10
|
14876 enable automatic detection
|
yading@10
|
14877 .RE
|
yading@10
|
14878 .RS 4
|
yading@10
|
14879 .Sp
|
yading@10
|
14880 Default value is \f(CW\*(C`auto\*(C'\fR.
|
yading@10
|
14881 If interlacing is unknown or decoder does not export this information,
|
yading@10
|
14882 top field first will be assumed.
|
yading@10
|
14883 .RE
|
yading@10
|
14884 .IP "\fBdeint\fR" 4
|
yading@10
|
14885 .IX Item "deint"
|
yading@10
|
14886 Specify which frames to deinterlace. Accept one of the following
|
yading@10
|
14887 values:
|
yading@10
|
14888 .RS 4
|
yading@10
|
14889 .IP "\fB0, all\fR" 4
|
yading@10
|
14890 .IX Item "0, all"
|
yading@10
|
14891 deinterlace all frames
|
yading@10
|
14892 .IP "\fB1, interlaced\fR" 4
|
yading@10
|
14893 .IX Item "1, interlaced"
|
yading@10
|
14894 only deinterlace frames marked as interlaced
|
yading@10
|
14895 .RE
|
yading@10
|
14896 .RS 4
|
yading@10
|
14897 .Sp
|
yading@10
|
14898 Default value is \f(CW\*(C`all\*(C'\fR.
|
yading@10
|
14899 .RE
|
yading@10
|
14900 .SH "VIDEO SOURCES"
|
yading@10
|
14901 .IX Header "VIDEO SOURCES"
|
yading@10
|
14902 Below is a description of the currently available video sources.
|
yading@10
|
14903 .SS "buffer"
|
yading@10
|
14904 .IX Subsection "buffer"
|
yading@10
|
14905 Buffer video frames, and make them available to the filter chain.
|
yading@10
|
14906 .PP
|
yading@10
|
14907 This source is mainly intended for a programmatic use, in particular
|
yading@10
|
14908 through the interface defined in \fIlibavfilter/vsrc_buffer.h\fR.
|
yading@10
|
14909 .PP
|
yading@10
|
14910 This source accepts the following options:
|
yading@10
|
14911 .IP "\fBvideo_size\fR" 4
|
yading@10
|
14912 .IX Item "video_size"
|
yading@10
|
14913 Specify the size (width and height) of the buffered video frames.
|
yading@10
|
14914 .IP "\fBwidth\fR" 4
|
yading@10
|
14915 .IX Item "width"
|
yading@10
|
14916 Input video width.
|
yading@10
|
14917 .IP "\fBheight\fR" 4
|
yading@10
|
14918 .IX Item "height"
|
yading@10
|
14919 Input video height.
|
yading@10
|
14920 .IP "\fBpix_fmt\fR" 4
|
yading@10
|
14921 .IX Item "pix_fmt"
|
yading@10
|
14922 A string representing the pixel format of the buffered video frames.
|
yading@10
|
14923 It may be a number corresponding to a pixel format, or a pixel format
|
yading@10
|
14924 name.
|
yading@10
|
14925 .IP "\fBtime_base\fR" 4
|
yading@10
|
14926 .IX Item "time_base"
|
yading@10
|
14927 Specify the timebase assumed by the timestamps of the buffered frames.
|
yading@10
|
14928 .IP "\fBframe_rate\fR" 4
|
yading@10
|
14929 .IX Item "frame_rate"
|
yading@10
|
14930 Specify the frame rate expected for the video stream.
|
yading@10
|
14931 .IP "\fBpixel_aspect, sar\fR" 4
|
yading@10
|
14932 .IX Item "pixel_aspect, sar"
|
yading@10
|
14933 Specify the sample aspect ratio assumed by the video frames.
|
yading@10
|
14934 .IP "\fBsws_param\fR" 4
|
yading@10
|
14935 .IX Item "sws_param"
|
yading@10
|
14936 Specify the optional parameters to be used for the scale filter which
|
yading@10
|
14937 is automatically inserted when an input change is detected in the
|
yading@10
|
14938 input size or format.
|
yading@10
|
14939 .PP
|
yading@10
|
14940 For example:
|
yading@10
|
14941 .PP
|
yading@10
|
14942 .Vb 1
|
yading@10
|
14943 \& buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
|
yading@10
|
14944 .Ve
|
yading@10
|
14945 .PP
|
yading@10
|
14946 will instruct the source to accept video frames with size 320x240 and
|
yading@10
|
14947 with format \*(L"yuv410p\*(R", assuming 1/24 as the timestamps timebase and
|
yading@10
|
14948 square pixels (1:1 sample aspect ratio).
|
yading@10
|
14949 Since the pixel format with name \*(L"yuv410p\*(R" corresponds to the number 6
|
yading@10
|
14950 (check the enum AVPixelFormat definition in \fIlibavutil/pixfmt.h\fR),
|
yading@10
|
14951 this example corresponds to:
|
yading@10
|
14952 .PP
|
yading@10
|
14953 .Vb 1
|
yading@10
|
14954 \& buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
|
yading@10
|
14955 .Ve
|
yading@10
|
14956 .PP
|
yading@10
|
14957 Alternatively, the options can be specified as a flat string, but this
|
yading@10
|
14958 syntax is deprecated:
|
yading@10
|
14959 .PP
|
yading@10
|
14960 \&\fIwidth\fR:\fIheight\fR:\fIpix_fmt\fR:\fItime_base.num\fR:\fItime_base.den\fR:\fIpixel_aspect.num\fR:\fIpixel_aspect.den\fR[:\fIsws_param\fR]
|
yading@10
|
14961 .SS "cellauto"
|
yading@10
|
14962 .IX Subsection "cellauto"
|
yading@10
|
14963 Create a pattern generated by an elementary cellular automaton.
|
yading@10
|
14964 .PP
|
yading@10
|
14965 The initial state of the cellular automaton can be defined through the
|
yading@10
|
14966 \&\fBfilename\fR, and \fBpattern\fR options. If such options are
|
yading@10
|
14967 not specified an initial state is created randomly.
|
yading@10
|
14968 .PP
|
yading@10
|
14969 At each new frame a new row in the video is filled with the result of
|
yading@10
|
14970 the cellular automaton next generation. The behavior when the whole
|
yading@10
|
14971 frame is filled is defined by the \fBscroll\fR option.
|
yading@10
|
14972 .PP
|
yading@10
|
14973 This source accepts the following options:
|
yading@10
|
14974 .IP "\fBfilename, f\fR" 4
|
yading@10
|
14975 .IX Item "filename, f"
|
yading@10
|
14976 Read the initial cellular automaton state, i.e. the starting row, from
|
yading@10
|
14977 the specified file.
|
yading@10
|
14978 In the file, each non-whitespace character is considered an alive
|
yading@10
|
14979 cell, a newline will terminate the row, and further characters in the
|
yading@10
|
14980 file will be ignored.
|
yading@10
|
14981 .IP "\fBpattern, p\fR" 4
|
yading@10
|
14982 .IX Item "pattern, p"
|
yading@10
|
14983 Read the initial cellular automaton state, i.e. the starting row, from
|
yading@10
|
14984 the specified string.
|
yading@10
|
14985 .Sp
|
yading@10
|
14986 Each non-whitespace character in the string is considered an alive
|
yading@10
|
14987 cell, a newline will terminate the row, and further characters in the
|
yading@10
|
14988 string will be ignored.
|
yading@10
|
14989 .IP "\fBrate, r\fR" 4
|
yading@10
|
14990 .IX Item "rate, r"
|
yading@10
|
14991 Set the video rate, that is the number of frames generated per second.
|
yading@10
|
14992 Default is 25.
|
yading@10
|
14993 .IP "\fBrandom_fill_ratio, ratio\fR" 4
|
yading@10
|
14994 .IX Item "random_fill_ratio, ratio"
|
yading@10
|
14995 Set the random fill ratio for the initial cellular automaton row. It
|
yading@10
|
14996 is a floating point number value ranging from 0 to 1, defaults to
|
yading@10
|
14997 1/PHI.
|
yading@10
|
14998 .Sp
|
yading@10
|
14999 This option is ignored when a file or a pattern is specified.
|
yading@10
|
15000 .IP "\fBrandom_seed, seed\fR" 4
|
yading@10
|
15001 .IX Item "random_seed, seed"
|
yading@10
|
15002 Set the seed for filling randomly the initial row, must be an integer
|
yading@10
|
15003 included between 0 and \s-1UINT32_MAX\s0. If not specified, or if explicitly
|
yading@10
|
15004 set to \-1, the filter will try to use a good random seed on a best
|
yading@10
|
15005 effort basis.
|
yading@10
|
15006 .IP "\fBrule\fR" 4
|
yading@10
|
15007 .IX Item "rule"
|
yading@10
|
15008 Set the cellular automaton rule, it is a number ranging from 0 to 255.
|
yading@10
|
15009 Default value is 110.
|
yading@10
|
15010 .IP "\fBsize, s\fR" 4
|
yading@10
|
15011 .IX Item "size, s"
|
yading@10
|
15012 Set the size of the output video.
|
yading@10
|
15013 .Sp
|
yading@10
|
15014 If \fBfilename\fR or \fBpattern\fR is specified, the size is set
|
yading@10
|
15015 by default to the width of the specified initial state row, and the
|
yading@10
|
15016 height is set to \fIwidth\fR * \s-1PHI\s0.
|
yading@10
|
15017 .Sp
|
yading@10
|
15018 If \fBsize\fR is set, it must contain the width of the specified
|
yading@10
|
15019 pattern string, and the specified pattern will be centered in the
|
yading@10
|
15020 larger row.
|
yading@10
|
15021 .Sp
|
yading@10
|
15022 If a filename or a pattern string is not specified, the size value
|
yading@10
|
15023 defaults to \*(L"320x518\*(R" (used for a randomly generated initial state).
|
yading@10
|
15024 .IP "\fBscroll\fR" 4
|
yading@10
|
15025 .IX Item "scroll"
|
yading@10
|
15026 If set to 1, scroll the output upward when all the rows in the output
|
yading@10
|
15027 have been already filled. If set to 0, the new generated row will be
|
yading@10
|
15028 written over the top row just after the bottom row is filled.
|
yading@10
|
15029 Defaults to 1.
|
yading@10
|
15030 .IP "\fBstart_full, full\fR" 4
|
yading@10
|
15031 .IX Item "start_full, full"
|
yading@10
|
15032 If set to 1, completely fill the output with generated rows before
|
yading@10
|
15033 outputting the first frame.
|
yading@10
|
15034 This is the default behavior, for disabling set the value to 0.
|
yading@10
|
15035 .IP "\fBstitch\fR" 4
|
yading@10
|
15036 .IX Item "stitch"
|
yading@10
|
15037 If set to 1, stitch the left and right row edges together.
|
yading@10
|
15038 This is the default behavior, for disabling set the value to 0.
|
yading@10
|
15039 .PP
|
yading@10
|
15040 \fIExamples\fR
|
yading@10
|
15041 .IX Subsection "Examples"
|
yading@10
|
15042 .IP "\(bu" 4
|
yading@10
|
15043 Read the initial state from \fIpattern\fR, and specify an output of
|
yading@10
|
15044 size 200x400.
|
yading@10
|
15045 .Sp
|
yading@10
|
15046 .Vb 1
|
yading@10
|
15047 \& cellauto=f=pattern:s=200x400
|
yading@10
|
15048 .Ve
|
yading@10
|
15049 .IP "\(bu" 4
|
yading@10
|
15050 Generate a random initial row with a width of 200 cells, with a fill
|
yading@10
|
15051 ratio of 2/3:
|
yading@10
|
15052 .Sp
|
yading@10
|
15053 .Vb 1
|
yading@10
|
15054 \& cellauto=ratio=2/3:s=200x200
|
yading@10
|
15055 .Ve
|
yading@10
|
15056 .IP "\(bu" 4
|
yading@10
|
15057 Create a pattern generated by rule 18 starting by a single alive cell
|
yading@10
|
15058 centered on an initial row with width 100:
|
yading@10
|
15059 .Sp
|
yading@10
|
15060 .Vb 1
|
yading@10
|
15061 \& cellauto=p=@s=100x400:full=0:rule=18
|
yading@10
|
15062 .Ve
|
yading@10
|
15063 .IP "\(bu" 4
|
yading@10
|
15064 Specify a more elaborated initial pattern:
|
yading@10
|
15065 .Sp
|
yading@10
|
15066 .Vb 1
|
yading@10
|
15067 \& cellauto=p=\*(Aq@@ @ @@\*(Aq:s=100x400:full=0:rule=18
|
yading@10
|
15068 .Ve
|
yading@10
|
15069 .SS "mandelbrot"
|
yading@10
|
15070 .IX Subsection "mandelbrot"
|
yading@10
|
15071 Generate a Mandelbrot set fractal, and progressively zoom towards the
|
yading@10
|
15072 point specified with \fIstart_x\fR and \fIstart_y\fR.
|
yading@10
|
15073 .PP
|
yading@10
|
15074 This source accepts the following options:
|
yading@10
|
15075 .IP "\fBend_pts\fR" 4
|
yading@10
|
15076 .IX Item "end_pts"
|
yading@10
|
15077 Set the terminal pts value. Default value is 400.
|
yading@10
|
15078 .IP "\fBend_scale\fR" 4
|
yading@10
|
15079 .IX Item "end_scale"
|
yading@10
|
15080 Set the terminal scale value.
|
yading@10
|
15081 Must be a floating point value. Default value is 0.3.
|
yading@10
|
15082 .IP "\fBinner\fR" 4
|
yading@10
|
15083 .IX Item "inner"
|
yading@10
|
15084 Set the inner coloring mode, that is the algorithm used to draw the
|
yading@10
|
15085 Mandelbrot fractal internal region.
|
yading@10
|
15086 .Sp
|
yading@10
|
15087 It shall assume one of the following values:
|
yading@10
|
15088 .RS 4
|
yading@10
|
15089 .IP "\fBblack\fR" 4
|
yading@10
|
15090 .IX Item "black"
|
yading@10
|
15091 Set black mode.
|
yading@10
|
15092 .IP "\fBconvergence\fR" 4
|
yading@10
|
15093 .IX Item "convergence"
|
yading@10
|
15094 Show time until convergence.
|
yading@10
|
15095 .IP "\fBmincol\fR" 4
|
yading@10
|
15096 .IX Item "mincol"
|
yading@10
|
15097 Set color based on point closest to the origin of the iterations.
|
yading@10
|
15098 .IP "\fBperiod\fR" 4
|
yading@10
|
15099 .IX Item "period"
|
yading@10
|
15100 Set period mode.
|
yading@10
|
15101 .RE
|
yading@10
|
15102 .RS 4
|
yading@10
|
15103 .Sp
|
yading@10
|
15104 Default value is \fImincol\fR.
|
yading@10
|
15105 .RE
|
yading@10
|
15106 .IP "\fBbailout\fR" 4
|
yading@10
|
15107 .IX Item "bailout"
|
yading@10
|
15108 Set the bailout value. Default value is 10.0.
|
yading@10
|
15109 .IP "\fBmaxiter\fR" 4
|
yading@10
|
15110 .IX Item "maxiter"
|
yading@10
|
15111 Set the maximum of iterations performed by the rendering
|
yading@10
|
15112 algorithm. Default value is 7189.
|
yading@10
|
15113 .IP "\fBouter\fR" 4
|
yading@10
|
15114 .IX Item "outer"
|
yading@10
|
15115 Set outer coloring mode.
|
yading@10
|
15116 It shall assume one of following values:
|
yading@10
|
15117 .RS 4
|
yading@10
|
15118 .IP "\fBiteration_count\fR" 4
|
yading@10
|
15119 .IX Item "iteration_count"
|
yading@10
|
15120 Set iteration cound mode.
|
yading@10
|
15121 .IP "\fBnormalized_iteration_count\fR" 4
|
yading@10
|
15122 .IX Item "normalized_iteration_count"
|
yading@10
|
15123 set normalized iteration count mode.
|
yading@10
|
15124 .RE
|
yading@10
|
15125 .RS 4
|
yading@10
|
15126 .Sp
|
yading@10
|
15127 Default value is \fInormalized_iteration_count\fR.
|
yading@10
|
15128 .RE
|
yading@10
|
15129 .IP "\fBrate, r\fR" 4
|
yading@10
|
15130 .IX Item "rate, r"
|
yading@10
|
15131 Set frame rate, expressed as number of frames per second. Default
|
yading@10
|
15132 value is \*(L"25\*(R".
|
yading@10
|
15133 .IP "\fBsize, s\fR" 4
|
yading@10
|
15134 .IX Item "size, s"
|
yading@10
|
15135 Set frame size. Default value is \*(L"640x480\*(R".
|
yading@10
|
15136 .IP "\fBstart_scale\fR" 4
|
yading@10
|
15137 .IX Item "start_scale"
|
yading@10
|
15138 Set the initial scale value. Default value is 3.0.
|
yading@10
|
15139 .IP "\fBstart_x\fR" 4
|
yading@10
|
15140 .IX Item "start_x"
|
yading@10
|
15141 Set the initial x position. Must be a floating point value between
|
yading@10
|
15142 \&\-100 and 100. Default value is \-0.743643887037158704752191506114774.
|
yading@10
|
15143 .IP "\fBstart_y\fR" 4
|
yading@10
|
15144 .IX Item "start_y"
|
yading@10
|
15145 Set the initial y position. Must be a floating point value between
|
yading@10
|
15146 \&\-100 and 100. Default value is \-0.131825904205311970493132056385139.
|
yading@10
|
15147 .SS "mptestsrc"
|
yading@10
|
15148 .IX Subsection "mptestsrc"
|
yading@10
|
15149 Generate various test patterns, as generated by the MPlayer test filter.
|
yading@10
|
15150 .PP
|
yading@10
|
15151 The size of the generated video is fixed, and is 256x256.
|
yading@10
|
15152 This source is useful in particular for testing encoding features.
|
yading@10
|
15153 .PP
|
yading@10
|
15154 This source accepts the following options:
|
yading@10
|
15155 .IP "\fBrate, r\fR" 4
|
yading@10
|
15156 .IX Item "rate, r"
|
yading@10
|
15157 Specify the frame rate of the sourced video, as the number of frames
|
yading@10
|
15158 generated per second. It has to be a string in the format
|
yading@10
|
15159 \&\fIframe_rate_num\fR/\fIframe_rate_den\fR, an integer number, a float
|
yading@10
|
15160 number or a valid video frame rate abbreviation. The default value is
|
yading@10
|
15161 \&\*(L"25\*(R".
|
yading@10
|
15162 .IP "\fBduration, d\fR" 4
|
yading@10
|
15163 .IX Item "duration, d"
|
yading@10
|
15164 Set the video duration of the sourced video. The accepted syntax is:
|
yading@10
|
15165 .Sp
|
yading@10
|
15166 .Vb 2
|
yading@10
|
15167 \& [\-]HH:MM:SS[.m...]
|
yading@10
|
15168 \& [\-]S+[.m...]
|
yading@10
|
15169 .Ve
|
yading@10
|
15170 .Sp
|
yading@10
|
15171 See also the function \f(CW\*(C`av_parse_time()\*(C'\fR.
|
yading@10
|
15172 .Sp
|
yading@10
|
15173 If not specified, or the expressed duration is negative, the video is
|
yading@10
|
15174 supposed to be generated forever.
|
yading@10
|
15175 .IP "\fBtest, t\fR" 4
|
yading@10
|
15176 .IX Item "test, t"
|
yading@10
|
15177 Set the number or the name of the test to perform. Supported tests are:
|
yading@10
|
15178 .RS 4
|
yading@10
|
15179 .IP "\fBdc_luma\fR" 4
|
yading@10
|
15180 .IX Item "dc_luma"
|
yading@10
|
15181 .PD 0
|
yading@10
|
15182 .IP "\fBdc_chroma\fR" 4
|
yading@10
|
15183 .IX Item "dc_chroma"
|
yading@10
|
15184 .IP "\fBfreq_luma\fR" 4
|
yading@10
|
15185 .IX Item "freq_luma"
|
yading@10
|
15186 .IP "\fBfreq_chroma\fR" 4
|
yading@10
|
15187 .IX Item "freq_chroma"
|
yading@10
|
15188 .IP "\fBamp_luma\fR" 4
|
yading@10
|
15189 .IX Item "amp_luma"
|
yading@10
|
15190 .IP "\fBamp_chroma\fR" 4
|
yading@10
|
15191 .IX Item "amp_chroma"
|
yading@10
|
15192 .IP "\fBcbp\fR" 4
|
yading@10
|
15193 .IX Item "cbp"
|
yading@10
|
15194 .IP "\fBmv\fR" 4
|
yading@10
|
15195 .IX Item "mv"
|
yading@10
|
15196 .IP "\fBring1\fR" 4
|
yading@10
|
15197 .IX Item "ring1"
|
yading@10
|
15198 .IP "\fBring2\fR" 4
|
yading@10
|
15199 .IX Item "ring2"
|
yading@10
|
15200 .IP "\fBall\fR" 4
|
yading@10
|
15201 .IX Item "all"
|
yading@10
|
15202 .RE
|
yading@10
|
15203 .RS 4
|
yading@10
|
15204 .PD
|
yading@10
|
15205 .Sp
|
yading@10
|
15206 Default value is \*(L"all\*(R", which will cycle through the list of all tests.
|
yading@10
|
15207 .RE
|
yading@10
|
15208 .PP
|
yading@10
|
15209 For example the following:
|
yading@10
|
15210 .PP
|
yading@10
|
15211 .Vb 1
|
yading@10
|
15212 \& testsrc=t=dc_luma
|
yading@10
|
15213 .Ve
|
yading@10
|
15214 .PP
|
yading@10
|
15215 will generate a \*(L"dc_luma\*(R" test pattern.
|
yading@10
|
15216 .SS "frei0r_src"
|
yading@10
|
15217 .IX Subsection "frei0r_src"
|
yading@10
|
15218 Provide a frei0r source.
|
yading@10
|
15219 .PP
|
yading@10
|
15220 To enable compilation of this filter you need to install the frei0r
|
yading@10
|
15221 header and configure FFmpeg with \f(CW\*(C`\-\-enable\-frei0r\*(C'\fR.
|
yading@10
|
15222 .PP
|
yading@10
|
15223 This source accepts the following options:
|
yading@10
|
15224 .IP "\fBsize\fR" 4
|
yading@10
|
15225 .IX Item "size"
|
yading@10
|
15226 The size of the video to generate, may be a string of the form
|
yading@10
|
15227 \&\fIwidth\fRx\fIheight\fR or a frame size abbreviation.
|
yading@10
|
15228 .IP "\fBframerate\fR" 4
|
yading@10
|
15229 .IX Item "framerate"
|
yading@10
|
15230 Framerate of the generated video, may be a string of the form
|
yading@10
|
15231 \&\fInum\fR/\fIden\fR or a frame rate abbreviation.
|
yading@10
|
15232 .IP "\fBfilter_name\fR" 4
|
yading@10
|
15233 .IX Item "filter_name"
|
yading@10
|
15234 The name to the frei0r source to load. For more information regarding frei0r and
|
yading@10
|
15235 how to set the parameters read the section frei0r in the description of
|
yading@10
|
15236 the video filters.
|
yading@10
|
15237 .IP "\fBfilter_params\fR" 4
|
yading@10
|
15238 .IX Item "filter_params"
|
yading@10
|
15239 A '|'\-separated list of parameters to pass to the frei0r source.
|
yading@10
|
15240 .PP
|
yading@10
|
15241 For example, to generate a frei0r partik0l source with size 200x200
|
yading@10
|
15242 and frame rate 10 which is overlayed on the overlay filter main input:
|
yading@10
|
15243 .PP
|
yading@10
|
15244 .Vb 1
|
yading@10
|
15245 \& frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
|
yading@10
|
15246 .Ve
|
yading@10
|
15247 .SS "life"
|
yading@10
|
15248 .IX Subsection "life"
|
yading@10
|
15249 Generate a life pattern.
|
yading@10
|
15250 .PP
|
yading@10
|
15251 This source is based on a generalization of John Conway's life game.
|
yading@10
|
15252 .PP
|
yading@10
|
15253 The sourced input represents a life grid, each pixel represents a cell
|
yading@10
|
15254 which can be in one of two possible states, alive or dead. Every cell
|
yading@10
|
15255 interacts with its eight neighbours, which are the cells that are
|
yading@10
|
15256 horizontally, vertically, or diagonally adjacent.
|
yading@10
|
15257 .PP
|
yading@10
|
15258 At each interaction the grid evolves according to the adopted rule,
|
yading@10
|
15259 which specifies the number of neighbor alive cells which will make a
|
yading@10
|
15260 cell stay alive or born. The \fBrule\fR option allows to specify
|
yading@10
|
15261 the rule to adopt.
|
yading@10
|
15262 .PP
|
yading@10
|
15263 This source accepts the following options:
|
yading@10
|
15264 .IP "\fBfilename, f\fR" 4
|
yading@10
|
15265 .IX Item "filename, f"
|
yading@10
|
15266 Set the file from which to read the initial grid state. In the file,
|
yading@10
|
15267 each non-whitespace character is considered an alive cell, and newline
|
yading@10
|
15268 is used to delimit the end of each row.
|
yading@10
|
15269 .Sp
|
yading@10
|
15270 If this option is not specified, the initial grid is generated
|
yading@10
|
15271 randomly.
|
yading@10
|
15272 .IP "\fBrate, r\fR" 4
|
yading@10
|
15273 .IX Item "rate, r"
|
yading@10
|
15274 Set the video rate, that is the number of frames generated per second.
|
yading@10
|
15275 Default is 25.
|
yading@10
|
15276 .IP "\fBrandom_fill_ratio, ratio\fR" 4
|
yading@10
|
15277 .IX Item "random_fill_ratio, ratio"
|
yading@10
|
15278 Set the random fill ratio for the initial random grid. It is a
|
yading@10
|
15279 floating point number value ranging from 0 to 1, defaults to 1/PHI.
|
yading@10
|
15280 It is ignored when a file is specified.
|
yading@10
|
15281 .IP "\fBrandom_seed, seed\fR" 4
|
yading@10
|
15282 .IX Item "random_seed, seed"
|
yading@10
|
15283 Set the seed for filling the initial random grid, must be an integer
|
yading@10
|
15284 included between 0 and \s-1UINT32_MAX\s0. If not specified, or if explicitly
|
yading@10
|
15285 set to \-1, the filter will try to use a good random seed on a best
|
yading@10
|
15286 effort basis.
|
yading@10
|
15287 .IP "\fBrule\fR" 4
|
yading@10
|
15288 .IX Item "rule"
|
yading@10
|
15289 Set the life rule.
|
yading@10
|
15290 .Sp
|
yading@10
|
15291 A rule can be specified with a code of the kind "S\fI\s-1NS\s0\fR/B\fI\s-1NB\s0\fR",
|
yading@10
|
15292 where \fI\s-1NS\s0\fR and \fI\s-1NB\s0\fR are sequences of numbers in the range 0\-8,
|
yading@10
|
15293 \&\fI\s-1NS\s0\fR specifies the number of alive neighbor cells which make a
|
yading@10
|
15294 live cell stay alive, and \fI\s-1NB\s0\fR the number of alive neighbor cells
|
yading@10
|
15295 which make a dead cell to become alive (i.e. to \*(L"born\*(R").
|
yading@10
|
15296 \&\*(L"s\*(R" and \*(L"b\*(R" can be used in place of \*(L"S\*(R" and \*(L"B\*(R", respectively.
|
yading@10
|
15297 .Sp
|
yading@10
|
15298 Alternatively a rule can be specified by an 18\-bits integer. The 9
|
yading@10
|
15299 high order bits are used to encode the next cell state if it is alive
|
yading@10
|
15300 for each number of neighbor alive cells, the low order bits specify
|
yading@10
|
15301 the rule for \*(L"borning\*(R" new cells. Higher order bits encode for an
|
yading@10
|
15302 higher number of neighbor cells.
|
yading@10
|
15303 For example the number 6153 = \f(CW\*(C`(12<<9)+9\*(C'\fR specifies a stay alive
|
yading@10
|
15304 rule of 12 and a born rule of 9, which corresponds to \*(L"S23/B03\*(R".
|
yading@10
|
15305 .Sp
|
yading@10
|
15306 Default value is \*(L"S23/B3\*(R", which is the original Conway's game of life
|
yading@10
|
15307 rule, and will keep a cell alive if it has 2 or 3 neighbor alive
|
yading@10
|
15308 cells, and will born a new cell if there are three alive cells around
|
yading@10
|
15309 a dead cell.
|
yading@10
|
15310 .IP "\fBsize, s\fR" 4
|
yading@10
|
15311 .IX Item "size, s"
|
yading@10
|
15312 Set the size of the output video.
|
yading@10
|
15313 .Sp
|
yading@10
|
15314 If \fBfilename\fR is specified, the size is set by default to the
|
yading@10
|
15315 same size of the input file. If \fBsize\fR is set, it must contain
|
yading@10
|
15316 the size specified in the input file, and the initial grid defined in
|
yading@10
|
15317 that file is centered in the larger resulting area.
|
yading@10
|
15318 .Sp
|
yading@10
|
15319 If a filename is not specified, the size value defaults to \*(L"320x240\*(R"
|
yading@10
|
15320 (used for a randomly generated initial grid).
|
yading@10
|
15321 .IP "\fBstitch\fR" 4
|
yading@10
|
15322 .IX Item "stitch"
|
yading@10
|
15323 If set to 1, stitch the left and right grid edges together, and the
|
yading@10
|
15324 top and bottom edges also. Defaults to 1.
|
yading@10
|
15325 .IP "\fBmold\fR" 4
|
yading@10
|
15326 .IX Item "mold"
|
yading@10
|
15327 Set cell mold speed. If set, a dead cell will go from \fBdeath_color\fR to
|
yading@10
|
15328 \&\fBmold_color\fR with a step of \fBmold\fR. \fBmold\fR can have a
|
yading@10
|
15329 value from 0 to 255.
|
yading@10
|
15330 .IP "\fBlife_color\fR" 4
|
yading@10
|
15331 .IX Item "life_color"
|
yading@10
|
15332 Set the color of living (or new born) cells.
|
yading@10
|
15333 .IP "\fBdeath_color\fR" 4
|
yading@10
|
15334 .IX Item "death_color"
|
yading@10
|
15335 Set the color of dead cells. If \fBmold\fR is set, this is the first color
|
yading@10
|
15336 used to represent a dead cell.
|
yading@10
|
15337 .IP "\fBmold_color\fR" 4
|
yading@10
|
15338 .IX Item "mold_color"
|
yading@10
|
15339 Set mold color, for definitely dead and moldy cells.
|
yading@10
|
15340 .PP
|
yading@10
|
15341 \fIExamples\fR
|
yading@10
|
15342 .IX Subsection "Examples"
|
yading@10
|
15343 .IP "\(bu" 4
|
yading@10
|
15344 Read a grid from \fIpattern\fR, and center it on a grid of size
|
yading@10
|
15345 300x300 pixels:
|
yading@10
|
15346 .Sp
|
yading@10
|
15347 .Vb 1
|
yading@10
|
15348 \& life=f=pattern:s=300x300
|
yading@10
|
15349 .Ve
|
yading@10
|
15350 .IP "\(bu" 4
|
yading@10
|
15351 Generate a random grid of size 200x200, with a fill ratio of 2/3:
|
yading@10
|
15352 .Sp
|
yading@10
|
15353 .Vb 1
|
yading@10
|
15354 \& life=ratio=2/3:s=200x200
|
yading@10
|
15355 .Ve
|
yading@10
|
15356 .IP "\(bu" 4
|
yading@10
|
15357 Specify a custom rule for evolving a randomly generated grid:
|
yading@10
|
15358 .Sp
|
yading@10
|
15359 .Vb 1
|
yading@10
|
15360 \& life=rule=S14/B34
|
yading@10
|
15361 .Ve
|
yading@10
|
15362 .IP "\(bu" 4
|
yading@10
|
15363 Full example with slow death effect (mold) using \fBffplay\fR:
|
yading@10
|
15364 .Sp
|
yading@10
|
15365 .Vb 1
|
yading@10
|
15366 \& ffplay \-f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
|
yading@10
|
15367 .Ve
|
yading@10
|
15368 .SS "color, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc"
|
yading@10
|
15369 .IX Subsection "color, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc"
|
yading@10
|
15370 The \f(CW\*(C`color\*(C'\fR source provides an uniformly colored input.
|
yading@10
|
15371 .PP
|
yading@10
|
15372 The \f(CW\*(C`nullsrc\*(C'\fR source returns unprocessed video frames. It is
|
yading@10
|
15373 mainly useful to be employed in analysis / debugging tools, or as the
|
yading@10
|
15374 source for filters which ignore the input data.
|
yading@10
|
15375 .PP
|
yading@10
|
15376 The \f(CW\*(C`rgbtestsrc\*(C'\fR source generates an \s-1RGB\s0 test pattern useful for
|
yading@10
|
15377 detecting \s-1RGB\s0 vs \s-1BGR\s0 issues. You should see a red, green and blue
|
yading@10
|
15378 stripe from top to bottom.
|
yading@10
|
15379 .PP
|
yading@10
|
15380 The \f(CW\*(C`smptebars\*(C'\fR source generates a color bars pattern, based on
|
yading@10
|
15381 the \s-1SMPTE\s0 Engineering Guideline \s-1EG\s0 1\-1990.
|
yading@10
|
15382 .PP
|
yading@10
|
15383 The \f(CW\*(C`smptehdbars\*(C'\fR source generates a color bars pattern, based on
|
yading@10
|
15384 the \s-1SMPTE\s0 \s-1RP\s0 219\-2002.
|
yading@10
|
15385 .PP
|
yading@10
|
15386 The \f(CW\*(C`testsrc\*(C'\fR source generates a test video pattern, showing a
|
yading@10
|
15387 color pattern, a scrolling gradient and a timestamp. This is mainly
|
yading@10
|
15388 intended for testing purposes.
|
yading@10
|
15389 .PP
|
yading@10
|
15390 The sources accept the following options:
|
yading@10
|
15391 .IP "\fBcolor, c\fR" 4
|
yading@10
|
15392 .IX Item "color, c"
|
yading@10
|
15393 Specify the color of the source, only used in the \f(CW\*(C`color\*(C'\fR
|
yading@10
|
15394 source. It can be the name of a color (case insensitive match) or a
|
yading@10
|
15395 0xRRGGBB[\s-1AA\s0] sequence, possibly followed by an alpha specifier. The
|
yading@10
|
15396 default value is \*(L"black\*(R".
|
yading@10
|
15397 .IP "\fBsize, s\fR" 4
|
yading@10
|
15398 .IX Item "size, s"
|
yading@10
|
15399 Specify the size of the sourced video, it may be a string of the form
|
yading@10
|
15400 \&\fIwidth\fRx\fIheight\fR, or the name of a size abbreviation. The
|
yading@10
|
15401 default value is \*(L"320x240\*(R".
|
yading@10
|
15402 .IP "\fBrate, r\fR" 4
|
yading@10
|
15403 .IX Item "rate, r"
|
yading@10
|
15404 Specify the frame rate of the sourced video, as the number of frames
|
yading@10
|
15405 generated per second. It has to be a string in the format
|
yading@10
|
15406 \&\fIframe_rate_num\fR/\fIframe_rate_den\fR, an integer number, a float
|
yading@10
|
15407 number or a valid video frame rate abbreviation. The default value is
|
yading@10
|
15408 \&\*(L"25\*(R".
|
yading@10
|
15409 .IP "\fBsar\fR" 4
|
yading@10
|
15410 .IX Item "sar"
|
yading@10
|
15411 Set the sample aspect ratio of the sourced video.
|
yading@10
|
15412 .IP "\fBduration, d\fR" 4
|
yading@10
|
15413 .IX Item "duration, d"
|
yading@10
|
15414 Set the video duration of the sourced video. The accepted syntax is:
|
yading@10
|
15415 .Sp
|
yading@10
|
15416 .Vb 2
|
yading@10
|
15417 \& [\-]HH[:MM[:SS[.m...]]]
|
yading@10
|
15418 \& [\-]S+[.m...]
|
yading@10
|
15419 .Ve
|
yading@10
|
15420 .Sp
|
yading@10
|
15421 See also the function \f(CW\*(C`av_parse_time()\*(C'\fR.
|
yading@10
|
15422 .Sp
|
yading@10
|
15423 If not specified, or the expressed duration is negative, the video is
|
yading@10
|
15424 supposed to be generated forever.
|
yading@10
|
15425 .IP "\fBdecimals, n\fR" 4
|
yading@10
|
15426 .IX Item "decimals, n"
|
yading@10
|
15427 Set the number of decimals to show in the timestamp, only used in the
|
yading@10
|
15428 \&\f(CW\*(C`testsrc\*(C'\fR source.
|
yading@10
|
15429 .Sp
|
yading@10
|
15430 The displayed timestamp value will correspond to the original
|
yading@10
|
15431 timestamp value multiplied by the power of 10 of the specified
|
yading@10
|
15432 value. Default value is 0.
|
yading@10
|
15433 .PP
|
yading@10
|
15434 For example the following:
|
yading@10
|
15435 .PP
|
yading@10
|
15436 .Vb 1
|
yading@10
|
15437 \& testsrc=duration=5.3:size=qcif:rate=10
|
yading@10
|
15438 .Ve
|
yading@10
|
15439 .PP
|
yading@10
|
15440 will generate a video with a duration of 5.3 seconds, with size
|
yading@10
|
15441 176x144 and a frame rate of 10 frames per second.
|
yading@10
|
15442 .PP
|
yading@10
|
15443 The following graph description will generate a red source
|
yading@10
|
15444 with an opacity of 0.2, with size \*(L"qcif\*(R" and a frame rate of 10
|
yading@10
|
15445 frames per second.
|
yading@10
|
15446 .PP
|
yading@10
|
15447 .Vb 1
|
yading@10
|
15448 \& color=c=red@0.2:s=qcif:r=10
|
yading@10
|
15449 .Ve
|
yading@10
|
15450 .PP
|
yading@10
|
15451 If the input content is to be ignored, \f(CW\*(C`nullsrc\*(C'\fR can be used. The
|
yading@10
|
15452 following command generates noise in the luminance plane by employing
|
yading@10
|
15453 the \f(CW\*(C`geq\*(C'\fR filter:
|
yading@10
|
15454 .PP
|
yading@10
|
15455 .Vb 1
|
yading@10
|
15456 \& nullsrc=s=256x256, geq=random(1)*255:128:128
|
yading@10
|
15457 .Ve
|
yading@10
|
15458 .SH "VIDEO SINKS"
|
yading@10
|
15459 .IX Header "VIDEO SINKS"
|
yading@10
|
15460 Below is a description of the currently available video sinks.
|
yading@10
|
15461 .SS "buffersink"
|
yading@10
|
15462 .IX Subsection "buffersink"
|
yading@10
|
15463 Buffer video frames, and make them available to the end of the filter
|
yading@10
|
15464 graph.
|
yading@10
|
15465 .PP
|
yading@10
|
15466 This sink is mainly intended for a programmatic use, in particular
|
yading@10
|
15467 through the interface defined in \fIlibavfilter/buffersink.h\fR
|
yading@10
|
15468 or the options system.
|
yading@10
|
15469 .PP
|
yading@10
|
15470 It accepts a pointer to an AVBufferSinkContext structure, which
|
yading@10
|
15471 defines the incoming buffers' formats, to be passed as the opaque
|
yading@10
|
15472 parameter to \f(CW\*(C`avfilter_init_filter\*(C'\fR for initialization.
|
yading@10
|
15473 .SS "nullsink"
|
yading@10
|
15474 .IX Subsection "nullsink"
|
yading@10
|
15475 Null video sink, do absolutely nothing with the input video. It is
|
yading@10
|
15476 mainly useful as a template and to be employed in analysis / debugging
|
yading@10
|
15477 tools.
|
yading@10
|
15478 .SH "MULTIMEDIA FILTERS"
|
yading@10
|
15479 .IX Header "MULTIMEDIA FILTERS"
|
yading@10
|
15480 Below is a description of the currently available multimedia filters.
|
yading@10
|
15481 .SS "aperms, perms"
|
yading@10
|
15482 .IX Subsection "aperms, perms"
|
yading@10
|
15483 Set read/write permissions for the output frames.
|
yading@10
|
15484 .PP
|
yading@10
|
15485 These filters are mainly aimed at developers to test direct path in the
|
yading@10
|
15486 following filter in the filtergraph.
|
yading@10
|
15487 .PP
|
yading@10
|
15488 The filters accept the following options:
|
yading@10
|
15489 .IP "\fBmode\fR" 4
|
yading@10
|
15490 .IX Item "mode"
|
yading@10
|
15491 Select the permissions mode.
|
yading@10
|
15492 .Sp
|
yading@10
|
15493 It accepts the following values:
|
yading@10
|
15494 .RS 4
|
yading@10
|
15495 .IP "\fBnone\fR" 4
|
yading@10
|
15496 .IX Item "none"
|
yading@10
|
15497 Do nothing. This is the default.
|
yading@10
|
15498 .IP "\fBro\fR" 4
|
yading@10
|
15499 .IX Item "ro"
|
yading@10
|
15500 Set all the output frames read-only.
|
yading@10
|
15501 .IP "\fBrw\fR" 4
|
yading@10
|
15502 .IX Item "rw"
|
yading@10
|
15503 Set all the output frames directly writable.
|
yading@10
|
15504 .IP "\fBtoggle\fR" 4
|
yading@10
|
15505 .IX Item "toggle"
|
yading@10
|
15506 Make the frame read-only if writable, and writable if read-only.
|
yading@10
|
15507 .IP "\fBrandom\fR" 4
|
yading@10
|
15508 .IX Item "random"
|
yading@10
|
15509 Set each output frame read-only or writable randomly.
|
yading@10
|
15510 .RE
|
yading@10
|
15511 .RS 4
|
yading@10
|
15512 .RE
|
yading@10
|
15513 .IP "\fBseed\fR" 4
|
yading@10
|
15514 .IX Item "seed"
|
yading@10
|
15515 Set the seed for the \fIrandom\fR mode, must be an integer included between
|
yading@10
|
15516 \&\f(CW0\fR and \f(CW\*(C`UINT32_MAX\*(C'\fR. If not specified, or if explicitly set to
|
yading@10
|
15517 \&\f(CW\*(C`\-1\*(C'\fR, the filter will try to use a good random seed on a best effort
|
yading@10
|
15518 basis.
|
yading@10
|
15519 .PP
|
yading@10
|
15520 Note: in case of auto-inserted filter between the permission filter and the
|
yading@10
|
15521 following one, the permission might not be received as expected in that
|
yading@10
|
15522 following filter. Inserting a format or aformat filter before the
|
yading@10
|
15523 perms/aperms filter can avoid this problem.
|
yading@10
|
15524 .SS "aselect, select"
|
yading@10
|
15525 .IX Subsection "aselect, select"
|
yading@10
|
15526 Select frames to pass in output.
|
yading@10
|
15527 .PP
|
yading@10
|
15528 This filter accepts the following options:
|
yading@10
|
15529 .IP "\fBexpr, e\fR" 4
|
yading@10
|
15530 .IX Item "expr, e"
|
yading@10
|
15531 Set expression, which is evaluated for each input frame.
|
yading@10
|
15532 .Sp
|
yading@10
|
15533 If the expression is evaluated to zero, the frame is discarded.
|
yading@10
|
15534 .Sp
|
yading@10
|
15535 If the evaluation result is negative or NaN, the frame is sent to the
|
yading@10
|
15536 first output; otherwise it is sent to the output with index
|
yading@10
|
15537 \&\f(CW\*(C`ceil(val)\-1\*(C'\fR, assuming that the input index starts from 0.
|
yading@10
|
15538 .Sp
|
yading@10
|
15539 For example a value of \f(CW1.2\fR corresponds to the output with index
|
yading@10
|
15540 \&\f(CW\*(C`ceil(1.2)\-1 = 2\-1 = 1\*(C'\fR, that is the second output.
|
yading@10
|
15541 .IP "\fBoutputs, n\fR" 4
|
yading@10
|
15542 .IX Item "outputs, n"
|
yading@10
|
15543 Set the number of outputs. The output to which to send the selected
|
yading@10
|
15544 frame is based on the result of the evaluation. Default value is 1.
|
yading@10
|
15545 .PP
|
yading@10
|
15546 The expression can contain the following constants:
|
yading@10
|
15547 .IP "\fBn\fR" 4
|
yading@10
|
15548 .IX Item "n"
|
yading@10
|
15549 the sequential number of the filtered frame, starting from 0
|
yading@10
|
15550 .IP "\fBselected_n\fR" 4
|
yading@10
|
15551 .IX Item "selected_n"
|
yading@10
|
15552 the sequential number of the selected frame, starting from 0
|
yading@10
|
15553 .IP "\fBprev_selected_n\fR" 4
|
yading@10
|
15554 .IX Item "prev_selected_n"
|
yading@10
|
15555 the sequential number of the last selected frame, \s-1NAN\s0 if undefined
|
yading@10
|
15556 .IP "\fB\s-1TB\s0\fR" 4
|
yading@10
|
15557 .IX Item "TB"
|
yading@10
|
15558 timebase of the input timestamps
|
yading@10
|
15559 .IP "\fBpts\fR" 4
|
yading@10
|
15560 .IX Item "pts"
|
yading@10
|
15561 the \s-1PTS\s0 (Presentation TimeStamp) of the filtered video frame,
|
yading@10
|
15562 expressed in \fI\s-1TB\s0\fR units, \s-1NAN\s0 if undefined
|
yading@10
|
15563 .IP "\fBt\fR" 4
|
yading@10
|
15564 .IX Item "t"
|
yading@10
|
15565 the \s-1PTS\s0 (Presentation TimeStamp) of the filtered video frame,
|
yading@10
|
15566 expressed in seconds, \s-1NAN\s0 if undefined
|
yading@10
|
15567 .IP "\fBprev_pts\fR" 4
|
yading@10
|
15568 .IX Item "prev_pts"
|
yading@10
|
15569 the \s-1PTS\s0 of the previously filtered video frame, \s-1NAN\s0 if undefined
|
yading@10
|
15570 .IP "\fBprev_selected_pts\fR" 4
|
yading@10
|
15571 .IX Item "prev_selected_pts"
|
yading@10
|
15572 the \s-1PTS\s0 of the last previously filtered video frame, \s-1NAN\s0 if undefined
|
yading@10
|
15573 .IP "\fBprev_selected_t\fR" 4
|
yading@10
|
15574 .IX Item "prev_selected_t"
|
yading@10
|
15575 the \s-1PTS\s0 of the last previously selected video frame, \s-1NAN\s0 if undefined
|
yading@10
|
15576 .IP "\fBstart_pts\fR" 4
|
yading@10
|
15577 .IX Item "start_pts"
|
yading@10
|
15578 the \s-1PTS\s0 of the first video frame in the video, \s-1NAN\s0 if undefined
|
yading@10
|
15579 .IP "\fBstart_t\fR" 4
|
yading@10
|
15580 .IX Item "start_t"
|
yading@10
|
15581 the time of the first video frame in the video, \s-1NAN\s0 if undefined
|
yading@10
|
15582 .IP "\fBpict_type\fR \fI(video only)\fR" 4
|
yading@10
|
15583 .IX Item "pict_type (video only)"
|
yading@10
|
15584 the type of the filtered frame, can assume one of the following
|
yading@10
|
15585 values:
|
yading@10
|
15586 .RS 4
|
yading@10
|
15587 .IP "\fBI\fR" 4
|
yading@10
|
15588 .IX Item "I"
|
yading@10
|
15589 .PD 0
|
yading@10
|
15590 .IP "\fBP\fR" 4
|
yading@10
|
15591 .IX Item "P"
|
yading@10
|
15592 .IP "\fBB\fR" 4
|
yading@10
|
15593 .IX Item "B"
|
yading@10
|
15594 .IP "\fBS\fR" 4
|
yading@10
|
15595 .IX Item "S"
|
yading@10
|
15596 .IP "\fB\s-1SI\s0\fR" 4
|
yading@10
|
15597 .IX Item "SI"
|
yading@10
|
15598 .IP "\fB\s-1SP\s0\fR" 4
|
yading@10
|
15599 .IX Item "SP"
|
yading@10
|
15600 .IP "\fB\s-1BI\s0\fR" 4
|
yading@10
|
15601 .IX Item "BI"
|
yading@10
|
15602 .RE
|
yading@10
|
15603 .RS 4
|
yading@10
|
15604 .RE
|
yading@10
|
15605 .IP "\fBinterlace_type\fR \fI(video only)\fR" 4
|
yading@10
|
15606 .IX Item "interlace_type (video only)"
|
yading@10
|
15607 .PD
|
yading@10
|
15608 the frame interlace type, can assume one of the following values:
|
yading@10
|
15609 .RS 4
|
yading@10
|
15610 .IP "\fB\s-1PROGRESSIVE\s0\fR" 4
|
yading@10
|
15611 .IX Item "PROGRESSIVE"
|
yading@10
|
15612 the frame is progressive (not interlaced)
|
yading@10
|
15613 .IP "\fB\s-1TOPFIRST\s0\fR" 4
|
yading@10
|
15614 .IX Item "TOPFIRST"
|
yading@10
|
15615 the frame is top-field-first
|
yading@10
|
15616 .IP "\fB\s-1BOTTOMFIRST\s0\fR" 4
|
yading@10
|
15617 .IX Item "BOTTOMFIRST"
|
yading@10
|
15618 the frame is bottom-field-first
|
yading@10
|
15619 .RE
|
yading@10
|
15620 .RS 4
|
yading@10
|
15621 .RE
|
yading@10
|
15622 .IP "\fBconsumed_sample_n\fR \fI(audio only)\fR" 4
|
yading@10
|
15623 .IX Item "consumed_sample_n (audio only)"
|
yading@10
|
15624 the number of selected samples before the current frame
|
yading@10
|
15625 .IP "\fBsamples_n\fR \fI(audio only)\fR" 4
|
yading@10
|
15626 .IX Item "samples_n (audio only)"
|
yading@10
|
15627 the number of samples in the current frame
|
yading@10
|
15628 .IP "\fBsample_rate\fR \fI(audio only)\fR" 4
|
yading@10
|
15629 .IX Item "sample_rate (audio only)"
|
yading@10
|
15630 the input sample rate
|
yading@10
|
15631 .IP "\fBkey\fR" 4
|
yading@10
|
15632 .IX Item "key"
|
yading@10
|
15633 1 if the filtered frame is a key-frame, 0 otherwise
|
yading@10
|
15634 .IP "\fBpos\fR" 4
|
yading@10
|
15635 .IX Item "pos"
|
yading@10
|
15636 the position in the file of the filtered frame, \-1 if the information
|
yading@10
|
15637 is not available (e.g. for synthetic video)
|
yading@10
|
15638 .IP "\fBscene\fR \fI(video only)\fR" 4
|
yading@10
|
15639 .IX Item "scene (video only)"
|
yading@10
|
15640 value between 0 and 1 to indicate a new scene; a low value reflects a low
|
yading@10
|
15641 probability for the current frame to introduce a new scene, while a higher
|
yading@10
|
15642 value means the current frame is more likely to be one (see the example below)
|
yading@10
|
15643 .PP
|
yading@10
|
15644 The default value of the select expression is \*(L"1\*(R".
|
yading@10
|
15645 .PP
|
yading@10
|
15646 \fIExamples\fR
|
yading@10
|
15647 .IX Subsection "Examples"
|
yading@10
|
15648 .IP "\(bu" 4
|
yading@10
|
15649 Select all frames in input:
|
yading@10
|
15650 .Sp
|
yading@10
|
15651 .Vb 1
|
yading@10
|
15652 \& select
|
yading@10
|
15653 .Ve
|
yading@10
|
15654 .Sp
|
yading@10
|
15655 The example above is the same as:
|
yading@10
|
15656 .Sp
|
yading@10
|
15657 .Vb 1
|
yading@10
|
15658 \& select=1
|
yading@10
|
15659 .Ve
|
yading@10
|
15660 .IP "\(bu" 4
|
yading@10
|
15661 Skip all frames:
|
yading@10
|
15662 .Sp
|
yading@10
|
15663 .Vb 1
|
yading@10
|
15664 \& select=0
|
yading@10
|
15665 .Ve
|
yading@10
|
15666 .IP "\(bu" 4
|
yading@10
|
15667 Select only I\-frames:
|
yading@10
|
15668 .Sp
|
yading@10
|
15669 .Vb 1
|
yading@10
|
15670 \& select=\*(Aqeq(pict_type\e,I)\*(Aq
|
yading@10
|
15671 .Ve
|
yading@10
|
15672 .IP "\(bu" 4
|
yading@10
|
15673 Select one frame every 100:
|
yading@10
|
15674 .Sp
|
yading@10
|
15675 .Vb 1
|
yading@10
|
15676 \& select=\*(Aqnot(mod(n\e,100))\*(Aq
|
yading@10
|
15677 .Ve
|
yading@10
|
15678 .IP "\(bu" 4
|
yading@10
|
15679 Select only frames contained in the 10\-20 time interval:
|
yading@10
|
15680 .Sp
|
yading@10
|
15681 .Vb 1
|
yading@10
|
15682 \& select=\*(Aqgte(t\e,10)*lte(t\e,20)\*(Aq
|
yading@10
|
15683 .Ve
|
yading@10
|
15684 .IP "\(bu" 4
|
yading@10
|
15685 Select only I frames contained in the 10\-20 time interval:
|
yading@10
|
15686 .Sp
|
yading@10
|
15687 .Vb 1
|
yading@10
|
15688 \& select=\*(Aqgte(t\e,10)*lte(t\e,20)*eq(pict_type\e,I)\*(Aq
|
yading@10
|
15689 .Ve
|
yading@10
|
15690 .IP "\(bu" 4
|
yading@10
|
15691 Select frames with a minimum distance of 10 seconds:
|
yading@10
|
15692 .Sp
|
yading@10
|
15693 .Vb 1
|
yading@10
|
15694 \& select=\*(Aqisnan(prev_selected_t)+gte(t\-prev_selected_t\e,10)\*(Aq
|
yading@10
|
15695 .Ve
|
yading@10
|
15696 .IP "\(bu" 4
|
yading@10
|
15697 Use aselect to select only audio frames with samples number > 100:
|
yading@10
|
15698 .Sp
|
yading@10
|
15699 .Vb 1
|
yading@10
|
15700 \& aselect=\*(Aqgt(samples_n\e,100)\*(Aq
|
yading@10
|
15701 .Ve
|
yading@10
|
15702 .IP "\(bu" 4
|
yading@10
|
15703 Create a mosaic of the first scenes:
|
yading@10
|
15704 .Sp
|
yading@10
|
15705 .Vb 1
|
yading@10
|
15706 \& ffmpeg \-i video.avi \-vf select=\*(Aqgt(scene\e,0.4)\*(Aq,scale=160:120,tile \-frames:v 1 preview.png
|
yading@10
|
15707 .Ve
|
yading@10
|
15708 .Sp
|
yading@10
|
15709 Comparing \fIscene\fR against a value between 0.3 and 0.5 is generally a sane
|
yading@10
|
15710 choice.
|
yading@10
|
15711 .IP "\(bu" 4
|
yading@10
|
15712 Send even and odd frames to separate outputs, and compose them:
|
yading@10
|
15713 .Sp
|
yading@10
|
15714 .Vb 1
|
yading@10
|
15715 \& select=n=2:e=\*(Aqmod(n, 2)+1\*(Aq [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
|
yading@10
|
15716 .Ve
|
yading@10
|
15717 .SS "asendcmd, sendcmd"
|
yading@10
|
15718 .IX Subsection "asendcmd, sendcmd"
|
yading@10
|
15719 Send commands to filters in the filtergraph.
|
yading@10
|
15720 .PP
|
yading@10
|
15721 These filters read commands to be sent to other filters in the
|
yading@10
|
15722 filtergraph.
|
yading@10
|
15723 .PP
|
yading@10
|
15724 \&\f(CW\*(C`asendcmd\*(C'\fR must be inserted between two audio filters,
|
yading@10
|
15725 \&\f(CW\*(C`sendcmd\*(C'\fR must be inserted between two video filters, but apart
|
yading@10
|
15726 from that they act the same way.
|
yading@10
|
15727 .PP
|
yading@10
|
15728 The specification of commands can be provided in the filter arguments
|
yading@10
|
15729 with the \fIcommands\fR option, or in a file specified by the
|
yading@10
|
15730 \&\fIfilename\fR option.
|
yading@10
|
15731 .PP
|
yading@10
|
15732 These filters accept the following options:
|
yading@10
|
15733 .IP "\fBcommands, c\fR" 4
|
yading@10
|
15734 .IX Item "commands, c"
|
yading@10
|
15735 Set the commands to be read and sent to the other filters.
|
yading@10
|
15736 .IP "\fBfilename, f\fR" 4
|
yading@10
|
15737 .IX Item "filename, f"
|
yading@10
|
15738 Set the filename of the commands to be read and sent to the other
|
yading@10
|
15739 filters.
|
yading@10
|
15740 .PP
|
yading@10
|
15741 \fICommands syntax\fR
|
yading@10
|
15742 .IX Subsection "Commands syntax"
|
yading@10
|
15743 .PP
|
yading@10
|
15744 A commands description consists of a sequence of interval
|
yading@10
|
15745 specifications, comprising a list of commands to be executed when a
|
yading@10
|
15746 particular event related to that interval occurs. The occurring event
|
yading@10
|
15747 is typically the current frame time entering or leaving a given time
|
yading@10
|
15748 interval.
|
yading@10
|
15749 .PP
|
yading@10
|
15750 An interval is specified by the following syntax:
|
yading@10
|
15751 .PP
|
yading@10
|
15752 .Vb 1
|
yading@10
|
15753 \& <START>[\-<END>] <COMMANDS>;
|
yading@10
|
15754 .Ve
|
yading@10
|
15755 .PP
|
yading@10
|
15756 The time interval is specified by the \fI\s-1START\s0\fR and \fI\s-1END\s0\fR times.
|
yading@10
|
15757 \&\fI\s-1END\s0\fR is optional and defaults to the maximum time.
|
yading@10
|
15758 .PP
|
yading@10
|
15759 The current frame time is considered within the specified interval if
|
yading@10
|
15760 it is included in the interval [\fI\s-1START\s0\fR, \fI\s-1END\s0\fR), that is when
|
yading@10
|
15761 the time is greater or equal to \fI\s-1START\s0\fR and is lesser than
|
yading@10
|
15762 \&\fI\s-1END\s0\fR.
|
yading@10
|
15763 .PP
|
yading@10
|
15764 \&\fI\s-1COMMANDS\s0\fR consists of a sequence of one or more command
|
yading@10
|
15765 specifications, separated by \*(L",\*(R", relating to that interval. The
|
yading@10
|
15766 syntax of a command specification is given by:
|
yading@10
|
15767 .PP
|
yading@10
|
15768 .Vb 1
|
yading@10
|
15769 \& [<FLAGS>] <TARGET> <COMMAND> <ARG>
|
yading@10
|
15770 .Ve
|
yading@10
|
15771 .PP
|
yading@10
|
15772 \&\fI\s-1FLAGS\s0\fR is optional and specifies the type of events relating to
|
yading@10
|
15773 the time interval which enable sending the specified command, and must
|
yading@10
|
15774 be a non-null sequence of identifier flags separated by \*(L"+\*(R" or \*(L"|\*(R" and
|
yading@10
|
15775 enclosed between \*(L"[\*(R" and \*(L"]\*(R".
|
yading@10
|
15776 .PP
|
yading@10
|
15777 The following flags are recognized:
|
yading@10
|
15778 .IP "\fBenter\fR" 4
|
yading@10
|
15779 .IX Item "enter"
|
yading@10
|
15780 The command is sent when the current frame timestamp enters the
|
yading@10
|
15781 specified interval. In other words, the command is sent when the
|
yading@10
|
15782 previous frame timestamp was not in the given interval, and the
|
yading@10
|
15783 current is.
|
yading@10
|
15784 .IP "\fBleave\fR" 4
|
yading@10
|
15785 .IX Item "leave"
|
yading@10
|
15786 The command is sent when the current frame timestamp leaves the
|
yading@10
|
15787 specified interval. In other words, the command is sent when the
|
yading@10
|
15788 previous frame timestamp was in the given interval, and the
|
yading@10
|
15789 current is not.
|
yading@10
|
15790 .PP
|
yading@10
|
15791 If \fI\s-1FLAGS\s0\fR is not specified, a default value of \f(CW\*(C`[enter]\*(C'\fR is
|
yading@10
|
15792 assumed.
|
yading@10
|
15793 .PP
|
yading@10
|
15794 \&\fI\s-1TARGET\s0\fR specifies the target of the command, usually the name of
|
yading@10
|
15795 the filter class or a specific filter instance name.
|
yading@10
|
15796 .PP
|
yading@10
|
15797 \&\fI\s-1COMMAND\s0\fR specifies the name of the command for the target filter.
|
yading@10
|
15798 .PP
|
yading@10
|
15799 \&\fI\s-1ARG\s0\fR is optional and specifies the optional list of argument for
|
yading@10
|
15800 the given \fI\s-1COMMAND\s0\fR.
|
yading@10
|
15801 .PP
|
yading@10
|
15802 Between one interval specification and another, whitespaces, or
|
yading@10
|
15803 sequences of characters starting with \f(CW\*(C`#\*(C'\fR until the end of line,
|
yading@10
|
15804 are ignored and can be used to annotate comments.
|
yading@10
|
15805 .PP
|
yading@10
|
15806 A simplified \s-1BNF\s0 description of the commands specification syntax
|
yading@10
|
15807 follows:
|
yading@10
|
15808 .PP
|
yading@10
|
15809 .Vb 6
|
yading@10
|
15810 \& <COMMAND_FLAG> ::= "enter" | "leave"
|
yading@10
|
15811 \& <COMMAND_FLAGS> ::= <COMMAND_FLAG> [(+|"|")<COMMAND_FLAG>]
|
yading@10
|
15812 \& <COMMAND> ::= ["[" <COMMAND_FLAGS> "]"] <TARGET> <COMMAND> [<ARG>]
|
yading@10
|
15813 \& <COMMANDS> ::= <COMMAND> [,<COMMANDS>]
|
yading@10
|
15814 \& <INTERVAL> ::= <START>[\-<END>] <COMMANDS>
|
yading@10
|
15815 \& <INTERVALS> ::= <INTERVAL>[;<INTERVALS>]
|
yading@10
|
15816 .Ve
|
yading@10
|
15817 .PP
|
yading@10
|
15818 \fIExamples\fR
|
yading@10
|
15819 .IX Subsection "Examples"
|
yading@10
|
15820 .IP "\(bu" 4
|
yading@10
|
15821 Specify audio tempo change at second 4:
|
yading@10
|
15822 .Sp
|
yading@10
|
15823 .Vb 1
|
yading@10
|
15824 \& asendcmd=c=\*(Aq4.0 atempo tempo 1.5\*(Aq,atempo
|
yading@10
|
15825 .Ve
|
yading@10
|
15826 .IP "\(bu" 4
|
yading@10
|
15827 Specify a list of drawtext and hue commands in a file.
|
yading@10
|
15828 .Sp
|
yading@10
|
15829 .Vb 3
|
yading@10
|
15830 \& # show text in the interval 5\-10
|
yading@10
|
15831 \& 5.0\-10.0 [enter] drawtext reinit \*(Aqfontfile=FreeSerif.ttf:text=hello world\*(Aq,
|
yading@10
|
15832 \& [leave] drawtext reinit \*(Aqfontfile=FreeSerif.ttf:text=\*(Aq;
|
yading@10
|
15833 \&
|
yading@10
|
15834 \& # desaturate the image in the interval 15\-20
|
yading@10
|
15835 \& 15.0\-20.0 [enter] hue s 0,
|
yading@10
|
15836 \& [enter] drawtext reinit \*(Aqfontfile=FreeSerif.ttf:text=nocolor\*(Aq,
|
yading@10
|
15837 \& [leave] hue s 1,
|
yading@10
|
15838 \& [leave] drawtext reinit \*(Aqfontfile=FreeSerif.ttf:text=color\*(Aq;
|
yading@10
|
15839 \&
|
yading@10
|
15840 \& # apply an exponential saturation fade\-out effect, starting from time 25
|
yading@10
|
15841 \& 25 [enter] hue s exp(25\-t)
|
yading@10
|
15842 .Ve
|
yading@10
|
15843 .Sp
|
yading@10
|
15844 A filtergraph allowing to read and process the above command list
|
yading@10
|
15845 stored in a file \fItest.cmd\fR, can be specified with:
|
yading@10
|
15846 .Sp
|
yading@10
|
15847 .Vb 1
|
yading@10
|
15848 \& sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text=\*(Aq\*(Aq,hue
|
yading@10
|
15849 .Ve
|
yading@10
|
15850 .SS "asetpts, setpts"
|
yading@10
|
15851 .IX Subsection "asetpts, setpts"
|
yading@10
|
15852 Change the \s-1PTS\s0 (presentation timestamp) of the input frames.
|
yading@10
|
15853 .PP
|
yading@10
|
15854 \&\f(CW\*(C`asetpts\*(C'\fR works on audio frames, \f(CW\*(C`setpts\*(C'\fR on video frames.
|
yading@10
|
15855 .PP
|
yading@10
|
15856 This filter accepts the following options:
|
yading@10
|
15857 .IP "\fBexpr\fR" 4
|
yading@10
|
15858 .IX Item "expr"
|
yading@10
|
15859 The expression which is evaluated for each frame to construct its timestamp.
|
yading@10
|
15860 .PP
|
yading@10
|
15861 The expression is evaluated through the eval \s-1API\s0 and can contain the following
|
yading@10
|
15862 constants:
|
yading@10
|
15863 .IP "\fB\s-1FRAME_RATE\s0\fR" 4
|
yading@10
|
15864 .IX Item "FRAME_RATE"
|
yading@10
|
15865 frame rate, only defined for constant frame-rate video
|
yading@10
|
15866 .IP "\fB\s-1PTS\s0\fR" 4
|
yading@10
|
15867 .IX Item "PTS"
|
yading@10
|
15868 the presentation timestamp in input
|
yading@10
|
15869 .IP "\fBN\fR" 4
|
yading@10
|
15870 .IX Item "N"
|
yading@10
|
15871 the count of the input frame, starting from 0.
|
yading@10
|
15872 .IP "\fB\s-1NB_CONSUMED_SAMPLES\s0\fR" 4
|
yading@10
|
15873 .IX Item "NB_CONSUMED_SAMPLES"
|
yading@10
|
15874 the number of consumed samples, not including the current frame (only
|
yading@10
|
15875 audio)
|
yading@10
|
15876 .IP "\fB\s-1NB_SAMPLES\s0\fR" 4
|
yading@10
|
15877 .IX Item "NB_SAMPLES"
|
yading@10
|
15878 the number of samples in the current frame (only audio)
|
yading@10
|
15879 .IP "\fB\s-1SAMPLE_RATE\s0\fR" 4
|
yading@10
|
15880 .IX Item "SAMPLE_RATE"
|
yading@10
|
15881 audio sample rate
|
yading@10
|
15882 .IP "\fB\s-1STARTPTS\s0\fR" 4
|
yading@10
|
15883 .IX Item "STARTPTS"
|
yading@10
|
15884 the \s-1PTS\s0 of the first frame
|
yading@10
|
15885 .IP "\fB\s-1STARTT\s0\fR" 4
|
yading@10
|
15886 .IX Item "STARTT"
|
yading@10
|
15887 the time in seconds of the first frame
|
yading@10
|
15888 .IP "\fB\s-1INTERLACED\s0\fR" 4
|
yading@10
|
15889 .IX Item "INTERLACED"
|
yading@10
|
15890 tell if the current frame is interlaced
|
yading@10
|
15891 .IP "\fBT\fR" 4
|
yading@10
|
15892 .IX Item "T"
|
yading@10
|
15893 the time in seconds of the current frame
|
yading@10
|
15894 .IP "\fB\s-1TB\s0\fR" 4
|
yading@10
|
15895 .IX Item "TB"
|
yading@10
|
15896 the time base
|
yading@10
|
15897 .IP "\fB\s-1POS\s0\fR" 4
|
yading@10
|
15898 .IX Item "POS"
|
yading@10
|
15899 original position in the file of the frame, or undefined if undefined
|
yading@10
|
15900 for the current frame
|
yading@10
|
15901 .IP "\fB\s-1PREV_INPTS\s0\fR" 4
|
yading@10
|
15902 .IX Item "PREV_INPTS"
|
yading@10
|
15903 previous input \s-1PTS\s0
|
yading@10
|
15904 .IP "\fB\s-1PREV_INT\s0\fR" 4
|
yading@10
|
15905 .IX Item "PREV_INT"
|
yading@10
|
15906 previous input time in seconds
|
yading@10
|
15907 .IP "\fB\s-1PREV_OUTPTS\s0\fR" 4
|
yading@10
|
15908 .IX Item "PREV_OUTPTS"
|
yading@10
|
15909 previous output \s-1PTS\s0
|
yading@10
|
15910 .IP "\fB\s-1PREV_OUTT\s0\fR" 4
|
yading@10
|
15911 .IX Item "PREV_OUTT"
|
yading@10
|
15912 previous output time in seconds
|
yading@10
|
15913 .IP "\fB\s-1RTCTIME\s0\fR" 4
|
yading@10
|
15914 .IX Item "RTCTIME"
|
yading@10
|
15915 wallclock (\s-1RTC\s0) time in microseconds. This is deprecated, use \fItime\fR\|(0)
|
yading@10
|
15916 instead.
|
yading@10
|
15917 .IP "\fB\s-1RTCSTART\s0\fR" 4
|
yading@10
|
15918 .IX Item "RTCSTART"
|
yading@10
|
15919 wallclock (\s-1RTC\s0) time at the start of the movie in microseconds
|
yading@10
|
15920 .PP
|
yading@10
|
15921 \fIExamples\fR
|
yading@10
|
15922 .IX Subsection "Examples"
|
yading@10
|
15923 .IP "\(bu" 4
|
yading@10
|
15924 Start counting \s-1PTS\s0 from zero
|
yading@10
|
15925 .Sp
|
yading@10
|
15926 .Vb 1
|
yading@10
|
15927 \& setpts=PTS\-STARTPTS
|
yading@10
|
15928 .Ve
|
yading@10
|
15929 .IP "\(bu" 4
|
yading@10
|
15930 Apply fast motion effect:
|
yading@10
|
15931 .Sp
|
yading@10
|
15932 .Vb 1
|
yading@10
|
15933 \& setpts=0.5*PTS
|
yading@10
|
15934 .Ve
|
yading@10
|
15935 .IP "\(bu" 4
|
yading@10
|
15936 Apply slow motion effect:
|
yading@10
|
15937 .Sp
|
yading@10
|
15938 .Vb 1
|
yading@10
|
15939 \& setpts=2.0*PTS
|
yading@10
|
15940 .Ve
|
yading@10
|
15941 .IP "\(bu" 4
|
yading@10
|
15942 Set fixed rate of 25 frames per second:
|
yading@10
|
15943 .Sp
|
yading@10
|
15944 .Vb 1
|
yading@10
|
15945 \& setpts=N/(25*TB)
|
yading@10
|
15946 .Ve
|
yading@10
|
15947 .IP "\(bu" 4
|
yading@10
|
15948 Set fixed rate 25 fps with some jitter:
|
yading@10
|
15949 .Sp
|
yading@10
|
15950 .Vb 1
|
yading@10
|
15951 \& setpts=\*(Aq1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))\*(Aq
|
yading@10
|
15952 .Ve
|
yading@10
|
15953 .IP "\(bu" 4
|
yading@10
|
15954 Apply an offset of 10 seconds to the input \s-1PTS:\s0
|
yading@10
|
15955 .Sp
|
yading@10
|
15956 .Vb 1
|
yading@10
|
15957 \& setpts=PTS+10/TB
|
yading@10
|
15958 .Ve
|
yading@10
|
15959 .IP "\(bu" 4
|
yading@10
|
15960 Generate timestamps from a \*(L"live source\*(R" and rebase onto the current timebase:
|
yading@10
|
15961 .Sp
|
yading@10
|
15962 .Vb 1
|
yading@10
|
15963 \& setpts=\*(Aq(RTCTIME \- RTCSTART) / (TB * 1000000)\*(Aq
|
yading@10
|
15964 .Ve
|
yading@10
|
15965 .SS "ebur128"
|
yading@10
|
15966 .IX Subsection "ebur128"
|
yading@10
|
15967 \&\s-1EBU\s0 R128 scanner filter. This filter takes an audio stream as input and outputs
|
yading@10
|
15968 it unchanged. By default, it logs a message at a frequency of 10Hz with the
|
yading@10
|
15969 Momentary loudness (identified by \f(CW\*(C`M\*(C'\fR), Short-term loudness (\f(CW\*(C`S\*(C'\fR),
|
yading@10
|
15970 Integrated loudness (\f(CW\*(C`I\*(C'\fR) and Loudness Range (\f(CW\*(C`LRA\*(C'\fR).
|
yading@10
|
15971 .PP
|
yading@10
|
15972 The filter also has a video output (see the \fIvideo\fR option) with a real
|
yading@10
|
15973 time graph to observe the loudness evolution. The graphic contains the logged
|
yading@10
|
15974 message mentioned above, so it is not printed anymore when this option is set,
|
yading@10
|
15975 unless the verbose logging is set. The main graphing area contains the
|
yading@10
|
15976 short-term loudness (3 seconds of analysis), and the gauge on the right is for
|
yading@10
|
15977 the momentary loudness (400 milliseconds).
|
yading@10
|
15978 .PP
|
yading@10
|
15979 More information about the Loudness Recommendation \s-1EBU\s0 R128 on
|
yading@10
|
15980 <\fBhttp://tech.ebu.ch/loudness\fR>.
|
yading@10
|
15981 .PP
|
yading@10
|
15982 The filter accepts the following options:
|
yading@10
|
15983 .IP "\fBvideo\fR" 4
|
yading@10
|
15984 .IX Item "video"
|
yading@10
|
15985 Activate the video output. The audio stream is passed unchanged whether this
|
yading@10
|
15986 option is set or no. The video stream will be the first output stream if
|
yading@10
|
15987 activated. Default is \f(CW0\fR.
|
yading@10
|
15988 .IP "\fBsize\fR" 4
|
yading@10
|
15989 .IX Item "size"
|
yading@10
|
15990 Set the video size. This option is for video only. Default and minimum
|
yading@10
|
15991 resolution is \f(CW\*(C`640x480\*(C'\fR.
|
yading@10
|
15992 .IP "\fBmeter\fR" 4
|
yading@10
|
15993 .IX Item "meter"
|
yading@10
|
15994 Set the \s-1EBU\s0 scale meter. Default is \f(CW9\fR. Common values are \f(CW9\fR and
|
yading@10
|
15995 \&\f(CW18\fR, respectively for \s-1EBU\s0 scale meter +9 and \s-1EBU\s0 scale meter +18. Any
|
yading@10
|
15996 other integer value between this range is allowed.
|
yading@10
|
15997 .IP "\fBmetadata\fR" 4
|
yading@10
|
15998 .IX Item "metadata"
|
yading@10
|
15999 Set metadata injection. If set to \f(CW1\fR, the audio input will be segmented
|
yading@10
|
16000 into 100ms output frames, each of them containing various loudness information
|
yading@10
|
16001 in metadata. All the metadata keys are prefixed with \f(CW\*(C`lavfi.r128.\*(C'\fR.
|
yading@10
|
16002 .Sp
|
yading@10
|
16003 Default is \f(CW0\fR.
|
yading@10
|
16004 .IP "\fBframelog\fR" 4
|
yading@10
|
16005 .IX Item "framelog"
|
yading@10
|
16006 Force the frame logging level.
|
yading@10
|
16007 .Sp
|
yading@10
|
16008 Available values are:
|
yading@10
|
16009 .RS 4
|
yading@10
|
16010 .IP "\fBinfo\fR" 4
|
yading@10
|
16011 .IX Item "info"
|
yading@10
|
16012 information logging level
|
yading@10
|
16013 .IP "\fBverbose\fR" 4
|
yading@10
|
16014 .IX Item "verbose"
|
yading@10
|
16015 verbose logging level
|
yading@10
|
16016 .RE
|
yading@10
|
16017 .RS 4
|
yading@10
|
16018 .Sp
|
yading@10
|
16019 By default, the logging level is set to \fIinfo\fR. If the \fBvideo\fR or
|
yading@10
|
16020 the \fBmetadata\fR options are set, it switches to \fIverbose\fR.
|
yading@10
|
16021 .RE
|
yading@10
|
16022 .PP
|
yading@10
|
16023 \fIExamples\fR
|
yading@10
|
16024 .IX Subsection "Examples"
|
yading@10
|
16025 .IP "\(bu" 4
|
yading@10
|
16026 Real-time graph using \fBffplay\fR, with a \s-1EBU\s0 scale meter +18:
|
yading@10
|
16027 .Sp
|
yading@10
|
16028 .Vb 1
|
yading@10
|
16029 \& ffplay \-f lavfi \-i "amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]"
|
yading@10
|
16030 .Ve
|
yading@10
|
16031 .IP "\(bu" 4
|
yading@10
|
16032 Run an analysis with \fBffmpeg\fR:
|
yading@10
|
16033 .Sp
|
yading@10
|
16034 .Vb 1
|
yading@10
|
16035 \& ffmpeg \-nostats \-i input.mp3 \-filter_complex ebur128 \-f null \-
|
yading@10
|
16036 .Ve
|
yading@10
|
16037 .SS "settb, asettb"
|
yading@10
|
16038 .IX Subsection "settb, asettb"
|
yading@10
|
16039 Set the timebase to use for the output frames timestamps.
|
yading@10
|
16040 It is mainly useful for testing timebase configuration.
|
yading@10
|
16041 .PP
|
yading@10
|
16042 This filter accepts the following options:
|
yading@10
|
16043 .IP "\fBexpr, tb\fR" 4
|
yading@10
|
16044 .IX Item "expr, tb"
|
yading@10
|
16045 The expression which is evaluated into the output timebase.
|
yading@10
|
16046 .PP
|
yading@10
|
16047 The value for \fBtb\fR is an arithmetic expression representing a
|
yading@10
|
16048 rational. The expression can contain the constants \*(L"\s-1AVTB\s0\*(R" (the default
|
yading@10
|
16049 timebase), \*(L"intb\*(R" (the input timebase) and \*(L"sr\*(R" (the sample rate,
|
yading@10
|
16050 audio only). Default value is \*(L"intb\*(R".
|
yading@10
|
16051 .PP
|
yading@10
|
16052 \fIExamples\fR
|
yading@10
|
16053 .IX Subsection "Examples"
|
yading@10
|
16054 .IP "\(bu" 4
|
yading@10
|
16055 Set the timebase to 1/25:
|
yading@10
|
16056 .Sp
|
yading@10
|
16057 .Vb 1
|
yading@10
|
16058 \& settb=expr=1/25
|
yading@10
|
16059 .Ve
|
yading@10
|
16060 .IP "\(bu" 4
|
yading@10
|
16061 Set the timebase to 1/10:
|
yading@10
|
16062 .Sp
|
yading@10
|
16063 .Vb 1
|
yading@10
|
16064 \& settb=expr=0.1
|
yading@10
|
16065 .Ve
|
yading@10
|
16066 .IP "\(bu" 4
|
yading@10
|
16067 Set the timebase to 1001/1000:
|
yading@10
|
16068 .Sp
|
yading@10
|
16069 .Vb 1
|
yading@10
|
16070 \& settb=1+0.001
|
yading@10
|
16071 .Ve
|
yading@10
|
16072 .IP "\(bu" 4
|
yading@10
|
16073 Set the timebase to 2*intb:
|
yading@10
|
16074 .Sp
|
yading@10
|
16075 .Vb 1
|
yading@10
|
16076 \& settb=2*intb
|
yading@10
|
16077 .Ve
|
yading@10
|
16078 .IP "\(bu" 4
|
yading@10
|
16079 Set the default timebase value:
|
yading@10
|
16080 .Sp
|
yading@10
|
16081 .Vb 1
|
yading@10
|
16082 \& settb=AVTB
|
yading@10
|
16083 .Ve
|
yading@10
|
16084 .SS "concat"
|
yading@10
|
16085 .IX Subsection "concat"
|
yading@10
|
16086 Concatenate audio and video streams, joining them together one after the
|
yading@10
|
16087 other.
|
yading@10
|
16088 .PP
|
yading@10
|
16089 The filter works on segments of synchronized video and audio streams. All
|
yading@10
|
16090 segments must have the same number of streams of each type, and that will
|
yading@10
|
16091 also be the number of streams at output.
|
yading@10
|
16092 .PP
|
yading@10
|
16093 The filter accepts the following options:
|
yading@10
|
16094 .IP "\fBn\fR" 4
|
yading@10
|
16095 .IX Item "n"
|
yading@10
|
16096 Set the number of segments. Default is 2.
|
yading@10
|
16097 .IP "\fBv\fR" 4
|
yading@10
|
16098 .IX Item "v"
|
yading@10
|
16099 Set the number of output video streams, that is also the number of video
|
yading@10
|
16100 streams in each segment. Default is 1.
|
yading@10
|
16101 .IP "\fBa\fR" 4
|
yading@10
|
16102 .IX Item "a"
|
yading@10
|
16103 Set the number of output audio streams, that is also the number of video
|
yading@10
|
16104 streams in each segment. Default is 0.
|
yading@10
|
16105 .IP "\fBunsafe\fR" 4
|
yading@10
|
16106 .IX Item "unsafe"
|
yading@10
|
16107 Activate unsafe mode: do not fail if segments have a different format.
|
yading@10
|
16108 .PP
|
yading@10
|
16109 The filter has \fIv\fR+\fIa\fR outputs: first \fIv\fR video outputs, then
|
yading@10
|
16110 \&\fIa\fR audio outputs.
|
yading@10
|
16111 .PP
|
yading@10
|
16112 There are \fIn\fRx(\fIv\fR+\fIa\fR) inputs: first the inputs for the first
|
yading@10
|
16113 segment, in the same order as the outputs, then the inputs for the second
|
yading@10
|
16114 segment, etc.
|
yading@10
|
16115 .PP
|
yading@10
|
16116 Related streams do not always have exactly the same duration, for various
|
yading@10
|
16117 reasons including codec frame size or sloppy authoring. For that reason,
|
yading@10
|
16118 related synchronized streams (e.g. a video and its audio track) should be
|
yading@10
|
16119 concatenated at once. The concat filter will use the duration of the longest
|
yading@10
|
16120 stream in each segment (except the last one), and if necessary pad shorter
|
yading@10
|
16121 audio streams with silence.
|
yading@10
|
16122 .PP
|
yading@10
|
16123 For this filter to work correctly, all segments must start at timestamp 0.
|
yading@10
|
16124 .PP
|
yading@10
|
16125 All corresponding streams must have the same parameters in all segments; the
|
yading@10
|
16126 filtering system will automatically select a common pixel format for video
|
yading@10
|
16127 streams, and a common sample format, sample rate and channel layout for
|
yading@10
|
16128 audio streams, but other settings, such as resolution, must be converted
|
yading@10
|
16129 explicitly by the user.
|
yading@10
|
16130 .PP
|
yading@10
|
16131 Different frame rates are acceptable but will result in variable frame rate
|
yading@10
|
16132 at output; be sure to configure the output file to handle it.
|
yading@10
|
16133 .PP
|
yading@10
|
16134 \fIExamples\fR
|
yading@10
|
16135 .IX Subsection "Examples"
|
yading@10
|
16136 .IP "\(bu" 4
|
yading@10
|
16137 Concatenate an opening, an episode and an ending, all in bilingual version
|
yading@10
|
16138 (video in stream 0, audio in streams 1 and 2):
|
yading@10
|
16139 .Sp
|
yading@10
|
16140 .Vb 4
|
yading@10
|
16141 \& ffmpeg \-i opening.mkv \-i episode.mkv \-i ending.mkv \-filter_complex \e
|
yading@10
|
16142 \& \*(Aq[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
|
yading@10
|
16143 \& concat=n=3:v=1:a=2 [v] [a1] [a2]\*(Aq \e
|
yading@10
|
16144 \& \-map \*(Aq[v]\*(Aq \-map \*(Aq[a1]\*(Aq \-map \*(Aq[a2]\*(Aq output.mkv
|
yading@10
|
16145 .Ve
|
yading@10
|
16146 .IP "\(bu" 4
|
yading@10
|
16147 Concatenate two parts, handling audio and video separately, using the
|
yading@10
|
16148 (a)movie sources, and adjusting the resolution:
|
yading@10
|
16149 .Sp
|
yading@10
|
16150 .Vb 3
|
yading@10
|
16151 \& movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
|
yading@10
|
16152 \& movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
|
yading@10
|
16153 \& [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
|
yading@10
|
16154 .Ve
|
yading@10
|
16155 .Sp
|
yading@10
|
16156 Note that a desync will happen at the stitch if the audio and video streams
|
yading@10
|
16157 do not have exactly the same duration in the first file.
|
yading@10
|
16158 .SS "showspectrum"
|
yading@10
|
16159 .IX Subsection "showspectrum"
|
yading@10
|
16160 Convert input audio to a video output, representing the audio frequency
|
yading@10
|
16161 spectrum.
|
yading@10
|
16162 .PP
|
yading@10
|
16163 The filter accepts the following options:
|
yading@10
|
16164 .IP "\fBsize, s\fR" 4
|
yading@10
|
16165 .IX Item "size, s"
|
yading@10
|
16166 Specify the video size for the output. Default value is \f(CW\*(C`640x512\*(C'\fR.
|
yading@10
|
16167 .IP "\fBslide\fR" 4
|
yading@10
|
16168 .IX Item "slide"
|
yading@10
|
16169 Specify if the spectrum should slide along the window. Default value is
|
yading@10
|
16170 \&\f(CW0\fR.
|
yading@10
|
16171 .IP "\fBmode\fR" 4
|
yading@10
|
16172 .IX Item "mode"
|
yading@10
|
16173 Specify display mode.
|
yading@10
|
16174 .Sp
|
yading@10
|
16175 It accepts the following values:
|
yading@10
|
16176 .RS 4
|
yading@10
|
16177 .IP "\fBcombined\fR" 4
|
yading@10
|
16178 .IX Item "combined"
|
yading@10
|
16179 all channels are displayed in the same row
|
yading@10
|
16180 .IP "\fBseparate\fR" 4
|
yading@10
|
16181 .IX Item "separate"
|
yading@10
|
16182 all channels are displayed in separate rows
|
yading@10
|
16183 .RE
|
yading@10
|
16184 .RS 4
|
yading@10
|
16185 .Sp
|
yading@10
|
16186 Default value is \fBcombined\fR.
|
yading@10
|
16187 .RE
|
yading@10
|
16188 .IP "\fBcolor\fR" 4
|
yading@10
|
16189 .IX Item "color"
|
yading@10
|
16190 Specify display color mode.
|
yading@10
|
16191 .Sp
|
yading@10
|
16192 It accepts the following values:
|
yading@10
|
16193 .RS 4
|
yading@10
|
16194 .IP "\fBchannel\fR" 4
|
yading@10
|
16195 .IX Item "channel"
|
yading@10
|
16196 each channel is displayed in a separate color
|
yading@10
|
16197 .IP "\fBintensity\fR" 4
|
yading@10
|
16198 .IX Item "intensity"
|
yading@10
|
16199 each channel is is displayed using the same color scheme
|
yading@10
|
16200 .RE
|
yading@10
|
16201 .RS 4
|
yading@10
|
16202 .Sp
|
yading@10
|
16203 Default value is \fBchannel\fR.
|
yading@10
|
16204 .RE
|
yading@10
|
16205 .IP "\fBscale\fR" 4
|
yading@10
|
16206 .IX Item "scale"
|
yading@10
|
16207 Specify scale used for calculating intensity color values.
|
yading@10
|
16208 .Sp
|
yading@10
|
16209 It accepts the following values:
|
yading@10
|
16210 .RS 4
|
yading@10
|
16211 .IP "\fBlin\fR" 4
|
yading@10
|
16212 .IX Item "lin"
|
yading@10
|
16213 linear
|
yading@10
|
16214 .IP "\fBsqrt\fR" 4
|
yading@10
|
16215 .IX Item "sqrt"
|
yading@10
|
16216 square root, default
|
yading@10
|
16217 .IP "\fBcbrt\fR" 4
|
yading@10
|
16218 .IX Item "cbrt"
|
yading@10
|
16219 cubic root
|
yading@10
|
16220 .IP "\fBlog\fR" 4
|
yading@10
|
16221 .IX Item "log"
|
yading@10
|
16222 logarithmic
|
yading@10
|
16223 .RE
|
yading@10
|
16224 .RS 4
|
yading@10
|
16225 .Sp
|
yading@10
|
16226 Default value is \fBsqrt\fR.
|
yading@10
|
16227 .RE
|
yading@10
|
16228 .IP "\fBsaturation\fR" 4
|
yading@10
|
16229 .IX Item "saturation"
|
yading@10
|
16230 Set saturation modifier for displayed colors. Negative values provide
|
yading@10
|
16231 alternative color scheme. \f(CW0\fR is no saturation at all.
|
yading@10
|
16232 Saturation must be in [\-10.0, 10.0] range.
|
yading@10
|
16233 Default value is \f(CW1\fR.
|
yading@10
|
16234 .PP
|
yading@10
|
16235 The usage is very similar to the showwaves filter; see the examples in that
|
yading@10
|
16236 section.
|
yading@10
|
16237 .PP
|
yading@10
|
16238 \fIExamples\fR
|
yading@10
|
16239 .IX Subsection "Examples"
|
yading@10
|
16240 .IP "\(bu" 4
|
yading@10
|
16241 Large window with logarithmic color scaling:
|
yading@10
|
16242 .Sp
|
yading@10
|
16243 .Vb 1
|
yading@10
|
16244 \& showspectrum=s=1280x480:scale=log
|
yading@10
|
16245 .Ve
|
yading@10
|
16246 .IP "\(bu" 4
|
yading@10
|
16247 Complete example for a colored and sliding spectrum per channel using \fBffplay\fR:
|
yading@10
|
16248 .Sp
|
yading@10
|
16249 .Vb 2
|
yading@10
|
16250 \& ffplay \-f lavfi \*(Aqamovie=input.mp3, asplit [a][out1];
|
yading@10
|
16251 \& [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]\*(Aq
|
yading@10
|
16252 .Ve
|
yading@10
|
16253 .SS "showwaves"
|
yading@10
|
16254 .IX Subsection "showwaves"
|
yading@10
|
16255 Convert input audio to a video output, representing the samples waves.
|
yading@10
|
16256 .PP
|
yading@10
|
16257 The filter accepts the following options:
|
yading@10
|
16258 .IP "\fBsize, s\fR" 4
|
yading@10
|
16259 .IX Item "size, s"
|
yading@10
|
16260 Specify the video size for the output. Default value is \*(L"600x240\*(R".
|
yading@10
|
16261 .IP "\fBmode\fR" 4
|
yading@10
|
16262 .IX Item "mode"
|
yading@10
|
16263 Set display mode.
|
yading@10
|
16264 .Sp
|
yading@10
|
16265 Available values are:
|
yading@10
|
16266 .RS 4
|
yading@10
|
16267 .IP "\fBpoint\fR" 4
|
yading@10
|
16268 .IX Item "point"
|
yading@10
|
16269 Draw a point for each sample.
|
yading@10
|
16270 .IP "\fBline\fR" 4
|
yading@10
|
16271 .IX Item "line"
|
yading@10
|
16272 Draw a vertical line for each sample.
|
yading@10
|
16273 .RE
|
yading@10
|
16274 .RS 4
|
yading@10
|
16275 .Sp
|
yading@10
|
16276 Default value is \f(CW\*(C`point\*(C'\fR.
|
yading@10
|
16277 .RE
|
yading@10
|
16278 .IP "\fBn\fR" 4
|
yading@10
|
16279 .IX Item "n"
|
yading@10
|
16280 Set the number of samples which are printed on the same column. A
|
yading@10
|
16281 larger value will decrease the frame rate. Must be a positive
|
yading@10
|
16282 integer. This option can be set only if the value for \fIrate\fR
|
yading@10
|
16283 is not explicitly specified.
|
yading@10
|
16284 .IP "\fBrate, r\fR" 4
|
yading@10
|
16285 .IX Item "rate, r"
|
yading@10
|
16286 Set the (approximate) output frame rate. This is done by setting the
|
yading@10
|
16287 option \fIn\fR. Default value is \*(L"25\*(R".
|
yading@10
|
16288 .PP
|
yading@10
|
16289 \fIExamples\fR
|
yading@10
|
16290 .IX Subsection "Examples"
|
yading@10
|
16291 .IP "\(bu" 4
|
yading@10
|
16292 Output the input file audio and the corresponding video representation
|
yading@10
|
16293 at the same time:
|
yading@10
|
16294 .Sp
|
yading@10
|
16295 .Vb 1
|
yading@10
|
16296 \& amovie=a.mp3,asplit[out0],showwaves[out1]
|
yading@10
|
16297 .Ve
|
yading@10
|
16298 .IP "\(bu" 4
|
yading@10
|
16299 Create a synthetic signal and show it with showwaves, forcing a
|
yading@10
|
16300 frame rate of 30 frames per second:
|
yading@10
|
16301 .Sp
|
yading@10
|
16302 .Vb 1
|
yading@10
|
16303 \& aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
|
yading@10
|
16304 .Ve
|
yading@10
|
16305 .SS "split, asplit"
|
yading@10
|
16306 .IX Subsection "split, asplit"
|
yading@10
|
16307 Split input into several identical outputs.
|
yading@10
|
16308 .PP
|
yading@10
|
16309 \&\f(CW\*(C`asplit\*(C'\fR works with audio input, \f(CW\*(C`split\*(C'\fR with video.
|
yading@10
|
16310 .PP
|
yading@10
|
16311 The filter accepts a single parameter which specifies the number of outputs. If
|
yading@10
|
16312 unspecified, it defaults to 2.
|
yading@10
|
16313 .PP
|
yading@10
|
16314 \fIExamples\fR
|
yading@10
|
16315 .IX Subsection "Examples"
|
yading@10
|
16316 .IP "\(bu" 4
|
yading@10
|
16317 Create two separate outputs from the same input:
|
yading@10
|
16318 .Sp
|
yading@10
|
16319 .Vb 1
|
yading@10
|
16320 \& [in] split [out0][out1]
|
yading@10
|
16321 .Ve
|
yading@10
|
16322 .IP "\(bu" 4
|
yading@10
|
16323 To create 3 or more outputs, you need to specify the number of
|
yading@10
|
16324 outputs, like in:
|
yading@10
|
16325 .Sp
|
yading@10
|
16326 .Vb 1
|
yading@10
|
16327 \& [in] asplit=3 [out0][out1][out2]
|
yading@10
|
16328 .Ve
|
yading@10
|
16329 .IP "\(bu" 4
|
yading@10
|
16330 Create two separate outputs from the same input, one cropped and
|
yading@10
|
16331 one padded:
|
yading@10
|
16332 .Sp
|
yading@10
|
16333 .Vb 3
|
yading@10
|
16334 \& [in] split [splitout1][splitout2];
|
yading@10
|
16335 \& [splitout1] crop=100:100:0:0 [cropout];
|
yading@10
|
16336 \& [splitout2] pad=200:200:100:100 [padout];
|
yading@10
|
16337 .Ve
|
yading@10
|
16338 .IP "\(bu" 4
|
yading@10
|
16339 Create 5 copies of the input audio with \fBffmpeg\fR:
|
yading@10
|
16340 .Sp
|
yading@10
|
16341 .Vb 1
|
yading@10
|
16342 \& ffmpeg \-i INPUT \-filter_complex asplit=5 OUTPUT
|
yading@10
|
16343 .Ve
|
yading@10
|
16344 .SH "MULTIMEDIA SOURCES"
|
yading@10
|
16345 .IX Header "MULTIMEDIA SOURCES"
|
yading@10
|
16346 Below is a description of the currently available multimedia sources.
|
yading@10
|
16347 .SS "amovie"
|
yading@10
|
16348 .IX Subsection "amovie"
|
yading@10
|
16349 This is the same as movie source, except it selects an audio
|
yading@10
|
16350 stream by default.
|
yading@10
|
16351 .SS "movie"
|
yading@10
|
16352 .IX Subsection "movie"
|
yading@10
|
16353 Read audio and/or video stream(s) from a movie container.
|
yading@10
|
16354 .PP
|
yading@10
|
16355 This filter accepts the following options:
|
yading@10
|
16356 .IP "\fBfilename\fR" 4
|
yading@10
|
16357 .IX Item "filename"
|
yading@10
|
16358 The name of the resource to read (not necessarily a file but also a device or a
|
yading@10
|
16359 stream accessed through some protocol).
|
yading@10
|
16360 .IP "\fBformat_name, f\fR" 4
|
yading@10
|
16361 .IX Item "format_name, f"
|
yading@10
|
16362 Specifies the format assumed for the movie to read, and can be either
|
yading@10
|
16363 the name of a container or an input device. If not specified the
|
yading@10
|
16364 format is guessed from \fImovie_name\fR or by probing.
|
yading@10
|
16365 .IP "\fBseek_point, sp\fR" 4
|
yading@10
|
16366 .IX Item "seek_point, sp"
|
yading@10
|
16367 Specifies the seek point in seconds, the frames will be output
|
yading@10
|
16368 starting from this seek point, the parameter is evaluated with
|
yading@10
|
16369 \&\f(CW\*(C`av_strtod\*(C'\fR so the numerical value may be suffixed by an \s-1IS\s0
|
yading@10
|
16370 postfix. Default value is \*(L"0\*(R".
|
yading@10
|
16371 .IP "\fBstreams, s\fR" 4
|
yading@10
|
16372 .IX Item "streams, s"
|
yading@10
|
16373 Specifies the streams to read. Several streams can be specified,
|
yading@10
|
16374 separated by \*(L"+\*(R". The source will then have as many outputs, in the
|
yading@10
|
16375 same order. The syntax is explained in the ``Stream specifiers''
|
yading@10
|
16376 section in the ffmpeg manual. Two special names, \*(L"dv\*(R" and \*(L"da\*(R" specify
|
yading@10
|
16377 respectively the default (best suited) video and audio stream. Default
|
yading@10
|
16378 is \*(L"dv\*(R", or \*(L"da\*(R" if the filter is called as \*(L"amovie\*(R".
|
yading@10
|
16379 .IP "\fBstream_index, si\fR" 4
|
yading@10
|
16380 .IX Item "stream_index, si"
|
yading@10
|
16381 Specifies the index of the video stream to read. If the value is \-1,
|
yading@10
|
16382 the best suited video stream will be automatically selected. Default
|
yading@10
|
16383 value is \*(L"\-1\*(R". Deprecated. If the filter is called \*(L"amovie\*(R", it will select
|
yading@10
|
16384 audio instead of video.
|
yading@10
|
16385 .IP "\fBloop\fR" 4
|
yading@10
|
16386 .IX Item "loop"
|
yading@10
|
16387 Specifies how many times to read the stream in sequence.
|
yading@10
|
16388 If the value is less than 1, the stream will be read again and again.
|
yading@10
|
16389 Default value is \*(L"1\*(R".
|
yading@10
|
16390 .Sp
|
yading@10
|
16391 Note that when the movie is looped the source timestamps are not
|
yading@10
|
16392 changed, so it will generate non monotonically increasing timestamps.
|
yading@10
|
16393 .PP
|
yading@10
|
16394 This filter allows to overlay a second video on top of main input of
|
yading@10
|
16395 a filtergraph as shown in this graph:
|
yading@10
|
16396 .PP
|
yading@10
|
16397 .Vb 4
|
yading@10
|
16398 \& input \-\-\-\-\-\-\-\-\-\-\-> deltapts0 \-\-> overlay \-\-> output
|
yading@10
|
16399 \& ^
|
yading@10
|
16400 \& |
|
yading@10
|
16401 \& movie \-\-> scale\-\-> deltapts1 \-\-\-\-\-\-\-+
|
yading@10
|
16402 .Ve
|
yading@10
|
16403 .PP
|
yading@10
|
16404 \fIExamples\fR
|
yading@10
|
16405 .IX Subsection "Examples"
|
yading@10
|
16406 .IP "\(bu" 4
|
yading@10
|
16407 Skip 3.2 seconds from the start of the avi file in.avi, and overlay it
|
yading@10
|
16408 on top of the input labelled as \*(L"in\*(R":
|
yading@10
|
16409 .Sp
|
yading@10
|
16410 .Vb 3
|
yading@10
|
16411 \& movie=in.avi:seek_point=3.2, scale=180:\-1, setpts=PTS\-STARTPTS [over];
|
yading@10
|
16412 \& [in] setpts=PTS\-STARTPTS [main];
|
yading@10
|
16413 \& [main][over] overlay=16:16 [out]
|
yading@10
|
16414 .Ve
|
yading@10
|
16415 .IP "\(bu" 4
|
yading@10
|
16416 Read from a video4linux2 device, and overlay it on top of the input
|
yading@10
|
16417 labelled as \*(L"in\*(R":
|
yading@10
|
16418 .Sp
|
yading@10
|
16419 .Vb 3
|
yading@10
|
16420 \& movie=/dev/video0:f=video4linux2, scale=180:\-1, setpts=PTS\-STARTPTS [over];
|
yading@10
|
16421 \& [in] setpts=PTS\-STARTPTS [main];
|
yading@10
|
16422 \& [main][over] overlay=16:16 [out]
|
yading@10
|
16423 .Ve
|
yading@10
|
16424 .IP "\(bu" 4
|
yading@10
|
16425 Read the first video stream and the audio stream with id 0x81 from
|
yading@10
|
16426 dvd.vob; the video is connected to the pad named \*(L"video\*(R" and the audio is
|
yading@10
|
16427 connected to the pad named \*(L"audio\*(R":
|
yading@10
|
16428 .Sp
|
yading@10
|
16429 .Vb 1
|
yading@10
|
16430 \& movie=dvd.vob:s=v:0+#0x81 [video] [audio]
|
yading@10
|
16431 .Ve
|
yading@10
|
16432 .SH "SEE ALSO"
|
yading@10
|
16433 .IX Header "SEE ALSO"
|
yading@10
|
16434 \&\fIffmpeg\fR\|(1),
|
yading@10
|
16435 \&\fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1),
|
yading@10
|
16436 \&\fIffmpeg\-utils\fR\|(1), \fIffmpeg\-scaler\fR\|(1), \fIffmpeg\-resampler\fR\|(1),
|
yading@10
|
16437 \&\fIffmpeg\-codecs\fR\|(1), \fIffmpeg\-bitstream\-filters\fR\|(1), \fIffmpeg\-formats\fR\|(1),
|
yading@10
|
16438 \&\fIffmpeg\-devices\fR\|(1), \fIffmpeg\-protocols\fR\|(1), \fIffmpeg\-filters\fR\|(1)
|
yading@10
|
16439 .SH "AUTHORS"
|
yading@10
|
16440 .IX Header "AUTHORS"
|
yading@10
|
16441 The FFmpeg developers.
|
yading@10
|
16442 .PP
|
yading@10
|
16443 For details about the authorship, see the Git history of the project
|
yading@10
|
16444 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
|
yading@10
|
16445 \&\fBgit log\fR in the FFmpeg source directory, or browsing the
|
yading@10
|
16446 online repository at <\fBhttp://source.ffmpeg.org\fR>.
|
yading@10
|
16447 .PP
|
yading@10
|
16448 Maintainers for the specific components are listed in the file
|
yading@10
|
16449 \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.
|