Dash-Industry-Forum / livesim2

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

Playout issue: HTTP 410 (Gone) #143

Closed crittlc closed 6 months ago

crittlc commented 7 months ago

Hi,

I have just installed livesim2 and can successfully play the WAVE sample stream: great!

Instead, with another test stream (encoded with ffmpeg, with MPD edited to fulfil livesim2 constraints), while it plays properly under /vod, I get "HTTP 410 (Gone)" errors on each segment fetched when playing it under /livesim2 via DASH-IF reference client:

XHRLoader.js:102 GET https://10.54.128.48:8888/livesim2/Test/Test-1-851318204.m4s 410 (Gone)

Any hint?

I am attaching the MPD, in original VOD version and after Livesim2 processing. mpd_vod.mpd.txt mpd_livesim2.mpd.txt

Thanks!

[Edit] Analysing better the logs, I see that it looks related to audio:

panic: runtime error: integer divide by zero
 -> github.com/Dash-Industry-Forum/livesim2/cmd/livesim2/app.calcAudioTimeFromRef
 ->   .../app/audiosegmentation.go:49

After removing audio AdaptationSet it works: do you see anything unsupported in the audio part, which instead works in VOD?

tobbee commented 6 months ago

@crittlc I cannot tell from the MPD what the problem is, but livesim2 resegments all audio segment to match video timing as close as possible. You have a source with audio sampling rate 44100Hz which is a particularly bad case, since the audio frame duration is 1024/44100s which is very hard to align with video segment duration. Still, this should work, although I don't have a test case for it.

In general, the standard audio sampling rate that is used for streaming is 48kHz, which makes things much better. With a segment duration like 1.92s (or any other multiple of 320ms) one can even get all video and audio segments having the same duration (provided 25 or 50fps video).

I suggest two possible ways forward:

  1. Try to reencode your content with 48kHz audio. If you can set the segment duration to 1.92s, it will be even better.
  2. Provide some media segments (+ init segment) so that I can have a look at what's going wrong.
crittlc commented 6 months ago

Thanks, that solved! The issue can be closed.

As a side comment, it's a pity that Livesim2 cannot use any existing (and valid) VOD stream without the need of re-encoding it with a different GOP length and audio sampling rate. In fact, it's unclear to me why there is audio/video misaligment, as they are properly aligned in the VOD stream: cannot Livesim2 just expose the audio and video segments in loop as HTTP, irrespective of their content? [Edit: I see now an explanation in #98]