Opened 5 years ago

Closed 5 years ago

#12852 closed Bug Report - General (Invalid)

Adjust Audio Sync causes stutter and slowdown

Reported by: Peter Bennett Owned by: JYA
Priority: minor Milestone: unknown
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


The "Adjust Audio Sync" menu item during playback is useful in case lip-sync is off. It should simply play the audio sooner or later than normal, depending whether you select negative or positive values. However as you move negative past -200 milliseconds the entire playback slows down and the audio stutters continuously. The further you move it the worse the problem.

Change History (5)

comment:1 Changed 5 years ago by JYA

Is that using Live TV?

moving audio sync in the future, would typically cause issue with live TV as we can no longer pre-fetch the data properly.

comment:2 Changed 5 years ago by Peter Bennett

This is with recordings. I have not tried it with Live TV. I am busy testing out some AVSync changes for Raspberry Pi digital audio and I noticed this. Then I checked it on current master with AMD64 ubuntu and found the issue was there as well.

Perhaps moving the audio into the future is getting to the point where the audio has not yet been buffered from the input file.

comment:3 Changed 5 years ago by Peter Bennett

Trying this again with other recordings and videos I found that it is only happening at -800ms or so. It varies depending on the recording or video. Perhaps it is a non-issue.

comment:4 Changed 5 years ago by Mark Spieth

My understanding of the causes and effects are:

  • AVSync uses spare capacity in audio buffer or video buffers. If video buffers is set low, you cant go too far in the negative direction.
  • all video streams (esp from DVB-T) have different A/V PTS (DTS?) lags/offsets. This puts more strain on AVSync buffering requirements.
  • higher B frame numbers increases the buffering requirements due to lookahead required and thus the apparent PTS offsets between.
  • The number of video buffers allocated can make a difference to the achievable negative audio delay achievable.

These features impact the play startup behaviour whether audio is present and video needs to catch up or vice versa as AVSync gets the data needed to do its job.

comment:5 Changed 5 years ago by Peter Bennett

Resolution: Invalid
Status: newclosed

I am closing this because on most recordings it occurs at 800 milliseconds or more, and is likely caused by video buffering. It is not actually affecting anybody as far as I know.

Note: See TracTickets for help on using tickets.