X-Git-Url: https://code.delx.au/transcoding/blobdiff_plain/74520912b5f9489ab5e27bcb0263b919c98f850a..0e73df4a0a1266c75f2a83b5b5262d7823d4e28e:/rip-audio diff --git a/rip-audio b/rip-audio index 4d23eab..205c9d8 100755 --- a/rip-audio +++ b/rip-audio @@ -4,22 +4,22 @@ MPLAYER="mplayer" FFMPEG="ffmpeg" if [ -z "$1" ]; then - echo "Usage: $0 filename" - exit 1 + echo "Usage: $0 filename" + exit 1 fi INPUT="$1" acodec="$( - "$MPLAYER" -identify -vo null -ao null -frames 0 "$INPUT" | - grep ID_AUDIO_CODEC | - cut -d= -f2 + "$MPLAYER" -identify -vo null -ao null -frames 0 "$INPUT" | + grep ID_AUDIO_CODEC | + cut -d= -f2 )" if [ "$acodec" = "ffaac" ]; then - ext=".m4a" + ext=".m4a" else - echo "Unknown audio codec! $acodec" - exit 1 + echo "Unknown audio codec! $acodec" + exit 1 fi OUTPUT="$(basename "$INPUT" | sed 's/\.[a-zA-Z1-9]*$//')${ext}"