[FFmpeg-devel] [patch] glob matching for image series
Nicolas George
nicolas.george at normalesup.org
Tue Feb 28 12:35:08 CET 2012
Le nonidi 9 ventôse, an CCXX, Alexander Strasser a écrit :
> 1. Support globbing not only for picture input.
How do you imagine it should be handled, from the API point of view? We are
nowhere near supporting demuxer-level concatenation, IMHO, so the syntax for
various parts of the command line will have to change four or five times
before we are able of implementing anything like that.
> 2. Do it only if it was explicitly enabled
I find that rather user-unfriendly. OTOH, having options to ensure the mode
of expansion would be useful for robust automated scripts:
ffmpeg -f img2 -expand printf photo%05d.jpg
ffmpeg -f img2 -expand glob photo\*.jpg
> 3. Agree on a set of features like ?*[]{} and fail if is not available
> (maybe with the additional possibility to force it on with what is
> available)
I do not like it at all in principle: if we were to cripple features just to
be compatible with the lowest common denominator, we could just all install
windows and be done with it.
On the other hand, for this particular case:
- GLOB_BRACE, could be marginally useful, but also cause trouble (the files
that randomly appears on people's hard drives tend to have braces or
parentheses to indicate the checksum, name of the team or whatever, or so
I have been told).
- GLOB_TILDE(_CHECK): this is not related to globbing at all, this is some
kind of special syntax for a bizarre environment variable expansion (~
expands like $HOME, but only at the start; ~foo would expand like
$HOME_FOO, assuming the contents of passwd is part of the environment).
Also, while it is perfectly normal for 'foo*.jpg' to be supported only by
the img2 demuxer, there is no logic of being able to write ~/image.jpg and
not ~/video.avi.
Also, for the command-line tool, the user can just not escape the ~ and
let their shell expand it.
- GLOB_NOMAGIC should be useless, since glob is called only if is_glob has
already detected metacharacters.
So in this particular case, I do not mind sticking to the standard features
at all.
> 4. Tell the user if he requested to enable globbing but it wasn't
> available at all in his lavf binary.
I second that.
> The described behaviour would allow for implementation of applications
> that behave consistently across platforms. That is a property I appreciate
> very much and that I would like to see from FFmpeg programs and libraries.
Unfortunately, consistency is often at odds with feature-fullness, and
someone who decided to use one particular platform because it has some
interesting extensions should be able to benefit from these extensions.
What can be done, OTOH, is to make sure that someone who wants to stick to
the common denominator can avoid triggering unexpected extensions.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120228/ff14e651/attachment.asc>
More information about the ffmpeg-devel
mailing list