yading@10: .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) yading@10: .\" yading@10: .\" Standard preamble: yading@10: .\" ======================================================================== yading@10: .de Sp \" Vertical space (when we can't use .PP) yading@10: .if t .sp .5v yading@10: .if n .sp yading@10: .. yading@10: .de Vb \" Begin verbatim text yading@10: .ft CW yading@10: .nf yading@10: .ne \\$1 yading@10: .. yading@10: .de Ve \" End verbatim text yading@10: .ft R yading@10: .fi yading@10: .. yading@10: .\" Set up some character translations and predefined strings. \*(-- will yading@10: .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left yading@10: .\" double quote, and \*(R" will give a right double quote. \*(C+ will yading@10: .\" give a nicer C++. Capital omega is used to do unbreakable dashes and yading@10: .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, yading@10: .\" nothing in troff, for use with C<>. yading@10: .tr \(*W- yading@10: .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' yading@10: .ie n \{\ yading@10: . ds -- \(*W- yading@10: . ds PI pi yading@10: . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch yading@10: . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch yading@10: . ds L" "" yading@10: . ds R" "" yading@10: . ds C` "" yading@10: . ds C' "" yading@10: 'br\} yading@10: .el\{\ yading@10: . ds -- \|\(em\| yading@10: . ds PI \(*p yading@10: . ds L" `` yading@10: . ds R" '' yading@10: 'br\} yading@10: .\" yading@10: .\" Escape single quotes in literal strings from groff's Unicode transform. yading@10: .ie \n(.g .ds Aq \(aq yading@10: .el .ds Aq ' yading@10: .\" yading@10: .\" If the F register is turned on, we'll generate index entries on stderr for yading@10: .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index yading@10: .\" entries marked with X<> in POD. Of course, you'll have to process the yading@10: .\" output yourself in some meaningful fashion. yading@10: .ie \nF \{\ yading@10: . de IX yading@10: . tm Index:\\$1\t\\n%\t"\\$2" yading@10: .. yading@10: . nr % 0 yading@10: . rr F yading@10: .\} yading@10: .el \{\ yading@10: . de IX yading@10: .. yading@10: .\} yading@10: .\" yading@10: .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). yading@10: .\" Fear. Run. Save yourself. No user-serviceable parts. yading@10: . \" fudge factors for nroff and troff yading@10: .if n \{\ yading@10: . ds #H 0 yading@10: . ds #V .8m yading@10: . ds #F .3m yading@10: . ds #[ \f1 yading@10: . ds #] \fP yading@10: .\} yading@10: .if t \{\ yading@10: . ds #H ((1u-(\\\\n(.fu%2u))*.13m) yading@10: . ds #V .6m yading@10: . ds #F 0 yading@10: . ds #[ \& yading@10: . ds #] \& yading@10: .\} yading@10: . \" simple accents for nroff and troff yading@10: .if n \{\ yading@10: . ds ' \& yading@10: . ds ` \& yading@10: . ds ^ \& yading@10: . ds , \& yading@10: . ds ~ ~ yading@10: . ds / yading@10: .\} yading@10: .if t \{\ yading@10: . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" yading@10: . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' yading@10: . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' yading@10: . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' yading@10: . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' yading@10: . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' yading@10: .\} yading@10: . \" troff and (daisy-wheel) nroff accents yading@10: .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' yading@10: .ds 8 \h'\*(#H'\(*b\h'-\*(#H' yading@10: .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] yading@10: .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' yading@10: .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' yading@10: .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] yading@10: .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] yading@10: .ds ae a\h'-(\w'a'u*4/10)'e yading@10: .ds Ae A\h'-(\w'A'u*4/10)'E yading@10: . \" corrections for vroff yading@10: .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' yading@10: .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' yading@10: . \" for low resolution devices (crt and lpr) yading@10: .if \n(.H>23 .if \n(.V>19 \ yading@10: \{\ yading@10: . ds : e yading@10: . ds 8 ss yading@10: . ds o a yading@10: . ds d- d\h'-1'\(ga yading@10: . ds D- D\h'-1'\(hy yading@10: . ds th \o'bp' yading@10: . ds Th \o'LP' yading@10: . ds ae ae yading@10: . ds Ae AE yading@10: .\} yading@10: .rm #[ #] #H #V #F C yading@10: .\" ======================================================================== yading@10: .\" yading@10: .IX Title "FFMPEG-BITSTREAM-FILTERS 1" yading@10: .TH FFMPEG-BITSTREAM-FILTERS 1 "2013-04-21" " " " " yading@10: .\" For nroff, turn off justification. Always turn off hyphenation; it makes yading@10: .\" way too many mistakes in technical documents. yading@10: .if n .ad l yading@10: .nh yading@10: .SH "NAME" yading@10: ffmpeg\-bitstream\-filters \- FFmpeg bitstream filters yading@10: .SH "DESCRIPTION" yading@10: .IX Header "DESCRIPTION" yading@10: This document describes the bitstream filters provided by the yading@10: libavcodec library. yading@10: .PP yading@10: A bitstream filter operates on the encoded stream data, and performs yading@10: bitstream level modifications without performing decoding. yading@10: .SH "BITSTREAM FILTERS" yading@10: .IX Header "BITSTREAM FILTERS" yading@10: When you configure your FFmpeg build, all the supported bitstream yading@10: filters are enabled by default. You can list all available ones using yading@10: the configure option \f(CW\*(C`\-\-list\-bsfs\*(C'\fR. yading@10: .PP yading@10: You can disable all the bitstream filters using the configure option yading@10: \&\f(CW\*(C`\-\-disable\-bsfs\*(C'\fR, and selectively enable any bitstream filter using yading@10: the option \f(CW\*(C`\-\-enable\-bsf=BSF\*(C'\fR, or you can disable a particular yading@10: bitstream filter using the option \f(CW\*(C`\-\-disable\-bsf=BSF\*(C'\fR. yading@10: .PP yading@10: The option \f(CW\*(C`\-bsfs\*(C'\fR of the ff* tools will display the list of yading@10: all the supported bitstream filters included in your build. yading@10: .PP yading@10: Below is a description of the currently available bitstream filters. yading@10: .SS "aac_adtstoasc" yading@10: .IX Subsection "aac_adtstoasc" yading@10: .SS "chomp" yading@10: .IX Subsection "chomp" yading@10: .SS "dump_extradata" yading@10: .IX Subsection "dump_extradata" yading@10: .SS "h264_mp4toannexb" yading@10: .IX Subsection "h264_mp4toannexb" yading@10: Convert an H.264 bitstream from length prefixed mode to start code yading@10: prefixed mode (as defined in the Annex B of the ITU-T H.264 yading@10: specification). yading@10: .PP yading@10: This is required by some streaming formats, typically the \s-1MPEG\-2\s0 yading@10: transport stream format (\*(L"mpegts\*(R"). yading@10: .PP yading@10: For example to remux an \s-1MP4\s0 file containing an H.264 stream to mpegts yading@10: format with \fBffmpeg\fR, you can use the command: yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i INPUT.mp4 \-codec copy \-bsf:v h264_mp4toannexb OUTPUT.ts yading@10: .Ve yading@10: .SS "imx_dump_header" yading@10: .IX Subsection "imx_dump_header" yading@10: .SS "mjpeg2jpeg" yading@10: .IX Subsection "mjpeg2jpeg" yading@10: Convert \s-1MJPEG/AVI1\s0 packets to full \s-1JPEG/JFIF\s0 packets. yading@10: .PP yading@10: \&\s-1MJPEG\s0 is a video codec wherein each video frame is essentially a yading@10: \&\s-1JPEG\s0 image. The individual frames can be extracted without loss, yading@10: e.g. by yading@10: .PP yading@10: .Vb 1 yading@10: \& ffmpeg \-i ../some_mjpeg.avi \-c:v copy frames_%d.jpg yading@10: .Ve yading@10: .PP yading@10: Unfortunately, these chunks are incomplete \s-1JPEG\s0 images, because yading@10: they lack the \s-1DHT\s0 segment required for decoding. Quoting from yading@10: <\fBhttp://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml\fR>: yading@10: .PP yading@10: Avery Lee, writing in the rec.video.desktop newsgroup in 2001, yading@10: commented that \*(L"\s-1MJPEG\s0, or at least the \s-1MJPEG\s0 in AVIs having the yading@10: \&\s-1MJPG\s0 fourcc, is restricted \s-1JPEG\s0 with a fixed \*(-- and *omitted* \*(-- yading@10: Huffman table. The \s-1JPEG\s0 must be YCbCr colorspace, it must be 4:2:2, yading@10: and it must use basic Huffman encoding, not arithmetic or yading@10: progressive. . . . You can indeed extract the \s-1MJPEG\s0 frames and yading@10: decode them with a regular \s-1JPEG\s0 decoder, but you have to prepend yading@10: the \s-1DHT\s0 segment to them, or else the decoder won't have any idea yading@10: how to decompress the data. The exact table necessary is given in yading@10: the OpenDML spec.\*(R" yading@10: .PP yading@10: This bitstream filter patches the header of frames extracted from an \s-1MJPEG\s0 yading@10: stream (carrying the \s-1AVI1\s0 header \s-1ID\s0 and lacking a \s-1DHT\s0 segment) to yading@10: produce fully qualified \s-1JPEG\s0 images. yading@10: .PP yading@10: .Vb 3 yading@10: \& ffmpeg \-i mjpeg\-movie.avi \-c:v copy \-bsf:v mjpeg2jpeg frame_%d.jpg yading@10: \& exiftran \-i \-9 frame*.jpg yading@10: \& ffmpeg \-i frame_%d.jpg \-c:v copy rotated.avi yading@10: .Ve yading@10: .SS "mjpega_dump_header" yading@10: .IX Subsection "mjpega_dump_header" yading@10: .SS "movsub" yading@10: .IX Subsection "movsub" yading@10: .SS "mp3_header_compress" yading@10: .IX Subsection "mp3_header_compress" yading@10: .SS "mp3_header_decompress" yading@10: .IX Subsection "mp3_header_decompress" yading@10: .SS "noise" yading@10: .IX Subsection "noise" yading@10: .SS "remove_extradata" yading@10: .IX Subsection "remove_extradata" yading@10: .SH "SEE ALSO" yading@10: .IX Header "SEE ALSO" yading@10: \&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavcodec\fR\|(3) yading@10: .SH "AUTHORS" yading@10: .IX Header "AUTHORS" yading@10: The FFmpeg developers. yading@10: .PP yading@10: For details about the authorship, see the Git history of the project yading@10: (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command yading@10: \&\fBgit log\fR in the FFmpeg source directory, or browsing the yading@10: online repository at <\fBhttp://source.ffmpeg.org\fR>. yading@10: .PP yading@10: Maintainers for the specific components are listed in the file yading@10: \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.