Skip to content

Instantly share code, notes, and snippets.

@sfan5 sfan5/webm_twopass.txt
Last active Apr 28, 2017

What would you like to do?
script for twopass encoding of webms
#!/bin/bash -e
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 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.