Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[YouTube] How does best format selection work; how are the stream properties (like ABR) determined? #22709
Comments
|
Duplicate of what exactly? There is literally no issue or question ticket that details the technicalities of format selection in youtube-dl, aside from vague mentions about youtube-dl "preferring higher bitrates". Bitrates from what source? How it is determined? What is the source of the hardcoded ABR values in the YouTube extractor code? |
Well no, these questions come up occasionally. All values as provided by YouTube. |
|
If the ABR values are provided at the time of scraping a given YouTube page, why are they in the extractor code? Or does this mean those ABR values were obtained previously in another way from YouTube? (Because if so, other tools might access those values if they are changed on YouTube's end. Obviously ABR values are just guidelines for the transcoding processes YouTube does in the back-end, but still.) |
Checklist
Question
Hi! I would like to ask for elaboration from the main developers on two technical questions;
How does the
bestandbestvideo/bestaudioformat options work? What technical parameters youtube-dl considers when selecting the best formats, especially with YouTube?Considering formats and their properties listed on YouTube, what sources/methods youtube-dl uses to enumerate stream properties? I'm aware of the hardcoded stream descriptions in the YouTube extractor code, but how were those values determined in the first place? For example, youtube-dl lists ABR (average bitrate) values for each video/audio stream format (which is not necessarily indicative of the subjective perceptive quality of a stream), but ultimately what is the source of those ABR values?
Thank you for any answers in advance!