JolleJolles / pirecorder

Controlled and automated image and video recording with the raspberry pi
https://jollejolles.github.io/pirecorder/
Apache License 2.0
43 stars 9 forks source link

Out of Resources Error When Taking Images On Raspberry Pi 4B #35

Open jabril23 opened 2 years ago

jabril23 commented 2 years ago

TEST: recording a single image mmal: mmal_vc_component_enable: failed to enable component: ENOSPC Traceback (most recent call last): File "/home/msurocketry/test.py", line 60, in rec.record() File "/home/msurocketry/.local/lib/python3.9/site-packages/pirecorder/pirecorder.py", line 612, in record self._setup_cam() File "/home/msurocketry/.local/lib/python3.9/site-packages/pirecorder/pirecorder.py", line 168, in _setup_cam self.cam.framerate = self.config.img.imgfps File "/usr/lib/python3/dist-packages/picamera/camera.py", line 2115, in _set_framerate self._enable_camera() File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1976, in _enable_camera self._camera.enable() File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 722, in enable mmal_check( File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check raise PiCameraMMALError(status, prefix) picamera.exc.PiCameraMMALError: Failed to enable component: Out of resources

JolleJolles commented 2 years ago

Hi, can you explain in more detail the context in which this error occured and what you tried to solve it? It looks to me like the camera was busy while you were trying to record or that you tried to record with a resolution that is not supported (i.e. too large resolution, resulting in the camera hanging). The former can be because the camera is still open, such as when streaming it with vnc and then via ssh trying to record simultaneously. The latter you could try by decreasing the dimensions of the video. Also determine if the error persists if you restart the raspberry pi.

void4 commented 1 year ago

I had to use picamera2 on my device, since this library relies on picamera, it may not work for us

biprav commented 10 months ago

@jabril23 I am also having the same problem when trying to use pirecorder. Have tried numerous solutions but is unable to solve this issue.