iPhone app that reads dashcam footage from a USB drive and uploads it to a Samba share on an Unraid NAS. Supports Tesla and Rivian (more vehicles easy to add).
A Docker-based web interface for viewing dashcam footage with timeline filtering, video playback, GPU-accelerated thumbnails, and cloud provider sync.
- Multi-path support: Scan footage from
/dataDocker volume mounts - Vehicle detection: Automatically detects Tesla and Rivian footage from folder structure
- Event filtering: Filter by vehicle type, event type (drivecam, activations, gear guard), camera angle, folder, and date range
- Timeline UI: Dark theme interface with video player and thumbnail previews
- GPU-accelerated thumbnails: FFmpeg with CUDA decode for fast thumbnail generation
- Video streaming: HTTP Range support for seeking within videos
- Thumbnail caching: FFmpeg-generated thumbnails with SQLite metadata cache
- Cloud provider sync: iCloud, Google Drive, OneDrive, Dropbox with OAuth authentication
- Remote share streaming: SMB/FTP/NFS clips stream directly from network shares
# Clone and run
cd /mnt/user/appdata
git clone https://github.com/frindle/iphone-drive-cam-backup.git
cd iphone-drive-cam-backup
docker compose up -dAccess at http://<unraid-ip>:8000
cd /mnt/user/appdata/iphone-drive-cam-backup
git pull origin main
docker compose up -dThe Docker image includes nvidia/cuda:12.1.0-runtime and FFmpeg with CUDA support. Requires:
- NVIDIA GPU passthrough to the container
nvidia-container-toolkitinstalled on the hostruntime: nvidiain docker-compose (already configured)
If no GPU is available, thumbnails fall back to CPU encode.
volumes:
- /mnt/user/data/Media/Drivecam:/data:roChange the host path to match your actual footage location.
- Go to Settings → Cloud
- Click Connect for your provider (iCloud, Google Drive, OneDrive, Dropbox)
- Authenticate via OAuth popup
- Click Sync to scan and import clips
Cloud clips stream directly from the provider — no additional storage needed.
| Variable | Default | Description |
|---|---|---|
DATA_PATH |
/data |
Base path for dashcam footage |
SHARE_PATH |
/data |
Legacy mount path |
STATIC_PATH |
/app/backend/static |
Frontend build output |
# Backend
cd web/backend
pip install -r requirements.txt
python main.py
# Frontend
cd web/frontend
npm install
npm run devSee web/README.md for full documentation.
- Plug your dashcam USB drive into your iPhone via a USB-C adapter
- Open the app, tap Select USB Drive, and navigate to the drive root in Files
- The app detects the vehicle (Tesla or Rivian) from the folder structure
- Tap Start Upload — files are copied to your NAS over SMB
Destination on NAS: //host/share/BasePath/Vehicle/ClipFolder/filename
Example: //unraid.local/Media/DashCam/Tesla/RecentClips/2024-01-15_clip.mp4
- Open Xcode → File > New > Project
- Choose iOS > App
- Settings:
- Product Name:
DriveCamBackup - Interface: SwiftUI
- Language: Swift
- Uncheck "Include Tests" for now
- Product Name:
- Save it inside this repo folder (
iphone-drive-cam-backup/)
AMSMB2 handles the SMB connection to your NAS.
- In Xcode: File > Add Package Dependencies
- Enter URL:
https://github.com/amosavian/AMSMB2 - Select Up to Next Major Version from
2.0.0 - Click Add Package, then Add to DriveCamBackup target
Delete the auto-generated ContentView.swift that Xcode created, then drag these folders into the Xcode project navigator (check "Copy items if needed"):
DriveCamBackup/
├── DriveCamBackupApp.swift
├── Models/
│ ├── VehicleType.swift
│ └── SMBConfig.swift
├── Services/
│ ├── VehicleDetector.swift
│ ├── DriveScanner.swift
│ └── SMBUploader.swift
└── Views/
├── ContentView.swift
├── SettingsView.swift
└── UploadView.swift
In Xcode, select your app target → Info tab → add these keys:
| Key | Value |
|---|---|
NSLocalNetworkUsageDescription |
Used to upload dashcam footage to your home NAS over SMB. |
Privacy - Local Network Usage Description |
same as above |
Connect your iPhone, select it as the run destination, and hit Run (⌘R).
The Rivian vehicle folder name on the USB drive is currently set to RIVIAN_DASHCAM (placeholder).
Check your Rivian's USB drive root and update the value in VehicleType.swift:
case .rivian:
return "RIVIAN_DASHCAM" // ← update thisAlso verify the clip subfolders (clipFolders in VehicleType.swift) match what Rivian creates.
- Add a new case to
VehicleTypeenum (VehicleType.swift) - Fill in
usbRootFolder,nasFolder, andclipFolders - That's it — detection, scanning, and upload all use the enum automatically