shaka-project / shaka-streamer

A simple config-file based approach to preparing streaming media, based on FFmpeg and Shaka Packager.
https://shaka-project.github.io/shaka-streamer/
Apache License 2.0
198 stars 62 forks source link

DASH VOD output appears to be live #61

Closed bkodirov closed 3 years ago

bkodirov commented 4 years ago

The output of the down below pipeline_config.yaml is producing an MPD with type="dynamic"

streaming_mode: vod

resolutions:
  - 1080p
  - 720p
  - 480p
  - 360p

channels: 2

audio_codecs:
  - aac
video_codecs:
  - h264

manifest_format:
  - dash
  - hls

segment_size: 10
segment_per_file: True
dash_output: manifest.mpd
hls_output: manifest.m3u8

Here is the beginning of the Dash manifest

<MPD
  xmlns="urn:mpeg:dash:schema:mpd:2011"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd"
  profiles="urn:mpeg:dash:profile:isoff-live:2011"
  minBufferTime="PT2S"
  type="dynamic"
  publishTime="2020-06-30T03:12:12Z"
  availabilityStartTime="2020-06-30T03:05:55Z"
  minimumUpdatePeriod="PT5S"
  timeShiftBufferDepth="PT1800S">

Using:

achilsowa commented 4 years ago

I have the same issue. @bkodirov have you found the solution so far ?

joeyparrish commented 4 years ago

I've just noticed the same issue reported in #58. At least, based on the information provided in both, it appears to be the same.

Since this issue has more detailed information than the other, I will close #58 as a duplicate. I'm tagging @solaris7x and @bkodirov (those who interacted with the other issue) so that they are subscribed to this issue now as well.

The MPD being dynamic is not in and of itself an indication of a live stream, but the lack of presentation duration does mean live. You also should never have availabilityStartTime or timeShiftBufferDepth on VOD content.

This seems likely to be our bug and not a Shaka Packager bug. The team has been diverted to other projects for the moment, so this is not something I have time to address right now, but I will provide some pointers in case someone in the community has time to create a PR for us.

streamer/packager_node.py is where the Shaka Packager command line is constructed, so if the bug is in the command line, that would be the place to look. I would also strongly recommend a new test or an update to existing tests in tests/tests.js. For example, https://github.com/google/shaka-streamer/blob/560890f230c624f65c68c8217e1616cf168f96d8/tests/tests.js#L708-L730 appears to be an existing test that should cover this.

Perhaps you could make the test fail in the same way as your report by changing the pipeline config in the test to more closely match yours. That may also indicate which config parameters are responsible, and lead you to the root cause in packager_node.py.

achilsowa commented 4 years ago

Hi @joeyparrish I downloaded the source and ran run_end_to_end_tests.py as you suggested. The answer is kind of weird. 33 on 44 failed. I guess this is just too much and should not be the case. Among the failed tests, we have the one you suggested up there. I added a screen shoot. I guess something is missing but I don't know what Screenshot from 2020-08-18 16-14-26

joeyparrish commented 3 years ago

As far as I can tell, this was fixed (incidentally) some time between 0.3.0 and 0.4.0.