You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think in all modes framerate should be a driving force for per frame bitrate allocation.
This corresponds to the behavior of most platform and software encoders.
I think in all modes framerate should be a driving force for per frame bitrate allocation.
This corresponds to the behavior of most platform and software encoders.
I agree. I've updated the opening comment to clarify
When in realtime mode, encoders might have to drop frames in order to meet the bandwidth or time budget, but it is not an error. They might indicate a dropped frame by providing an empty output (or maybe just no output at all).
Encoders are responsible that even if a frame is dropped, the resulting stream can still be decoded as if nothing happened. Following encoded frames should not depend on the dropped frame.
I don't think that a desire for "real-time" necessarily indicates that "quality" is not desired.
In content-hints, we have hints for "motion", "detail" and "text", with "motion" meaning a preference for framerate, "detail" a preference for resolution, and "text" similar to "detail" but also potentially turning on screen coding tools.
In content-hints, we have hints for "motion", "detail" and "text", with "motion" meaning a preference for framerate, "detail" a preference for resolution, and "text" similar to "detail" but also potentially turning on screen coding tools.
Note also the definition of degradationPreference.
Do you know to what extent these features are implemented across codecs under the hood? Particularly outside of the vpx library? My sense from scanning platform encoding APIs is they may not offer this rich set of options. But realtime vs quality seems pretty common.
That makes sense to me, but in Issue #240, it is noted that dropping if disallowed (even with a bitrate constraint??) would be considered an implementation bug. Seems to me like it shouldn't be permitted to simultaneously disallow frame drops and set a bitrate constraint.
The idea in this issue is that dropping is disallowed when mode = quality. In that mode, bitrate is not a constraint, but a target. We can alternatively break bitrate into bitrateMax (constraint) and bitrate (target), but I also like the proposal as-is.
Seems to me like it shouldn't be permitted to simultaneously disallow frame drops and set a bitrate constraint.
Many encoders (different platforms and APIs) allow CBR without frame drops. Sometimes the encoder just can't meet bitrate budget. I don't think that webcodecs need to be different from other APIs here.
Regarding content-hit. It's very webrtc specific and mostly affects webrtc stack above the encoders. It's supported all the way.
First, it configures webrtc to never downscale screenshare feeds. Then, it configures SW encoders to use a special temporal layers pattern, if scalability is required (for conferences). Only VP8 encoder supports scalability for screenshare, VP9 implementation is experimental and not launched anywhere. It also tunes some parameters like denoising and QP ranges and bitrate overshoot thresholds. It also enables some features like variable encode framerate (if QP is very low and the input is static, framerate is reduced greatly).
From this I take away that the knobs we are now proposing are sort of orthogonal to WebRTC's content-hint. It sounds like we can satisfy the requirements above using the scalabilityMode config + some additional knobs for noise and QP.
Editors call: the knobs proposed here sound good enough to send PRs. I will file separate issues for additional low level knobs shortly (min / max QP, motion vs detail hint, low level buffer dependency specification, etc)
Activity
Djuffin commentedon Jun 4, 2021
I think in all modes
framerateshould be a driving force for per frame bitrate allocation.This corresponds to the behavior of most platform and software encoders.
chcunningham commentedon Jun 4, 2021
I agree. I've updated the opening comment to clarify
chcunningham commentedon Jun 11, 2021
Copying @Djuffin's relevant comment from #240
Those behaviors sgtm.
aboba commentedon Jun 11, 2021
I don't think that a desire for "real-time" necessarily indicates that "quality" is not desired.
In content-hints, we have hints for "motion", "detail" and "text", with "motion" meaning a preference for framerate, "detail" a preference for resolution, and "text" similar to "detail" but also potentially turning on screen coding tools.
Note also the definition of
degradationPreference.chcunningham commentedon Jun 11, 2021
Do you know to what extent these features are implemented across codecs under the hood? Particularly outside of the vpx library? My sense from scanning platform encoding APIs is they may not offer this rich set of options. But realtime vs quality seems pretty common.
chcunningham commentedon Jun 11, 2021
Moving discussion from #242
@Djuffin said:
@aboba said
The idea in this issue is that dropping is disallowed when mode = quality. In that mode, bitrate is not a constraint, but a target. We can alternatively break bitrate into bitrateMax (constraint) and bitrate (target), but I also like the proposal as-is.
Djuffin commentedon Jun 11, 2021
Many encoders (different platforms and APIs) allow CBR without frame drops. Sometimes the encoder just can't meet bitrate budget. I don't think that webcodecs need to be different from other APIs here.
chcunningham commentedon Jun 11, 2021
Editors call:
@aboba does like the clarity of having distinct "max" attribute. Avoids confusion previously seen in webrtc.
@chcunningham following up w/ RTC implementers to understand how these attributes affect (passthrough?) the encoders or whether they're higher level.
Frenk8 commentedon Jun 12, 2021
chcunningham commentedon Jun 16, 2021
Discussed this with @ilyanikolaevskiy. In his own words:
From this I take away that the knobs we are now proposing are sort of orthogonal to WebRTC's content-hint. It sounds like we can satisfy the requirements above using the scalabilityMode config + some additional knobs for noise and QP.
chcunningham commentedon Jun 16, 2021
Editors call: the knobs proposed here sound good enough to send PRs. I will file separate issues for additional low level knobs shortly (min / max QP, motion vs detail hint, low level buffer dependency specification, etc)