[FFmpeg-devel] [PATCH] doc/filters: do not assume shell escaping in select examples

Michael Niedermayer michaelni at gmx.at
Thu Dec 13 02:30:09 CET 2012


On Thu, Dec 13, 2012 at 12:41:24AM +0100, Stefano Sabatini wrote:
> On date Wednesday 2012-12-12 21:24:19 +0100, Clément Bœsch encoded:
> > On Tue, Dec 11, 2012 at 11:42:51PM +0100, Stefano Sabatini wrote:
> > > We assume that the filter specified is the string passed as
> > > filtergraph. Possibly less confusing, since the shell escaping is
> > > shell-dependent.
> > > ---
> > >  doc/filters.texi |   12 ++++++------
> > >  1 file changed, 6 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/doc/filters.texi b/doc/filters.texi
> > > index cea6384..54d73b2 100644
> > > --- a/doc/filters.texi
> > > +++ b/doc/filters.texi
> > > @@ -4751,37 +4751,37 @@ select=0
> > >  @item
> > >  Select only I-frames:
> > >  @example
> > > -select='eq(pict_type\,I)'
> > > +select='eq(pict_type,I)'
> > >  @end example
> > >  
> > >  @item
> > >  Select one frame every 100:
> > >  @example
> > > -select='not(mod(n\,100))'
> > > +select='not(mod(n,100))'
> > >  @end example
> > >  
> > >  @item
> > >  Select only frames contained in the 10-20 time interval:
> > >  @example
> > > -select='gte(t\,10)*lte(t\,20)'
> > > +select='gte(t,10)*lte(t,20)'
> > >  @end example
> > >  
> > >  @item
> > >  Select only I frames contained in the 10-20 time interval:
> > >  @example
> > > -select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)'
> > > +select='gte(t,10)*lte(t,20)*eq(pict_type,I)'
> > >  @end example
> > >  
> > >  @item
> > >  Select frames with a minimum distance of 10 seconds:
> > >  @example
> > > -select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
> > > +select='isnan(prev_selected_t)+gte(t-prev_selected_t,10)'
> > >  @end example
> > >  
> > >  @item
> > >  Use aselect to select only audio frames with samples number > 100:
> > >  @example
> > > -aselect='gt(samples_n\,100)'
> > > +aselect='gt(samples_n,100)'
> > >  @end example
> > 
> 
> > I don't think that's less confusing. At least it won't be for users
> > expecting escaping issue. In the current situation, reading these
> > examples, users are aware about the ',' and related filtergraph escaping
> > that might be needed (and actually is, most of the time). If you remove
> > them from example, they will have a hard time trying to figure out what's
> > wrong.
> 
> I know that this is controversial, but the current examples are
> confusing in a different way. What is the user expected to write?

The user should be able to copy and paste examples from his web
browser, man page viewer or other tool to his terminal
and they should work.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20121213/c3971ea2/attachment.asc>


More information about the ffmpeg-devel mailing list