|
| 1 | +# crowsnest |
| 2 | + |
| 3 | +A webcam daemon for Raspi Lite images like mainsailOS |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +It inherited his name from Sail ships Crow's nest. |
| 8 | +--- |
| 9 | +> A crow's nest is a structure in the upper part of the main mast of a ship or a structure that is used as a lookout point.\ |
| 10 | +See https://en.wikipedia.org/wiki/Crow's_nest |
| 11 | + |
| 12 | +So, this will be the 'lookout point' for your Printer. |
| 13 | + |
| 14 | +### Install on MainsailOS 0.5.0 as update |
| 15 | + cd ~ |
| 16 | + git clone https://github.com/mainsail-crew/crowsnest.git |
| 17 | + cd webcamtest |
| 18 | + ./installer_ms050.sh |
| 19 | + |
| 20 | +An installer for other Distribution than MainsailOS will come. |
| 21 | +Give me some time to prepare! |
| 22 | + |
| 23 | +_NOTE: This project has WIP Status! Changes may occure and possibly break things!_ |
| 24 | +--- |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## Simple Configuration |
| 29 | +--- |
| 30 | + |
| 31 | +All you need to get your Camera up and running is a small block of code in your _webcam.conf_\ |
| 32 | +In MainsailOS you can do that in mainsail Web Interface.\ |
| 33 | +Open the 'config' section, there should be the mentioned file. |
| 34 | + |
| 35 | +By default it look like this: |
| 36 | + |
| 37 | + [webcamd] |
| 38 | + log_path: ~/klipper_logs/webcamd.log |
| 39 | + debug_log: false |
| 40 | + |
| 41 | + [cam 1] |
| 42 | + streamer: mjpg |
| 43 | + port: 8080 |
| 44 | + device: /dev/video0 |
| 45 | + resolution: 640x480 |
| 46 | + max_fps: 15 |
| 47 | + |
| 48 | +What that basicly means is: |
| 49 | + |
| 50 | + log_path: ~/klipper_logs/webcamd.log |
| 51 | + |
| 52 | +Where crowsnest (webcamd) should store its Logfile. |
| 53 | + |
| 54 | + debug_log: false |
| 55 | + |
| 56 | +You can set this to true or false.\ |
| 57 | +In case of true you get an more verbose output in the log file. |
| 58 | +Useful to DEBUG your setup. |
| 59 | + |
| 60 | +Now the more interessting part. |
| 61 | + |
| 62 | + [cam 1] |
| 63 | + streamer: mjpg |
| 64 | + port: 8080 |
| 65 | + device: /dev/video0 |
| 66 | + resolution: 640x480 |
| 67 | + max_fps: 15 |
| 68 | + |
| 69 | +> _Note: You can name the cam, how you want!_\ |
| 70 | +_ex.: [cam raspicam]_ |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +This section should be pretty much self explantory. |
| 75 | + |
| 76 | + streamer: mjpg |
| 77 | + |
| 78 | +means your choosen streamservice will be mjpg_streamer.\ |
| 79 | +You can choose: |
| 80 | +- mjpg - well known [Jacksonliam's mjpg-streamer-experimental](https://github.com/jacksonliam/mjpg-streamer) |
| 81 | + |
| 82 | +- ustreamer - A streamserver from Pi-KVM Project\ |
| 83 | +active maintained by [Maxim Devaev](https://github.com/mdevaev)\ |
| 84 | +[ustreamer on github](https://github.com/pikvm/ustreamer) |
| 85 | + |
| 86 | +- rtsp - v4l2rtspserver with Multiprotocol Support\ |
| 87 | +active maintained by [Michel Promonet](https://github.com/mpromonet) \ |
| 88 | +[v4l2rtspserver on github](https://github.com/mpromonet/v4l2rtspserver) |
| 89 | + |
| 90 | +More Services will come in the (hopefully, near) future. |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | + port: 8080 |
| 95 | + |
| 96 | +The port where the choosen service will listen on\ |
| 97 | +**_NOTE: If you choose 'rtsp' use Port 8554!_** |
| 98 | + |
| 99 | +**_NOTE: Ports 8080 - 8084 are covered by nginx reverse proxy! \ |
| 100 | +According to that 8080 will be /webcam, port 8081 will be /webcam1 and so on._** |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | + device: /dev/video0 |
| 105 | + |
| 106 | +The Videodevice (Camera) what should be used by choosen Streamservice. |
| 107 | + |
| 108 | + device: /dev/v4l/by-id/usb-PixArt_Imaging_Inc._USB2.0_Camera-video-index0 |
| 109 | + |
| 110 | +is also valid. Your devices are listed in your log-file on every run.\ |
| 111 | +So, you can easily copy it from there. |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | + resolution: 640x480 |
| 116 | + max_fps: 15 |
| 117 | + |
| 118 | +This last 2 should be pretty obvious :) |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +There are two more existing parameters, |
| 123 | + |
| 124 | + log_method: debug |
| 125 | + |
| 126 | +**This parameter _has_ to reside under [webcamd] section!** |
| 127 | + |
| 128 | +This forces webcamd to spit out more camera informations.\ |
| 129 | +Like that: |
| 130 | + |
| 131 | + [10/24/21 02:46:00] webcamd: INFO: Detect available Cameras |
| 132 | + [10/24/21 02:46:00] webcamd: INFO: Found 1 available Camera(s) |
| 133 | + [10/24/21 02:46:00] webcamd: Detected 'Raspicam' Device -> /dev/video0 |
| 134 | + [10/24/21 02:46:00] webcamd: Supported Formats: |
| 135 | + [10/24/21 02:46:00] webcamd: [0]: 'YU12' (Planar YUV 4:2:0) |
| 136 | + [10/24/21 02:46:01] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 137 | + [10/24/21 02:46:01] webcamd: [1]: 'YUYV' (YUYV 4:2:2) |
| 138 | + [10/24/21 02:46:01] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 139 | + [10/24/21 02:46:01] webcamd: [2]: 'RGB3' (24-bit RGB 8-8-8) |
| 140 | + [10/24/21 02:46:01] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 141 | + [10/24/21 02:46:01] webcamd: [3]: 'JPEG' (JFIF JPEG, compressed) |
| 142 | + [10/24/21 02:46:01] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 143 | + [10/24/21 02:46:01] webcamd: [4]: 'H264' (H.264, compressed) |
| 144 | + [10/24/21 02:46:01] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 145 | + [10/24/21 02:46:02] webcamd: [5]: 'MJPG' (Motion-JPEG, compressed) |
| 146 | + [10/24/21 02:46:02] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 147 | + [10/24/21 02:46:02] webcamd: [6]: 'YVYU' (YVYU 4:2:2) |
| 148 | + [10/24/21 02:46:02] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 149 | + [10/24/21 02:46:02] webcamd: [7]: 'VYUY' (VYUY 4:2:2) |
| 150 | + [10/24/21 02:46:02] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 151 | + [10/24/21 02:46:02] webcamd: [8]: 'UYVY' (UYVY 4:2:2) |
| 152 | + [10/24/21 02:46:02] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 153 | + [10/24/21 02:46:02] webcamd: [9]: 'NV12' (Y/CbCr 4:2:0) |
| 154 | + [10/24/21 02:46:03] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 155 | + [10/24/21 02:46:03] webcamd: [10]: 'BGR3' (24-bit BGR 8-8-8) |
| 156 | + [10/24/21 02:46:03] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 157 | + [10/24/21 02:46:03] webcamd: [11]: 'YV12' (Planar YVU 4:2:0) |
| 158 | + [10/24/21 02:46:03] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 159 | + [10/24/21 02:46:03] webcamd: [12]: 'NV21' (Y/CrCb 4:2:0) |
| 160 | + [10/24/21 02:46:03] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 161 | + [10/24/21 02:46:03] webcamd: [13]: 'RX24' (32-bit XBGR 8-8-8-8) |
| 162 | + [10/24/21 02:46:03] webcamd: Size: Stepwise 32x32 - 2592x1944 with step 2/2 |
| 163 | + |
| 164 | +This is useful to determine what the Hardware Encoder of your Camera is capable of.\ |
| 165 | +In this case a "cheap" raspicam for about 7€ was used.\ |
| 166 | +But it has a downside, everytime you restart webcamd, it will delete the Logfile! |
| 167 | +So, truly made for Debugging purposes. |
| 168 | + |
| 169 | +--- |
| 170 | + |
| 171 | +As the last option and the most tricky one: |
| 172 | + |
| 173 | + custom_flags: |
| 174 | + |
| 175 | +If you enable this in your [cam whatevernameyouset],\ |
| 176 | +you gain the full control over your choosen streamservice.\ |
| 177 | +This option is for more Advanced Users. |
| 178 | + |
| 179 | +To setup Services to your need you have to take a closer look to the documentation of the Projects named above.\ |
| 180 | +As a pointer in the right direction: |
| 181 | + |
| 182 | +- mjpg |
| 183 | + - This one is a bit more complex due the fact it depends on your cam type. |
| 184 | + - For 'Raspicam' see [Plugin: input_raspicam](https://github.com/jacksonliam/mjpg-streamer/blob/master/mjpg-streamer-experimental/plugins/input_raspicam/README.md) |
| 185 | + - For USB Type Cams see [Plugin: input_uvc](https://github.com/jacksonliam/mjpg-streamer/blob/master/mjpg-streamer-experimental/plugins/input_uvc/README.md) |
| 186 | + - For the output is ,in this case, only used [Plugin: output_http](https://github.com/jacksonliam/mjpg-streamer/tree/master/mjpg-streamer-experimental/plugins/output_http) |
| 187 | + |
| 188 | +- ustreamer |
| 189 | + - For sake of simplicity I converted ustreamers manpage to |
| 190 | + [ustreamer's manpage](./ustreamer_manpage.md) |
| 191 | + |
| 192 | + |
| 193 | +If you use custom_flags, we try to help you out but it is really a feature for Advanced Users and your a kind of on your own. |
| 194 | + |
| 195 | +So, with all that said, get your position seaman! Prepare to get wet feets on your Journey.\ |
| 196 | +ARRRR yooo rrready to sail? |
0 commit comments