Skip to content

Instantly share code, notes, and snippets.

@hghwng
Created September 2, 2017 01:35
Show Gist options
  • Save hghwng/1987f1dc94809c85d77d84c3b4665188 to your computer and use it in GitHub Desktop.
Save hghwng/1987f1dc94809c85d77d84c3b4665188 to your computer and use it in GitHub Desktop.
CBR mp3 quality ABX test with squishyball
#!/bin/sh
set -u
function towav {
ffmpeg -i "$1" -f wav "raw.wav"
}
function conv() {
fullname="$1"
bitrate="$2"
ffmpeg -i "$fullname" -ab "$bitrate" -f mp3 "$bitrate".mp3
ffmpeg -i "$bitrate".mp3 -f wav "$bitrate.wav"
rm "$bitrate".mp3
}
rm *.wav
# Usage: build src.flac
conv "$1" 128k &
conv "$1" 192k &
towav "$1" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment