Skip to content

Instantly share code, notes, and snippets.

View evan-sm's full-sized avatar
🌊

Ivan Smyshlyaev evan-sm

🌊
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@evan-sm
evan-sm / convert-to-vp9-ogg-webm-and-normalize-audio.sh
Created April 17, 2016 17:13 — forked from hvrauhal/convert-to-vp9-ogg-webm-and-normalize-audio.sh
This script uses ffmpeg to convert video to vpx9 and audio to vorbis, then sox to normalize audio, and finally ffmpeg to bundle the streams back together
#!/bin/zsh
# Install needed tools:
# brew install sox --with-libvorbis
# brew install ffmpeg --with-libvpx --with-libvorbis --with-opus --with-faac
set -e
FILENAME=$1
echo "Converting $FILENAME to webm + ogg with normalized audio"
ffmpeg -i ${FILENAME} -c:a libvorbis -vn ${FILENAME}_audio_orig.ogg
ffmpeg -i ${FILENAME} -c:v libvpx-vp9 -crf 50 -b:v 0 -vf scale=840:-1 -g 50 -an ${FILENAME}_video_orig.webm