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

Packager Adaptation Set Switching values point to representation IDs instead of Adaptation Set IDs. #1393

Closed
vish91 opened this issue May 2, 2024 · 1 comment · Fixed by #1394 or #1400
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

@vish91
Copy link
Contributor

vish91 commented May 2, 2024

System info

Operating System: all
Shaka Packager Version: latest but also older versions e.g 2.6.6 or before CI/CD rewrite

Issue and steps to reproduce the problem

Packager Command:
/bin/packager 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_uhd_hevc_1005.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_uhd_hevc_1005.mp4,drm_label=sd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_uhd_hevc_120.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_uhd_hevc_120.mp4,drm_label=sd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_uhd_hevc_2305.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_uhd_hevc_2305.mp4,drm_label=hd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_uhd_hevc_7005.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_uhd_hevc_7005.mp4,drm_label=uhd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_sdr_110.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_sdr_110.mp4,drm_label=sd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_sdr_1500.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_sdr_1500.mp4,drm_label=sd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_sdr_3000.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_sdr_3000.mp4,drm_label=hd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_sdr_4500.mp4,stream=video,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_sdr_4500.mp4,drm_label=hd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_122_UHD_en-US_2651676_1_eac3_192.mp4,stream=audio,lang=en-US,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_122_UHD_en-US_2651676_1_eac3_192.mp4,drm_label=sd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_122_UHD_en-US_2651676_3_aac_128.mp4,stream=audio,lang=en-US,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_122_UHD_en-US_2651676_3_aac_128.mp4,drm_label=sd,dash_roles=main' 'in=/tmp/2675580/PPCBS_FIRECOUNTRY_122_UHD_fr-FR_2651676_fr_aac_128.mp4,stream=audio,lang=fr,output=/tmp/2675580-out/PPCBS_FIRECOUNTRY_122_UHD_fr-FR_2651676_fr_aac_128.mp4,drm_label=sd,dash_roles=dub' 'in=/tmp/2675580-out/vtt/P4P7LlJERc8kyzNyMbaogfIsTprR_YHz_Bifuf8QnlAQr1cygYQsDCp_1712692994_btc_3.vtt,stream=text,language=en-US,output=/tmp/2675580-out/en-US.vtt,dash_roles=main' 'in=/tmp/2675580-out/vtt/PPCBS_FIRECOUNTRY_fr-FR.vtt,stream=text,language=fr,output=/tmp/2675580-out/fr.vtt,dash_roles=subtitle' 'in=/tmp/2675580-out/vtt/PPCBS_FIRECOUNTRY_fr-FR_fn.vtt,stream=text,language=fr,output=/tmp/2675580-out/fr_fn.vtt,dash_roles=forced-subtitle' --default_language en-US --clear_lead 0 --fragment_duration 6 --mpd_output /tmp/2675580-out/stream.mpd --enable_raw_key_encryption --keys label=audio:key_id=abc123456:key=aaaabbbbcccc,label=sd:key_id=abcxyz1233:key=bbbcccdddd,label=hd:key_id=xyzefg123:key=zzzzzyyyyxxxx,label=uhd:key_id=aaaabbbccc123:key=0000aaa444www --protection_systems Widevine,PlayReady

What is the expected result?
The output manifest produced should have multiple adaptation sets for each codec and within each switchable adapation set should be a SupplementalProperty . value ${ID} is the ID of adaptation Set to which player can switch .
e.g
Adaptation Set ID 0 -> has representation IDs 0,1
Adaptation Set ID 1 -> has representation IDs 2,3
Adaptation Set ID 2 -> has representation IDs 4,5

The switching supplemental property in AdaptationSet ID 0 should be value = 1,2
The switching supplemental property in AdaptationSet ID 1 should be value = 0,2
The switching supplemental property in AdaptationSet ID 2 should be value = 0,1

What happens instead?
Shaka Packager switching value is pointing to the representation ID instead of the adaptation Set ID .
e.g
Adaptation Set ID 0 -> has representation IDs 0,1
Adaptation Set ID 1 -> has representation IDs 2,3
Adaptation Set ID 2 -> has representation IDs 4,5

The switching supplemental property in AdaptationSet ID 0 has value = 2,4
The switching supplemental property in AdaptationSet ID 1 should be value = 1,5
The switching supplemental property in AdaptationSet ID 2 should be value = 1,3

The logic must have some bug where instead of AdaptationSet ID its adding Representation Set ID.
Per DASH-IF IOP 3.9.4.8 , the switching supplemental property value should reflect the ID of the adaptation sets.
Switching across Adaptation Sets: @schemeIdUri set to urn:mpeg:dash:adaptation-set-switching:2016 and the @value is a comma-separated list of Adaptation Set IDs that may be seamlessly switched 18 to from this Adaptation Set.

@joeyparrish
Copy link
Member

Nice catch! Can you send a PR?

@cosmin cosmin added this to the v3.2 milestone May 4, 2024
@github-actions github-actions bot removed this from the v3.2 milestone May 4, 2024
@cosmin cosmin self-assigned this May 7, 2024
@cosmin cosmin added this to the v3.2 milestone May 7, 2024
@github-actions github-actions bot removed this from the v3.2 milestone May 7, 2024
@cosmin cosmin added type: bug Something isn't working correctly priority: P0 Broken for everyone; no workaround; urgent labels May 9, 2024
@cosmin cosmin added this to the v3.2 milestone May 9, 2024
cosmin added a commit that referenced this issue May 11, 2024
…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 #1393
cosmin pushed a commit that referenced this issue May 12, 2024
🤖 I have created a release *beep* *boop*
---


##
[3.2.0](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
([#1396](#1396))
([a99cfe0](a99cfe0))


### Bug Fixes

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

---
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 Jul 10, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 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
3 participants