【问题标题】:AWS MediaConvert DASH mpd file doesn't play on Android ExoplayerAWS MediaConvert DASH mpd 文件无法在 Android Exoplayer 上播放
【发布时间】:2021-11-27 03:11:15
【问题描述】:

我有一个从 AWS Media Convert 生成的 mpd 文件。这个 mpd 文件在 VLC 中工作,所以我知道它是一个有效文件,但它不适用于 Exoplayer 2.15.1。视频播放,但音频不存在。

这是我生成的文件:

    <?xml version="1.0" encoding="UTF-8"?>
    <MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="static" minBufferTime="PT30S" profiles="urn:mpeg:dash:profile:isoff-main:2011" mediaPresentationDuration="PT18M42.721S">
      <Period start="PT0S" duration="PT18M42.721S" id="1">
        <AdaptationSet mimeType="video/mp4" frameRate="30000/1001" segmentAlignment="true" subsegmentAlignment="true" startWithSAP="1" subsegmentStartsWithSAP="1" bitstreamSwitching="false">
          <Representation id="1" width="1920" height="1080" bandwidth="8500000" codecs="avc1.640028">
            <BaseURL>balance-and-strength_1080.mp4</BaseURL>
            <SegmentBase indexRange="759-5286">
              <Initialization range="0-758"/>
            </SegmentBase>
          </Representation>
          <Representation id="2" width="1280" height="720" bandwidth="6500000" codecs="avc1.640028">
            <BaseURL>balance-and-strength_720.mp4</BaseURL>
            <SegmentBase indexRange="757-5284">
              <Initialization range="0-756"/>
            </SegmentBase>
          </Representation>
          <Representation id="3" width="960" height="540" bandwidth="3500000" codecs="avc1.640028">
            <BaseURL>balance-and-strength_540.mp4</BaseURL>
            <SegmentBase indexRange="757-5284">
              <Initialization range="0-756"/>
            </SegmentBase>
          </Representation>
          <Representation id="4" width="640" height="360" bandwidth="1200000" codecs="avc1.4d401f">
            <BaseURL>balance-and-strength_360.mp4</BaseURL>
            <SegmentBase indexRange="751-5278">
              <Initialization range="0-750"/>
            </SegmentBase>
          </Representation>
          <Representation id="5" width="640" height="360" bandwidth="600000" codecs="avc1.4d401f">
            <BaseURL>balance-and-strength_360_low.mp4</BaseURL>
            <SegmentBase indexRange="751-5278">
              <Initialization range="0-750"/>
            </SegmentBase>
          </Representation>
        </AdaptationSet>
        <AdaptationSet mimeType="audio/mp4" lang="eng" segmentAlignment="0">
          <Representation id="6" bandwidth="96000" audioSamplingRate="48000" codecs="mp4a.40.5">
            <BaseURL>balance-and-strength_96kbps.mp4</BaseURL>
            <SegmentBase indexRange="661-5188">
              <Initialization range="0-660"/>
            </SegmentBase>
          </Representation>
        </AdaptationSet>
        <AdaptationSet mimeType="audio/mp4" lang="eng" segmentAlignment="0">
          <Representation id="7" bandwidth="64000" audioSamplingRate="48000" codecs="mp4a.40.5">
            <BaseURL>balance-and-strength_64kbps.mp4</BaseURL>
            <SegmentBase indexRange="661-5188">
              <Initialization range="0-660"/>
            </SegmentBase>
          </Representation>
        </AdaptationSet>
      </Period>
    </MPD>

这是我发现在 Exoplayer 中工作的示例 mpd 文件:

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" availabilityStartTime="1970-01-01T00:00:00Z" id="Config part of url maybe?" maxSegmentDuration="PT8S" minBufferTime="PT1S" minimumUpdatePeriod="P100Y" profiles="urn:mpeg:dash:profile:full:2011,http://www.dashif.org/guidelines/low-latency-live-v5" publishTime="2021-10-06T22:33:51Z" timeShiftBufferDepth="PT5M" type="dynamic">
   <BaseURL>https://livesim.dashif.org/livesim/sts_1633559631/sid_7e7964ba/chunkdur_1/ato_7/testpic4_8s/</BaseURL>
   <ServiceDescription id="0">
      <Latency max="6000" min="2000" referenceId="0" target="4000" />
      <PlaybackRate max="1.04" min="0.96" />
   </ServiceDescription>
   <Period id="p0" start="PT0S">
      <AdaptationSet contentType="audio" lang="eng" segmentAlignment="true">
         <ProducerReferenceTime id="0" presentationTime="0" type="encoder" wallClockTime="1970-01-01T00:00:00">
            <UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="http://time.akamai.com/?iso" />
         </ProducerReferenceTime>
         <SegmentTemplate availabilityTimeComplete="false" availabilityTimeOffset="7.000000" duration="384000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s" startNumber="0" timescale="48000" />
         <Representation audioSamplingRate="48000" bandwidth="36997" codecs="mp4a.40.2" id="A48" mimeType="audio/mp4" startWithSAP="1">
            <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
         </Representation>
      </AdaptationSet>
      <AdaptationSet contentType="video" maxFrameRate="30" maxHeight="720" maxWidth="1280" par="16:9" segmentAlignment="true">
         <ProducerReferenceTime id="0" presentationTime="0" type="encoder" wallClockTime="1970-01-01T00:00:00">
            <UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="http://time.akamai.com/?iso" />
         </ProducerReferenceTime>
         <SegmentTemplate availabilityTimeComplete="false" availabilityTimeOffset="7.000000" duration="122880" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s" startNumber="0" timescale="15360" />
         <Representation bandwidth="303780" codecs="avc1.64001e" frameRate="30" height="360" id="V300" mimeType="video/mp4" sar="1:1" startWithSAP="1" width="640" />
         <Representation bandwidth="603844" codecs="avc1.64001e" frameRate="30" height="360" id="V600" mimeType="video/mp4" sar="1:1" startWithSAP="1" width="640" />
         <Representation bandwidth="1203833" codecs="avc1.64001f" frameRate="30" height="540" id="V1200" mimeType="video/mp4" sar="1:1" startWithSAP="1" width="960" />
         <Representation bandwidth="2403767" codecs="avc1.64001f" frameRate="30" height="720" id="V2400" mimeType="video/mp4" sar="1:1" startWithSAP="1" width="1280" />
      </AdaptationSet>
   </Period>
   <UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="http://time.akamai.com/?iso" />
</MPD>

在我询问如何让 MediaConvert 以不同方式生成 mpd 之前,有没有人有这方面的经验或知道关键区别可能是什么?

【问题讨论】:

    标签: android exoplayer exoplayer2.x aws-media-convert


    【解决方案1】:

    这可能是特定于玩家的问题或怪癖。我建议在 Exoplayer 的未决问题列表中搜索任何相关的已知问题。

    如果您的目标是生成专门在 Exoplayer 上运行的清单,那么我建议找到一些可以正确播放的示例清单并探索 DASH 的 MediaConvert 配置选项。运行一些简短的实验可能会产生在 Exoplayer 上播放的清单。我建议测试 v+a 复用在一起的 Adaptation 集以及它们分开的 Set。

    【讨论】:

      猜你喜欢
      • 2017-06-20
      • 2019-09-28
      • 2012-11-20
      • 1970-01-01
      • 1970-01-01
      • 2015-10-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多