Skip to content

[Bug]: Long recordings open stretched in the editor: screen dimension probe times out after 5 s, so asset.video is never set #1610

Closed

Description

@kaenamiller

Search existing issues

  • I have searched the existing issues

Describe the bug

After a long recording, the editor stretches the screen video to fill a 16:9 frame instead of keeping its real aspect ratio. Changing the editor's aspect ratio only reshapes the outer frame; the screen footage inside stays stretched. Short recordings made on the same machine and window look correct.

The recorded MP4 itself is fine (2816×2064, undistorted frames). The difference is in the project file: the short recording's asset has

"video": { "codec": "unknown", "width": 2816, "height": 2064, "fps": 0 }

while the long recording's asset has no video entry at all.

Likely cause: probeVideoDimensions in src/lib/ai-edition/timeline/duration.ts loads the file into a hidden <video preload="metadata"> and gives up after DEFAULT_TIMEOUT_MS = 5000, resolving null. In useTimeline.ts (~line 297) a null result just leaves entry.video unset, and the asset ID is already in probedAssetIdsRef, so it isn't retried in that session. The Linux recorder writes fragmented MP4 (ftyp, moov, then thousands of moof/mdat pairs with no sidx/mfra). For an 11-minute, 2 GB file, Chromium doesn't reach loadedmetadata within 5 s, so the dimensions are never stored and the editor falls back to its default frame.

Adding the video entry to the project file by hand (with the editor closed) fixes the stretch for that project.

Possible fixes:

  • Get the dimensions from the recorder, which already knows them when it stores the capture, and write them into the asset at creation.
  • And/or raise the probe timeout or scale it with file size, and retry on later opens instead of marking the asset as probed when the probe failed.
  • And/or write a sidx (or a final mfra) when the recording is finalized, so players can read the metadata without scanning fragments.

Expected behavior

The screen recording keeps its real aspect ratio in the editor and export, whatever the recording length.

To Reproduce

  1. On Linux (KDE Plasma Wayland), record a window for about 10+ minutes (here: 11 min 19 s, 2.0 GB, 2816×2064 H.264 via VA-API).
  2. Open the recording in the editor.
  3. The screen footage is stretched to 16:9; changing the aspect ratio doesn't fix it.
  4. Look at the project's .openscreen file: assets[0] has no video field.
  5. Make a 15-second recording of the same window: it opens correctly, and its asset has video.width/height.

Screenshots

Screenshot to follow in a comment.

Environment

  • OS: Linux, Fedora 44 (kernel 7.2.14-200.fc44.x86_64), KDE Plasma on Wayland
  • OpenScreen: 2.2.2 (RPM). Also seen on 2.3.0-rc.5, where even a 23-second recording opened stretched.
  • GPU: AMD Radeon RX 9070 XT, Mesa 26.2.6 (mesa-va-drivers-freeworld for H.264 VA-API encode)
  • Displays: 5120×2160 at 1.6× scale (recorded monitor) and 3840×1600 at 1.3× scale
  • Capture log of note: window-crop-missing: a window was granted but no crop rectangle arrived in 508 ms; recording the full 2816x2061 stream instead (from the rc.5 session)

Activity

  1. kaenamiller commented on Nov 17, 2026

    @kaenamiller
    Author
    Screenshot_20261116_235255

    Screengrab from raw recording for comparison

  2. kaenamiller commented on Nov 17, 2026

    @kaenamiller
    Author
    Screenshot_20261116_235418

    Stretched recording in editor (persists into export)

  3. EtienneLescot commented on Nov 19, 2026

    @EtienneLescot
    Member

    Thanks again for the detailed report. #1618 is now in main: the background dimension probe waits up to 60 s and retries a failed probe, so long takes should no longer open stretched. It ships in the next release.

    One open question: your 23 s take reads in about 260 ms on our side, so its failure may have another cause. Once you are on a build with #1618, could you tell us whether that take still opens stretched? If it does, the editor log from opening it would help.

  4. EtienneLescot commented on Nov 21, 2026

    @EtienneLescot
    Member

    Closing this as fixed in main by #1618: long takes no longer lose their dimensions, and the fix ships in the next release. If a take, including the short 23 s one, still opens stretched on a build with #1618, please reopen with the editor log from opening it and we'll take it from there. Thanks again for the thorough report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions