WINK Media Bridge

v1.0.0 | April 2023

A simple RTSP to HLS testing tool. No frills, just works.

Installation

Download the binary for your platform. No installation required.

Platform Download
Windows x64 wink-media-bridge-windows-amd64.exe
Windows ARM64 wink-media-bridge-windows-arm64.exe
macOS Intel wink-media-bridge-darwin-amd64
macOS Apple Silicon wink-media-bridge-darwin-arm64
Linux x64 wink-media-bridge-linux-amd64
Linux ARM64 wink-media-bridge-linux-arm64

On macOS/Linux, make the binary executable:

chmod +x wink-media-bridge-*
./wink-media-bridge-darwin-arm64 --rtsp rtsp://camera/stream

Basic Usage

# Minimal - just the RTSP URL
./wink-media-bridge --rtsp rtsp://192.168.1.100:554/stream

# With credentials in URL
./wink-media-bridge --rtsp rtsp://admin:password@192.168.1.100:554/stream

# With credentials as flags
./wink-media-bridge --rtsp rtsp://192.168.1.100:554/stream --user admin --pass password

# Different port
./wink-media-bridge --rtsp rtsp://camera/stream --listen :9000

# UDP transport (if TCP doesn't work)
./wink-media-bridge --rtsp rtsp://camera/stream --transport udp

# Debug logging
./wink-media-bridge --rtsp rtsp://camera/stream --log-level debug

Then open http://localhost:8000 in your browser.

Command Line Flags

FlagDefaultDescription
--rtsprequiredRTSP URL of the camera
--userUsername (if not in URL)
--passPassword (if not in URL)
--transporttcpTransport: tcp, udp, or auto
--timeout10sConnection timeout
--listen:8000HTTP server address
--reconnecttrueAuto-reconnect on disconnect
--reconnect-max30sMaximum reconnect delay
--segment-duration2sHLS segment length
--playlist-size3Segments in playlist
--log-levelinfodebug, info, warn, error
--no-ansifalseDisable colored output

HTTP Endpoints

EndpointDescription
GET /Browser player page
GET /hls/index.m3u8HLS master playlist
GET /hls/video1_stream.m3u8HLS video playlist
GET /hls/*.mp4HLS segments
GET /api/statusJSON status

Status API

curl http://localhost:8000/api/status

Response:

{
  "state": "streaming",
  "connected": true,
  "rtsp_url": "rtsp://192.168.1.100:554/stream",
  "transport": "tcp",
  "connected_at": "2023-04-15T10:30:00Z",
  "uptime_seconds": 125.4,
  "reconnect_count": 0,
  "last_error": null,
  "segments_served": 62,
  "bytes_served": 15234567
}

State values: starting, connecting, streaming, reconnecting, error

Exit Codes

CodeMeaning
0Clean shutdown
1General error
2Authentication failed (401)
3Connection refused
4Connection timeout
5Unsupported codec (H.265)
6HLS muxer error
7HTTP port in use

Common RTSP URL Formats

Different manufacturers use different URL patterns:

Hikvision

rtsp://user:pass@IP:554/Streaming/Channels/101   # Main stream
rtsp://user:pass@IP:554/Streaming/Channels/102   # Sub stream

Dahua / Amcrest

rtsp://user:pass@IP:554/cam/realmonitor?channel=1&subtype=0  # Main
rtsp://user:pass@IP:554/cam/realmonitor?channel=1&subtype=1  # Sub

Reolink

rtsp://user:pass@IP:554/                  # Main stream
rtsp://user:pass@IP:554/Preview_01_sub    # Sub stream

Axis

rtsp://user:pass@IP/axis-media/media.amp

Ubiquiti UniFi

rtsp://IP:7447/CAMERA_ID

Generic ONVIF

rtsp://user:pass@IP:554/stream1    # Main
rtsp://user:pass@IP:554/stream2    # Sub

Troubleshooting

"connection refused"

"401 Unauthorized"

"no H.264 track found"

"connection timeout"

Video plays but stutters

Browser shows "Stream not ready"

Architecture

┌──────────────┐      RTSP/RTP       ┌─────────────────┐
│  IP Camera   │ ──────────────────▶ │  wink-media-    │
│  (H.264)     │                     │  bridge         │
└──────────────┘                     └────────┬────────┘
                                              │ HLS
                                              ▼
                                     ┌─────────────────┐
                                     │  Browser        │
                                     │  (hls.js)       │
                                     └─────────────────┘

Requirement

H.264 video codec only. H.265/HEVC is not supported.

License & Disclaimer

WINK Media Bridge is provided under CC BY-NC-ND 4.0 (Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International).

This is a testing and debugging tool only. It is provided "as is" without warranty of any kind, express or implied. Use at your own risk. WINK Streaming makes no guarantees regarding reliability, accuracy, or fitness for any particular purpose.

For production video streaming deployments, see WINK Forge and WINK Media Router.


Back to download page | All tools

Created by WINK Streaming