• grte@lemmy.ca
    link
    fedilink
    arrow-up
    52
    arrow-down
    2
    ·
    4 months 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.

    • venusenvy47@reddthat.com
      link
      fedilink
      arrow-up
      8
      ·
      4 months ago

      I didn’t see anything like this image in the pytube-fix repo. Do you have a repo of the web interface somewhere? That looks really handy.

        • venusenvy47@reddthat.com
          link
          fedilink
          arrow-up
          1
          ·
          4 months ago

          Thanks! Would you happen to know how to install with pipx? I don’t fully understand Python venv stuff, but I followed instructions on how to install yt-dlp using pipx. I’m not clear on whether I could do that with your app.

          • ArtVandelay@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            4 months ago

            So, pipx only installs a single package into an isolated environment, and my app has a list of package dependencies that must all work together. If you run the instructions in my readme line by line, you should get it working, but I understand sometimes that’s not the way everyone wants to do things in a one-off manner. I have been spending some time this week getting my Dockerfile finalized and my build scripts working, so I hope to have a docker image ready within a few weeks at least of the application in its current state.

  • theshatterstone54@feddit.uk
    link
    fedilink
    arrow-up
    17
    arrow-down
    2
    ·
    4 months 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 <C-S-v>” 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.

      • theshatterstone54@feddit.uk
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        4 months 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!

      • theshatterstone54@feddit.uk
        link
        fedilink
        arrow-up
        2
        ·
        4 months 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.

    • nore {she/her}@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

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

      Why not just pass the YouTube link to mpv so you don’t have to wait for the video to download?

      • theshatterstone54@feddit.uk
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        4 months ago

        I still have to wait a long time for the video to load in the Mpv cache, and sometimes I want a bunch of videos to watch later (or watch multiple times if they’re educational). In which case, I either open up a bunch of videos in their own mpv windows and they all load while I’m watching the first one, or I download them while I’m doing something else.

        But loading a bunch of mpv windows is heavier than a bunch of terminals running yt-dlp (and I could also just switch to using tmux… which I probably should get around to at some point).

        • nore {she/her}@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          4 months ago

          I still have to wait a long time for the video to load in the Mpv cache

          In my experience the video loads in a few seconds compared to the minutes it’d take for it to download, but I get your second point.

          • gramgan@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            4 months ago

            Depends on the options mpv passes to yt-dlp—I personally have in my mpv config to grab 720p videos, so that it’s faster than downloading full quality.

    • corbin@infosec.pubOP
      link
      fedilink
      arrow-up
      3
      arrow-down
      31
      ·
      4 months 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.

        • corbin@infosec.pubOP
          link
          fedilink
          arrow-up
          5
          arrow-down
          3
          ·
          4 months ago

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

              • e$tGyr#J2pqM8v@feddit.nl
                link
                fedilink
                arrow-up
                5
                ·
                edit-2
                4 months 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@infosec.pubOP
                  link
                  fedilink
                  arrow-up
                  2
                  arrow-down
                  2
                  ·
                  edit-2
                  4 months 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.

              • JaggedRobotPubes@lemmy.world
                link
                fedilink
                English
                arrow-up
                4
                ·
                4 months ago

                Capitalism doesn’t change the fact that giant companies fundamentally lack the right to hijack my attention and implant their bullshit in my head.

                • corbin@infosec.pubOP
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  2
                  ·
                  4 months ago

                  Good news, there is a subscription service to prevent that and also still pays the creators.

              • GolfNovemberUniform@lemmy.ml
                link
                fedilink
                arrow-up
                4
                arrow-down
                1
                ·
                4 months ago

                But they don’t exist without terrible data collection with illegal elements. Dry capitalism never ends well, mister/miss.

                • corbin@infosec.pubOP
                  link
                  fedilink
                  arrow-up
                  2
                  arrow-down
                  4
                  ·
                  4 months 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.

      • N3Cr0@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        edit-2
        4 months ago

        No matter how hanky this setup is, the official YouTube app is jankier.

        It pays the video creators

        Then why are almost all of them on patreon and ask for a donation?

  • Overshoot2648@lemm.ee
    link
    fedilink
    arrow-up
    14
    ·
    4 months 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.

  • kowcop@aussie.zone
    link
    fedilink
    English
    arrow-up
    12
    ·
    4 months 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

  • BehindTheBarrier@programming.dev
    link
    fedilink
    arrow-up
    9
    ·
    4 months 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.

  • MacroCyclo@lemmy.ca
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    4 months ago

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

    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      12
      ·
      4 months 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.

        • thingsiplay@beehaw.org
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          4 months 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@lemmy.ca
            link
            fedilink
            arrow-up
            3
            ·
            4 months 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@lemmy.ml
              link
              fedilink
              English
              arrow-up
              3
              ·
              4 months 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.

  • Chemical Wonka@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    4 months ago

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

    • ☆ Yσɠƚԋσʂ ☆@lemmy.ml
      link
      fedilink
      arrow-up
      7
      ·
      4 months ago

      I made a script for grabbing reddit videos that’s been working pretty well for me, needs Babashka to run https://babashka.org/

      #!/usr/bin/env bb
      (require '[clojure.java.shell :refer [sh]]
               '[clojure.string :as string]
               '[cheshire.core :as cheshire]
               '[org.httpkit.client :as http]
               '[clojure.walk :as walk])
      
      (defn http-get [url]
        (-> @(http/get url {})
            :body))
      
      (defn find-base-url [data]
        (let [results (atom [])]
          (walk/postwalk
           (fn [node]
             (when (and (string? node) (.contains node "DASH"))
               (swap! results conj node))
             node)
           data)
          (some-> @results first (string/replace #"DASH_[0-9]+\.mp4" ""))))
      
      (defn find-best-quality [names audio?]
        (->> ((if audio? filter remove) #(.contains (.toLowerCase %) "audio") names)
             (sort-by
              (fn [n]
                (-> n
                    (string/replace #"\.mp4" "")
                    (string/replace #"[a-zA-Z_]" "")
                    (Integer/parseInt))))
             (last)))
      
      (defn find-parts [base-url data]
        (let [url (atom nil)
              _ (walk/prewalk
                 (fn [node]
                   (when (and (map? node)
                              (contains? node :dash_url))
                     (reset! url (:dash_url node)))
                   node)
                 data)
              xml (http-get @url)
              parts (->> (re-seq #"<BaseURL>(.*?)</BaseURL>" xml) (map second))
              best-video (find-best-quality parts false)
              best-audio (find-best-quality parts true)]
          [(str base-url best-video) (str base-url best-audio)]))
      
      (defn filename [url]
        (let [idx (inc (.lastIndexOf url "/"))]
          (subs url idx)))
      
      (defn tsname []
        (str "video-" (System/currentTimeMillis) ".mp4"))
      
      (let [data (-> (first *command-line-args*) (str ".json") http-get (cheshire/decode true)) 
            base-url (find-base-url data)
            [video-url audio-url] (find-parts base-url data)
            video-file (filename video-url)
            audio-file (filename audio-url)]
        (sh "wget" video-url)
        (sh "wget" audio-url)
        (sh "ffmpeg" "-i" video-file "-stream_loop" "-1" "-i" audio-file "-shortest" "-map" "0:v:0" "-map" "1:a:0" "-y" (tsname))
        (sh "rm" audio-file video-file))
      
    • corbin@infosec.pubOP
      link
      fedilink
      arrow-up
      3
      ·
      4 months 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.

    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      3
      ·
      4 months 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.

    • trunklz29@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      4 months ago

      Make sure yt-dlp is up to date. I’ve been able to download reddit, YouTube shorts, TikTok, videos etc just fine

  • e$tGyr#J2pqM8v@feddit.nl
    link
    fedilink
    arrow-up
    4
    ·
    4 months 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!