Skip to content

Latest commit

Β 

History

History
89 lines (68 loc) Β· 5.64 KB

File metadata and controls

89 lines (68 loc) Β· 5.64 KB

TripTrail β€” cinematic travel map animations

TripTrail

Turn any trip into a cinematic animated map video β€” right in your browser.
A free, no-watermark, no-API-key travel map animation studio.

β–ΆΒ Β Live demo β€” travel-map-animator.vercel.app

deploy stack maplibre webcodecs license


🎬 Demo

TripTrail demo β€” a ferry follows real shipping lanes from Venice to Athens on a satellite map

β–ΆΒ Β Watch the full demo video (original 1080p60)
A 17-stop round-the-world trip, rendered offline at constant 60 fps by the in-browser engine itself.

✨ Features

🎞️ Rendered, not recorded Export steps a deterministic timeline frame-by-frame through WebCodecs (H.264 + AAC via mp4-muxer) at constant 30/60 fps β€” output smoothness never depends on how fast your machine renders
πŸ—ΊοΈ Build routes 3 ways Search cities, click the map, or type "Lisbon to Madrid by train, then Barcelona by car" (English & δΈ­ζ–‡)
πŸš„ 10 transport modes Plane, train, car, bus, boat, bike, walk, camper, motorcycle, tuk-tuk β€” hand-drawn vector icons; the plane banks along its smoothed heading
🌊 Real sea lanes Boats follow the global shipping network (Eurostat SeaRoute + Dijkstra) β€” through the Strait of Hormuz, not across it
πŸ›£οΈ Real roads & rail corridors Cars/buses via OSRM; trains follow ground corridors up to 3 000 km
✈️ True great circles Long flights curve toward the poles and cross the antimeridian correctly β€” Tokyo β†’ LA flies the Pacific
🌍 Globe & satellite MapLibre v5 globe projection with camera-accurate far-side occlusion; free Esri satellite imagery as the default style
πŸŽ₯ Cinematic camera Look-ahead tracking, gentle zoom/pitch arcs mid-leg, punch-in with a pulse ripple at every arrival, overview pullback finale
🎡 Music, photos & titles A music track is decoded, looped/faded to length and muxed as AAC; polaroid photo pop-ups per stop; title card and lower-third captions
πŸ“‚ Import GPX / KML / GeoJSON with per-stop mode β€” try the bundled demo-journey.geojson
🎨 7 map styles · 4 aspect ratios Satellite, Voyager, Eclipse, Dark Matter, Liberty, Fiord, Positron · 16:9, 9:16, 1:1, 4:5 · custom accent color · optional watermark (off by default)
πŸ“± Responsive Collapsible sidebar, mobile drawer layout, touch-friendly controls

πŸš€ Quick start

Online: open the live demo, press β–Ά Preview, then ⏺ Record video.

Locally β€” it's a static site, any server works:

git clone https://github.com/Fangyuan025/triptrail.git
cd triptrail
python3 -m http.server 8742
# open http://localhost:8742

🧭 How it works

  1. Plan β€” stops are geocoded with Nominatim; each leg picks a routing engine by transport mode: OSRM for ground, a Dijkstra search over the SeaRoute marine network for boats, great-circle interpolation for long flights.
  2. Timeline β€” the whole story (camera, trail reveal, vehicle, heading, pulses, titles, photos) is a pure function of time, built as intro β†’ approach β†’ travel β†’ arrival β†’ photo β†’ pullback phases.
  3. Preview β€” the timeline plays at wall-clock speed on the live map; the route trail is one GPU line source revealed by a line-progress gradient, so nothing re-tessellates per frame.
  4. Export β€” the camera first sweeps the route to warm the tile cache, then the timeline is stepped frame-by-frame: each frame waits for tiles, is composited to canvas, and encoded with VideoEncoder; music is rendered offline and muxed as AAC. The result is a constant-fps MP4 with no watermark. (WebM or missing WebCodecs falls back to realtime capture.)

πŸ™ Free data & tools

What Source
Map tiles Esri World Imagery Β· OpenFreeMap Β· VersaTiles Β· CARTO
Geocoding Nominatim (OpenStreetMap)
Road routing OSRM demo server
Shipping lanes Eurostat SeaRoute marine network
Rendering MapLibre GL JS v5
Video muxing mp4-muxer

Map data Β© OpenStreetMap contributors. Satellite imagery Β© Esri, Maxar, Earthstar Geographics.

πŸ“„ License

MIT Β© 2026 Fangyuan Lin