Understanding the Buffer
The Chunk Upload Pipeline
4 min
HLS segments are generated locally, uploaded via HTTP PUT to the relay, and buffered in sequence order. Upload order preservation is critical for smooth playback.
Key Points
✓FFmpeg generates HLS segments at your configured chunk duration (1-30s)
✓Each chunk is uploaded with a sequence number via HTTP PUT
✓The relay confirms receipt — chunks are only deleted locally after confirmation
✓Local disk is the source of truth until the relay acknowledges each segment
Details
Sequence 0 is used as a connectivity ping to verify the relay is reachable before the stream starts.
If an upload fails, the client retries with exponential backoff while preserving the segment on local disk.