-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Open Video Device after Resolution Change #2476
Comments
Does the service log show anything related? journalctl -u motioneye |
Hi Michalng, Thanks for taking the time to respond! This is so confusing for me. I had the camera working very breifly again, but now it's not even opening the device, it's just the camera with a line through it. I'm guessing this is cause Motion is't running any more. I ran the command you suggested and I'm getting this :
Clearly it has been running but it's failing to launch now properly now. How can I find out why it is crashing? I did notice that the GPU/RAM setting had gone back to 96 so I set it back to 128 again, but that hasn't helped. I'm not sure if it is connected as I'm just grasping at straws here, but I changed the I2C state and SPI state and it seemed to work breifly but I don't really know what they do, and it may have just been the subsequent reboot which kicked it into life. I have read that there may be some issues with Bullseye and the Pi cameras. Could this be causing the issue? If so, why does it seem to work very briefly then totally stop. Any suggestions would be greatly appreciated as I've already flattened the SD and reinstalled DietPi to get to this stage, trying to get this to work. Thanks! |
I2C and SPI are not required for running cameras on the RPi camera connector, AFAIK also 128 MiB RAM are probably reasonable but not strictly required. Just to assure the camera with legacy stack is enabled correctly, and let's check for kernel errors as well: vcgencmd get_camera
dmesg -l emerg,alert,crit,err |
Morning, Thanks for your next suggestion. Here is what I got from the 2 commands:
Supported & detected for the camera and no response at all from the dmseg command which I guess means no error messages? Thanks. |
Further info: I tried uninstalling MotionEye, reboot the reinstall and it is still failing to show the camera. I noted as part of the install there was a permissions error writing to the /etc/motion folder so as a test I added the root user to the montion group (no change). It was in the install script so I didn't manage to read any other info around that error. I also noted that the /etc/motioneye folder was the only one in the etc folder not owned by root (it was motion). Again as a test, I changed the owner to root. This had not effect, even after a reboot. I also read on-line there may be issues with the motion detection so I switched it off in the GUI. I'm not getting additional erros in the log files:
Please let me know if you need any more information. Thanks muchly. |
The Is btw the systemctl disable --now motion
ssystemctl restart motioneye The error btw occurs here, where we try to detect the motion detection status for the camera via HTTP API request: https://github.com/motioneye-project/motioneye/blob/16fd474/motioneye/motionctl.py#L213-L231 |
Hi again, Thanks for the further suggestion. I tried running those commands to disable motion but it had no effect. I have just erased the SD card did the following:
The hardware is a Pi Zero with no additional hardware, other than the IR camera with 2 external IR lights. After I did this, the MMAL camera was detected for a small amount of time and showed the picture in MotionEye as I would expect. I made no further changes, and the image from the camera froze and would not update. The motioneye log looks like this:
The window for the camera image is showing Unable to open video device. Is this just my setup or are other people having this issue? Thanks for your help! |
It always triggers the watchdog timeout, then fails to terminate, then is SIGKILLed, then shows |
Hmm, no There other error is |
Hmmm, how strange. I can't figure this out at all! It's just a base build of DietPi with MotionEye on top. It's just the standard Pi IR camera like this : https://shop.pimoroni.com/products/night-vision-camera-module-for-raspberry-pi?variant=12516582817875 Where would I change these settings? |
I mean in the motionEye camera settings. Found a match in the RPi forum, also IR camera: https://forums.raspberrypi.com/viewtopic.php?t=317258 Good suggestion to check whether something else is accessing the video device: apt install lsof
lsof | grep video And: https://forums.raspberrypi.com/viewtopic.php?t=323606 G_CONFIG_INJECT 'camera_auto_detect=' 'camera_auto_detect=1' /boot/config.txt
sed -i 's/^start_x=/#start_x=/' /boot/config.txt
sed -i 's/^gpu_mem/#gpu_mem/' /boot/config.txt
reboot |
I'd like to share with my findings as I was fighting 3 days to get things cooperate and finally got it to work. Raspberry Pi Model B Rev 2, Raspberry OS Buster 2023-05-03, AZ-Delivery 5mp OV5647 ribbon camera. motionEye Version | 0.43.0 Whenever system starts, running services are: It results in:
After running:
Running services are: Resulting in:
Raspberry Pi Model B Rev 2 (same CPU as Zero W) is too weak for this task however. Updating repos and upgrading/installing packages takes forever, CPU is constantly at 100% usage when not recording (!) but preview video is set at a reasonable 24fps. When recording it 99% of time crashes with:
So... I grabbed Raspberry Pi 3B, flashed sdcard with latest Raspberry Pi OS Bullseye 64-bit build from 2023-05-03, upgraded packages, reproduced all steps above and guess what. IT WORKS too, the same way it does on Buster. Just enable the legacy camera in raspi-config, add MMAL VideoCore Camera, stop motion service and voila. Things doesn't work after a restart since motion service starts automatically so I believe cron task at bootup to stop motion needs in action here. I've couple of weeks linux experience so my knowledge is limited so tell me guys, is there a better option than running cron at every bootup to stop motion service? PS. H.264/OMX codec doesn't work but changing it to H.264 solves the ffmpeg error (ffmpeg package installed ofc).
|
Hello folks,
I hope you can help with this strange issue.
Hardware : Pi Zero W with a wide angle IR camera with 2 IR lights bolted to the side
Software : DietPi, then MotionEye using their automated process.
Issue :
Please tell me how I can revive the connection to the camera.
If I’ve missed out any important info, please let me know.
Thanks muchly.
The text was updated successfully, but these errors were encountered: