NextPVR Forums

Full Version: Output of Live TV via Kodi lost
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I seem to have lost the ability to view live TV from NPVR via Kodi. I am not sure whether this is an NPVR problem or a Kodi / plugin problem so I thought I would start here before heading over to the Kodi/LE forums.

I am running LibreElec 9.2.1 (Kodi 18.6) on a RPI3b+ using the latest LE repo version of the NPVR plugin for that version, I have made no changes to this setup, other than auto-updated plugins, since the release of LE9.2.1.  I can see LE/Kodi loading the TV channels/guide/recording etc at the top right of my TV when the plugin starts. I can view the NPVR provided TV guide information and can watch recordings without any problem. Switching to Live TV however gives the error:

'One or more items failed to play. Check the log for more information about this message'

I can see some information about the error in the Log Viewer plugin but I am not sure where Kodi keeps its logs otherwise.  As far as I can see the error reported in the log file is:

ERROR:<general>:XFILE:CFileCache::Open failed open source <http://192.168.86.225:8866/live?channeloid:8060&client=XBMC<long sting of numbers /letters to many to copy)
ERROR:<general>:CCurlFile::Open failed with code 404 for http://192.168.86.225:8866/live?channelo...=XBMC<long sting of numbers /letters to many to copy)

If you know where to find the Kodi logs, and can tell me, I will provide them for you.  I have also tried using the latest Daily 'Matrix' Kodi version on my Windows 10 PC and get the same problem and errors.

I am running NPVR 5.0.3.200415 on an RPI 4 (4GB) for recordings only (no viewing) which in turn is getting its TV information from a HDHomeRun Quattro. I have been running this setup since early Junuary with no problems. The IP number reported in the LE/Kodi error above is the IP number of my NPVR RPI.

I can view live TV directly from the Quattro using the HDHomeRun app on my Windows 10 PC, so there seems to be no problems there. All the above components are on the same wired network. I have attached the latest NPVR logs for you to see, I was trying various live channels between 09:30 and 10:00 BST on Thursday Apr 23. Please let me know if you need any further information from me.

Thanks

Chris
I expect you changed the folder for live tv to a folder that isn't there by default.

Unexpected error creating TSWriter map: System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/pi/buffer/live-BBC One London-522-11.ts.map'.

The wiki explains where to get the logs https://github.com/sub3/NextPVR/wiki/get-help you might not need them if you fix the setting in docker or NextPVR

Martin
Martin

Thanks, your information above set me on quite a trail over the few days. The 'buffer' director had apparently disappeared from my PI but when I went to recreate it that is when the 'fun' started.

My original directoy layout on the PI was:

/home/pi - default PI user directory
/home/pi/buffer - Live TV buffer directory for NPVR
/home/pi/recordings - original NPVR local recordings directory (not used by me as such)
/home/pi/nas_recordings - mount directory for NAS based NFS recording share, auto-mounted via FSTAB

This setup has worked ever since I moved with NPVR v5 to the Pi in January of this year but recently I began to experience some problems with the NAS based NFS share not automounting as it had done in the past. After various attempts to improve the automount I resorted to autofs which seemed to work Ok as far as the mount was concerned. However it also turned out, in part, to be the culprit of the buffer directory apparently disappearing. And not just the buffer directory but most things under the /home/pi structure as well. Worse, the /home/pi folder stucture seems to have been made read only to everybody including the 'pi' user so I couldn't change anything in this folder structure even when using sudo. I had to create a new user account, remove autofs and its setup before I could get back to using the normal pi user account. In doing so the apparently missing folder structure in the /home/pi folder structure all magically reappeared.

It seems that automounting NFS shares (I haven't tried CIFS) in Rasbian/Debian via autofs, and also via FSTAB, can be problematical and may have this and other effects. There is much written about how to cure it using various mount options in FSTAB, none of the many I tried worked for me. Using a standard 'mount' command had always mounted the NFS share 'correctly' and there is a lot of discussion about when the network starts (particularly a wifi network, which I don't use) in relation to mounting shares via FSTAB.  A standard 'mount' command from the CLI had always worked for me and the solution (for me) when I found it was to use the standard mount command format via /etc/rc.local which apparently is the last thing that the RPi boot sequence processes.  

This might not be be the 'proper' way to mount and NFS share but while it works for me I will keep on using it.  So I now have all aspects of a working NPVR again in the browser and in Kodi.

Thanks again for your pointer and all the other support you have provided to me and others.

Regards.

Chris
[attachment=1484]

After working flawlessly since mid April I upgraded to v5.0.5 this morning and again find that Kodi cannot play live tV.  The error seems slightly different this time in that the /home/pi/buffer DOES exist but now appears to have a permission problem (I haven't changed the permissions since recreatuing the folder in April). The error is:

2020-05-18 10:17:25.175 [ERROR][89] Unexpected error creating TSWriter map: System.UnauthorizedAccessException: Access to the path '/home/pi/buffer/live-BBC One London-446-9.ts.map' is denied.
---> System.IO.IOException: Permission denied

The permissions on /home/pi/buffer is currently:

drwxr-xr-x  2 pi  pi    4096 Apr 24 14:59 buffer

So what has changed ?

Full logs attached.

Thanks

Chris
The deb installer is unaware of a folder called /home/pi/buffer so that would be something that you changed. Are your nas_recordings different too.

You can follow the instructions here https://forums.nextpvr.com/showthread.ph...#pid524823 to change them.

If this is something Raspian did to you I would consider not using the /home/pi folder as a base. I never considered this a good location.

Martin
Martin

Thanks for this information. Yes, I created the /home/pi/buffer folder for the LIve TV buffer way back in January when I first installed NPVR (using v5.0.1 / 5.0.2) on my RPi and I am not aware of it changing since, other than 'apparently' going missing in April at the start of this thread.  As such I am not sure why it suddenly didn't like working this morning as I am not aware of making any changes to it. 

I take your point about using '/home/pi/' as a base for these folders and I have moved them, using the script you referred to above, to a new '/npvr' folder created for this purpose. The 'nas_recordings' folder is one of mine which is symlinked to my NAS storage location as detailed in post #3 above but I am currently leaving that 'as is' due to the NFS mount issues I noted earlier. All appears to be working properly again.

Thanks once again for a speedy response which has helped me sort my problem.

Regards.

Chris