[FFmpeg-devel] [PATCH] dox/muxers: document how to use glob patterns in the image2 demuxers

Stefano Sabatini stefasab at gmail.com
Sun Aug 5 12:53:52 CEST 2012


On date Sunday 2012-08-05 12:13:49 +0200, Alexander Strasser encoded:
> Stefano Sabatini wrote:
[...]
> > diff --git a/doc/demuxers.texi b/doc/demuxers.texi
> > index 07d82c0..807ad95 100644
> > --- a/doc/demuxers.texi
> > +++ b/doc/demuxers.texi
> > @@ -24,7 +24,22 @@ Image file demuxer.
> >  
> >  This demuxer reads from a list of image files specified by a pattern.
> >  
> > -The pattern may contain the string "%d" or "%0 at var{N}d", which
> > +If @code{glob()} is supported on your system, and the provided pattern
> 
> NIT: Drop the glob() function reference and associate the support
>      with lavf and not with the "system".
> 
> For example:
> 
>   "If your version of libavformat was compiled with globbing support, and..."

Changed locally.

>   BTW this reminds me of a comment I had when reviewing the original
> patch. There is no easy way for the user to find out if the above
> statement is true, besides trying it with a glob pattern that would
> match one or more existing files. But again this is unrelated, I will
> try to come up with a patch (including documentation updates relative
> to this patch).

We could show if globbing support is enabled in the demuxer log
(AV_LOG_VERBOSE), or we could print a warning if the pattern is
recognized as a glob pattern but globbing support is not enabled.

But I think the best solution would be to let the user specify the
pattern type (e.g. -pattern glob|sequence), which will also avoid the
need for % escaping in the glob pattern.
In case the user selects:
-pattern glob 'img-*.png'

and libavformat has no glob support it will complain and fail
loudly.

This should also allow other types of pattern in case of need
(e.g. regexp, timestamps etc.).

Since we still didn't document the glob feature, it should be no much
harm to change the syntax now.
-- 
FFmpeg = Free and Fascinating Majestic Proud Embarassing Guide


More information about the ffmpeg-devel mailing list