Closed cncb-gh closed 1 month ago
Hi!
The main difference between live and recorded is the speed at which the stream can be delivered to Kodi. Recorded streams kind of just blast in as fast as they can whereas live ones are more or less metered; they stream much more slowly as there is no read-ahead available.
If I recall correctly, and it's been at least a few years since I dug into this aspect of things so I might be off a bit here, what seems to happen is that the live stream hasn't sent enough data to Kodi yet for it to be able to select the Dolby (or any 'better') audio stream. The special packets in the stream that define what's available aren't send very often as compared to the data packets. Kodi wants to start playback as soon as it can (a good thing) but with live streams it often hasn't seen enough of it to choose DD 5.1 for you. Recorded streams have the same data as live, but Kodi sees a great deal more special packets in the time it has to make these choices.
This might be unique to HDHomeRun streams, I think the tuners are generating the transport stream (otherwise it'd be IPTV?) and maybe they could inject more of these metadata packets than they do, but apps like the HDHomeRun app don't seem to have a problem with it. The HDHomeRun app also doesn't seem to start playback as quickly as Kodi does (unquantified opinion mine here) so maybe they just wait longer than Kodi does?
I doubt there is a lot that can be done, I have been aware of this concern for many years, and I've generally figured out what Kodi is doing, but I can't necessarily say it's flawed or if it could be better. Kodi is quite the jack of all trades when it comes to playback, it has to handle all kinds of different formats. I'm not sure there is an answer in Kodi itself that wouldn't break lots of other things :(
I tried buffering Live TV once or twice, but perhaps counter-intuitively that didn't solve anything. Kodi would still expect to see the same amount of data in the same amount of time, so all buffering it did was consume memory for no reason; you still can't read ahead into data that doesn't exist yet, and sending that data in a metered fashion over a second or two versus blasting it all at once after a second or two is really just the exact same thing :)
Short version is that I don't think there is anything that the addon could do to make any difference, I'm sorry. Kodi could probably be tweaked in some way to manage it, but again, I'd fear breaking other stuff. I messed with that piece of code in Kodi once and it didn't really go well (that was to try and better handle cable TV streams that only have 'still frame' video like music channels). Worked for me but broke things for others, I believe the code was ultimately just rejected, and for good reason.
Hi,
I understand. Thanks for the detailed response.
I can't seem to get Dolby Digital 5.1 output from my Shield Android TV or Fire Cube for Live TV only (recordings play in DD as expected). I tried the "stream directly from tuners" options and it does not seem to make a difference. I have confirmed the program (ATSC 1.0) I'm trying to watch has a Dolby Digital signal. Any ideas?