Bitrate Switching and HLS
#1
Are there any plans to support automatic bitrate switching and hls for livestreaming (rtmp and rtsp etc)

I see that Spiff had planned to implement it (http://forum.kodi.tv/showthread.php?tid=129912), but i gather he hasn't been around the forum for some tine now.

This project http://www.livingstreams.tv/#!watch-listen/cfvg recommends Kodi for the live streams list BUT have had to provide separate links for different speeds as Kodi currently doesn't do bitrate switching.
Reply
#2
spiff is still around as "ironic_monkey". He checks the feature request posts from time to time, so he'll probably see this and comment on it directly.
Reply
#3
the proper solution to this is implementing mpeg-dash support in ffmpeg.
IIRC someone was working on it, but no idea what happened.
Reply
#4
Thanks for your replies.

Ned, i wonder why spiff / ironic_monkey didn't continue with the project as planned? He seemed pretty passionate about that at the time.

wsnipex, if you end up recalling who IIRC someone is, let me know and i will see if i can find out from them.

Hopefully someone will implement bitrate switching in Kodi soon as more and more cord cutters are looking for players and HTPC solutions like Kodi to reliably play back streams. Buffering sux. If anyone has more info on this feature, please let me know.

Does anyone know about hls support by any chance?
Reply
#5
No further comments or thoughts on this?
Reply
#6
http://forum.kodi.tv/showthread.php?tid=237356
Reply
#7
DASH is a different protocol to HLS, they solve the same problem in basically the same ways, but a DASH demuxer is not a HLS demuxer.

Even if DASH was implemented in Kodi, HLS bitrate switching would still need to be separately implemented.
Reply
#8
Thanks for the info re MPEG DASH. Interesting.

I'm working on the free LivingStreams.tv project, which is currently promoting Kodi over VLC as it delivers a much better playback experience on slower internet connections. However the lack of bitrate switching functionality in particular is a huge issue, and way more so than HLS. As such we will drop HLS for now and simply focus on bitrate switching.

Is anyone able to contact ironic_monkey directly (i tried but was not permitted by forum restrictions) to see if he got anywhere with bitrate switching which he said in another post some time ago that he planned to work on, and/or whether he is still planning to do so?

If not, LivingStreams.tv has two choices; abandon Kodi or develop the bitrate switching for Kodi ourselves. The latter MAY be a possibility BUT we would hate to reinvent the wheel if ironic_monkey had already done the code it but not yet released it. It would be very very very much appreciated if someone would ask him.

Thanks.
Reply
#9
ironic_monkey's repositories can be found on GitHub but I do not see any specific tree or branch that is clearly for HLS

https://github.com/notspiff?tab=repositories

Kodi utilizes FFmpeg demuxers and codecs libraires (libavformat and libavcodec respectively) for playback, so best is usually to start to see if everything needed is already implemented in FFmpeg or not, and then look how to implement those options into Kodi:

https://www.ffmpeg.org/ffmpeg-formats.html#hls-1
https://www.ffmpeg.org/ffmpeg-formats.html#Options-3
Reply
#10
i wanted to be able to play the hls streams. my work (others helped out!) was a success. bitrate switching doesnt matter much on a 100Mbit link, which is the minimum i operate kodi on Wink

there is limited support for switching, in the sense that the bandwidth configured in network settings is respected. but there is no dynamic switching.
Reply
#11
Thanks RockerC for the HLS and FFmpeg info. So if FFmpeg already supports HLS, would it just be a matter of using (or turning on) that functionality in Kodi? Is it Kodi or FFmpeg which would need to support adaptive bitrate switching? I assume Kodi opens the playlist file and then passes it to FFmpeg.

ironic_monkey, if you have a 100mb link i guess your streaming problems are few and far between. Some of our users are not so lucky, so dynamic bitrate switching is definitely something of interest to us. Not to mention that regardless of a users connection speed, at times some of the streams in an m3u8 playlist may drop or experience problems, which would potentially leave any Kodi user unable to automatically play even the slower streams in the playlist file. As such, the implementation of dynamic bitrate switching would be advantageous to all streaming Kodi users IMHO.
Does that mean you didn't get as far as writing some ĉode you would be willing to share ironic_monkey?

Thanks.
Reply
#12
did not mean to say it is of no importance in general, just that it was no focus point of mine and thus i wrote no code.

the adaptive bitrate support needs to be implemented in the kodi player, ffmpeg exposes everything needed as such. for every segment additional streams (or well, variants to follow their terminology) show up on the demuxer level, and the appropriate variant needs to be chosen based on the network feedback.
Reply
#13
I understood what you meant ironic_monkey, i was just explaining the benefits to all and why we are specifically interested in it. I wish i had a 100Mbps connection!

Ok, so in essence we would need to write the IF... WHEN... THEN... code to use in Kodi to determine under which circumstances to switch streams yes? I was kinda hoping we could build on others groundwork... but oh well.

My understanding of adaptive bitrate switching functionality is as follows (everyone is more than welcome to give feedback here):
- Calculate network speed
- Read playlist and determine streams
- Determine starting stream depending on best match for network speed
- Cache X seconds of stream and then begin playing
- If cache drops below X amount, seemlessly switch to slower stream if available
- If cache increases above X amount, seemlessly switch to faster stream if available

Any thoughts or feedback?
Reply
#14
yup. one thing though: you cannot switch at random points, only at segment boundaries (typically 10sec). this is the only way to get the seamless working without seeking...
Reply
#15
Thanks, i wasn't aware of that. How do you determine/identify segment boundaries?
Reply

Logout Mark Read Team Forum Stats Members Help
Bitrate Switching and HLS0