Last active
April 28, 2017 21:08
-
-
Save sfan5/6fe36beba3e3909b5629bee72b4c62f7 to your computer and use it in GitHub Desktop.
script for twopass encoding of webms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
src="2QO90IaN_UM.mkv" | |
dst="a.webm" | |
opts="-vf scale=1280:720 -threads 10" | |
aopts="-c:a libopus -b:a 128k" | |
vopts="-c:v libvpx-vp9 -b:v 1024k -tile-columns 6 -frame-parallel 1 -row-mt 1" | |
vopts_final="-auto-alt-ref 1 -lag-in-frames 25" | |
ffmpeg -i "$src" $opts \ | |
-pass 1 -passlogfile "ffmpeg2pass-${src%.*}" \ | |
$vopts -speed 4 \ | |
-an \ | |
-f webm -y /dev/null | |
ffmpeg -i "$src" $opts \ | |
-pass 2 -passlogfile "ffmpeg2pass-${src%.*}" \ | |
$vopts $vopts_final \ | |
$aopts \ | |
"$dst" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment