stetsmando / pi-camera

A Node.js wrapper for the native Raspberry Pi camera utilities
MIT License
74 stars 17 forks source link

mmal_vc_component_enable: failed to enable component: ENOSPC #15

Closed EddieOne closed 5 years ago

EddieOne commented 5 years ago

However, when I run raspistill -o cam.jpg it works fine.

var captureImage = () => {
  myCamera.snap().then((result) => {
    captureImage();
  })
  .catch((error) => {
     console.log(error)
  });
}

Seems to work but doesn't want to capture in series

stetsmando commented 5 years ago

Hey, @EddieOne 👋

This issues seems very similar (identical) to something I encountered a few years ago. I was building this project to support another project I was working on. I encountered the issue when calling the camera module too frequently.

Ultimately I believe the issue is related to the pi's camera and not the JavaScript code calling it. Because I was able to produce similar errors just using the native Python libraries. You could possibly try calling the snap function less frequently and seeing if that helps.

I wish I had more info, but I haven't really worked on anything pi related in a few years so I'm not in a position to debug this.

EddieOne commented 5 years ago

I ended up using pi-camera-connect and that seems to work better