Melt: how to extract a frame every second?

727 views Asked by At

If I use:

melt -profile square_ntsc movie.flv -consumer avformat:image%05d.jpg s=60x45

I get so many images as many frames are in movie.

How do I extract an image each second? (the frame rate is known). Same as how do I extract an image every n-th frame.

1

There are 1 answers

0
Florin P. On BEST ANSWER

found the answer: just add a r=1 for consumer, like in:

melt -profile square_pal movie.flv -consumer avformat:image%05d.jpg r=1

to get 2 images each second, write:

melt -profile square_pal movie.flv -consumer avformat:image%05d.jpg r=2

to get images each 2 seconds, write:

melt -profile square_pal movie.flv -consumer avformat:image%05d.jpg r=0.5