motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.93k stars 652 forks source link

Motioneye can't open the Device .... #2707

Open ZXRobotum opened 1 year ago

ZXRobotum commented 1 year ago

Hello all, I am relatively new to "motioneye" and am having a bit of trouble with this software.

I have installed Ubuntu Lunar (version 23.04) on my RASPBERRY PI4 and have done all the steps as can be read under "README".

Under "ls /dev/video*" I find some files and under "raspi-config" I have "activated" the CAMERA. If I now go to the web interface and want to add the camera, the programme always tells me that the device cannot be opened. According to the camera on the RASPI PI4, however, it is active (LED status) .....

What else can I do? Is there somehow a trick or something similar?

Thank you in advance for your help/support. Kind regards

Z. Matthias

MichaIng commented 1 year ago

motionEye is known to not support the "modern" camera driver yet: https://github.com/motioneye-project/motioneye/issues/2425

Please try to switch to legacy camera via raspi-config and then select it as MMAL camera in motionEye.

ZXRobotum commented 1 year ago

Thank you very much for your help & sorry for my delay.

BUT! If you are using "raspi-config" and after them you select "MMAL camera", the software said, that there is no camera. So, how can I find out, what kind of problems, that this is or it is useful to change it in a USB-Camera?

Best regards

Z. Matthias

ZXRobotum commented 1 year ago

Hello again, I would like to correct / revise something briefly:

After I first restarted the computer via "raspi-config" and then, I could make the selection under MMAL - Camera.

But! On the WEB - page I see only a gray window and no picture. The camera itself works, because it has a "status" - LED, which is on.

I see under the service: MotionEye the following error messages:

[1:ml1:Camera1] [ERR] [VID] v4l2_pixfmt_select: Palette selection failed for format UYVY [1:ml1:Camera1] [ERR] [VID] v4l2_pixfmt_select: Unable to find a compatible palette format. [1:ml1:Camera1] [ERR] [VID] vid_start: V4L2 device failed to open [1:ml1:Camera1] [WRN] [ALL] mlp_retry: Retrying until successful connection with camera [1:ml1:Camera1] [ERR] [VID] v4l2_pixfmt_set: Error setting pixel format.: Device or resource busy [1:ml1:Camera1] [ERR] [VID] Above message repeats 1 times [1:ml1:Camera1] [ERR] [VID] v4l2_pixfmt_select: Palette selection failed for format UYVY [1:ml1:Camera1] [ERR] [VID] v4l2_pixfmt_select: Unable to find a compatible palette format. [1:ml1:Camera1] [ERR] [VID] vid_start: V4L2 device failed to open

If I interpret this correctly, then the software "unfortunately" can not open the device, correct?

But which one is meant by this? How can I fix this? Best regards from Berlin

Z. Matthias

MichaIng commented 1 year ago

Do you use 32-bit or 64-bit RPi? The 64-bit version indeed does not support MMAL anymore.

ZXRobotum commented 1 year ago

Hey & thank you very much.

I think, that is wrong, because on 64-bit Debian is working, on 64-bit Ubuntu not. You mean, that is a problem with UBUNTU and 64bit? Why?

It is possible to use a USB - Camera or not? 🤔🤔

MichaIng commented 1 year ago

Ah sorry, I thought you use an RPi DSI camera module. For USB cameras it shouldn't matter and modern/KMS graphics driver should be fine, respectively required, then.

Hmm, I saw this UYVY error before: #2476

I think, that is wrong, because on 64-bit Debian is working, on 64-bit Ubuntu not.

You mean "Raspberry Pi OS 64-bit" or really Debian like via official Debian installer? I've no idea what drivers Ubuntu provides for RPi. It uses a different kernel, so quite possible that certain GPU/camera features/drivers are missing.