Created
April 8, 2016 23:04
-
-
Save hernantz/41112519c4db8525479f480db8f7b947 to your computer and use it in GitHub Desktop.
play any song from youtube
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
# play <some song name> | |
function play { | |
youtube-dl --default-search=ytsearch: \ | |
--youtube-skip-dash-manifest \ | |
--output="${TMPDIR:-/tmp/}%(title)-s%(id)s.%(ext)s" \ | |
--restrict-filenames \ | |
--format="bestaudio[ext!=webm]" \ | |
--exec=mplayer -vvv "$*" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment