Skip to content

Bug: target "full" fails to record when the virtual desktop has an odd width or height #226

Closed

Description

@TMHSDigital

Why it matters

full is the default capture target. On multi-monitor setups with offset monitors, the virtual desktop is often odd-sized, so the very first start_recording a user tries fails with "exited immediately".

Evidence

  • src/utils/targets.ts:189-190: case "full": return ["-i", "desktop"];. Region and monitor targets go through evenDown (targets.ts:201-222); full does not.
  • Example: two 1920x1080 monitors, the second offset to y=301, give a 3840x1381 desktop. libx264 + yuv420p rejects the odd height. Reproduced with ffmpeg 8: Task finished with error code: -22.
  • Bug: region recording with odd width/height fails with a cryptic encoder error #34 described "or any capture", but its fix covered only region and monitor.

Suggested approach

Turn full into an even-sized region of virtualDesktopBounds (offset_x/offset_y/video_size with evenDown), or append crop=trunc(iw/2)*2:trunc(ih/2)*2. Apply the same rounding in captureFrame for full.

Done when

A unit test covers full on an odd-sized virtual desktop and the args produce even dimensions.

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

    bugeffort: smallpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions