Dash-Industry-Forum / livesim2

DASH Live Source Simulator v2 in Go
Other
34 stars 4 forks source link

re-fragments question #203

Closed pilgrimage1112 closed 5 days ago

pilgrimage1112 commented 1 week ago

"It also re-fragments segments so that they can be used for low-latency DASH streaming." What is re-fragment here and I want to know how livesim2 supports re-fragment during playback? Where is the core code about re-fragments?

tobbee commented 1 week ago

There is a URL configuration variable chunkdur that sets how long the output chunks should be inside the segments in order to support low-latency streaming. The code then basically writes the appropriate number of samples into every segment and publishes at the right time. It works both for segments which are already chunked or not, e.g. testpic_2s has one chunk per segment, while the test assets from CTA-WAVE have single-sample chunks.

The main function for chunking the segments is writeChunkedSegments

tobbee commented 1 week ago

@pilgrimage1112 Would be great if you asked this and future questions in the Q&A section as you did with the other topic. I think that would make it easier for others to find the question and answer.

pilgrimage1112 commented 1 week ago

Thank you sooo much for your timely answer. I didn't expect to receive such helpful replies so quickly when I asked my first question on GitHub. I'm extremely happy! Thank you for your answer and suggestions. I'll post my future questions on the Q&A section and look forward to your response!