2016-10-15 17 views
0

원래 라이브 프로필을 사용하여 생성되었지만 이제 재생해야하는 MPEG-DASH 비디오 세트를 다시 사용하려고합니다.GPAC MPEG-DASH 실시간 프로필 재사용 주문형 재생을위한 청크 분할 비디오

는 주위 재생의 비트는 내가 원래 단순히 우리는 또한 분명하지 않을 것입니다 비디오의 끝 부분과 같은 세부 사항을 누락 때문에 아마도 작동하지 않았다 staticdynamic에서 유형을 변경 예상했던 것보다 더 복잡한 것 같다 후 실시간 시나리오에 있지만 주문형입니다. 스트림의 전체 .mp4를 다시 빌드 한 다음 주문형으로 다시 청크 할 수 있지만이를 수행하는 것은 잘못된 방법 인 것으로 알고 있습니다. 또한 모질라 상태 here :

당신은

그래서 그것을 할 수있는 방법이 있어야 다음 단계에서 모두 실시간 전송 및 VOD에 대해 같은 미디어 파일을 사용할 수 있습니다 ...

나는이를 재생하면

<?xml version="1.0"?> 
<!-- MPD file Generated with GPAC version 0.6.2-DEV-rev135-g2dd7b95-master at 2016-04-07T11:49:25.297Z--> 
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT4.000S" type="dynamic" publishTime="2016-04-07T11:49:25Z" availabilityStartTime="2016-04-07T11:49:05.259Z" minimumUpdatePeriod="PT0H0M2.000S" maxSegmentDuration="PT0H0M4.011S" profiles="urn:mpeg:dash:profile:isoff-live:2011"> 
    <ProgramInformation moreInformationURL="http://192.168.1.103:8080/recording_29/"> 
     <Title>1</Title> 
    </ProgramInformation 
    <BaseURL>http://192.168.1.103:3000/bbc_apr16/uhd0/recording_29/</BaseURL> 

    <Period id="GENID_DEF" start="PT0H0M0.000S"> 
     <AdaptationSet segmentAlignment="true" lang="und"> 
      <SegmentTemplate timescale="90000" media="live_$RepresentationID$_$Number$.m4s" startNumber="1" duration="360000" initialization="live_$RepresentationID$_.mp4"/> 
      <Representation id="audio" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="6868"> 
       <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> 
      </Representation> 
     </AdaptationSet> 
     <AdaptationSet segmentAlignment="true" maxWidth="3840" maxHeight="2160" maxFrameRate="25" par="16:9" lang="und"> 
      <SegmentTemplate timescale="90000" media="live_$RepresentationID$_$Number$.m4s" startNumber="1" duration="360000" initialization="live_$RepresentationID$_.mp4"/> 
      <Representation id="video_2160p" mimeType="video/mp4" codecs="avc1.42c01f" width="3840" height="2160" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="31726550"> 
      </Representation> 
      <Representation id="video_720p" mimeType="video/mp4" codecs="avc1.42c01f" width="1280" height="720" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="3175420"> 
      </Representation> 
     </AdaptationSet> 
    </Period> 
</MPD> 

그대로는 RETR하려고 : 여기에 원래 방송 live.mpd에서 매니페스트 파일입니다 ieve 살아있는 파일 (분명히 존재하지 않음).

도움이 될 것입니다.

답변

0

그래, 실제로 예상보다 훨씬 간단합니다.

먼저 type="dynamic"static으로 변경해야합니다. 그러면 파일을 다시 라이브 생방송처럼 재생할 수 있습니다. 아무런 스크럽 막대도 없습니다 ...

스크럽 막대를 다시 얻으려면 mediaPresentationDuration을 설정해야합니다. 이를 설정하려면 세그먼트 수를 계산 한 다음 해당 세그먼트 시간 (예 : 4000 밀리 초)을 곱해야합니다. 그런 다음이 형식을 PT1H22M12.000S으로 지정하십시오.

그래서이 매니페스트에 우리는 (... 내 base을 또한 잘못 주) 다음 조정 된 매니페스트와 파일을 재생할 수 있습니다 :
<?xml version="1.0"?> 
<!-- MPD file Generated with GPAC version 0.6.2-DEV-rev135-g2dd7b95-master at 2016-04-07T11:49:25.297Z--> 
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT4.000S" type="static" publishTime="2016-04-07T11:49:25Z" availabilityStartTime="2016-04-07T11:49:05.259Z" minimumUpdatePeriod="PT0H0M2.000S" maxSegmentDuration="PT0H0M4.011S" profiles="urn:mpeg:dash:profile:isoff-live:2011" mediaPresentationDuration="PT1H22M12.000S"> 
    <ProgramInformation moreInformationURL="http://192.168.1.103:8080/recording_29/"> 
     <Title>1</Title> 
    </ProgramInformation> 

    <Period id="GENID_DEF" start="PT0H0M0.000S"> 
     <AdaptationSet segmentAlignment="true" lang="und"> 
      <SegmentTemplate timescale="90000" media="live_$RepresentationID$_$Number$.m4s" startNumber="1" duration="360000" initialization="live_$RepresentationID$_.mp4"/> 
      <Representation id="audio" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="6868"> 
       <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> 
      </Representation> 
     </AdaptationSet> 
     <AdaptationSet segmentAlignment="true" maxWidth="3840" maxHeight="2160" maxFrameRate="25" par="16:9" lang="und"> 
      <SegmentTemplate timescale="90000" media="live_$RepresentationID$_$Number$.m4s" startNumber="1" duration="360000" initialization="live_$RepresentationID$_.mp4"/> 
      <Representation id="video_2160p" mimeType="video/mp4" codecs="avc1.42c01f" width="3840" height="2160" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="31726550"> 
      </Representation> 
      <Representation id="video_720p" mimeType="video/mp4" codecs="avc1.42c01f" width="1280" height="720" frameRate="25" sar="1:1" startWithSAP="1" bandwidth="3175420"> 
      </Representation> 
     </AdaptationSet> 
    </Period> 
</MPD> 

나는 그 GitHub에이 모든 것을 할 수있는 작은 스크립트를 만들었습니다.