shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.9k stars 496 forks source link

audioSamplingRate in representation is "0" for high sample rates #1404

Open nbilyk opened 1 month ago

nbilyk commented 1 month ago

Representations at least 96kHz have incorrect audioSamplingRate values in the Representation

      <Representation id="16" bandwidth="470315" codecs="flac" mimeType="audio/mp4" audioSamplingRate="0">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>representations/flac_60s_2ch_16bit_196000Hz.mp4</BaseURL>
        <SegmentBase indexRange="772-875" timescale="196000">
          <Initialization range="0-771"/>
        </SegmentBase>
      </Representation>

Using packager-osx-x64, tried with v2.6.1 and v3.2.0. 48kHz and 44.1kHz work without issues.

vish91 commented 3 weeks ago

are you sure its 96kHz ? from your mp4 filename it suggests its 196kHz . Can you explain the use case and paste in mediainfo output or something showing the sample rate ? the limits in packager today are upto 192kHz which is why if you have an input that is 196kHz its coming out as 0

nbilyk commented 3 weeks ago

Yes, the snippet it was 196kHz, which I actually meant to do 192kHz. The audioSamplingRate="0" is happening for 96kHz and 192kHz. I haven't tried finding the exact cutoff where it reports 0.

from media info for the 96 kHz input (the shaka mp4 output looks correct as far as I can tell): Audio: 1 018 kb/s, 96.0 kHz, 24 bits, 2 channels, FLAC

      <Representation id="9" bandwidth="1075222" codecs="flac" mimeType="audio/mp4" audioSamplingRate="0">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>representations/flac_60s_2ch_24bit_96000Hz.mp4</BaseURL>
        <SegmentBase indexRange="1010-1113" timescale="96000">
          <Initialization range="0-1009"/>
        </SegmentBase>
      </Representation>
      <Representation id="10" bandwidth="142380" codecs="flac" mimeType="audio/mp4" audioSamplingRate="44100">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>representations/flac_60s_2ch_16bit_44100Hz.mp4</BaseURL>
        <SegmentBase indexRange="1010-1113" timescale="44100">
          <Initialization range="0-1009"/>
        </SegmentBase>
      </Representation>
      <Representation id="11" bandwidth="2150059" codecs="flac" mimeType="audio/mp4" audioSamplingRate="0">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>representations/flac_60s_2ch_24bit_192000Hz.mp4</BaseURL>
        <SegmentBase indexRange="1010-1113" timescale="192000">
          <Initialization range="0-1009"/>
        </SegmentBase>
      </Representation>