Exoplayer 杜比播放动态广告插入问题

问题描述 投票:0回答:1

我正在使用 Exoplayer 2.18.1(在 firetv 4k 上)播放支持 DAI 的 DASH 流,其中多周期清单与广告周期缝合在一起。广告时段有时会有杜比(立体声或 5.1)音轨,当播放从直播切换到广告时,我们会看到一些视频冻结,然后在广告结束时完全播放冻结。此时

adb logcat
显示以下
spurious audio timestamp
相关日志:

09-21 17:34:57.312 19192 23498 W AudioTrack: Spurious audio timestamp (frame position mismatch): 28270119, 10923744015, 10923743917, 189528000, 9827328, 9827328
09-21 17:34:57.816 19192 23498 W AudioTrack: Spurious audio timestamp (frame position mismatch): 28294325, 10924248296, 10924248198, 189528000, 9827328, 9827328
09-21 17:34:58.211 19192 19231 V SessionStateManager: 2022-09-21 17:34:58,211 - Thread: [main] - player time 1663761496000ms program start time 1663759800000ms media session time 1696000ms
09-21 17:34:58.211 19192 19231 V SessionStateManager: 2022-09-21 17:34:58,211 - Thread: [main] - com.mobitv.client.connect.core.media.session.MobiMediaSession@34d0ee4 set media session playback state to PLAYING time 1696000ms
09-21 17:34:58.211 19192 19231 V SessionStateManager: 2022-09-21 17:34:58,211 - Thread: [main] - setting playback state PlaybackState {state=3, position=1696000, buffered position=0, speed=1.0, updated=10924643, actions=8963, error code=0, error message=null, custom actions=[], active item id=-1}
09-21 17:34:58.213   739   932 V Avrcp   : MediaController playback changed: PlaybackState {state=3, position=1696000, buffered position=0, speed=1.0, updated=10924643, actions=8963, custom actions=[], active item id=-1, error=null}
09-21 17:34:58.322 19192 23498 W AudioTrack: Spurious audio timestamp (frame position mismatch): 28318587, 10924753767, 10924753671, 189528000, 9827328, 9827328 

需要注意的一件有趣的事情是,该广告在单独播放时效果很好,即像 DASH VoD 资产一样,但与 DASH 直播时段拼接时效果不佳。

来自缝合清单的更多信息可能会有所帮助。直播期间包含 1 个视频和 1 个音轨:

<Representation id="L_5000_W" codecs="avc1.64001f" bandwidth="5120000" width="1280" height="720" frameRate="60/2" sar="1:1">
 <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Time$.m4s" timescale="90000" presentationTimeOffset="150764576748000">
    ...
 </SegmentTemplate>
</Representation>

<Representation id="L_384_ENG" codecs="ac-3" bandwidth="384000" audioSamplingRate="48000">
 <AudioChannelConfiguration schemeIdUri="tag:dolby.com,2014:dash:audio_channel_configuration:2011" value="F801"/>
  <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Time$.m4s" timescale="48000" presentationTimeOffset="80407774265537">
     ...
  </SegmentTemplate>
</Representation>

广告期也包含 1 个视频和 1 个音轨:

<Representation id="A_5000_W" codecs="avc1.4d4028" bandwidth="5120000" width="1920" height="1080" frameRate="60/2" sar="1:1">
 <SegmentTemplate initialization="/prod-ad-1/$RepresentationID$/init.mp4" media="/prod-ad-1/$RepresentationID$/$Number$.m4s" timescale="90000" startNumber="1">
   ...             
 </SegmentTemplate>
</Representation>

<Representation id="A_384_ENG" codecs="ac-3" bandwidth="384000" audioSamplingRate="48000">
 <AudioChannelConfiguration schemeIdUri="tag:dolby.com,2014:dash:audio_channel_configuration:2011" value="F801"/>
   <SegmentTemplate initialization="/prod-ad-1/$RepresentationID$/init.mp4" media="/prod-ad-1/$RepresentationID$/$Number$.m4s" timescale="48000" startNumber="1">
     ...
   </SegmentTemplate>
</Representation>

到目前为止,我正在努力了解此播放问题的确切原因。任何人都可以帮助理解这个问题吗?

编辑:采用 Fire OS 6.2.9.3 (NS6293/4731) 的 FireTV 棒 4K

android exoplayer interstitial mpeg-dash amazon-fire-tv
1个回答
0
投票

尝试使用连接媒体项的工厂包装您的媒体源。有

MergingMediaSource
ConcatenatingMediaSource
等选项。第一个适用于 adMob 广告,但当服务器在 uri 媒体播放列表中添加广告时,我必须使用后一个。

mediaSource = ConcatenatingMediaSource(
  mediaSource!!,
  *mediaSourceList.toTypedArray()
)
© www.soinside.com 2019 - 2024. All rights reserved.