As squeezeserver/squeezebox doesn’t like m4a/aac, I wrote a simple script to convert an mp3 version with ffmpeg if it doesn’t already exist.

#!/bin/sh FFMPEG_BIN=’ffmpeg’ EXTM=’.mp3’ EXTA=’.m4a’

for i in $( ls *m4a ); do FILENAME=echo $i | rev | cut -c 5- | rev if ls $FILENAME$EXTM » /dev/null 2>&1; then echo “$FILENAME$EXTM exists” else echo “$FILENAME$EXTM does not exist” $FFMPEG_BIN -v 5 -y -i $FILENAME$EXTA -acodec libmp3lame -ac 2 -ab 192k $FILENAME$EXTM fi done

exit 1