Skip to content

Instantly share code, notes, and snippets.

@jingle
jingle / ape2mp3.sh
Created February 24, 2013 09:41
Convert ape to mp3 using avconv, split with mp3splt and cue
#!/bin/bash
find "$1" -type f -name "*.ape" -print0 | while read -d $'\0' song
do
output=${song%.ape}.mp3
cue=${song%.ape}.cue
avconv -i "$song" -b 192k "$output"
if ls "$cue" &> /dev/null; then
mp3splt -a -c "$cue" "$output"
@jingle
jingle / flac2mp3.sh
Created February 17, 2013 14:22
Convert flac to mp3 using avconv
#!/bin/bash
find "$1" -type f -name "*.flac" -print0 | while read -d $'\0' song
do
output=${song%.flac}.mp3
avconv -i "$song" -metadata album="$1" -metadata comment="Jingle" -b 192k "$output"
done