2017-05-08 4 views
1

MPD 파일의 세그먼트 지속 시간을 지정할 수 있습니까? 지정하지 않으면 비디오 기간과 mp4 비디오의 인덱스 범위가 지정됩니까? 예를 들어, 아래와 같이 MPD 파일 (http://dash.edgesuite.net/akamai/streamroot/050714/Spring_4Ktest.mpd) :DASH MPD의 세그먼트 지속 시간

<?xml version="1.0"?> 
<!-- MPD file Generated with GPAC version 0.5.1-DEV-rev5208 on 2014-05-08T15:14:47Z--> 
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500000S" type="static" mediaPresentationDuration="PT0H2M45.76S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011"> 
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net"> 
    <Title>Spring_3000k_dash.mpd generated by GPAC</Title> 
</ProgramInformation> 

<Period id="" duration="PT0H2M45.76S"> 
    <AdaptationSet segmentAlignment="true" maxWidth="3840" maxHeight="2160" maxFrameRate="24000/1001" par="16:9" subsegmentStartsWithSAP="1"> 
    <Representation id="1" mimeType="video/mp4" codecs="avc1.640033" width="1280" height="720" frameRate="24000/1001" sar="1:1" startWithSAP="1" bandwidth="2859078"> 
    <BaseURL>Spring_3000k_track1_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="896-1419"/> 
    </Representation> 
    <Representation id="2" mimeType="video/mp4" codecs="avc1.640033" width="1920" height="1080" frameRate="24000/1001" sar="1:1" startWithSAP="1" bandwidth="4872811"> 
    <BaseURL>Spring_5000k_track1_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="896-1419"/> 
    </Representation> 
    <Representation id="3" mimeType="video/mp4" codecs="avc1.640033" width="2880" height="1620" frameRate="24000/1001" sar="1:1" startWithSAP="1" bandwidth="7322004"> 
    <BaseURL>Spring_7500k_track1_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="897-1420"/> 
    </Representation> 
    <Representation id="4" mimeType="video/mp4" codecs="avc1.640033" width="3840" height="2160" frameRate="24000/1001" sar="1:1" startWithSAP="1" bandwidth="9604428"> 
    <BaseURL>Spring_10000k_track1_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="896-1419"/> 
    </Representation> 
    <Representation id="5" mimeType="video/mp4" codecs="avc1.640033" width="3840" height="2160" frameRate="24000/1001" sar="1:1" startWithSAP="1" bandwidth="14658452"> 
    <BaseURL>Spring_15000k_track1_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="896-1419"/> 
    </Representation> 
    <Representation id="6" mimeType="video/mp4" codecs="avc1.640033" width="3840" height="2160" frameRate="24000/1001" sar="1:1" startWithSAP="1" bandwidth="19683583"> 
    <BaseURL>Spring_20000k_track1_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="896-1419"/> 
    </Representation> 
    </AdaptationSet> 
    <AdaptationSet segmentAlignment="true" subsegmentStartsWithSAP="1"> 
    <Representation id="7" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="193664"> 
    <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> 
    <BaseURL>Spring_3000k_track2_dashinit.mp4</BaseURL> 
    <SegmentBase indexRangeExact="true" indexRange="823-1262"/> 
    </Representation> 
    </AdaptationSet> 
</Period> 
</MPD> 

대단히 감사합니다!

샤인

답변

2

이이 경우에 MPD 파일에서 세그먼트 정보를 검색 할 기회가없는 것 같다. mp4 파일을 분석하면됩니다. 다음은 "Spring_3000k_track1_dashinit.mp4"에 대한 분석 스 니펫입니다.

0  24 ftyp 
    24  8 free 
    2c  3b free 
    67  319 moov 
380  20c sidx 
58c  354 moof 
8e0 152f01 mdat 
... 

및 (896-1914 즉 "0x380"의 범위에있는 - "0x58b") "sidx"의 데이터 :

Box type : sidx 
Box version : 0 
reference_ID : 1 
timescale : 24000 
earliest_presentation_time : 0 
first_offset : 0 
Entries : size = 41 
- [0] 
reference_type : 0 
referenced_size : 1389141 
subsegment_duration : 96096 
starts_with_SAP : 1 
SAP_type : 4 
SAP_delta_time : 0 
- [1] 
reference_type : 0 
referenced_size : 1422268 
subsegment_duration : 96096 
starts_with_SAP : 1 
SAP_type : 4 
SAP_delta_time : 0 
... 

그래서 영상과 41 개 개의 세그먼트가 세그먼트 지속 시간은 4 초 (subsegment_duration/timescale)입니다. 교차 점검 : 41 * 4 = 164 ~ 2M45.76S (비디오 지속 시간).