Hardware acceleration and fingerprinting
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- api, audio-video-rtc
Hướng nghiên cứu
Bắt đầu với phần tăng tốc phần cứng trong đặc tả WebCodecs và ví dụ về VideoEncoder.isConfigSupported, sau đó xem xét báo cáo Bugzilla được liên kết và hai bình luận hiện có. Issue được hoàn tất khi hành vi của hardwareAcceleration trong các ràng buộc về fingerprinting và kết quả mà các tác giả có thể quan sát được đã được thống nhất và đặc tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I just filed a bug on Bugzilla but what Firefox is doing is spec compliant, so I wanted to raise the issue here too.
Background
I'm making a website that heavily utilizes WebCodecs. I need to determine the encoding codec and always want to use hardware encoding (when available) as battery life is more important than fidelity (conference call).
- Loop through all codecs in order of network efficiency: av1, vp9, hevc, h254, vp8, etc
- Check if the browser supports hardware acceleration, if so return it.
- Repeat the loop but this time with software acceleration.
I'm using the hardwareAcceleration: "prefer-hardware" field to determine if hardware acceleration is supported. Here's an example of one of the checks:
VideoEncoder.isConfigSupported({
codec: "av01.0.08M.08",
width: 1280,
height: 720,
hardwareAcceleration: "prefer-hardware",
}).then(console.log)
Here's a little modal I created to visualize the process and the results on my M2 laptop and Chrome.
Problem
Here's what Firefox reports:
Ignore the partial support for video capture (MediaStreamTrackProcessor polyfill).
The problem is that Firefox is reporting hardware acceleration for AV1, VP9, etc. So my encoder will naively select one of those codecs and suddenly my CPU is on fire.
My guess is that Firefox is ignoring the hardwareAcceleration field to avoid fingerprinting. Here's the relevant section in the specification:
If a User Agent does not implement [media-capabilities] for reasons of fingerprinting, they SHOULD ignore the HardwareAcceleration preference
Proposed
If the browser won't respect hardwareAcceleration because it can be used for fingerprinting, then the browser should return an error somehow. I don't think the browser should silently ignore important configuration values without feedback.
If I knew that Firefox doesn't allow probing for hardware acceleration, then I would use H.264 because hardware acceleration is very common and easier on the CPU. Then I could also report hardware acceleration as "unknown" and maybe show a modal explaining why performance might be poor.
My suggestions:
- Don't return
hardwareAccelerationin the config returned by isConfigSupported. Unfortunately, this isn't quite correct, ashardwareAccelerationis supported but only as a hint. - Add
"require-hardware"and"require-software"as options, throwing an exception (or returning false?) if they are used on browsers that care about fingerprinting. - Firefox pls allow me to detect hardware acceleration. Otherwise I can't use newer codecs for fear of melting silicon.
I think #2 is the best option. It's kind of strange that Chrome returns isConfigSupported=false when "prefer-hardware" is used. If it's just a hint, like the "prefer" implies, then it should always return true if either software or hardware encoding is available... right?
- Ngôn ngữ chính
- HTML
- Star
- 1.3k
- Fork
- 192
- Merge trung bình
- 3 giờ 36 phút
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của w3c/webcodecs
-
privacy-needs-resolution
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
editorial
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
TPAC2026
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của w3c/webcodecs
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
huggingface/smolagents#2976 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
FuRongJun-1999/dsh-memory#170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
testcontainers/testcontainers-node#1539 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
backdrop-contrib/commerce#60 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100