How to install MotionEye correctly? #2267

Open
opened 2026-02-28 01:08:32 -05:00 by deekerman · 2 comments
Owner

Originally created by @jrhansen on GitHub (Jul 21, 2022).

Hi

I am getting increasingly frustrated with/confused about how to get a CSI camera (OV5647) on a Raspberry Pi Zero 2 W to work properly. I hope someone is able to answer some very basic questions 😃

I have two RPi's running with cameras attached - let's call them A and B. I tried numerous ways of installing MotionEye on both of them to get the camera to work in MotionEye, and to be honest I lost track of what I did. The cameras work on both systems now, but:

System A: Auto exposure does not work with resolutions above 1280x720. Above that, the camera does not correct for under/over exposure at all. I want 1920x1080.
System B: The FOV is much smaller than on system A even though both systems have the same camera with wide-angle lenses attached to them.

I want a wide FOV AND auto exposure to work. I swapped cameras as well as SD cards, and the "symptoms" follow the SD cards, so they are software issues. So:

  1. What is the correct installation method for MotionEye when using Bullseye Lite and a camera attached to the CSI port?
  2. Should the legacy camera support be enabled or disabled in raspi-config?
  3. Should camera_auto_detect=1 go in /boot/config.txt or not?
  4. Should the cameras be added as V4L2 or MMAL cameras?
  5. Is there something wrong with Bullseye in general with regards to CSI cameras?

I have now started over with a new installation of Bullseye Lite and then following this procedure:

https://github.com/motioneye-project/motioneye/tree/dev#installation

... but I can't get MotionEye to connect properly to the camera regardless of the combination of the parameters (legacy camera enabled/disabled etc.). The picture in MotionEye is either a camera with a cross over it, or a light gray picture with the text "Unable to open video device" (or something like that).

Please, help 😢

Originally created by @jrhansen on GitHub (Jul 21, 2022). Hi I am getting increasingly frustrated with/confused about how to get a CSI camera (OV5647) on a Raspberry Pi Zero 2 W to work properly. I hope someone is able to answer some very basic questions 😃 I have two RPi's running with cameras attached - let's call them A and B. I tried numerous ways of installing MotionEye on both of them to get the camera to work in MotionEye, and to be honest I lost track of what I did. The cameras work on both systems now, but: System A: Auto exposure does not work with resolutions above 1280x720. Above that, the camera does not correct for under/over exposure at all. I want 1920x1080. System B: The FOV is much smaller than on system A even though both systems have the same camera with wide-angle lenses attached to them. I want a wide FOV AND auto exposure to work. I swapped cameras as well as SD cards, and the "symptoms" follow the SD cards, so they are software issues. So: 1. What is the correct installation method for MotionEye when using Bullseye Lite and a camera attached to the CSI port? 2. Should the legacy camera support be enabled or disabled in raspi-config? 3. Should `camera_auto_detect=1` go in /boot/config.txt or not? 4. Should the cameras be added as V4L2 or MMAL cameras? 5. Is there something wrong with Bullseye in general with regards to CSI cameras? I have now started over with a new installation of Bullseye Lite and then following this procedure: https://github.com/motioneye-project/motioneye/tree/dev#installation ... but I can't get MotionEye to connect properly to the camera regardless of the combination of the parameters (legacy camera enabled/disabled etc.). The picture in MotionEye is either a camera with a cross over it, or a light gray picture with the text "Unable to open video device" (or something like that). Please, help 😢
Author
Owner

@Baenwort commented on GitHub (Nov 30, 2022):

@jrhansen Did you solve this? I'm hitting the same issue with the dev branch, bullseye, and a CSI camera.

@Baenwort commented on GitHub (Nov 30, 2022): @jrhansen Did you solve this? I'm hitting the same issue with the dev branch, bullseye, and a CSI camera.
Author
Owner

@MichaIng commented on GitHub (Nov 30, 2022):

Generally, with legacy camera stack, it should be MMAL camera, with modern camera stack, it should be V4L2 camera. But the latter doesn't work good either. Correct modern RPi DSI camera support (libcamera) has to be added: #2425

However, enabling legacy camera stack and adding it as MMAL camera should work. If not, please check:

vcgencmd get_camera
@MichaIng commented on GitHub (Nov 30, 2022): Generally, with legacy camera stack, it should be MMAL camera, with modern camera stack, it should be V4L2 camera. But the latter doesn't work good either. Correct modern RPi DSI camera support (`libcamera`) has to be added: #2425 However, enabling legacy camera stack and adding it as MMAL camera should work. If not, please check: ```sh vcgencmd get_camera ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/motioneye#2267
No description provided.