IPTV - channel switching stops working

Hello - has anyone encountered such a problem that after switching the channel for the first time with a shortcut (in my case it is a TV remote) - the shortcut stops working?

I have OSMC on RaspberryPi3, kodi 18.5, confluence skin. TV client: PVR Simple Client IPTV.

The problem looks as if the first channel switching - the new channel turns on in another player. I guess because after clicking OK - I don’t see client-specific iptv buttons such as channel switching (up and down arrows), TXT, EPG etc.

Anyone know this problem? Or knows how to fix it?

It looks like the same default player is starting. I upload logs as if they were saying something to someone :slight_smile:

  1. I start IPTV and switch on a channel
Expand

2020-02-21 23:27:28.700 T:1915864624 NOTICE: VideoPlayer::OpenFile: pvr://channels/tv/Wszystkie/pvr.iptvsimple_153251038.pvr
2020-02-21 23:27:28.701 T:896488160 NOTICE: Creating InputStream
2020-02-21 23:27:29.128 T:896488160 NOTICE: Creating Demuxer
2020-02-21 23:27:32.746 T:896488160 NOTICE: Opening stream: 1 source: 256
2020-02-21 23:27:32.780 T:896488160 NOTICE: Creating video thread
2020-02-21 23:27:32.781 T:896488160 NOTICE: Opening stream: 2 source: 256
2020-02-21 23:27:32.784 T:896488160 NOTICE: Creating audio thread
2020-02-21 23:27:32.882 T:896488160 NOTICE: OMXClock using audio as reference
2020-02-21 23:27:32.988 T:938451680 WARNING: CRenderManager::WaitForBuffer - timeout waiting for bufferormatted text by 4 spaces

  1. Switch channel to next one:
Expand
2020-02-21 23:28:08.662 T:1915864624  NOTICE: VideoPlayer::OpenFile: pvr://channels/tv/Wszystkie/pvr.iptvsimple_807181391.pvr
2020-02-21 23:28:08.662 T:1915864624  NOTICE: CVideoPlayer::CloseFile()
2020-02-21 23:28:08.662 T:1915864624  NOTICE: VideoPlayer: waiting for threads to exit
2020-02-21 23:28:08.677 T:896488160  NOTICE: CVideoPlayer::OnExit()
2020-02-21 23:28:08.677 T:896488160  NOTICE: Closing stream player 1
2020-02-21 23:28:08.685 T:686670560  NOTICE: thread end: OMXPlayerAudio::OnExit()
2020-02-21 23:28:08.761 T:896488160  NOTICE: Closing stream player 2
2020-02-21 23:28:08.769 T:938451680  NOTICE: thread end: video_thread
2020-02-21 23:28:08.893 T:1915864624  NOTICE: VideoPlayer: finished waiting
2020-02-21 23:28:08.894 T:611316448  NOTICE: Creating InputStream
2020-02-21 23:28:09.242 T:611316448  NOTICE: Creating Demuxer
2020-02-21 23:28:12.273 T:611316448  NOTICE: Opening stream: 1 source: 256
2020-02-21 23:28:12.300 T:611316448  NOTICE: Creating video thread
2020-02-21 23:28:12.301 T:611316448  NOTICE: Opening stream: 2 source: 256
2020-02-21 23:28:12.302 T:611316448  NOTICE: Creating audio thread
2020-02-21 23:28:12.488 T:871310048 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
  1. Switching channels stops working. However, as I manually switch the channel (i.e. navigating to the appropriate line in the channel list and clicking OK) - Logs are the same like this last bench of logs.

We would need to see full debug logs to understand what’s going on here.
It would also be useful to know how this ‘shortcut’ was configured – which skin etc.

Sam

Is this shortcut referenced here just button mapping with keymap editor? If this is what your referring to then how you program this button determines how it acts. In a nutshell you can program to “global” and this decides a action for a button that works across different screens. If you have programed a button to just a particular screen then that mapping only applies to that screen. You would need to either map to global or to each screen you want to modify the behavior of individually. In your case you will find that non global mappings get contained within these screens…

TVChannels
TVRecordings
TVTimers
TVTimerRules
TVGuide
FullscreenLiveTV

You can get more information about this on Kodi’s wiki here.

Shortcut - I mean just key on remote tv (I have Sharp TV). It’s nothing special - all is default configured. I tried Keymap Editor (I’ve set PVR → PVR and changing channels, also Global → PVR), but it’s nothing changed.

As I said - I have confluence skin. But problem shows also on default Kodi skin and Ese… I don’t remember now :smiley: something what was installed on clear OSMC). Problem is the same.

Maybe isn’t clear how I described the problem. I will try to explain in different way. All works fine when I start Simple IPTV app. I’m starting some channel and then I could change tv. But now changing channels stops working. It looks like I would open that new channel with other application (because when I press ok - I see “play” button but I don’t see special TV buttons like channging channel arrows or EPG, TXT…)

I have simple .m3u list. Nothing special. I don’t think there is problem with list because clearly it’s software. Any changing channel broke changing channel…

I could run more debug options but you need to help me to choose helpful options. I thought that problem is pretty obvious. I even found here such topic but there was no response and was very old.

I’m not versed with the IPTV stuff in Kodi as i’ve never used it, but I think I can get you to where you want to be. Can you ssh (instructions) into your Pi and type the following in and then post the resulting url in this thread…

paste-log ~/.kodi/userdata/keymaps/gen.xml

https://paste.osmc.tv/hiwuhuzuno
But i don’t think that problem is with keymap. In logs which I send first - maybe we could see more.

What are these two keys on your remote that you are trying to use?

Full logs: https://paste.osmc.tv/vanivasula

  1. Worked:
Expand
2020-02-24 20:46:59.788 T:1455297248   DEBUG: CecLogMessage - >> 01:44:30
2020-02-24 20:46:59.788 T:1455297248   DEBUG: CecLogMessage - SetCurrentButton channel up (30) D:0ms cur:30
2020-02-24 20:46:59.789 T:1455297248   DEBUG: CecLogMessage - key pressed: channel up (30) current(ff) duration(0)
2020-02-24 20:46:59.789 T:1455297248   DEBUG: CecLogMessage - Changed key channel up (30) D:0ms cur:ff
2020-02-24 20:46:59.789 T:1455297248   DEBUG: CecLogMessage - key pressed: channel up (30, 0)
2020-02-24 20:46:59.789 T:1455297248   DEBUG: PushCecKeypress - received key d2 duration 0 (rep:0 size:0)
2020-02-24 20:46:59.789 T:1455297248   DEBUG: PushCecKeypress - added key d2
2020-02-24 20:46:59.790 T:1455297248   DEBUG: CecLogMessage - CheckKeypressTimeout T:431034.369
2020-02-24 20:46:59.790 T:1455297248   DEBUG: CecLogMessage - Key channel up: idle (duration:0) (30) timeout:875838001ms (rel:500,rep:0,prs:500,rel:0)
2020-02-24 20:46:59.790 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2020-02-24 20:46:59.819 T:1915127344   DEBUG: HandleKey: leftshift (0xd2) pressed, action is channelup
2020-02-24 20:46:59.819 T:1915127344   DEBUG: CPlayerGUIInfo::InitCurrentItem(pvr://channels/tv/Wszystkie/pvr.iptvsimple_586694482.pvr)
2020-02-24 20:46:59.853 T:1915127344   DEBUG: StartScript - calling plugin WP Pilot('plugin://plugin.video.pilot.wp/','4','?action=PLAY&channel=158','resume:false')
2020-02-24 20:46:59.853 T:714072800   DEBUG: Thread LanguageInvoker start, auto delete: false
2020-02-24 20:46:59.853 T:714072800    INFO: initializing python engine.
2020-02-24 20:46:59.853 T:714072800   DEBUG: CPythonInvoker(56, /home/osmc/.kodi/addons/plugin.video.pilot.wp/addon.py): start processing
2020-02-24 20:46:59.857 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:30
2020-02-24 20:46:59.857 T:1455297248   DEBUG: CecLogMessage - key released: channel up (30) D:69ms
2020-02-24 20:46:59.858 T:1455297248   DEBUG: PushCecKeypress - received key d2 duration 69 (rep:0 size:0)
2020-02-24 20:46:59.858 T:1455297248   DEBUG: PushCecKeypress - ignored key d2
2020-02-24 20:46:59.858 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
2020-02-24 20:46:59.874 T:1136653024   DEBUG: Thread scriptobs start, auto delete: false
2020-02-24 20:46:59.949 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:30
2020-02-24 20:46:59.950 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
2020-02-24 20:47:00.074 T:1915127344   DEBUG: ------ Window Init (DialogBusy.xml) ------
2020-02-24 20:47:00.119 T:714072800   DEBUG: -->Python Interpreter Initialized<--
2020-02-24 20:47:00.120 T:714072800   DEBUG: CPythonInvoker(56, /home/osmc/.kodi/addons/plugin.video.pilot.wp/addon.py): the source file to load is "/home/osmc/.kodi/addons/plugin.video.pilot.wp/addon.py"
  1. Now - didn’t
Expand
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - >> 01:44:30
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - SetCurrentButton channel up (30) D:0ms cur:30
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - key pressed: channel up (30) current(ff) duration(0)
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - Changed key channel up (30) D:0ms cur:ff
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - key pressed: channel up (30, 0)
2020-02-24 20:47:13.503 T:1455297248   DEBUG: PushCecKeypress - received key d2 duration 0 (rep:0 size:0)
2020-02-24 20:47:13.503 T:1455297248   DEBUG: PushCecKeypress - added key d2
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - CheckKeypressTimeout T:431048.084
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - Key channel up: idle (duration:0) (30) timeout:875838001ms (rel:500,rep:0,prs:500,rel:0)
2020-02-24 20:47:13.503 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2020-02-24 20:47:13.536 T:1915127344   DEBUG: HandleKey: leftshift (0xd2) pressed, action is channelup
2020-02-24 20:47:13.572 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:30
2020-02-24 20:47:13.572 T:1455297248   DEBUG: CecLogMessage - key released: channel up (30) D:69ms
2020-02-24 20:47:13.572 T:1455297248   DEBUG: PushCecKeypress - received key d2 duration 69 (rep:0 size:0)
2020-02-24 20:47:13.572 T:1455297248   DEBUG: PushCecKeypress - ignored key d2
2020-02-24 20:47:13.572 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
2020-02-24 20:47:13.665 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:30
2020-02-24 20:47:13.666 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
2020-02-24 20:47:14.807 T:1455297248   DEBUG: CecLogMessage - >> 01:44:30
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - SetCurrentButton channel up (30) D:0ms cur:30
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - key pressed: channel up (30) current(ff) duration(0)
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - Changed key channel up (30) D:0ms cur:ff
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - key pressed: channel up (30, 0)
2020-02-24 20:47:14.808 T:1455297248   DEBUG: PushCecKeypress - received key d2 duration 0 (rep:0 size:0)
2020-02-24 20:47:14.808 T:1455297248   DEBUG: PushCecKeypress - added key d2
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - CheckKeypressTimeout T:431049.389
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - Key channel up: idle (duration:0) (30) timeout:875838001ms (rel:500,rep:0,prs:500,rel:0)
2020-02-24 20:47:14.808 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2020-02-24 20:47:14.836 T:1915127344   DEBUG: HandleKey: leftshift (0xd2) pressed, action is channelup
2020-02-24 20:47:14.877 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:30
2020-02-24 20:47:14.877 T:1455297248   DEBUG: CecLogMessage - key released: channel up (30) D:69ms
2020-02-24 20:47:14.877 T:1455297248   DEBUG: PushCecKeypress - received key d2 duration 69 (rep:0 size:0)
2020-02-24 20:47:14.877 T:1455297248   DEBUG: PushCecKeypress - ignored key d2
2020-02-24 20:47:14.877 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
2020-02-24 20:47:14.970 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:30
2020-02-24 20:47:14.970 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)

210 is channel up; 211 is channel down. I want to use only those. And first time 210 - works and change channel up but then 210 (211 also) stop working.

There is something wrong with the link to your full logs so I cannot view it. What I see from the snippet you posted above is that your channelup is mapping to a dead keys and that is going to be a problem. Is your settings>system>input>keyboard languages set to something other than english? If so can you change that to English us or uk and let me know if keymap editor comes back with key id numbers other than 210 and 211 for your channel up/down keys.

maybe there is too much lines? I can send file with logs.

About keyboard - I’ve always had set english - us

The only relevant bit here is what Kodi is seeing the keys as. I can see that the channelup button is being received as the left shift key from the handlekey event I quoted above. What does the log display for the handlekey event for channeldown?

I’ve enabled CEC logs and when I press channel down logs show this:

2020-02-24 21:54:12.314 T:1455297248   DEBUG: CecLogMessage - >> 01:44:31
2020-02-24 21:54:12.315 T:1455297248   DEBUG: CecLogMessage - SetCurrentButton channel down (31) D:0ms cur:31
2020-02-24 21:54:12.315 T:1455297248   DEBUG: CecLogMessage - key pressed: channel down (31) current(ff) duration(0)
2020-02-24 21:54:12.315 T:1455297248   DEBUG: CecLogMessage - Changed key channel down (31) D:0ms cur:ff
2020-02-24 21:54:12.315 T:1455297248   DEBUG: CecLogMessage - key pressed: channel down (31, 0)
2020-02-24 21:54:12.316 T:1455297248   DEBUG: PushCecKeypress - received key d3 duration 0 (rep:0 size:0)
2020-02-24 21:54:12.316 T:1455297248   DEBUG: PushCecKeypress - added key d3
2020-02-24 21:54:12.316 T:1455297248   DEBUG: CecLogMessage - CheckKeypressTimeout T:435066.895
2020-02-24 21:54:12.316 T:1455297248   DEBUG: CecLogMessage - Key channel down: idle (duration:0) (31) timeout:875838001ms (rel:500,rep:0,prs:500,rel:0)
2020-02-24 21:54:12.316 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): user control pressed (44)
2020-02-24 21:54:12.337 T:1915127344   DEBUG: HandleKey: rightshift (0xd3) pressed, action is channeldown
2020-02-24 21:54:12.384 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:31
2020-02-24 21:54:12.384 T:1455297248   DEBUG: CecLogMessage - key released: channel down (31) D:70ms
2020-02-24 21:54:12.384 T:1455297248   DEBUG: PushCecKeypress - received key d3 duration 70 (rep:0 size:0)
2020-02-24 21:54:12.384 T:1455297248   DEBUG: PushCecKeypress - ignored key d3
2020-02-24 21:54:12.384 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)
2020-02-24 21:54:12.478 T:1455297248   DEBUG: CecLogMessage - >> 01:8b:31
2020-02-24 21:54:12.478 T:1455297248   DEBUG: CecLogMessage - >> TV (0) -> Recorder 1 (1): vendor remote button up (8B)

