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
SteveR-PMP added a commit to SteveR-PMP/shaka-packager that referenced this issue Aug 28, 2024
…ovi 8.1 (shaka-project#35)

* fix: BaseURL missing when MPD base path is empty (shaka-project#1380)

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 shaka-project#1378

* chore(main): release 3.0.4 (shaka-project#1377)

:robot: I have created a release *beep* *boop*
---


## [3.0.4](shaka-project/shaka-packager@v3.0.3...v3.0.4) (2024-03-27)


### Bug Fixes

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

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).

* build: turn on integration tests in ctest by default (shaka-project#1381)

They can still be skipped by passing `-DSKIP_INTEGRATION_TESTS=ON` for
the build configuration. Fix integration tests so they run correctly when building out of tree.

Use FindPython3 in CMake to fix build and integration tests on Windows.

* feat: teletext formatting (shaka-project#1384)

This PR adds parsing of teletext styling, and rendering of the styling
in output TTML and WebVTT subtitle tracks.

Beyond unit tests, I've used the sample
https://drive.google.com/file/d/19ZYsoeUfH85gEilQkaAdLbPhC4CxhDEh/view?usp=sharing
which has rather advanced subtitling with two separate rows at the same
time, where one is left aligned and another is right aligned. This
necessitates two parallel cues to be rendered. It also has some colored
text.

Solve shaka-project#1335.

## parse teletext styling and formatting

Extend the teletext parser to parse the teletext styling and formatting.
This includes translating rows into regions, calculating alignment
from start and stop position of the text, and extracting text and
background colors.

The colors are limited to full lines.
Both lines and regions are propagated in the TextSample structures.
This is because the number of lines may differ from different sources.
For teletext, there are 24 rows, but they are essentially always
used with double height, so the number of output lines is 12
from 0 to 11.
There are also corresponding regions are denoted "ttx_R",
where R is an integer row number. A renderer can use either
the line number or the region ID to render the text.

## ttml generation for teletext to EBU-TT-D

Add support to render teletext input in EBU-TT-D (IMSC-1) format.
This includes appropriate regions ttx_0 to ttx_11 signalled
in the TextSamples, alignment and text and background colors.

The general TTML output has been changed to always include
metadata, layout, and styling nodes, even if they are empty.

EBU-TT-D is detected by the presence of "ttx_?" regions in the
samples. If detected, extra TTML elements will be added and
the EBU-TT-D linePadding used as well.

Appropriate styles for background and text colors are generated
depending on the color and backgroundColor attributes in the
text fragments.

## adapt WebVTT output to teletext TextSample.

Teletext input generates both a region with prefix ttx_
and a floating point line number (e.g. 9.5) in the
range 0 to 11.5 (due to input 0-23 as double lines).

The output is adopted to drop such regions
and convert the line number to an integer
since the standard only used floats for percent
values but not for plain line numbers.

* feat: add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5 (shaka-project#1390)



Fixes shaka-project#1149

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>

* docs: Fix missing graphviz outputs in generated docs (shaka-project#1392)

Fixes shaka-project#1388

* feat: get start number from muxer and specify initial sequence number (shaka-project#879)

Set the start number in representation to the segment index that is sent by muxer.

With this enhancement, you can now specify the initial sequence number
to be used on the generated segments when calling the packager.
With the old implementation, it was always starting with "1".

---------

Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>

* refactor: merge Period::ProtectedAdaptationSetMap  into AdaptationSet (shaka-project#844)



---------

Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>

* chore(main): release 3.1.0 (shaka-project#1391)

:robot: I have created a release *beep* *boop*
---


##
[3.1.0](shaka-project/shaka-packager@v3.0.4...v3.1.0)
(2024-05-03)


### Features

* add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5
([shaka-project#1390](shaka-project#1390))
([fe885b3](shaka-project@fe885b3))
* get start number from muxer and specify initial sequence number
([shaka-project#879](shaka-project#879))
([bb104fe](shaka-project@bb104fe))
* teletext formatting
([shaka-project#1384](shaka-project#1384))
([4b5e80d](shaka-project@4b5e80d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

* fix: adaptation set IDs were referenced by lowest representation ID  (shaka-project#1394)

After change to add forced command line ordering adaptation set IDs in
places were referenced by their sort index (the minimum representation
index they contained).

Instead always refer to adaptation sets by their own ID, and use the
index only as an optional sort key.

Fixes shaka-project#1393

* docs: document --enable_entitlement_license option for Widevine (shaka-project#1399)

The option was never covered to the widevine docs when it was added,
requiring someone to read the source code or the --help to discover this
option.

Fixes shaka-project#983

* fix: escape media URLs in MPD (shaka-project#1395)

Currently `media_info.media_file_url()` is not escaped when placed into
MPD for things like BaseURL. This for example breaks when trying to us a
file name that contains special characters like &. Since these are
supposed to be URLs let's URL encode them.

Fixes shaka-project#1107

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>

* fix: set yuv full range flag to 1 for VP9 with sRGB (shaka-project#1398)

If color_space is VPX_COLOR_SPACE_SRGB, the specs says that color_range
should be 1 i.e. yuv_full_range = true. 

However, yuv_full_range was initialized as false and wasn't set in the branch for color_space
is VPX_COLOR_SPACE_SRGB.

Fixes shaka-project#990

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>

* feat: support Dolby Vision profile 8.x (HEVC) and 10.x (AV1) in HLS and DASH  (shaka-project#1396)

Support Dolby Vision profile 8.1, 8.2, 8.4, 10.1, 10.4 signaling in HLS
and DASH.

Adds new option `--use_dovi_supplemental_codecs` (off by default) to use
SUPPLEMENTAL-CODECS in HLS and `scte214:supplementalCodecs` and
`scte214:supplementalProfiles` for DASH.

To maintain compatibility with existing players the current behavior of
using two entries in the manifest remains the default. This will be
changed in a future version where `use_dovi_supplemental_codecs` will
become on by default.

Adds Dolby Vision compatible brands, 'db1p', 'db2g', 'db4g', 'db4h',
'dby1' based on https://mp4ra.org/#/brands

---------

Co-authored-by: Xingzhao Yun <xyun@dolby.com>

* chore(main): release 3.2.0 (shaka-project#1400)

:robot: I have created a release *beep* *boop*
---


##
[3.2.0](shaka-project/shaka-packager@v3.1.0...v3.2.0)
(2024-05-11)


### Features

* support Dolby Vision profile 8.x (HEVC) and 10.x (AV1) in HLS and DASH
([shaka-project#1396](shaka-project#1396))
([a99cfe0](shaka-project@a99cfe0))


### Bug Fixes

* adaptation set IDs were referenced by lowest representation ID
([shaka-project#1394](shaka-project#1394))
([94db9c9](shaka-project@94db9c9)),
closes
[shaka-project#1393](shaka-project#1393)
* escape media URLs in MPD
([shaka-project#1395](shaka-project#1395))
([98b44d0](shaka-project@98b44d0))
* set yuv full range flag to 1 for VP9 with sRGB
([shaka-project#1398](shaka-project#1398))
([f6f60e5](shaka-project@f6f60e5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

* lint

---------

Co-authored-by: Cosmin Stejerean <cstejerean@gmail.com>
Co-authored-by: Shaka Bot <13107131+shaka-bot@users.noreply.github.com>
Co-authored-by: Torbjörn Einarson <torbjorn@einarssons.se>
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
Co-authored-by: sr90 <sr1990003@gmail.com>
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
Co-authored-by: Xingzhao Yun <xyun@dolby.com>
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