Export: fall back to VP9/AV1 when H.264 unavailable and warn about software encoding

Firefox on Linux exposes VideoEncoder but reports every avc1.* config as
unsupported (OpenH264 is decode-only), so pickVideoConfig returned null and
export threw "no supported H.264 configuration found". Probe VP9/AV1 families
after H.264 and pick the first profile that isConfigSupported and does not
reorder (B-frame) — same 12-frame ordering test. Map the chosen family to
mp4-muxer's video codec (avc/vp9/av1).

Before any rendering, probe the codec for the chosen preset and show a
modal when we fell off H.264 onto a software VP9/AV1 path — that's what the
user felt as "super slow". The modal names the codec, explains render vs
encode cost, suggests Chromium/Chrome for hardware H.264 (or 720p/lower
preset), and offers Continue anyway / Cancel (Esc/backdrop also cancel) plus
"Don't warn again this session". Injected pick is threaded through
Exporter.export({ videoPick }) and exportSegment so we don't probe twice.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Dejvino
2026-08-29 18:17:53 +02:00
co-authored by Claude
parent b2c9497bae
commit e5484c9c38
7 changed files with 487 additions and 36 deletions
+246 -1
View File
@@ -1,5 +1,5 @@
{
"fingerprint": "ab24b461",
"fingerprint": "6a922435",
"schema": 5,
"measured": "2026-08-20",
"contexts": [
@@ -8306,6 +8306,251 @@
0
]
}
},
"Pylon Field 3D": {
"coverage": 0.014,
"bedCoverage": 0,
"bedCoverageMean": 0.006,
"variety": 0.132,
"blocks": {
"scale": 0.009,
"orient": 0.154,
"layout": 0.17,
"region": 0.312,
"texture": 0.055,
"motion": 0.095,
"colour": 0.531
},
"readsHistory": false,
"profile": {
"scale": [
0.2393,
0.1761,
0.1808,
0.1881,
0.2157
],
"orient": [
0.0911,
0.0988,
0.0465,
0.0758,
0.0445,
0.0532
],
"layout": [
0.0147,
0.0183,
0.0129,
0.0039,
0.074,
0.195,
0.1856,
0.0717,
0.0741,
0.1143,
0.111,
0.0649,
0.0108,
0.0223,
0.0224,
0.0042
],
"region": [
-0.6079,
-0.011,
0.837,
-0.1399,
-0.2597,
-0.3173,
-0.6353,
-0.1502,
0.1133,
0.5919,
0.0501,
0.3099,
1.5848,
0.1487,
1.2557,
0.5846,
0.1699,
0.2694,
-0.5945,
-0.0476,
-0.8741,
-0.2272,
-0.0582,
-0.6888,
-0.5566,
0.158,
-0.9051
],
"texture": [
0.4569,
0.0467,
0.1254,
0.0372,
0.1422,
0.1648,
0.0537
],
"colour": [
0.2171,
0.1161,
0.4889,
0.1754,
0.0009,
0.0016,
0.5458,
0.0331
],
"motion": [
0.3918,
0.2137,
0.1319,
0.1273,
0.1352,
0.0081,
0.0268,
0.0143,
0.001,
0.0521,
0.1993,
0.1588,
0.0503,
0.0876,
0.1811,
0.1411,
0.0471,
0.0062,
0.0097,
0.016,
0.0006
]
}
},
"Synthwave Corridor": {
"coverage": 0.012,
"bedCoverage": 0,
"bedCoverageMean": 0.01,
"variety": 0.12,
"blocks": {
"scale": 0.015,
"orient": 0.084,
"layout": 0.16,
"region": 0.288,
"texture": 0.064,
"motion": 0.11,
"colour": 0.541
},
"readsHistory": false,
"profile": {
"scale": [
0.205,
0.1834,
0.2427,
0.2296,
0.1392
],
"orient": [
0.1676,
0.1722,
0.077,
0.2031,
0.0636,
0.1073
],
"layout": [
0,
0.0111,
0.005,
0,
0.0272,
0.2547,
0.2295,
0.0002,
0.0262,
0.2076,
0.1523,
0,
0,
0.046,
0.0401,
0
],
"region": [
-0.9498,
-0.0083,
-0.9038,
0.3037,
-0.0735,
-0.119,
-1,
0.0332,
-1,
-0.2529,
-0.4383,
1.1061,
4.4222,
0.0955,
3.8589,
-0.9753,
0.0933,
-0.6853,
-1,
0.0332,
-1,
0.452,
0.2317,
-0.2569,
-1,
0.0332,
-1
],
"texture": [
0.1016,
0.0213,
0.0519,
0.0285,
0.2572,
0.2294,
0.0577
],
"colour": [
0.1347,
0.164,
0.4911,
0.1878,
0.0218,
0.0006,
0.0566,
0.0056
],
"motion": [
0.328,
0.2303,
0.1743,
0.1662,
0.1012,
0.0001,
0.0171,
0.0258,
0,
0.0084,
0.2525,
0.2127,
0,
0.0313,
0.3059,
0.1374,
0,
0,
0.0024,
0.0062,
0
]
},
"error": "renders nothing — luminance 0.0012, variance 0.0057. A failed shader compile scores 0.000 on every block; check the console for GLSL errors."
}
}
}