Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
corbin ( corbin@infosec.pub )  to Open Source@lemmy.mlEnglish · 2 years ago

Yt-dlp is the best way to download videos and audio

www.spacebar.news

external-link
message-square
43
link
fedilink
296
external-link

Yt-dlp is the best way to download videos and audio

www.spacebar.news

corbin ( corbin@infosec.pub )  to Open Source@lemmy.mlEnglish · 2 years ago
message-square
43
link
fedilink
How to use yt-dlp: The best video and audio downloader
www.spacebar.news
external-link
You can use yt-dlp on to save and convert media from YouTube, SoundCloud, TikTok, Reddit, and many other sites.
alert-triangle
You must log in or # to comment.
  • grte ( grte@lemmy.ca ) 
    link
    fedilink
    arrow-up
    33
    ·
    2 years ago

    One of my favourite applications. I stopped paying for spotify and just use this to get music these days. Everything gets uploaded to youtube anyways.

    • theshatterstone54 ( theshatterstone54@feddit.uk ) 
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      Does it automatically grab things like metadata (author, cover art, etc.) for you? And if it requires a flag, do you know it?

      • grte ( grte@lemmy.ca ) 
        link
        fedilink
        arrow-up
        8
        ·
        2 years ago

        I don’t bother personally for the most part but it seems like you can do it via --embed-metadata, --parse-metadata, and --embed-thumbnail.

      • majestictechie ( majestictechie@lemmy.fosshost.com ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 years ago

        May I suggest SpotDL specifically for Spotify: https://github.com/spotDL/spotify-downloader

        • Kallioapina ( Kallioapina@lemmy.dbzer0.com ) 
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 years ago

          Does it work anymore? I’ve been getting the 500 error while trying to use it for a couple of months non stop.

          • majestictechie ( majestictechie@lemmy.fosshost.com ) 
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 years ago

            I’ve been using it recently without many issues

            • Kallioapina ( Kallioapina@lemmy.dbzer0.com ) 
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 years ago

              Huh. Wonder why its so finicky. Oh well, maybe I’ll give it another go in the future.

  • thingsiplay ( thingsiplay@beehaw.org ) 
    link
    fedilink
    arrow-up
    27
    ·
    2 years ago

    Maybe a little bit shameless plug from me, but I want point to my Bash script for Linux to make the daily yt-dlp life easier: https://github.com/thingsiplay/yt-dlp-lemon yt-dlp-lemon -h will show only a few options and yt-dlp-lemon -H shows everything the script supports.

    • Blisterexe ( Blisterexe@lemmy.zip ) 
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      Oh hey i saw you in the comments of a brodie robertson video

      • thingsiplay ( thingsiplay@beehaw.org ) 
        link
        fedilink
        arrow-up
        6
        ·
        2 years ago

        Haha, hello there. World is small sometimes. :p

  • TypicalHog ( TypicalHog@lemm.ee ) 
    link
    fedilink
    English
    arrow-up
    18
    ·
    2 years ago

    Absolutely. Bar none. Here’s my config for downloading best quality YT videos (but works for other sites too) if anyone wants to base theirs on it: https://pastebin.com/ba9sFURT

  • theshatterstone54 ( theshatterstone54@feddit.uk ) 
    link
    fedilink
    arrow-up
    9
    ·
    2 years ago

    It’s the main way I watch youtube now. After Piped and Newpipe stopped working for me across all devices, I only use 2 methods of watching Youtube now. Open in mpv (which is configured to use yt-dlp in the backend to make things faster), and download using yt-dlp. So it’s key to me keeping on watching Youtube. Recently, I’ve started getting ads showing up even on Mobile Vivaldi, so no more YT on my phone.

    So my new workflow is to use Piped to find a video, then copy the end of the link and type "yt-dlp " in a terminal, wait for the video(s) to download, and open in mpv.

    OR

    In some cases, use Qutebrowser, with a custom keybind to open a video in mpv.

    • KingJalopy  ( KingJalopy@lemm.ee ) 
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      Newpipe works fine for me. They always fix it almost immediately.

      • theshatterstone54 ( theshatterstone54@feddit.uk ) 
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Yeah, but I use a fork called Tubular so I can get SponsorBlock and ReturnYoutubeDislike.

        Edit: Turns out I just missed that there was an update. Phone playback is back!

    • BrikoX ( BrikoX@lemmy.zip ) 
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 years ago

      Try FreeTube.

    • delirious_owl ( delirious_owl@discuss.online ) 
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      How often does that break?

      • theshatterstone54 ( theshatterstone54@feddit.uk ) 
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Yt-dlp or mpv? Never.

        Newpipe and piped? Newpipe takes about a week or two, to rebreak after a fix. Piped has been broken and not updated yet, for a while.

    • corbin ( corbin@infosec.pub ) OP
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Maybe just pay for YouTube Premium at at that point? It pays the video creators, and you don’t have to have a janky playback setup.

      • GolfNovemberUniform ( GolfNovemberUniform@lemmy.ml ) 
        link
        fedilink
        arrow-up
        7
        ·
        edit-2
        2 years ago

        deleted by creator

        • corbin ( corbin@infosec.pub ) OP
          link
          fedilink
          arrow-up
          6
          ·
          2 years ago

          If you don’t like Google keeping a cut, then sign up for all the Patreons for everyone you watch.

          • GolfNovemberUniform ( GolfNovemberUniform@lemmy.ml ) 
            link
            fedilink
            arrow-up
            6
            ·
            edit-2
            2 years ago

            deleted by creator

            • corbin ( corbin@infosec.pub ) OP
              link
              fedilink
              arrow-up
              2
              ·
              2 years ago

              Right, that’s why ads exist.

              • e$tGyr#J2pqM8v ( 96VXb9ktTjFnRi@feddit.nl ) 
                link
                fedilink
                arrow-up
                5
                ·
                2 years ago

                Ads exist because people want to make money. So these bad actors go out and look for places where people like to spend their time, and they poison these places with their money-hungry practices. In the process they destroy the innocence of all these manifestations of human creativity, and manipulate people into buying shit they don’t actually need, effectively destroying the planet through overconsumption. That’s not even mentioning that ad-companies put us on a path towards a mass-surveillance society, just because big-data leads to more effective ads. I can’t help but see ads as a destructive force of evil in our world. I like human creativity in it’s many forms, and I’m all in favor of rewarding creators to a certain extent, but using ads seems to be the worst possible method of doing so.

                (not intending to criticize your comments, just spreading the anti-ad gospel ;-)

                • corbin ( corbin@infosec.pub ) OP
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  edit-2
                  2 years ago

                  I don’t like ads either, but they are the only functioning way of paying creators outside of direct payments, especially with economic inflation and competition from streaming services eating away at people’s budget for media. No one else has a solution that works under capitalism.

              • GolfNovemberUniform ( GolfNovemberUniform@lemmy.ml ) 
                link
                fedilink
                arrow-up
                4
                ·
                edit-2
                2 years ago

                deleted by creator

                • corbin ( corbin@infosec.pub ) OP
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  2 years ago

                  The two options for compensating a creator for their work online are advertisements or direct payments. There are no other functional alternatives. In a better world, more countries would have grants or universal basic income, but that’s not the world that exists right now.

  • kowcop ( kowcop@aussie.zone ) 
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 years ago

    I have been using Jdownloader2 for years… I don’t know what the differences are, but might be an option for people who want something GUI based

    • Overshoot2648 ( Overshoot2648@lemm.ee ) 
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      If you need a gui or are trying to monitor playlists I would recommend TubeArchivist.

  • Overshoot2648 ( Overshoot2648@lemm.ee ) 
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    yt-dlp is great, but if you need to archive playlists automatically, want a repository, or otherwise prefer a gui I would recommend TubeArchivist.

  • MacroCyclo ( MacroCyclo@lemmy.ca ) 
    link
    fedilink
    arrow-up
    7
    ·
    2 years ago

    I tried a few times, but the video and audio are often out of sync. Anyone have this issue?

    • thingsiplay ( thingsiplay@beehaw.org ) 
      link
      fedilink
      arrow-up
      12
      ·
      2 years ago

      Strange. I downloaded thousands of videos with this tool (but just watched a handful of them) and never noticed an out of sync. Can you point me to a video I can download and test where you have this issue? Is it a new issue? Maybe Google is trolling us or you or your region.

      • MacroCyclo ( MacroCyclo@lemmy.ca ) 
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        https://m.youtube.com/watch?v=zeDwH44xTIU

        This one was real bad

        • thingsiplay ( thingsiplay@beehaw.org ) 
          link
          fedilink
          arrow-up
          4
          ·
          2 years ago

          I’ve downloaded it and replayed the video file in VLC Player. Just skipped parts and listened to it a few seconds, also towards and at the end when we see the person speaking. It looks fine to me, the lips are synced to what he is speaking. Besides that the uploader could have made a mistake (I’ve seen videos desynced online), this seems to be fine. It could be a problem with the video player or codec on your system? Or the ffmpeg version you have (yt-dlp uses ffmpeg to do stuff).

          It’s hard to say what’s going on. I can only confirm that downloading this video with yt-dlp looks correctly synced to me. Edit: I remember in the past I had a video player that would out of sync for long video sessions. It was a problem with some codec not properly supported or like that and switching the video player worked. I have no more information, it was random on a Tuesday morning years ago.

          • MacroCyclo ( MacroCyclo@lemmy.ca ) 
            link
            fedilink
            arrow-up
            3
            ·
            2 years ago

            Wow, thanks for the reply! I guess it must be a problem on my end. I was playing with kodi on a raspberry pi, so I’m not surprised, but really helpful to know that it’s not the downloader.

            • pemptago ( pemptago@lemmy.ml ) 
              link
              fedilink
              English
              arrow-up
              3
              ·
              2 years ago

              I’ve had audio sync issues on kodi myself-- specifically osmc on Vero V which is optimized for playback. I tried checking my notes, because it was some time ago. Nothing definitive, but it may have been related to a random crashing issue that turned out to be a bad hdmi port-- which was the last thing I considered checking after triple checking everything else. Anyway, good luck with the troubleshooting. Audio sync issues are a pain but I can also attest yt-dlp has been solid.

  • delirious_owl ( delirious_owl@discuss.online ) 
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    Does it work for movies that “require you to sign in to verify your age”?

    • ILikeBoobies ( ILikeBoobies@lemmy.ca ) 
      link
      fedilink
      arrow-up
      5
      ·
      2 years ago

      Yes

      https://github.com/yt-dlp/yt-dlp/pull/8301

      Has been merged

  • corbin ( corbin@infosec.pub ) OP
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    If you like this article, please consider following the site on Mastodon/Fedi, email, or RSS. It helps me get information like this out to a wider audience :)

    • delirious_owl ( delirious_owl@discuss.online ) 
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Your email link doesn’t work. Try it in Tor Browser with js disabled.

      • corbin ( corbin@infosec.pub ) OP
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        The email signup and user management panel needs JavaScript, yeah.

  • Chemical Wonka ( chemicalwonka@discuss.tchncs.de ) 
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 years ago

    I tried to download some videos from Reddit using YT-DLP and it didn’t work, I think maybe because Reddit limited access

    • thingsiplay ( thingsiplay@beehaw.org ) 
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md

      Reddit is listed in the list of supported sites. I just tested it with a random post video post on Reddit, and it downloaded the file perfectly fine (played in local player). My theory you either did a user error and gave a link that is not a video post, I’m not sure if posts that link to a video would work, I think the post itself must be a video post. Or you tested it when Reddit blocked yt-dlp. The yt-dlp team needs to update it first, then it functions again. YouTube does the same.

    • corbin ( corbin@infosec.pub ) OP
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      I don’t think I’ve had issues with reddit, as long as you use the link to the reddit comment thread, not one of the shortlinks or the video link or something else.

  • BehindTheBarrier ( BehindTheBarrier@programming.dev ) 
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    If you use it frequently, I suggest getting a GUI that have profiles or remember options so you don’t have to mess with commands all the time. I wrote my own little command line wrspper which is Windows only since I don’t have Linux to test on. Though it shouldn’t take much effort to add support.

    Makes it much more convenient when you don’t have to specify things like archive (ignore duplicates), filename to be “artist - title” (where possible), download destination, etc. Just alt-tab, Ctrl-v, Enter. And the download is running. And mine also has parallel downloads and queue for when you got many slow downloads.

  • e$tGyr#J2pqM8v ( 96VXb9ktTjFnRi@feddit.nl ) 
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    This is wonderful, I’ve been struggling with piped for some time now, it’s always asking me to sign in to confirm that I’m not a bot. Also it’s showing me videos in very low quality and often it stops loading halfway through the video. With this I get to see good quality videos once more, without unwanted pauses and without financing yt in any way. Great!

Open Source@lemmy.ml

opensource@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !opensource@lemmy.ml

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

  • Open Source Initiative
  • Free Software Foundation
  • Electronic Frontier Foundation
  • Software Freedom Conservancy
  • It’s FOSS
  • Android FOSS Apps Megathread

Rules

  • Posts must be relevant to the open source ideology
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !libre_culture@lemmy.ml
  • !libre_software@lemmy.ml
  • !libre_hardware@lemmy.ml
  • !linux@lemmy.ml
  • !technology@lemmy.ml

Community icon from opensource.org, but we are not affiliated with them.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 35 users / day
  • 636 users / week
  • 2K users / month
  • 4.54K users / 6 months
  • 867 local subscribers
  • 49.5K subscribers
  • 3.01K Posts
  • 23.4K Comments
  • Modlog
  • mods:
  • Evan ( Cloak@lemmy.ml ) 
  • kevincox ( kevincox@lemmy.ml ) 
  • CrypticCoffee ( CrypticCoffee@lemmy.ml ) 
  • Lettuce eat lettuce ( Lettuceeatlettuce@lemmy.ml ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code