Skip to content

Instantly share code, notes, and snippets.

@wiedi
Last active August 29, 2015 14:02
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 wiedi/54de0aabb0389aff057a to your computer and use it in GitHub Desktop.
Save wiedi/54de0aabb0389aff057a to your computer and use it in GitHub Desktop.
Timelapse
#!/bin/bash
set -x
if [ $# -ne 4 ]; then
echo "Usage:"
echo -e "\t${0} <startframe> <pics> <audio> <out>"
echo
echo "Example:"
echo -e "\t${0} 42 DSC_%d.jpg track.flac timelaps.mp4"
exit 0
fi
START=$1
PICS=$2
AUDIO=$3
OUT=$4
FRAMERATE=25
ffmpeg -start_number "$START" -i "$PICS" -i "$AUDIO" -map 0:0 -map 1:0 -r $FRAMERATE -s hd1080 -vcodec libx264 -shortest "$OUT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment