ulthar.xyz > Repos

dotfiles

Seven years worth of accumulated configuration cruft
About Files Commits git clone https://ulthar.xyz/repos/dotfiles/dotfiles.git

dotfiles/scripts/.local/bin/flac2opus

Download raw file: scripts/.local/bin/flac2opus

#!/bin/sh
# Given a flac file on $1 convert it to an opus file without losing
# any metadata; deleting the original.

[ -z "$1" ] && {
	printf "Convert a flac to an opus.  Usage: flac2opus [file.flac]\n"
	exit 1
}

target="${1%%.flac}.opus"
[ ! -f "$target" ] && {
	ffmpeg -i "$1" -f flac - | opusenc - "$target"
	rm -f "$1"
}
Generated 2025-03-07 15:24:27 -0700 by RepoRat