I am trying to play a picamera in raspberry pi 4 using vlc with raspivid/raspistill. When I give a command: sudo raspivid -o cam.jpg then some errors come,

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
  • 1
    have you enabled the raspberry pi camera port in raspi-config?
    – kwasmich
    Commented Oct 14, 2019 at 10:36
  • Are you using the latest Raspbian Buster fully updated? Is it a genuine Pi camera?
    – CoderMike
    Commented Oct 14, 2019 at 11:06
  • Why are you using sudo? Using the camera doesn't need sudo. Also run vcgencmd get_camera to check it's enabled.
    – Dougie
    Commented Oct 14, 2019 at 11:07
  • Hello...Yes, I have enabled a camera using "sudo raspi-config". Also, I am using a latest updated RPi4 Buster. Also run vcgencmd get_camera that show me "supported=1 detected=1". This means my picamera is enabled.
    – FM_Mahera
    Commented Oct 15, 2019 at 5:20

1 Answer 1


The camera is probably running out of GPU memory. Check config.txt in the /boot/ folder. The gpu_mem option should be at least 128.

Possible Duplicate of : What causes ENOSPC error when using the Raspberry Pi camera module?

  • Yeah...It's working. But I have a question that Max. & Min. how much value of gpu_mem can take in Raspberry pi4 especially?
    – FM_Mahera
    Commented Oct 15, 2019 at 10:50
  • @miteshmahera If it solve your problem, then you should accept this answer.
    – Ingo
    Commented Oct 15, 2019 at 14:18
  • 512mb ..128MB will probably be enough. Commented Oct 16, 2019 at 5:27

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.