Hi resident experts.
I am seeking your help to understand a problem with the Seek() function in Live TV. I have MythTV installed on the same machine as Kodi 16.1 (Git:c327c53, Apr 25 2016) and use the MythTV PVR addon (ver 0.28-2-g15cf421) on Ubuntu 16.04.1 LTS (Kernel Linux 4.4.0-53-generic).
I am unsure of whether this relates to the PVR plugin or the framework within Kodi itself, so I have posted this question here.
The problem that I have is that seeking in Live TV is erratic. To get a 3 minute skip fwd/back function, I have mapped keys as follows:
F5 – Seek(-180)
F7 – Seek(180)
(I understand that this can be done different ways)
When I use these functions while watching a recording, everything works as expected.
When I use these functions while watching Live TV, it sometimes seems to work (mostly when skipping backwards) but skipping forwards only seems to skip about 9-10 seconds.
I enabled debug logging and tried to see what the differences were between (a) recording and (b) Live TV, and here is the salient parts of the log files with some calculations done by me:
SEEKING IN LIVE TV (TIMESHIFT)
09:08:27 T:139882877917504 DEBUG: OnKey: f5 (0xf094) pressed, action is Seek(-180)
09:08:27 T:139881850337024 DEBUG: demuxer seek to: 17588906 (**RWB 235,646 less than 17824552 above - (180sec x 50fps = 9000) **)
09:08:28 T:139882877917504 DEBUG: OnKey: f5 (0xf094) pressed, action is Seek(-180)
09:08:28 T:139881850337024 DEBUG: demuxer seek to: 17341540 (**RWB 247,366 less than 17588906 above - (180sec x 50fps = 9000) **)
09:08:33 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:33 T:139881850337024 DEBUG: demuxer seek to: 17518872 (**RWB 177,332 more than 17341540 above - (180sec x 50fps = 9000) **)
09:08:35 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:35 T:139881850337024 DEBUG: demuxer seek to: 17528017 (**RWB 9,145 more than 17518872 above - (180sec x 50fps = 9000) **)
09:08:37 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:37 T:139881850337024 DEBUG: demuxer seek to: 17705161 (**RWB 177,144 more than 17528017 above - (180sec x 50fps = 9000) **)
09:08:39 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:39 T:139881850337024 DEBUG: demuxer seek to: 17960752 (**RWB 255,591 more than 17705161 above - (180sec x 50fps = 9000) **)
09:08:41 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:41 T:139881850337024 DEBUG: demuxer seek to: 17970594 (**RWB 9,842 more than 17960752 above - (180sec x 50fps = 9000) **)
09:08:43 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:43 T:139881850337024 DEBUG: demuxer seek to: 17982592 (**RWB 11,998 more than 17970594 above - (180sec x 50fps = 9000) **)
09:08:45 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:45 T:139881850337024 DEBUG: demuxer seek to: 17990272 (**RWB 7,680 more than 17982592 above - (180sec x 50fps = 9000) **)
09:08:47 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:47 T:139881850337024 DEBUG: demuxer seek to: 17999356 (**RWB 9,084 more than 17990272 above - (180sec x 50fps = 9000) **)
09:08:48 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:48 T:139881850337024 DEBUG: demuxer seek to: 18008837 (**RWB 9,481 more than 17999356 above - (180sec x 50fps = 9000) **)
09:08:50 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:50 T:139881850337024 DEBUG: demuxer seek to: 18018472 (**RWB 9,635 more than 18008837 above - (180sec x 50fps = 9000) **)
09:08:51 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:51 T:139881850337024 DEBUG: demuxer seek to: 18027180 (**RWB 8,708 more than 18018472 above - (180sec x 50fps = 9000) **)
09:08:52 T:139882877917504 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
09:08:52 T:139881850337024 DEBUG: demuxer seek to: 18036592 (**RWB 9,142 more than 18027180 above - (180sec x 50fps = 9000) **)
SEEKING IN TV RECORDING
08:50:58 T:140602836289856 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
08:50:58 T:140600863065856 DEBUG: demuxer seek to: 189324 (**RWB 189,324 mSec? **)
08:50:59 T:140602836289856 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
08:50:59 T:140600863065856 DEBUG: demuxer seek to: 370966 (**RWB +181,642 mSec? more than 189324 above **)
08:51:00 T:140602836289856 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
08:51:00 T:140600863065856 DEBUG: demuxer seek to: 552166 (**RWB +181,200 mSec? more than 370966 above **)
08:51:01 T:140602836289856 DEBUG: OnKey: f7 (0xf096) pressed, action is Seek(180)
08:51:01 T:140600863065856 DEBUG: demuxer seek to: 733646 (**RWB +181,480 mSec? more than 552166 above **)
When watching a recording, the Seek() function seems to ask the stream to adjust by approx 180,000 which I expect is the number of mSecs requested. This works well.
When watching Live TV, its seems that sometimes it tries to Seek() to large numbers (maybe mSec) like 235,646, 247,366; but then starts skipping using values around 9,000. I know that the stream is not back to realtime at this stage, so I would expect that it should still be using large increments and not numbers like 9000-ish. Obviously, I don’t know the logic but it does seem strange.
Is this a bug in Kodi or the plugin? How can I help to get this looked at and fixed? .
I have longer logs, but the forum complains that the post is too long (sorry). Is there any way of adding attachments? Not obvious to me.
thanks,
Ron