07-03 18:51:01.600 16188-16266/? E/ExoPlayerImplInternal﹕ Internal runtime error.
java.lang.IllegalArgumentException
at com.google.android.exoplayer.util.Assertions.checkArgument(Assertions.java:39)
at com.google.android.exoplayer.upstream.DataSpec.<init>(DataSpec.java:101)
at com.google.android.exoplayer.upstream.DataSpec.<init>(DataSpec.java:71)
at com.google.android.exoplayer.dash.DashMp4ChunkSource.newInitializationChunk(DashMp4ChunkSource.java:197)
at com.google.android.exoplayer.dash.DashMp4ChunkSource.getChunkOperation(DashMp4ChunkSource.java:164)
at com.google.android.exoplayer.chunk.ChunkSampleSource.updateLoadControl(ChunkSampleSource.java:500)
at com.google.android.exoplayer.chunk.ChunkSampleSource.restartFrom(ChunkSampleSource.java:454)
at com.google.android.exoplayer.chunk.ChunkSampleSource.enable(ChunkSampleSource.java:226)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onEnabled(MediaCodecTrackRenderer.java:198)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onEnabled(MediaCodecVideoTrackRenderer.java:222)
at com.google.android.exoplayer.TrackRenderer.enable(TrackRenderer.java:148)
at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:286)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:195)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:157)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.ExoPlayerImplInternal$1.run(ExoPlayerImplInternal.java:109)
07-03 18:51:01.610 1049-18543/? D/KeyguardViewMediator﹕ setHidden false
07-03 18:51:01.610 1049-18543/? D/KeyguardUpdateMonitor﹕ sendKeyguardVisibilityChanged(true)
07-03 18:51:01.610 1049-1049/? D/KeyguardUpdateMonitor﹕ handleKeyguardVisibilityChanged(1)
07-03 18:51:01.610 1049-19547/? D/KeyguardViewMediator﹕ setHidden false
07-03 18:51:01.610 1049-19547/? D/KeyguardUpdateMonitor﹕ sendKeyguardVisibilityChanged(true)
07-03 18:51:01.610 1049-1049/? D/KeyguardUpdateMonitor﹕ handleKeyguardVisibilityChanged(1)
07-03 18:51:01.610 831-16270/? W/ContextImpl﹕ Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1454 com.android.server.InputMethodManagerService$4.run:2723 java.lang.Thread.run:841 <bottom of call stack> <bottom of call stack>
07-03 18:51:01.630 16188-16188/? E/PlayerActivity﹕ Playback failed
com.google.android.exoplayer.ExoPlaybackException: java.lang.IllegalArgumentException
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:236)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:157)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.ExoPlayerImplInternal$1.run(ExoPlayerImplInternal.java:109)
Caused by: java.lang.IllegalArgumentException
at com.google.android.exoplayer.util.Assertions.checkArgument(Assertions.java:39)
at com.google.android.exoplayer.upstream.DataSpec.<init>(DataSpec.java:101)
at com.google.android.exoplayer.upstream.DataSpec.<init>(DataSpec.java:71)
at com.google.android.exoplayer.dash.DashMp4ChunkSource.newInitializationChunk(DashMp4ChunkSource.java:197)
at com.google.android.exoplayer.dash.DashMp4ChunkSource.getChunkOperation(DashMp4ChunkSource.java:164)
at com.google.android.exoplayer.chunk.ChunkSampleSource.updateLoadControl(ChunkSampleSource.java:500)
at com.google.android.exoplayer.chunk.ChunkSampleSource.restartFrom(ChunkSampleSource.java:454)
at com.google.android.exoplayer.chunk.ChunkSampleSource.enable(ChunkSampleSource.java:226)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onEnabled(MediaCodecTrackRenderer.java:198)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onEnabled(MediaCodecVideoTrackRenderer.java:222)
at com.google.android.exoplayer.TrackRenderer.enable(TrackRenderer.java:148)
at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:286)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:195)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:157)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.ExoPlayerImplInternal$1.run(ExoPlayerImplInternal.java:109)
MPD:
<?xml version="1.0" encoding="UTF-8"?>
<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 DASH-MPD.xsd"
type="static"
mediaPresentationDuration="PT654S"
minBufferTime="PT2S"
profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
<BaseURL>http://dash.edgesuite.net/dash264/TestCases/1a/netflix/</BaseURL>
<Period>
<!-- English Audio -->
<AdaptationSet mimeType="audio/mp4" codecs="mp4a.40.5" lang="en" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Representation id="1" bandwidth="64000">
<BaseURL>ElephantsDream_AAC48K_064.mp4.dash</BaseURL>
</Representation>
</AdaptationSet>
<!-- Video -->
<AdaptationSet mimeType="video/mp4" codecs="avc1.42401E" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Representation id="2" bandwidth="100000" width="480" height="360">
<BaseURL>ElephantsDream_H264BPL30_0100.264.dash</BaseURL>
</Representation>
<Representation id="3" bandwidth="175000" width="480" height="360">
<BaseURL>ElephantsDream_H264BPL30_0175.264.dash</BaseURL>
</Representation>
<Representation id="4" bandwidth="250000" width="480" height="360">
<BaseURL>ElephantsDream_H264BPL30_0250.264.dash</BaseURL>
</Representation>
<Representation id="5" bandwidth="500000" width="480" height="360">
<BaseURL>ElephantsDream_H264BPL30_0500.264.dash</BaseURL>
</Representation>
</AdaptationSet>
</Period>
</MPD>
修改samples.java来自:
new Sample("test 2", "",
"http://dash.edgesuite.net/dash264/TestCases/1a/netflix/exMPD_BIP_TC1.mpd",
DemoUtil.TYPE_DASH_VOD, false, false),
答案 0 :(得分:0)
ExoPlayer不喜欢MPD。它实际上属于:
https://github.com/google/ExoPlayer/issues/2
虽然我真的不认为我们真的想要处理这种MPD。 MPD不提供关于每个流的初始化和索引数据的位置的任何指示。除非我遗漏了某些东西,否则这意味着玩家必须向每个URL发出无限范围请求并读取,直到找到它们为止。这真的不太理想,IMO MPD应该被修复以包含这些信息。
答案 1 :(得分:0)
(重写)
我已经能够使用当前的'dev'分支播放至少一个MPD格式文件。这是dash.js sources.json文件中的一个。
添加到Samples.java文件的参数是:
新样本(“DASH-Sintel 480p”,“uid:misc:sintel480”, “http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_5_1_with_video/Sintel/sintel_480p_heaac5_1.mpd”, DemoUtil.TYPE_DASH_VOD,false,true),