-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twitch support #301
base: main
Are you sure you want to change the base?
Twitch support #301
Conversation
Please let me know if you prefer that i split it into multiple PR. |
This looks pretty good, thanks! I've given it a brief check-over and all looks fine. There is some work I have in a branch to redo how sources are verified but I can easily modify your Twitch patch later so all good. The only modification I might not merge is the change to the default codecs, I picked VP9 and OPUS specifically, not only is VP9 a much better video codec than H264 and has pretty wide support these days it compresses video better as well. VP9 and OPUS are also the only free and open source codecs that match availability. Have you fully tested Twitch channels as a source? I've had a look at the |
Yeah, I have changed the default codecs because Twitch does not provide VP9 and Opus, also it seems some VP9 format can't be played inside I have done some good testings, but it could be great to do a bit more, i'm not sure i have covered everything. |
Ah, Twitch not supporting VP9 could be an issue then. VP9 should work fine in HTML5 video tags in all browsers for most of a decade if you have the right codec support. I might just eventually merge these and leave it as VP9 but put a message on it about Twitch. Downloading will still work as the matching will just drop back to AVC1 so it's not terrible user experience if you do pick VP9, just unexpected. Long term I'm pondering a source onboarding wizard that could handle this automatically. I did note your |
It may be just me that broke it when testing, but I've not seen the automatic switch occurred when the requested codec is missing, that's why I changed the default. Let's wait a bit before merging this PR, I have seen an issue when using it on more streams, I'll update when I have a fix. Feel to merge other stuff in the mean time if you want to, I'll rebase the PR. |
If the matching failover to any working codec doesn't work then something likely need tweaking either with the matching code or your format translation wrapper. If you set a source for VP9 and there's no VP9 format available it should still match AVC1 in the closest resolution. Feel free to move everything apart from the Twitch and default codec changes into something I can merge if you would like that merged before debugging the Twitch support. |
Yep, i've opened a separate MR. |
I've just updated the PR, the last bug i noticed is now fixed. Though, it's currently impacted by an ytdl-p bug, which is fixed, but not yet released, see yt-dlp/yt-dlp#6500 |
This PR adds Twitch support and fixes some small bugs