我编写了一个程序,用RPi Cam来捕捉和保存图像
系统运行良好,但突然出现以下错误:
mmal: mmal_vc_port_enable: failed to enable port
vc.ril.image_encode:out:0(JPEG): ENOMEM
mmal: mmal_port_enable: failed to enable port
vc.ril.image_encode:out:0(JPEG)
(0xc8a100) (ENOMEM)
Traceback (most recent call last):
File "./Test_cam.py", line 300, in <module>
putfunc()
File "./Test_cam.py", line 169, in putfunc
oneshot(_client_id)
File "./Test_cam.py", line 137, in oneshot
_cam.capture(ifn, use_video_port=True,resize=(1920,1080),splitter_port=0)
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 1418, in capture
encoder.start(output)
File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line 1126, in start
super(PiCookedOneImageEncoder, self).start(output)
File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line 377, in start
self.output_port.enable(self._callback)
File "/usr/lib/python2.7/dist-packages/picamera/mmalobj.py", line 1249, in enable
prefix="Unable to enable port %s" % self.name)
File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 184, in mmal_check
**raise PiCameraMMALError(status, prefix)**
**picamera.exc.PiCameraMMALError: Unable to enable port vc.ril.image_encode:out:0: Out of memory**
有人能帮我吗?在
验证您使用的是最新的}。由于
picamera module
和{picamera
使用libmmal.so
,所以您也可以使用兼容的版本。在更多信息站点:
raspberrypi.org: Pure Python camera interface
picamera
SO Answer: HowTo update libmmal.so
可能是后续错误。在
端口肯定有问题
长时间运行也可能导致缓冲区溢出。在
要验证您的相机没有损坏,请尝试以下脚本:
相关问题 更多 >
编程相关推荐