▲ | 1vuio0pswjnm7 3 days ago | |
"If you dive into the yt-dlp source code, you see the insane complexity of calculations needed to download a video. " Indeed the complexity is insane https://news.ycombinator.com/item?id=45256043 But what is meant by "a video". Is this referring to the common case or an edge/corner case. Does "a" mean one particular video or all videos "There is code to handle nsig checks, internal YouTube API quirks, and constant obfuscation that makes it a nightmare(and the maintainers heroes) to keep up." True, but is this code required for all YouTube videos The majority of YT videos are non-commercial, unpromoted with low view counts. These are simple to download For example, the current yt-dlp project contains approximately 218 YT IDs. A 2024 version contained approximately 201 YT IDs. These are often for testing edge cases The example 1,525-character shell script below outputs download URLs for almost all the YT IDs found in yt-dlp. No Python needed By comparison the yt-dlp project is 15,679,182 characters, approximately The curl binary is used in the example only because it's popular, not because I use it. I use simpler, more flexible software than curl I have been using tiny shell script to download YT videos for over 15 years. I have been downloading videos from googlevideo.com for even longer, before Google acquired YouTube.^1 Surprisingly (or not), when YT changes something that requires updating the script (and this has only happened to me about 5 times or less in 15 years) I have generally been able to fix the shell script faster than yt-dl(p) fixes its Python program (same for NewPipe/NewPipeSB) I prefer non-commercial videos that are not promoted. The ones with relatively low view counts. For more popular videos, I listen to the audio file first before downloading the video file. After listening to the audio, I may decide to skip the video. Also I am not overly concerned about throttling 1. The original Google Video made a distinction between commercial and non-commercial(free) videos. The later were always easy to download, and no sign-in/log-in was required. This might be a more plausible theory why YT has always allowed downloads for non-commercial videos
|