Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For a long time now for me youtube-dl downloads YouTube videos at 50kb/s, which makes it impractical to use in conjunction with mpv. I need to leave youtube-dl running in the background for several hours to then watch the video in mpv.

Now from the comments I've found out about yt-dlp[1] which claims to fix this issue[2]. Will check it out.

[1]: <https://github.com/yt-dlp/yt-dlp>

[2]: <https://github.com/ytdl-org/youtube-dl/issues/29326>



It does fix it. I switched to `yt-dlp` months ago and never had a problem with throttled downloads anymore.

Little later I also discovered I could use `yt-dlp` together with the `aria2c` downloader and now I am never going below 15 MB/s when downloading.


yt-dlp is absolutely fantastic. It has all sorts of neat features and fixes too, like better support for bigger playlists and even SponsorBlock integration. Also they were super helpful whenever I had an issue and even added fixes or features after I opened them!


How did you set this up?


Made a config file at the same location where `youtube-dl` stores its.

~/.config/youtube-dl/config.yt-dlp:

    --restrict-filenames
    --output '%(title)s.%(ext)s'
    --ignore-errors
    --embed-subs
    --all-subs
    --format 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'
    --embed-thumbnail
    --audio-quality 0
    --add-metadata
    --xattrs
    --xattr-set-filesize
    --prefer-free-formats
    --geo-bypass
    --no-mark-watched
    --console-title
    --no-warnings
    --downloader aria2c
    --downloader-args '-j 16 -s 16 -x 16 -k 1M'
Only the last 2 lines are pertinent here but I am including my entire config because it serves me very well.

And my ~/.zshrc alias:

    alias ytdl="yt-dlp --config-location ~/.config/youtube-dl/config.yt-dlp"


Thank you.


It’s not a bug. Youtube deliberately throttles downloads unless the client can answer a math question.


That's excessive for the oddly specific group of users who are ironically going to YouTube for math help.


seems like it would be exactly what they need


I think questions like « Prove that the union of finitely many compact sets in a topological space (X,τ) is also compact » would certainly achieve rate limiting and boost global math skills.


I seem passing by this really funny captcha on the Quantum Random Bit Generator Service's [1] signup page.

[1] http://random.irb.hr/signup.php


That's good, but unfortunately security through obscurity (in the true sense of the word).


Is this a quasi-captcha because of some legal reasons? I would assume math problems are easy to solve for a computer (easier than for most of the humans, actually).


It's just a flippant way of saying "hiding the URL or parameters behind running JavaScript that serves no other purpose than obfuscation". See also this commit:

https://github.com/yt-dlp/yt-dlp/commit/404f611f1c4aa516fbc4...

Of course this is easy to solve, but every layer of obfuscation they add generally requires someone to go and work around it in yt-dlp. It's mutually assured time waste on both sides.


> mutually assured time waste

I just learned an awesome new term. Thank you


I didn't know about this. How does it work? youtubedown gets around the throttling by opening a bunch of connections at once.


I've been using the old youtube-dl with aria2c downloader. That combination works well.

youtube-dl.exe -f "bestvideo[height<=2160][vcodec!^=av01]+bestaudio/best[height<=2160][vcodec!^=av01]" --all-subs --convert-subs srt --embed-subs --external-downloader aria2c

Gets me the best quality that my (fully offline) LG 4K TV can play.


Why blacklisting the AV01 codec?


AV1 hardware decoding is still fairly uncommon.


It definitely fixed the issue for me. I was stuck at ~50kb/s with youtube-dl but switching to yt-dlp increased speeds dramatically.


yt-dlp is worth it just for the sponsorblock integration.


I haven't used the sponsor block yet, any quick guide on how to do it?


It's mostly plug and play; on desktop install the browser extension and it just works!

There is some tuning to be done based on your own personal preference as you can tune it to _only_ skip sponsors, but by default it skips a variety of fluff

- Engagement reminders - Canned Intros - Self promotion

They're all marked by other users of the extension and I've never come across a malicious marking, so it's got a neat community, sadly I'm never early enough to contribute.

In the likes of YouTube Vanced (third party YouTube fork with integrated sponsorblock on android) it's simply a player, I resume the youtube-dl alternative works the same way


and more up to date extractors


I had the same problem and yt-dlp fixed it.


Came here to say this. I even tried with a VPN to see if the download speed wasn't throttled with it, but it's still ridiculously slow.

Thinking of switching to yt-dlp, but then how does yt-dlp get around the throttling? Does it emulate a browser to make it look like a normal viewing of a video?


Honest question: why do you care how? It does circumvent it quite efficiently.

But I've seen somebody here in this thread mentioning that yt-dlp emulates the YouTube Android client.


Sometimes when you know the "trick" you can better predict how long it will last, and how long you can rely on it continuing to work.


>Honest question: why do you care how?

Aren't you interested to find out? It sounds like it would be interesting to know how they did it.


Not one bit. I only care if it works and whether it works fast enough. I get that other devs might care, it's just that I personally don't.


I downloaded a big (like 330gb) audiobook playlist month ago. It started at like 3mbit but YT throttled it to 64/kb after a few hours but still responded.

Now its throttled like everytime. Will look into yt-dlp.


Usually C-c'ing it and trying again resolve it. Looking forward to trying yt-dlp though.


I have the same problem, yt-dlp didn't fix it for me.


make it popular enough, it will be throttled like youtube-dl


yt-dlp is a fork of youtube-dl, it's being throttled exactly the same, they just merge the fixes quicker. It's mostly a "cutting edge" branch of youtube-dl (not sure how much gets merged back tho).


Does youtube-dl upstream fixes eventually?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: