Statistics
| Branch: | Revision:

ffmpeg / doc / bitstream_filters.texi @ 393cbb96

History | View | Annotate | Download (2.38 KB)

1 361d2758 Stefano Sabatini
@chapter Bitstream Filters
2
@c man begin BITSTREAM FILTERS
3
4
When you configure your FFmpeg build, all the supported bitstream
5
filters are enabled by default. You can list all available ones using
6
the configure option @code{--list-bsfs}.
7
8
You can disable all the bitstream filters using the configure option
9
@code{--disable-bsfs}, and selectively enable any bitstream filter using
10
the option @code{--enable-bsf=BSF}, or you can disable a particular
11
bitstream filter using the option @code{--disable-bsf=BSF}.
12
13
The option @code{-bsfs} of the ff* tools will display the list of
14
all the supported bitstream filters included in your build.
15
16
Below is a description of the currently available bitstream filters.
17
18
@section aac_adtstoasc
19
20
@section chomp
21
22
@section dump_extradata
23
24
@section h264_mp4toannexb
25
26
@section imx_dump_header
27
28 ba83c4bf Nicolas George
@section mjpeg2jpeg
29
30
Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
31
32
MJPEG is a video codec wherein each video frame is essentially a
33
JPEG image. The individual frames can be extracted without loss,
34
e.g. by
35
36
@example
37
ffmpeg -i ../some_mjpeg.avi -vcodec copy frames_%d.jpg
38
@end example
39
40
Unfortunately, these chunks are incomplete JPEG images, because
41
they lack the DHT segment required for decoding. Quoting from
42
@url{http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml}:
43
44
Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
45
commented that "MJPEG, or at least the MJPEG in AVIs having the
46
MJPG fourcc, is restricted JPEG with a fixed -- and *omitted* --
47
Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
48
and it must use basic Huffman encoding, not arithmetic or
49
progressive. . . . You can indeed extract the MJPEG frames and
50
decode them with a regular JPEG decoder, but you have to prepend
51
the DHT segment to them, or else the decoder won't have any idea
52
how to decompress the data. The exact table necessary is given in
53
the OpenDML spec."
54
55
This bitstream filter patches the header of frames extracted from an MJPEG
56
stream (carrying the AVI1 header ID and lacking a DHT segment) to
57
produce fully qualified JPEG images.
58
59
@example
60
ffmpeg -i mjpeg-movie.avi -vcodec copy -vbsf mjpeg2jpeg frame_%d.jpg
61
exiftran -i -9 frame*.jpg
62
ffmpeg -i frame_%d.jpg -vcodec copy rotated.avi
63
@end example
64
65 361d2758 Stefano Sabatini
@section mjpega_dump_header
66
67
@section movsub
68
69
@section mp3_header_compress
70
71
@section mp3_header_decompress
72
73
@section noise
74
75
@section remove_extradata
76
77
@c man end BITSTREAM FILTERS