Skip to content
🚧 These docs are a work in progress and may contain inaccuracies. Content is being actively reviewed and validated.

How Playback Works

Dubby uses a multi-tier playback hierarchy to ensure your media always plays, regardless of the client device or network conditions.

When you press play, a native playback decision engine analyzes the source media, your device’s capabilities, and the server’s hardware to choose the fastest compatible option:

  1. Direct Play — Stream the original file as-is (fastest, zero CPU)
  2. Direct + Audio Transcode — Copy video, transcode audio only
  3. Remux — Repackage into a compatible container without re-encoding
  4. Remux + Audio Transcode — Repackage container and transcode audio
  5. Remux-to-HLS — Repackage as HLS segments with copied streams
  6. Remux-to-HLS + Audio Transcode — HLS with transcoded audio
  7. Full Transcode-to-HLS — Re-encode video and audio into HLS

The system never shows “format not supported” — it gracefully falls back through this hierarchy until it finds a working option.

When your device natively supports the video codec, audio codec, and container format, Dubby serves the original file directly using HTTP Range requests. This means:

  • Zero CPU usage on the server
  • Original quality preserved
  • Instant start (no transcoding delay)

Direct play works best with H.264 video in MP4 containers with AAC audio — this combination is supported by virtually every device.

When transcoding is needed, Dubby uses HTTP Live Streaming (HLS):

  • Media is split into 4-second segments (local/LAN) or 6-second segments (remote/WAN, for better resilience over high-latency connections)
  • Playback starts within 3-5 seconds while the server is still transcoding ahead
  • The server transcodes ahead of your playback position so seeking within the transcoded region is instant

How seeking works depends on what’s already been transcoded:

When FFmpeg restarts at a new position, this is called a new “epoch.” The segment counter resets and a discontinuity marker tells the player to adjust its timeline.

When transcoding is required, the server automatically selects the best available encoder:

  1. NVIDIA NVENC — Dedicated GPU encoder (fastest)
  2. Intel Quick Sync — Integrated GPU encoder (6th-gen Intel+)
  3. AMD VAAPI — GPU encoder with proper driver
  4. Software (libx264) — CPU fallback (always available)

See Hardware Acceleration for setup instructions.