[
{
"file": "app-before/desktop.mp4",
"decode_exit": 0,
"streams": [
{
"codec_tag_string": "avc1",
"width": 1600,
"height": 1000,
"avg_frame_rate": "364500/12271"
}
],
"format": {
"duration": "8.181533",
"size": "168002"
},
"phases": [
{
"shape": [
1600,
1000
],
"at": "0.000000"
}
],
"last_frame": "8.148233",
"packet_dts_monotonic": true
},
{
"file": "app-before/mobile.mp4",
"decode_exit": 0,
"streams": [
{
"codec_tag_string": "avc1",
"width": 488,
"height": 1054,
"avg_frame_rate": "3540000/122641"
}
],
"format": {
"duration": "8.180400",
"size": "141727"
},
"phases": [
{
"shape": [
488,
1054
],
"at": "0.000000"
}
],
"last_frame": "8.147100",
"packet_dts_monotonic": true
},
{
"file": "app-before/resize-1.mp4",
"decode_exit": 183,
"streams": [
{
"codec_tag_string": "avc1",
"width": 1600,
"height": 1000,
"avg_frame_rate": "2430000/82453"
}
],
"format": {
"duration": "8.252533",
"size": "188061"
},
"phases": [
{
"shape": [
1600,
1000
],
"at": "0.000000"
}
],
"last_frame": "8.219233",
"packet_dts_monotonic": true
},
{
"file": "app-before/resize-2.mp4",
"decode_exit": 183,
"streams": [
{
"codec_tag_string": "avc1",
"width": 1600,
"height": 1000,
"avg_frame_rate": "303750/10291"
}
],
"format": {
"duration": "8.237567",
"size": "171847"
},
"phases": [
{
"shape": [
1600,
1000
],
"at": "0.000000"
}
],
"last_frame": "8.204267",
"packet_dts_monotonic": true
},
{
"file": "app-after/desktop.mp4",
"decode_exit": 0,
"streams": [
{
"codec_tag_string": "avc3",
"width": 1600,
"height": 1000,
"avg_frame_rate": "455625/15328"
}
],
"format": {
"duration": "8.191767",
"size": "169361"
},
"phases": [
{
"shape": [
1600,
1000
],
"at": "0.000000"
}
],
"last_frame": "8.158467",
"packet_dts_monotonic": true
},
{
"file": "app-after/mobile.mp4",
"decode_exit": 0,
"streams": [
{
"codec_tag_string": "avc3",
"width": 488,
"height": 1054,
"avg_frame_rate": "7080000/247553"
}
],
"format": {
"duration": "8.238100",
"size": "143144"
},
"phases": [
{
"shape": [
488,
1054
],
"at": "0.000000"
}
],
"last_frame": "8.204800",
"packet_dts_monotonic": true
},
{
"file": "app-after/resize-1.mp4",
"decode_exit": 0,
"streams": [
{
"codec_tag_string": "avc3",
"width": 1600,
"height": 1000,
"avg_frame_rate": "2420000/81641"
}
],
"format": {
"duration": "8.169600",
"size": "188283"
},
"phases": [
{
"shape": [
1600,
1000
],
"at": "0.000000"
},
{
"shape": [
488,
1054
],
"at": "3.190133"
}
],
"last_frame": "8.136300",
"packet_dts_monotonic": true
},
{
"file": "app-after/resize-2.mp4",
"decode_exit": 0,
"streams": [
{
"codec_tag_string": "avc3",
"width": 1600,
"height": 1000,
"avg_frame_rate": "7290000/245867"
}
],
"format": {
"duration": "8.183600",
"size": "186695"
},
"phases": [
{
"shape": [
1600,
1000
],
"at": "0.000000"
},
{
"shape": [
488,
1054
],
"at": "3.195033"
}
],
"last_frame": "8.150300",
"packet_dts_monotonic": true
}
]
Before submitting
Area
apps/desktop, with the recorder configuration in apps/web.
Steps to reproduce
preview_open.preview_resize.preview_recording_start, then click Start.iphone-12-propreset, 390×844.preview_recording_stop.Expected behavior
The whole recording remains decodable and preserves the desktop and mobile layouts across the resize.
Actual behavior
Both repeated resize exports fail H.264 decoding. Separate fixed desktop and fixed mobile exports decode successfully. The source changes from 1600×1000 to 488×1054 physical pixels at DPR 1.25, but the
avc1recording does not convey the new decoder parameters.Reproduced in the installed nightly, then independently against upstream source with an isolated Electron profile. The source verification drives the real recorder, desktop bridge, Preview manager and native webview capture through a temporary test-mounted webview.
Impact
Major degradation or frequent failure. Resizing during recording produces an unusable export.
Version or commit
Installed version
0.0.39-nightly.20260907.1332.Upstream
pingdotgg/t3codeatc0d4e95c0d921b5960ad04c7f8abec459ee3c59e.Environment
Omarchy Quattro, Arch Linux,
/etc/os-releasereports Omarchy 4.0.2, kernel 7.1.9-arch1-2, Hyprland. Electron 43.4.1, Chromium 150.0.7871.224, embedded Node 24.18.1. Display scaling 1.25, page DPR 1.25, CSS zoom 1. Local verification uses a separate desktop and temporary app data.Logs or stack traces
The attached decoder log contains H.264 macroblock errors after resizing. Source packet DTS values remain strictly increasing. The explicit FFmpeg output time base above avoids unrelated duplicate-DTS warnings caused by output rounding.
Cause and proposed fix
browserRecording.tsprefersvideo/mp4;codecs=avc1. Chromium initializes the MP4 track's codec description once. After a resolution change,avc1does not carry updated SPS/PPS in the video samples. Chromium explicitly recommendsavc3for this case in MediaRecorder's encoding path.Prefer supported
avc3profiles, retaining the existing WebM fallback and bitrate calculation. This keeps native frame dimensions and carries parameter changes in-band. PR #10495 includes codec-selection coverage and an Electron media regression that decodes the exported file through desktop → mobile → desktop transitions.Screenshots, recordings, or supporting files
Before resize recording: Original failing MP4
before-resize.mp4
After resize recording: Original fixed MP4
after-resize.mp4
Decoder output
Validation results
[ { "file": "app-before/desktop.mp4", "decode_exit": 0, "streams": [ { "codec_tag_string": "avc1", "width": 1600, "height": 1000, "avg_frame_rate": "364500/12271" } ], "format": { "duration": "8.181533", "size": "168002" }, "phases": [ { "shape": [ 1600, 1000 ], "at": "0.000000" } ], "last_frame": "8.148233", "packet_dts_monotonic": true }, { "file": "app-before/mobile.mp4", "decode_exit": 0, "streams": [ { "codec_tag_string": "avc1", "width": 488, "height": 1054, "avg_frame_rate": "3540000/122641" } ], "format": { "duration": "8.180400", "size": "141727" }, "phases": [ { "shape": [ 488, 1054 ], "at": "0.000000" } ], "last_frame": "8.147100", "packet_dts_monotonic": true }, { "file": "app-before/resize-1.mp4", "decode_exit": 183, "streams": [ { "codec_tag_string": "avc1", "width": 1600, "height": 1000, "avg_frame_rate": "2430000/82453" } ], "format": { "duration": "8.252533", "size": "188061" }, "phases": [ { "shape": [ 1600, 1000 ], "at": "0.000000" } ], "last_frame": "8.219233", "packet_dts_monotonic": true }, { "file": "app-before/resize-2.mp4", "decode_exit": 183, "streams": [ { "codec_tag_string": "avc1", "width": 1600, "height": 1000, "avg_frame_rate": "303750/10291" } ], "format": { "duration": "8.237567", "size": "171847" }, "phases": [ { "shape": [ 1600, 1000 ], "at": "0.000000" } ], "last_frame": "8.204267", "packet_dts_monotonic": true }, { "file": "app-after/desktop.mp4", "decode_exit": 0, "streams": [ { "codec_tag_string": "avc3", "width": 1600, "height": 1000, "avg_frame_rate": "455625/15328" } ], "format": { "duration": "8.191767", "size": "169361" }, "phases": [ { "shape": [ 1600, 1000 ], "at": "0.000000" } ], "last_frame": "8.158467", "packet_dts_monotonic": true }, { "file": "app-after/mobile.mp4", "decode_exit": 0, "streams": [ { "codec_tag_string": "avc3", "width": 488, "height": 1054, "avg_frame_rate": "7080000/247553" } ], "format": { "duration": "8.238100", "size": "143144" }, "phases": [ { "shape": [ 488, 1054 ], "at": "0.000000" } ], "last_frame": "8.204800", "packet_dts_monotonic": true }, { "file": "app-after/resize-1.mp4", "decode_exit": 0, "streams": [ { "codec_tag_string": "avc3", "width": 1600, "height": 1000, "avg_frame_rate": "2420000/81641" } ], "format": { "duration": "8.169600", "size": "188283" }, "phases": [ { "shape": [ 1600, 1000 ], "at": "0.000000" }, { "shape": [ 488, 1054 ], "at": "3.190133" } ], "last_frame": "8.136300", "packet_dts_monotonic": true }, { "file": "app-after/resize-2.mp4", "decode_exit": 0, "streams": [ { "codec_tag_string": "avc3", "width": 1600, "height": 1000, "avg_frame_rate": "7290000/245867" } ], "format": { "duration": "8.183600", "size": "186695" }, "phases": [ { "shape": [ 1600, 1000 ], "at": "0.000000" }, { "shape": [ 488, 1054 ], "at": "3.195033" } ], "last_frame": "8.150300", "packet_dts_monotonic": true } ]Reproduction fixture, save as index.html and serve locally
Workaround
Stop recording before changing viewport size and start a separate take afterward.
Capture softness is a separate issue tracked in #9872, with screenshot work proposed in #9916. This report does not attribute soft text to the encoder or claim to repair it. The earlier short recording was stopped early by the caller; it is not evidence of truncation.