FORUMS: list search recent posts

Specify frames to be extracted

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Laurent Nguyen
Specify frames to be extracted
on Jul 12, 2011 at 2:39:36 pm

Dear forum,

I am looking for a way to extract specific frame numbers from a movie, of course using ffmpeg. For the moment, the only thing I have found that is close to what I need is the following:

ffmpeg -i movie.mov -ss 00:00:20 -vframes 33 im%5d.png

With this command, I'm extracting 33 frames, with the first one starting at 00:20 seconds. However, I would like to specify the starting frame not by time but by frame number. In other words, I want to extract, say from frame #167 to #192 from my movie.

Is there a simple way of doing this ? A virtual beer for the one who finds the answer.

Thanks,

Laurent


Return to posts index

Michael Rampe
Re: Specify frames to be extracted
on Jul 12, 2011 at 11:59:10 pm

[Laurent Nguyen] "However, I would like to specify the starting frame not by time but by frame number."

This function only accepts time as an input. It does however accept a decimal:

`-ss position'
Seek to given time position in seconds. hh:mm:ss[.xxx] syntax is also supported.

So.... If you know your frame rate, you can calculate the right time to start.

Frame 167 in a 25 fps stream = 167/25 = 6.68 seconds.

Thus your command would be:

-ss 00:00:06.68

Michael


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]