No idea, I'd have to try the project. A different although silly idea I had was to record 30 videos at the same time, all offset by 1 second. So when a highlight is requested you can just save the most recent one. But that's kind of an absurd solution.
I also found some js implementations of ffmpeg, perhaps something could be done with this?
1. Here is the project file: dropbox.com/scl/fi/pfykdekmpj93dgk2gh97w/snapshot-project-test.c3p
2. That actually could work... I'm just wondering what would be the best for performance and it's probably not that lol
3. I actually wondered if there would be any way to use ffmpeg, but I doubt I could figure out how to use it.