2017-03-17 69 views
0

我會嘗試通過MPEG-DASH設置實時流。MPEG-DASH格式有什麼不對?

MEPG-DASH還有一些文件。

elemental-3703198892.m4a elemental-3703228922.m4v elemental-3703266460.m4a 
elemental-3703198892.m4v elemental-3703236430.m4a elemental-3703266460.m4v 
elemental-3703206400.m4a elemental-3703236430.m4v elemental-3703273967.m4a 
elemental-3703206400.m4v elemental-3703243937.m4a elemental-3703273967.m4v 
elemental-3703213907.m4a elemental-3703243937.m4v elemental-init.m4a 
elemental-3703213907.m4v elemental-3703251445.m4a elemental-init.m4v 
elemental-3703221415.m4a elemental-3703251445.m4v elemental-raw.m4a 
elemental-3703221415.m4v elemental-3703258952.m4a elemental-raw.m4v 
elemental-3703228922.m4a elemental-3703258952.m4v elemental.mpd 

elemental.mpd如下。

<?xml version="1.0"?> 
<MPD 
    type="dynamic" 
    xmlns="urn:mpeg:dash:schema:mpd:2011" 
    availabilityStartTime="2017-04-27T11:22:32+08:00" 
    availabilityEndTime="2017-04-27T11:23:17+08:00" 
    minimumUpdatePeriod="PT5S" 
    minBufferTime="PT5S" 
    timeShiftBufferDepth="PT0H0M0.00S" 
    suggestedPresentationDelay="PT10S" 
    profiles="urn:hbbtv:dash:profile:isoff-live:2012,urn:mpeg:dash:profile:isoff 
-live:2011" 
    xmlns:xsi="http://www.w3.org/2011/XMLSchema-instance" 
    xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd"> 
    <Period start="PT0S" id="dash"> 
    <AdaptationSet 
     id="1" 
     segmentAlignment="true" 
     maxWidth="1280" 
     maxHeight="720" 
     maxFrameRate="23"> 
     <Representation 
      id="elemental_H264" 
      mimeType="video/mp4" 
      codecs="avc1.4d401f" 
      width="1280" 
      height="720" 
      frameRate="23" 
      sar="1:1" 
      startWithSAP="1" 
      bandwidth="5000000"> 
     <SegmentTemplate 
      presentationTimeOffset="0" 
      timescale="1000" 
      media="elemental-$Time$.m4v" 
      initialization="elemental-init.m4v"> 
      <SegmentTimeline> 
      <S t="3703228922" d="7508"/> 
      <S t="3703236430" d="7507"/> 
      <S t="3703243937" d="7508"/> 
      <S t="3703251445" d="7507"/> 
      <S t="3703258952" d="7508"/> 
      <S t="3703266460" d="7507"/> 
      </SegmentTimeline> 
     </SegmentTemplate> 
     </Representation> 
    </AdaptationSet> 
    <AdaptationSet 
     id="2" 
     segmentAlignment="true"> 
     <AudioChannelConfiguration 
      schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" 
      value="1"/> 
     <Representation 
      id="elemental_AAC" 
      mimeType="audio/mp4" 
      codecs="mp4a.40.2" 
      audioSamplingRate="48000" 
      startWithSAP="1" 
      bandwidth="96000"> 
     <SegmentTemplate 
      presentationTimeOffset="0" 
      timescale="1000" 
      media="elemental-$Time$.m4a" 
      initialization="elemental-init.m4a"> 
      <SegmentTimeline> 
      <S t="3703228922" d="7508"/> 
      <S t="3703236430" d="7507"/> 
      <S t="3703243937" d="7508"/> 
      <S t="3703251445" d="7507"/> 
      <S t="3703258952" d="7508"/> 
      <S t="3703266460" d="7507"/> 
      </SegmentTimeline> 
     </SegmentTemplate> 
     </Representation> 
    </AdaptationSet> 
    </Period> 
</MPD> 

使用dash.js,但播放不起作用。 在Chrome瀏覽器的開發者控制檯中,video.js重複閱讀elemental.mpd。

MPEG-DASH有什麼問題?

回答

0

在這個環節http://developers-club.com/posts/204666/解釋如何做到這一點 我做到了,nginx的服務器

+0

工作好,我試着教你參考網址。我通過克隆做了dash.js。 只是重複elemental.mpd而不更改狀態,沒有錯誤,它在白色屏幕上。有一點不同之處,首先閱讀elemental.mpd,然後讀取elemental-init.m4和elemental-init.m4a一次,然後重複讀取elemental.mpd。 – Ubunkun

+0

顯然它在讀mpd時似乎受到緩存和ETag的影響。我設置了proxy_no_cache 1; proxy_cache_bypass 1; etag關閉。但情況並沒有改變。用dash.js可以用參數如.mpd?_session = 1234請求參數嗎? – Ubunkun

+0

我沒有從nginx-rtmp-module重新安裝。實況回放成功。 – Ubunkun