motioneye-project / motioneye

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

raspberry pi camera v2 in motioneye container no image #2706

Open Sheng2216 opened 1 year ago

Sheng2216 commented 1 year ago

I can add the camera, but there is no image, and the error message on the top-left corner is "unable to open video device". more details:

image

rak@rakpios:/ $ vcgencmd get_camera
supported=0 detected=0, libcamera interfaces=0
########################################
rak@rakpios:/ $ libcamera-hello --list-cameras
Available cameras
-----------------
0 : imx219 [3280x2464] (/base/soc/i2c0mux/i2c@1/imx219@10)
    Modes: 'SRGGB10_CSI2P' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]

                             1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                             1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                             3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
           'SRGGB8' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                      1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                      1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                      3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
##########################################################
rak@rakpios:/ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
    /dev/video10
    /dev/video11
    /dev/video12
    /dev/video18
    /dev/video31
    /dev/media2

bcm2835-isp (platform:bcm2835-isp):
    /dev/video13
    /dev/video14
    /dev/video15
    /dev/video16
    /dev/video20
    /dev/video21
    /dev/video22
    /dev/video23
    /dev/media1
    /dev/media3

unicam (platform:fe801000.csi):
    /dev/video0
    /dev/video1
    /dev/media4

rpivid (platform:rpivid):
    /dev/video19
    /dev/media0

The Docker container was built on an arm64 machine (specifically, a Raspberry Pi 4B) using the unmodified Dockerfile provided in the /docker directory. I have included a link to the Docker image for reference (https://hub.docker.com/layers/sheng2216/motioneye/0.1/images/sha256-810f4beb9040f3f074284c85ecddaa4f33e43d35245bbb1355964caa1f13e1cb?context=repo). I would greatly appreciate any assistance. by the way, the docker run command I used to start the container: docker run --rm -d -p 8081:8765 --hostname="motioneye" -v /etc/localtime:/etc/localtime:ro --mount type=volume,source=motioneye-config,destination=/etc/motioneye --mount type=volume,source=motioneye-videos,destination=/var/lib/motioneye --device=/dev/video0:/dev/video0 sheng2216/motioneye:0.1 Port 8081 was used for the service because the default port was already occupied by other services. Although the --privileged option can help me detect more camera interfaces, none of them appear to have image outputs.

jose1711 commented 1 year ago

This may be related: https://github.com/motioneye-project/motioneye/issues/2425