Hardware acceleration and fingerprinting
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- api, audio-video-rtc
調査の方向性
WebCodecs仕様のハードウェアアクセラレーションのセクションとVideoEncoder.isConfigSupportedの例から始め、リンクされているBugzillaの報告と既存の2つのコメントを確認してください。fingerprintingの制約下でのhardwareAccelerationの動作と、作成者から観測できる結果について合意し、仕様化されれば、このIssueは完了です。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- HTML
- スター
- 1.3k
- フォーク
- 192
- 平均マージ
- 21時間 7分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
w3c/webcodecs のほかの issue
-
privacy-needs-resolution
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
editorial
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
w3c/webcodecs#972 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
w3c/webcodecs#971 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
layer.setProps: opacity above 1 is clamped silently (layerStyle uses 0..100)対応中かも @switch87 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
storytold/photocraft#5242 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
pinterest/pymemcache#662 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
[Enhancement]: Add Cheaper Inference to known custom endpoint providers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン✨ enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
LibreChat-AI/LibreChat#17075 ·
メンテナーはふだん 1 日以内に返信