Buffering issues on Pi3 ethernet tvheadend

The Problem:
Random buffering on any TV channel, only present on Raspberry Pi (3) Kodi clients, even the one running TvHeadend. Windows client has no buffering. Videos played via NAS are fine.

What I’ve Tried:

  • Overclocking (via OSMC Settings)
  • Increasing buffer cache (adding /home/osmc/.kodi/userdata/advancedsettings.xml file, and following these instructions: http://kodi.wiki/view/how-to:modify_the_video_cache)
    <advancedsettings> <network> <buffermode>1</buffermode> <cachemembuffersize>139460608</cachemembuffersize> <readbufferfactor>20</readbufferfactor> </network> </advancedsettings>

Raspberry Pi3 running:
Kodi 16.1 compiled Aug 28 2016
HTS TvHeadEnd 4.0.9 (HTSP v20) (Server on same device, but also tested Kodi remotely on identical rpi3, with same issues)
Screen Resolution 1920x1200@60.00Hz;
SD Card: 64gb Samsung Evo;
Wifi: Off;
USB Tuners:
DVB-T PcTv 290e
DVB-T2 PcTv 292e
DVB-S2 Tevii s660 (Not used in the tests)
Connected to an unmanaged gigabit switch.
Movies stored on NFS/NAS work without buffering

Instructions say:

Post a debug log that includes the buffering.

Hi.

Have posted you my logs.
What I did:
At about 09:10 I lunched live tv and switched between several HD channels. On about the third switch, the buffering started. I let the logs run for a bit then stopped. If I switched back to previous channels which weren’t buffering, they would now buffer.

Things that may be helpful to know:
Any changes I made to advanced settings or overclocking were an attempt to fix, which had virtually no effect. Whilst the tv signal looks broken on Pi when this is happening, I know its fine as I can launch the same channel on the PC Kodi client, using the same tuner, and it looks fine. The pi is actually running the TvHeadEnd as well as osmc/kodi and I am observing the issue on a HDMI connected monitor. The PC is a remote kodi client. The same buffering issue occurs on another identical Raspberry Pi3, acting as a client to this Pi/TvHeadEnd.

Thank you so much for you help.

Where? You must provide the URL here.

Sorry didn’t surround it with the formatting tags so editor removed the url…:

<advancedsettings>
  <network>
    <buffermode>1</buffermode>
    <cachemembuffersize>139460608</cachemembuffersize>
    <readbufferfactor>20</readbufferfactor>
  </network>
</advancedsettings>
<pvr>
 <minvideocachelevel>55</minvideocachelevel> <!-- Cache up to this level in the video buffer buffer before resuming playback if the buffers run dry. -->
  <minaudiocachelevel>40</minaudiocachelevel> <!-- Cache up to this level in the audio buffer before resuming playback if the buffers run dry. -->
  <cacheindvdplayer>true</cacheindvdplayer> <!-- Cache PVR stream in DVDPlayer. -->
</pvr>

Remove the network buffer settings - they don’t apply to pvr.
The <pvr> tag needs to go inside the <advancedsettings> tag.
I’d be interested in testing with cacheindvdplayer enabled and disabled.

Sorry about the xml errors on my part.

I changed to the following:
<advancedsettings> <pvr> <minvideocachelevel>25</minvideocachelevel> <minaudiocachelevel>30</minaudiocachelevel> <cacheindvdplayer>true</cacheindvdplayer> </pvr> </advancedsettings>

and the buffer popup disappears - looks like its there a little longer and flashes up a couple of times, but then looks stable. I’ve only tested briefly, and will feed back having tested it this evening in case its of use to anyone.

Thank you!

Another update:
Setting ‘cacheindvdplayer’ to ‘false’ has made things much better. No ‘buffering’ popup occurs at all. It now pops up with “seeking…” like when you fast forward a movie, but quite briefly. Channel switching is quicker (takes about 2 seconds).

Yes, cacheindvdplayer set to false does seem to help some setups.
In Kodi Krypton the whole cacheindvdplayer logic has gone. Hopefully that means the issue has gone too.

That was my next question ! I hope I’m not going to update one day soon and find the problem is back and there’s nothing we can do about it…guess we’ll find out.

There is Krypton test build if you want to find out early.

We’ve just got this one working so I’ll live with this for a while. Do you know when the new version is due out? And will the OSMC based pi’s automatically update? If so I’d better prepare myself.

Kodi is at beta 2. I’d say it will be at least a month, possibly more like two.

We won’t update people without a prompt, and all update information is covered on the blog so you can see what is new and choose whether you wish to update.