2

Recently I have bought an RaspBerry Pi Model B+ with a camera module and a Wi-Fi USB. It's all working pretty fine and no problems untill now.

I'm using GStreamer to stream my video. But I also have a PIR motion sensor module to track motion.. (the line i execute for Gstreamer to work: raspivid -t 999999 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=192.168.178.31 port=5000 &.

When there is motion I want to capture it using the camera. I have written a python script that does this job.

The problem is that when I run GStreamer and I try to run the python script at the same time the python script crashes with the following error:

pi@raspberrypi /cctv $ sudo ./detectMotion.py
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
Traceback (most recent call last):
  File "./detectMotion.py", line 18, in <module>
    cam = picamera.PiCamera()
  File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 379, in __init__
    camera_num, self.STEREO_MODES[stereo_mode], stereo_decimate)
  File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 505, in _init_camera
    prefix="Camera component couldn't be enabled")
  File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 133, in mmal_check
    raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Camera component couldn't be enabled: Out of resources (other than memory)

I'm running my RPi with Raspbian (Linux raspberrypi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux)

  • I think this should help you raspberrypi.stackexchange.com/questions/19630/… – user22697 Nov 18 '14 at 10:00
  • @aurel Thank you for your reply. The user from the link you are refering to uses the V4L2 driver. I'm using none of this because I have the native pi camera module.. – Sefa Şentürk Nov 18 '14 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.