Bug Timeshift Buffer does not clear when playing back a Recording
#1
I’m not certain if this is a PVR bug, or if it is specific to pvr.hts. Also, I only use (a lightly modified version of) Estuary, so this might be an Estuary bug, although because of the way it presents, I doubt it.

Update/Edit #1, 2 Apr 2017 17:01 PDT: For clarification, here are the software versions involved:
  • Kodi 17.1
  • pvr.hts (Tvheadend HTSP PVR Client) 3.4.17
  • Tvheadend 4.1.2454
Also, I have added screenshots for steps 1, 2, 4 and 6 below.

Update/Edit #2, 2 Apr 2017 20:43 PDT: I was able to get the issue tracker to load (didn't realize I couldn't even browse unless I logged in). However, there are no relevant/matching issues in relation to this. Likewise, I also checked the Github issues for skin.estuary and pvr.hts, and neither repository showed similar/related issues.

Original: It appears that the references to the Timeshift Buffer in the PVR subsystem is not cleared when it is not immediately replaced by a new Live TV stream. If Live TV is stopped while in the middle of the buffer, the buffer reference remains until a new Live TV is started.

This is most visible/present when watching a Recorded program. If I choose to start watching a Recorded program, either while a Live TV stream in currently playing or after selecting Stop while the playback progress was within the Timeshift Buffer, the Timeshift Buffer progress bar displays above file’s playback progress bar.

To replicate this:
  1. Start playback of a Live TV stream by selecting a Channel. Image
  2. Pause playback to initiate the display of the Timeshift Buffer. Image
  3. Optional: Press Stop to cease playback of the Live TV stream, while there still remains time left in the Timeshift Buffer.
  4. Select a recorded program from the PVR Recordings to view/play. (In the image, you can see in the upper-right corner that the Live TV stream is paused, as well as see it as the background of the MyPVRRecordings window.) Image
  5. While the Recording is in progress, press Pause to bring up the OSD Progress display.
  6. (In Estuary; actual display may differ based upon skin) The Timeshift Buffer progress bar displays above the Recording’s playback progress bar, and continues to update its end time. Image
The only way to clear this is to select a new Live TV stream to playback, and stop its playback while at the end of the Timeshift Buffer (i.e., to fast-forward to the end of the stream and return to Now/Live.)

I tried to pull up existing issues to see if this had already been reported, but was unable to do so. Bugs/issues are not tracked through Github, and for some reason the Trac database kept erroring out on me every time I attempted to browse/search through it.
Reply
#2
Was going to test it on my system, but guess I don't know what you mean.
Reply
#3
(2017-04-03, 03:13)clarkss12 Wrote: Was going to test it on my system, but guess I don't know what you mean.

Start watching Live TV. Pause the steam, so that the progress bar for the timeshift buffer appears and starts filling. Now, select a recorded show from your PVR client and start playback (with the paused Live TV steam still active, but paused). Once your recorded program starts playing, pause it. When the OSD progress bar shows up on the screen, the timeshift buffer progress bar will also display and show that the timeshift buffer is still filling up, even though it isn't because the Live TV steam/subscription closed when the recorded program started playback.

Again, I'm not certain if this is for all PVR clients, or only pvr.hts (Tvheadend). In order for this to work, you must be on Kodi 17.x (Krypton), since that was when the timeshift buffer information was added to the PVR subsystem. Also, the PVR client must support timeshift and it must be active/available to the client.

If additional clarification is necessary, I can add a post with screenshots for each step, but I thought the steps were rather clear.
Reply
#4
Haha, perhaps I am not that observant. I am running tvheadend server on one of my Android boxes running LibreELEC and testing it on my Windows 10 computer using Kodi 17.1 and tvheadend server 4.1.2415.

I am not sure how to pause a live stream and start a recording, while keeping the live stream active, I have never done that.

EDIT: OK, now I see what you are referring to. While my recording is playing, the buffer bar is still visible. However, from looking at the timeshift buffer, using my Windows explorer, the buffer folder that is created when playing the live streams, disappeared. So, when I changed from live TV streams to recorded, the buffer ceased to increase and was deleted as expected.

