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

> I prefer interval over number of frames because I think key frames have a lot to do with seekability, and if this was a count instead of an interval I feel like you'd end up having to calculate it anyway.

I'm not sure what you mean by seekability, but consider these cases:
- (frame interval) Every chunk contains 1 keyframe and 59 non-keyframes. Seeking to the middle means decoding 30 frames. No matter where in the file you want to seek, the mean number of frames to decode will be 30.
- (time interval) Every chunk is 1 second. One chunk is 30 fps and contains 1 keyframe and 29 non-keyframes. Seeking to the middle means decoding 15 frames. Another chunk is 120fps and contains 1 keyframe and 119 non-keyframes. Seeking to the middle means decoding 60 frames. For any given seek operation, the number of frames to decode will depend on the framerate around that time.

This is the tradeoff I see. Perhaps there's something to be said about predictability and bitrate allocation (and if that is the case, it would be in favor of frame intervals?) but I don't really know.

-- 
GitHub Notification of comment by Pehrsons
Please view or discuss this issue at https://github.com/w3c/mediacapture-record/pull/216#issuecomment-1415813477 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 3 February 2023 12:35:07 UTC