demuxers.texi 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @chapter Demuxers
  2. @c man begin DEMUXERS
  3. Demuxers are configured elements in FFmpeg which allow to read the
  4. multimedia streams from a particular type of file.
  5. When you configure your FFmpeg build, all the supported demuxers
  6. are enabled by default. You can list all available ones using the
  7. configure option "--list-demuxers".
  8. You can disable all the demuxers using the configure option
  9. "--disable-demuxers", and selectively enable a single demuxer with
  10. the option "--enable-demuxer=@var{DEMUXER}", or disable it
  11. with the option "--disable-demuxer=@var{DEMUXER}".
  12. The option "-formats" of the ff* tools will display the list of
  13. enabled demuxers.
  14. The description of some of the currently available demuxers follows.
  15. @section image2
  16. Image file demuxer.
  17. This demuxer reads from a list of image files specified by a pattern.
  18. The pattern may contain the string "%d" or "%0@var{N}d", which
  19. specifies the position of the characters representing a sequential
  20. number in each filename matched by the pattern. If the form
  21. "%d0@var{N}d" is used, the string representing the number in each
  22. filename is 0-padded and @var{N} is the total number of 0-padded
  23. digits representing the number. The literal character '%' can be
  24. specified in the pattern with the string "%%".
  25. If the pattern contains "%d" or "%0@var{N}d", the first filename of
  26. the file list specified by the pattern must contain a number
  27. inclusively contained between 0 and 4, all the following numbers must
  28. be sequential. This limitation may be hopefully fixed.
  29. The pattern may contain a suffix which is used to automatically
  30. determine the format of the images contained in the files.
  31. For example the pattern "img-%03d.bmp" will match a sequence of
  32. filenames of the form @file{img-001.bmp}, @file{img-002.bmp}, ...,
  33. @file{img-010.bmp}, etc.; the pattern "i%%m%%g-%d.jpg" will match a
  34. sequence of filenames of the form @file{i%m%g-1.jpg},
  35. @file{i%m%g-2.jpg}, ..., @file{i%m%g-10.jpg}, etc.
  36. The size, the pixel format, and the format of each image must be the
  37. same for all the files in the sequence.
  38. The following example shows how to use @file{ffmpeg} for creating a
  39. video from the images in the file sequence @file{img-001.jpeg},
  40. @file{img-002.jpeg}, ..., assuming an input framerate of 10 frames per
  41. second:
  42. @example
  43. ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
  44. @end example
  45. Note that the pattern must not necessarily contain "%d" or
  46. "%0@var{N}d", for example to convert a single image file
  47. @file{img.jpeg} you can employ the command:
  48. @example
  49. ffmpeg -f image2 -i img.jpeg img.png
  50. @end example
  51. @section applehttp
  52. Apple HTTP Live Streaming demuxer.
  53. This demuxer presents all AVStreams from all variant streams.
  54. The id field is set to the bitrate variant index number. By setting
  55. the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay),
  56. the caller can decide which variant streams to actually receive.
  57. The total bitrate of the variant that the stream belongs to is
  58. available in a metadata key named "variant_bitrate".
  59. @c man end INPUT DEVICES