kodi-pvr / pvr.iptvsimple

IPTV Simple client for Kodi PVR
GNU General Public License v2.0
773 stars 372 forks source link

Channels Do Not Play and Kodi Crashes on Pressing 'Stop' (RPi4 w/ XBian) #520

Open joernschellhaas opened 3 years ago

joernschellhaas commented 3 years ago

System Info

I am running Kodi via XBian on an Raspberry Pi 4

root@xbian ~ # cat /etc/xbian_version
20210506-0
root@xbian ~ # uname -a
Linux xbian 5.4.122+ #1 SMP PREEMPT Wed May 26 22:48:16 CEST 2021 armv7l GNU/Linux

Kodi version: 19.1.0 IPTV Simple PVR version: 7.6.5

Setup

I also installed the "ARD Mediathek" video provider. Video playback works with that one.

Bug Description

Idle CPU load of Kodi is 25%. The channel list does load. When I want to start a channel, Kodi shows that the channel is playing in the top right border, but nothing else happens.

When I click a second time, the playback view opens, but the video does not start. Instead I do get some weird UI glitches (see https://youtu.be/Eddn3yp9lOk) and the CPU load drops to 6%.

Finally, when I click "stop", the screen freezes and CPU load drops to 1%. From the debug log, I see that Kodi is still processing my mouse input. I can only kill Kodi using killall -9 kodi.bin; a plain killall kodi.bin does not work.

Here is the log file: https://paste.kodi.tv/ivibatifej.kodi

phunkyfish commented 3 years ago

This is not URL that is playable:

pipe://ffmpeg -loglevel fatal -i https://zdf-hls-17.akamaized.net/hls/live/2016500/de/veryhigh/master.m3u8 -vcodec copy -acodec copy -metadata service_name=ZDFinfo\ HD -metadata service_provider=IPTV-DE -mpegts_service_type advanced_codec_digital_hdtv -f mpegts pipe:1"

That is why it's failing.

joernschellhaas commented 3 years ago

Hi, and thanks for the fast reply, appreciate that :)

You mean, the URL from the list I configured, https://zdf-hls-17.akamaized.net/hls/live/2016500/de/veryhigh/master.m3u8, is not playable? That would be strange because that list is built explicitly for this addon. Or do I need to adapt some setting in order not to use ffmpeg?

And, is there a way to make the failure behaviour more user friendly? E.g., do not pretend to start playing but display an error message.

phunkyfish commented 3 years ago

But that is not the URL it is trying to play. It’s trying to play something starting with pipe:///.

I’m not sure how to make it more user friendly. It appears the M3U file you are trying to use contains invalid URLs.

Fix the M3U file and it will work.

ninze commented 3 years ago

@phunkyfish I am experiencing exactly the same behavior as described in this issue. In my case, Kodi crashes only on the raspberry pi 2G ram model. Moving the sd card to the 4G model fixes the issue. The m3u URLs are valid.

Log: http://ix.io/3yrG

phunkyfish commented 3 years ago

@phunkyfish I am experiencing exactly the same behavior as described in this issue. In my case, Kodi crashes only on the raspberry pi 2G ram model. Moving the sd card to the 4G model fixes the issue. The m3u URLs are valid.

Log: http://ix.io/3yrG

You need to upgrade to Kodi Matrix first snd if you still have the problem post a new debug log.

ninze commented 3 years ago

Unfortunately, upgrading to Matrix is not an option for me, as it no longer supports VNC, which is a requirement. I can confirm though that iptv simple client works well on Matrix.

As to why it crashes on Leia, I thought it was the memory difference, but apparently I was wrong. I have 2 RPis crashing now (one 2GB and one 4GB) and one working perfectly fine with the same software installed. Will try to investigate a bit more to see what's the difference between those devices.

phunkyfish commented 3 years ago

If you need to stay on Leia that’s fine but I’m afraid I’ve only supplied fixes on the Matrix version and that was the focus of a huge rewrite of the addon so backporting is not a possibility.

ninze commented 3 years ago

The only difference between the rpi4/4GB devices that I have is that one is rev v1.2 and the other one is rev 1.4. PVR iptv player works fine on the 1.2 model and crashes on the 1.4 model using the same sd card/os.

phunkyfish commented 3 years ago

@ninze Please try with Matrix on all devices to see if the problem is fixed for future generations. it should just mean a spare SD card to do so.

ninze commented 3 years ago

@phunkyfish I no longer have access to the v1.2 device, but should get another one later this week and will try to test it.

phunkyfish commented 3 years ago

@phunkyfish I no longer have access to the v1.2 device, but should get another one later this week and will try to test it.

Cool, thanks

jodo234 commented 3 years ago

I maybe have a related issue... I switched from RPi 3 to RPi4 with OSMC. First, I just switched the SD card but the Pi didnt start afterwards. So I re-installed a fresh copy of OSMC with Kodi 19.1. Then I copied over the complete kodi folder from the RPi3. Just to make sure I re-entered URLs for channels and EPG. But EPG tab stays empty. Channels are listed but when I start one I get that same behaviour that it seems to run but doesnt show the stream. Stopping the stream crashes kodi. I tried resetting the tv settings in kodi settings, resetting settings on each tab of the plugin, deactivate/activate, remove folder from userdata/addon_data abd reconfigure. Nothing helps. If I reboot the TV tab doesnt show automatically, once I did changes it pops up. In the log nothing happens once I start a stream :/ How can I clean the plugin settings to try a fresh start?

