[mythtv-users] Playback of transcoded recording 50 seconds short

Peter Bennett (cats22) cats22 at comcast.net
Sun Nov 18 17:03:54 UTC 2012


On 11/18/2012 10:20 AM, John Pilkington wrote:
> On 18/11/12 14:38, Peter Bennett (cats22) wrote:
>> Version: 2:0.25.3+fixes.20121117.addfa54-0ubuntu0mythbuntu3
>>
>> I am transcoding shows to X264 with handbrake, updating the recorded
>> table with the new file name ("update recorded set basename = '$file'
>> where basename = '$basename.mpg';"), and then running "mythcommflag
>> --rebuild  --chanid xxx --starttime xxx"
>>
>> All works very well, except when playing back the recordings through the
>> frontend they stop playing about 50 seconds before the end of the
>> recording, losing part of the last scene of the show. Playing the file
>> through VLC is fine, the missing scene plays correctly up to the end and
>> the closing credits play.
>>
>> The mythcommflag always displays these messages (without exception, on
>> every run):
>>
>> 2012-11-15 12:28:31.116779 C  mythcommflag version: fixes/0.25 [v0.25.3]
>> www.mythtv.org
>> 2012-11-15 12:28:31.116827 C  Qt version: compile: 4.8.1, runtime: 4.8.1
>> MythTV Commercial Flagger, building seek table for:
>>      NCIS - Rule Fifty-One
>> Rebuild started at Thu Nov 15 12:28:31 2012
>> Rebuild completed at Thu Nov 15 12:28:43 2012
>> 2012-11-15 12:28:43.446180 E  decoding error
>>              eno: Broken pipe (32)
>>
>> Any ideas? Is the decoding error or the broken pipe in the mythcommflag
>> causing the last 50 seconds to be not played? Or is something else
>> causing it?
>>
>> Peter
>
> I don't think the decoding error/broken pipe thing is responsible.  I
> see it (with mpeg-ps format) without your symptoms.  I wonder if your
> file rename might be confusing something..
>
> I use this sequence:
> -----------
> ionice -c3 mythutil  --clearcutlist  --chanid "$chanid" --starttime
> "$starttime"
>
> ionice -c3 mythcommflag --rebuild --file $1
>
> ionice -c3 mythpreviewgen --chanid "$chanid" --starttime "$starttime"
> --------------
> using --file in the mythcommflag line because it seemed fussy about
> the starttime format.
>
> HTH
>
> John P
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
I found the cause of the problem. The recordedmarkup table has an entry
for the duration in milliseconds. This was showing a value of 3551460
which is about 59 minutes and 11 seconds. I updated that in the
database, now the show plays correctly to the end. It seems handbrake
has increased the length of the recording, but the recordedmarkup table
still has the old length. Since the original recording was 60 minutes,
handbrake has somehow restored the original length. Perhaps the rebuild
should also fix the vales in the recordedmarkup table? I ran the
following commands against my mkv files to get the durations and update
the database. Hopefully this will get around my problem.

        duration=`mediainfo '--Inform=Video;%Duration%' "$file"`
            echo "update recordedmarkup set data = '$duration' " \
                "where chanid = '$chanid' and starttime = '$starttime'
and type = '33' and mark = '0';" | \
            $mysqlcmd

Is there a bug here? Should I log it?

I am not running previewgen. Will that fix it? What is the purpose of
running previewgen? I see previews of my transcoded programs in the
recording list anyway, without running that.

Peter



More information about the mythtv-users mailing list