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

Paul Harrison mythtv at mythqml.net
Sun Feb 5 20:09:28 UTC 2023


On 05/02/2023 19:30, Jan Ceuleers wrote:

> On 05/02/2023 18:27, Klaas de Waal wrote:
>> Hi Jan,
>>
>> Yes, I can reproduce the problem.
>>
>> When a recording is scheduled *after* the start time of the program,
>> including the preroll time, then the recording starts immediately.
>> This is when you get a REC_PENDING with a negative SECS value and also
>> the REC_PENDING comes after the REC_START.
>> The correct behaviour here is that the REC_PENDING comes with a SECS
>> value of 0 (or small positive) followed by the REC_START.
>> This will be fixed.
>>
>> About why you see a REC_PENDING with a value of 5 seconds.
>> The REC_PENDING logic is only activated after the WakeUpThreshold is
>> passed so if your WakeUpThreshold is 5 seconds then the earliest
>> REC_PENDING that you can get is 5 seconds before the recording starts.
>> I think there is some confusion about minutes vs. seconds. The default
>> value for WakeUpThreshold, when not defined in the database, is 5 minutes.
>> My understanding is that the value in the database is in seconds.
>> I recommend removing the value from the database or setting it to 300
>> seconds.
> I did as you suggested (set WakeUpThreshold to 300), and after
> restarting the backend to make sure that it has seen the updated
> parameter the result is as follows:
>
> Feb  5 20:24:50 mythtv[2529215]:
> /home/mythtv/system-events/recording-pending called with parameters 10
> 20230205203000 60 by PID 2529215
> Feb  5 20:25:20 mythtv[2530041]:
> /home/mythtv/system-events/recording-pending called with parameters 10
> 20230205203000 29 by PID 2530041
> Feb  5 20:25:50 mythtv[2530903]:
> /home/mythtv/system-events/recording-started called with parameters 10
> 20230205202600 by PID 2530903
> Feb  5 20:25:50 mythtv[2530907]:
> /home/mythtv/system-events/recording-pending called with parameters 10
> 20230205202600 -241 by PID 2530907
>
> So I am indeed getting recording pending events before the recording
> starts. It would be good if they came earlier still (my STB needs around
> 90s from power-on to start accepting infrared commands so that I can
> change channels), but we're getting closer.
>
> I can of course live with the recording pending event that still fires
> after the recording has started, with a nonsensical negative value.
>
>> Hope this helps and thanks for all the testing and reporting!
> Yes, thank you very much for your help.
>
> Cheers, Jan


I think ideally you have to have WakeUpThreshold >= global pre-roll + 
120. So with your 250 seconds pre-roll I would try something like 370 or 
400 for WakeUpThreshold. That should give you about 120 seconds between 
events if I understand the problem properly.


Paul H.



More information about the mythtv-users mailing list