Req 'Uncontinious' PVR live tv buffer
#1
First of all let me excuse me for all things I've tried; English is not my first language, I've tried to bring this bug under the attention before without much avail, not many people seem to understand it so anyone who can clear it up in a better way please do, can't find it on the bugtracker, can't find it on github and it's some really nasty 'bug' that seems to go unnoticed due to not many people using PVR and even less with my setup, and it doesn't even concern all backends.


So what's the 'bug' I'm talking about? Kodi works in a way I think it's wrong and let me first tell you how Kodi works now and then how I think it should work instead.
The way it works now for most backends is it gets the stream and saves it to a certain path for timeshifting, this is a continuous file where each new second of live tv is appended to the end of the file; it grows indefinitely and forever.
However this is only if the backend doesn't take care of it, for example MediaPortal does it in a right way (want to propose something really similar to it).

First let me explain how I use PVR for anyone to understand my #1 issue with PVR, the issue will become real apparent.
When I build my htpc the PVR support in xbmc was still meh and was using MediaPortal at the time as then and still now nothing beats MediaPortal (yet).
I'm a huge PVR user (80% of the time I use Kodi) but still like certain stuff from Kodi, so don't tell me just switch back to MediaPortal as that's not the kind of answer that's constructive to the problem.
The way I'm using the buffer is having it write to a ramdisk; my htpc is 100% passive and all music/video is read from a nas and tv streams get written to the nas.
My SSD is just 64GB as I don't have a need for more space than windows + drivers + kodi + tv backend, which is about 25GB.
To spare the SSD write cycles I'm not writing the stream to the SSD but the ramdisk instead, this isn't such a weird idea at all.

Now my DVB-C provider; they supply me with HD streams of 16Mbit (roughly 2MB/sec) which results in 7,2GB for an hour of live tv buffer.
I don't need a buffer of 1 hour! 15 to 30 minutes tops is good enough for me, so I went with 8GB or ram.
Again this works for the MediaPortal backend but that backend has another bug for which I'm not using it.
The results is the stream stops after my ramdisk of 5GB is filled, about 45min of live tv.
This is especially annoying as sometimes I pauze, answer e-mails, return to fastforward the commercials and continue to watch.
Very often this results in the stream stopping on me as I haven't fast forwarded to the very end yet and missing 5 or 10 minutes from whatever I'm watching!
The only solution is to switch channels so the buffer gets rebuild from scratch.

Now for the proposal how it should work instead, I realize this may require a lot of code changes in the PVR and from as far as my abilities go I think this part is done by Kodi instead of the PVR addon when it's not regulatedby the backend.
Instead of 1 continues buffer why not use buffer parts? for playing surely that can be done gapless in such a way you don't notice it.
Let's say I use my 5GB ramdisk and specify the parts can grow up to 1000MB in size, while my ramdisk is 5x1024MB=5120MB.
As soon as it hits the 5000MB mark the first part gets truncated and it makes a new one... leaving 1000MB for the new part.
This is the way MediaPortal works, and in my search for the perfect (good enough rather) backend I've seen many just go with the continuous way instead.

This is a very frustrating 'bug' of feature which not many people are aware of and even more don't understand it when I mention it.
Both on the forum and irc I've spoken to a lot of people who suffer the same fate from this feature and I think it should be changed or at least given as option.
I have reported it to the backend but the underestimate the problem and it also seems to be forgotten; https://github.com/manuelm/pvr.dvbviewer/issues/2 (it was reported way longer than this ago).

So anyone who understands; can you make a summery of the above so everyone understands it? Maybe change the topic title to a better fitting one?
I can't help but make such a long post in order to bring the message, but please read it as it will make sense for my situation.
Reply
#2
Addition:

It has to my attention this is being handled by the PVR backend rather than Kodi.

However I still think I could justify this as a feature request.
From what I read it's pretty hard to get this "ring buffer" as it seems to be called done right, and more backends have the same problem.
Can't there be some code by Kodi PVR addons can simply tap into?
Streams are (to me in my way of understanding) pretty similar anyway so maybe there could be a shared code of sorts?

Again I lack the knowledge required on this topic but I'll add new info once I understand the problem better.
Reply

Logout Mark Read Team Forum Stats Members Help
'Uncontinious' PVR live tv buffer1