Skip to content

Instantly share code, notes, and snippets.

@sengupta
Created October 8, 2011 15:39
Show Gist options
  • Save sengupta/1272439 to your computer and use it in GitHub Desktop.
Save sengupta/1272439 to your computer and use it in GitHub Desktop.
#!/bin/bash
# dcyoutube.shyoutube-url [Output MP3 Name]
URL=$1
FILENAME=`youtube --get-filename $URL`
if [ -z $2]; then
NAME=`youtube -e $URL`
else
NAME=$2
fi
# echo This is the URL: $URL
youtube $URL
C:/Program\ Files\ \(x86\)/VideoLAN/VLC/vlc.exe -I dummy $FILENAME --no-sout-video --sout "#transcode{acodec=mp3,5Dab=AUDIO_BITRATE,channels=2}:std{access=file,mux=raw,dst=$NAME.mp3}" vlc://quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment