How Playback Works
Dubby uses a multi-tier playback hierarchy to ensure your media always plays, regardless of the client device or network conditions.
The playback hierarchy
Section titled “The playback hierarchy”When you press play, the server analyzes the source media, your device’s capabilities, and the server’s hardware to choose the fastest compatible option:
- Direct Play — Stream the original file as-is (fastest, zero CPU)
- Direct + Audio Transcode — Copy video, transcode audio only
- Remux — Repackage into a compatible container without re-encoding
- Remux + Audio Transcode — Repackage container and transcode audio
- Remux-to-HLS — Repackage as HLS segments with copied streams
- Remux-to-HLS + Audio Transcode — HLS with transcoded audio
- 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.
Direct play
Section titled “Direct play”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.
HLS streaming
Section titled “HLS streaming”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
Seeking
Section titled “Seeking”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.
Session lifecycle
Section titled “Session lifecycle”Hardware acceleration
Section titled “Hardware acceleration”When transcoding is required, the server automatically selects the best available encoder:
- NVIDIA NVENC — Dedicated GPU encoder (fastest)
- Intel Quick Sync — Integrated GPU encoder (6th-gen Intel+)
- AMD VAAPI — GPU encoder with proper driver
- Software (libx264) — CPU fallback (always available)
See Hardware Acceleration for setup instructions.