-
Notifications
You must be signed in to change notification settings - Fork 28
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
Possible to choose lower quality streams? #84
Comments
Hello, nowadays videos on websites are typically fragmented in multiple streams for different video and audio quality. The selected streams must be muxed together by the player. Fortunately, Kodi offers this capability in form of an add-on named input stream adaptive. For kodi (or any other player) to understand the streams a stream manifest needed in which the urls for the individual streams and their meta data is stated (bitrate, if it is audio or video, etc.). As an experimental opt-in feature (see the settings) our add-on does support this functionality for websites exposing their manifest files. Youtube does unfortunately not expose their manifest files and we would have to create a temporary one within our addon and provide that one to the player. Tbh that is a good amount of work to get it robust for all the different websites and thus different kind of streams. This is what #34 is meant for. Per default or as a fallback if you have the experimental setting activated, the add-on currently uses „the best available all in one audio and video stream“ for which no manifest is needed as it is simply a mp4 (or similar) file. Unfortunately, for YouTube this is just 720p. So even an option like "use the second best stream" would not work in case of youtube as all they offer for legacy streams is the the 720p stream. So in essence you need #34 to choose something with lower resolution per default. |
I haven't used this addon since this summer, but up until then I played 480p just fine from YouTube. Are you saying that this has changed since then and that they no longer serve 480p? |
Yes and No :) As youtube is not exposing its manifest and #34 is still not implemented sendtokodi here simply falls back to the "best all in one" stream, the implementation of that is here. With the implementation of #74 the ability to chose something else via an additonal resolver option is not available anymore if you use the manifest feature (which is enabled by default). If you turn off this feature you can still send additional format options In case of Youtube it is not always predictable what is available or not concerning the streams which contain both audio and video. So for example let look at an older video of the more popluar youtuber Mark Rober. Streams containing both audio and video are just 144p, 360p and 720p (so no 480p).
|
Thanks, I see. I've taken a look now. You've been busy! One thing at a time then:
|
In fact I just tested disabling manifest and it solved this issue immediately using YouTube, from my point of view. Of course, you still have to actually send the correctly formatted request to Kodi, but the iOS app can help you with that. I use my own iOS shortcuts directly from the share sheet though. |
Perfect. Maybe you can share your steps and the exact format options for OP. Also, just to mention it, setting those options on the url sending device should not be required anymore once every video/audio is provided to kodi via the input stream adaptive addon. The input stream adaptive addon has options for max resolution etc. But this might still take some good time due to the above mentioned complexity. |
Thanks for the in-depth answers, it's appreciated! It really helps when getting up to speed to not have to look up every piece separately.
Sounds nice, when it lands. I still see value in letting the remote override it though. The quality is pretty integral to what you want to play, after all, and it would be weird to allow remotes to pick the url but not the quality. A new parameter perhaps, that abstracts away the ytdl / ydl specifics. Best to format the URLs properly by then as well.
I guess you refer to programmatic options, because I didn't see any such options in the Kodi UI for the addon. I just realized I had one last question:
|
There is InputStream adaptive and InputStream Helper. The first one has a setting page which list max resolution, max bandwidth, initial resolution, etc. The later helps to make sure InputStream adaptive is installed etc.
I am not 100 % sure but I think the helper addon is not available in the offical kodi addon repo for Kodi 18 or earlier and thus the addon xml will simply indicate unsolvable dependencies. I am therefore assuming it might need Kodi 19 to work at all. Also I am not quite sure about the InputSteam Adaptive version it self. During testing old versions of this did not support a lot of manifests in the first place. If care you might want to create a PR to fix the xml adjuster and other things? Getting input stream (websites in 2023) working on a unmaintained kodi version (which is now two behind the latest) with the latest update in 2020 which is based on python2 with an (extended) EOL in 2020 sounds like it is not worth it. In my opinion we should leave the kodi18 and earlier versions to the old classic all in one stream to avoid the hassle. Additionally, in my opinion all work concerning input stream adaptive should focus on getting it to work with the addon version which is available in the current kodi version.
Oh boy I do have the exact same feeling!
Me too :D Maybe it simply ignores it. I do not know!
I totally agree! |
Thanks. You're right, I got confused by the two similar names...
...and I possibly got confused by the fact that my Kodi 19.0 instance does not have adaptive installed, but does have helper. I have to conclude that the latter doesn't really make sure to install the former (its manifest doesn't list adaptive as a dependency at least). I can install it manually, but... Am I missing something important here?
I might take a look later if it seems necessary. My initial test managed to both install and resolve at least a direct m4v url on Kodi 17. Any complications (with YouTube etc.) will become clear in the coming week I suspect. |
The helper readme says (and that is the reason InputStream Adaptive is not in OUR addon xml):
I'm again not sure but this whole helper thing might makes most sense for DRM/Widevine stuff where due to licensing not everything can be bundled together. If you look at the helper api, we check here if InputStream Adpative is installed and if not throw a notification. sendtokodi never directly calls the helper addon to install InputStream Adapative. In the API there is only a |
Makes sense. Good observations. Well, it seems to just work on Kodi 17. Since there's no "use manifest (experimental)" in plugin settings I'm assuming there's no such property to be queried, and that that code branch is never hit. Otherwise I'd have seen that notification at least. |
I'm closing this as solved. Feel free to ask if the instructions are unclear. |
Describe the bug
I have just recently noticed, that if I send a youtube link ( say https://www.youtube.com/watch?v=xP6LQviQwaM ) to Kodi 19.4 on my Android 9 device which is limited to 480p resolution, the highest quality stream is chosen; this means that my Android device has to start downsampling the video, and it has such a hard time with it, that I get a new video frame rendered as a still only every 5 or 10 seconds.
To Reproduce
I've experienced the problem on https://www.youtube.com/watch?v=xP6LQviQwaM - but unless you have a low resolution Android 9 device, it is likely you might not be able to reproduce the bug.
Expected behavior
Expected behavior is that the video plays, instead of showing one new frozen frame each 5-10 seconds
Kodi and sendtokodi version (please complete the following information):
Provide a Kodi log
Screenshots
Screenshots cannot demonstrate this problem - but I think the solution would be an option to manually choose quality in case of a provider with multiple quality streams; for instance, I've recently seen this option in the DR addon ( xbmc-danish-addons/plugin.video.drnu#7 ) - once live stream is played, there is a "Select Program" option:
...and from there, various stream qualities can be chosen:
Would be great if SendToKodi had some sort of an option like that; or if not that - then at least a switch in Configure/Addon Settings, something like "always prefer lowest quality stream in case of a multiple choice"; would be very helpful for low capability devices like mine.
Additional context
(none)
The text was updated successfully, but these errors were encountered: