raspi-cam-srv: flask app is running on port 5000, but can't browse to and no logs.
I am trying to run raspi-cam-srv on a Pi 5 with 64 bit Bookworm and two Arducam 16 MP Autofocus cameras over CSI connections.
First, a little background information for context:
The Pi 5 is running Klipper/Mainsail/Crowsnest to host a 3D printer environment.
Crowsnest is another camera application that uses camera-streamer on the back end. While Crowsnest is able to detect both Arducams, it has a warning in its own logs that says:
[03/30/24 22:51:30] crowsnest: INFO: Found 2 total available Device(s)
[03/30/24 22:51:30] crowsnest: ================================================================
[03/30/24 22:51:30] crowsnest: WARN: 'libcamera' devices are currently not supported on Pi 5!
[03/30/24 22:51:30] crowsnest: ================================================================
[03/30/24 22:51:30] crowsnest: Detected 'libcamera' device -> /base/axi/pcie@120000/rp1/i2c@88000/imx519@1a
[03/30/24 22:51:30] crowsnest: Detected 'libcamera' device -> /base/axi/pcie@120000/rp1/i2c@80000/imx519@1a
Which led me to go searching for an alternative solution, and I ended up here with raspi-cam-srv.
After going through all of the basic configuration steps, and then also setting up raspi-cam-srv to run as a background service, I am unable to access the web server interface which appears to be running on port 5000, and no logs are generated.
pi@gemeaux:~ $ ps -ef | grep 5000
pi 967 1 0 Mar30 ? 00:00:08 /home/pi/prg/raspi-cam-srv/.venv/bin/python /home/pi/prg/raspi-cam-srv/.venv/bin/flask --app raspiCamSrv run --port 5000 --host=0.0.0.0
pi 29829 29795 0 09:19 pts/1 00:00:00 grep --color=auto 5000
pi@gemeaux:~ $ cd prg
pi@gemeaux:~/prg $ cd raspi-cam-srv/
pi@gemeaux:~/prg/raspi-cam-srv $ ls
config docs instance LICENSE logs output raspiCamSrv README.md
pi@gemeaux:~/prg/raspi-cam-srv $ cd logs
pi@gemeaux:~/prg/raspi-cam-srv/logs $ ls
raspiCamSrv.log
pi@gemeaux:~/prg/raspi-cam-srv/logs $ source .venv/bin/activate
-bash: .venv/bin/activate: No such file or directory
pi@gemeaux:~/prg/raspi-cam-srv/logs $ cd ..
pi@gemeaux:~/prg/raspi-cam-srv $ source .venv/bin/activate
(.venv) pi@gemeaux:~/prg/raspi-cam-srv $ ls
config docs instance LICENSE logs output raspiCamSrv README.md
(.venv) pi@gemeaux:~/prg/raspi-cam-srv $ cd logs
(.venv) pi@gemeaux:~/prg/raspi-cam-srv/logs $ ls -al
total 8
drwxr-xr-x 2 pi pi 4096 Mar 28 01:57 .
drwxr-xr-x 11 pi pi 4096 Mar 28 01:57 ..
-rw-r--r-- 1 pi pi 0 Mar 31 05:57 raspiCamSrv.log
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 32 (13 by maintainers)
The error at 08:37:48 from picamera2, saying “
Camera __init__ sequence did not complete” indicates that Picamera2 or libcamera could not initiate the camera. In most cases, I have seen so far, this occurs when another process uses the camera. Maybe also that there is some kind of incomatibility with your camera drivers.From what can be read on the ArduCam web page, these cameras should be “fully compatible with Raspberry Pi without installing any additional drivers”
However, from what I read here, ArduCam assures compatibility with Picamera2 only on Bullseye systems whereas you are running Bookworm on the Pi5.
Probably, the kTAMV installation has installed an additional driver making these cameras accessible for kTAMV also under Bookworm. They might be incompatible with Picamera2 and they might be active even if the kTAMV service is not running.
This might possibly explain why raspiCamSrv worked when kTAMV had been uninstalled.
I am very sorry, but I am afraid that I cannot help with your specific system setup.
Probably, in order to clarify the situation, it would be worthwile, running some basic Picamera2 example routines which you may find in the Picamera2 repository.
Or you might possibly learn something if you increase the log levels of Picamera2 and libcamera as described in the raspiCamSrv Troubleshooting Guide
RaspiCamSrv is fully based on Picamera2 and can only work if Picamera2 works.