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 14 months ago

Closed 12 months ago

Last modified 12 months ago

#11440 closed Bug Report - General (fixed)

Patch: Fix audio sync

Reported by: kevin@… Owned by: jyavenard
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@… 14 months ago.
badavsync.1.patch (2.5 KB) - added by markspieth 14 months ago.

Download all attachments as: .zip

Change History (9)

Changed 14 months ago by kevin@…

comment:1 Changed 14 months ago by markspieth

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

Changed 14 months ago by markspieth

comment:2 Changed 14 months ago by markspieth

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 12 months ago by jyavenard

  • Status changed from new to infoneeded_new

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

comment:4 Changed 12 months ago by Kevin Ross <kevin@…>

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

In 9ec7421138adef73ef9cb83b74e046092fecdd6a/mythtv:

Fix audio sync.

Fixes #11440

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

comment:5 Changed 12 months 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 12 months 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 12 months ago by wagnerrp

  • Milestone changed from unknown to 0.25.4

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.