matiasandina / FEDWatcher

Software and Hardware to connect FED3 devices over serial on Raspberry Pi 4
MIT License
4 stars 1 forks source link

Add camera functionality #30

Open matiasandina opened 2 years ago

matiasandina commented 2 years ago

The idea is to have the ability to respond to events by recording them to video. We would have a camera initialized continuously dumping frames to a queue. We would trigger the camera with actions that tell it to start recording and to stop recording. The recording will happen with a buffer before the start signal is given. The stop signal can be a finish() that flushes the whole queue. We don't have to have symmetrical buffers. Note, the current implementation is for one fed and one camera.


There are a two classes that allow us to do this. One is the VideoFeedClipper (handle video and timestamping, pass frames to queues in the writer), and the other one is the KeyClipWriter (actually do the write).

It remains to be seen how/where to add this to fedwatcher.py itself.

We could use the f argument of the run function to give a function that processes the incoming line and decides whether it's a start or a stop signal.

TODO:

matiasandina commented 2 years ago

Any suggestions @RedSweatshirt ?