Rpi HQ camera not working - I'm unable to choose the right resolution #2612

Open
opened 2026-02-28 01:15:51 -05:00 by deekerman · 1 comment
Owner

Originally created by @Reperdix on GitHub (Feb 17, 2025).

Hello!
I have been trying to set up motioneye on a Raspberry Pi 4 (4 GB ram) with a Raspberry Pi HQ camera.
(Operating system: Linux raspberrypi 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64
motionEye Version | 0.43.1b2
Motion Version | 4.7.0)

The camera has to choose one of these specific resolutions:

Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop]
           'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop]
                             2028x1520 [40.01 fps - (0, 0)/4056x3040 crop]
                             4056x3040 [10.00 fps - (0, 0)/4056x3040 crop] 

And when motioneye tries to get some other resolution I get this error:

[  131.417919] unicam fe801000.csi: Wrong width or height 1088x1920 (remote pad set to 4056x3040)
[  131.417938] unicam fe801000.csi: Failed to start media pipeline: -22

The problem is that when I change the resolution in motioneye it does not change it to exactly what I wrote.
This is from the motion.log in /var/log/motioneye

[1:ml1:video0] [WRN] [VID] v4l2_pixfmt_stride: The image width(1080) is not multiple of the stride(2176)
[1:ml1:video0] [WRN] [VID] v4l2_pixfmt_stride: Image width will be padded 8 bytes
[1:ml1:video0] [WRN] [VID] v4l2_pixfmt_adj: Adjusting resolution from 1080x1920 to 1088x1920.

It adds padding to the resolution. Sometimes it seems to want a multiple of 8, other times 16 or - as in this case - the stride(2176) (whatever that means).

Since the camera only seems to output specific resolutions I have to make MotionEye accept one of those. But I can't.
I don't see any other way out of this. The camera works fine for taking photos and video with the rpicam commands (and when doing so it's fine with whatever resolution I ask for), but in motioneye I get the UNABLE TO OPEN VIDEO DEVICE error.

I would be very greatful for any help!

Originally created by @Reperdix on GitHub (Feb 17, 2025). Hello! I have been trying to set up motioneye on a Raspberry Pi 4 (4 GB ram) with a Raspberry Pi HQ camera. (Operating system: Linux raspberrypi 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 motionEye Version | 0.43.1b2 Motion Version | 4.7.0) The camera has to choose one of these specific resolutions: ``` Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop] 'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop] 2028x1520 [40.01 fps - (0, 0)/4056x3040 crop] 4056x3040 [10.00 fps - (0, 0)/4056x3040 crop] ``` And when motioneye tries to get some other resolution I get this error: ``` [ 131.417919] unicam fe801000.csi: Wrong width or height 1088x1920 (remote pad set to 4056x3040) [ 131.417938] unicam fe801000.csi: Failed to start media pipeline: -22 ``` The problem is that when I change the resolution in motioneye it does not change it to exactly what I wrote. This is from the motion.log in /var/log/motioneye ``` [1:ml1:video0] [WRN] [VID] v4l2_pixfmt_stride: The image width(1080) is not multiple of the stride(2176) [1:ml1:video0] [WRN] [VID] v4l2_pixfmt_stride: Image width will be padded 8 bytes [1:ml1:video0] [WRN] [VID] v4l2_pixfmt_adj: Adjusting resolution from 1080x1920 to 1088x1920. ``` It adds padding to the resolution. Sometimes it seems to want a multiple of 8, other times 16 or - as in this case - the stride(2176) (whatever that means). Since the camera only seems to output specific resolutions I have to make MotionEye accept one of those. But I can't. I don't see any other way out of this. The camera works fine for taking photos and video with the `rpicam` commands (and when doing so it's fine with whatever resolution I ask for), but in motioneye I get the `UNABLE TO OPEN VIDEO DEVICE` error. I would be very greatful for any help!
Author
Owner

@xandark commented on GitHub (Feb 25, 2025):

Just a thought, but can you edit the actual config files motioneye is generating under the hood with the proper padded resolution that you need?

@xandark commented on GitHub (Feb 25, 2025): Just a thought, but can you edit the actual config files motioneye is generating under the hood with the proper padded resolution that you need?
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#2612
No description provided.