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

Clément Bœsch ubitux at gmail.com
Wed Dec 12 21:24:19 CET 2012


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.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121212/9996504d/attachment.asc>


More information about the ffmpeg-devel mailing list