Opened 12 years ago

Closed 11 years ago

Last modified 11 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

Description

Hello

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/mencoder.pm, mythtv/recordings.pm and nuv_export/ui.pm solve the problem

Thanks in advance, zeloise

Attachments (2)

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

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 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/ffmprg.pm 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 11 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 11 years ago by Bradley Baetz <bbaetz@…>

Attachment: mythtv.perlutc.patch added

Patch for mythtv perl bindings

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

Attachment: nuvexport.patch added

Followup patch for nuvexport

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

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

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

Resolution: fixed
Status: newclosed

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

Thanks - can this please be applied to 0.26 too?

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

comment:7 Changed 11 years ago by Raymond Wagner

Milestone: unknown0.26.1
Note: See TracTickets for help on using tickets.