-
Notifications
You must be signed in to change notification settings - Fork 220
Enable software mp3 decoding in Geckoview. #709
Comments
I can confirm that this still happens. It also happens with my new app, Jingle Smash. https://vr.josh.earth/webxr-experiments/physics/player.html In both cases everything slows down for about the first minute, then finally comes back to normal speed once the music begins playing. |
I recall @snorp mentioning this issue, too, back when we were first trying to A-Blast working even in 2D on an android phone. All of the related bugzilla bugs around WebAudio performance have either been resolved or closed as invalid, though, so it's probably worth taking a perf trace (especially if this repros in 2D in normal geckoview on android) and opening a bug. |
It seems to run fine here on my phone (not in VR). Can you grab a profile? There are some instructions here: https://perf-html.io/docs/#/./guide-remote-profiling I'm not sure how to enable the devtools from FxR, but maybe @larsbergstrom or @bluemarvin can help with that. I think it's in the settings? |
Settings > Remote Debugging turn On. Thanks for the profiling instructions! |
The WebIDE doesn't have a performance section anymore like in the screenshots, but the connected console view does. I'm assuming it just moved (I'm using Nightly on desktop). I took a profile though it never ended when I pressed the end button. Still I was able to save it. Attached JSON file. (zipped because Github won't let you paste in JSON files). I can confirm that disabling all audio greatly reduces the initial slowdown. |
You should be able to share the perf.io link that has the profile data. |
Oh, was this supposed to record and send it to a website? No, it didn't do that. |
Perhaps I'm recording it wrong. Here is the demo with audio on https://vr.josh.earth/webxr-experiments/physics/player.html?AUDIO=true and with it turned off https://vr.josh.earth/webxr-experiments/physics/player.html?AUDIO=false |
I modified the halloween game to show the problem. https://vr.josh.earth/webxr-experiments/halloween/v2_linear.html Now it loads the MP3s one at a time. It actually makes the problem worse. Inside the handlers for each MP3 is a console.log that looks like ‘=== 1’, ‘=== 2’, etc. It takes about 2 minutes for four MP3s to be loaded and ready to play. if you load the page look at the ‘how to play’ button. It will change to ‘done’ when the mp3s are done loading. during the load time the Oculus Go feels sluggish. So the real question is: what is involved with loading an MP3 on Android / Oculus Go. I’m assuming we have to decompress the whole file into a buffer before it’s ready to play, but why is that so rough? These aren’t long MP3s. Shouldn't take 2 min. |
Media team has now enabled ffmpeg's mp3 decoder. Last piece of that work (disabling the Android HW decoder) is tracked in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1583997 |
@joshmarinacci When this work lands, I'll get you to test against Jingle Smash. |
@joshmarinacci ready for testing on feature/v6 branch |
Is this branch built on taskcluster? |
It looks like only master is being built on taskcluster. how do I get branch builds? |
Did you click on the green checkmark icon on the commit? I see the builds from the commit here: https://tools.taskcluster.net/groups/IxLuQeC5SdOcFRW4E4QHng/tasks/IxLuQeC5SdOcFRW4E4QHng/runs/0/artifacts |
The performance is better now. Thank you. |
Hardware
Oculus Go
Steps to Reproduce
Current Behavior
The game is super slow with music turned on. Even if I disable playing the music, the act of loading MP3s into Three.Audio() seems to trigger the bug.
Expected Behavior
The game should run at the same speed with and without audio.
Possible Solution
Context
Error Logs and Stack Traces
The text was updated successfully, but these errors were encountered: