-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback on audio capture stats #741
Comments
Samples rather than frames were chosen for consistency with other metrics (we consistently use samples rather than frames when it comes to audio, e.g. totalSamplesReceived). This might not be ideal in hindsight, but it is addressed in the Terminology section:
If the browser has a polling based model it may not be able to keep up with all the samples in all circumstances, though I am not the audio expert here. I can try to figure out more information about this if you like |
Asked the audio experts, they said "The capture device is a realtime device and if the browser does not process them in a timely manner it has to drop them" |
Right, so this is when a "catastrophic real-time load problem" occurs, which makes sense. We need to revert this and have something on the It's not desirable to have coupling between the audio input system and WebRTC, and it's best to use the terms used in the industry and the rest of the Web Platform. |
Having media source metrics is not new and having measurements of glitches seem to fit well together with existing sample counters and audio energy metrics that we already get from the track and expose via getStats. That said, general solutions are nice to have. Historically it has been difficult to add any metrics to the MediaStreamTrack interface, but given the recent extension API MediaStreamTrack.getFrameStats() (which expose similar counters to media-source.frames, but also counters for frame drops and don't require attachment to WebRTC) I could certainly imagine something like track.getAudioStats() providing information about sample drops. |
Linking to semi related for multi-channel, stereo metrics #686 |
This issue was mentioned in WebRTC WG 2023-04-18 – (Issue 93: MediaStreamTrack audio delay/glitch capture stats (Henrik)) |
This work was moved to the track stats (webrtc-extension) spec, if that PR can merge then we should delete the stats from this document |
Being able to know the input latency is a welcome change, but there are a number of problems with the prose:
totalSamplesCaptured
: this should be namedtotalFramesCaptured
, to handle multichannel and to be consistent with the rest of the Web Platform. A frame can contain multiple samples (one per audio channel).droppedSamplesDuration
: it's unclear what this means. When does a capture device drop audio? It is because of a catastrophic real-time load problem? A bug in the implementation?This is using incorrect terminology, I think this is referring to the sampling-rate or sampling-frequency, not the frequency.
The text was updated successfully, but these errors were encountered: