[MEncoder-users] how can I grab a frame from video file?

The Wanderer inverseparadox at comcast.net
Wed Nov 7 23:43:05 CET 2007


Paul Minelly wrote:

> Hi all,
> 
> Can anyone give me a command line how to grab a frame from video file
> at specified position using mencoder and save it to a JPEG file?

MEncoder can't do that, but MPlayer can.

mplayer input-file -ss <position in seconds> -frames 1 -vo jpeg

should I think at least get you started.

You may or may not need to use '-frames 2' instead to get a frame at the
desired location instead of from the beginning of the file, but I think
that's a problem only with -vf screenshot and not with -vo jpeg.

The -ss value is not infinitely precise; it will generally get you only
to the nearest keyframe, which may not be close enough for what you
want. In that case, there are probably ways to get it done using -vf
screenshot, but they would be more complicated than I feel like going
into unnecessarily.

-- 
       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 MEncoder-users mailing list