[FFmpeg-devel] [PATCH] Add documentation for the image2 muxer.

Stefano Sabatini stefano.sabatini-lala
Fri Jan 28 22:48:23 CET 2011


On date Friday 2011-01-28 18:15:30 +0100, Janne Grunau encoded:
> On Wed, Jan 26, 2011 at 11:03:54PM +0100, Stefano Sabatini wrote:
> 
> some suggestions inline
> 
> > ---
> >  doc/muxers.texi |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 50 insertions(+), 0 deletions(-)
> > 
> > diff --git a/doc/muxers.texi b/doc/muxers.texi
> > index 2257669..8d82edf 100644
> > --- a/doc/muxers.texi
> > +++ b/doc/muxers.texi
> > @@ -18,4 +18,54 @@ enabled muxers.
> >  
> >  The description of some of the currently available muxers follows.
> >  
> > + at section image2
> > +
> > +Image file muxer.
> > +
> > +This muxer allows to write the input video to a list of image files
> > +specified by a pattern.
> 
> ... muxer writes video frames to multiple image ...
> 
> > +The pattern may contain the string "%d" or "%0 at var{N}d", which
> > +specifies the position of the characters representing a sequential
> > +number in each filename specified by the pattern. If the form
> 
> ... sequential
> numbering in the filenames. If ..
> 
> > +"%d0 at var{N}d" is used, the string representing the number in each
> > +filename is 0-padded and @var{N} is the total number of 0-padded
> > +digits representing the number. The literal character '%' can be
> > +specified in the pattern with the string "%%".
> > +
> > +If the pattern contains "%d" or "%0 at var{N}d", the first filename of
> > +the file list specified will contain the number 1, all the following
> > +numbers will be sequential.
> > +
> > +The pattern may contain a suffix which is used to automatically
> > +determine the format of the image files to write.
> > +
> > +For example the pattern "img-%03d.bmp" will specify a sequence of
> > +filenames of the form @file{img-001.bmp}, @file{img-002.bmp}, ...,
> > + at file{img-010.bmp}, etc.; the pattern "i%%m%%g-%d.jpg" will specify a
> 
> no need to make the example more complicated than necessary, one '%%' is
> enough. A newline after the first example might also be in order.
> 
> > +sequence of filenames of the form @file{i%m%g-1.jpg},
> > + at file{i%m%g-2.jpg}, ..., @file{i%m%g-10.jpg}, etc.
> > +
> > +The following example shows how to use @file{ffmpeg} for creating a
> > +sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ...,
> > +taking one image every second from the input video:
> > + at example
> > +ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
> > + at end example
> > +
> > +Note that with @file{ffmpeg}, if the format is not specified with the
> > + at code{-f} option and the output filename specifies an image file
> > +format, the image2 muxer is automatically selected, so the previous
> > +command can be written as:
> > + at example
> > +ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
> > + at end example
> > +
> > +Note also that the pattern must not necessarily contain "%d" or
> > +"%0 at var{N}d", for example to create a single image file
> > + at file{img.jpeg} from the input video you can employ the command:
> > + at example
> > +ffmpeg in.avi -f image2 -vframes 1 img.jpeg
> > + at end example
> > +
> >  @c man end MUXERS
> 
> otherwise ok

All points addressed.
-- 
FFmpeg = Freak and Freak Most Power Epic God



More information about the ffmpeg-devel mailing list