Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11440 closed Bug Report - General (fixed)

Patch: Fix audio sync

Reported by: kevin@… Owned by: JYA
Priority: minor Milestone: 0.25.4
Component: MythTV - Audio Output Version: 0.26-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I have many files where the A/V sync would be off by 300-400 ms. Upon closer examination, the files in question had rather large audio packets, coincidentally the same size as the A/V sync error. So I dug into the code, thinking somewhere in the A/V sync routines, it was referencing the timestamp of the beginning of the audio packet, rather than the end. As it turns out, it looks like a simple typo is to blame.

Attached is my fix, which fixes the A/V sync on all my problematic files.

Attachments (2)

audio.diff (624 bytes) - added by kevin@… 11 years ago.
badavsync.1.patch (2.5 KB) - added by Mark Spieth 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by kevin@…

Attachment: audio.diff added

comment:1 Changed 11 years ago by Mark Spieth

Reviewed. Yes it looks to be a typo. All frames need to be scaled by 100000 to convert to timestamps.

Changed 11 years ago by Mark Spieth

Attachment: badavsync.1.patch added

comment:2 Changed 11 years ago by Mark Spieth

Ive now found a 2nd issue which has been checked with timestamp analysis in log files. Playback is now smooth again esp at higher timestretch values.

SetAudiotime? needs the original frames added not the frames obtained from preprocessing as well as scaling the number of frames suitably.

2nd patch contains the both fixes.

comment:3 Changed 11 years ago by JYA

Status: newinfoneeded_new

Could you provide a sample with high A/V sync issue ? thanks

comment:4 Changed 11 years ago by Kevin Ross <kevin@…>

Resolution: fixed
Status: infoneeded_newclosed

In 9ec7421138adef73ef9cb83b74e046092fecdd6a/mythtv:

Fix audio sync.

Fixes #11440

Signed-off-by: Jean-Yves Avenard <jyavenard@…>

comment:5 Changed 11 years ago by Kevin Ross <kevin@…>

In 5f11bda1994c0dad45ff29e3fc8836eb83f98116/mythtv:

Fix audio sync.

Fixes #11440

Signed-off-by: Jean-Yves Avenard <jyavenard@…>
(cherry picked from commit 9ec7421138adef73ef9cb83b74e046092fecdd6a)

comment:6 Changed 11 years ago by Kevin Ross <kevin@…>

In 9da9dc85d03c3904862a42904537a21c723e148f/mythtv:

Fix audio sync.

Fixes #11440

Signed-off-by: Jean-Yves Avenard <jyavenard@…>
(cherry picked from commit 9ec7421138adef73ef9cb83b74e046092fecdd6a)

comment:7 Changed 11 years ago by Raymond Wagner

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