Created
July 15, 2011 09:04
-
-
Save rdetert/1084359 to your computer and use it in GitHub Desktop.
Want to convert your music files to mp3 because you've had the same CD in your car for 3 years? I thought so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
vlc="/Applications/VLC.app/Contents/MacOS/VLC" | |
ext="mp3" | |
dest="/Users/ryan/Desktop/mp3/" | |
for ARG in "$@"; do | |
NEWFILE="$dest$(basename "$ARG").$ext" | |
$vlc -I dummy -vvv "$ARG" --sout "#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:std{mux=raw,dst=\"$NEWFILE\",access=file}" vlc://quit | |
done | |
# usage: $ ./mp3_convert /path/to/my/music\ files/*.m4a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment