Opened 4 years ago
Closed 3 years ago
Last modified 3 years ago
#13383 closed Bug Report - General (Fixed)
AVSync2 catch-up problem
Reported by: | Peter Bennett | Owned by: | Peter Bennett |
---|---|---|---|
Priority: | minor | Milestone: | 31.0 |
Component: | MythTV - Video Playback | Version: | v30-fixes |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
AVSync2 catch-up of audio sync is not quick enough especially when jumping around a lot.
Attachments (9)
Change History (20)
comment:1 Changed 4 years ago by
Changed 4 years ago by
Attachment: | 20190201_1637_catchup.patch added |
---|
Proposed patch to catch up synchronization faster when off by more than 200 ms
comment:2 Changed 4 years ago by
There are a couple of bugs in the AVSync2 code that were not noticed until I tried running it at 2x speed. At 2x speed it goes crazy, accelerating and stopping repeatedly after a jump.
The audio reset I included in this patch is causing some rather weird behavior.
Changed 4 years ago by
Attachment: | 20190204_1416_catchup.patch added |
---|
Updated patch that fixes AVSync2 bugs and takes out the audio reset. This should give a better experience, especially in speedup cases.
Changed 4 years ago by
Attachment: | 20190206_1447_catchup.patch added |
---|
Next iteration, hopefully the last. Eliminates the judder after a jump and successfully discards excess audio that was causing irritating artifacts. Also works with speedup.
comment:3 Changed 4 years ago by
Patch number 3 did not work very well. I expect this one to be a big improvement.
Changed 4 years ago by
Attachment: | 20190207_1442_catchup.patch added |
---|
Next attempt - I have changed it to better cater for the case where audio is ahead of video. Pause audio to let video catch up. Also it seems that the drop frame logic was conflicting with the audio adjustment logic so I reinstated the check I had removed.
Changed 4 years ago by
Attachment: | 20190208_1644_catchup_plus.patch added |
---|
This adds some suggestions from Mark S: (1) Avsync delta (and GetAudioTime?() should be measured just after wait_for_time() or Show() and saved for next pass, where it is acted upon. (2) remove the test for > 40ms and use the amount specified in AVSyncIncrementMS as the maximum but no minimum.
comment:4 Changed 4 years ago by
With this change, on my system, the audio difference (ms) stays between -5 and +5, instead of between -40 and +40. Will anybody notice the difference?
Changed 3 years ago by
Attachment: | 20190212_1721_catchup_plus_fixed.patch added |
---|
New version of patch that fixes LiveTV. When starting live TV there may be a few short pauses while recording catches up with playback, then it will be smooth.
comment:5 Changed 3 years ago by
Status: | new → accepted |
---|
Changed 3 years ago by
Attachment: | 20190213_1544_catchup_plus.patch added |
---|
Adds a setting (Setup->Video->Playback->General->Live TV wait. Setting a vaule in there causes a pause for that number of milliseconds when starting Live TV. Also reduce the number of Live TV catch-up messages.
comment:7 Changed 3 years ago by
The number of milliseconds delay for Live TV defaults to 0. Setting a value of around 4000 allows Live TV to start without any stuttering. If no value is set, it will catch up but may take a minute or so of occasional stutter.
Changed 3 years ago by
Attachment: | 20190214_1507_catchup_plus.patch added |
---|
The Live TV Wait is now applied when starting Live TV, changing channels or changing inputs. Also the maximum Live TV wait is now 10 seconds
comment:8 Changed 3 years ago by
I have committed a fix 6b402ca5a3b8c45c9ee190aaaf0e63a0d5548855 for avsync2 improvements.
There is a seperate commit 90b4ec347fd01e40f97427de8ab261f74e9b2d68 for LiveTV stutter.
I have not committed the change to add a Live TV delay setting.
Changed 3 years ago by
Attachment: | 20190215_1358_liveTV_delay.patch added |
---|
Patch for Live TV delay setting.
comment:9 Changed 3 years ago by
This patch is bad - it fails when changing channels using the program guide. Please disregard it.
comment:10 Changed 3 years ago by
Resolution: | → Fixed |
---|---|
Status: | accepted → closed |
Base problems are fixed. Live TV delay is not committed as it did not work and is controversial.
comment:11 Changed 3 years ago by
Milestone: | needs_triage → 31.0 |
---|
Other issues:
I have noticed another artifact on the shield with playback of 23.98p fps material at 1.2x on a 4k60hz p display. every second or so you see an old frame where the motion jitters. I suspect this is frame stretching but the page buffer is still flipped
Ive seen another avsync2 artefact (on shield). I was watching a program (1080i 25fps) at 1.2x on 60Hz TV. Smooth playback for 5 secs then about 2 secs of drop every 2nd frame. Note 25*2*1.2 == 60Hz so there must be some synchrony issue.