Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 20 months ago

Closed 17 months ago

Last modified 15 months 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@…> 18 months ago.
Patch for mythtv perl bindings
nuvexport.patch (598 bytes) - added by Bradley Baetz <bbaetz@…> 18 months ago.
Followup patch for nuvexport

Download all attachments as: .zip

Change History (9)

comment:1 Changed 18 months 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 18 months 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 18 months ago by Bradley Baetz <bbaetz@…>

Patch for mythtv perl bindings

Changed 18 months ago by Bradley Baetz <bbaetz@…>

Followup patch for nuvexport

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

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

comment:4 Changed 17 months ago by Chris Petersen <cpetersen@…>

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

comment:5 Changed 17 months ago by Bradley Baetz <bbaetz@…>

Thanks - can this please be applied to 0.26 too?

comment:6 Changed 17 months ago by Chris Petersen <cpetersen@…>

comment:7 Changed 15 months ago by wagnerrp

  • Milestone changed from unknown to 0.26.1

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


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

 
Note: See TracTickets for help on using tickets.