Skip to content

Instantly share code, notes, and snippets.

@gabrieldance
Created October 31, 2013 19:41
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 gabrieldance/7255593 to your computer and use it in GitHub Desktop.
Save gabrieldance/7255593 to your computer and use it in GitHub Desktop.
bash script to encode two-pass WEBM video.
#!/bin/bash
for file in *.mov; do
ffmpeg -i ${file} -pass 1 -video_size 640x360 -c:v libvpx -qmin 0 -qmax 50 -b:v .325M -f webm -y /dev/null
ffmpeg -i ${file} -pass 2 -video_size 640x360 -c:v libvpx -qmin 0 -qmax 50 -b:v .325M -c:a libvorbis -q:a 6 -y ../../640x360/FINAL_WEBM/${file%%mov}webm
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment