google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.7k stars 6.02k forks source link

Smooth Streaming {CustomAttributes} placeholder not supported #2478

Open alfonsoramosa opened 7 years ago

alfonsoramosa commented 7 years ago

Exoplayer 2.2.0 Device: Nexus player Android 7.1.1

Exoplayer is not working with some Smooth Streaming manifests. That's happening when the Url for a StreamIndex has a CustomAttributes placeholder. This placeholder is not replaced with a value.

Manifest example:

<StreamIndex Type="audio" QualityLevels="3" TimeScale="10000000" Language="multiple" Name="audio_0" Chunks="21" Url="QualityLevels({bitrate},{CustomAttributes})/Fragments(audio_0={start_time})">
  <QualityLevel Index="0" Bitrate="48000" CodecPrivateData="1190" SamplingRate="48000" Channels="2" BitsPerSample="0" PacketSize="4" AudioTag="255" FourCC="AACL">
    <CustomAttributes>
      <Attribute Name="Language" Value="eng"/>
    </CustomAttributes>
  </QualityLevel>
  <QualityLevel Index="1" Bitrate="128000" CodecPrivateData="1190" SamplingRate="48000" Channels="2" BitsPerSample="0" PacketSize="4" AudioTag="255" FourCC="AACL">
    <CustomAttributes>
      <Attribute Name="Language" Value="eng"/>
    </CustomAttributes>
  </QualityLevel>
  <QualityLevel Index="2" Bitrate="192000" CodecPrivateData="1190" SamplingRate="48000" Channels="2" BitsPerSample="0" PacketSize="4" AudioTag="255" FourCC="AACL">
    <CustomAttributes>
      <Attribute Name="Language" Value="eng"/>
    </CustomAttributes>
  </QualityLevel> 
...
</StreamIndex>
ojw28 commented 7 years ago

Please feel free to send a pull request to dev-v2 to fix this.