Dash-Industry-Forum / livesim2

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

Audio mismatch support #109

Closed tobbee closed 9 months ago

tobbee commented 9 months ago

The audio segment time intervals and numbers will now always follow the video segments, even if they have a different duration.

The start time of an audio segment will always be less than one audio "mp4 sample" duration of the corresponding video segment. For AAC 48kHz this corresponds to one AAC frame of duration 21.3333ms.

One particular test case is looping 12s of 30Hz video where the audio is somewhat longer. Another test case is 8008ms of video with 8000ms of audio.

In these cases, the last audio sample is either dropped or repeated at the wrap around in order to match the video time.

The representation data stored on disk has been extended by a new field "commonSampleDuration" for audio that is used to for all calculations relating video and audio.

Solves #98.