yading@10: =head1 NAME yading@10: yading@10: ffmpeg-bitstream-filters - FFmpeg bitstream filters yading@10: yading@10: =head1 DESCRIPTION yading@10: yading@10: yading@10: This document describes the bitstream filters provided by the yading@10: libavcodec library. yading@10: yading@10: A bitstream filter operates on the encoded stream data, and performs yading@10: bitstream level modifications without performing decoding. yading@10: yading@10: yading@10: yading@10: =head1 BITSTREAM FILTERS yading@10: yading@10: 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 C<--list-bsfs>. yading@10: yading@10: You can disable all the bitstream filters using the configure option yading@10: C<--disable-bsfs>, and selectively enable any bitstream filter using yading@10: the option C<--enable-bsf=BSF>, or you can disable a particular yading@10: bitstream filter using the option C<--disable-bsf=BSF>. yading@10: yading@10: The option C<-bsfs> of the ff* tools will display the list of yading@10: all the supported bitstream filters included in your build. yading@10: yading@10: Below is a description of the currently available bitstream filters. yading@10: yading@10: yading@10: =head2 aac_adtstoasc yading@10: yading@10: yading@10: yading@10: =head2 chomp yading@10: yading@10: yading@10: yading@10: =head2 dump_extradata yading@10: yading@10: yading@10: yading@10: =head2 h264_mp4toannexb yading@10: yading@10: 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: yading@10: This is required by some streaming formats, typically the MPEG-2 yading@10: transport stream format ("mpegts"). yading@10: yading@10: For example to remux an MP4 file containing an H.264 stream to mpegts yading@10: format with B, you can use the command: yading@10: yading@10: yading@10: ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts yading@10: yading@10: yading@10: yading@10: =head2 imx_dump_header yading@10: yading@10: yading@10: yading@10: =head2 mjpeg2jpeg yading@10: yading@10: yading@10: Convert MJPEG/AVI1 packets to full JPEG/JFIF packets. yading@10: yading@10: MJPEG is a video codec wherein each video frame is essentially a yading@10: JPEG image. The individual frames can be extracted without loss, yading@10: e.g. by yading@10: yading@10: yading@10: ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg yading@10: yading@10: yading@10: Unfortunately, these chunks are incomplete JPEG images, because yading@10: they lack the DHT segment required for decoding. Quoting from yading@10: EBE: yading@10: yading@10: Avery Lee, writing in the rec.video.desktop newsgroup in 2001, yading@10: commented that "MJPEG, or at least the MJPEG in AVIs having the yading@10: MJPG fourcc, is restricted JPEG with a fixed -- and *omitted* -- yading@10: Huffman table. The JPEG 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 MJPEG frames and yading@10: decode them with a regular JPEG decoder, but you have to prepend yading@10: the DHT 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." yading@10: yading@10: This bitstream filter patches the header of frames extracted from an MJPEG yading@10: stream (carrying the AVI1 header ID and lacking a DHT segment) to yading@10: produce fully qualified JPEG images. yading@10: yading@10: 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: yading@10: yading@10: yading@10: =head2 mjpega_dump_header yading@10: yading@10: yading@10: yading@10: =head2 movsub yading@10: yading@10: yading@10: yading@10: =head2 mp3_header_compress yading@10: yading@10: yading@10: yading@10: =head2 mp3_header_decompress yading@10: yading@10: yading@10: yading@10: =head2 noise yading@10: yading@10: yading@10: yading@10: =head2 remove_extradata yading@10: yading@10: yading@10: yading@10: yading@10: =head1 SEE ALSO yading@10: yading@10: yading@10: yading@10: ffmpeg(1), ffplay(1), ffprobe(1), ffserver(1), libavcodec(3) yading@10: yading@10: yading@10: =head1 AUTHORS yading@10: yading@10: yading@10: The FFmpeg developers. yading@10: 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: B in the FFmpeg source directory, or browsing the yading@10: online repository at EBE. yading@10: yading@10: Maintainers for the specific components are listed in the file yading@10: F in the source code tree. yading@10: yading@10: yading@10: