Skip to content

Instantly share code, notes, and snippets.

@jackyueq
Last active December 15, 2015 00:48
Show Gist options
  • Select an option

  • Save jackyueq/5175042 to your computer and use it in GitHub Desktop.

Select an option

Save jackyueq/5175042 to your computer and use it in GitHub Desktop.
FLAC 2 CD
#!/bin/sh
#
# flac2cd.sh - Recreate a CD from FLAC file $1.
# Written 4 Apr 2007 by M. Dickerson (too trivial for a license,
# don't you think?)
set -e
ME=`basename $0`
AUDIO=`tempfile -p $ME`
CUE=`tempfile -p $ME`
FLAC=$1
metaflac --export-cuesheet-to=- "$FLAC" | sed s!dummy.wav!$AUDIO! > $CUE
flac -f -o $AUDIO -d "$FLAC"
cdrecord -dao --cuefile=$CUE
rm $CUE $AUDIO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment