element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Why vcgencmd get_camera always get supported=1 detected=0
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 8 replies
  • Answers 1 answer
  • Subscribers 664 subscribers
  • Views 20573 views
  • Users 0 members are here
Related

Why vcgencmd get_camera always get supported=1 detected=0

terranzhang
terranzhang over 6 years ago

I have added "bcm2845-v4l2" in the /etc/modules-load.d/modules.conf

I have enabled the camera interface

I have inputted $sudo apt-get install motion

$sudo apt-get update

$sudo apt-get upgrade

 

I input $ls /dev/video* and get

/dev/video0

 

I open the chromium and input 127.0.0.1:8080

I can get the image from usb camera

 

but when I input vcgencmd get_camera, I get

supported=1 detected=0

 

when I input $sudo raspistill -o camera.jpg, I get

mmal: Cannot read camera info, keeping the default for OV5647

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)

mmal: mmal_vc_component_create_core: could not create component 'vc.ril.camera' (1)

mmal: Failed to create camera component

mmal: main: Failed to create camera component

mmal: Camera is not detected. Please check carefully the camera module is installled correctly

 

when I input $fswebcam /dev/video0 ~/image.jpg, I get

--- Opening /dev/video0...

Trying source module v4l2...

/dev/video0 opened.

No input was specified, using the first.

Error selecting input 0

VIDIOC_S_INPUT: Device or resource busy

 

I do not know why. Could you help me, please? Thank you!

  • Sign in to reply
  • Cancel
  • Gough Lui
    0 Gough Lui over 6 years ago

    I believe the vcgencmd only refers to the videocore connected cameras - i.e. Raspberry Pi Camera Interface (CSI) cameras. If you are using a USB camera (e.g. webcam), then that is completely different.

     

    - Gough

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 6 years ago in reply to Gough Lui

    USB Webcams are probably done through v4l, try sudo with the fswebcam command.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • terranzhang
    0 terranzhang over 6 years ago in reply to Gough Lui

    Maybe you are right.

    I use the command $fswebcam /dev/video0 ~/image.jpg

    I can get a image.jpg in the /home/pi

     

    but when I input the command $sudo raspistill -o camera.jpg, I still get

    mmal: Cannot read camera info, keeping the default for OV5647

    mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)

    mmal: mmal_vc_component_create_core: could not create component 'vc.ril.camera' (1)

    mmal: Failed to create camera component

    mmal: main: Failed to create camera component

    mmal: Camera is not detected. Please check carefully the camera module is installled correctly

     

    Why? Just because my camera is USB not CSI?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 6 years ago in reply to terranzhang

    raspistill is designed for use with the camera module only - it's not for use with v4l devices or uvc devices.

     

    See the first line of https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md

    raspistill

    raspistill is the command line tool for capturing still photographs with the camera module.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • terranzhang
    0 terranzhang over 6 years ago in reply to Gough Lui

    Thanks very much for your answer.

    I created a CameraTest.py file

     

    form picamera import PiCamera

    fome time import sleep

    camera=Picamera()

    camera.start_preview()

    camera.capture('home/pi/image.jpg')

    camera.stop_preview()

     

    when I run, the error appears

    mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)

    mmal: mmal_vc_component_create_core: could not create component 'vc.ril.camera' (1)

     

    I think maybe the reason is the same "designed for use with the camera module only - it's not for use with v4l devices or uvc devices".

     

    But how can I use .py file to control USB camera?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Gough Lui
    0 Gough Lui over 6 years ago in reply to terranzhang

    Perhaps you could do a little googling to find what you need - as I mentioned, most of the Pi camera tools are for the Raspberry Pi Camera Module and not just any random USB-Video Class device like a webcam.

     

    Perhaps try using OpenCV's cv2:

    https://stackoverflow.com/questions/604749/how-do-i-access-my-webcam-in-python

     

    - Gough

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • rew
    0 rew over 6 years ago in reply to terranzhang

    You don't have a "pi camera", so the "picamera" module in python doesn't work. It does the equivalent of "raspistill" that you found out doesn't work.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • terranzhang
    0 terranzhang over 6 years ago in reply to Gough Lui

    Thank you, Gough.

    I decide to buy a csi camera to test whether I can use command raspistill.

    And I write a CameraTest2.py file according the reference from "https://blog.csdn.net/HANNING563128766/article/details/80033498 "

     

    import pygame

    import pygame.camera

    from pygame.locals import *

    pygame.init()

    pygame.camera.init()

    camera = pygame.camera.Camera("/dev/video0",(640,480))

    camera.start()

    image = camera.get_image()

    pygame.image.save(image,"image.jpg")

    camera.stop()

     

    When I run, I get a image.jpg in the same folder of CameraTest2.py

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube