I created a small bash script to search and play videos from YouTube with mpv as the web interface is just abysmal. The source code can be found here: https://github.com/H-M-H/yt
It uses youtube-dl to do the search and so no API key is required.
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
This is awsome! Thank you!
Awesome idea!
Looks cool! I’ll be sure to check this one out
I tried it and it works great 😄
However, for others trying the script, if
youtube-dl
throws an error when searching for videos suggesting to update it, update it! Yes, I figured that out…Debian/debian variant users can use backports if their stable version is already fully updated:
apt -t buster-backports install youtube-dl
fixed the error for me. Of course, this is ayoutube-dl
issue, not a problem with the script.Yes, I find it kind of strange to see that youtube-dl is a package in Debian and Ubuntu, since even on Arch it is not updated very often. Therefore I download the binary in a user home and use the minus U to self update it, whenever it throws errors, and then one can see that the software gets updated pretty often. So far that always solved these issues.
Yes, you are right,
youtube-dl
should be at a recent version :P! But I hope that this is all the maintenance there is to it. The script itself is really simple and probably won’t need updates any time soon as it just delegates all the work to other tools. Just as things should be with regard to the Unix philosophy :)GUI>CLI
I guess we can agree to disagree then :P. I much prefer CLI and that is the whole point of this little script!
You do you, sir