I'm segmenting the video capture of the desktop using ffmpeg -segment and sending them over network in order to be served to clients and to be played using dash.js. The problem is that the player is searching for the initialization segment and i don't seem to be able to figure out how to create it.
I create the segments using this ffmpeg command:
ffmpeg -rtbufsize 1500M -f dshow -r 15 -i video="UScreenCapture"
-flags +global_header -vcodec libvpx -crf 10 -quality good -keyint_min 15 -g 15
-cpu-used 3 -b:v 1000k -qmin 10 -qmax 42 -threads 2 -vf scale=-1:480 -bufsize 1
500 -map 0 -f stream_segment -segment_time 2 -segment_format webm http://localho
st:3000/stream/22/%03d
The manifest that i create for the stream looks something like this:
<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 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="dynamic" availabilityStartTime="2014-06-19T07:47:40.079Z" minBufferTime="PT0S" profiles="urn:mpeg:dash:profile:isoff-live:2011" suggestedPresentationDelay="PT40S" maxSegmentDuration="PT2.000S" minimumUpdatePeriod="PT1000M">
<Period id="1" bitstreamSwitching="true" start="PT0S">
<AdaptationSet mimeType="video/webm" segmentAlignment="true" startWithSAP="1" maxWidth="1280" maxHeight="720" maxFrameRate="15">
<ContentComponent id="1" contentType="video"/>
<SegmentTemplate presentationTimeOffset="0" timescale="90000" media="$Number$/" duration="180000" startNumber="0"/>
<Representation id="1" width="853" height="480" frameRate="15" bandwidth="1000000" codecs="vp8"/>
</AdaptationSet>
</Period>
</MPD>
The player debugging mode prints the following things:
Getting the request for time: 0 dash.all.js:2073
Index for time 0 is 0 dash.all.js:2073
Waiting for more video buffer before starting playback. dash.all.js:2073
BufferController video seek: 0 dash.all.js:2073
Marking a special seek for initial video playback. dash.all.js:2073
Start searching for initialization. dash.all.js:2073
Perform init search: stream/22/ dash.all.js:2073
Getting the request for time: 0 dash.all.js:2073
Index for time 0 is 0 dash.all.js:2073
Data changed - loading the video fragment for time: 0 dash.all.js:2073
Getting the request for time: 0
How can i create the initialization segment for the generated segments? I can't seem to be able to get it to work.