Skip to content

Instantly share code, notes, and snippets.

@tvandervossen
Created December 20, 2011 19:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvandervossen/1502845 to your computer and use it in GitHub Desktop.
Save tvandervossen/1502845 to your computer and use it in GitHub Desktop.
Encode WebM with -aspect to make sure Firefox displays it with the correct aspect ratio
Commands:
$ ffmpeg -i source.mp4 -s 1280x720 -vpre libvpx-720p -b 3900k -pass 1 -an -f webm -aspect 16:9 -y output.webm
$ ffmpeg -i source.mp4 -s 1280x720 -vpre libvpx-720p -b 3900k -pass 2 -acodec libvorbis -ab 100k -f webm -aspect 16:9 -y output.webm
Assumes the following preset (in /usr/local/share/ffmpeg/libvpx-720p.ffpreset):
vcodec=libvpx
g=120
rc_lookahead=16
level=216
profile=0
qmax=42
qmin=10
vb=2M
maxrate=24M
minrate=100k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment