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

Stefano Sabatini stefasab at gmail.com
Sun Aug 5 23:37:49 CEST 2012


On date Sunday 2012-08-05 21:35:42 +0200, Alexander Strasser encoded:
> Nicolas George wrote:
> > Le nonidi 19 thermidor, an CCXX, Alexander Strasser a écrit :
> > >   This was rejected back then (discussion excerpt follows).
> > 
> > > ||I find that rather user-unfriendly. OTOH, having options to ensure the mode
> > > ||of expansion would be useful for robust automated scripts:
> > 
> > I missed the end of the discussion for some reason, I do not remember why,
> > especially the part where it was decided to "escape" glob character with
> > "%". For reference, I find that solution a lot more user-unfriendly than
> > having to enable globbing explicitly.
> 
>   I don't know either why you missed the end of the discussion :(
>   
>   I asked you explicitly about your opinion in the part of the quote
> you just skipped... Would you have said that more than 3 months ago
> then I probably would have implemented the "request-globbing-explicitly"
> way I suggested before.
> 
>   Anyway we cannot change the past, so we need to agree on how to
> proceed. If we leave it as it is now, Stefano can push his docs
> patch and I can submit a patch to print a warning on top of that.
> 
>   If we decide to change the way to access globbing support we need
> to properly agree on the facts this time, propose a patch and think
> on how to do the transition (how to inform users etc.).

We can try to solve the riddle and save "the goat and the cabbages"
(sorry no equivalent in English, check for Alcuino and "Propositio
de lupo et capra et fasciculo cauli").

I suggest to follow this path: we keep the current behavior, but

1. we add an option which sets the pattern type, in case it is set to
"glob" it will perform pure glob matching with no need to escape

2. in the default mode ("sequence") we keep the current semantics but
we warn in case a glob pattern is detected

3. we deprecate and drop the mixed "sequence mode" at the next major
bump

Variant: we create -pattern_type with three values, "glob_sequence",
"glob", "sequence", and deprecate/drop "glob_sequence" at the next
major bump.

This way we save backward compatibility but favor "pure" modes. This
in case we agree that pure glob/sequence mode should be favored over
mixed mode and %-escaping (which seems to me rather awkward).

Also with -pattern_type glob we can fail cleanly with no need for
second-guessing heuristics on the back of the user to detect if glob()
is supported.
-- 
FFmpeg = Furious Foolish Mere Power Experimenting Genius


More information about the ffmpeg-devel mailing list