ytdlp update available to 2023.06.01

Forum Forums General Tips and Tricks ytdlp update available to 2023.06.01

  • This topic has 13 replies, 3 voices, and was last updated Feb 22-8:19 am by blur13.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #97281
    Member
    Xunzi_23

      For those who like to keep up to date and use yt-dlp there is no need to wait
      for debian to catch up. yt-dlp is smart :-).
      Changelog and other downloads available at https://github.com/yt-dlp/yt-dlp/releases

      Example below, Using Terminal to update.

      $ sudo yt-dlp -U
      [sudo] enter your password:
      Latest version: 2023.01.06, Current version: 2022.11.11
      Current Build Hash f2592772909153062bd03e3b545df2ddfb0c477369624fd60a4e9cd9c2124943
      Updating to version 2023.01.06 …
      Updated yt-dlp to version 2023.01.06

      #98224
      Member
      Robin
        Helpful
        Up
        0
        ::

        Well, on a default antiX system this doesn’t work:

        $ sudo yt-dlp -U
        yt-dlp: error: yt-dlp's self-update mechanism is disabled on Debian.
        Please update yt-dlp using apt(8).
        See https://packages.debian.org/sid/yt-dlp for the latest packaged version.

        OK, checking which versions are available as this message demands:

        $ apt-cache policy yt-dlp
        yt-dlp:
          Installiert:           2022.05.19
          Installationskandidat: 2022.05.19
          Versionstabelle:
             2022.11.11-1~bpo11+1 100
                100 http://deb.debian.org/debian bullseye-backports/main amd64 Packages
                100 http://deb.debian.org/debian bullseye-backports/main i386 Packages
         *** 2022.05.19 500
                500 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/antix/bullseye bullseye/main amd64 Packages
                500 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/antix/bullseye bullseye/main i386 Packages
                100 /var/lib/dpkg/status

        So I decided to install the more recent version from the backports instead, which drew in some additional packages:

        $ sudo apt-get install yt-dlp=2022.11.11-1~bpo11+1
        Paketlisten werden gelesen… Fertig
        Abhängigkeitsbaum wird aufgebaut… Fertig
        Statusinformationen werden eingelesen… Fertig
        Die folgenden zusätzlichen Pakete werden installiert:
          python3-brotli smtube
        Vorgeschlagene Pakete:
          phantomjs
        Die folgenden NEUEN Pakete werden installiert:
          python3-brotli
        Die folgenden Pakete werden aktualisiert (Upgrade):
          smtube yt-dlp
        2 aktualisiert, 1 neu installiert, 0 zu entfernen und 46 nicht aktualisiert.
        Es müssen 2.226 kB an Archiven heruntergeladen werden.
        Nach dieser Operation werden 2.117 kB Plattenplatz zusätzlich benutzt.
        Möchten Sie fortfahren? [J/n] j
        Holen:1 http://deb.debian.org/debian bullseye-backports/main amd64 yt-dlp all 2022.11.11-1~bpo11+1 [1.655 kB]
        Holen:2 http://ftp.de.debian.org/debian bullseye/main amd64 python3-brotli amd64 1.0.9-2+b2 [297 kB]
        Holen:3 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/antix/bullseye bullseye/main amd64 smtube amd64 21.10.0-1+3.7 [274 kB]
        Es wurden 2.226 kB in 2 s geholt (1.098 kB/s).                                                      
        (Lese Datenbank ... 241566 Dateien und Verzeichnisse sind derzeit installiert.)
        Vorbereitung zum Entpacken von .../smtube_21.10.0-1+3.7_amd64.deb ...
        Entpacken von smtube (21.10.0-1+3.7) über (21.10.0-0.1~mx21+1) ...
        Vormals nicht ausgewähltes Paket python3-brotli wird gewählt.
        Vorbereitung zum Entpacken von .../python3-brotli_1.0.9-2+b2_amd64.deb ...
        Entpacken von python3-brotli (1.0.9-2+b2) ...
        Vorbereitung zum Entpacken von .../yt-dlp_2022.11.11-1~bpo11+1_all.deb ...
        Entpacken von yt-dlp (2022.11.11-1~bpo11+1) über (2022.05.19) ...
        python3-brotli (1.0.9-2+b2) wird eingerichtet ...
        yt-dlp (2022.11.11-1~bpo11+1) wird eingerichtet ...
        smtube (21.10.0-1+3.7) wird eingerichtet ...
        Trigger für desktop-file-utils (0.26-1) werden verarbeitet ...
        Trigger für hicolor-icon-theme (0.17-2) werden verarbeitet ...
        Trigger für man-db (2.9.4-2) werden verarbeitet ...
        Trigger für mailcap (3.69) werden verarbeitet ...
        Writing Menu: fluxbox
        Writing Menu: icewm
        Writing Menu: jwm

        After this package update some issues concerning throttled download were resolved.

        But this newer version breaks MPV obviously:

        [ytdl_hook]  
        [ytdl_hook] youtube-dl failed: not found or not enough permissions 
        Failed to recognize file format.

        So I had to downgrade back to 2022.05.19 version of yt-dlp, which solved the MPV issues immediately, while bringing back the throtteling issues when using yt-dlp for video download directly the same moment also.

        Any ideas?

        Windows is like a submarine. Open a window and serious problems will start.

        #98233
        Member
        Xunzi_23
          Helpful
          Up
          0
          ::

          Hi Robin, Sorry I should have tested the debian and backports repo version before posting.
          would have then noted direct update function is removed or blocked. Will try and do better next time.

          Debian is usualy weeks behind latest release except at times sid, ytdlp user then missing bugfixes
          and enhancments, after experiencing usage errors together with ytfzf I installed directly from the
          delevopers page.

          Installation instructions from https://github.com/yt-dlp/yt-dlp/wiki/Installation#linuxmacos
          Many released files here: https://github.com/yt-dlp/yt-dlp#release-files
          Usage and options are also listed on above github page.

          sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
          sudo chmod a+rx /usr/local/bin/yt-dlp # Make executable

          sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
          sudo chmod a+rx /usr/local/bin/yt-dlp # Make executable

          #98255
          Member
          blur13
            Helpful
            Up
            0
            ::

            update yt-dlp

            sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
            sudo chmod a+rx /usr/local/bin/yt-dlp

            For MVP on buster (and maybe bullseye):

            sudo cp /usr/local/bin/yt-dlp /usr/bin/youtube-dl

            or symlink (probably much better)

            #98263
            Member
            Robin
              Helpful
              Up
              0
              ::

              Won’t all this get constantly overwritten by each new antiX system update, since apt doesn’t know about these manual modifications? Shouldn’t something get set on hold to avoid overwriting when applying your proposal? And what about the new and updated dependencies expected when installing this yt-dlp binary file using direct download? Will it work without these?

              I believe, at least the sha checksum should be checked after curl download before using the binary:

              curl -L https://github.com/yt-dlp/yt-dlp/releases/download/2023.01.06/SHA2-512SUMS
              shasum -c SHA2-512SUMS

              Windows is like a submarine. Open a window and serious problems will start.

              #98432
              Member
              blur13
                Helpful
                Up
                1
                ::

                Since the downloaded yt-dlp is placed in /usr/local/bin/ it takes preference over whatever is in /usr/bin.

                The release binary still needs python, but thats already included in stock debian. You could try yt-dlp_linux, the linux standalone x64 binary if you have issues.

                If you can get the backports version to work with mpv that would be great. Maybe symlink yt-dlp and youtube-dl.

                #98437
                Member
                Robin
                  Helpful
                  Up
                  0
                  ::

                  Since the downloaded yt-dlp is placed in /usr/local/bin/ it takes preference over whatever is in /usr/bin.

                  Many thanks, blur13, for this great hint. I wasn’t aware of this mechanism, so I would have copied the downloaded yt-dlp over the existing executable present in /usr/bin, believing each tool must live in its original location in order to get called properly from some other program. But your advice makes sense to me, I’ll give it a try.

                  If you can get the backports version to work with mpv that would be great. Maybe symlink yt-dlp and youtube-dl.

                  Honestly, I have no clue what to symlink from where to where.

                  Windows is like a submarine. Open a window and serious problems will start.

                  #98438
                  Member
                  blur13
                    Helpful
                    Up
                    0
                    ::

                    you can try:

                    which yt-dlp

                    to see the location of the file getting called when simply typing yt-dlp

                    Create symlink ‘youtube-dl’ pointing to yt-dlp : cd /usr/local/bin; ln -s yt-dlp youtube-dl

                    #98490
                    Member
                    Robin
                      Helpful
                      Up
                      0
                      ::

                      Many thanks, blur13.

                      I did now:

                      $ which yt-dlp
                      /usr/bin/yt-dlp
                      
                      sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
                      ...
                      
                      $ sudo chmod a+rx /usr/local/bin/yt-dlp
                      
                      $ which yt-dlp
                      /usr/local/bin/yt-dlp
                      
                      

                      As you can see, the location from where yt-dlp is called by default on this system has changed now after manual download, simply by copying the file into the /usr/local/bin folder.

                      Both issues I had described seemed to be solved.

                      But then I found out that MPV still uses the old yt-dlp version present in /usr/bin instead the new one. (Temporarily renamed the file there caused MPV to stop working, which shouldn’t occur if the new version from /usr/local/bin would be in use. Countercheck: When temporarily renaming the file in /usr/local/bin the MPV works properly, so this file clearly is not used by MPV).

                      So all this looks like a giant labyrinthe to me still. No idea how to resolve this properly.

                      Windows is like a submarine. Open a window and serious problems will start.

                      #98491
                      Member
                      Xunzi_23
                        Helpful
                        Up
                        0
                        ::

                        Why things worked for me on an inherited system I do not know. Just seemed easy.
                        Maybe an mpv version problem.

                        From internet posts by an arch user.

                        Please edit your home mpv.conf adding
                        script-opts=ytdl_hook-ytdl_path=PATH-TO-YT-DLP

                        sudo ln -s $(which yt-dlp) /usr/bin/youtube-dl
                        might also help

                        Another person replaced ytdl with ytdlp and renamed it to ytdl claiming success. If all else fails worth a try.

                        In the forum there are many posts on how to improve playback, well worth trying different mpv config optioms

                        • This reply was modified 3 months ago by Xunzi_23.
                        • This reply was modified 3 months ago by Xunzi_23.
                        #98494
                        Member
                        Robin
                          Helpful
                          Up
                          0
                          ::

                          Many thanks, Xunzi_23!

                          sudo ln -s $(which yt-dlp) /usr/bin/youtube-dl

                          This command will link explicitely to the old version of yt-dlp instead of the new one, while

                          $ ls -l /usr/bin/youtube-dl
                          lrwxrwxrwx 1 root root 6 30. Mai 2022  /usr/bin/youtube-dl -> yt-dlp

                          is already present on default antiX 21/22
                          which always should link to the version recently in use by the system when calling yt-dlp without giving explicitely a path (which is the version displayed by which yt-dlp). Obviously mpv disregards this.

                          Please edit your home mpv.conf

                          Unfortunately on default antiX there doesn’t exist this specific file.
                          Searched the complete system in order to locate it, using find / -name mpv.conf -type f 2>/dev/null , but it doesn’t live in any other location also.
                          There is a folder ~/.config/mpv containing a private input.conf file created by aCSTV automatically.

                          It is crucial not to change the default settings (and behaviour) of MPV in order not to break aCSTV, so it is not an option to copy an arbitrary personal mpv config file from somewhere in internet.

                          This labyrinth seems to grow even deeper and way more impenetrable than ever expected.

                          Windows is like a submarine. Open a window and serious problems will start.

                          #98500
                          Member
                          blur13
                            Helpful
                            Up
                            0
                            ::

                            Thats crazy. On antix 19 I had success downloading yt-dlp to /usr/local/bin/ and then sudo cp /usr/local/bin/yt-dlp /usr/bin/youtube-dl

                            “Please edit your home mpv.conf adding
                            script-opts=ytdl_hook-ytdl_path=PATH-TO-YT-DLP”

                            This does not work on my system, but I have seen it reported in lots of forums. As noted above, it might be a mpv version problem. The version on antix 19 is 32.

                            EDIT:

                            You have to create .config/mpv/mpv.conf yourself. A lot of the options you place in there could equally be placed as command flags when running mpv from the terminal. Placing common options in mpv.conf saves yourself some typing (or creating alias). Eg put in a line with fs=yes will run movies in fullscreen by default. Instead of typing mpv -fs movie.mp4 each time.

                            Also, one of

                            ytdl-format=bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best
                            ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9]+bestaudio/best

                            depending on size of screen, improve performance on older machines.

                            • This reply was modified 3 months ago by blur13.
                            #98502
                            Member
                            Xunzi_23
                              Helpful
                              Up
                              0
                              ::

                              In case unclear the config has to be as below
                              /home/demo/.config/mpv/mpv.conf

                              Mine contains a setup from subluminal. It is large and only good on a fairly powerful machine..
                              https://github.com/subluminal-byte/mpv-config-video-image-viewer/tree/master/mpv
                              ytdlp is latest
                              mpv 0.35.0-4. for clarity the testing/bookworm deb multimedia org package is mpv 1:0.35.0-dmo1 Clarity is relative 😕

                              aCSTV worked from the day it was first offered and still works fine, just tested to be sure..Good application.
                              I have fed the mpv.conf with new settings over last days and weeks aCSTV never faltered which is the way it
                              should be.

                              from the fine and extensive manual section Linux.

                              Web address https://mpv.io/manual/master/#options-ytdl no edit or shortening made, there are a huge number of options available.

                              ytdl_path=youtube-dl
                              Configure paths to youtube-dl’s executable or a compatible fork’s. The paths should be separated by : on Unix and ; on Windows. mpv looks in order for the configured paths in PATH and in mpv’s config directory. The defaults are “yt-dlp”, “yt-dlp_x86” and “youtube-dl”. On Windows the suffix extension “.exe” is always appended.

                              Added: quote: a comment from the mpv io manual page

                              Why do the option names mix _ and -?
                              I have no idea.

                              mpv is very powerful, the manual is extensive, well worth spending an hour or hours reading and playing. Nice running live no persist. break something grin and reboot.

                              Some more good info at https://wiki.archlinux.org/title/Mpv

                              • This reply was modified 3 months ago by Xunzi_23.
                              • This reply was modified 3 months ago by Xunzi_23.
                              • This reply was modified 3 months ago by Xunzi_23.
                              #100304
                              Member
                              blur13
                                Helpful
                                Up
                                1
                                ::

                                Noticed that the latest yt-dlp got updated from the antiX repos today, so that saves us all the trouble of doing manual installs. Thank you @anticapitalista !

                              Viewing 14 posts - 1 through 14 (of 14 total)
                              • You must be logged in to reply to this topic.