Closed
Description
I'm using 10 second segments for videos, which is perfectly fine for normal videos. However, I have a few videos that are 10 seconds long, therefore they have only one segment.
When I try to play them, shaka-player tries to fetch the second segment, but there's no second segment (to be precise, the server returns empty file with HTTP 304 Not Modified).
The MPD looks like this:
<MPD
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:mpeg:dash:schema:mpd:2011"
xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
xmlns:cenc="urn:mpeg:cenc:2013"
xmlns:mas="urn:marlin:mas:1-0:services:schemas:mpd"
type="static"
mediaPresentationDuration="PT10.053583S"
maxSegmentDuration="PT11S"
minBufferTime="PT10S"
profiles="urn:mpeg:dash:profile:isoff-live:2011">
<Period>
<BaseURL>dash/</BaseURL>
<AdaptationSet
group="1"
contentType="audio"
minBandwidth="131424"
maxBandwidth="131424"
segmentAlignment="true"
audioSamplingRate="44100"
mimeType="audio/mp4"
codecs="mp4a.40.2">
<AudioChannelConfiguration
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"
value="2">
</AudioChannelConfiguration>
<SegmentTemplate
timescale="44100"
initialization="9d47cdd9-45b7-4656-b6e0-a77129f63d88-$RepresentationID$.dash"
media="9d47cdd9-45b7-4656-b6e0-a77129f63d88-$RepresentationID$-$Number$.m4s"
startNumber="1"
duration="441000">
</SegmentTemplate>
<Representation
id="audio=131424"
bandwidth="131424">
</Representation>
</AdaptationSet>
<AdaptationSet
group="2"
contentType="video"
lang="en"
par="16:9"
minBandwidth="180000"
maxBandwidth="2021000"
minWidth="640"
maxWidth="1280"
minHeight="360"
maxHeight="720"
segmentAlignment="true"
mimeType="video/mp4"
codecs="avc1.4D401F"
startWithSAP="1">
<SegmentTemplate
timescale="16000"
initialization="9d47cdd9-45b7-4656-b6e0-a77129f63d88-$RepresentationID$.dash"
media="9d47cdd9-45b7-4656-b6e0-a77129f63d88-$RepresentationID$-$Number$.m4s"
startNumber="1"
duration="160000">
</SegmentTemplate>
<Representation
id="video_eng=180000"
bandwidth="180000"
width="640"
height="360"
scanType="progressive">
</Representation>
</AdaptationSet>
(I've skipped the remaining Representations in the 2nd Adaptation set as they're pretty much the same just with different bitrate).
The player just keeps buffering while trying to fetch the 2nd segment. Any idea why is that happening?