Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#11079 closed Bug Report - General (fixed)

nuvexport fail with mythtv 0.26 du to UTC change

Reported by: zeloise@… Owned by: xris
Priority: minor Milestone: 0.26.1
Component: Apps - Nuvexport Version: Master Head
Severity: high Keywords: nuvexport
Cc: Ticket locked: no



nuvexport do not work anymore after the mythtv 0.26 UTC change (nuvexport do not find the video record information in the database). As I am using mencoder for exporting, adding the UTC offset in export/, mythtv/ and nuv_export/ solve the problem

Thanks in advance, zeloise

Attachments (2)

mythtv.perlutc.patch (2.7 KB) - added by Bradley Baetz <bbaetz@…> 3 years ago.
Patch for mythtv perl bindings
nuvexport.patch (598 bytes) - added by Bradley Baetz <bbaetz@…> 3 years ago.
Followup patch for nuvexport

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by liam_philpott@…

I too came across this problem, but I'm using ffmpeg. I'm no Perl expert, but I modified export/ as follows to get it working:

At the top of the file:

    use Time::Local;

Then, down at around line 182, where the $mythtranscode command is constructed:

        @t = localtime($episode->{'recstartts'});
        $utc_offset_in_seconds = timegm(@t) - timelocal(@t);

    # Here, we have to fork off a copy of mythtranscode (Do not use --fifosync with ffmpeg or it will hang)
        my $mythtranscode_bin = find_program('mythtranscode');
        $mythtranscode = "$NICE $mythtranscode_bin --showprogress"
#                        ." --logpath /tmp --loglevel debug"
                        ." --profile '$episode->{'transcoder'}'"
                        ." --chanid '$episode->{'chanid'}'"
#                        ." --starttime '".unix_to_myth_time($episode->{'recstartts'})."'"
                        ." --starttime '".unix_to_myth_time($episode->{'recstartts'} - $utc_offset_in_seconds)."'"
                        ." --fifodir \"/tmp/fifodir_$$/\"";
        $mythtranscode .= ' --honorcutlist' if ($self->{'use_cutlist'});
        $mythtranscode .= ' --fifosync'     if ($self->{'audioonly'} || $firstpass);

So I added the lines that create the '@t' and the '$utc_offset_in_seconds' variables, at the start. Then I modified the '--starttime' parameter to take account of the UTC offset. This seems to work for recordings created both before and after the changeover from Daylight Saving Time.

I know it's not a definitive solution, but it might help others and provide someone more able with some help to create a proper fix.

comment:2 Changed 3 years ago by Bradley Baetz <bbaetz@…>

I've run into this as well...

I'm not sure that this fix is right though - arguably unix_to_myth_time is now wrong (myth_to_unix_time definitely is)

Try the attached two patches?

Changed 3 years ago by Bradley Baetz <bbaetz@…>

Patch for mythtv perl bindings

Changed 3 years ago by Bradley Baetz <bbaetz@…>

Followup patch for nuvexport

comment:3 Changed 3 years ago by Bradley Baetz <bbaetz@…>

I'm not sure if these are right; have posted to mythtv-dev for comment

comment:4 Changed 3 years ago by Chris Petersen <cpetersen@…>

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 3 years ago by Bradley Baetz <bbaetz@…>

Thanks - can this please be applied to 0.26 too?

comment:6 Changed 3 years ago by Chris Petersen <cpetersen@…>

comment:7 Changed 3 years ago by wagnerrp

  • Milestone changed from unknown to 0.26.1

Add Comment

Modify Ticket

as closed The owner will remain xris.
The resolution will be deleted. Next status will be 'new'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.