Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11248 closed Bug Report - General (Unverified)

Playback of transcoded recording is 50 seconds short

Reported by: Peter Bennett <pgbennett@…> Owned by: cpinkham
Priority: minor Milestone: unknown
Component: MythTV - Mythcommflag Version: 0.25.3
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I am transcoding shows to X264 with handbrake, updating the recorded table with the new file name (mkv extension) ("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.

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. Since the original recording was 60 minutes, I am not sure where the 59 minutes 11 seconds comes from, but after transcoding the recording has the correct 60 minute length.

This is the database update script I used

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

Can the mythcommflag --rebuild command also fix the recordedmarkup table entries?

Version: 2:0.25.3+fixes.20121117.addfa54-0ubuntu0mythbuntu3

Change History (5)

comment:1 Changed 11 years ago by cpinkham

Status: newinfoneeded_new

What happens if you do not create a seektable for the .mkv file? I believe we recommend against creating seektables for .mkv files. Can you play to the end of the file in MythTV without a seektable being created? You should still be able to seek around in the file even without a seektable.

comment:2 Changed 11 years ago by sphery

Related to #6148 and #6448 , and possibly fixed in unstable/development/master by #6974 ?

comment:3 Changed 11 years ago by Peter Bennett <pgbennett@…>

Actually mythcommflag removes the seektable for an mkv file. If I do not run mythcommflag, seeking in the mkv file does not work at all, because it tries to use the seektable left over from the mpg file.

I can seek in the mkv file without the seektable (i.e. with the seektable deleted by mythcommflag).

I don't know if the bug is fixed because I am running the above mentioned script on each transcoded file, fixing the duration, so everything is working for me.

comment:4 Changed 11 years ago by cpinkham

Resolution: Unverified
Status: infoneeded_newclosed

I think that part of the problem is the use of mythcommflag --rebuild to 'clear' the old seektable since this is what is putting in the duration markup entry. In git master, I just added a --clearseektable command line option to mythutil to allow clearing a recording's seek table.

I think that 0.25.3 is too far behind current master to try to troubleshoot this particular issue as a lot of this code has changed in the mean time and we are trying to get 0.27 out the door soon(ish).

Closing ticket unless the issue can be reproduced on current master using only the mythutil --clearseektable command to clear the seek table instead of mythcommflag --rebuild.

comment:5 Changed 11 years ago by Peter Bennett <pgbennett@…>

I am currently running 2:0.26.0+fixes.20130502.b02d25a-0ubuntu0mythbuntu1, so maybe I don't need the script any more. Regarding the removal of the seek table, Michael Dean did reply to me in the mailing list that is was best to use mythcommflag, see link below:

http://www.gossamer-threads.com/lists/mythtv/users/538301#538301

Note: See TracTickets for help on using tickets.