Skip to content

Give the bot a 4-core machine and keep the page still while video plays - #96

Merged
a-Fig merged 1 commit into
mainfrom
video-smooth
Nov 13, 2026
Merged

a-Fig merged 1 commit into
mainfrom
video-smooth

Conversation

@a-Fig

@a-Fig a-Fig commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Closes #24

Why

YouTube played "hella choppy and laggy" in a real Meet call (Tyler, 2026-11-13). Recall's default bot gets 250 millicores (a quarter of a core) and 750 MB to run Chrome, decode the video and encode the 1280×720 screen share. Recall's output media docs name too little CPU as the cause of choppy output and recommend web_4_core for output media (docs). The page also kept animating behind the video: the idle orb's breathing rings ran at opacity 0 the whole time.

Change

  • scripts/recall.mjs: createBot sends variant: { google_meet, zoom, microsoft_teams } set to BOT_VARIANT, which defaults to web_4_core (2250 millicores, 5250 MB). Set BOT_VARIANT=web to go back to the small machine. web_gpu is the next size up. Added to .env.example.
  • Page, while a video plays (#stage.playing):
    • the other views get display: none, so they stop rendering instead of animating at opacity 0;
    • no animation runs anywhere on the stage;
    • the caption drops its 40px blurred box-shadow, since it can sit over the video.
  • The .mp4 clock repaints only when its text changes. Before, it was rewritten on every timeupdate, about 4 times a second.
  • YouTube embed: added disablekb=1, fs=0, cc_load_policy=0 (it already had rel=0, playsinline, controls=0, iv_load_policy=3). The IFrame API no longer lets a page pick the quality: vq and setPlaybackQuality do nothing now, so the embed still decodes 720p.

Cost, for Tyler

web_4_core costs $0.10/h more on monthly plans, or $0.60/h instead of $0.50/h pay-as-you-go (Recall docs, 2026-11-13). web_gpu would cost $1.50/h. Only bots created after this PR merges and the server restarts are affected.

Screenshots

None: nothing visible changes, apart from the caption's shadow while a video plays.

Verified

  • npm run check passes.
  • Playwright with the installed Chromium, headless, with the GPU off, at 1280×720, on ?test=1, with /api/think mocked to send play_video for Big Buck Bunny on YouTube. I measured for 25 s while playing:
CPU throttle Cue's main thread busy Long tasks Page rAF fps YouTube dropped frames
before 4× 14.2% (a second run: 13.9%) 0 60 1 of 1127
after 4× 7.5% 0 60 2 of 1276
before 20× 91.5% (a second run: 83%) 3 (197 ms) 53 2 of 1131
after 20× 36.2% 0 60 2 of 1130
  • CDP throttling slows only the renderer's main thread. Video decode and compositing aren't slowed, so the laptop can't reproduce the dropped frames from a quarter-core bot: they are near zero both before and after. The page-side numbers show how much CPU the page stops taking away from the video. The bot variant is the fix for decode and encode starving.
  • Not checked: a real Recall call. I sent no bot, so nobody has yet seen whether Recall accepts the variant field for this account or how smooth the video looks in Meet. One call with a YouTube link and one with an .mp4 would settle it.

Review

Skipped: the change touches public/ and scripts/recall.mjs, not server.js, agent.js or the API.

🤖 Generated with Claude Code

…ys, for #24

YouTube played "hella choppy and laggy" in a real Meet call. Recall's
default bot has 250 millicores, a quarter of a core, to run Chrome, decode
the video and encode the screen share at once, and Recall's docs name that
as the cause of choppy output media. They recommend web_4_core (2250
millicores) for output media, at +$0.10/h, so createBot now asks for it
by default; BOT_VARIANT=web goes back to the small machine.

The page also competed with the video: the idle view's breathing rings kept
animating at opacity 0 behind it, and the .mp4 clock was rewritten four
times a second. While a video plays, the other views leave rendering, no
animation runs on the stage, the caption drops its blurred shadow, and the
clock only repaints when its text changes. With 4x CPU throttling and no
GPU, Cue's main thread went from 14% to 7.5% busy during playback, and at
20x from 83-91% to 36%, with no long tasks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@a-Fig
a-Fig merged commit cf8e7fc into main Nov 13, 2026
1 check passed
@a-Fig
a-Fig deleted the video-smooth branch November 13, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video playback in a real call is very laggy

1 participant