2016-06-12 6 views
0

私はrtmp plaginでnginxを持っています。私はdash.jsプレーヤーでテストページを持っています。 mpeg-dashをストリーミングする必要があります。私はffmpeg、nginxストリームを処理、ダッシュプレーヤーはストリームを再生しようとするが、dash.jsループを開始し、5秒ごとに.mpdファイルを要求し、何も表示しない。Dash.jsはnginx rtmpモジュールからmpeg-dashを再生しません

私はこれがダッシュストリームディレクトリからのファイルであるdash.js

<!doctype html> 
 
<html> 
 
    <head> 
 
     <title>Dash.js Rocks</title> 
 
     <style> 
 
      video { 
 
       width: 640px; 
 
       height: 360px; 
 
      } 
 
     </style> 
 
    </head> 
 
    <body> 
 
     <div> 
 
      <video id="videoPlayer" controls></video> 
 
     </div> 
 
     <script src="dash.all.min.js"></script> 
 
     <script> 
 
      (function(){ 
 
       var url = "http://localhost:8080/dash/test.mpd"; 
 
       var player = dashjs.MediaPlayer().create(); 
 
       player.initialize(document.querySelector("#videoPlayer"), url, true); 
 
      })(); 
 
     </script> 
 
    </body> 
 
</html>

に問題を意味し、その仕事は完璧に、テスト用のVLCプレーヤーを使用しています:

-rw-r--r-- 1 nginx nginx  120354 Jun 12 14:00 test-0.m4a 
-rw-r--r-- 1 nginx nginx  526439 Jun 12 14:00 test-0.m4v 
-rw-r--r-- 1 nginx nginx   599 Jun 12 14:00 test-init.m4a 
-rw-r--r-- 1 nginx nginx   662 Jun 12 14:00 test-init.m4v 
-rw-r--r-- 1 nginx nginx  292795 Jun 12 14:00 test-raw.m4a 
-rw-r--r-- 1 nginx nginx  284084 Jun 12 14:00 test-raw.m4v 
-rw-r--r-- 1 nginx nginx   2063 Jun 12 14:00 test.mpd 

これはtest.mpdです:

<?xml version="3.0"?> 
<MPD 
    type="dynamic" 
    xmlns="urn:mpeg:dash:schema:mpd:2011" 
    availabilityStartTime="2016-06-12T13:59:55+00:00" 
    availabilityEndTime="2016-06-12T14:00:31+00: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="1380" 
     maxHeight="800" 
     maxFrameRate="15"> 
     <Representation 
      id="test_H264" 
      mimeType="video/mp4" 
      codecs="avc1.640020" 
      width="1380" 
      height="800" 
      frameRate="15" 
      sar="1:1" 
      startWithSAP="1" 
      bandwidth="0"> 
     <SegmentTemplate 
      presentationTimeOffset="0" 
      timescale="1000" 
      media="test-$Time$.m4v" 
      initialization="test-init.m4v"> 
      <SegmentTimeline> 
      <S t="0" d="6000"/> 
      <S t="6000" d="16666"/> 
      <S t="22666" d="11000"/> 
      <S t="33666" d="2713"/> 
      </SegmentTimeline> 
     </SegmentTemplate> 
     </Representation> 
    </AdaptationSet> 
    <AdaptationSet 
id="2" 
     segmentAlignment="true"> 
     <AudioChannelConfiguration 
      schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" 
      value="1"/> 
     <Representation 
      id="test_AAC" 
      mimeType="audio/mp4" 
      codecs="mp4a.40.2" 
      audioSamplingRate="44100" 
      startWithSAP="1" 
      bandwidth="156000"> 
     <SegmentTemplate 
      presentationTimeOffset="0" 
      timescale="1000" 
      media="test-$Time$.m4a" 
      initialization="test-init.m4a"> 
      <SegmentTimeline> 
      <S t="0" d="6000"/> 
      <S t="6000" d="16666"/> 
      <S t="22666" d="11000"/> 
      <S t="33666" d="2713"/> 
      </SegmentTimeline> 
     </SegmentTemplate>`enter code here` 
     </Representation> 
    </AdaptationSet> 
    </Period> 
</MPD> 

答えて

0

NGINX + DASHのチュートリアルはhttps://www.nginx.com/blog/scalable-live-video-streaming-nginx-plus-bitmovinですが、dash.jsではなくbitmovin playerが使用されています。私はdash.jsがNGINX DASHの出力が使用するいくつかの機能を実装していないと仮定します。あなたはShakaプレーヤーをテストすることもできますか?

+0

はい、私はShakaプレーヤーを試してみますが、問題が見つかりました、nginx rtmp-moduleです。フォークがinvalid.mpdを生成できる – Lem

関連する問題