So, I guess your concern is just the "buffer bar" that is still showing while playing the recording, even though it is a false indication.
Reply
#5
(2017-04-03, 03:48)clarkss12 Wrote: Haha, perhaps I am not that observant. I am running tvheadend server on one of my Android boxes running LibreELEC and testing it on my Windows 10 computer using Kodi 17.1 and tvheadend server 4.1.2415.

I am not sure how to pause a live stream and start a recording, while keeping the live stream active, I have never done that.

OK, now I see what you are referring to. While my recording is playing, the buffer bar is still visible. However, from looking at the timeshift buffer, using my Windows explorer, the buffer folder that is created when playing the live streams, disappeared. So, when I changed from live TV streams to recorded, the buffer ceased to increase and was deleted as expected.

To Pause a stream, press Pause on your remote. Then, press the Back button on your remote to get to the Home window, and navigate to the Recordings screen from there. However, even if you press Stop while still in the middle of the Timeshift Buffer, the situation is the same. (This is much easier to achieve on my setup as I have a button on my remote set to ActivateWindow(TVRecordings), so I encounter this bug much more frequently than others might.)

And yes, the actual timeshift buffer in Tvheadend is deleted, and the Tvheadend subscription to the Service/Channel for the Live TV stream is closed.

(2017-04-03, 03:48)clarkss12 Wrote: So, I guess your concern is just the "buffer bar" that is still showing while playing the recording, even though it is a false indication.

Yes, this is mostly a cosmetic issue, and does not really affect functionality. It's just quite annoying. I didn't really notice it under the Betas and RCs for Krypton, most likely because the TImeshift Buffer progress bar was not implemented in early versions of Estuary. I waited until after 17.1 was released, thinking it might have been caught by other users/developers and been fixed.

However, since I can't seem to access the issue tracker, I'm posting here to see if others are encountering the issue, too.
Reply
#6
I had never seen that before, or even paid attention if I had seen it.
Reply
#7
Does the silence mean that no one cares, or that this is an acknowledged bug?

Or does that mean I need to file a bug report on Trac, and then test different skins/PVR clients to find where the fault actually lies?
Reply
#8
I suspect the 'timeshift' buffer is only implemented by some backends. Certainly I've never seen it (I use mythtv). This will be reducing the number of interested forum readers.

I've been similarly annoyed by Kodi 'cosmetic' issues in the past and suspect that unless one of the main coders who uses pvr.hts is also annoyed by it, nothing will get done in the short term unless you do it yourself. The advantage of kodi is that unlike a closed source product, you can do something about it yourself.

By all means file a bug report on Trac with the results of your investigations, but at this stage I suspect if you actually want it to be fixed, your best bet is to investigate the code yourself, work out what the problem is, fix it and then submit a pull request.

Probably not the answer you want, but as you're obviously a keen kodi PVR user who (like me) gets annoyed by the little things your efforts are likely to improve everyone's end user experience.

If you don't fancy digging into the code (and it does take some effort, particularly if you haven't coded before), keep posting your frustrations. If nothing else they may encourage others to have a go when they see you are also frustrated by the same problem.

Personally I've found nothing releases the frustration like getting your pull request merged into mainline :-)
Reply
#9
(2017-04-14, 14:28)metaron Wrote: By all means file a bug report on Trac with the results of your investigations, but at this stage I suspect if you actually want it to be fixed, your best bet is to investigate the code yourself, work out what the problem is, fix it and then submit a pull request.

Probably not the answer you want, but as you're obviously a keen kodi PVR user who (like me) gets annoyed by the little things your efforts are likely to improve everyone's end user experience.
I figured as much, however this is going to have to move to my back-burner.

I'm currently working on my own private branch of Tvheadend to implement proper support for HDHR Prime. I've got working with a hack, but I'm working on a "proper" CableCARD network type as my hack doesn't work well with HTSP (and therefore streaming live to Kodi).
Reply

Logout Mark Read Team Forum Stats Members Help
Timeshift Buffer does not clear when playing back a Recording0