annotate bin/yt2mp3.sh @ 860:af998083be84

add ssh keys
author Jeff Hammel <k0scist@gmail.com>
date Sat, 14 Apr 2018 16:01: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"