alan-geller / video-remise

Open-source software for fencing replay systems
MIT License
2 stars 0 forks source link

Support for Matches #4

Open atgeller opened 1 year ago

atgeller commented 1 year ago

Instead of keeping a list of phrases, it would be nice to have a notion of a match, which would hold the list for each channel. This would also then support writing metadata to a file, which could then be loaded to playback a previous recorded match, and export it to a single MP4 via ffmpeg in the command line.

Having a representation of a match, starting and ending it, and writing the metadata should be straightforward. The "difficult" part will likely be implementing a file interface to open old matches for playback.

atgeller commented 1 year ago

Currently, there's relevant metadata being stored in both the PhraseRecording and Match objects (I think due to convergent evolution). I think that PhraseRecording should only contain data specific to that channel's recording, and not more general information. Then, the channel should defer to the match for that metadata instead, since it will be common to all channels. I'll update that in #15 and feature/tags.

alan-geller commented 1 year ago

Once we unify the metadata, we should figure out how we want to save everything. I can think of three options:

It's also possible to have a kind of hybrid, where while recording all of the files are kept separate, and on some "Save Match" command the files are grouped together into a single container, whether an MPEG file or a ZIP file.

In all models we'd need to add support for opening and viewing a saved match from the app.

atgeller commented 1 year ago

I got started looking into this but it turns out the current Match class isn't actually used anywhere and I wasn't sure how to go about changing that,

atgeller commented 1 year ago

I did put some thinking into the set-up and decided on the following, but it's a bit arbitrary.

The downside to this approach is that every time the cameras change the Match would have to be restarted. An altrernative approach that would address this is to store a mapping like above per Phrase instead of for all Phrases, but this raises the issue of how such Phrases would get collected.