Problems with LiveTV stuttering on Vero 4k+

I upgraded tvheadend to latest available version, but still getting stutters.

Here is a fresh log:
https://paste.osmc.tv/apikebijar

Starting playing a channel and 30 seconds later it stuttered badly (see 12:55:10). The machine has been up 17hrs and dropped 22 packets though i have no idea whether those are related.

Also had a problem with a recording not playing correctly last night. Plays fine on rpi3, and also even on my android phone via wifi. On vero4k+ the video was stuttering/freezing, then speeding up. Basically unwatchable. If i stopped and played back then the freezing still occurred, and in the same places.

edit: also tried playing the raw .ts file created by tvheadend via samba share and same results. Unwatchable on vero4k+ (freezes in same places) but fine when played via rpi3 and on my android phone.

Can you upload a problematic TS file so I can reproduce to:

https://collab.osmc.tv/s/Eund3Jl6wktn33c

Sam

I’ve tried uploading the file a couple of times. It thinks for a while then seems to fail with an exclamation mark.

How big are the files? I think max filesize for public files is 512M.

Sam

The file is >3GB. I’ve put it on my Google Drive and have PM’d you the link - let me know if you get it OK.

Going back to the LiveTV stuttering - I have some further findings.

I did manage to leave a channel playing for several hours overnight over the weekend without any stuttering, and it seems that I can “encourage” the stuttering by channel hopping (i.e. using ChannelUp/ChannelDown)

When it’s going to occur I can see in the logfile that “Stillframes” were detected when I performed the previous channel switch. Here are some pertinent lines trimmed from a logfile today:

14:39:43.562 T:3495949056  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
14:39:44.334 T:4075364944  NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:44.338 T:4075364944  NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:44.343 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:44.856 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
14:39:44.876 T:4075364944  NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:44.917 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:49.315 T:4075364944  NOTICE: Display resolution ADJUST : 1920x1080 @ 50.00 - Full Screen (26) (weight: 0.000)
14:39:50.374 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:50.405 T:3415200512   DEBUG: CAMLCodec::Reset
14:39:50.469 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:51.012 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:51.591 T:3415200512 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
14:39:51.772 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:52.492 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:52.502 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:53.742 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:53.818 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:54.974 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:55.038 T:3415200512   DEBUG: CAMLCodec::Reset
14:39:55.086 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:39:55.892 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:39:55.988 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:43:55.657 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:43:55.701 T:3415200512   DEBUG: CAMLCodec::Reset
14:43:55.779 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:43:56.435 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:43:56.870 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
14:43:57.123 T:3415200512    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 50.000000 fps
14:43:57.173 T:3415200512    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback

Full version of this logfile can be found here: https://paste.osmc.tv/mukadoyiyu

If it helps…to reproduce the problem I’ve been playing a channel, then firing off a shell script similar to this.

for x in $(seq 1 50); do
  kodi-send -a "ChannelUp"
  sleep 1
  kodi-send -a "ChannelDown"
  sleep 300
done

I then watch the logfile until I see CAMLCodec::Reset whilst playback of a broadcast is in progress.

If I set “Adjust refresh rate” to off, rather than “Always” or “On Start/Stop” then the problem goes away:

15:02:36.750 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:02:37.006 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:02:38.008 T:3467637504   DEBUG: CAMLCodec::Reset
15:02:38.039 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:02:38.170 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:02:41.434 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:07:37.874 T:3467637504   DEBUG: CAMLCodec::Reset
15:07:37.923 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:07:38.187 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:07:39.189 T:3467637504   DEBUG: CAMLCodec::Reset
15:07:39.249 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:07:39.631 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:07:42.418 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:12:39.100 T:3467637504   DEBUG: CAMLCodec::Reset
15:12:39.141 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:12:39.396 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:12:40.146 T:3467637504   DEBUG: CAMLCodec::Reset
15:12:40.188 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:12:40.495 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:12:44.523 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:17:40.405 T:3467637504   DEBUG: CAMLCodec::Reset
15:17:40.440 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:17:40.707 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:17:41.389 T:3467637504   DEBUG: CAMLCodec::Reset
15:17:41.539 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:17:41.673 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:17:44.170 T:3467637504    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
15:17:44.200 T:3467637504    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
15:17:44.987 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:22:41.593 T:3467637504   DEBUG: CAMLCodec::Reset
15:22:41.639 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:22:42.007 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:22:42.906 T:3467637504   DEBUG: CAMLCodec::Reset
15:22:42.906 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:22:43.364 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:22:46.031 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:27:42.919 T:3467637504   DEBUG: CAMLCodec::Reset
15:27:42.960 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:27:43.326 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:27:44.267 T:3467637504   DEBUG: CAMLCodec::Reset
15:27:44.268 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:27:44.403 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:27:47.396 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:32:44.084 T:3467637504   DEBUG: CAMLCodec::Reset
15:32:44.147 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:32:44.397 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:32:45.406 T:3467637504   DEBUG: CAMLCodec::Reset
15:32:45.461 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:32:45.841 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:32:48.900 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:37:45.308 T:3467637504   DEBUG: CAMLCodec::Reset
15:37:45.374 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:37:45.736 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:37:46.738 T:3467637504   DEBUG: CAMLCodec::Reset
15:37:46.781 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:37:47.161 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:42:46.572 T:3467637504   DEBUG: CAMLCodec::Reset
15:42:46.630 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:42:46.996 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:42:48.017 T:3467637504   DEBUG: CAMLCodec::Reset
15:42:48.017 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:42:48.150 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:42:52.329 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:47:47.757 T:3467637504   DEBUG: CAMLCodec::Reset
15:47:47.809 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:47:48.177 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:47:49.117 T:3467637504   DEBUG: CAMLCodec::Reset
15:47:49.182 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:47:49.312 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:47:53.094 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:52:48.911 T:3467637504   DEBUG: CAMLCodec::Reset
15:52:48.984 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:52:49.176 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:52:50.096 T:3467637504   DEBUG: CAMLCodec::Reset
15:52:50.257 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:52:50.824 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:52:54.418 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
15:57:50.301 T:3467637504   DEBUG: CAMLCodec::Reset
15:57:50.331 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
15:57:50.517 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
15:57:51.518 T:3467637504   DEBUG: CAMLCodec::Reset
15:57:51.568 T:3526357760   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
15:57:51.942 T:3526357760  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
15:57:55.123 T:3467637504 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer

