I have a question if anyone has encountered similar problem.
I have a MIPI camera reading 60fps and store to a multiprocessing queue, frame by frame.
I would like to save these to a m2 Nvme drive in same 60fps.
Is this possible? I can not get the code properly working and I have tried all stupid things. Like Einstein defined an idiot, “doing the same thing over and over expecting a different result”… :D
I have the main thread (GUI) that starts 1 cam reader process and 1 process that saves the image.
first process reads and puts to queue the second process gets and item.
I have tried to add two consumer processes but does not seem to work. Since the drive should be capable of writing in parallell I assume the queue lock is preventing me from working faster.Hence my attempt to create two queues. The cam reader process alternates between queue1 and queue2. The consumer process 1 reads from queue1 and p2 from queue 2. This does not seem to work either.
Any clues? Can I get it directly from a gstream v4l2src to drive via some memory magic? I need to do this cause I have further AI processing to do on the images, so if I loose time on writing Im sure I have problems running the AI stuff.
- writing to file I use cv2.imwrite
- the queue is multiprocessing.queue no joinablequeue.
- the camera must use v4l2 not nvarguscamerasrc (cant use it as first pipe, if you understand…)
I can provide code if it would help…