jakaskerl
Thank you for all the help! I was able to save frames for x number of seconds on command.
I am facing issues though as it starts to not get any frames. I basically wait on the keyboard press for "c" and set some flags and run the following code:
`
if getImgs and time.time()-starttime <= 1:
frame = qPreview.tryGet()
if frame is not None:
fc += 1
frame_name = f"frame_{int(time.time()*1000)}.jpeg"
temp[frame_name] = frame
`
When I press c the first time, it works and gets around 40 fps, but when I press c the second time after everything has saved, it only gets around 10, and then anytime I press c again, it just doesn't get anything. Could it be anything to do with the video pipeline? Is it possible the queue gets empty for some reason or the camera doesn't get any more frames for some reason?
These are the pipelines:
xoutPrev = pipeline.create(dai.node.XLinkOut)
xoutPrev.setStreamName('preview')
camRgb.video.link(xoutPrev.input)
qPreview = device.getOutputQueue(name="preview", maxSize=10,blocking=False)