As you’ll see the codec only resets during channel switches and not during the middle of a broadcast.

This would be a solution, but I also use the machine for watching 4k films, so must have Auto-Adjust Refresh Rate set to either “Always” or “On Start-Stop” for that purpose.

I guess I have a workaround for now, but is there any way to make it use Adjust refresh rate=off during playback of livetv, and “On Start/Stop” or “Always” for everything else. The TV Channels I stream are all UK Freesat or Freeview, so it just needs to stick at 1080p@50Hz.

I’m happy to provide whatever logs etc, are needed to address the underlying problem.

I performed a longer test last night - switching channels every 5 minutes for 4 hours.

This has revealed that I still have the problem with “Adjust Refresh Rate” set to off. However, far less frequently; as I only had one occurrence during the 4 hours. With “Adjust Refresh Rate”=Always or On Start-Stop the problem is much more frequent than that.

Here is the log from last night with Adjust Refresh Rate=off: https://paste.osmc.tv/pugusimeli

The one time I got stuttering was here:

23:32:20.475 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
23:32:23.504 T:3485463296 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
23:37:19.994 T:3485463296   DEBUG: CAMLCodec::Reset
23:37:20.055 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
23:37:20.306 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
23:37:21.313 T:3485463296   DEBUG: CAMLCodec::Reset
23:37:21.371 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
23:37:21.751 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
23:37:26.148 T:3485463296 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
23:42:21.251 T:3485463296   DEBUG: CAMLCodec::Reset
23:42:21.290 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
23:42:21.547 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
23:42:22.548 T:3485463296   DEBUG: CAMLCodec::Reset
23:42:22.580 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
23:42:22.960 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
23:42:25.835 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:42:25.840 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:42:26.413 T:3485463296 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
23:47:22.398 T:3485463296   DEBUG: CAMLCodec::Reset
23:47:22.461 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
23:47:22.927 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
23:47:23.807 T:3485463296   DEBUG: CAMLCodec::Reset
23:47:23.854 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
23:47:24.442 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'
23:47:25.123 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:47:27.237 T:3485463296 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
23:49:52.801 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:49:52.825 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:49:52.831 T:3485463296   DEBUG: CAMLCodec::Reset
23:49:52.898 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:49:54.360 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:49:54.980 T:3485463296 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
23:49:55.501 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:50:09.685 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:50:09.708 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:50:23.649 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:50:23.668 T:3485463296   DEBUG: CAMLCodec::Reset
23:50:24.008 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:50:24.981 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:50:25.165 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:50:25.740 T:3485463296 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
23:50:43.438 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:50:43.503 T:3485463296   DEBUG: CAMLCodec::Reset
23:50:43.646 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:50:44.761 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:50:45.382 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:50:46.746 T:3485463296    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:50:46.858 T:3485463296    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:52:23.578 T:3485463296   DEBUG: CAMLCodec::Reset
23:52:23.634 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire +1'
23:52:23.830 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire +1'
23:52:24.841 T:3485463296   DEBUG: CAMLCodec::Reset
23:52:24.871 T:4061131520   DEBUG: PVRManager - PerformChannelSwitch - switching to channel 'ITV Yorkshire HD'
23:52:25.250 T:4061131520  NOTICE: PVRManager - PerformChannelSwitch - switched to channel 'ITV Yorkshire HD'

Following a channel switch, it all went back to normal so can’t be a problem with the stream per-se.

This morning I switched back to “Adjust Refresh Rate” = “On Start/Stop”, to encourage the problem, and have tried the following, with no improvement:

  • Tried using ethtool to drop the network speed to 100M
  • Tried connecting the Vero4k+ via WiFi rather than ethernet
  • Tried disabling IPv6 on both Vero4k+ and then on my tvheadend server
  • Tried upgrading tvheadend on my server again as there was already a newer version: 4.2.6-92~g06c206c3b~stretch
  • Tried increasing the max network buffer sizes on client (rmem_max) and server (wmem_max)

