How to extract frames using mencoder into specific directory?

6.3k Views Asked by At

I can't seem to extract images into a specific directory.

The current command I am running is

mplayer -vo jpeg CustomLogoAni.mp4

Is it also possible to set the prefix for the file? Similar to ffmpeg %d.jpg

When combining the images I run the command:

mencoder "mf://*.jpg" -ovc x264 -o output.avi

But it does not work.

Can anyone help?

2

There are 2 best solutions below

0
On

This command works very well with ffmpeg. It doesn't matter if you want to convert a 1080p video and you have a slow computer, it converts it on its own pace.

ffmpeg -i "Katy Perry - Firework.mp4" image%08d.png

The %08d format seems to follow the common printf format. It generates a filename like image00000001.png.

ffmpeg can convert a whole video into images.

https://www.ffmpeg.org/ffmpeg.html#Video-and-Audio-grabbing

I couldn't find any info on the specific output directory, however it seems that on Windows you can navigate thru directories with '.'

ffmpeg -i "Katy Perry - Firework.mp4" ./temp/image%08d.png
0
On

You want -vo jpeg:outdir=/tmp/frames/ for output to a specific directory. I don't believe a prefix is possible.