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.

    • @DonutVeteran@lemmy.ml
      link
      fedilink
      53 years ago

      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 a youtube-dl issue, not a problem with the script.

      • dandelion
        link
        fedilink
        33 years ago

        suggesting to update it, update it!

        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.

      • HMHOP
        link
        fedilink
        33 years ago

        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 :)