Project

General

Profile

Very slow playback of recordings from Kodi

Added by Davor Komljenovic about 8 years ago

Hello, hopefully someone can help and/or explain some things to me.

I am running Tvheadend 4.0.9-13~g64fec81~trusty on Ubuntu 14.04. With two different Kodi 16.1 clients I get horrible playback of recordings, basically unwatchable (stuttering, chopping, stopping, slow buffering, etc. - looks like less than 1 Mb/s speed - horrible). One client is on Cubox-i4x4 running LibreELEC 7.0.2 and other is on my x86 laptop running Windows 7.

I have already troubleshot this to death:
  • Recordings play terribly when going to Videos and adding pvr://recordings/ (one of default Kodi shares) to the list of video sources, then trying to play the recordings
  • Recordings play perfectly through the Tvheadend web interface using VLC, for example (on my x86 laptop)
  • Recordings play perfectly when copied to local hard drives on x86 or Cubox USB hard drive
  • Recordings played terribly (NOTHING CHANGED) when I changed network setup. Since my Tvheadend machine was connected to the cable modem/router and my Kodi machines on second router connected using the WAN port, I changed the setup so that second router is just an access point and is connected to the cable modem/router using the LAN port. I was thinking maybe the issue is with the way traffic flowed between two routers.
  • Live TV plays perfectly, no matter which network setup or client
  • It is not the streaming profiles - tried everything
  • Same issue happens when playing recordings on LibreELEC 7.0.2 and Tvheadend 4.1.1945 (what I had initially installed but switched to Ubuntu thinking it was a LibreELEC/Tvheadend problem)
  • I mounted a SMB share from my NAS on my Tvheadend machine. Then I changed the recording path of tvheadend to that share. Then I recorded something. In Kodi, I went to TV->Recordings and tried playing back that recording. It stuttered and was slow just like before. Then I went into Videos and added the SMB share from my NAS and tried playing back the recording. It played perfectly!

The last point is the most important one to me. Why does the exact same file play differently when accessed as a "SMB" share or the Kodi "pvr://recordings" share? That seems to be the main issue. One last thing I will attempt it to make a SMB share on the Tvheadend machine and store the recordings there and see how Kodi plays those files.

Can anyone help? This is the last step for me to make my system work.

Can anyone tell me how Tvheadend running on Ubuntu shares the recordings? Which protocol it is using, are there specific ports it is using, what are file permissions for clients, etc.?


Replies (5)

RE: Very slow playback of recordings from Kodi - Added by Davor Komljenovic about 8 years ago

Anybody? Can anyone tell me how Tvheadend running on Ubuntu shares the recordings? Which protocol it is using, are there specific ports it is using, what are file permissions for clients, etc.? Maybe someone can tell me how Tvheadend HTSP client on Kodi is sharing the recordings to Kodi?

RE: Very slow playback of recordings from Kodi - Added by Paul _ almost 8 years ago

Hello all involved with tvheadend. Very impressed with all the work everyone has contributed to building this program. its a blessing for an expat i have two pi's one running the server 370 miles away as the crow fly's and its flawless with live tv, it even worked perfectly 2900 miles away when i was on holidays so can not fault it except for this playback of recordings Davor has described above its exactly the same issue really plays fine on vlc but on my libreelec client its just unwatchable really. Kodi on my laptop had the same issues.

rpi3 libreelec server with the latest builds of libreelec and tvheadend over the past 3 months. same issue on all

rpi2 libreelec client with the same revisions as the server.

i suspect its a kodi/libreelec issue but any help would be appreciated

many thanks

paul

RE: Very slow playback of recordings from Kodi - Added by Davor Komljenovic almost 8 years ago

Paul,

I never actually solved this issue. However I can give you more information.

I stopped using the desktop PC as my tvheadend server. I bought the Odroid XU4, which is an ARM mini computer. I installed Debian Jessie headless server on it. I then built latest tvheadend and configured it.

Now I have no issues with recording playback. I am using the same clients as before, LibreELEC 7.0.2 on Cubox-i4x4 and Kodi 17rc3 on my Windows 7 laptop. Both of these have no problem with playback of recordings from Kodi.

So what that tells me is that there is some issue with the SMB protocol and NFS protocol between Kodi and tvheadend machines. It seems to be connected to type of Linux distribution, maybe type of computer architecture, who knows. No matter what I did I could not get the recordings to play at a normal speed when I was using Ubuntu and desktop PC.

Hopefully this helps.

RE: Very slow playback of recordings from Kodi - Added by Paul _ almost 8 years ago

Davor,

Thanks for the reply. Good to know you sorted the issue hopefully with further releases the problem will be resolved my end.

Both the rpi's are ARM and as i said i had the same versions of libreelec and tvheadend on both and am currently running the latest beta of libreelec. The Server has no problem with playback when i play the m3u file in vlc player on my laptop but struggles when playing on tvh client on the rpi2 and windows kodi. local playback on the server rpi3 is fine so could it be the tvheadend client on remote machines that has the bug? thanks again for getting back to me hopefully it gets resolved with further releases i dont fancy changing hardware server side it should be good enough and its hundreds of miles away so i wait in hope! :)

RE: Very slow playback of recordings from Kodi - Added by jonudewux jonudewux over 7 years ago

When tvheadend and kodi are running on same device - 1080p vide recordings are played smoothly, but on different devices recordings are slow.
Long time ago local cache functionality was removed from addon.
Seems that cache helping on little bit slower networks - ping 5 ms.
Seek issues which was fixed with removing that functionality was caused by race condition.
I revert a change, and fix some race conditions - now seems that 1080p recordings are playing
smoothly on different devices over wifi network.

    (1-5/5)