Closed Bug 1830935 Opened 3 years ago Closed 3 years ago

Twitter video's audio breaks on Firefox (Linux) but not on Windows

Categories

(Core :: Audio/Video: Playback, defect)

defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: emilio, Assigned: padenot)

References

Details

Attachments

(2 files)

As reported by a friend of mine, audio quality of this video is better in Chromium than in Firefox:

https://twitter.com/oocSpain/status/1486375470971113483

On a debug build there's a bunch of spew like:

[Parent 300540, IPC I/O Parent] WARNING: [1.1]: GetUserData call for port '98929920434D07EB.904BB5BC925F6237' failed: file /home/emilio/src/moz/gecko-4/ipc/glue/NodeController.cpp:406                                                     
[Parent 300540, IPC I/O Parent] WARNING: [1.1]: GetUserData call for port '8B4ACAC857F249B1.8414EE458270AA54' failed: file /home/emilio/src/moz/gecko-4/ipc/glue/NodeController.cpp:406                                                     
[Child 300647, MediaDecoderStateMachine #1] WARNING: AudioSink ring buffer over-run, can't push new data: 'rv == static_cast<int>(aData->Frames() * aData->mChannels)', file /home/emilio/src/moz/gecko-4/dom/media/mediasink/AudioSink.cpp:
554                                                                                                                                                                                                                                         
[Parent 300540, IPC I/O Parent] WARNING: [1.1]: GetUserData call for port 'F9225A2F7BBAF621.84AAB9D54377986F' failed: file /home/emilio/src/moz/gecko-4/ipc/glue/NodeController.cpp:406                                                     
[Child 300647, MediaDecoderStateMachine #1] WARNING: AudioSink ring buffer over-run, can't push new data: 'rv == static_cast<int>(aData->Frames() * aData->mChannels)', file /home/emilio/src/moz/gecko-4/dom/media/mediasink/AudioSink.cpp:
554

to the console.

Can either of you reproduce this while capturing media logs? This plays identically on Chrome and Firefox here on Linux. The default media preset should have everything that's necessary to capture this type of error, the ring buffer status is logged frequently enough.

No special build needed,https://paul.cx/public/about-logging-presentation.webm shows how to do it. Ideally we'd need to have the problem captured, i.e. this needs to be running while this ringbuffer over-run is occuring -- which probably manifests by unpleasant audio glitches and maybe A/V desynchronization.

Flags: needinfo?(emilio)

Sure, I can repro this reliably. https://share.firefox.dev/3HtrDNu is a profile from local nightly with my regular profile, but lmk if you want a clean profile or what not. This is on Wayland with pipewire if that matters.

Flags: needinfo?(emilio) → needinfo?(padenot)
Assignee: nobody → padenot
Status: NEW → ASSIGNED

Thanks, it's clear what happens from the logs, I've attached two patches.

(AudioSink) AudioSink=7f30ee017d60 Muting: Pushing back 17640 frames (0.400000ms) from the ring buffer back into the audio queue.

Flags: needinfo?(padenot)

In other cases, the shutdown is either because the media element is seeking, or
is really being shut down: the data present in the ring buffer isn't going to be
used ever.

Depends on D177041

Duplicate of this bug: 1816247
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5071832d84e6 When reenqueuing audio packets after muting, chunk the audio data in small packets. r=alwu https://hg.mozilla.org/integration/autoland/rev/61c516f51c93 Only bother reenqueuing audio packets to the audio queue from the ring buffer when muting. r=alwu https://hg.mozilla.org/integration/autoland/rev/7d25a140f0fc apply code formatting via Lando
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: