Skip to main content

WPlace Timelapse Recorder

PythonPlaywrightTimelapseAutomation

Overview

Automatically captures map timelapses from WPlace archives — screenshots every historical snapshot at your chosen location and assembles them into an MP4 video. Built primarily to document the Spanish invasion of Moroccan territories visible on the WPlace canvas over time.

Supported Archives

SiteSnapshotsPeriodCommand
Samuel Scheit~40Aug 2025 – May 2026./start.sh samuel
Eralyon~250+Aug 2025 – Jun 2026./start.sh eralyon

Quick Start

./start.sh eralyon
  1. A Chromium window opens to the archive
  2. Pan & zoom to the area you want to document
  3. Click the red Start Recording button at the top of the page
  4. The script steps through every snapshot, overlays the date, and produces an MP4

Output saved to eralyon_output/run_<timestamp>/ or samuel_output/run_<timestamp>/.

Architecture

Single-file Playwright agents that launch headed Chromium, inject a floating “Start Recording” button, iterate all snapshots (oldest → newest), screenshot the map, overlay the date via Pillow, and assemble the MP4 via FFmpeg.

Playwright → Headed Chromium → Inject recording button
    → Iterate slider snapshots (oldest → newest)
    → Wait for MapLibre tiles to load
    → Screenshot composited map
    → Overlay date (Pillow)
    → FFmpeg → MP4

Requirements

  • Python 3
  • Playwright for Python (auto-installed)
  • FFmpeg

Tech Stack

CategoryTechnology
Browser AutomationPlaywright (Python)
Image ProcessingPillow
Video EncodingFFmpeg (libx264, CRF 18)
Map RenderingMapLibre GL (via browser)
LicenseThe Unlicense

Key Technical Details

  • Uses Object.getOwnPropertyDescriptor to bypass React’s intercept of the slider value setter
  • Waits for .maplibregl-tile-loading / .maplibregl-image-loading selectors to disappear (up to 20s)
  • Extra 2.5s settle time for tile rasterisation
  • Screenshots via Playwright’s built-in compositing (avoids WebGL preserveDrawingBuffer issues)
  • Date labels parsed from hash params (Samuel) or slider label (Eralyon)

Future Features

  • Date range filtering: ./start.sh eralyon s=06-12-2025 e=07-02-2026
  • Configurable frame rate: fps=4
  • Both combinable: ./start.sh eralyon s=01-01-2026 e=01-06-2026 fps=2