Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShakaPackager v3 doesn't generate <BaseURL> in MPEG-DASH manifest so that ShakaPlayer cannot play video completely. #1378

Closed
dev-platong opened this issue Mar 22, 2024 · 0 comments · Fixed by #1380 or #1377
Assignees
Labels
priority: P0 Broken for everyone; no workaround; urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@dev-platong
Copy link

dev-platong commented Mar 22, 2024

System info

Operating System: Mac OS 13.1(22C65)x64 and arm64. I had compared behaviour by x64 because packager for arm64 only version after 3.0.2.
Shaka Packager Version: 3.0.0 later.

This problem doesn't occurred by 2.6.1.

Issue and steps to reproduce the problem

Packager Command:

any mp4 videos works.

packager \
  in=big_buck_bunny_720p_surround.mp4,stream=audio,output=audio.mp4 \
  in=big_buck_bunny_720p_surround.mp4,stream=video,output=video.mp4 \
  --enable_widevine_encryption \
  --key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test \
  --content_id 7465737420636f6e74656e74206964 \
  --signer widevine_test \
  --aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9 \
  --aes_signing_iv d58ce954203b7c9a9a9d467f59839249 \
  --mpd_output manifest.mpd \

What is the expected result?

Ideal result by 2.6.1.

<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/google/shaka-packager version v2.6.1-634af65-release-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT596.4583129882812S">
  <Period id="0">
    <AdaptationSet id="0" contentType="video" width="640" height="360" frameRate="12288/512" subsegmentAlignment="true" par="16:9">
      <ContentProtection value="cenc" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="abba271e-8bcf-552b-bd2e-86a434a9a5d9"/>
      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAN3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABciD3Rlc3QgY29udGVudCBpZEjj3JWbBg==</cenc:pssh>
      </ContentProtection>
      <ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b">
        <cenc:pssh>AAAAdHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAWruicei89VK70uhqQ0qaXZbXbyXLF/Xha46u9rv1gtjmR4YzefQVQQg3fnTG7A47j9zD1hbtxc6pslWFgdnNOP88XgNh5mVLKPgEnHeLI5RgAAAAA=</cenc:pssh>
      </ContentProtection>
      <Representation id="0" bandwidth="916644" codecs="avc1.42c01e" mimeType="video/mp4" sar="1:1">
        <BaseURL>video.mp4</BaseURL>
        <SegmentBase indexRange="1215-2218" timescale="12288">
          <Initialization range="0-1214"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
    <AdaptationSet id="1" contentType="audio" subsegmentAlignment="true">
      <ContentProtection value="cenc" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="f3c5e036-1e66-54b2-8f80-49c778b23946"/>
      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAN3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABciD3Rlc3QgY29udGVudCBpZEjj3JWbBg==</cenc:pssh>
      </ContentProtection>
      <ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b">
        <cenc:pssh>AAAAdHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAWruicei89VK70uhqQ0qaXZbXbyXLF/Xha46u9rv1gtjmR4YzefQVQQg3fnTG7A47j9zD1hbtxc6pslWFgdnNOP88XgNh5mVLKPgEnHeLI5RgAAAAA=</cenc:pssh>
      </ContentProtection>
      <Representation id="1" bandwidth="132694" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>audio.mp4</BaseURL>
        <SegmentBase indexRange="1129-2360" timescale="44100">
          <Initialization range="0-1128"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

What happens instead?

But packager 3 omit <BaseURL>. so player cannot identify video and audio files.

<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/shaka-project/shaka-packager version 34dcf3b-release-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT596.458313S">
  <Period id="0">
    <AdaptationSet id="0" contentType="audio" subsegmentStartsWithSAP="1" subsegmentAlignment="true">
      <ContentProtection value="cenc" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="f3c5e036-1e66-54b2-8f80-49c778b23946"/>
      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAN3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABciD3Rlc3QgY29udGVudCBpZEjj3JWbBg==</cenc:pssh>
      </ContentProtection>
      <ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b">
        <cenc:pssh>AAAAdHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAWruicei89VK70uhqQ0qaXZbXbyXLF/Xha46u9rv1gtjmR4YzefQVQQg3fnTG7A47j9zD1hbtxc6pslWFgdnNOP88XgNh5mVLKPgEnHeLI5RgAAAAA=</cenc:pssh>
      </ContentProtection>
      <Representation id="0" bandwidth="132694" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <SegmentBase indexRange="1129-2360" timescale="44100">
          <Initialization range="0-1128"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
    <AdaptationSet id="1" contentType="video" width="640" height="360" frameRate="12288/512" subsegmentAlignment="true" par="16:9">
      <ContentProtection value="cenc" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="abba271e-8bcf-552b-bd2e-86a434a9a5d9"/>
      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAN3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABciD3Rlc3QgY29udGVudCBpZEjj3JWbBg==</cenc:pssh>
      </ContentProtection>
      <ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b">
        <cenc:pssh>AAAAdHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAWruicei89VK70uhqQ0qaXZbXbyXLF/Xha46u9rv1gtjmR4YzefQVQQg3fnTG7A47j9zD1hbtxc6pslWFgdnNOP88XgNh5mVLKPgEnHeLI5RgAAAAA=</cenc:pssh>
      </ContentProtection>
      <Representation id="1" bandwidth="916644" codecs="avc1.42c01e" mimeType="video/mp4" sar="1:1">
        <SegmentBase indexRange="1215-2218" timescale="12288">
          <Initialization range="0-1214"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

<Please attach the input files or email to shaka-packager-issues@google.com.>

@cosmin cosmin self-assigned this Mar 22, 2024
@cosmin cosmin added priority: P0 Broken for everyone; no workaround; urgent type: bug Something isn't working correctly labels Mar 22, 2024
@github-actions github-actions bot added this to the v3.0 milestone Mar 22, 2024
cosmin added a commit that referenced this issue Mar 27, 2024
The check for `!mpd_dir.empty()` is not needed because MakePathRelative
handles the case where the parent path is empty. As a result of this
check the base url, segment url, or segment template URLs were all
missing in cases where the mpd output was in the current working
directory.

Fixes #1378
joeyparrish pushed a commit that referenced this issue Mar 27, 2024
🤖 I have created a release *beep* *boop*
---


## [3.0.4](v3.0.3...v3.0.4) (2024-03-27)


### Bug Fixes

* BaseURL missing when MPD base path is empty ([#1380](#1380)) ([90c3c3f](90c3c3f)), closes [#1378](#1378)
* Fix NPM binary selection on ARM Macs ([#1376](#1376)) ([733af91](733af91)), closes [#1375](#1375)

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label May 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P0 Broken for everyone; no workaround; urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
2 participants