Unable to stream DASH from Wowza Streaming Engine
I setup a Wowza server streaming MPEG-DASH with the default settings. I am receiving it on an Android device with the ExoPlayer demo where I have added the url to the Samples.java class as a TYPE_DASH. The mpd being received looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:xlink="http://www.w3.org/1999/xlink"
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"
type="dynamic"
minimumUpdatePeriod="PT5.785S"
availabilityStartTime="2015-09-22T18:50:41Z"
timeShiftBufferDepth="PT49.6S"
suggestedPresentationDelay="PT15.0S"
minBufferTime="PT6.0S">
<ProgramInformation>
<Title>AXIS170.stream</Title>
</ProgramInformation>
<Location>http://172.16.120.75:1935/live/_definst_/AXIS170.stream/manifest_mvnumber_w139871429.mpd</Location>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" mimeType="video/mp4" width="1280" height="720" par="16:9" frameRate="25" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<SegmentTemplate presentationTimeOffset="0" timescale="90000" duration="900000" startNumber="387" media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cn$Number$_w139871429_mpd.m4s" initialization="chunk_ctvideo_cfm4s_rid$RepresentationID$_cinit_w139871429_mpd.m4s"/>
<Representation id="p0a0r0" codecs="avc1.420029" sar="1:1" bandwidth="5956000" />
</AdaptationSet>
</Period>
</MPD>
When I attempt to start the stream in the demo app, I get the following in logcat:
09-25 10:41:28.367 28157-28157/? I/art﹕ Late-enabling -Xcheck:jni
09-25 10:41:28.491 28157-28157/com.google.android.exoplayer.demo W/VideoCapabilities﹕ Unrecognized profile 2130706433 for video/avc
09-25 10:41:28.514 28157-28157/com.google.android.exoplayer.demo I/VideoCapabilities﹕ Unsupported profile 4 for video/mp4v-es
09-25 10:41:28.526 28157-28187/com.google.android.exoplayer.demo D/OpenGLRenderer﹕ Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-25 10:41:28.534 28157-28157/com.google.android.exoplayer.demo D/Atlas﹕ Validating map...
09-25 10:41:28.576 28157-28187/com.google.android.exoplayer.demo I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 01/14/15, ab0075f, Id3510ff6dc
09-25 10:41:28.577 28157-28187/com.google.android.exoplayer.demo I/OpenGLRenderer﹕ Initialized EGL, version 1.4
09-25 10:41:28.598 28157-28187/com.google.android.exoplayer.demo D/OpenGLRenderer﹕ Enabling debug mode 0
09-25 10:41:56.775 28157-28157/com.google.android.exoplayer.demo I/ExoPlayerImpl﹕ Init 1.4.2
09-25 10:41:56.783 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ start [0]
09-25 10:41:56.784 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.00, false, P]
09-25 10:41:56.791 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.01, true, P]
09-25 10:41:56.907 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ seekRange [ 0, 1443192116896000, 1443192142792000]
09-25 10:41:56.909 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.13, true, B]
09-25 10:41:56.939 28157-28766/com.google.android.exoplayer.demo I/OMXClient﹕ Using client-side OMX mux.
09-25 10:41:56.954 28157-28187/com.google.android.exoplayer.demo D/OpenGLRenderer﹕ endAllStagingAnimators on 0xb49b5300 (ListView) with handle 0xaec2cfd0
09-25 10:41:56.961 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.18, 677, 0.00, 1083200]
09-25 10:41:56.961 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ videoFormat [0.18, p0a0r0, 1]
09-25 10:41:57.028 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.24, 76, 0.10, 1083200]
09-25 10:41:57.029 28157-28762/com.google.android.exoplayer.demo E/LoadTask﹕ Unexpected exception loading stream
java.lang.IllegalStateException: Top bit not zero: -75076534005757
at com.google.android.exoplayer.util.ParsableByteArray.readUnsignedLongToLong(ParsableByteArray.java:253)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.parseSidx(FragmentedMp4Extractor.java:563)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.onLeafAtomRead(FragmentedMp4Extractor.java:258)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.readAtomPayload(FragmentedMp4Extractor.java:243)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:164)
at com.google.android.exoplayer.chunk.ChunkExtractorWrapper.read(ChunkExtractorWrapper.java:93)
at com.google.android.exoplayer.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:153)
at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
09-25 10:41:57.083 28157-28157/com.google.android.exoplayer.demo D/EventLogger﹕ decoderInitialized [0.30, OMX.qcom.video.decoder.avc]
09-25 10:41:57.084 28157-28157/com.google.android.exoplayer.demo E/EventLogger﹕ internalError [0.30, loadError]
com.google.android.exoplayer.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalStateException: Top bit not zero: -75076534005757
at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:222)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IllegalStateException: Top bit not zero: -75076534005757
at com.google.android.exoplayer.util.ParsableByteArray.readUnsignedLongToLong(ParsableByteArray.java:253)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.parseSidx(FragmentedMp4Extractor.java:563)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.onLeafAtomRead(FragmentedMp4Extractor.java:258)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.readAtomPayload(FragmentedMp4Extractor.java:243)
at com.google.android.exoplayer.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:164)
at com.google.android.exoplayer.chunk.ChunkExtractorWrapper.read(ChunkExtractorWrapper.java:93)
at com.google.android.exoplayer.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:153)
at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
I have been able to play this stream using other players such as Akamai Dash Diagnostic and the Bitdash Manifest Test.
I have found an example of an mpd on the DASH Industry Forum that works with the ExoPlayer demo. It looks like this:
<?xml version="1.0" encoding="utf-8"?>
<MPD availabilityStartTime="1970-01-01T00:00:00Z" maxSegmentDuration="PT2S" minBufferTime="PT2S" minimumUpdatePeriod="P100Y" profiles="urn:mpeg:dash:profile:isoff-live:2011,urn:com:dashif:dash264" timeShiftBufferDepth="PT5M" type="dynamic" ns1:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance">
<ProgramInformation>
<Title>Media Presentation Description by MobiTV. Powered by MDL Team@Sweden.</Title>
</ProgramInformation>
<BaseURL>http://vm2.dashif.org/livesim/testpic_2s/</BaseURL>
<Period id="p0" start="PT0S">
<AdaptationSet contentType="audio" lang="eng" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
<SegmentTemplate duration="2" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s" startNumber="0" />
<Representation audioSamplingRate="48000" bandwidth="48000" codecs="mp4a.40.2" id="A48">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
</Representation>
</AdaptationSet>
<AdaptationSet contentType="video" maxFrameRate="60/2" maxHeight="360" maxWidth="640" mimeType="video/mp4" minHeight="360" minWidth="640" par="16:9" segmentAlignment="true" startWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
<SegmentTemplate duration="2" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s" startNumber="0" />
<Representation bandwidth="300000" codecs="avc1.64001e" frameRate="60/2" height="360" id="V300" sar="1:1" width="640" />
</AdaptationSet>
</Period>
</MPD>
I have tried 2 changes to ExoPlayer to try and fix this. First, I made the MediaPresentationDescriptionParser pass the video dimensions and framerate down from the AdaptationSet to the Representation, since that is where those parameters are in the working mpd I found. So when the Representation is built it has the correct width, height and framerate values. This did not help.
Next, I tried making the seekRange match up for both, as these use unix epoch time in microseconds, and I noticed the stream from the Wowza server had values 0, and 20042000, which are both many years before now. However adjusting these numbers to where they should be also didn't help.
I'm not sure where to go from here. Any help is appreciated! Thanks
A crash there indicates that the media itself is malformed. Specifically, that there are malformed (or in some way unusual?) SIDX boxes in the media chunks.
I thought that as well at first, but the same stream (using the same url) DOES work with other players. Is it possible ExoPlayer is handling the location redirect parameter incorrectly? I believe this parameter is filled with a new url that should be used instead of the original when getting the next chunk of video.
The stack trace shows that the player is successfully loading media chunks from somewhere, and that the media they contain is malformed. Perhaps the other players you mention are just skipping the sidx box, rather than parsing it. Or perhaps they're just allowing the sidx box to be malformed.
You'd be best off looking at the exact content of the sidx boxes in the stream, and seeing if they're according to spec.
The working example has atomData == null so it skips all the reading of it, which is where the Wowza stream causes the exception. I tried commenting out the atom reading method calls in readAtomPayload() (readFully(), onLeafAtomRead(), onContainerAtomRead()) just to see if this would be a quick hack to fix the issue, but now the EventLogger is telling me this:
09-25 12:47:47.384 13624-13624/com.google.android.exoplayer.demo I/art﹕ Late-enabling -Xcheck:jni
09-25 12:47:47.510 13624-13624/com.google.android.exoplayer.demo W/VideoCapabilities﹕ Unrecognized profile 2130706433 for video/avc
09-25 12:47:47.542 13624-13624/com.google.android.exoplayer.demo I/VideoCapabilities﹕ Unsupported profile 4 for video/mp4v-es
09-25 12:47:47.563 13624-13666/com.google.android.exoplayer.demo D/OpenGLRenderer﹕ Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-25 12:47:47.571 13624-13624/com.google.android.exoplayer.demo D/Atlas﹕ Validating map...
09-25 12:47:47.599 13624-13666/com.google.android.exoplayer.demo I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 01/14/15, ab0075f, Id3510ff6dc
09-25 12:47:47.600 13624-13666/com.google.android.exoplayer.demo I/OpenGLRenderer﹕ Initialized EGL, version 1.4
09-25 12:47:47.611 13624-13666/com.google.android.exoplayer.demo D/OpenGLRenderer﹕ Enabling debug mode 0
09-25 12:47:50.678 13624-13624/com.google.android.exoplayer.demo I/ExoPlayerImpl﹕ Init 1.4.2
09-25 12:47:50.689 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ start [0]
09-25 12:47:50.693 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.00, false, P]
09-25 12:47:50.701 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.01, true, P]
09-25 12:47:50.809 13624-13666/com.google.android.exoplayer.demo D/OpenGLRenderer﹕ endAllStagingAnimators on 0xb49b5300 (ListView) with handle 0xaec2cf90
09-25 12:47:50.813 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ seekRange [ 0, 1443199680792000, 1443199700584000]
09-25 12:47:50.814 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.12, true, B]
09-25 12:47:50.814 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.12, 677, 0.01, 902666]
09-25 12:47:50.851 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.16, 677, 0.04, 150444]
09-25 12:47:50.893 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.20, 677, 0.04, 150444]
09-25 12:47:50.931 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.24, 677, 0.03, 150444]
09-25 12:47:50.971 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.28, 677, 0.03, 159294]
09-25 12:47:51.011 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.32, 677, 0.03, 159294]
09-25 12:47:51.052 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.36, 677, 0.03, 159294]
09-25 12:47:51.103 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.41, 677, 0.04, 159294]
09-25 12:47:51.151 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.46, 677, 0.04, 159294]
09-25 12:47:51.201 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.51, 677, 0.04, 154742]
09-25 12:47:51.236 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.55, 677, 0.04, 154742]
09-25 12:47:51.282 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.59, 677, 0.04, 154742]
09-25 12:47:51.332 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.64, 677, 0.04, 154742]
09-25 12:47:51.371 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.68, 677, 0.03, 154742]
09-25 12:47:51.413 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.72, 677, 0.04, 154742]
09-25 12:47:51.466 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.78, 677, 0.05, 150444]
09-25 12:47:51.512 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.82, 677, 0.04, 154742]
09-25 12:47:51.554 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.87, 677, 0.04, 150444]
09-25 12:47:51.602 13624-13624/com.google.android.exoplayer.demo D/EventLogger﹕ bandwidth [0.91, 677, 0.04, 150444]
...and so on and so on... But the video never leaves the "buffering" state and it never starts playing
If this is a video only live stream you may be hitting #758.
I believe this is indeed the issue. What do you foresee the timeline being for the fix?
No ETA as of now. It's one of a couple of annoying niggles that we plan to fix but are relatively low priority because they don't relate to primary use cases (which typically involve audio as well as video). Let's use #758 to track, in any case. Thanks!
I had the same problem but a change on Wowza solved this issue on DASH videos.
Hi @Mariovc....what is the change on Wowza side u did to make this video work...help would be much appreciated
@ranithsachin This problem happened on Wowza 4.4.0.1 and if you update to the latest version this will be solved.
On 4.4.0.1 (old version): We have run an analysis on Wowza packetizer and we have found that all frames (I,P and B) are tagged as SYNC frames (sample_flags). In our opinion only I frames have to be tagged on that way.
@Mariovc Thank you...