2016-12-12 9 views
1

私はこのようなライブダッシュマニフェストを持っています。ダッシュセグメントリスト内のセグメントの並べ替え

<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> 

ストリーミングしながら、すべてのセグメントは、ストリーミングセッションからVODsとハイライトに使用されるディスクに保存されています。ライブマニフェストを静的マニフェストにリメイクすることで、VODソリューションを完成させました。

ハイライトを作成したいときに、セグメントを並べ替えて、ダウンロードして再生するセグメントを正確に指定する必要があります。私はSegmentationListを使ってこれを試みました。私は、このソリューションでに実行し、問題は「タイマーはdoesnのことを第一にある

<?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> 

:私が作成した はこのようになっていることを私の新しいマニフェストtは0から始まり、37596(9399 * 4)から始まります。私の2番目の問題は、ハイライト1が終了したときハイライト2を再生しないということです。代わりに、ビデオの終わりに達したかのように凍っている場合。

私はセグメントファイルの再生方法を指定する何かがinitファイルにあると思います。

新しいマニフェストを作成し、新しいinitファイルを作成しないことでこれを行う方法はありますか?

答えて

1

新しいinitファイルは必要ありません。主な問題は、メディアセグメントのタイムスタンプにあります。最初の時間の問題を解決するには、presentationTimeOffset属性を、再生したい最初のセグメントの開始時刻を含むマニフェストに追加する必要があります。

第二の問題は、MPEG-DASHの標準が推奨するよう(あなたのケースでは2つのハイライト間の時間変化)不連続は新しい期間にそれらを分割することによって処理されるべきであるということである。

不連続の場合はそれがあります@presentationTimeOffsetの値をリセットする新しい期間を追加することをお勧めします。

これらの2つのものを以下に示すように組み合わせることができます(わかりやすくするため、オーディオAdaptationSetをスキップしました)。この場合、SegmentTimelineを使用しました。

<MPD type="static" mediaPresentationDuration="PT0H2M24.000S" minBufferTime="PT4S" 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" profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264"> 
    <Period start="PT0S" duration="PT8S"> 
     <!--Highlight 1--> 
     <AdaptationSet mimeType="video/mp4" minWidth="426" contentType="video" maxWidth="1920" minHeight="240" segmentAlignment="true" startWithSAP="1" maxHeight="1080"> 
      <SegmentTemplate timescale="1" presentationTimeOffset="37596" startNumber="9399" initialization="video/480p/init.mp4" media="video/$RepresentationID$/segment_$Number$.m4s"> 
       <SegmentTimeline> 
        <S t="37596" d="4" r="1"/> 
       </SegmentTimeline> 
      </SegmentTemplate> 
      <Representation frameRate="60000/1000" height="480" width="858" bandwidth="1200000" codecs="avc1.42c00d" id="480p" /> 
     </AdaptationSet> 
    </Period> 
    <Period duration="PT8S"> 
     <!--Highlight 2--> 
     <AdaptationSet mimeType="video/mp4" minWidth="426" contentType="video" maxWidth="1920" minHeight="240" segmentAlignment="true" startWithSAP="1" maxHeight="1080"> 
      <SegmentTemplate timescale="1" presentationTimeOffset="37404" startNumber="9351" initialization="video/480p/init.mp4" media="video/$RepresentationID$/segment_$Number$.m4s"> 
       <SegmentTimeline> 
        <S t="37404" d="61440" r="1"/> 
       </SegmentTimeline> 
      </SegmentTemplate> 
      <Representation frameRate="60000/1000" height="480" width="858" bandwidth="1200000" codecs="avc1.42c00d" id="480p" /> 
     </AdaptationSet> 
    </Period> 
    <Period duration="PT8S"> 
     <!--Highlight 3--> 
     <AdaptationSet mimeType="video/mp4" minWidth="426" contentType="video" maxWidth="1920" minHeight="240" segmentAlignment="true" startWithSAP="1" maxHeight="1080"> 
      <SegmentTemplate timescale="1" presentationTimeOffset="37796" startNumber="9449" initialization="video/480p/init.mp4" media="video/$RepresentationID$/segment_$Number$.m4s"> 
       <SegmentTimeline> 
        <S t="37796" d="61440" r="1"/> 
       </SegmentTimeline> 
      </SegmentTemplate> 
      <Representation frameRate="60000/1000" height="480" width="858" bandwidth="1200000" codecs="avc1.42c00d" id="480p" /> 
     </AdaptationSet> 
    </Period> 
</MPD> 

もちろん、プレーヤーはpresentationTimeOffsetと複数の期間をサポートする必要があります。私はBitmovin Playerは、dash.jsのような他人についてはわからないと思う。

関連する問題