Opened 12 years ago

Closed 12 years ago

#5628 closed defect (duplicate)

Correct jitter on skip (normally only noticable on HD)

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


When skipping on HD content mythtv has nasty jitters. This shows itself as lots of A/V divergence corrections and audio buffer underruns.

The AV divergence problem is caused by the audio timecode being reset to 0 during a skip, causing massive A/V divergence. On some HD content this can continue for several seconds, occasionally tens of seconds.

The audio buffer underrun seems to be caused by a secondary set of diverge code that looks left over, and appears to duplicate an existing function, but in a different way. Removing this code removes the problem and does not affect A/V sync.

These problems are corrected with the attached patch. After the patch is applied the following issues remain.

  1. After the audio timecode is restored to a valid value there is a slight video jitter as the actual correction is made. This is sub-second.
  1. Under high system load (compiling with make -j3) whilst watching mythtv the audio buffer underrun can still occur.

The patch also introduces a high and low water mark for A/V divergence correction. A/V divergence will correct down to 0.05 frames error and then allow itself to drift up to 0.5 frames error before correcting again. If there is a slow drift in A/V divergence this results in less correction (and thus less jitter) then the current method of correcting down to a value and then correcting immediately that value is reached again.

Since I use PAL some default values have been changed from 30 to 25.

Attachments (2)

NuppelVideoPlayer.cpp.diff (6.4 KB) - added by anonymous 12 years ago.
NuppelVideoPlayer.h.diff (404 bytes) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by anonymous

Attachment: NuppelVideoPlayer.cpp.diff added

Changed 12 years ago by anonymous

Attachment: NuppelVideoPlayer.h.diff added

comment:1 Changed 12 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newaccepted

comment:2 Changed 12 years ago by mythtv@…

The jitter bit of this ticket can be closed as its function is duplicated by:

It treats what appears to be the same problem, but does so in a different way. It is more reliable than my code, and has less code changes (one is probably related to the other)

The high and low water mark may still be of interest, however since applying 5749 I am rarely getting A/V sync issues.

comment:3 Changed 12 years ago by danielk

Resolution: duplicate
Status: acceptedclosed

dup #5749

Note: See TracTickets for help on using tickets.