annotate bin/yt2mp3.sh @ 788:fa3ad63ec3a3

https://github.com/novas0x2a/config-files/blob/master/.gitconfig#L89
author Jeff Hammel <k0scist@gmail.com>
date Wed, 28 Sep 2016 16:42:20 -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"