Opened 18 years ago

Closed 18 years ago

#2252 closed defect (fixed)

mythtranscode --honorcutlist --mpeg2 creates av sync problems

Reported by: drescherjm@… Owned by: paulh
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

While watching videos created by mytharchive I have noticed that the audio and video are out of sync and the furthur through a show the furthur the show gets out of sync. After some debugging I have tracked this problem down to mythtranscode and commercial cutting. It seems that after each commercial cut the audio drops 1 to 3 frames so after 7 to 10 commercial cuts the effect gets very annoying especially when the show I am recording is for my girlfriend and she wants to go back to using a vcr...

I am using a NTSC hauppage pvr 250 and a svn snapshot from early August, 2006.

Attachments (1)

replex.diff (3.7 KB) - added by paulh 18 years ago.
replex patch (apply from within the replex directory)

Download all attachments as: .zip

Change History (6)

comment:1 Changed 18 years ago by paulh

Milestone: 0.20
Owner: changed from Isaac Richards to paulh
Version: head

John, I never got a reply from Geoff so I thought I'd take a look myself. I decided the easiest way to fix it was to change mythreplex to detect the audio inconsistencies and add or delete audio frames to the demuxed output as required.

Could you try the patch attached to this ticket. It's still a work in progress but fixes the sync on the two test files I've been using to debug this one from a DVB-t recording and the other from a PVR250. Currently it wont fix negative PTS inconsistencies or work with recordings with AC3 audio tracks.

The fix is a bit of a hack at the moment, it just inserts copies of the current audio frame which does give a slight audio glitch where the cut points are. If I get some positive feedback I'll look at how to encode a blank audio frame and insert that which should be less noticeable.

Changed 18 years ago by paulh

Attachment: replex.diff added

replex patch (apply from within the replex directory)

comment:2 Changed 18 years ago by paulh

(In [10964]) Update mythreplex to detect audio PTS inconsistencies which cause av sync problems when the file is demuxed. It tries to fix the audio sync while demuxing by removing or inserting audio frames as needed. Currently only works for mp2 audio streams. Refs #2252.

comment:3 Changed 18 years ago by paulh

(In [10968]) Update the script to use the new --fix_sync option for mythreplex. Requires at least r10964 of myth to be installed. Refs #2252.

comment:4 Changed 18 years ago by anonymous

I have noticed this without commercial flagging, but on DVB transmissions - on 1 hour films it 20 seconds out at the end !

comment:5 Changed 18 years ago by paulh

Resolution: fixed
Status: newclosed

I've tried a number of recordings both from DVB-t and a PVR-250 all with lots of cut points added and everything appears to be working fine to me.

Note: See TracTickets for help on using tickets.