iSponsorBlockTV icon indicating copy to clipboard operation
iSponsorBlockTV copied to clipboard

Force youtube quality or speed

Open basilelt opened this issue 1 year ago • 6 comments

Would it be possible to add a way in iSponsorBlockTV to send a forced resolution (like 4k60) and even a force speed control (like 1.25).

It would be a really nice feature as YouTube really likes to set it to auto quality or even 480p.

And for speed it gets reset pretty often.

Thank you in advance !

basilelt avatar Nov 16 '24 21:11 basilelt

Wanted to take a look myself but : https://stackoverflow.com/questions/37846208/how-to-set-playback-quality-youtube-api

I know of a similar project that uses another way to control youtube to skip sponsor : https://github.com/bsharper/sbremote And uses Apple TV remote controls from network pairing, maybe something similar could be possible to change the quality. I changed to your solution because it's more versatile and the previously mentioned doesn't work anymore (maybe apple/youtube changed some stuff).

basilelt avatar Nov 16 '24 21:11 basilelt

It would certainly be possible and a nice to have, considering YouTube last week decided to change the quality on my TV to 720p again. This project doesn’t use the regular YouTube api, but rather their internal (and undocumented) lounge api; the one the YouTube app on your phone uses to remote control the YouTube app on a TV.

If you want to dive into it, I’d suggest checking pyytlounge, the wonderful library this project uses; and this wiki that describes a bunch of things about the API. Another way to find new events like changing resolution or playback speed is to setup a recording proxy like Charles proxy or Proxyman on your phone, record the traffic when changing that setting and identifying what’s happening. Do let me know if you need anything else, I hope you find this useful

dmunozv04 avatar Nov 16 '24 21:11 dmunozv04

It seems like either YouTube is not allowing remote change of the quality through the lounge api or they haven't implemented it yet. Screenshot_20241116-233113.png

basilelt avatar Nov 16 '24 22:11 basilelt

Premium controls don't work either, stays on auto Screenshot_20241116-233338.png

PXL_20241116_223431204.jpg

basilelt avatar Nov 16 '24 22:11 basilelt

I tried both normal and beta versions of youtube on Android, no luck sadly.

basilelt avatar Nov 16 '24 22:11 basilelt

Yeah, you're right; it used to work before but it's broken currently

dmunozv04 avatar Dec 03 '24 10:12 dmunozv04

I looked into this a bit; unfortunately, it won't be possible to adjust the video quality via the Lounge API until YouTube provides that functionality from their app too.

On the other hand, I submitted a PR upstream to allow this package to change playback speed: https://github.com/FabioGNR/pyytlounge/pull/14

sternma avatar Mar 03 '25 06:03 sternma