Skip to content

Instantly share code, notes, and snippets.

@saidsef
Last active August 14, 2021 16:40
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 saidsef/b090643d1aa67ca9cb354b4c859be80c to your computer and use it in GitHub Desktop.
Save saidsef/b090643d1aa67ca9cb354b4c859be80c to your computer and use it in GitHub Desktop.
#!/bin/sh
## MIT License - Copyright (c) 2020 - Said Sef
## This script assumes FFMPEG and it's ancillary re installed
## This will encode directory of images into a video
## args: sh ffmpeg-images-to-video.sh *.jpg video-name
ffmpeg -f image2 \
-r 30 \
-pattern_type glob \
-i "$1" \
-c:v mpeg4 \
-preset ultrafast \
-vf "scale=w=1630:h=1080:eval=init:interl=false,format=yuv420p,setsar=1631/1630,setpts=150*PTS" \
$2.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment