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.
-
AuthorPosts
-
January 12, 2023 at 7:00 pm #97281Member
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/releasesExample 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.06January 25, 2023 at 11:12 am #98224MemberRobin
::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/statusSo 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: jwmAfter 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.
January 25, 2023 at 1:26 pm #98233MemberXunzi_23
::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 executablesudo 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 executableJanuary 25, 2023 at 9:04 pm #98255Member
blur13
::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-dlpFor MVP on buster (and maybe bullseye):
sudo cp /usr/local/bin/yt-dlp /usr/bin/youtube-dl
or symlink (probably much better)
January 25, 2023 at 11:24 pm #98263MemberRobin
::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-512SUMSWindows is like a submarine. Open a window and serious problems will start.
January 27, 2023 at 9:17 pm #98432Member
blur13
::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.
January 28, 2023 at 2:19 am #98437MemberRobin
::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.
January 28, 2023 at 7:22 am #98438Member
blur13
::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
January 29, 2023 at 7:38 am #98490MemberRobin
::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-dlpAs 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.
January 29, 2023 at 8:13 am #98491MemberXunzi_23
::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-DLPsudo ln -s $(which yt-dlp) /usr/bin/youtube-dl
might also helpAnother 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.
January 29, 2023 at 9:04 am #98494MemberRobin
::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-dlpis 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.
January 29, 2023 at 1:01 pm #98500Member
blur13
::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/bestdepending on size of screen, improve performance on older machines.
- This reply was modified 3 months ago by blur13.
January 29, 2023 at 1:45 pm #98502MemberXunzi_23
::In case unclear the config has to be as below
/home/demo/.config/mpv/mpv.confMine 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.
February 22, 2023 at 8:19 am #100304Member
blur13
::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 !
-
AuthorPosts
- You must be logged in to reply to this topic.