Add graphical telemetry overlay and instrument/map panels#230
Add graphical telemetry overlay and instrument/map panels#230magicalyak wants to merge 44 commits into
Conversation
Extract and display embedded telemetry data (speed, gear, autopilot status, GPS, steering angle, etc.) from Tesla dashcam videos recorded on firmware 2025.44.25+ with HW3/HW4. New options: --sei_overlay, --sei_format, --sei_position, --sei_speed_unit, --sei_font_size, --sei_export_csv
Added --sei_style option with 5 presets: - default: Clean white text with black outline - hud: Green heads-up display style - boxed: White text on semi-transparent dark background - minimal: Small, subtle gray text - bold: Large bold yellow text for visibility Added --sei_layout option with 6 presets: - compact: Single line with speed, gear, autopilot - full: Multi-line with all key telemetry data - speed-only: Large speed display only - driving: Speed, gear, brake, blinker - location: Speed with GPS coordinates - performance: Speed, throttle, g-forces
Document the new SEI telemetry overlay feature in README.rst including: - Feature description and firmware requirements (2025.44.25+) - All CLI options (--sei_overlay, --sei_format, --sei_position, etc.) - Style presets (default, hud, boxed, minimal, bold) - Layout presets (compact, full, speed-only, driving, location, performance) - Available format variables for custom overlays
- Fix movie duration display showing filename instead of duration (typo: movies_list[0][0] should be movies_list[0][1]) - Add dbus to Docker images and generate machine-id to fix notification warnings - Suppress notification stderr in headless/Docker environments
The SEI telemetry overlay feature intentionally displays vehicle data (including GPS coordinates) as a video overlay. Users explicitly opt-in via --sei_overlay flag. Exclude these paths from sensitive data warnings.
The SEI telemetry overlay intentionally displays vehicle data including GPS coordinates. Users explicitly opt-in via --sei_overlay flag.
Users can test SEI extraction using the main tool with --sei_overlay flag.
- Fix orphaned statements from previous refactoring attempt - Use query-filters to exclude false positive on telemetry file
- Upgrade codeql-action from v1 to v3 for query-filters support - Upgrade checkout action from v2 to v4 - Simplify query-filters to exclude by query ID only
…cators Render Pillow-based widgets (steering wheel, turn signals, brake indicator, accelerator gauge, speed display, gear indicator, GPS/heading) from SEI telemetry data. Uses state deduplication to only render unique frames, composited via FFmpeg overlay filter. New CLI flags: --sei_graphical, --sei_widget_position, --sei_widget_size, --sei_widgets, --sei_widget_theme
… Tesla yoke styling - Increase widget sizes across all presets for better visibility on 1920x960 video - Add DateTimeDisplayWidget showing clip timestamp in top-right corner - Use relative frame offsets with local timezone conversion for accurate time display - Tesla yoke steering wheel with 2x supersampled rendering and BICUBIC rotation - Vertical bar gauges for ACC (green) and BRK (red) flanking the steering wheel - Semi-transparent dark backgrounds on speed, gear, location, and datetime panels - Pass start_time from clip processing to graphical overlay settings - Replace debug logging with concise debug message
New widgets: autopilot indicator (OFF/TACC/AP/FSD with bolt icon), G-force display (numeric value + directional bubble on crosshair), compass display (heading degrees + direction + GPS coords), center cluster (composite panel with steering wheel, angle text, ACC/BRK gauges, and G-force). Dashboard layout arranges all telemetry in a top bar: [DateTime] [Speed+AP] [Cluster] [Gear+Turn] [Compass] Enhanced existing widgets: speed display shows autopilot badge, gear indicator has blue underline on active gear, datetime uses two-line format (date + time). Adds --sei_overlay_layout flag (dashboard/classic) to switch between the new clustered layout and the previous scattered style.
Redesign the dashboard layout to use proportional sizing that adapts to any video width (1280px front camera or 1920px multi-camera). Fix cross-platform font loading that was falling back to tiny bitmap fonts on macOS where FreeSans.ttf is unavailable. - Add get_font() helper in widgets/base.py with platform-aware font search (Helvetica on macOS, Arial on Windows, FreeSans on Linux) - Switch all 10 widget files to use centralized font loading - Make dashboard layout fully proportional (fractions of video width) - Improve Tesla yoke steering wheel shape with thicker rim, rounded grip end caps, symmetric arc gaps, and 3x supersampling - Fix center cluster layout to fit G-force display below gauges - Add adaptive text formatting for datetime and compass widgets to prevent truncation at narrower video widths - Update --sei_widgets help text with new widget names - Document graphical overlay feature and all CLI arguments in README
Aircraft-style artificial horizon showing road pitch with blue sky and brown ground halves separated by a tilting horizon line. Yellow reference crosshair stays fixed at center. Grade percentage displayed beside the indicator. Positioned below the compass widget in the dashboard layout.
Add two synthetic camera slots to the multi-camera layout system for displaying telemetry data alongside real camera feeds: - Instruments panel with steering wheel, ACC/BRK gauges, speed, gear, turn signals, compass, G-force, and longitudinal acceleration - Route map panel with speed-adaptive zoom and GPS position tracking Panels are enabled via --sei_panel and render as PNG frame sequences injected through FFmpeg concat demuxer. Each layout (FullScreen, Mosaic, Cross, Diamond, Horizontal) positions both panels automatically. Widget fixes: turn signal aspect ratio constraint, compass/datetime text overflow handling, elevation rewritten to show longitudinal g-force, cluster layout with ACC/BRK bars beside steering wheel.
When SEI telemetry options are specified but no data is found: - Log a warning explaining the requirement (firmware 2025.44.25+, HW3/HW4) - Disable telemetry panel camera slots to avoid black rectangles - Video continues processing normally without telemetry features
|
This PR addresses issue #190 (Map tile feature request) with the
|
Extract creation_time timestamp to a variable before string formatting to avoid multiline f-string syntax that requires Python 3.12+.
New layout places: - Top row: map (left), front (center), instruments (right) - Bottom row: left, rear, right Use with --layout TELEMETRYGRID --sei_panel
…nstruction The panel generation was happening AFTER the ffmpeg filter was built, so the panel concat paths were always None when constructing the filter. This moves the SEI extraction and panel generation to before the filter construction so the panel paths are available.
The concat demuxer was not being told the frame rate, causing
timing drift between the panel overlay and video streams.
Adding -r {fps} before the concat input ensures proper synchronization.
The original code extracted SEI data twice - once for panel generation and again for text overlay. This caused the panels to show different data than the text overlay since each extraction could start from different points. Now SEI data is extracted once before building the ffmpeg filter chain, and both panels and text overlay use the same sei_frames list.
…d 36 The TelemetryOverlaySettings was using the default 36 fps while the panel generation used the actual video fps. For 24 fps video, this caused a 1.5x timing mismatch between the instruments panel and the text overlay.
TelemetryGrid explicitly disables pillar cameras to make room for telemetry panels, but the argument processing was overwriting this with default values (include=True). This caused a 4-column layout instead of the intended 3-column grid.
… for encoding Tesla dashcam source is ~36fps but output is typically 24fps. The panels and overlays were using output fps causing them to drift behind the video. Now panels are generated at source fps (36) and converted to output fps during encoding.
|
Hey, Why this commit: "Lower Python requirement to 3.9.0 for broader compatibility"? I further see more commits coming in, so let me know once you're done and README.md etc.. is updated. Sorry, currently working on other projects so don't have time on this. |
|
I bumped it up to 3.13, no need to bring down
…On Mon, Feb 2, 2026 at 9:33 PM ehendrix23 ***@***.***> wrote:
*ehendrix23* left a comment (ehendrix23/tesla_dashcam#230)
<#230 (comment)>
Hey,
Appreciate all the work you're doing here. :-)
Why this commit: "Lower Python requirement to 3.9.0 for broader
compatibility
<7baf18a>
"?
I upped to 3.13 in last release so don't want to bring it back down.
—
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPBLAMTST7QMIJXP4WC45D4KACIBAVCNFSM6AAAAACTDJ653GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMZYGYZDMMZWGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Usage synopsis and help block were missing all SEI telemetry arguments, --camera_position, --camera_order, and --swap_pillar. Added the full SEI Telemetry Overlay argument group to the help text block and an ASCII layout diagram for TELEMETRYGRID.
Should be good to review with README updated now. |
|
Yes it's definitely possible let me see if I can add an option for that, I think the newer cars have six cameras so I was leaving them open but we could add another layout option for that to use 6 instead of 8. |
Use full absolute paths in FFmpeg concat files instead of basenames so FFmpeg can locate panel/overlay PNGs regardless of working directory. Add retry logic to temp directory cleanup for Windows file locking. Fix win32 default font path and escape colons for FFmpeg drawtext filter. Update tests to use pytest tmp_path and include telemetry cameras in expected clip order.
|
I'm just using the default for this test python3.13 -m tesla_dashcam.tesla_dashcam --sei_overlay --sei_speed_unit kmh --sei_panel --sei_panel_map --output "/mnt/c/tmp/dashcam/Dashtests/SavedClips/Test/Test.mp4" --no-notification "/mnt/c/tmp/dashcam/Dashtests/2026-03-06_18-16-12" --gpu --gpu_type nvidia --encoding x265 |
|
Type the layout option and also let me know if windows works now, I pushed
a few changes. The default is for those with pillar cams (6 cameras) but
the ``` --layout TELEMETRYGRID``` option should work for what you asked.
…On Wed, Mar 18, 2026 at 10:52 PM mattenz ***@***.***> wrote:
*mattenz* left a comment (ehendrix23/tesla_dashcam#230)
<#230 (comment)>
I'm just using the default for this test
python3.13 -m tesla_dashcam.tesla_dashcam --sei_overlay --sei_speed_unit
kmh --sei_panel --sei_panel_map --output
"/mnt/c/tmp/dashcam/Dashtests/SavedClips/Test/Test.mp4" --no-notification
"/mnt/c/tmp/dashcam/Dashtests/2026-03-06_18-16-12" --gpu --gpu_type nvidia
--encoding x265
—
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPBLALM7RML65M4AXHJBYT4RNOFDAVCNFSM6AAAAACTDJ653GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAOBXGMYTCMRUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Sorry, things had been pretty busy. I can confirm that "--layout TELEMETRYGRID" gives the layout I was looking for. Unfortunately, running on Windows is still giving an error - to me, it looks like the font location is messed up: I'm not overly familiar with Python myself and I know it's probably a bit yuck, but I did have a go with Claude to try make some changes to get it working. While I was able to make the Font location look right, I started getting some different errors that kinda stumped Claude when it started suggesting changes and I pointed out that those same lines work fine on Ubuntu |
Use single quotes around font and ASS file paths in FFmpeg filter strings instead of backslash-escaping colons. The backslash escape approach fails because FFmpeg's filtergraph parser consumes the backslash before the option parser sees it, so C\: still gets split on the colon. Single quotes protect the entire path from parsing.
Use os.path.isabs() and os.path.join() instead of blindly prepending c:\ to the font path. The old approach broke when users passed an absolute path via --font since it would produce c:\C:\... double drive letter paths.
|
@mattenz I pused some fixes, let me know if windows works now. |
|
Still giving an invalid argument error. I'm guessing it's still an issue of formatting the font location as its path is formatted different to the other file locations in the command arguments. |



Summary
New CLI Options
--sei_graphical- Enable graphical widget overlay on video--sei_panel- Add instrument/map panels as camera slots in the layout--sei_panel_map/--no-sei_panel_map- Toggle route map panel (default: enabled)--sei_overlay_layout- Layout style: dashboard (top bar) or classic (scattered)--sei_widget_position- Widget position for classic layout--sei_widget_size- Size preset (small/medium/large)--sei_widgets- Comma-separated widget selection--sei_widget_theme- Color themeTelemetry Panels
The panel feature adds dedicated instrument and map displays as camera slots alongside real camera feeds. Each multi-camera layout (FullScreen, Mosaic, Cross, Diamond, Horizontal) positions both panels automatically.
Panels render as PNG frame sequences with state deduplication, injected via FFmpeg concat demuxer.
Widget System
12 individual widgets with a shared theme and font system:
steering, turn signals, brake, accelerator, speed, gear, datetime, autopilot status, G-force, compass, center cluster (composite), elevation/acceleration
Test Plan