[mythtv-users] Events at the beginning of a recording

Jan Ceuleers jan.ceuleers at gmail.com
Sun Feb 5 12:21:36 UTC 2023

On 05/02/2023 12:27, Paul Harrison wrote:
> Can you please show us what events you get and in what order without any
> other logging so we can see what you mean?
> It's possible the mythexternrecorder does things differently and messes
> with the timings?

Here's an example from earlier today. As you requested I removed all
logging other than the events:

Feb  5 07:55:50 mythtv[1161172]:
/home/mythtv/system-events/recording-started called with parameters 32
20230205075600 by PID 1161172
Feb  5 07:55:55 mythtv[1161379]:
/home/mythtv/system-events/recording-pending called with parameters 32
20230205075600 -246 by PID 1161379

In this instance the recording pending event arrived 5 seconds after the
recording started event, but earlier examples (if you ignore all of the
non-event logging) showed that sometimes the recording pending event
arrives within a second of the recording started event.

In order to test your theory that mythexternrecorder might have
something to do with this I also ran a test recording with an HDHR (i.e.
not using mythexternrecorder). Here are the events:

Feb  5 13:07:50 mythtv[1740022]:
/home/mythtv/system-events/recording-started called with parameters 10
20230205130800 by PID 1740022
Feb  5 13:07:50 mythtv[1740026]:
/home/mythtv/system-events/recording-pending called with parameters 10
20230205130800 -241 by PID 1740026

So the order is the same in this case, although as described earlier the
events are less than a second apart.

Here's how the events have been set up:

mysql> select * from settings where value like "Event%"\G
*************************** 1. row ***************************
   value: EventCmdLivetvStarted
hostname: dracor
*************************** 2. row ***************************
   value: EventCmdPlayChanged
hostname: dracor
*************************** 3. row ***************************
   value: EventCmdRecFinished
    data: /home/mythtv/system-events/recording-finished %DIR% %FILE%
hostname: dracor
*************************** 4. row ***************************
   value: EventCmdRecPending
    data: /home/mythtv/system-events/recording-pending %CARDID%
hostname: dracor
*************************** 5. row ***************************
   value: EventCmdRecStarted
    data: /home/mythtv/system-events/recording-started %CARDID% %STARTTIME%
hostname: dracor
5 rows in set (0.00 sec)

So as you can see, the "-246" or "-241" passed to recording-pending is
the SECS parameter.

Thanks, Jan

More information about the mythtv-users mailing list