]> code.delx.au - transcoding/commitdiff
Fixed rip-audio to not need X11
authorJames Bunton <jamesbunton@delx.net.au>
Sat, 8 Jun 2013 09:00:19 +0000 (19:00 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Sat, 8 Jun 2013 09:00:19 +0000 (19:00 +1000)
rip-audio

index 1ed4d180695dfe46ba6df051e847bc96a718cf93..4d23eabcdd9a30738fb9ed64a7a68cf13da2ae03 100755 (executable)
--- a/rip-audio
+++ b/rip-audio
@@ -10,7 +10,11 @@ fi
 
 INPUT="$1"
 
-acodec="$("$MPLAYER" -identify -frames 0 "$INPUT" | grep ID_AUDIO_CODEC | cut -d= -f2)"
+acodec="$(
+       "$MPLAYER" -identify -vo null -ao null -frames 0 "$INPUT" |
+       grep ID_AUDIO_CODEC |
+       cut -d= -f2
+)"
 if [ "$acodec" = "ffaac" ]; then
        ext=".m4a"
 else