Closed Bug 1877319 Opened 2 years ago Closed 2 years ago

MP3 from Google Voice has no sound on 384khz sound card

Categories

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

Firefox 122
defect

Tracking

()

VERIFIED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: iverson, Assigned: padenot)

References

Details

Attachments

(6 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

Download voice message from google voice to file.
It saves as MP3.
Open file in Firefox.

Actual results:

Play bar progresses for the appropriate time, but no sound.
Can't pause. Can't replay after fiddling with slider post completion.

Expected results:

Sound should play. Should be able to fiddle with slider and replay.

Extra data that may help:

Firefox works fine with other non-GV mp3s: sound happens, bar slides, can pause, rewind, restart, etc..

Other apps can play GV MP3s. Tested VLC, Chrome, & Windows Media Player.

Downloading and playing the file directly was an attempt to isolate the original failure: clicking play button on GV Site has no effect -- no progress bar and no sound.

The attached sample mp3 is a full download, no edits. Feel free to use it for testing. It's safe to pass around, post, whatever; consider it 100% public domain. All GV messages have this issue with Firefox. This one is just safe for release. ;)

The Bugbug bot thinks this bug should belong to the 'Firefox::File Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → File Handling
Component: File Handling → Audio/Video: Playback
Product: Firefox → Core

The attached mp3 file plays correctly on my Win11x64 machine, and I can hear the sound.

Tim:
Would you mind reproducing with logging: https://paul.cx/public/about-logging-presentation.webm (Media preset), and either uploading / pasting the link here or sending the profile privately to padenot@mozilla.com ? Capturing a few seconds, including the load / playback start of the media is what I suspect we need here.

Flags: needinfo?(iverson)
Severity: -- → S3
Priority: -- → P3

"Media Preset" log of the uploaded MP3 failing to play via FireFox on my w10 system.

Flags: needinfo?(iverson)

"Media Preset" log of an MP3 that does play via FireFox on my w10 system; every mp3 I've tried has played fine EXCEPT the ones from google voice and it's only firefox that can't play them.

Uploaded this one for contrast with the failing MP3 log in case there's a clue in the difference.

I can upload this particular test MP3 as well if you like. It's ~100KB.

Flags: needinfo?(padenot)

Happy to look at the mp3 directly if it's something you can share (you can share it privately to me at padenot@mozilla.com if that's better for you).

Flags: needinfo?(padenot) → needinfo?(iverson)

The failing MP3 is attached to the bug report and yes, you can share it with anyone (stated in initial report :).
If you want the successful one I used for the contrasting log, ask for the "mp3 that works" so I know which one you want. As far as I can tell, though, any MP3 that is NOT from google voice works while all the ones from google voice fail.

Flags: needinfo?(iverson)
Flags: needinfo?(padenot)

Sorry, I apparently completely missed what you said in your initial message and was overcautious. This one however plays fine for me like Mayank, but I'm on desktop linux. Can you follow the steps in the video, and log to the Fx profiler instead of files? It will have the logging for the process that does the demuxing and decoding, vs. only having the logging for the audio output (in the file you shared).

The file you shared isn't particularly weird, it's a mono mp3, 11025Hz, the low sampling rate might be the only thing that's slightly unusual, but perfectly normal for this purpose.

Also, and probably unrelated your computer is set to have a sampling rate of 384000Hz, which is not common and probably extremely wasteful in CPU -- maybe change that if it's not intentional. Or maybe it's the problem, can you try setting a more standard rate of e.g. 44100Hz or 48000Hz at least temporarily?

Flags: needinfo?(padenot) → needinfo?(iverson)

Ah, took a bit to figure out how to NOT capture all my open windows along with just this failure; finally got it by exiting ff and running a private browser (which fortunately does not auto-reopen everything). Attached the created profiler log.

BTW, perused the log, found NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b), which looked suspicious. Tried restarting windows audio server, restarting ff, restarting windows (suggested by various google searches). No effect.

Tried various playback rates and bit depths, but all that does is ruin the sound. It doesn't make sense that I can hear such a huge difference, but 384000 is the only one that plays nicely (16b 24b 32b all sound the same, only rate matters). It's an external USB device -- rate should only impact CPU if w10 was reformatting to meet the higher rate on the fly and if my system was ever remotely CPU-bound.

Lemme know if there are other things you'd like me to try.

Flags: needinfo?(iverson)

What do you mean "plays nicely", I thought it wouldn't play?

If you change the sample-rate, it's likely that you need to reopen apps and/or kill the Windows audio service to make it sound good.

I now understand why the bug happens, it's because you're running your sound card at 384000Hz and the file is very low quality. I'll write a patch to make it work, but it's a waste of CPU to run a sound card at 384000Hz, except in some extremely specialized circumstances.

Windows (or Firefox) has to resample to the rate of the sound card (so here, 11025Hz to 384000Hz, which is about a 32x up-sample). It's not horribly expensive in CPU though, it's just unnecessary to have to do so. I'd keep the bit-depth at 24-bits, 32-bits won't matter. You won't hear any difference at most settings anyway. 44100Hz or 48000Hz are good defaults.

Flags: needinfo?(iverson)

(patch in https://github.com/mozilla/cubeb/pull/778, will reach firefox nightly in a few days)

See Also: → 1690694, 1711417
Duplicate of this bug: 1690694
Duplicate of this bug: 1711417
See Also: 1690694, 1711417
Assignee: nobody → padenot
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Tim, it would be super helpful if you could retest with your high sample-rate sound-card in a few days on a preview build that installs fine alongside your regular Firefox, I'll let you know.

(In reply to Paul Adenot (:padenot) from comment #9)

What do you mean "plays nicely", I thought it wouldn't play?

Only google-voice MP3s don't play and those only fail to play via Firefox; the reference to 'plays nicely' is about everything else.

I think you found the bug. Reducing rate, restarting system, retesting firefox on previously non-playing MP3 will play. Unfortunately, anything lower than the maximum or the 2nd to maximum sounds pretty bad. Worst sounding play comes from the test tones, then from some high-quality FLACs that I have. Can't really tell playing other stuff (used VLC since FF won't do high rate).

I don't consider myself to have a magic ear (not even remotely). I shouldn't be able to hear the difference. That issue is not your problem, though. I think there might be an issue with my playback device on lower rates.

BTW, I'm fine retesting on a preview build. Say when and I'll give it a try.

Flags: needinfo?(iverson)
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f93c8aae7ff Update cubeb to revision 46906c7. r=cubeb-reviewers,kinetik https://hg.mozilla.org/integration/autoland/rev/406e4d24227f Reapply patches to cubeb. r=cubeb-reviewers,kinetik
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch

Tim, you can try now by getting a Nigthly build from https://www.mozilla.org/fr/firefox/all/#product-desktop-nightly. It installs / uninstalls fine alongside any regular Firefox, and won't affect your main Firefox profile. Let me know how it goes!

Flags: needinfo?(iverson)

It works. Tried version "124.0a1 (2024-02-15) (64-bit)" and the previously silent MP3 now plays.
Checked fiddling with the play-bar (pause, slide back/foward, etc) and that now works, too.

Flags: needinfo?(iverson)

Thanks for verifying, and thanks for reporting the bug in the first place!

Status: RESOLVED → VERIFIED
Duplicate of this bug: 1888807
Summary: MP3 from Google Voice has no sound → MP3 from Google Voice has no sound on 384khz sound card
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: