So I have a VideoCapture that gets the image of an camera, and when some event happens it starts to record.For a fact i know that my image is 640x480 and when I use cv2.imwrite it saves image all great.I set my VideoWriter to record 1 Frame per second and It should last 10 seconds as I have a for loop that goes 10 times.And file has around 1MB of data but frames are all black nothing else.And video length is ok(10 seconds as expected).
Writer = cv2.VideoWriter(FileName, cv2.VideoWriter_fourcc('M','J','P','G'), 1, (640, 480))
SeccondsOfFootage = 10
for i in range(0, SeccondsOfFootage):
print(i)
Writer.write(Cam.frame)
Writer.release()