You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.3KB

  1. @chapter Bitstream Filters
  2. @c man begin BITSTREAM FILTERS
  3. When you configure your Libav build, all the supported bitstream
  4. filters are enabled by default. You can list all available ones using
  5. the configure option @code{--list-bsfs}.
  6. You can disable all the bitstream filters using the configure option
  7. @code{--disable-bsfs}, and selectively enable any bitstream filter using
  8. the option @code{--enable-bsf=BSF}, or you can disable a particular
  9. bitstream filter using the option @code{--disable-bsf=BSF}.
  10. The option @code{-bsfs} of the av* tools will display the list of
  11. all the supported bitstream filters included in your build.
  12. Below is a description of the currently available bitstream filters.
  13. @section aac_adtstoasc
  14. @section chomp
  15. @section dump_extradata
  16. @section extract_extradata
  17. Extract the in-band extradata.
  18. Certain codecs allow the long-term headers (e.g. MPEG-2 sequence headers,
  19. or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either "in-band" (i.e. as a part
  20. of the bitstream containing the coded frames) or "out of band" (e.g. on the
  21. container level). This latter form is called "extradata" in Libav terminology.
  22. This bitstream filter detects the in-band headers and makes them available as
  23. extradata.
  24. @table @option
  25. @item remove
  26. When this option is enabled, the long-term headers are removed from the
  27. bitstream after extraction.
  28. @end table
  29. @section h264_mp4toannexb
  30. @section imx_dump_header
  31. @section mjpeg2jpeg
  32. Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
  33. MJPEG is a video codec wherein each video frame is essentially a
  34. JPEG image. The individual frames can be extracted without loss,
  35. e.g. by
  36. @example
  37. avconv -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
  38. @end example
  39. Unfortunately, these chunks are incomplete JPEG images, because
  40. they lack the DHT segment required for decoding. Quoting from
  41. @url{http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml}:
  42. Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
  43. commented that "MJPEG, or at least the MJPEG in AVIs having the
  44. MJPG fourcc, is restricted JPEG with a fixed -- and *omitted* --
  45. Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
  46. and it must use basic Huffman encoding, not arithmetic or
  47. progressive. . . . You can indeed extract the MJPEG frames and
  48. decode them with a regular JPEG decoder, but you have to prepend
  49. the DHT segment to them, or else the decoder won't have any idea
  50. how to decompress the data. The exact table necessary is given in
  51. the OpenDML spec."
  52. This bitstream filter patches the header of frames extracted from an MJPEG
  53. stream (carrying the AVI1 header ID and lacking a DHT segment) to
  54. produce fully qualified JPEG images.
  55. @example
  56. avconv -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
  57. exiftran -i -9 frame*.jpg
  58. avconv -i frame_%d.jpg -c:v copy rotated.avi
  59. @end example
  60. @section mjpega_dump_header
  61. @section movsub
  62. @section mp3_header_compress
  63. @section mp3_header_decompress
  64. @section noise
  65. @section null
  66. This bitstream filter passes the packets through unchanged.
  67. @section remove_extradata
  68. @section vp9_superframe
  69. Combine VP9 frames into superframes.
  70. @section vp9_superframe_split
  71. Split VP9 superframes into single frames.
  72. @section vp9_raw_reorder
  73. Given a VP9 stream with correct timestamps but possibly out of order,
  74. insert additional show-existing-frame packets to correct the ordering.
  75. @c man end BITSTREAM FILTERS