Mercurial > hg > config
annotate bin/yt2mp3.sh @ 751:753b1c2bd64c
match is NOT POSIX
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 30 Jun 2015 15:35:34 -0700 |
parents | 4f49c0caa801 |
children |
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" |