Convert sequence of JPEG images to MP4 video
ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4
-r 24
- output frame rate-pattern_type glob -i '*.JPG'
- all JPG files in the current directory-i DSC_%04d.JPG
- e.g. DSC_0397.JPG-s hd1080
- 1920x1080 resolution
Slower, better quality
Add the following after -vcodec libx264
to achieve better quality output
-crf 18 -preset slow
Bulk convert JPGs to 1920x1080, centered
convert input.jpg -resize '1920x1080^' -gravity center -crop '1920x1080+0+0' output.jpg
Thanks but why there are two
-i
s? Also, when I run your command I get an error:Of course, my file names are like
IMG_1234.jpg
and that's why I've changed the pattern. When I remove the second-i
which causes issues, the process goes through but the result is a messed up video with flat colors in it. I'm not sure if this is relevant, but I'm getting this warning too:Any help is appreciated, thanks.