Open yakir12 opened 3 years ago
I just wanted to add one additional note:
With opencamera
and open_video_out
we could have a new (convenience) function, say record_camera
, that records from the camera. The user's requirements on the saved video (e.g. framerate) will have to somehow fit the specifications of what the camera can achieve and what the encoder can do.
This however will open the opportunity to either/both specify a user-defined function that will augment the encoded frame (e.g. add overlays) before it is written, OR/AND output a container of the current frame (e.g. Ref
) for some side-effects (e.g. calculating statistics, auto tracking movements, etc).
The possibilities are endless :smile:
That would be very cool
This already works if and only if the loop in https://juliaio.github.io/VideoIO.jl/stable/writing/#Iterative-Encoding is quicker than the FPS of the camera. But there are two main cases where this does not hold:
It would be good to deal with these different scenarios, either as a MWE of how it's done, or some novel implementations.