5 ms·
If you use your browser for media consumption, this is a great shell addition (add to ~/.bashrc): function streamer() { youtube-dl -o - "$1" | vlc - }
by leetbulb 7y ago
If you use your browser for media consumption, this is a great shell addition (add to ~/.bashrc):
function streamer() {
youtube-dl -o - "$1" | vlc -
}
Then:
$ streamer <just about any media url>
Of course you need youtube-dl and vlc
- LukeShu 7y agoA while back I migrated from VLC to `mpv`. I much later learned from an HN comment that `mpv` automatically calls `youtube-dl` if it's installed; you can run $ mpv <just about any media url> without setting up any aliases or functions or mucking with calling youtube-dl yourself.
- leetbulb 7y agoVery nice, I will give this a try!
- ScottFree 7y agoThanks for suggesting mpv! I had never heard of it, but I'm not too happy with VLC or smplayer on MacOS so I gave it a shot. It's fantastic. Fast, responsive and it plays everything I've thrown at it.
- shadowoflight 7y agoTo anyone on MacOS who wants the efficiency of mpv with a nice GUI: IINA [1] is a slick video player for Mac, with minimal UI, web browser plugins, and gesture-based controls, and it's FOSS with mpv and youtube-dl on the backend. [1]: https://iina.io/ https://iina.io/
- ScottFree 7y agoI gave IINA a shot. It has a nicer UI, but it's not nearly as fast or responsive as mpv. No sale.
- shadowoflight 7y agoInteresting. I’ve found it to be significantly more responsive than VLC while being much more consistent with the Mac UI, but to each their own!
- majewsky 7y agoI have this in my zshrc to save the trouble of pasting URLs manually: mpv() { if [ $# -eq 0 ]; then command mpv "$(xsel -b)" else env mpv "$@" fi }
- deleted 7y ago[deleted]
- Macha 7y agoVLC is natively capable of playing YouTube videos. $ vlc <URL of YouTube video> Or just copy the URL and hit Ctrl-V at the main screen of the UI on Windows/Linux
- leetbulb 7y agoBut what if you want more than just YouTube? :) https://ytdl-org.github.io/youtube-dl/supportedsites.html https://ytdl-org.github.io/youtube-dl/supportedsites.html Very useful for even strange sites like my local news station that uses a broken Flash media player.
- asdff 7y agoYoutube also has rss feeds you can use in fun ways to fetch your content automatically.
- _def 7y agoYou can combine it with something like xclip and a desktop starter. So all you have to do is to copy the URL and click the icon. A browser extension would be even fancier, but I don't think that would work so easy permission wise :)