My HLS streaming fragments are smaller than the duration

Updated 1 week ago by Bryan Jones

Scope

This document addresses some questions regarding the size of the fragment files created by HLS Streaming. As of this writing, that covers the Z/IP Stream X/2 and 9X/2 software as well as the Z/IP Stream R/2 and 9R/2 hardware solution.

Description

The Customer says that they have set the Fragment duration (milliseconds): set to 5000. When they look at the created files, they say 4.99 seconds. Why is this?

Setup

Here is a sample setup from the Z/IP Stream R/2. Note that it shows a Fragment duration setting of 5000. That number is in milliseconds, so the fragment duration should be 5 seconds.

Results

Note that the duration for each segment is showing 4.99

The time displayed is a simple mathematical rounding artifact. In other words, it's perfectly explainable.

The sample rate of the captured audio, as well as the chosen bit rate for this particular example, will drive the file size. While the system will strive for a 5-second fragment size, it is simply not possible given the current configuration.

We have to cut the fragment at a packet boundary. We can't take only part of one packet to make it "exactly" 5 seconds. The 4.99 second time shown is merely rounding. The actual duration could be 4.99456788, but we are rounding the display to 4.99 seconds.

Let us know how we can help

If you have further questions on this topic or have ideas about how we can improve this document, please contact us.


How did we do?


Knowledge Base

Powered by HelpDocs