a38964a1b4638c42a9a19478ba793b771de64059
TeslaCam View
A Flask web app for browsing and playing TeslaCam (Tesla Dashcam/Sentry) recordings from a local drive. It scans a TeslaCam folder for video files, categorizes them by camera view, and presents them in a dark, Tesla-styled web interface with synchronized multi-angle playback.
Features
- Recursive scan of the TeslaCam directory tree (
RecentClips,SavedClips,SentryClips, etc.) for.mp4files matching the TeslaCam naming conventionYYYY-MM-DD_HH-MM-SS-${camera_view}.mp4. - Categorization by camera view — front, left repeater, right repeater, rear, left pillar, right pillar — with friendly display names.
- Multi-angle synchronized playback — clips sharing the same timestamp are grouped so you can switch between camera angles for the same moment.
- Search & sort — filter clips by filename, sort oldest-first or A–Z.
- Safe streaming — videos are served via Flask with path resolution relative to the configured TeslaCam root.
- Dark Tesla-themed UI built with responsive HTML/CSS (no build step).
Project Structure
tesla-cam-view-1/
├── videoplayer.py # Flask app: scanning, routing, video streaming
├── requirements.txt # Python dependencies (Flask)
├── templates/
│ ├── index.html # Main page: camera tabs, player, clip list
│ └── camera_view.html # Single-camera view page
└── README.md
Requirements
- Python 3.x
- Flask (see
requirements.txt)
Setup
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Configure the TeslaCam directory by editing
TESLACAM_DIRECTORYinvideoplayer.py:TESLACAM_DIRECTORY = r'W:\2026\USA2026\TeslaCam'Point this to the root folder containing your
RecentClips,SavedClips, andSentryClipssubfolders.
Usage
Run the app:
python videoplayer.py
Then open http://localhost:5000 in your browser.
- The main page lists all clips grouped by camera view with a player and searchable clip list.
- Click a clip to play it; use the camera switch buttons to jump between angles for the same timestamp.
- The
/camera/<view>route shows all clips for a single camera.
Routes
| Route | Description |
|---|---|
/ |
Main page with all videos categorized by camera view |
/camera/<camera_view> |
All videos for a single camera view |
/video/<path:filepath> |
Streams a video file from the TeslaCam directory |
Camera Views
| Key | Display Name |
|---|---|
front |
Front |
left_repeater |
Left Repeater |
right_repeater |
Right Repeater |
rear |
Rear |
left_pillar |
Left Pillar |
right_pillar |
Right Pillar |
Notes
- The app runs with
debug=Trueby default — disable this for production use. - The TeslaCam directory must be accessible from the machine running the app (e.g., a mounted USB drive or network share).
- Filename parsing assumes the standard TeslaCam naming format; files not matching the regex are ignored.
Languages
Python
33.2%
JavaScript
31%
CSS
22.6%
HTML
13.2%