Automatically generate a cinematic vlog video from iPhone MP4 clips with Mapbox map transitions between scenes.
- 🎬 Automatic Metadata Extraction: Extracts timestamps from iPhone MP4 videos (uses recording date)
- 🗺️ Mapbox Transitions: Generates static map images with animated dot transitions between scenes
- 📍 Location Inheritance: Scenes inherit location from previous scene if not specified
- 🎥 Remotion Composition: Creates a professional vlog video with smooth transitions
- ⚡ Smart Transitions: Only shows map transitions when location actually changes
-
Install Dependencies
npm install
-
Configure Mapbox Token
cp .env.example .env # Edit .env and add your MAPBOX_ACCESS_TOKEN -
Add Your Videos
- Place your iPhone MP4 videos in
assets/videos/ - Videos will be automatically sorted by recording timestamp
- Place your iPhone MP4 videos in
-
Extract Metadata
npm run extract-metadata
- Scans
assets/videos/for MP4 files - Extracts timestamps (uses recording date from
DateTimeOriginal) - Generates
data/scenes.jsonwith all scenes sorted chronologically
- Scans
-
Add Location Annotations
- Edit
data/locations.json - Add video-to-location mappings in
videoLocations:
{ "videoLocations": { "IMG_9843.mp4": "LGA", // Use alias "IMG_9845.mp4": "MCO", "IMG_9863.mp4": "MAGIC_KINGDOM", "IMG_9883.mp4": { "lat": 28.3714061, "lng": -81.5489587 } // Or direct coordinates } }- Available aliases:
LGA,MCO,HYATT_HOTEL,DISNEY_SPRINGS,MAGIC_KINGDOM,ANIMAL_KINGDOM,EPCOT,HOLLYWOOD_STUDIOS - Scenes without location annotations inherit from the previous scene
- Only add locations for scenes where the location changes (park transitions)
- Edit
-
Generate Maps
npm run generate-maps
- Creates Mapbox static images only for transitions where location changes
- Skips transitions when consecutive scenes have the same location
- Saves maps to
assets/maps/and metadata todata/maps.json
-
Preview
npm run remotion:preview
- Opens Remotion Studio for preview
- Map transitions only appear when location changes between scenes
-
Render
npm run remotion:render
- Renders final video to
out/vlog.mp4(1080p)
- Renders final video to
disney/
├── assets/
│ ├── videos/ # Your iPhone MP4 files
│ └── maps/ # Generated Mapbox images
├── data/
│ ├── scenes.json # Auto-generated scene metadata (timestamps)
│ ├── locations.json # Location aliases and video-to-location mappings
│ └── maps.json # Generated map metadata (pixel coordinates, etc.)
├── src/
│ ├── compositions/ # Remotion components
│ ├── scripts/ # CLI tools
│ ├── utils/ # Utilities (metadata, mapbox, location resolver)
│ └── types/ # TypeScript types
└── out/ # Rendered video output
- Node.js 18+
- Mapbox access token (get one at https://mapbox.com)
- iPhone MP4 videos (timestamps extracted automatically)
- Video Location Mapping: Check
locations.json→videoLocations[videoFilename]- If alias string (e.g.,
"MAGIC_KINGDOM") → resolve fromaliasesdictionary - If Location object → use directly
- If alias string (e.g.,
- Scene Location: Fallback to
scene.locationinscenes.json(if manually added) - Inheritance: If neither exists, inherit location from previous scene
- Undefined: Only undefined if no previous scene to inherit from
- Maps are only generated/rendered when location changes between consecutive scenes
- If scene A and scene B have the same location, no transition is shown
- This prevents unnecessary transitions when staying at the same park/location
- Timestamps are extracted from video recording date (
DateTimeOriginalfield) - Location annotations are stored in
data/locations.jsonfor easy editing - Map images are cached - won't re-download if they exist
- Mapbox free tier: 100k requests/month (plenty for this project)
- Map images are generated at 1280x720 (within Mapbox API limits) and scaled in Remotion