phunkyfish commented 3 years ago

Can I suggest setting it up from scratch? If there are any binaries in the folder you copied they will not work and will cause problems.

jodo234 commented 3 years ago

Hehe yes you can :) I can do a clean install and see if the behaviour is different then. But I dont want to re-do all my settings, dbs etc :( Isnt deleting "home/osmc/.kodi/userdata/addon_data/pvr.iptvsimple/" folder enough to get rid of all stuff from that pvr client?

jodo234 commented 3 years ago

Ok did a clean install of curent OSMC with Kodi 19.1 and when I click activate for PVR IP TV Simple I just get an error and cant enable it :/

While trying, this happens in the log:

2021-09-20 11:56:09.811 T:419 INFO : Loading skin file: DialogAddonSettings.xml, load type: KEEP_IN_MEMORY 2021-09-20 11:56:14.978 T:622 ERROR : IAddonInstanceHandler::CreateInstance: pvr.iptvsimple returned bad status "Permanent failure" during instance creation 2021-09-20 11:56:14.978 T:622 ERROR : UpdateAddons: Failed to create add-on PVR IPTV Simple Client, status = 5 2021-09-20 11:56:15.203 T:419 WARNING : CGUIMediaWindow::OnMessage - updating in progress 2021-09-20 11:56:18.763 T:604 INFO : JSONRPC Server: Disconnection detected 2021-09-20 11:56:48.264 T:604 INFO : JSONRPC Server: New connection added 2021-09-20 11:57:01.221 T:800 ERROR : IAddonInstanceHandler::CreateInstance: pvr.iptvsimple returned bad status "Permanent failure" during instance creation 2021-09-20 11:57:01.221 T:800 ERROR : UpdateAddons: Failed to create add-on PVR IPTV Simple Client, status = 5 2021-09-20 11:57:01.408 T:419 WARNING : CGUIMediaWindow::OnMessage - updating in progress

phunkyfish commented 3 years ago

Ok, and did you enter a M3U and xmltv URL?

jodo234 commented 3 years ago

Yes: m3u: http://bit.ly/kn-kodi-tv EPG: https://ricxepg.nl/epg_data/rytecDE_Basic.gz

I was now able to activate TV by rebooting, deleting settings through settings menu of Kodi. Then I had the same problems again like with restoring my old kodi installation :/ Does this plugin interfere with netflix or amazon maybe?

I tried switching InputSteam Adaptive option on for your plugin and after more than a minute while kodi was unresponsive finally a steam starts. very weird...

phunkyfish commented 3 years ago

Maybe raise on the osmc forum. If it works with a clean install there is something in your restore that is causing this.

jodo234 commented 3 years ago

Nope I did a clean install and experience the same ...

phunkyfish commented 3 years ago

What happens if you use kodi on supported kodi-team platform, i.e. windows or Mac. Does it work there?

jodo234 commented 3 years ago

It also works on my old RPi3 like a charm for some years :) Only have this issue on the new RPi4

phunkyfish commented 3 years ago

It also works on my old RPi3 like a charm for some years :) Only have this issue on the new RPi4

Yes, but I’m trying to find out if this is specific to OSMC on Rpi4.

maybe try LibreElec and see if you still get an error.

jodo234 commented 3 years ago

Hm ok got it working so far on the Kodi 19.1 with OSMC. EPG seems to be a problem with the URL. I switched to a different one that seems to work. Channels now also start fast. BUT ... when I reboot OSMC, the TV menu entry is not in place and it doesnt update PVR channels and EPG even though plugin is shown as activated. So I went to plugins and deactivated/activated the plugin PVR IPTV Simple and it syncs channels and EPG and TV menu entry pops up and I can use it ... not sure why it doesnt automatically show up on OSMC boot ... Here is a debug log of the Pi starting and then I manually disabled/enabled the plugin and started a stream: https://paste.osmc.tv/alekocowik.django

phunkyfish commented 3 years ago

If it’s similar to LibreElec there might be a setting to wait for network before starting kodi. It’s likely that is the problem.

jodo234 commented 3 years ago

Yeah it is similar, in the My OSMC addon you can configure network and set "wait for network". And indeed it fixed the issue, nice :)

Many thx

phunkyfish commented 3 years ago

Excellent

joernschellhaas commented 3 years ago

It's great that the issue has been resolved for @jodo234! :) However, it has not been fixed for me (not sure about @ninze).

So it seems to me that I installed (or tried to?) tvheadend and therefore used the pipe playlist. Is that supported by this plugin?

Since there is also a "direct stream" playlist (https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv_main.m3u), I'll probably try that one.

phunkyfish commented 3 years ago

https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv_main.m3u

I have no idea what a piped playlist is so I'd recommend you use the other one.

EDIT: Ah, the piped playlist will definitely not work, it is only for the PVR addon for TVHeadend. It has no meaning in iptvsimple. So direct is the one to use.