w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
937 stars 131 forks source link

key-frame request handling when scalability mode is not L1T1 for encoder #760

Closed taste1981 closed 1 month ago

taste1981 commented 5 months ago

when encoder is configured to work in L1T2, L1T3, etc, Spec should clarify when a key-frame request is configured for current frame, how this should be handled when current frame is not at base temporal or spatial layer.

For example, should encoder simply reset the GOP structure to T0 and generate a key frame at T0; or it should reject the key-frame encoding request; or it should record this key-frame request and continue output a delta-frame, and apply the key-frame request till next base layer frame.

Djuffin commented 4 months ago

reset the GOP structure to T0 and generate a key frame at T0

we should spec this

Djuffin commented 3 months ago

UA certainly shouldn't reject key-frame requests regardless of configured scalability mode and the current frame layer

taste1981 commented 2 months ago

@Djuffin in this case shall spec require going to T0 immediately, or queue the key-frame request till next base layer frame?

Djuffin commented 2 months ago

shall spec require going to T0 immediately, or queue the key-frame request till next base layer frame?

immediately

VideoEncoderEncodeOptions.keyFrame corresponds to the frame given to VideoEncoder.encode() thus its should be effective immediately.

aboba commented 2 months ago

Is there is a specification change needed?

If not, can we close this issue?

taste1981 commented 1 month ago

Is there is a specification change needed?

If not, can we close this issue?

Sure. I think this can be closed.