Skip to content

Behavior Details

When a stream fails, it’s automatically retried with exponential backoff:

AttemptDelay
1-41s
5-72s
8-95s
1010s
1115s
1220s
13+30s

Random jitter (0-2s) is added to prevent thundering herd when multiple streams fail simultaneously.

  • Default mode: retries indefinitely (unless --max-retries is set)
  • Continuous mode (-C): retries on ALL exits (including clean exits like code 0 or 255). Clean exits reset the retry counter for minimal backoff. Only stop or remove stops a continuous stream.
  • Pending retries can be cancelled within ~1 second by stop or remove.

Stream configurations are stored in ~/.unleash-stream/startup. On service restart:

  • Continuous streams (-C): automatically start streaming immediately
  • Non-continuous streams: loaded as stopped — visible in list, start manually with start DEVICE or start --all
  • Snapshots: automatically restart their capture loop

When the source is a local file (e.g., .mp4, .mkv, .avi):

  • -re flag is added for real-time pacing (prevents faster-than-realtime streaming)
  • In continuous mode (-C), -stream_loop -1 is added for infinite looping
  • Files are identified by path (starts with /, ./, ~, or a drive letter) or common video extensions
  • Each stream run creates a log file at /tmp/unleash-{name}-{timestamp}.log
  • Up to 10 log files are retained per stream (oldest are deleted automatically)
  • View with unleash-stream-cli logs or directly read the files