7 ms·
Also bypasses throttling. Much faster, most of the time.
by kaetemi 5y ago
Also bypasses throttling. Much faster, most of the time.
- nextaccountic 5y agoSounds like a great recipe for getting banned from services. But, as long as it works, I'm all for it..
- kaetemi 5y agoApparently the trick is to pretend being an Android device, or something in that style...
- kevin_thibedeau 5y agoYou used to be able to bypass throttling by watching the video in browser during the download.
- usr1106 5y agoI have always wondered why video sites (who don't want downloaders for various reasons) serve their content faster than required for normal speed viewing. Well, I don't complain, but I wonder.
- gattilorenz 5y agoFor buffering, since there might be a network hiccup sometime in the future. But generally also a better user experience if the user wants to skip a few seconds/minutes forward. And I guess the bandwidth required also depends on the video bit rate/format/compression ratio, so you need to implement a lot of smarts to make sure you don't serve something too slow or too fast, and still people would be able to download the video, albeit at a slower speed. So, basically, it's not worth it.
- foxfluff 5y agoThe primary reason I've used ytdl is to work around youtube's crappy buffering. In the past you used to be able to leave a youtube page open and it'd buffer the whole video but now it stops at like.. thirty seconds? Have fun watching when their servers can't serve.
- kaetemi 5y agoVideo streams are just a series of 2-second-long video files. It's no different from any regular CDN. (The real money is in the compression processes.)
- cube00 5y agoI was surprised by just how many small chunks (as you said 2 seconds, a few hundred kilobytes) the browser has to request and string together to make a video stream that play smoothly and that I can skip around. It's kinda amazing when you think about it.
- varenc 5y agoThey address this by having the video player stop buffering more than 30 seconds ahead. It's also less compute resources for the servers to send all the bytes for the next 30 seconds to a client at max speed, let the client disconnect and wait 3-5 seconds, then give them the next 3-5 seconds immediately when it's requested. If they only let you download video at a rate slightly faster than video playback rate than all clients would have a constantly open connection downloading video which would tie up more resources.
- varenc 5y agoThe work needed to bypass the rate limiting is pretty impressive: https://github.com/ytdl-org/youtube-dl/pull/30184#issuecomment-974180758 https://github.com/ytdl-org/youtube-dl/pull/30184#issuecomme... An excerpt: > ...the challenge algorithm is served in a mini-language within the minified player JS and therefore the specific algorithm could be extracted and executed by interpreting the mini-language without actually running the JS itself.
- skytreader 5y agoQuicker explanation of how Youtube is doing it is at the source code of pytube: https://github.com/tfdahlin/pytube/blob/bb890af3b271a616bbe1d08abc8c65bac9266b0a/pytube/cipher.py https://github.com/tfdahlin/pytube/blob/bb890af3b271a616bbe1... This is linked from the description of PR 30184 of youtube-dl but @varenc linked to a specific comment (talking about patching Windows builds, AFAICT) which might confuse some people. I'll even save you the click: > YouTube's strategy to restrict downloading videos is to send a ciphered version of the signature to the client, along with the decryption algorithm obfuscated in JavaScript. For the clients to play the videos, JavaScript must take the ciphered version, cycle it through a series of "transform functions," and then signs the media URL with the output. There are still a lot of things I don't understand here but gotta give Youtube a slow-clap moment for their devious ingenuity.
- Kadin 5y ago> There are still a lot of things I don't understand here but gotta give Youtube a slow-clap moment for their devious ingenuity. Well, sorta. They have basically come up with a DRM scheme by another name. They're always just speed bumps.
- varenc 5y agoWhoops, didn’t mean to include the link to that comment... that’s a much better explanation!
- rstuart4133 5y agoAs someone else said here on HN, in situations like this all it amounts to "mutually assured time wasting". It reminded me ofthe old joke about two people entering an area infested by lion's, and one of them sits down on a log, and takes 5 minutes to replace his robust hiking shoes by a very expensive pair of running shows. The other says "why are you doing that - you can't our run a lion." The reply is "I don't have to be faster than the lion - just faster than you". It makes prefect sense of course, when the lion has a choice. But in this case there is no choice. There is only one youtube. No matter how much time and expense youtube putting into their running shoes, youtube-dl / yt-dlp is always going to chase after them. They are always going to win that race. While Google may be paying 5 or 10 of the cream of worlds programmers, those two open source projects ultimately how pools of 100's of equally talented people who occasionally want to download a video, and will happily contribute back a few hours of their time to do it. Which is probably how yt-dlp came about - youtube-dl slowed down, and someone said "fuck it - I'll do it myself". Worse from google's point of view, unlike splitinering a commercial endeavours, once those two projects are already contributing code to each other and may well merge again.
- dannyw 5y agoYouTube already specifically seeks to throttle youtuble-dl to an unusably slow speed, like 70kbps even if you only download one video a day. What else are you supposed to do?
- countmora 5y agoI always managed to get getter speeds using the aria2 parameter.
- busymom0 5y agoUse yt-dlp which is a well maintained alternative to YouTube-dl and doesn’t have the throttling issue. All commands are the same.
- crtasm 5y agoExcept for the ones that aren't, but yes it's mostly a drop in. https://github.com/yt-dlp/yt-dlp#differences-in-default-behavior https://github.com/yt-dlp/yt-dlp#differences-in-default-beha...
- alpaca128 5y agoIt's the only way to be sure I'll ever find certain videos again. And Google randomly bans users either way, they're not gonna stop if yt-dl disappears.
- wintermutestwin 5y agoHow would Google associate a YT download with a specific YouTube user?
- kataklasm 5y agoWhy would they do that when they can just make sure yt-dlp/youtube-dl doesn't work all together. :) No need to ban users who download content, just ban the service itself (ban as in build roadblocks to deny the downloader service access to your content).
- busymom0 5y agoThey have been trying to break YouTube-dl for many years (and similar framework for iOS) and the code maintainers just need to update their code slightly to find another workaround and get it working again.
- solarkraft 5y agoFor now. I can see actual DRM coming some time in the not too far future.
- lowwave 5y agoNo DRM needed. many sites just use hls.js type of chunk download tactic, it is already enough to prevent ytdl from downloading.
- skinnymuch 5y agoIs there any way to solve for that? I’ve noticed that and maybe that’s it or other chunked download stuff. That I haven’t been able to download. Never looked into this stuff enough to see what solutions are (besides brute force screen recording Ofc)
- hdjjhhvvhga 5y ago> Sounds like a great recipe for getting banned from services. If you are using your account for downloading, that is. I never use any valuable account when dealing with automated tools, it's just asking for trouble.
- Seirdy 5y agoThe best part is the native sponsorblock integration. It adds chapter indicators to skip the sponsored sections, opening titles, begging viewers to inflate engagement metrics (please like, comment, and subscribe!), openings of music videos that aren't the actual music, opening and closing titles/credits, etc. Basically cuts out all the bullshit you'd otherwise have to manually skip past by spamming the arrow keys.
- aulin 5y agoby the way, out of curiosity, is this something content producers add to their videos or something youtube autogenerates? I've seen SmartTubeNext skipping ads and other bullshit and I was wondering where the feature came from.
- DQDPm64JTNB2 5y agoSponsorblock works by it's users marking parts of videos and then submitting them. Other users then can vote if these parts are right or not.
- sorenjan 5y agoSponsorblock data is added by users using the Sponsorblock browser extensions. https://addons.mozilla.org/sv-SE/firefox/addon/sponsorblock/ https://addons.mozilla.org/sv-SE/firefox/addon/sponsorblock/
- stavros 5y agoIt also has a "skip to highlight" button that skips to the meat of the video and saves you 98% of its time.