Skip to content

Commit

Permalink
Add encode-to-webm to encode videos using best VOD settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkanosis committed Sep 30, 2017
1 parent 4f70321 commit 3427a4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools-src/README
@@ -1,2 +1,3 @@
bdiff: diff huge files (several gigabytes, if needed), compile with -Wno-long-long
encode-to-webm: encode a video to webm
record-video: capture part of the screen as webm / git, requires github.com/lolilolicon/xrectsel
10 changes: 10 additions & 0 deletions tools-src/encode-to-webm
@@ -0,0 +1,10 @@
#! /usr/bin/zsh

if [ $# -ne 2 ]; then
echo "Usage: $(basename $0) <input.ext> <output.webm>" >&2
exit 1
fi

yes y | \
ffmpeg -i $1 -c:v libvpx-vp9 -pass 1 -b:v 1M -threads 0 -speed 4 -tile-columns 6 -frame-parallel 1 -an -f webm /dev/null && \
ffmpeg -i $1 -c:v libvpx-vp9 -pass 2 -b:v 1M -threads 0 -speed 1 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -b:a 64k -f webm $2

0 comments on commit 3427a4b

Please sign in to comment.