ffmpeg -r 24 -start_number 1000 -i Time-Lapse-%04d.png -c:v libx264 -pix_fmt yuv420p time-lapse-4k.mp4
ffmpeg -r 30 -start_number 1000 -i Time-Lapse-%04d.png -s hd1080 -vcodec libx264 -crf 18 -preset slow -pix_fmt yuv420p time-lapse.mp4
ffmpeg -r 30 -start_number 3413 -i IMG_%04d.jpg -s hd1080 -vcodec libx264 -crf 18 -preset slow -pix_fmt yuv420p time-lapse.mp4
-r 30- output frame rate-start_number 3413- the first index number of the images-i IMG_%04d.jpg- all JPG files in the current directory matching this pattern (e.g. IMG_3413.jpg)- Note: can be replaced with
-i IMG_%d.jpgif there are no leading zeros (e.g. IMG_1.jpg, IMG_2.jpg...IMG_10.jpg...IMG_100.jpg)
- Note: can be replaced with
-s hd1080- 1920x1080 resolution-pix_fmt yuv420p- setting the pixel format for QuickTime/iPhone support
Add the following after -vcodec libx264 to achieve better quality output
-crf 18 -preset slow
convert input.jpg -resize '1920x1080^' -gravity center -crop '1920x1080+0+0' output.jpg