[FFmpeg-devel] [PATCH] Add an usage example for extracting images from a video in the docs

The Wanderer inverseparadox
Tue Aug 12 02:42:37 CEST 2008


Stefano Sabatini wrote:

> Hi, as in subject.

A few comments:

> +* You can extract images from a video:
> +
> + at example
> +ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo%03d.jpeg 
> + at end example
> +
> +This will extract one video frame per second from the video and will
> +output them in files named like @file{foo-001.jpeg}, @file{foo-002.jpeg},
> +etc. Images are rescaled to fit the new WxH values.

I would say "will be rescaled", because you are using the future tense
in the previous sentence and it flows better if the tenses match.

> +The syntax @code{foo%03d.jpeg} specifies to use a decimal number composed by
> +three digit to express the sequence number, and is the same format supported by
> +the C printf function.

"composed of three digits"

Does the syntax actually support e.g. "%03f", "%02lld", etc., as
printf() does? (I wouldn't really expect so, as those formats would not
make sense as filename patterns.) If not, is it useful to point out the
derivation here?

> +If you want to extract just a limited number of frames you can use the
> +above command in combination with the -vframes option.

It might be a good idea to add a comma after "frames" here, but it's not
strictly necessary, and it could arguably introduce more problems than
it fixes.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.




More information about the ffmpeg-devel mailing list