Re: [mediacapture-record] Add keyframe interval support. (#216)

Is there an example of an encoder where per-frame control of keyframes isn't possible?

The use case is to let the MediaRecorder support basic control over seekability without requiring post-processing and give the user a basic knob to control the tradeoff between muxed size, quality & seek accuracy. Another useful consequence is also that parts of the stream can be excised with specified temporal accuracy without requiring transcoding.

> Is there specific use case where a time interval is a better fit?

My bet is the user thinks more about seconds than about frame intervals. I struggle to see use cases where an interval will be better. While it's possible to influence min and max track framerates with `getDisplayMedia`/`getUserMedia` and `applyConstraints`, my understanding is the default source behavior is unspecified. Which means a frame interval gives an undefined temporal accuracy in such a case, or when it's impossible to know the configured rates.

A consequence of a temporal interval is that muxed streams with only keyframes may result. If the output bitrate is constrained, the muxed stream may be of lower quality in stretches with low framerate. But MediaRecorder is supposed to be a simple API. Where more refined control than "increased bitrate config" is needed, the user can always go to WebCodecs.

With the same rationale, I think providing both count & temporal control + logic spec might not be needed for this API.

> I wonder whether we could provide suggestions to implementors for the default value, as a non normative statement for instance.

Do you have a suggestion in mind?

GitHub Notification of comment by handellm
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Friday, 3 February 2023 11:06:57 UTC