Closed Bug 483493 Opened 16 years ago Closed 15 years ago

Ogg video lags 6 frames behind audio

Categories

(Core :: Audio/Video, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: emmett.kerrperkinson, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 I tried out the new <video> </video> support by loading a .ogg file of a music video I made to my site. I noticed that the beats were not in sync with the edits, which means that the video was lagging behind a bit. I played around with this and discovered it lags precisely 6 frames behind the audio. It is a little bit easier to ignore when just watching somebody talk, but very noticeable in music videos where the edit points correspond with the beats. The same thing happens when I watch videos on tinyvid.tv, and the .flv videos on my site play fine, so I'm pretty sure it's not a problem on my end... I made a video demonstrating the problem, and how I fixed it by just moving the video six frames behind the audio. You can watch it at www.rustyscrew.com/ogg.html Reproducible: Always Steps to Reproduce: 1. Create a video in any editor where a disconnect between sound and video would be obvious, like short clips of bar/tones. Export it as a .ogg file. 2. Put the video on any website using the <video> </video> tags. 3. Watch the video. Actual Results: I could tell that it was out of sync. Expected Results: It should have been in sync :P
Component: General → Video/Audio
Product: Firefox → Core
QA Contact: general → video.audio
Great video! See bug 466699 which also covers a/v sync. I'm in the midst of fixing this at the moment so I welcome any test videos I can use.
Thanks! I'm not a programmer, just a filmmaker, but I like to follow this stuff and when I noticed it I decided to set up an account. Sorry, I searched for previously reported bugs but didn't find that one...
I dont hear any sound at http://www.rustyscrew.com/ogg.html
The original URL is 404 now, so I've changed the bug URL to point to a tinyvid.tv copy of the video. As a quick hack, I removed the call to oggplay_set_offset in nsOggDecodeStateMachine::LoadOggHeaders, and the video was in sync (or very close, at least--it was clear the 7 and 6 frame shifted versions were far out of sync).
Removing that line causes audio glitches on linux at least. The fix to sync the video with the audio hardware position does fix the six frame lag issue though. I'll have that patch done when the decode on its own thread patch is done.
Yeah, sorry, I didn't mean it was the right fix, I just mentioned it as a data point to confirm that the delay seems to be introduced there (which is pretty much what we expected based on the way that API call is defined). This bug should be marked NEW, I think, so doing so now.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Did Chris' A/V patch improve this at all?
It looks fixed to me.
Yeah, both the linked testcase and http://tinyvid.tv/show/u6sdgeu4t8gq are in sync. Marking as fixed.
Status: NEW → RESOLVED
Closed: 15 years ago
Depends on: 466699
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.