Now logs should be visible:
https://paste.osmc.tv/qofemegiva.coffee

After doing some reading I see that the channel up/down functions are only applicable for live TV and radio. From what I understand there is more than one way IPTV streams are seen and this affects navigation. Therefore the way to set this up would be for global to use the functions for other streams. Having not used this part of Kodi i’m not sure which these would be but I assume if they are not up/down then they would probably be page up/down. I would edit your keymap so it looks something more like this…

<keymap>
	<global>
		<keyboard>
			<key id="210">PageUp</key>
			<key id="211">PageDown</key>
		</keyboard>
	</global>
	<fullscreenlivetv>
		<keyboard>
			<key id="210">channelup</key>
			<key id="211">channeldown</key>
		</keyboard>
	</fullscreenlivetv>
</keymap>

You should note that I also removed the mapping you had for bigstep. The reason why is that they are already available with the up and down direction buttons, and more importantly the button you had set for bigstepback was in conflict with with your channeldown mapping. If you had mapped that to a different key then Kodi is seeing it as the same key as your channeldown button on your remote so you should not try to map it. Additionally I removed the PVR section as that window name is no longer valid in current versions of Kodi.

Thanks for help. But it didn’t fix the problem :frowning: I think - when I choose channel for the first time - it opens in some other player. I’ve already mentioned the buttons, besides that I see also that on top of the screen there is bar with delay or something like this (after that it show counting since I’ve started watching stream). However if a choose channel for the first time (so then 210/211 - are changing channels correctly) - on top I see progress bar of show which I’m watching.

and channelup/down it’s not the only problem. The same is with switching channels with numeric keys (on the same sharp remote tv). For the first time “1” or other key works, but after stream start - all that navigation keys stops working.

Ok. I’ve finally got it! But I don’t like my workaround. I want to use from OMX Player in the videos.

I disabled acceleration OMXPlayer (so there is only MMAL) and it works like I expected (It’s weird because I thought that I’ve checked it earlier).

Do you have better workaround for it?

2 Likes

OMXPlayer is end of life (as is MMAL to an extent), so I’m not sure it will get much further treatment for Kodi Leia.

Kodi in the future will still use MMAL on Pi, but access it in a different way.