Skip to content

Instantly share code, notes, and snippets.

@neilghosh
Last active April 29, 2020 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilghosh/e5b98e6d7b8f3c9c72cebfec6af1fd4a to your computer and use it in GitHub Desktop.
Save neilghosh/e5b98e6d7b8f3c9c72cebfec6af1fd4a to your computer and use it in GitHub Desktop.
Stitches all JPG files in the folder to a video , rotates it, cropts it, trims it and plays preview.
ffmpeg -r 5 -pattern_type glob -i '*.JPG' -s hd1080 -pix_fmt yuv420p -vcodec libx264 -crf 18 -preset slow timelapse.mp4
ffmpeg -i timelapse.mp4 -vf “rotate=-6*PI/180” out.mp4
ffmpeg -i out.mp4 -filter:v "crop=in_w/2:in_h/1.7:in_w/20:in_h/5" -c:a copy out1.mp4
ffmpeg -ss 00:00:00.5 -i out1.mp4 -c copy VideoClip.mp4
ffplay VideoClip.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment