[FFmpeg-devel] [PATCH] Add demuxers.texi file and document the image2 demuxers.

Stefano Sabatini stefano.sabatini-lala
Fri Jan 21 14:06:04 CET 2011


On date Sunday 2011-01-09 11:12:46 +0100, Michael Niedermayer encoded:
> On Sat, Jan 08, 2011 at 05:42:35PM +0100, Stefano Sabatini wrote:
> > On date Thursday 2011-01-06 21:43:55 +0100, Stefano Sabatini encoded:
> > > On date Tuesday 2011-01-04 16:06:00 +0100, Stefano Sabatini encoded:
> > > > ---
> > > >  Makefile          |    6 ++--
> > > >  doc/demuxers.texi |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > > >  doc/ffmpeg.texi   |    1 +
> > > >  doc/ffplay.texi   |    1 +
> > > >  doc/ffprobe.texi  |    1 +
> > > >  5 files changed, 66 insertions(+), 3 deletions(-)
> > > >  create mode 100644 doc/demuxers.texi
> > > 
> > > If there are no more comments, I'll double check the patch and I'll
> > > commit in few days.
> > 
> > Updated, I'll apply soon if there are no comments.
> > -- 
> > FFmpeg = Fundamental & Fascinating Miracolous Portable Empowered Geek
> 
> [...]
> > @@ -18,4 +18,43 @@ enabled demuxers.
> >  
> >  The description of some of the currently available demuxers follows.
> >  
> > + at section image2
> > +
> > +Image file demuxer.
> > +
> > +This demuxer reads from a list of image files specified by a pattern.
> > +
> > +The pattern must contain the string "%d" or "%0 at var{N}d", which
> 
> just tried
> ffmpeg -f image2 -i double-image.jpg test.png
> 
> and it worked
> 
> 
> > +specifies the position of the characters representing the seqential
> > +number in each filename matched by the pattern. If the form
> > +"%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 "%%".
> > +
> 
> > +The first filename of the sequence of files specified by the pattern
> > +must contain a number inclusively contained between 0 and 4, all the
> > +following numbers must be sequential.
> 
> "current limitation, that we hope will be fixed" could be added in there
> somewhere

Done.

> > +
> > +The pattern may contain a suffix which is used to automatically
> > +determine the type of image contained in the files, which must be one
> > +of the supported image files.
> > +
> > +For example the pattern "foo-%03d.bmp" will match a sequence of
> > +filenames of the form @file{foo-001.bmp}, @file{foo-002.bmp}, ...,
> > + at file{foo-010.bmp}, etc.; the pattern "b%%a%%r-%d.jpg" will match a
> > +sequence of filenames of the form @file{b%a%r-1.jpg},
> > + at file{b%a%r-2.jpg}, ..., @file{b%a%r-10.jpg}, etc.
> > +
> 
> > +The size and the pixel format of each image must be the same for all
> > +the files in the sequence.
> 
> Ive not tried but there should be no size, nor pixel format limitation
> at least when a scale filter is used, ffmpeg should be able to rescale to a
> constant size. I know this worked in the past with other demuxers so it should
> work here too but as said ive not tried ...

I tried and it didn't work (changing the size of one of the images in
the sequence results in a corrupted output image), so I'm keeping the
documentation unchanged regarding to this.

And I agree that supporting something of the kind:
ffmpeg -f image2 -r 1 -i '%03d.*' out.avi
would be useful, the recent discussion about the glob pattern is
relevant as well.

If I see no comments I'll apply in few days.

And BTW, if the new "maintainers" want to take this patch in
consideration or suggest improvements they're more than welcome, I
want to keep in synch the two repos as much as possible.

Regards.
-- 
FFmpeg = Faithless and Free Merciless Powered Erroneous Gadget



More information about the ffmpeg-devel mailing list