VideoEncoder: an orientation change after a bitrate-only configure() produces a delta chunk with a new VideoDecoderConfig
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- html
- Bereich
- api
Rechercherichtung
Start with the VideoEncoder orientation and configure() behavior described in the issue, then review the linked CodePen reproduction. Decide how orientation changes should interact with bitrate-only reconfiguration, decoder configuration changes, and key-frame requirements; the issue offers forcing a key frame or rejecting the change as options. Done means the behavior and any spec note address the stated decoder failure and preserve the bitrate-only optimization.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The flow is the following:
- The encoder is configured once.
- The encoder encodes a frame. This generates a first encoded chunk (key frame) and a first VideoDecoderConfig.
- The encoder is reconfigured only to change the bitrate. In Chrome and Safari at least, this does not recreate the underlying encoder, so no key frame is generated by default.
- The encoder encodes a new frame with a different orientation. This generates a second encoded chunk (delta frame) and a second VideoDecoderConfig.
On the decoder side:
- The decoder is configured with the first VideoDecoderConfig.
- The decoder decodes the first encoded chunk.
- The decoder is configured with the second VideoDecoderConfig.
- The decoder fails to decode the second encoded chunk because it is not a key frame (A key frame is required after configure() or flush()).
Repro: https://codepen.io/editor/youennf/pen/01a167cd-55d7-75b2-baa6-f4aa8523920a
This reproduces in Chrome. It does not reproduce in Safari yet, because orientation support is still being implemented there.
This is a problem as:
- Not triggering a key frame when only the bitrate changes is useful for realtime conferencing so should be preserved in some way.
- There is also an assumption that a chunk carrying a new VideoDecoderConfig must be decodable by a decoder freshly configured with it, so it must be a key frame. This flow breaks that assumption.
A first option is to force a key frame on orientation change
This is probably the simplest approach.
Whenever the orientation of the encoded frames changes, the encoder produces a key frame together with a new VideoDecoderConfig. A bitrate-only configure() by itself still never forces a key frame.
If doing so, we could also remove the synchronous active orientation check in VideoEncoder.encode().
This might be handy for video conferencing web applications having to deal with orientation changes.
An alternative is to disallow an orientation change after a bitrate-only configure(). For example, the next encode() with a different orientation throws a DataError, so the application has to do a full reconfiguration, which produces a key frame.
This requires defining bitrate-only configure though so my preference goes to the first option.
I would alsol tend to add to the spec a note about supporting bitrate-only configure.
Otherwise, we might end up into interop issues if one browser implements this optimization and another does not.
- Vorherrschende Sprache
- HTML
- Sterne
- 1.3k
- Forks
- 190
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus w3c/webcodecs
-
privacy-needs-resolution
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
editorial
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
w3c/webcodecs#983 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
w3c/webcodecs#977 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
w3c/webcodecs#973 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
fix(worker): keep normal prepare waiting states failure-freeEvtl. vergeben @LichKing-2234 hat das heute übernommen. Offenagent:codex priority:P1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
AgoraIO-Extensions/agent-infra#3745 ·
Maintainer antworten meist innerhalb von 1 Tag
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framingEvtl. vergeben @Eapp1e hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
makecindy/cindy#7973 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
objectionary/hone-maven-plugin#1351 ·
Maintainer antworten meist innerhalb von 9 Tagen
-
PC
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
Make `ocifs` optionalOffendependencies
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
dlt-contrib/dlt-filesystem#51 ·
Maintainer antworten meist innerhalb von 1 Tag