3

I'm trying to save video from my picam and it ends up like this:enter image description here

import picamera

# set up camera
camera = picamera.PiCamera();
camera.resolution = (640, 480);
camera.framerate = 24;

# record
camera.start_preview();
camera.start_recording("basic.h264");
camera.wait_recording(10);
camera.stop_recording();
camera.stop_preview();
print("Finished Recording");

The vertical bands are 128px wide. This holds true under every camera resolution I tried. The green corruption looks the same in every video I saved that had the same resolution.

I tried rebooting the pi and unplugging and replugging the camera ribbon. The camera feed looks fine in preview or when I view the camera stream with opencv. Raspistill also works fine. It's only a problem when I save the video and try to reopen it.

I'm using PiCamera 1.3 with Python 3.7 running on a Pi 4

Update: I got a new pi camera (v2) and the corruption is still there

Update2: I've replaced the camera module, the sd card, and even got a new Pi 4 and the problem is still there. It also shows up using raspivid (tested with this command):

raspivid -t 30000 -w 640 -h 480 -fps 25 -b 1200000 -p 0,0,640,480 -o pivideo.h264

1 Answer 1

1

It seems like my Raspbian Buster image was corrupted or something.I kept refreshing my sd cards from the raspbian buster image that I had downloaded from the official raspberry site. This time I downloaded a new RB image from the site and the problem went away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.