Saving key moments in video stream [closed]

asked 2019-03-05 06:54:14 -0600

JoDa gravatar image

Hello together,

at the moment I'm working on a detection program. The program continuous checks a video stream. When a certain event occurs in the video stream the prorgam starts saving the stream as long as the event taking place. I'm using an VideoWriter object called "video" and this small code snippet. "detect" is the Mat-object from the video stream.

if (blackPixel < 10000) {
    video.write(detect); }

I don't want to save the complete stream, so at the moment I am searching for an idea how to safe the video stream just a few seconds before the event starts and after the event is finished. Does anyone have an idea how to do it?

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2019-03-05 07:04:09.906903

Comments

opencv is for computer-vision, not for video editing.

When a certain event occurs

you likely need to be more explicit

also: blackPixel < 10000 -- this is probably always true, given [0..255] range for uchar.

berak gravatar imageberak ( 2019-03-05 07:04:02 -0600 )edit