test a real-ish mpd

This commit is contained in:
Noah Levitt 2017-11-08 17:01:27 -08:00
parent e8fdf84db8
commit 133726e942
8 changed files with 71 additions and 3 deletions

Binary file not shown.

View file

@ -7,10 +7,12 @@
videos are from
http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5
-->
<video autoplay="" muted="" id="bgvid" loop="">
<video autoplay="" muted="" id="vid1" loop="">
<source src="small.webm" type="video/webm">
<source src="small.mp4" type="video/mp4">
<source src="1880000" type="video/vnd.mpeg.dash.mpd">
</video>
<video autoplay="" muted="" id="vid2" loop="">
<source src="small.mpd">
</video>
</body>
</html>

View file

@ -0,0 +1,13 @@
Steps taken to create DASH.
```
$ brew reinstall -v ffmpeg --with-libvpx
$ ffmpeg -i small.webm -c:v vp9 -f webm -dash 1 -an -vf scale=280:160 -b:v 100k -dash 1 small-video_280x160_100k.webm
$ ffmpeg -i small.webm -c:v vp9 -f webm -dash 1 -an -vf scale=140:80 -b:v 25k -dash 1 small-video_140x80_25k.webm
$ ffmpeg -i small.webm -acodec copy -vn -dash 1 small-audio.webm
$ ffmpeg -f webm_dash_manifest -i small-video_280x160_100k.webm -f webm_dash_manifest -i small-video_140x80_25k.webm -f webm_dash_manifest -i small-audio.webm -c copy -map 0 -map 1 -map 2 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1 id=1,streams=2" small.mpd
```
Don't know if the output is really correct, but youtube-dl downloads the
small.mpd, small-audio.web and small-video_280x160_100k.webm. Browser doesn't
download anything though, not even small.mpd.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,34 @@
<?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"
type="static"
mediaPresentationDuration="PT5.58S"
minBufferTime="PT1S"
profiles="urn:webm:dash:profile:webm-on-demand:2012">
<Period id="0" start="PT0S" duration="PT5.58S" >
<AdaptationSet id="0" mimeType="video/webm" codecs="vp9" bitstreamSwitching="true" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Representation id="0" bandwidth="110196" width="280" height="160">
<BaseURL>small-video_280x160_100k.webm</BaseURL>
<SegmentBase indexRange="92680-92727">
<Initialization range="0-628" />
</SegmentBase>
</Representation>
<Representation id="1" bandwidth="33389" width="140" height="80">
<BaseURL>small-video_140x80_25k.webm</BaseURL>
<SegmentBase indexRange="28316-28362">
<Initialization range="0-627" />
</SegmentBase>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" mimeType="audio/webm" codecs="vorbis" lang="eng" audioSamplingRate="48000" bitstreamSwitching="true" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Representation id="2" bandwidth="113515">
<BaseURL>small-audio.webm</BaseURL>
<SegmentBase indexRange="101066-101113">
<Initialization range="0-4714" />
</SegmentBase>
</Representation>
</AdaptationSet>
</Period>
</MPD>