У меня есть живой манифест тире, который выглядит так.
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="" maxSegmentDuration="PT4S" minimumUpdatePeriod="PT595H" minBufferTime="PT2S" type="dynamic" availabilityStartTime="2016-11-20T17:00:54Z" publishTime="2016-11-20T17:00:54Z" profiles="urn:hbbtv:dash:profile:isoff-live:2012,urn:mpeg:dash:profile:isoff-live:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" timeShiftBufferDepth="PT120S">
<ProgramInformation>
<Title>Title</Title>
</ProgramInformation>
<Period start="PT0S" id="p1">
<AdaptationSet mimeType="audio/mp4" lang="en" startWithSAP="1" contentType="audio" segmentAlignment="true">
<Representation audioSamplingRate="48000" bandwidth="128000" id="128kb" codecs="mp4a.40.2">
<AudioChannelConfiguration value="2" schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"/>
<SegmentTemplate duration="4" media="audio/128kbps/segment_$Number$.m4s" initialization="audio/128kbps/init.mp4" startNumber="0"/>
</Representation>
</AdaptationSet>
<AdaptationSet mimeType="video/mp4" minWidth="426" contentType="video" maxWidth="1920" minHeight="240" segmentAlignment="true" startWithSAP="1" maxHeight="1080">
<Representation frameRate="60000/1000" height="480" width="858" bandwidth="1200000" codecs="avc1.42c00d" id="1200kb">
<SegmentTemplate duration="4" media="video/480p/segment_$Number$.m4s" initialization="video/480p/init.mp4" startNumber="0"/>
</Representation>
<!-- Some more representations -->
</AdaptationSet>
</Period>
While streaming, all of the segments are saved to disk to be used in VODs and highlights from the streaming session. I have the VOD solution done by remaking the live manifest into a static manifest.
Моя проблема заключается в том, что когда я хочу создать основные моменты, я хочу изменить порядок сегментов и точно указать, какие сегменты следует загружать и воспроизводить. Я попытался сделать это с помощью SegmentationList. Мой новый манифест, который я создал, выглядит так:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Выделите тест
<Period start="PT0S" duration="PT0H2M24.000S">
<AdaptationSet mimeType="video/mp4" minWidth="426" contentType="video" maxWidth="1920" minHeight="240" segmentAlignment="true" startWithSAP="1" maxHeight="1080">
<Representation frameRate="60000/1000" height="480" width="858" bandwidth="1200000" codecs="avc1.42c00d" id="1200kb">
<SegmentList duration="61440" timescale="15360">
<Initialization sourceURL="video/480p/init.mp4"/>
<!--Highlight 1-->
<SegmentURL media="video/480p/segment_9399.m4s"/>
<SegmentURL media="video/480p/segment_9400.m4s"/>
<!--Highlight 2-->
<SegmentURL media="video/480p/segment_9351.m4s"/>
<SegmentURL media="video/480p/segment_9352.m4s"/>
<!--Highlight 3-->
<SegmentURL media="video/480p/segment_9449.m4s"/>
<SegmentURL media="video/480p/segment_9450.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" lang="en" startWithSAP="1" contentType="audio" segmentAlignment="true">
<Representation audioSamplingRate="48000" bandwidth="128000" id="128kb" codecs="mp4a.40.2">
<AudioChannelConfiguration value="2" schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"/>
<SegmentList duration="192000" timescale="48000">
<Initialization sourceURL="audio/128kbps/init.mp4"/>
<!--Highlight 1-->
<SegmentURL media="audio/128kbps/segment_9399.m4s"/>
<SegmentURL media="audio/128kbps/segment_9400.m4s"/>
<!--Highlight 2-->
<SegmentURL media="audio/128kbps/segment_9351.m4s"/>
<SegmentURL media="audio/128kbps/segment_9352.m4s"/>
<SegmentURL media="audio/128kbps/segment_9357.m4s"/>
<!--Highlight 3-->
<SegmentURL media="audio/128kbps/segment_9449.m4s"/>
<SegmentURL media="audio/128kbps/segment_9450.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
The problem I run into with this solution is firstly that the timer doesn't start at 0, it starts at 37596 (9399*4). My second problem is that it doesn't play highlight 2 when highlight 1 is finished. Instead if freezes as if had reached the end of the video.
Я предполагаю, что в файле инициализации есть что-то, определяющее, как воспроизводить сегменты.
Есть ли способ сделать это, только создав новый манифест, а не новый файл инициализации?