Hello,
I have slightly modified this example to experiment with the MJPEG encoder. Here's my code :
I observed that when using videoEnc.setLossless(True)
, the output JPEG is not valid, and I receive the following error:
Traceback (most recent call last): File "/home/fabien/Dev/Python/depthai-experiments/gen2-record-replay/12mp_record_mjpeg.py", line 51, in <module> cv2.imwrite("test.jpg", img) cv2.error: OpenCV(4.8.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:787: error: (-215 failed) !_img.empty() in function 'imwrite'
If I remove the setLossless(True)
option, test.jpg is correctly generated. Is there anything specific I need to do to decode a lossless image?
Thank you for your help.