-
-
Save erjiang/49606f7ac3ddcf43e3e5 to your computer and use it in GitHub Desktop.
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/bash | |
# copied from https://github.com/exogen/dotfiles/blob/730fb8e2b72b2fc3aa3d90b889874bb5195e1d07/.profile#L65 | |
# Skip DASH manifest for speed purposes. This might actually disable | |
# being able to specify things like 'bestaudio' as the requested format, | |
# but try anyway. | |
# Get the best audio that isn't WebM, because afplay doesn't support it. | |
# Use "$*" so that quoting the requested song isn't necessary. | |
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 "$*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment