Skip to content

[Bug]: Export uses the screen recording as the webcam when a project has no camera track #265

Description

@lorenjphillips

What happens

Exporting a screen-only recording (no webcam) renders the screen video a second time inside the webcam picture-in-picture frame.

Preview is correct. Only the export is wrong.

Steps to reproduce

  1. Record the screen with the webcam off, so the session has no camera track.
  2. Open it in the editor. Preview looks right, no webcam.
  3. Export.
  4. The exported file has the screen video duplicated in the PiP bubble.

Cause

The export handler (the one that runs after pickExportSavePath) builds its segments with:

webcamPath: i?.sourcePath ?? n.originalPath   // i = asset.cameraTrack, n = asset

?? only falls back on null/undefined. With no camera track i?.sourcePath is undefined, so webcamPath becomes the screen recording's own path and the compositor draws it as the webcam.

Two other call sites that build the same segment shape get it right.

Preview:

webcamPath: e.cameraTrack?.visible && e.cameraTrack.sourcePath ? e.cameraTrack.sourcePath : undefined

The other render-segment builder:

webcamPath: n && n.visible && n.sourcePath ? n.sourcePath : ""

Suggested fix

Match the other two:

webcamPath: i?.visible ? i.sourcePath : ""

The compositor already treats "" as "no webcam" — that's what setActiveClip passes on the preview path.

Also worth noting the export ignores cameraTrack.visible. Hiding the camera in the editor still exports it.

Why there's no workaround

  • The Layout panel is disabled unless a clip has a cameraTrack, and the presets are only picture-in-picture / vertical-stack / dual-frame. Nothing turns the camera off.
  • Hand-editing the .openscreen file doesn't help either. The schema is sourcePath: z.string().min(1), so an empty path fails validation, and any real path just gets composited.

I patched my local build with the one-line change above and the export is correct.

Environment

Openscreen 1.8.0, macOS 26.5.2 (25F84), Apple silicon.

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