Skip to content

Instantly share code, notes, and snippets.

@sepastian
Last active December 22, 2015 07:28
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 sepastian/6437636 to your computer and use it in GitHub Desktop.
Save sepastian/6437636 to your computer and use it in GitHub Desktop.
Convert multiple images into a video using avconv. NOTE that the image names must be numbered! (avconv did not accept images named "DSC_2XXX.JPG".)
# Copy and rename images to "%04d.jpg"
i=0; ls /CAMERA/*JPG | while read f; do cp "$f" "./$(printf '%04d.jpg' $i)"; let i=$(($i+1)); done
# Convert all images named "%04d.jpg" to a video.
avconv -f image2 -r 12 -i %04d.jpg -vcodec libvpx -deadline good -cpu-used 0 -b:v 500k -qmin 10 -qmax 63 -vf scale=1024:-1 RESULT.webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment