mainsail-crew / crowsnest

Webcam Service for multiple Cams
GNU General Public License v3.0
302 stars 71 forks source link

No camera image after update #258

Closed pro2call-nl closed 2 months ago

pro2call-nl commented 2 months ago

What happened

I updated the v4.1.3-1-gc0c9c41 to v4.1.8-1-g6ac4711. Now my camera is not working anymore.

What did you expect to happen

a functional camera

How to reproduce

reboot raspberry pi

Additional information

I'm using a raspberry pi 4 with the ov5647 camera.

LOG:

[04/08/24 07:53:40] crowsnest: crowsnest - A webcam Service for multiple Cams and Stream Services. [04/08/24 07:53:40] crowsnest: Version: v4.1.8-1-g6ac4711 [04/08/24 07:53:40] crowsnest: Prepare Startup ... [04/08/24 07:53:40] crowsnest: INFO: Host information: [04/08/24 07:53:40] crowsnest: Host Info: Distribution: Debian GNU/Linux 12 (bookworm) [04/08/24 07:53:40] crowsnest: Host Info: Kernel: Linux 6.6.20+rpt-rpi-v8 aarch64 [04/08/24 07:53:40] crowsnest: Host Info: Model: Raspberry Pi 4 Model B Rev 1.5 [04/08/24 07:53:40] crowsnest: Host Info: Available CPU Cores: 4 [04/08/24 07:53:40] crowsnest: Host Info: Available Memory: 1891256 kB [04/08/24 07:53:40] crowsnest: Host Info: Diskspace (avail. / total): 22G / 58G [04/08/24 07:53:40] crowsnest: INFO: Checking Dependencies [04/08/24 07:53:40] crowsnest: Dependency: 'crudini' found in /usr/bin/crudini. [04/08/24 07:53:40] crowsnest: Dependency: 'find' found in /usr/bin/find. [04/08/24 07:53:40] crowsnest: Dependency: 'xargs' found in /usr/bin/xargs. [04/08/24 07:53:40] crowsnest: Dependency: 'ustreamer' found in bin/ustreamer/src/ustreamer.bin. [04/08/24 07:53:40] crowsnest: Dependency: 'camera-streamer' found in bin/camera-streamer/camera-streamer. [04/08/24 07:53:40] crowsnest: Version Control: ustreamer is up to date. (v5.46) [04/08/24 07:53:40] crowsnest: Version Control: camera-streamer is up to date. ((54bdd9d)) [04/08/24 07:53:40] crowsnest: INFO: Print Configfile: '/home/printer/printer_data/config/crowsnest.conf' [04/08/24 07:53:40] crowsnest: [crowsnest] [04/08/24 07:53:40] crowsnest: log_path: /home/printer/printer_data/logs/crowsnest.log [04/08/24 07:53:40] crowsnest: log_level: debug [04/08/24 07:53:40] crowsnest: delete_log: false [04/08/24 07:53:40] crowsnest: no_proxy: false [04/08/24 07:53:40] crowsnest:
[04/08/24 07:53:40] crowsnest:
[04/08/24 07:53:40] crowsnest: [cam 1] [04/08/24 07:53:40] crowsnest: mode: camera-streamer [04/08/24 07:53:40] crowsnest: enable_rtsp: false [04/08/24 07:53:40] crowsnest: port: 8080 [04/08/24 07:53:40] crowsnest: device: /base/soc/i2c0mux/i2c@1/ov5647@36 [04/08/24 07:53:40] crowsnest: resolution: 1920x1080 [04/08/24 07:53:40] crowsnest: max_fps: 30.62 [04/08/24 07:53:40] crowsnest: INFO: Detect available Devices [04/08/24 07:53:41] crowsnest: INFO: Found 1 total available Device(s) [04/08/24 07:53:41] crowsnest: Detected 'libcamera' device -> /base/soc/i2c0mux/i2c@1/ov5647@36 [04/08/24 07:53:41] crowsnest: 'libcamera' device(s) resolution(s) : [04/08/24 07:53:41] crowsnest: 0 : ov5647 [2592x1944 10-bit GBRG] (/base/soc/i2c0mux/i2c@1/ov5647@36) [04/08/24 07:53:41] crowsnest: Colorspace: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop] [04/08/24 07:53:41] crowsnest: 1296x972 [43.25 fps - (0, 0)/2592x1944 crop] [04/08/24 07:53:41] crowsnest: 1920x1080 [30.62 fps - (348, 434)/1928x1080 crop] [04/08/24 07:53:41] crowsnest: 2592x1944 [15.63 fps - (0, 0)/2592x1944 crop] [04/08/24 07:53:41] crowsnest:
[04/08/24 07:53:41] crowsnest: 'libcamera' device controls : [04/08/24 07:53:41] crowsnest: [04/08/24 07:53:41] crowsnest: Try to start configured Cams / Services... [04/08/24 07:53:42] crowsnest: INFO: Configuration of Section [cam 1] looks good. Continue ... [04/08/24 07:53:43] crowsnest: Starting camera-streamer with Device /base/soc/i2c0mux/i2c@1/ov5647@36 ... [04/08/24 07:53:43] crowsnest: DEBUG: camera-streamer [cam 1]: Parameters: --http-port=8080 --camera-path=/base/soc/i2c0mux/i2c@1/ov5647@36 --camera-type=libcamera --camera-format=YUYV --camera-snapshot.height=1080 --camera-width=1920 --camera-height=1080 --camera-fps=30.62 --camera-auto_reconnect=1 [04/08/24 07:53:43] crowsnest: DEBUG: camera-streamer [cam 1]: util/http/http.c: ?: HTTP listening on 127.0.0.1:8080. [04/08/24 07:53:43] crowsnest: DEBUG: camera-streamer [cam 1]: /home/printer/crowsnest/bin/camera-streamer/camera-streamer Version: (54bdd9d) [04/08/24 07:53:43] crowsnest: DEBUG: camera-streamer [cam 1]: [0:09:49.861264412] [2970]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e [04/08/24 07:53:44] crowsnest: DEBUG: camera-streamer [cam 1]: terminate called after throwing an instance of 'std::out_of_range' [04/08/24 07:53:44] crowsnest: DEBUG: camera-streamer [cam 1]: what(): unordered_map::at [04/08/24 07:53:44] crowsnest: DEBUG: camera-streamer [cam 1]: xargs: /home/printer/crowsnest/bin/camera-streamer/camera-streamer: terminated by signal 6 [04/08/24 07:53:44] crowsnest: ERROR: Start of camera-streamer [cam 1] failed! [04/08/24 07:53:44] crowsnest: ... Done!

brdi commented 2 months ago

Tried restarting crowsnest manually by opening the crowsnest.cfg and Save&Restarting it in Mainsail?

After updating to v4.1.8-1 I have/had the same problem. But after restarting crowsnest manually it worked allright.

However the mainsail update screen tells me the Crowsnest " Repo is corrupt " After a "hard recovery" the camera did not work anymore.

The crowsnest.log indicates an error when checking on ustreamer, and indeed the ustreamer files seem to be missing on the speederpad.

Uninstalling and reinstalling crowsnest using kiauh restored the previous situation with a working camera(after manual restart of crowsnest) and an update screen saying that crwosnests Repo is corrup.

pro2call-nl commented 2 months ago

hi @brdi,

I followed your tip about reinstalling crowsnest and this worked.

Thank you.

mryel00 commented 2 months ago

However the mainsail update screen tells me the Crowsnest " Repo is corrupt " After a "hard recovery" the camera did not work anymore.

A hard recovery will delete everything inside the repo, especially the streamer binaries. So after a hard recovery you always have to rebuild. But overall there should be no reason that the repo get's corrupt. Sometimes it happens randomly for whatever reason. I'm doing the thing that the update inside Moonraker does, a lot during development for exception of pulling the files from a remote repository. So no idea, when exactly it happens.

brdi commented 2 months ago

Tnx, learning everyday. Still weird that after reinstalling crowsnest, the update manager indicaties that crowsnest is corrupt. However, everything is working allthough I've got to restart crowsnest manually before the camera relays a signal....

mryel00 commented 2 months ago

However, everything is working allthough I've got to restart crowsnest manually before the camera relays a signal....

Have a look at #117, especially at my comment: https://github.com/mainsail-crew/crowsnest/issues/117#issuecomment-1806943132 Maybe you got a similar problem to the one in the issue? If that doesn't help, join our Discord or Github discussions for further help.

brdi commented 2 months ago

@mryel00 Thx. I did, Problem solved. When I restarted even the corwsnest "problem" was solved. Working like a charm now.