我有一个以多种分辨率编码的原始视频及其相关比特率:
CanalMetroLivinglab3DTV-HD-Musica_384x216.mp4
CanalMetroLivinglab3DTV-HD-Musica_640x360.mp4
CanalMetroLivinglab3DTV-HD-Musica_720x406.mp4
CanalMetroLivinglab3DTV-HD-Musica_1280x720.mp4
CanalMetroLivinglab3DTV-HD-Musica_1920x1080.mp4
我使用 GPAC MP4 Box 将这些内容分割成多个片段并创建 MPD 文件,如下所示:
MP4Box -dash 1000 -rap -segment-name %s_ -out CanalMetroLivinglab3DTV-HD-Musica.mpd ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_384x216.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_640x360.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_720x406.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_1280x720.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_1920x1080.mp4
我获得了以下清单文件:(它不完整)
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500000S" type="static" mediaPresentationDuration="PT0H0M45.02S" profiles="urn:mpeg:dash:profile:full:2011">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>
CanalMetroLivinglab3DTV-HD-Musica.mpd generated by GPAC
</Title>
</ProgramInformation>
<Period duration="PT0H0M45.02S">
<AdaptationSet segmentAlignment="true" bitstreamSwitching="true" maxWidth="1920" maxHeight="1080" maxFrameRate="25" par="16:9" lang="eng">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<ContentComponent id="1" contentType="video"/>
<ContentComponent id="2" contentType="audio"/>
<SegmentList>
<Initialization sourceURL="CanalMetroLivinglab3DTV-HD-Musica_init.mp4"/>
</SegmentList>
<Representation id="1" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="384" height="216" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="479651">...</Representation>
<Representation id="2" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="640" height="360" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="930072">...</Representation>
<Representation id="3" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="720" height="408" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="1123428">...</Representation>
<Representation id="4" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1280" height="720" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="2470344">...</Representation>
<Representation id="5" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1920" height="1080" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="4327645">
<SegmentList timescale="1000" duration="1001">
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_1.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_2.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_3.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_4.m4s"/>
...
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_42.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_43.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_44.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_45.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
但是,我有几个问题:
首先,我认为每个表示都应该有一个初始化段,它将列在 SegmentList 的第一个位置。我该怎么做?
其次,在我的例子中,所有段 (.m4s)、初始化段 (.mp4) 和清单文件 (.mpd) 都存储在服务器的同一位置。据此,它不是必需的 Base-URL 元素吗?
在我看到的其他 DASH 序列中,每个表示的所有段都存储在一个独立的文件夹中,与其关联的初始化段和该表示的清单文件一起存储。然后,有一个全球 MPD。我必须使用 MP4 Box 的哪些参数才能做到这一点?
谢谢!