Created
December 29, 2011 16:04
-
-
Save kevinlipe/1534733 to your computer and use it in GitHub Desktop.
youtube-dl wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# wrapper around youtube-dl, from TJ Luoma (http://luo.ma) | |
FOUND=no | |
# these are the mp4 formats that YouTube supports, starting with the highest resolution | |
for FORMAT in 38 37 22 18 17 | |
do | |
echo "$NAME: Trying $FORMAT ..." | |
if [ "$FOUND" = "no" ] | |
then | |
youtube-dl -f "$FORMAT" --no-overwrites \ | |
-o "%(stitle)s-%(id)s.%(ext)s" "$@" && FOUND=yes # to use with burninator.scpt, this path has to be hard-coded. | |
fi | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment