Camera Connection and Usage
FLYOS-FAST supports two camera services: Crowsnest and GoCam. Choose one according to your system version and required features; do not enable both.
Choose a camera service
| Service | When to use | Main features | Key configuration |
|---|---|---|---|
| Crowsnest | v1.3.10 and earlier, or platform images without GoCam | Adds a camera panel in Fluidd / Mainsail | crowsnest=1; keep gocam=0 when the gocam option exists |
| GoCam | Introduced in FLYOS-FAST v1.4.0 and included in the current image | Live video streaming, single-frame snapshots, and a UVC parameter management page | crowsnest=0, gocam=1 |
GoCam and Crowsnest must be used as alternatives. If both are set to 1, the system starts Crowsnest first and GoCam does not take effect.
Connection and configuration requirements
- Connection: Plug a driver-free USB camera directly into a USB port on the host board.
- Camera requirements: The camera must support UVC and work without additional drivers on Linux, Armbian, and similar systems.
- Configuration interface: This tutorial uses Fluidd as an example. Mainsail and other frontends follow the same principles; refer to their official documentation for specific operations.
- Configuration files:
FlyOS-Conf/config.txtselects the camera service, while the service's own configuration file sets camera parameters.
Before connecting or replacing a camera for the first time, completely shut down the printer and disconnect the power supply. Do not plug or unplug camera cables or rearrange connectors while powered on.
- GoCam
- Crowsnest
GoCam Camera Service
GoCam is a camera service introduced in FLYOS-FAST v1.4.0, suitable for driver-free USB cameras that support the UVC protocol. It can provide real-time video streams, single-frame snapshots, and a camera parameter management page.
Enabling GoCam
Choose either GoCam or Crowsnest. If both are set to 1, the system will prioritize starting Crowsnest, and GoCam will not take effect.
Set the following in FlyOS-Conf/config.txt:
crowsnest=0
gocam=1
After saving, restart the host board. For instructions on modifying the configuration file, please refer to the FLYOS-FAST System Configuration Guide.
Connect a UVC-supported plug-and-play USB camera to the host board's USB port, then power the system back on.
Opening the GoCam Management Page
GoCam uses the 8080 port by default. Access it from the same local network as the host board:
http://DEVICE_IP:8080
The management page provides the following features:
- View the camera feed in real time.
- View the formats, resolutions, and frame rates supported by the camera.
- Copy the video stream and snapshot addresses.
- Adjust UVC parameters that the camera actually supports.
The parameters exposed differ between cameras. The page only displays items that the current camera supports and can modify, such as brightness, power frequency, focus, or exposure. Adjustments are applied to the camera immediately; after confirming the effect, click Save to config to retain the settings after the service restarts.
Video Stream and Snapshot Addresses
| Purpose | Recommended Address |
|---|---|
| Real-time video stream | http://DEVICE_IP:8080/?action=stream |
| Single-frame snapshot | http://DEVICE_IP:8080/snapshot |
| Snapshot on the host board itself | http://localhost:8080/snapshot |
GoCam is also compatible with addresses such as /stream, /?action=snapshot, and /webcam/?action=.... New configurations should prioritize the addresses in the table above to avoid plugin compatibility issues caused by reusing paths from other camera services.
For multiple cameras, assign a separate port and web path to each camera. For details, see Multi-camera Configuration.
Timelapse Configuration
In GoCam mode, set the timelapse snapshot address in moonraker.conf as follows:
[timelapse]
output_path: /usr/share/printer_data/timelapse/
snapshoturl: http://localhost:8080/snapshot
frame_path: /tmp/timelapse
After modifying, restart Moonraker. For complete instructions, please refer to the Timelapse Feature.
If timelapse is not generating frame images, first check snapshoturl. GoCam recommends using /snapshot directly; do not keep the old Crowsnest snapshot address without verification.
Configuration File
The GoCam service configuration is located at:
/usr/share/printer_data/config/gocam.conf
The default reference configuration is as follows:
[cam 1]
port: 8080
device: /dev/video1
resolution: 1920x1080
max_fps: 30
quality: 5
# v4l2ctl: focus_automatic_continuous=0,focus_absolute=70
# ffmpeg_flags: -fflags nobuffer -flags low_delay
| Parameter | Default Value in v1.4.0 Image | Description |
|---|---|---|
port | 8080 | Service port for the current camera |
device | /dev/video1 | Camera device node; prefer a fixed path under /dev/v4l/by-id/... when possible |
resolution | 1920x1080 | Resolution supported by the camera |
max_fps | 30 | Maximum frame rate |
quality | 5 | MJPEG quality, ranging from 1 to 31; lower values provide better quality and higher bandwidth usage |
v4l2ctl | Not set | Optional UVC parameters; parameters saved from the management page are written here |
ffmpeg_flags | Not set | Optional FFmpeg parameters |
Status Check and Troubleshooting
Execute via SSH:
systemctl status gocam --no-pager
View recent service logs:
tail -n 100 /usr/share/printer_data/logs/gocam.log
Common issues:
- Page inaccessible: Confirm
gocam=1andcrowsnest=0, and check whether port8080is occupied by another service. - Page shows no signal: Check whether
devicepoints to the current camera, and confirm the resolution and frame rate are supported by the camera. - Parameters lost after restart: After adjusting in real time, click Save to config.
- No images in timelapse: Change
snapshoturltohttp://localhost:8080/snapshot, then restart Moonraker.
Crowsnest Camera Service
Please strictly follow the order below, otherwise the camera may not be recognized:
- Enable the service first: Make sure the
crowsnestservice has started and is running normally. - Then configure the camera: After the service is running normally, proceed with the specific camera parameter settings.
If you have already done it in the wrong order: If you configured the camera first but the crowsnest service was not enabled, you usually need to delete that camera configuration in the Web interface and then add it again to ensure the configuration takes effect.
Note: This refers to deleting the camera configuration entry in the Web interface, not deleting the
crowsnest.cfgconfiguration file.
Important Notes
- Certain
settingsin the configuration file only take effect on the first system startup after flashing. - Due to the complexity of the configuration process, it is strongly recommended to connect the machine to the network first and then configure it through a browser.
- This tutorial only covers the modifiable options.
- It is recommended to use
mainsailorfluiddweb interfaces for configuration changes. - Do not enable webpage translation; otherwise, the system may fail to boot after saving.
- Do not enter Chinese characters or special characters in the configuration file.
- After modifying the configuration file, the system needs to be restarted for the changes to take effect.
- Do not modify the content below
######### PLEASE DO NOT EDIT THE FOLLOWING #########in the configuration file.
How to Modify the Configuration File
Modify the Configuration File After Flashing Is Complete
- Configuration items that take effect only on
first startupmust be modified after flashing is complete by using a professional text editor to open the configuration fileconfig.txtin the removable diskFlyOS-Conf.
The System Now Supports Online Configuration Modification
-
If it is a regular configuration item, modify it on the system web configuration page and then restart the system for it to take effect.
- Open the device IP address in a browser, for example:
192.168.1.2/ - In fluidd, as shown on the left in the figure below,
check->Show Hidden Files. - In mainsail, as shown on the right in the figure below,
uncheck->Filter hidden files and folders.
Loading...Loading...- At this point, you can see the
.flyos-configfolder. Entering this folder will show thesys-config.conffile. - The
sys-config.conffile is a soft link to the configuration fileconfig.txtin the removable diskFlyOS-Conf.
Loading...- Open the
sys-config.conffile, modify the configuration items that need to be changed, thenSave->Close, and restart for it to take effect.
Loading...- Note: The format of configuration items in the
sys-config.conffile iskey=value; do not change it tokey: value. - After modifying and saving, restart the system for it to take effect.
- Open the device IP address in a browser, for example:
Enable Crowsnest Service
- Search for
crowsnest=0in the configuration and change it tocrowsnest=1 - Save the configuration after modification and restart the system
- Please note that after modifying the configuration file, the system needs to be restarted for the changes to take effect.
Loading...
Open Configuration
- There are many types of camera IDs depending on the system; we only need to confirm the ID that will not change.
-
Find the configuration file in Fluidd, then open
crowsnest.confLoading... -
Locate
device:and delete the ID configuration that follows.Loading...
Search for Camera ID
- Ensure the camera is connected to the host computer
- Click
DEVICESat the top, then clickVIDEO, and finally click RefreshLoading... - Find
path_by_idand copy the line that followsLoading...
Add ID
- Add the ID and save the configuration
Loading...
Enable Camera
- Click Settings, select Camera, then click Add Camera
Loading...
- Enter a name of your choice and click Save
Loading...
Check if Enabled
- The camera feed should appear on the dashboard
Loading...
- If it does not display, restart the system again