logoalt Hacker News

msp26yesterday at 7:41 PM1 replyview on HN

Mildly related question for the people in the thread:

How do I seek to the exact first frame of a timestamp with mux? I've tried a few things but it seems to always go to the nearest keyframe rather than the first frame at e.g. 00:34. This is sensible default behaviour but bad for my use case.


Replies

Rodeoclashyesterday at 9:44 PM

I don't think it's possible with players like the one Mux uses (I assume is using the underlying video technology in the browser).

Some developments in this space over the past few years have been the ability to interact with the actual frames of video being rendered and to output those into a canvas tag. This is under the Web Codecs API.

For a while I was working on a video review tool for eSports teams which required the ability to have frame perfect annotations. I got around the inability to perfectly pause on the same frame by using screenshots of the video which were overlayed over the video but with the codecs API, you don't actually need this. It opens up all sorts of features like being able to play videos backwards for example.