mirror of
https://github.com/motioneye-project/motioneye.git
synced 2026-03-02 22:57:06 -05:00
Cannot add ov5647 CSI camera - unable to open video device #2648
Labels
No labels
Android app
Arch Linux
CI/CD
CSS
FreeBSD
HTML/HTTP
Home Assistant addon
JavaScript
Python
Raspberry Pi
Stale No Activity 60 Days
bug
code format
dependencies
dev branch
docker
documentation
duplicate
enhancement
feature
help wanted
i18n/l10n
invalid
legacy motionEye
meta
motion
motionEyeOS
notourproblem
python update
question
question
security
troubleshooting
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/motioneye#2648
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @houserockr on GitHub (Jul 28, 2025).
I'm running a Raspberry Pi 4B rev 1.5 with raspbian 12.11 bookworm
I've got an ov5647 camera connected to the CSI0 port (the one between hdmi1 and AUX).
I installed motioneye via the guide on the main repo page - installation went through w/o any problems.
motionEye Version 0.43.1b4
Motion Version 4.7.0
libcamera seems to detect the camera:
But
vcgencmddoesn'tv4l
The camera has to be connected properly, because when I run libcamera-hello, I get a preview window with a live preview showing what's in front of the camera! I'm not showing an image, but here's the output of the program:
No matter which camera I add on the motioneye UI, I get a gray image displaying
unable to open video device
The first ones I've tried are the "unicam" models, because their devices
/dev/video0and/dev/media2match the output oflibcamera-hello, where I get an actual preview image. But no success.Is there any way to see a (debug) log that shows why motioneye isn't able to open the devices? Permissions?
@houserockr commented on GitHub (Jul 28, 2025):
This fixed my problem, technically:
https://github.com/motioneye-project/motioneye/issues/2812#issuecomment-1817391735
Changing
/etc/systemd/system/motioneye.servicefrom
to
Suddenly ME listed the camera's device path (
/base/soc/i2c0mux/...) in the drop down menu to add a new camera and I can now see an image in ME.However, now I cannot change the resolution of the camera, it's stuck to 320x200 and changing the resolution in the UI just crops the image weirdly.
@yiays commented on GitHub (Jul 31, 2025):
If you have the option to "Enable legacy camera" in raspi-config (in the interfaces section), turn that on. As far as I'm aware, motioneye still doesn't support libcamera.
@houserockr commented on GitHub (Jul 31, 2025):
I knew about that option, but it seems to have been removed in raspbian bookworm, I do not have it any more in
raspi-config.I reverted back to bullseye.
@MichaIng commented on GitHub (Jul 31, 2025):
The MMAL library has been removed from RPi OS Bookworm in the meantime. See above usage of
libcamerify, which provides a common V4L2 API on top of libcamera. The full steps:@houserockr commented on GitHub (Jul 31, 2025):
Yes and I got it working that way, like I wrote.
But it only worked partially, because I wasn’t able to change any of the camera’s parameters, like with MMAL.
I like the consequent move towards libcamera on the OS end. Question is: Are there any plans in motioneye to adopt/migrate all the features that worked with MMAL? It seems to me this hole libcamerify approach, probably using ld_preload “hacks, is only meant for a transition phase?!
@MichaIng commented on GitHub (Jul 31, 2025):
The problem is that
motionitself does not supportlibcamera, so there is currently no way for motionEye to support it directly either.libcamerifyis part of thelibcameraproject itself, at least, but of course it is not perfect.Not sure whether the resolution limitation is an issue with
libcamerify, or something we can fix in motionEye, or a limitation with certain camera module models in combination withlibcamerify. Needs some testing, I guess. Should be possible to use enter a subshell:And then check which info and resolutions
v4l2-ctlgives for the resulting/dev/video*device(s). Might be something to report at the RPi fork of thelibcameraproject: https://github.com/raspberrypi/libcamera/issues@TipsyTheCat commented on GitHub (Dec 11, 2025):
motion v5 supports libcamera natively iirc, im not sure how stable it is atm. if motioneye intends to play nice with current hardware and software then utilizing motion v5 should be looked into
@MichaIng commented on GitHub (Dec 11, 2025):
Great news. There is no release (or pre-release) tag for v5 yet, but I guess can be tested with an own build. We'd still need to find a way to detect libcamera cameras correctly, i.e. to not show their dozen's of
/dev/video*nodes, but a single node instead. libcamera tools and again a special handling/camera type that replaces MMAL looks like the most probable way. I wished they would behave like regular V4L2 cameras, so the we could remove all this annoying special-handling 🙄.