Skip to content

Instantly share code, notes, and snippets.

@Cdaprod
Created February 8, 2026 02:36
Show Gist options
  • Select an option

  • Save Cdaprod/fda27efb08e54e769e8f381c7a466245 to your computer and use it in GitHub Desktop.

Select an option

Save Cdaprod/fda27efb08e54e769e8f381c7a466245 to your computer and use it in GitHub Desktop.
Puppeteer full page screenshots for video edits.

Yeah — if your goal is one tall clean still of the entire explorer page so you can do cinematic pans in Resolve/OBS/video editor, you basically want a full-page render, not a screen capture.

Here are the best methods depending on your workflow.


⭐ Best Overall — Browser Full-Page Screenshot (fast + clean)

Chrome / Edge / Brave (DevTools method)

  1. Open your explorer page.
  2. Press:
    • Mac: Cmd+Shift+P
    • Windows/Linux: Ctrl+Shift+P
  3. Type:
screenshot
  1. Choose:
Capture full size screenshot

👉 This outputs a PNG of the entire DOM height, even if it’s 20,000px tall.

Why this is ideal for you:

  • Perfect resolution for cinematic scroll edits.
  • No viewport limitation.
  • Keeps CSS styling exactly.

⭐ Programmatic Method (best for automation / pipeline)

Since you already run APIs and media pipelines, this fits nicely.

Puppeteer / Playwright screenshot automation

Minimal Node example:

/scripts/capture_fullpage.js

import puppeteer from 'puppeteer';

const url = process.argv[2];

(async () => {
  const browser = await puppeteer.launch({
    headless: "new",
    defaultViewport: null
  });

  const page = await browser.newPage();
  await page.goto(url, { waitUntil: 'networkidle0' });

  await page.screenshot({
    path: 'fullpage.png',
    fullPage: true
  });

  await browser.close();
})();

Run:

node capture_fullpage.js http://localhost:8787/explorer

Why THIS matches your ecosystem:

  • Automatable in your media-sync-api.
  • Could generate thumbnails or “scroll plates.”
  • Works headless on Pi cluster too.

⭐ If You Want MAX Quality (cinematic production)

Instead of PNG screenshot:

Render huge virtual viewport then capture

Example Puppeteer tweak:

await page.setViewport({
  width: 3840,
  height: 20000,
  deviceScaleFactor: 2
});

This gives:

  • Ultra-crisp scroll plates
  • Ideal for 4K/vertical video pan shots

(You can easily oversample and downscale in editing.)


⭐ OBS-Friendly Alternative (no browser tools)

If you want to stay inside OBS ecosystem:

Method:

  1. Load page as browser source.
  2. Set extremely tall height (example 8000 px).
  3. Use Source Record plugin or screenshot plugin.

BUT:

👉 OBS sometimes struggles with large GPU textures.
Browser capture tools are safer.


⭐ If Explorer Uses Lazy Loading (important)

Common gotcha.

Before screenshot:

  • Scroll page to bottom once
  • Or disable lazy loading in explorer UI
  • Or force asset prefetch mode

Otherwise half the thumbnails may be blank.


⭐ Bonus Tip (Huge For Your Editing Workflow)

Once you have the tall image:

In DaVinci Resolve:

  • Import PNG
  • Add to timeline
  • Use Transform → Position Y keyframes
  • Add easing curves
  • Add blur / vignette for depth

This looks VERY cinematic.

You’re basically simulating:

“Camera gliding over a digital landscape.”

Which fits perfectly with your overlay architecture videos.


⭐ My honest recommendation for YOU specifically

Given:

  • media-sync-api
  • explorer UI
  • cinematic production
  • DaVinci workflow
  • Raspberry Pi automation

👉 Automate Puppeteer capture as an API endpoint.

Then you can:

  • Generate scroll plates on demand
  • Store in MinIO or local DAM
  • Reuse across videos
  • Version them with projects

That aligns directly with your whole ecosystem.


If you want next, I can give:

✅ Python version (fits your API better)
✅ FFmpeg pan animation from the image
✅ Automated batch capture for multiple pages
✅ Direct OBS integration workflow
✅ Or cinematic editing recipe for Resolve

Just say 👍

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