Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6147 serge 1
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2
.\"
3
.\" Standard preamble:
4
.\" ========================================================================
5
.de Sh \" Subsection heading
6
.br
7
.if t .Sp
8
.ne 5
9
.PP
10
\fB\\$1\fR
11
.PP
12
..
13
.de Sp \" Vertical space (when we can't use .PP)
14
.if t .sp .5v
15
.if n .sp
16
..
17
.de Vb \" Begin verbatim text
18
.ft CW
19
.nf
20
.ne \\$1
21
..
22
.de Ve \" End verbatim text
23
.ft R
24
.fi
25
..
26
.\" Set up some character translations and predefined strings.  \*(-- will
27
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28
.\" double quote, and \*(R" will give a right double quote.  | will give a
29
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31
.\" expand to `' in nroff, nothing in troff, for use with C<>.
32
.tr \(*W-|\(bv\*(Tr
33
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34
.ie n \{\
35
.    ds -- \(*W-
36
.    ds PI pi
37
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39
.    ds L" ""
40
.    ds R" ""
41
.    ds C` ""
42
.    ds C' ""
43
'br\}
44
.el\{\
45
.    ds -- \|\(em\|
46
.    ds PI \(*p
47
.    ds L" ``
48
.    ds R" ''
49
'br\}
50
.\"
51
.\" If the F register is turned on, we'll generate index entries on stderr for
52
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53
.\" entries marked with X<> in POD.  Of course, you'll have to process the
54
.\" output yourself in some meaningful fashion.
55
.if \nF \{\
56
.    de IX
57
.    tm Index:\\$1\t\\n%\t"\\$2"
58
..
59
.    nr % 0
60
.    rr F
61
.\}
62
.\"
63
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64
.\" way too many mistakes in technical documents.
65
.hy 0
66
.if n .na
67
.\"
68
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70
.    \" fudge factors for nroff and troff
71
.if n \{\
72
.    ds #H 0
73
.    ds #V .8m
74
.    ds #F .3m
75
.    ds #[ \f1
76
.    ds #] \fP
77
.\}
78
.if t \{\
79
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80
.    ds #V .6m
81
.    ds #F 0
82
.    ds #[ \&
83
.    ds #] \&
84
.\}
85
.    \" simple accents for nroff and troff
86
.if n \{\
87
.    ds ' \&
88
.    ds ` \&
89
.    ds ^ \&
90
.    ds , \&
91
.    ds ~ ~
92
.    ds /
93
.\}
94
.if t \{\
95
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101
.\}
102
.    \" troff and (daisy-wheel) nroff accents
103
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110
.ds ae a\h'-(\w'a'u*4/10)'e
111
.ds Ae A\h'-(\w'A'u*4/10)'E
112
.    \" corrections for vroff
113
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115
.    \" for low resolution devices (crt and lpr)
116
.if \n(.H>23 .if \n(.V>19 \
117
\{\
118
.    ds : e
119
.    ds 8 ss
120
.    ds o a
121
.    ds d- d\h'-1'\(ga
122
.    ds D- D\h'-1'\(hy
123
.    ds th \o'bp'
124
.    ds Th \o'LP'
125
.    ds ae ae
126
.    ds Ae AE
127
.\}
128
.rm #[ #] #H #V #F C
129
.\" ========================================================================
130
.\"
131
.IX Title "FFMPEG-BITSTREAM-FILTERS 1"
132
.TH FFMPEG-BITSTREAM-FILTERS 1 " " " " " "
133
.SH "NAME"
134
ffmpeg\-bitstream\-filters \- FFmpeg bitstream filters
135
.SH "DESCRIPTION"
136
.IX Header "DESCRIPTION"
137
This document describes the bitstream filters provided by the
138
libavcodec library.
139
.PP
140
A bitstream filter operates on the encoded stream data, and performs
141
bitstream level modifications without performing decoding.
142
.SH "BITSTREAM FILTERS"
143
.IX Header "BITSTREAM FILTERS"
144
When you configure your FFmpeg build, all the supported bitstream
145
filters are enabled by default. You can list all available ones using
146
the configure option \f(CW\*(C`\-\-list\-bsfs\*(C'\fR.
147
.PP
148
You can disable all the bitstream filters using the configure option
149
\&\f(CW\*(C`\-\-disable\-bsfs\*(C'\fR, and selectively enable any bitstream filter using
150
the option \f(CW\*(C`\-\-enable\-bsf=BSF\*(C'\fR, or you can disable a particular
151
bitstream filter using the option \f(CW\*(C`\-\-disable\-bsf=BSF\*(C'\fR.
152
.PP
153
The option \f(CW\*(C`\-bsfs\*(C'\fR of the ff* tools will display the list of
154
all the supported bitstream filters included in your build.
155
.PP
156
The ff* tools have a \-bsf option applied per stream, taking a
157
comma-separated list of filters, whose parameters follow the filter
158
name after a '='.
159
.PP
160
.Vb 1
161
\&        ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1/opt2=str2][,filter2] OUTPUT
162
.Ve
163
.PP
164
Below is a description of the currently available bitstream filters,
165
with their parameters, if any.
166
.Sh "aac_adtstoasc"
167
.IX Subsection "aac_adtstoasc"
168
Convert \s-1MPEG\-2/4\s0 \s-1AAC\s0 \s-1ADTS\s0 to \s-1MPEG\-4\s0 Audio Specific Configuration
169
bitstream filter.
170
.PP
171
This filter creates an \s-1MPEG\-4\s0 AudioSpecificConfig from an \s-1MPEG\-2/4\s0
172
\&\s-1ADTS\s0 header and removes the \s-1ADTS\s0 header.
173
.PP
174
This is required for example when copying an \s-1AAC\s0 stream from a raw
175
\&\s-1ADTS\s0 \s-1AAC\s0 container to a \s-1FLV\s0 or a \s-1MOV/MP4\s0 file.
176
.Sh "chomp"
177
.IX Subsection "chomp"
178
Remove zero padding at the end of a packet.
179
.Sh "dump_extra"
180
.IX Subsection "dump_extra"
181
Add extradata to the beginning of the filtered packets.
182
.PP
183
The additional argument specifies which packets should be filtered.
184
It accepts the values:
185
.IP "\fBa\fR" 4
186
.IX Item "a"
187
add extradata to all key packets, but only if \fIlocal_header\fR is
188
set in the \fBflags2\fR codec context field
189
.IP "\fBk\fR" 4
190
.IX Item "k"
191
add extradata to all key packets
192
.IP "\fBe\fR" 4
193
.IX Item "e"
194
add extradata to all packets
195
.PP
196
If not specified it is assumed \fBk\fR.
197
.PP
198
For example the following \fBffmpeg\fR command forces a global
199
header (thus disabling individual packet headers) in the H.264 packets
200
generated by the \f(CW\*(C`libx264\*(C'\fR encoder, but corrects them by adding
201
the header stored in extradata to the key packets:
202
.PP
203
.Vb 1
204
\&        ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
205
.Ve
206
.Sh "h264_mp4toannexb"
207
.IX Subsection "h264_mp4toannexb"
208
Convert an H.264 bitstream from length prefixed mode to start code
209
prefixed mode (as defined in the Annex B of the ITU-T H.264
210
specification).
211
.PP
212
This is required by some streaming formats, typically the \s-1MPEG\-2\s0
213
transport stream format (\*(L"mpegts\*(R").
214
.PP
215
For example to remux an \s-1MP4\s0 file containing an H.264 stream to mpegts
216
format with \fBffmpeg\fR, you can use the command:
217
.PP
218
.Vb 1
219
\&        ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
220
.Ve
221
.Sh "imxdump"
222
.IX Subsection "imxdump"
223
Modifies the bitstream to fit in \s-1MOV\s0 and to be usable by the Final Cut
224
Pro decoder. This filter only applies to the mpeg2video codec, and is
225
likely not needed for Final Cut Pro 7 and newer with the appropriate
226
\&\fB\-tag:v\fR.
227
.PP
228
For example, to remux 30 MB/sec \s-1NTSC\s0 \s-1IMX\s0 to \s-1MOV:\s0
229
.PP
230
.Vb 1
231
\&        ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
232
.Ve
233
.Sh "mjpeg2jpeg"
234
.IX Subsection "mjpeg2jpeg"
235
Convert \s-1MJPEG/AVI1\s0 packets to full \s-1JPEG/JFIF\s0 packets.
236
.PP
237
\&\s-1MJPEG\s0 is a video codec wherein each video frame is essentially a
238
\&\s-1JPEG\s0 image. The individual frames can be extracted without loss,
239
e.g. by
240
.PP
241
.Vb 1
242
\&        ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
243
.Ve
244
.PP
245
Unfortunately, these chunks are incomplete \s-1JPEG\s0 images, because
246
they lack the \s-1DHT\s0 segment required for decoding. Quoting from
247
<\fBhttp://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml\fR>:
248
.PP
249
Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
250
commented that \*(L"\s-1MJPEG\s0, or at least the \s-1MJPEG\s0 in AVIs having the
251
\&\s-1MJPG\s0 fourcc, is restricted \s-1JPEG\s0 with a fixed \*(-- and *omitted* \*(--
252
Huffman table. The \s-1JPEG\s0 must be YCbCr colorspace, it must be 4:2:2,
253
and it must use basic Huffman encoding, not arithmetic or
254
progressive. . . . You can indeed extract the \s-1MJPEG\s0 frames and
255
decode them with a regular \s-1JPEG\s0 decoder, but you have to prepend
256
the \s-1DHT\s0 segment to them, or else the decoder won't have any idea
257
how to decompress the data. The exact table necessary is given in
258
the OpenDML spec.\*(R"
259
.PP
260
This bitstream filter patches the header of frames extracted from an \s-1MJPEG\s0
261
stream (carrying the \s-1AVI1\s0 header \s-1ID\s0 and lacking a \s-1DHT\s0 segment) to
262
produce fully qualified \s-1JPEG\s0 images.
263
.PP
264
.Vb 3
265
\&        ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
266
\&        exiftran -i -9 frame*.jpg
267
\&        ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
268
.Ve
269
.Sh "mjpega_dump_header"
270
.IX Subsection "mjpega_dump_header"
271
.Sh "movsub"
272
.IX Subsection "movsub"
273
.Sh "mp3_header_decompress"
274
.IX Subsection "mp3_header_decompress"
275
.Sh "mpeg4_unpack_bframes"
276
.IX Subsection "mpeg4_unpack_bframes"
277
Unpack DivX-style packed B\-frames.
278
.PP
279
DivX-style packed B\-frames are not valid \s-1MPEG\-4\s0 and were only a
280
workaround for the broken Video for Windows subsystem.
281
They use more space, can cause minor \s-1AV\s0 sync issues, require more
282
\&\s-1CPU\s0 power to decode (unless the player has some decoded picture queue
283
to compensate the 2,0,2,0 frame per packet style) and cause
284
trouble if copied into a standard container like mp4 or mpeg\-ps/ts,
285
because \s-1MPEG\-4\s0 decoders may not be able to decode them, since they are
286
not valid \s-1MPEG\-4\s0.
287
.PP
288
For example to fix an \s-1AVI\s0 file containing an \s-1MPEG\-4\s0 stream with
289
DivX-style packed B\-frames using \fBffmpeg\fR, you can use the command:
290
.PP
291
.Vb 1
292
\&        ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
293
.Ve
294
.Sh "noise"
295
.IX Subsection "noise"
296
Damages the contents of packets without damaging the container. Can be
297
used for fuzzing or testing error resilience/concealment.
298
.PP
299
Parameters:
300
A numeral string, whose value is related to how often output bytes will
301
be modified. Therefore, values below or equal to 0 are forbidden, and
302
the lower the more frequent bytes will be modified, with 1 meaning
303
every byte is modified.
304
.PP
305
.Vb 1
306
\&        ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv
307
.Ve
308
.PP
309
applies the modification to every byte.
310
.Sh "remove_extra"
311
.IX Subsection "remove_extra"
312
.SH "SEE ALSO"
313
.IX Header "SEE ALSO"
314
\&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavcodec\fR\|(3)
315
.SH "AUTHORS"
316
.IX Header "AUTHORS"
317
The FFmpeg developers.
318
.PP
319
For details about the authorship, see the Git history of the project
320
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
321
\&\fBgit log\fR in the FFmpeg source directory, or browsing the
322
online repository at <\fBhttp://source.ffmpeg.org\fR>.
323
.PP
324
Maintainers for the specific components are listed in the file
325
\&\fI\s-1MAINTAINERS\s0\fR in the source code tree.