Camera
The Camera page allows you to configure video streaming from your Raspberry Pi camera or USB cameras to your ground control station. UAVcast-Pro v6 features an integrated HLS-based live preview directly in the web interface.
Overview
UAVcast-Pro v6 uses a dual-stream architecture for video:
GStreamer - Primary video streaming:
- H.264 video encoding
- UDP streaming to ground control stations
- Low latency for flight operations
- Support for Raspberry Pi Camera and USB cameras
- Custom pipeline support
- Configurable resolution, FPS, and bitrate
MediaMTX - Internal preview only:
- HLS stream for web browser preview
- Live camera preview in UAVcast-Pro interface
- Uses the same GStreamer source
- Approximately 2-3 seconds latency (normal for HLS)
Raspberry Pi Camera
- Pi Camera Module v1/v2: Uses
libcamera
orrpicam
- Pi Camera Module 3: Full support with libcamera
- HQ Camera: Supported
USB Cameras
Auto-detected USB cameras appear in the dropdown:
- Logitech C615
- Logitech C920
- Most V4L2-compatible USB cameras
Check available cameras: v4l2-ctl --list-devices
Video Configuration
Resolution
Available resolutions:
- 320x240 (QVGA) - Low bandwidth
- 640x480 (VGA) - Standard definition
- 1280x720 (HD/720p) - High definition
- 1920x1080 (Full HD/1080p) - Maximum quality
Higher resolution requires more bandwidth:
- 320x240: ~300-500 Kbps
- 640x480: ~800-1200 Kbps
- 1280x720: ~1500-3000 Kbps
- 1920x1080: ~3000-6000 Kbps
Choose based on your available network bandwidth (4G/WiFi/Ethernet).
Frame Rate (FPS)
- Range: 5-30 FPS
- Recommended: 15-20 FPS for most applications
- Low bandwidth: 10-15 FPS
- High quality: 25-30 FPS
Bitrate
- Range: 500-8000 Kbps
- Recommended: 1500-3000 Kbps
- Low bandwidth: 800-1500 Kbps
- High quality: 3000-5000 Kbps
Bitrate directly affects video quality and bandwidth usage.
Keyframe Interval
- Default: 30 frames
- Affects video seeking and startup time
- Lower values: faster startup, higher bandwidth
- Higher values: slower startup, lower bandwidth
Raspberry Pi Camera Specific Settings
Rotation
- 0° - No rotation (default)
- 90° - Rotate 90° clockwise
- 180° - Upside down
- 270° - Rotate 270° clockwise
Flip
- Horizontal Flip: Mirror image left-right
- Vertical Flip: Mirror image top-bottom
Useful for mounting the camera in different orientations.
Live Preview
UAVcast-Pro v6 includes an integrated HLS video player powered by MediaMTX:
- Enable Live Preview toggle
- Start the camera service
- MediaMTX converts the camera stream to HLS format
- Video appears in the preview window
Preview Features:
- Real-time video playback
- Play/pause controls
- Fullscreen mode
- Approximately 2-3 seconds latency (normal for HLS)
- Works in any modern browser
The HLS preview in the web interface has 2-3 seconds latency, which is normal for HLS. This preview uses MediaMTX to convert the video stream to HLS format.
For real-time flight operations, UAVcast-Pro uses GStreamer to stream directly to your ground station via UDP with minimal latency (typically under 200ms). The UDP stream to your GCS is completely independent and much faster than the web preview.
Summary:
- MediaMTX → HLS → Web Preview: ~2-3s latency (for monitoring/setup)
- GStreamer → UDP → GCS: ~100-200ms latency (for flight operations)
Custom GStreamer Pipeline
For advanced users or unsupported cameras, you can specify a custom GStreamer pipeline.
Example for test pattern:
videotestsrc ! x264enc ! video/x-h264, stream-format=byte-stream ! rtph264pay ! udpsink host=192.168.1.100 port=5600
See GStreamer documentation for pipeline syntax.
Video Streaming Architecture
UAVcast-Pro v6 uses GStreamer as the primary video pipeline for streaming to ground control stations:
How it works:
- Camera captures video (Raspberry Pi Camera or USB camera)
- GStreamer encodes to H.264
- GStreamer streams via UDP to configured GCS destinations (low latency)
- Simultaneously, MediaMTX creates an HLS stream for web preview (higher latency, for monitoring only)
Key Points:
- UDP streaming to GCS: Low latency (~100-200ms) - used for flight operations
- HLS preview in browser: Higher latency (~2-3s) - used for setup/monitoring only
- Both streams use the same camera source
- Stopping the camera stops both UDP and HLS streams
Service Controls
Start/Stop Camera
Control the camera service:
- Start: Begins video encoding and streaming (both UDP to GCS and HLS preview)
- Stop: Halts all video streaming
- Restart: Restarts the camera service
Receiving Video on Ground Station
Mission Planner (Windows)
Mission Planner automatically receives video on UDP port 5600.
- Ensure firewall allows UDP 5600
- Configure GCS destination in Ground Control Stations
- Enable video streaming for that destination
- Video appears in HUD automatically
If video doesn't appear:
- Right-click HUD → Video → Set GStreamer Source
- Use default or custom pipeline
QGroundControl
QGC automatically detects video on UDP port 5600.
- Ensure firewall allows UDP 5600
- Video widget should show automatically
- If not, go to: Application Settings → General → Video
Using GStreamer Directly
Windows/Linux/Mac:
gst-launch-1.0 -v udpsrc port=5600 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
Troubleshooting
No Video Preview
Problem: Preview doesn't show in UAVcast-Pro
Solutions:
- Ensure camera is selected and started
- Check camera logs for errors
- Verify camera is connected:
libcamera-hello --list-cameras
orv4l2-ctl --list-devices
- For Pi Camera: ensure it's enabled in raspi-config
- For USB camera: check cable and USB power
- Check browser firewall/security settings: Some browsers or security software may block media streams
- Try accessing from a different browser (Chrome, Firefox, Edge)
- Check MediaMTX service is running:
sudo systemctl status mediamtx
- Verify you can access the HLS stream URL directly (check browser console for errors)
- If accessing remotely: Ensure firewall on Raspberry Pi allows incoming connections on the HLS port
- Clear browser cache and hard refresh (Ctrl+Shift+R)
Video Stuttering/Choppy
Problem: Video playback is not smooth
Solutions:
- Reduce resolution (try 640x480)
- Lower bitrate (try 1500 Kbps)
- Reduce FPS (try 15)
- Check network bandwidth:
iftop
or Dashboard network stats - Verify CPU isn't overheating (Dashboard → CPU Metrics)
GCS Doesn't Receive Video
Problem: Ground station shows no video
Solutions:
- Verify Ground Control Station destination is configured correctly
- Check "Enable Video" toggle is ON for that destination
- Confirm firewall allows UDP 5600 on GCS computer
- Test with gst-launch command (see above)
- Check VPN/network connectivity
- Verify correct IP address in GCS configuration
Camera Not Detected
Problem: Camera doesn't appear in dropdown
Solutions:
For Raspberry Pi Camera:
# Check if camera is detected
libcamera-hello --list-cameras
# Enable camera interface
sudo raspi-config
# Reboot
sudo reboot
For USB Camera:
# List video devices
v4l2-ctl --list-devices
# Check device capabilities
v4l2-ctl -d /dev/video0 --all
Poor Video Quality
Problem: Video is pixelated or low quality
Solutions:
- Increase bitrate (try 3000 Kbps)
- Increase resolution if bandwidth allows
- Ensure adequate lighting
- Clean camera lens
- Check camera focus (HQ camera)
Best Practices
- Test indoors first with known good network before outdoor flights
- Start with lower settings (720p, 15fps, 1500kbps) and increase if bandwidth allows
- Use live preview to verify camera is working before flight
- Monitor bandwidth using Dashboard network statistics
- Secure camera mounting to prevent vibration blur
- Protect from sun direct sunlight can cause lens flare and overheating
Related Pages
- Ground Control Stations - Configure video streaming destinations
- Dashboard - Monitor camera service status
- Networks - Manage network interfaces for streaming
- Flight Map - View camera feed with live map
Next Steps
After configuring your camera:
- Test live preview in UAVcast-Pro web interface
- Configure video destinations in Ground Control Stations
- Test video reception on your GCS
- Adjust quality settings based on available bandwidth