I’m running the same test on my RPI3 (running LibreELEC) i.e. continually channel switching every 5 minutes for several hours, and am still not seeing any stuttering whatsoever on that machine - as previously mentioned this problem only seems to occur on the vero4k+.

Does disabling hardware acceleration help?
This issue may be fixed in v18 if so

I have tried disabling H/W acceleration, but the stream I’m testing is h264@1080p, so the vero4k+ just didn’t cope whatsoever i.e. CPU was max’ed out, video was dragging & out of sync with audio, etc.

I would be happy to try OSMC (instead of LibreELEC) on my RPi3 if that would help the diagnosis (think I have a spare SD Card knocking about somewhere that I could use), or is it not worth the effort?

Would your next suggestion be to try one of the v18 beta builds?

If it’s easy for you to try OSMC on a Pi I would suggest it

Ok will try that next. Might be a couple of weeks though (need to find a spare evening), but I will return to this.

For now, think i’ll just leave it at adjust display rate=off which seems least affected, and toggle back before playing a 4k film. Bit of a pain but nevermind.

If there are any further inspirations in the meantime im open to suggestions.

I’ll see what I can do to reproduce this.

Sam

Hi Sam,

To reproduce try also enabling upnp/dlna server and airplay in settings>services. Also announce services to other systems.

Last night i went through all the settings on the rpi3 comparing them to the vero to make sure i’d not overlooked anything. I could see this was the only difference so i disabled those services.

I then ran the same tests last night and can see i only had one stutter, so the kind of rate i had when adjust refresh rate=off, and tbh i can probably live with that for now. Maybe it will improve even further when leia is released.

I remember switching on airplay and upnp when i setup the vero as i was experimenting with an app on my phone, but i dont use it. Never really expected it to have any effect WRT this issue.

Will continue to monitor over next few days.

Maybe these services are spamming the network with junk.

Someone once has a Samsung TV, and if they connected it via Ethernet it would severely impact their throughout on other devices.

Good find

That’s interesting; as it happens mine is also a Samsung TV, which is connected to the same switch via Ethernet!

Not sure whether it’s a throughput issue per-se - since I could quite happily stream 4K films over the network without any problems. Anyhow, disabling these services has certainly had a positive effect.

My suspicion is the UPnP/DLNA server, but I’m loathed to start switching those services back on to further diagnose which was causing the problem, since I simply have no use for them.

Further to this, the problem seemed to return last night as I had some terrible stuttering with LiveTV. It actually seemed to co-incidence with me pressing the menu button on the Samsung TV remote. I wonder whether this triggered the TV to start searching for devices.

My TV is a Samsung Series 6 SMART TV (UE50MU61000K), and I am very suspicious that this is contributing to my problems.

I looked through all the various menus but could not see anything I could disable WRT discovery services, UPnP etc. I have therefore tried disconnecting the TV from ethernet, and have, instead, connected it over 2G WIFI.

I also re-organised my network a little as I had 8 devices plugged into the same switch connecting these machines - there are now just 4, as I’ve connected non-essential devices directly into the router.

Last night I ran further tests and the stuttering was occurring quite frequently.

One discovery I made this morning was that samba (or rather nmdb) on both my main tvheadend/samba server and the rpi3 were both in conflict to become the local master in elections - I found errors such as this repeating every 5 mins or so:

[2018/10/25 05:42:28.796727,  0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 192.168.0.6 for name WORKGROUP<1d>.
  This response was from IP 192.168.0.12, reporting an IP address of 192.168.0.12.

This was because they were both set with local master = yes and a default os_level of 20. This has likely been an issue for some time. In addition, they were both running with:

socket options = TCP_NODELAY IPTOS_LOWDELAY
(I think I added this in the past to prioritise samba traffic)

I have disabled the samba server (smdb and nmdb) on my RPi3, as I don’t use the shares on there anyway. Straight away, this resolved the elections issue and my tvheadend/samba server became the master:

[2018/10/25 09:59:53.590616,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
  *****
  Samba name server MEDIAPC is now a local master browser for workgroup TOMATO on subnet 192.168.0.6
  *****

I have also dropped back to the default samba socket options on the tvheadend/samba server.

In addition, I have adjusted the “DSCP/TOS for streaming” option in TVheadend->Configuration->General to “CS5”, which seems the most appropriate TOS for video streaming.

https://en.wikipedia.org/wiki/Differentiated_services#Class_Selector

I’m hoping this will give the TVheadend streaming packets a more appropriate priority, and a better chance of getting through the various layers in time to be processed by kodi.

Will see how it goes. If I’m still having problems I may end up running wireshark, as I suspect there is load on the network which is affecting latency.

If there are any other thoughts on how to diagnose further, I’m all ears…

Do you have QoS enabled?

Where abouts? Is that a setting in Kodi?

No — it’s usually a setting on your router