Open Bug 1700815 Opened 4 years ago Updated 5 months ago

Implement HWDRM video playback with libva protected content API

Categories

(Core :: Audio/Video: Playback, enhancement)

Firefox 87
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: vincent, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

Currently Firefox on any platform cannot play most DRM protected video at above 720p. The same is true for Chrome, except on Chrome OS where 1080p protected video can be viewed. See the HTML5 section here:
https://help.netflix.com/en/node/23742

The support for DRM protected video on firefox is currently via widevine. https://support.mozilla.org/en-US/kb/enable-drm

Expected results:

As a non-default option, Firefox on Linux currently supports hardware accelerated HTML5 video on sites like YouTube (https://bugzilla.mozilla.org/show_bug.cgi?id=1610199). This support is possible thanks to an integration with libva, among other tools.

The new libva protected content API, which is compatible with widevine, could be theoretically used to enable 1080p+ content to be playable on Linux.
https://intel.github.io/libva/group__api__prot.html
https://github.com/intel/libva/commit/21c1867b29fa84181404e015146f4844b062ea58

Libva's protected content API is new and currently has no deployments that I am aware of, but it is potentially a tangible improvment for Linux and even Chrome OS users (it is possible to run Firefox on Chrome OS).

P.S. Issues like https://bugzilla.mozilla.org/show_bug.cgi?id=1700439 refer to DRM as "direct rendering manager" while this issue is about "digital rights management". The two are graphics-related but very different.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

AFAIK this won't fly.

In order to convince these platforms to ship high quality content to Firefox on Linux, you don't only need to implement those APIs, you also need make sure that they do want they are supposed to be doing - that is preventing users to easily copy the content.

This again needs your whole graphic stack to make these guarantees. Your graphic driver and the compositor needs to prevent direct access to the content. Even the screen and the cable to that screen need to be able to make capturing hard:

Streaming in 4K requires an HDCP 2.2 compliant connection to a 4K capable display, Intel's 7th generation Core CPU, and the latest Windows updates. Check with the manufacturer of your system to verify specifications.

In the moment, nothing prevents you to just screen-capture any video played via widevine. It only prevents super low effort attempts, nothing more. ChromeOS is apparently is locked down enough to at least get 1080p, but I'd bet that's only true as long as you use signed binaries for the whole system, not a self-compiled one.

So well, AFAICS DRM is fundamentally incompatible with open software and all we can get is content that the providers care less enough about to risk it being copied.

Could this API be used to enable hardware decoding for DRM protected content? I think this would be beneficial, even at 720p.

(In reply to l3s2d from comment #3)

Could this API be used to enable hardware decoding for DRM protected content? I think this would be beneficial, even at 720p.

This may be possible.

Considering DRM plumbing in other parts of the stack, here's a recent discussion about integrating it in Wayland protocols: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/54#note_975127

Making this block bug 1610199 to avoid duplicates. I still wouldn't hold my breath to see anybody actively working on this, but given that Netflix & co. are incredible popular, it surely would be nice to have hardware acceleration where possible.

I don't think we see that until DRM is implemented in libva. Otherwise you can use modified libva library and capture the video frames.

As user of one of VOD services let me add this - in Russia one of biggest SVOD services Kinopoisk.ru (part of Yandex) allows 1080p on Linux in Firefox without any problems. Other services i checked (Okko, for example) allows too. However, 4K isnt provided on web player at all, only on SmartTV and set-top boxes.
So, it seems its very per-service policy thing, with Netflix just being more restrictive then other. And as Firefox user i kinda against Firefox going even more DRM-friendly then it is now.

It seems it is already implemented on the libva side: http://intel.github.io/libva/group__api__prot.html

Now we probably must wait for drivers and ffmpeg to implement it

Protected playback is implemented by widevine plugin, not ffmpeg.

oh, so the widevine needs to implement this as well

Because of piracy you are better pirating it.

Ummm... okay. No problemo 😁

(In reply to skoruppa from comment #8)

It seems it is already implemented on the libva side: http://intel.github.io/libva/group__api__prot.html

Now we probably must wait for drivers and ffmpeg to implement it

Is there maybe an issue or two, that we can track to catch this?

Seems like not a lot of traction behind this until.

(In reply to Alberto Salvia Novella from comment #11)

Because of piracy you are better pirating it.

Ummm... okay. No problemo 😁

to be honest, it's totally true. With the problems playing content, the higher prices, etc... I mean.. It was easier with the torrent, and I'm paying, soryy not sorry

You need to log in before you can comment on or make changes to this bug.