biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
11 stars 16 forks source link

Implement frame-to-frame video navigation #821

Closed ToukL closed 1 month ago

ToukL commented 1 month ago

WARNING: this works only in Chrome (not in Firefox). Not tested in other navigators.

Changes video navigation buttons:

mzur commented 1 month ago

This is an interesting approach! I need to test this thoroughly with different videos because I had so much trouble with this in the past. There are also a couple of things that could be streamlined for the final implementation but I'll get to that once I tested it a bit.

However, this also implements the "jump forward/backward by a fixed number of seconds", right (https://github.com/biigle/core/issues/262)? Could you please split this from the "jump frame-by-frame" changes and send both in separate PRs? The jumping by seconds can be merged much sooner then.

mzur commented 1 month ago

For the record: I mentioned the workaround in the W3C discussion I follow and others say that it might not produce perfect results in all cases. This article recommends the WebCodecs API for frame-accurate applications. I had a look at this, too, but as the linked StackOverflow answer mentions, it only works if the media is demuxed. And I think there is no easy solution for that if we still allow many different video file formats in BIIGLE.

ToukL commented 1 month ago

I did split the PR in two.

I know it's just a workaround that needs more testing and cleaning, if you have time and ideas for that it would be great ! I implemented it like that because we need the frame-by-frame navigation, even if not perfect fro now. I'm open to any suggestion though !

mzur commented 1 month ago

Thanks! We'll continue in the new PRs.