Opened 16 years ago
Closed 15 years ago
Last modified 15 years ago
#5265 closed patch (fixed)
AVSync problem with certain BBC programmes
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | critical | Milestone: | 0.22 |
Component: | Video Playback | Version: | 0.21-fixes |
Severity: | high | Keywords: | easy |
Cc: | Ticket locked: | no |
Description
Since changing the video card in my machine to one that actually supports interlaced-output (connected directly to a TV via an VGA->RGB-Scart lead), I attempted to use XvMC as the software decoding was too slow to generate the full resolution display (only a 800MHz PIII:)).
This all appeared to be good except for certain BBC programmes (generally the high budget dramas and the like) which have very bad audio/video sync issues, including stuttering, pauses etc. In fact, when I set the recording to start 5 minutes early, the content before the programme is fine, but as soon as the programme starts (within frames) the problem occurs.
After many hours looking at the decoder, playback and audio playback loops, and adding addititional logging in these areas, I determined that the root cause is that these programmes have multiple audio streams in them, #1 (the main stereo feed) one running typically 260ms behind the video stream, #2 (audio description) ruinning around 700ms ahead of the video stream.
The problem is that the 'lastapts' value is set whenever either audio stream is decoded (so it swings by around 1000ms total) which confuses the playback code.
The solution is to only set 'lastapts' when you are actually decoding the audio stream that is playing. A patch is attached (based on 0.21-fixes) to do this.
I don't know why this only effects XvMC rather than the software decoders, but I suspect it is due to having a limited number of XvMC frame buffers available.
This problem has existed ever since the 'properly support multiple audio streams' change went in at 4281, so it may well account for the large number of NVIDIA users on the web complaining about choppy playback with SDTV content.
Cheers
Daniel
Attachments (1)
Change History (7)
Changed 16 years ago by
Attachment: | mythtv-0.21-avsync.patch added |
---|
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Keywords: | easy added |
---|---|
Type: | defect → patch |
comment:3 Changed 16 years ago by
Component: | mythtv → Video Playback |
---|
comment:4 Changed 16 years ago by
Milestone: | unknown → 0.22 |
---|---|
Priority: | minor → critical |
Severity: | medium → high |
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Any chance of this being applied to trunk and/or 0.21-fixes at some point?