shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.96k stars 506 forks source link

LL-DASH stream not working with UDP input #1104

Open Nixon197 opened 1 year ago

Nixon197 commented 1 year ago

System info

Operating System: Centos 7 Shaka Packager Version: v2.6.1-634af65-release

Issue and steps to reproduce the problem

Packager Command:

/opt/packager-linux-x64 \ 'in=udp://127.0.0.1:1234,stream=audio,init_segment=http://127.0.0.1:6767/upload/audio_init.mp4,segment_template=http://127.0.0.1:6767/upload/audio_$Number$.m4s' \ 'in=udp://127.0.0.1:1234,stream=video,init_segment=http://127.0.0.1:6767/upload/h264_360p_init.mp4,segment_template=http://127.0.0.1:6767/upload/h264_360p_$Number$.m4s' \ --utc_timings "urn:mpeg:dash:utc:http-iso:2014"="https://time.akamai.com/?iso" \ --segment_duration 2 \ --low_latency_dash_mode=true \ --strip_parameter_set_nalus=false \ --mpd_output http://127.0.0.1:6767/upload/manifest_shaka.mpd

Extra steps to reproduce the problem? Test Dash stream in shaka player

What is the expected result? Working stream

What happens instead? When using encoder which started earlier and using UDP as input Shaka packager starts numbering segments from 1 while player requests segments in relation with availabilityStartTime. Player used: Shaka player v4.2.1

Files on disk:

image

Console output from shaka player: image

Manifest: manifest_shaka (9).zip

Am I missing something?

acris5 commented 10 months ago

I have the same problem with segment numbers (shaka starts from 1, while browser start asking i+1800)

<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/shaka-project/shaka-packager version 7ce9dea-release-->
<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="2023-11-09T14:55:14Z" availabilityStartTime="2023-11-09T13:40:18Z" minimumUpdatePeriod="PT5S" timeShiftBufferDepth="PT1800S">
  <Period id="0" start="PT0S">
    <ServiceDescription id="0">
      <Latency target="1000"/>
    </ServiceDescription>
    <AdaptationSet id="0" contentType="audio" segmentAlignment="true">
      <Representation id="0" bandwidth="6491" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <SegmentTemplate timescale="90000" duration="180000" availabilityTimeOffset="1.9786666666666666" availabilityTimeComplete="false" initialization="bitrate_1/audio_init.mp4" media="bitrate_1/audio_$Number%04d$.m4s" startNumber="1"/>
      </Representation>
    </AdaptationSet>
    <AdaptationSet id="1" contentType="video" maxWidth="1920" maxHeight="1080" frameRate="90000/3600" par="16:9">
      <Representation id="1" bandwidth="507812" codecs="avc1.640028" mimeType="video/mp4" sar="1:1" width="1920" height="1080">
        <SegmentTemplate timescale="90000" duration="180000" availabilityTimeOffset="1.96" availabilityTimeComplete="false" initialization="bitrate_2/video_init.mp4" media="bitrate_2/video_$Number%04d$.m4s" startNumber="1"/>
      </Representation>
      <Representation id="2" bandwidth="282112" codecs="avc1.640020" mimeType="video/mp4" sar="1:1" width="1280" height="720">
        <SegmentTemplate timescale="90000" duration="180000" availabilityTimeOffset="1.96" availabilityTimeComplete="false" initialization="bitrate_1/video_init.mp4" media="bitrate_1/video_$Number%04d$.m4s" startNumber="1"/>
      </Representation>
      <Representation id="3" bandwidth="179110" codecs="avc1.64001e" mimeType="video/mp4" sar="4:3" width="640" height="480">
        <SegmentTemplate timescale="90000" duration="180000" availabilityTimeOffset="1.96" availabilityTimeComplete="false" initialization="bitrate_3/video_init.mp4" media="bitrate_3/video_$Number%04d$.m4s" startNumber="1"/>
      </Representation>
    </AdaptationSet>
  </Period>
  <UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-xsdate:2014" value="https://time.akamai.com/?iso"/>

Screenshot_20231109_180344