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.
improve Twitch VOD best quality detection #20850
Comments
|
Actually, there's apparently already code in place intended to do this: https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/twitch.py#L134 This also populates the above mentioned and However, the |
|
Why is it closed? Should it be considered a bug now? |
|
Closed with the commit listed above. Should pick the 'source' format now, but please test for yourself if you actually want to verify. |
|
Apparently I didn't read the close message correctly yesterday, sorry for that. Yes, I can confirm that it now successfully picks the source stream as best. Thanks! |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2019.04.24. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Have a look at this:
It determines
720p60as the best option. I assumed that's because it has the highest bitrate. However, theSourceversion is the best version by definition, because it's the video data that was originally streamed, and the other options are just re-encodes.Twitch provides the metadata field
format_notewith valueSourcefor easy identification (youtube-dl -j https://www.twitch.tv/videos/415411978):Unfortunately, because
formatisn't filterable in the quality selection (onlyformat_idis, which only contains e.g.1080p60) it's not possible to directly query for the source version. The best approach I have is explicitly ask for a higher video resolution first, e.g. with:-f 'best[height>=1080]/best'.Otherwise you could do
-f 'best[format*=Source]/best'or something similar.