Closed Bug 1882846 Opened 2 years ago Closed 1 year ago

Background noise in getUserMedia MediaRecorder audio captures on Firefox Android 122+ on Pixel 4a

Categories

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

Firefox 122
All
Android
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: ganoe, Assigned: padenot)

References

Details

Attachments

(4 files)

Steps to reproduce:

We have a web-based audio recording app that we developed and have been using for a few years. We have a number of Google Pixel 4a (Android 13) and Pixel 4a 5G (Android 14) devices we use with it on Firefox for Android. Since version 122 of Firefox for Android, we have noticed a very audible digital-sounding noise in the recording capture background on these Pixel devices. If we downgrade to Firefox 121, the background noise goes away, and we do not get the noise under Chrome either. The app calls navigator.mediaDevices.getUserMedia with the following media constraints:

  var userMediaConstraints = {
    audio: {
      channelCount: 1,
      echoCancellation: false,
      noiseSuppression: false,
      autoGainControl: false,
    }
  }

And later create a MediaRecorder with mimeType 'audio/ogg’
const options = {
mimeType: 'audio/ogg'
};
mediaRecorder = new MediaRecorder(recordStream,options);

I’ve also tried it with mimeType 'audio/webm;codecs=opus’

The issue is there in at least Android Firefox 122.0b1 and newer on these phones (tested as recent as recent as 125.0a1). It does not occur in 121.0, 121.0.1 nor 121.1 and recent earlier versions. I have also tried this on a Samsung S10, and it does not appear to have the noise issue on Firefox 122+.

If I turn on (true) individually any of echoCancellation, noiseSuppression or autoGainControl it seems to clean up the noise, but I get the impression listening to it that the noise was probably still there and it’s just post-cleaning it up.

Happy to do additional testing or provide additional info if possible.

Actual results:

On Firefox Android the Pixel 4a devices the produced audio has an easily discernible digital-sounding background noise.

Expected results:

The background noise should not be present like it had not been in Firefox 121 and earlier.

  1. Could you verify that this only happens on Firefox Android or it also affects Firefox desktop ?

  2. If only happens on Firefox Android , could you help testing if this happens on geckoview_example.

    You can get geckoview_example.apk from https://firefox-ci-tc.services.mozilla.com/tasks/index/gecko.v2.mozilla-central.geckoview-version , for example https://firefox-ci-tc.services.mozilla.com/tasks/index/gecko.v2.mozilla-central.geckoview-version.122.0.20231215155925.mobile/android-aarch64-opt

  3. If this happens on geckoview_example, could you help to find the last good one and the first bad one ?

  4. Also , Could you help providing media backend info , you could get it via about:support page (especially media section) .

Flags: needinfo?(ganoe)

(In reply to jackyzy823 from comment #1)

  1. Could you verify that this only happens on Firefox Android or it also affects Firefox desktop ?

I have not been able to reproduce this on desktop. It appears to only be on Android, and possibly only specific Android devices.

  1. If only happens on Firefox Android , could you help testing if this happens on geckoview_example.

    You can get geckoview_example.apk from https://firefox-ci-tc.services.mozilla.com/tasks/index/gecko.v2.mozilla-central.geckoview-version , for example https://firefox-ci-tc.services.mozilla.com/tasks/index/gecko.v2.mozilla-central.geckoview-version.122.0.20231215155925.mobile/android-aarch64-opt

The noise is there in this version (122.0.20231215155925) on Pixel 4a.

  1. If this happens on geckoview_example, could you help to find the last good one and the first bad one ?

Using apks from the site you linked, the noise is not there in geckoview_example version 122.0.20231121045833, and the noise is there in version 122.0.20231121163301 (and after).

  1. Also , Could you help providing media backend info , you could get it via about:support page (especially media section) .

I'm attaching the about:support for Firefox Nightly 125.0a1. Let me know if you need it from a specific version.

Flags: needinfo?(ganoe)
Assignee: nobody → padenot
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(padenot)

Thanks for the ping jackyzy823, I"ll have a look. I only have a Pixel 4 here (not A), which is supposed to be faster. I think we just need to increase the latency.

Thanks for looking at this. Please let me know if there is anything I can provide.

Reporter, do you use the default mic/speaker combination when testing this, or wireless or wired headphones / mic? Can you share a WebM file captured in your app? I'll try to repro on my Pixel 4, but I'd like to reproduce your environment.

Flags: needinfo?(ganoe)

We used the built-in speaker/mic on the phones, though I've also been listening to the recordings on desktop (we upload the data to our site). I will get you recordings of what it sounds like when I'm in the office tomorrow.

Flags: needinfo?(ganoe)

I've attached example recordings without and with the noise, which I created within a couple minutes of each other on the same Pixel 4a using geckoview-example versions 122.0.20231121045833 (which does not have the noise) and 122.0.20231121163301 (which has the noise).

The severity field is not set for this bug.
:boek, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jboek)
Flags: needinfo?(jboek)

Hey Paul it looks like ganoe found a window in which the regression was caused. Do you know who would be best to take a deeper look?

Component: Browser Engine → Audio/Video
Flags: needinfo?(padenot)
Product: Fenix → Core

Yes, this is on my list of things to look at, but I need to sort other things out first.

Component: Audio/Video → Audio/Video: cubeb
Flags: needinfo?(padenot)

The severity field is not set for this bug.
:kinetik, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(kinetik)
Flags: needinfo?(kinetik)
Depends on: 1905636

We should retry this following recent patches from Andreas.

Do you want me to try this? What version of the software contains the mentioned patches?

A version of Firefox Nightly on Google Play: https://play.google.com/store/apps/details?id=org.mozilla.fenix&hl=fr&pli=1 should have the fix. It installs alongside the regular Firefox app fine, and can be uninstalled or kept around as needed. It doesn't touch your "main" Firefox profile and is completely independent.

Did you get the chance to give it a spin? It's in Firefox 129 which has been in release for three weeks now.

Flags: needinfo?(ganoe)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:kinetik, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit BugBot documentation.

Flags: needinfo?(ganoe) → needinfo?(kinetik)

Marking as fixed based on bug 1905636 landing and no updates from the reporter.

If you're still experiencing this issue with Firefox 129+, please reopen the bug to continue investigation.

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(kinetik)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: