5

How can I convert many images into a movie?

I have about 12000 images, and I want to create a movie based on the timestamps of the images. The timestamp is also the filename. I tried using convert but it crashes my PC when I try to do it. What is a good command-line way to solve this problem?

Zanna
  • 72,312
j0h
  • 15,365

1 Answers1

6

Using ffmpeg, from here:

cd /path/to/images
ffmpeg -f image2  -r 1/5 -pattern_type glob -i './*.png' -c:v libx264 -pix_fmt yuv420p out.mp4

The other option is mencoder. I didn't test it, but you can find some instructions here on SuperUser.

And it looks like this SuperUser answer works fine for a huge number of images:

ls -1v | grep JPG > files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=21600000 -o windowsill_flowers_7.avi -mf type=jpeg:fps=24 mf://@files.txt -vf scale=1920:1080 
Zanna
  • 72,312
Ravexina
  • 57,256