Comments (5)
Don't we already have this in stats for peer connection-related use cases? Also works outside of peer-connection in a pinch.
For playback, frame-rates appear measurable on the video element in Chrome and Firefox (dunno what Safari has here). What other use cases are there?
from mediacapture-extensions.
track.framesEmitted: Total counter of frames emitted by the source.
This explanation confused me. In the PR it appears to instead be frames emitted by the track to its consumer, not the total frame count of the (camera) source. Which is it?
from mediacapture-extensions.
@jan-ivar "media-source" frame rates need to be clarified... historically they are the standardized version of "googFrameRateInput". In contrast to the send FPS or encoder FPS, this is the "input FPS", i.e. the rate of frames being input to WebRTC. So with zero frame drops within WebRTC, the media-source's FPS was the maximum possible FPS you could achieve as the send FPS. But frame drops happening prior to WebRTC is not visible in getStats().
Frame producer (e.g. Camera) --> Media Source --> Frame consumer
| |
| framesEmitted
|
framesDropped = delta between framesProduced and framesEmitted (not in getStats)
Arguably you could add framesDropped to getStats(), but there are several use cases where we want to know about framesDropped or framesProduced where WebRTC isn't involved. What would be the argument for adding metrics useful outside of WebRTC to WebRTC specific APIs? Why not just add them to the track?
from mediacapture-extensions.
track.framesEmitted: Total counter of frames emitted by the source.
This explanation confused me. In the PR it appears to instead be frames emitted by the track to its consumer, not the total frame count of the (camera) source. Which is it?
I was avoiding saying "source FPS" because that begs the question if we're talking about FPS that was produced for the source or FPS emitted from the source (i.e. that was not dropped on the way between producer and source).
There are three interesting frame rates, and none of them are specific to WebRTC:
- Camera configured FPS: Should be getSettings().frameRate IMO.
- Camera actual FPS: There is no API for this, but in my proposal this is framesEmitted + framesDropped. Could alternatively be expose as framesProduced.
- Media source FPS: The frames that have not been dropped on the way to the source, i.e. that consumers could make use of. This is framesEmitted.
from mediacapture-extensions.
Changed this to only include framesCaptured
from mediacapture-extensions.
Related Issues (20)
- [Track Stats API] Rename deliveredFrames to deliverableFrames HOT 2
- [Track Stats API] SameObject is a confusing API shape HOT 23
- [Track Stats API] When to initialize frame counting HOT 3
- Should web applications be aware of reaction effects added by OS to camera feeds? HOT 17
- [Audio Stats] Add current latency HOT 2
- Background Blur: Unprocessed video should be mandatory to support HOT 8
- [Track Stats API] Make stats attribute nullable instead of throwing when unsupported HOT 2
- [Stats] Example uses ratio, not percentage
- [Audio Stats] Add average, min and max latency HOT 5
- [Audio Stats] Disagreement about audio dropped counters HOT 19
- volume is not working HOT 1
- Move MediaStreamTrack stats in its own spec? HOT 10
- Clarify how `track.stats.resetLatency()` relates to run-to-completion semantics HOT 1
- https://w3c.github.io/mediacapture-extensions/#transferable-mediastreamtrack should talk about the MediaStreamTrack's application-set content hint
- Moving the source of a track
- Should we add reasons to MediaStreamTrack.onended HOT 4
- Add a blackFrames counter to MediaStreamTrackVideoStats HOT 7
- Consider adding onVoiceActivity event on MediaStreamTrack for audio HOT 3
- How to select camera presets that have better power efficiency at the expense of quality? HOT 2
- Clarifying Transferable MediaStreamTrack Types HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediacapture-extensions.