Media Routes Overview
Media routes enable processing of visual data including barcode scanning and video streaming. These routes bridge the gap between image/video sources and your MQTT infrastructure.Barcode Route
TheBARCODE route enables encoding and decoding of various barcode formats including QR codes, Code 128, EAN-13, and more.
Basic Syntax
Configuration Parameters
Event Parameters
Supported Formats
Barcode Examples
- Decode Barcode
- Encode Barcode
- Production Line Scanner
Scan barcodes from images:Input: Base64-encoded image on
camera/frameOutput: JSON with decoded data on barcode/decoded:Video Input Route
TheVIDEO_INPUT route captures video frames from RTSP streams, webcams, or video files and publishes them to MQTT topics.
Basic Syntax
Configuration Parameters
Event Parameters
Video Input Examples
- RTSP Stream
- Webcam
- Video File
- Motion Detection
Capture from IP camera:
Video Output Route
TheVIDEO_OUTPUT route streams video frames from MQTT to various output protocols.
Basic Syntax
Configuration Parameters
Event Parameters
Video Output Examples
- HTTP Stream
- RTSP Output
- UDP Multicast
Stream via HTTP (MJPEG):Access stream at:
http://broker-ip:8081/videoComplete Example: Vision System
A complete vision system with camera input, barcode scanning, and video streaming:Best Practices
Optimize Frame Rate
Optimize Frame Rate
Use lower frame rates for bandwidth efficiency:
- Monitoring: 1-5 fps
- Motion detection: 2-5 fps
- Barcode scanning: 5-10 fps
- Live viewing: 15-30 fps
Choose Appropriate Resolution
Choose Appropriate Resolution
Balance quality and performance:
- Barcode scanning: 640x480 to 1280x720
- Monitoring: 1280x720
- High detail: 1920x1080
Use JPEG for MQTT
Use JPEG for MQTT
JPEG format is ideal for MQTT transport:
- Reasonable file sizes
- Wide compatibility
- Adjustable quality (60-90 recommended)
Handle Network Interruptions
Handle Network Interruptions
Configure reconnection for RTSP streams and monitor connection status.
Troubleshooting
RTSP Connection Failed
RTSP Connection Failed
- Verify RTSP URL format and credentials
- Check camera is accessible on network
- Ensure port is not blocked by firewall
- Try alternative RTSP paths (check camera documentation)
No Barcode Detected
No Barcode Detected
- Ensure image quality is sufficient
- Check barcode format is in SUPPORTED_FORMATS
- Verify barcode is properly visible in image
- Try higher resolution capture
High CPU Usage
High CPU Usage
- Reduce frame rate
- Lower resolution
- Decrease JPEG quality
- Process fewer simultaneous streams
Stream Latency
Stream Latency
- Use UDP for lowest latency
- Reduce frame size and quality
- Check network bandwidth
- Use local network when possible
Next Steps
Industrial Routes
Connect to PLCs and industrial equipment.
Route Examples
See complete route configuration examples.

