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
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
Thank you for this, but its extremly slow. If you got a Intel CPU or dedicated GPU u can use hardware acceleration which is 100x times faster.
ffmpeg -y -vaapi_device /dev/dri/renderD128 -framerate 24 -pattern_type glob -i '*.png' -s:v 1920x1080 -vf 'format=nv12,hwupload' -c:v h264_vaapi timelapse.mkv
quality / filesize is close to "-crf 18 -preset slow"