I am working on a Deep Learning algorithm for videos. Given a video footage I want to save my results on another video. To do so, I am using OpenCV and Python on Windows. OpenCV worked correctly for my video preprocessing to train my model. I need to save my results but the VideoWriter method gives me no output file.
fourcc = cv2.VideoWriter_fourcc(*'DIVX')
outVid = cv2.VideoWriter( 'outputfile.avi', fourcc, fps, tuple(shape.astype(np.int)), 1)
I process every frame and then I write this frame in the output file
outVid.write(np.uint8(RECONSTRUCT_IMG))
There is no issue returned by the console, but the output file is a 6 Ko video file, which cannot be read obviously.
I tried several codec for the fourcc (*'DIVX' should be used on Widows according to OpenCV Documentation).
Anyone with a similar issue?