Revert "fix: record full desktop by default"

This reverts commit 1e77a46627.
This commit is contained in:
Vincent Koc 2026-05-04 23:32:53 -07:00
parent 1e77a46627
commit 0e52767d21
No known key found for this signature in database
3 changed files with 4 additions and 19 deletions

View File

@ -13,9 +13,7 @@ crabbox record --id blue-lobster --duration 2m --output task.mp4 --while -- ./dr
The command resolves and touches the lease like `crabbox screenshot`, verifies
that the lease has `desktop=true`, waits for the loopback desktop/VNC service,
then streams an MP4 over SSH. Linux records `DISPLAY=:99` with `ffmpeg`
`x11grab` and defaults to the full display size; pass
`--size <width>x<height>` only when you intentionally want a crop. Windows,
including `--windows-mode wsl2` leases, records the visible
`x11grab`. Windows, including `--windows-mode wsl2` leases, records the visible
Windows console by creating a one-shot scheduled task inside the logged-in
`crabbox` session and using `ffmpeg` `gdigrab`.

View File

@ -24,7 +24,7 @@ func (a App) recordDesktop(ctx context.Context, args []string) error {
output := fs.String("output", "", "local MP4 output path")
duration := fs.Duration("duration", 10*time.Second, "recording duration")
fps := fs.Int("fps", 15, "recording frame rate")
size := fs.String("size", "auto", "recording size, or widthxheight crop")
size := fs.String("size", "1024x768", "recording size, or auto")
while := fs.Bool("while", false, "record while a local command runs after --")
reclaim := fs.Bool("reclaim", false, "claim this lease for the current repo")
targetFlags := registerTargetFlags(fs, defaults)
@ -304,7 +304,7 @@ func recordRemoteUntilStopCommand(target SSHTarget, opts recordDesktopOptions, r
}
size := strings.TrimSpace(opts.Size)
if size == "" {
size = "auto"
size = "1024x768"
}
return posixRecordUntilStopRemoteCommand(remoteMaxSeconds, opts.FPS, size, remoteOutputPath, remoteStopPath, remoteReadyPath)
}
@ -316,7 +316,7 @@ func recordRemoteCommand(target SSHTarget, opts recordDesktopOptions) string {
}
size := strings.TrimSpace(opts.Size)
if size == "" {
size = "auto"
size = "1024x768"
}
if target.TargetOS == targetWindows {
return windowsRecordRemoteCommand(durationSeconds, opts.FPS, size)

View File

@ -83,19 +83,6 @@ func TestRecordRemoteUntilStopCommandUsesStopFile(t *testing.T) {
}
}
func TestRecordRemoteCommandDefaultsToAutoSize(t *testing.T) {
for _, size := range []string{"", "auto"} {
got := recordRemoteCommand(SSHTarget{TargetOS: targetLinux}, recordDesktopOptions{
Duration: time.Second,
FPS: 10,
Size: size,
})
if strings.Contains(got, "-video_size") {
t.Fatalf("default/auto size should omit -video_size:\n%s", got)
}
}
}
func TestRecordRemoteCommandSupportsWindowsInteractiveTask(t *testing.T) {
for _, target := range []SSHTarget{
{TargetOS: targetWindows, WindowsMode: windowsModeNormal},