FernetMenta / vdr-plugin-vnsiserver

VDR plugin to handle XBMC clients.
GNU General Public License v2.0
16 stars 33 forks source link

vdr-2.2.0: recordings stuttering, live tv ok #105

Closed madsci closed 6 years ago

madsci commented 6 years ago

Dear FernetMenta On my Kodi-Client that connects by your plugin to a VDR-Server, I have a strange issue: Live-TV works fine but the recorded clip (same channel) does stutter and is constantly updating cache. Accessing the TS by nfs, the clip plays normally.

VDR 2.4.0, Plugin 1.6.0, Kodi 18-Alpha Network: Ethernet 40 MBit

Network usage in Live-TV between 10-20 MBit, same for direct access but only ~5 MBit by vnsi, which explains stuttering. Sufficient cpu and ram performance on server.

Thank you

madsci commented 6 years ago

VDR Version is 2.4.0 e-tobi. Sorry for wrong in title

FernetMenta commented 6 years ago

please pastebin a kodi debug log

FernetMenta commented 6 years ago

Network: Ethernet 40 MBit

what is this? do you connect to vdr via WAN?

madsci commented 6 years ago

The KODI's log file is here: http://ix.io/1cDJ Yes, I try to share the VDR server over a fiber glass direct line. But it is also not working on a 100 Mbit ethernet connection either. As mentioned, the speed seems to be fine as the stream has around 11 MBit bit rate and it is working fine in live mode and by accessing the TS file over nfs. Is a lot overhead created when viewing a recorded stream? Thanks for your help

FernetMenta commented 6 years ago

Is a lot overhead created when viewing a recorded stream?

No.

I don't observe this issue, not even with higher bitrate videos. Nevertheless, I have an idea of what's going on here. For nfs Kodi sets a chunk size for reading packets over network that fits the protocol. If an implementation of the streaming API, in this case PVR, does not set the chunk size, it falls back to a default value of 4k. I think that the raspberry pi struggels with this small value.

Two changes are required to fix this:

1) Change of PVR API to allow setting chunk size. 2) Change in PVR addon setting the chunk size.

Stay tuned.

@ksooo fyi

madsci commented 6 years ago

I followed your discussion in the forum about this topic and it seems tha live and recorded program indeed differ in this chunk size. So the explanation makes sense.

However, I have not found out how to configure chunk size. Does this mean that it is not implemented yet?

best regards

FernetMenta commented 6 years ago

What discussion on the forum?

See my last post here. It shows what it takes to fix this. Almost done: https://github.com/FernetMenta/pvr.vdr.vnsi/pull/16

madsci commented 6 years ago

Cool. That was fast. Looking forward to test the new version. Thank you very much for your help.

It must have been this thread: https://forum.kodi.tv/showthread.php?tid=214062&page=3&highlight=Chunk

There were chunk size, mtu and live tv or playing a recording discussed.

madsci commented 6 years ago

you are my hero. With 3.5.4 the issue is gone and playing recordings works as it should.

thanks a lot