Skip to main content

GoCam Camera Service

GoCam is a camera service newly added in FLYOS-FAST v1.4.0 beta, designed for plug-and-play USB cameras that support the UVC protocol. It provides real-time video streaming, single-frame snapshots, and a camera parameter management page.

Beta Version Limitations

GoCam is currently only confirmed in the FLYOS-FAST v1.4.0 beta image. For the v1.3.10 stable release and platform images that do not include GoCam, please continue using Crowsnest.

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.

Power Off Before Handling

Before connecting a camera for the first time or replacing it, completely shut down the printer and disconnect the power supply. Do not plug or unplug the camera cable or organize the interface while the power is on.

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

PurposeRecommended Address
Real-time video streamhttp://DEVICE_IP:8080/?action=stream
Single-frame snapshothttp://DEVICE_IP:8080/snapshot
Snapshot on the host board itselfhttp://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.

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.

Snapshot Path Check

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
ParameterDefault Value in v1.4.0 ImageDescription
port8080Service port for the current camera
device/dev/video1Camera device node; prefer a fixed path under /dev/v4l/by-id/... when possible
resolution1920x1080Resolution supported by the camera
max_fps30Maximum frame rate
quality5MJPEG quality, ranging from 1 to 31
v4l2ctlNot setOptional UVC parameters; parameters saved from the management page are written here
ffmpeg_flagsNot setOptional 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=1 and crowsnest=0, and check whether port 8080 is occupied by another service.
  • Page shows no signal: Check whether device points 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 snapshoturl to http://localhost:8080/snapshot, then restart Moonraker.
Loading...