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

Support explicit binding between drm keys and output media tracks #75

Open
KarlGallagher opened this issue Jun 7, 2021 · 6 comments
Open
Labels
priority: P3 Useful but not urgent type: enhancement New feature or request
Milestone

Comments

@KarlGallagher
Copy link
Contributor

Hello,

currently the width of the output is set as automatic (-2) via FFMEG processing command.

I would like to propose that it is instead set as per the required output resolution settings - e.g.
filters.append('scale={0}:{1}'.format(stream.resolution.max_width, stream.resolution.max_height))

The main reason is that when we apply DRM based encryption, Shaka Packager's auto-assignment of keys to specific tracks (based on resolution) can get thrown off when the width fluctuates. For example, sometimes it treats 480p as 'HD' or 1080p as 'UHD'.

Since typically we associated HD and UHD quality settings with more restrictive DRM requirements this can lead to compatibility issues for some clients/users

@joeyparrish
Copy link
Member

I believe that using the scale command you proposed would result in some content being encoded at the wrong aspect ratio, with things squished or stretched inappropriately.

@joeyparrish
Copy link
Member

I believe Packager can be configured as to how the keys are assigned. Could we perhaps fix it that way instead?

@KarlGallagher
Copy link
Contributor Author

@joeyparrish yeah this would lock output to 16:9, which for me does not cause much of an issue, but I understand what you are saying.

The key assigment issues could be probably be worked around in raw key mode by setting the stream descriptor drm_label field to match the key label AFAIK (so long as labels are defined...)

@joeyparrish
Copy link
Member

From Packager docs, it appears that we can use the drm_label descriptor without needing to resort to raw key mode, so long as we use predefined, expected values. See https://google.github.io/shaka-packager/html/options/stream_descriptors.html#drm-related-stream-descriptor-fields

@mariocynicys
Copy link
Collaborator

@KarlGallagher Try adding - scale=your_wanted_max_width:max_height in the filters option in input_config.yaml, this will apply you scale first so the scale='-2:{0}'.format(stream.resolution.max_height) will have no effect at this moment.

@KarlGallagher
Copy link
Contributor Author

@joeyparrish OK sounds like we could update the bitrate_configuration to also support the concept of drm_label.

ill have a look at what 'fixed' labels are defined by default....

@KarlGallagher KarlGallagher changed the title Consider using a fixed output aspect ratio (scale) Support explicit binding between drm keys and output media tracks Jun 8, 2021
@joeyparrish joeyparrish added type: enhancement New feature or request and removed needs triage labels Sep 8, 2021
@joeyparrish joeyparrish added this to the Backlog milestone Sep 8, 2021
@joeyparrish joeyparrish added the priority: P3 Useful but not urgent label Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P3 Useful but not urgent type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants