How to extract frames using mencoder to a specific directory?

I cannot extract images to a specific directory.

The current command that I run is

mplayer -vo jpeg CustomLogoAni.mp4 

Can I also set the prefix for the file? Like ffmpeg% d.jpg

When combining images, I run the command:

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

But that will not work.

Can anyone help?

+6
source share
2 answers

You want -vo jpeg:outdir=/tmp/frames/ to output to a specific directory. I do not believe that a prefix is ​​possible.

+2
source

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

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

The format% 08d seems to match the general printf format. It generates a file name, for example image00000001.png.

ffmpeg can convert the whole video into images.

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

I could not find information about a specific output directory, however, it looks like on Windows you can navigate through directories with ..

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

Source: https://habr.com/ru/post/906968/


All Articles