annotate bin/yt2mp3.sh @ 98:50ce2095cee5

changes to vpn script
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 19 Oct 2010 16:41:05 -0700
parents 4f49c0caa801
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
1 #!/bin/bash
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
2
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
3 YOUTUBEDL=/home/jhammel/music/youtube-dl
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
4
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
5 URL=$1
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
6 TITLE=$($YOUTUBEDL --get-title $URL)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
7 EXT=mp4
83
4f49c0caa801 modification for new youtube-dl
Jeff Hammel <jhammel@mozilla.com>
parents: 77
diff changeset
8 $YOUTUBEDL -i -r 50k $URL -o "%(title)s.${EXT}"
0
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
9 rm -f audiodump.wav
83
4f49c0caa801 modification for new youtube-dl
Jeff Hammel <jhammel@mozilla.com>
parents: 77
diff changeset
10 mplayer -vo null -ao pcm "$TITLE.$EXT"
0
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
11 lame -q 2 audiodump.wav "$TITLE.mp3"
83
4f49c0caa801 modification for new youtube-dl
Jeff Hammel <jhammel@mozilla.com>
parents: 77
diff changeset
12 #rm "$TITLE.$EXT"