Files
clearpilot/DASHCAM_PROJECT.md
Brian Hanson ed9c14616a offroad UI: replace stock home with clean grid launcher
- Strip out date, version, update/alert widgets from OffroadHome
- Replace with grid layout: Dashcam and Settings buttons
- Skip sidebar when tapping splash screen
- Settings button still opens original comma settings
- Dashcam button placeholder (viewer not yet built)
- Add DASHCAM_PROJECT.md with plans for footage viewer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 07:41:47 +00:00

2.4 KiB

Dashcam Project

Status

Completed (2026-04-11)

  • Disabled comma training data video encoding (encoderd) — CAN/sensor logs still recorded
  • Re-enabled FrogPilot OMX screen recorder (H.264 MP4, 1440x720, 2Mbps, hardware encoded)
  • Auto-start/stop recording tied to car ignition (scene.started)
  • ScreenRecorderDebug param for bench testing without car connected
  • Hidden all recorder UI elements — invisible to driver
  • Videos saved to /data/media/0/videos/YYYYMMDD-HHMMSS.mp4, 3-minute segments
  • Deleter updated: 9 GB free space threshold, rotates oldest videos first
  • Cleaned up offroad UI: replaced stock home screen with grid launcher (Settings + Dashcam buttons)

Next: Dashcam Footage Viewer

Build a native Qt widget accessible from the offroad home screen "Dashcam" button.

Requirements:

  • List MP4 files from /data/media/0/videos/ sorted newest first
  • Tap a file to play it back using Qt Multimedia (QMediaPlayer + QVideoWidget)
  • Only accessible when offroad (car in park or off)
  • Back button to return to offroad home
  • No rotation hacks needed — native Qt widget in existing UI tree handles rotation correctly

Architecture:

  • New widget class (e.g. DashcamViewer) added to selfdrive/ui/qt/
  • Wire into HomeWindow's QStackedLayout alongside home, onroad, ready, driver_view
  • Dashcam button in OffroadHome switches slayout to the viewer
  • Viewer has a file list view and a playback view (sub-stacked layout)
  • Back button returns to OffroadHome
  • Build: add to qt_src list in selfdrive/ui/SConscript, link Qt5Multimedia

Previous webview attempts (abandoned):

  • Brian tried QWebEngineView for browser-based playback but the WebEngine subprocess renders independently of Qt's widget tree
  • Screen rotation (view.rotate(90), Wayland wl_surface_set_buffer_transform) did not work for WebEngine content
  • Native Qt widget approach avoids this problem entirely

Key Files

File Role
selfdrive/frogpilot/screenrecorder/screenrecorder.cc Recording logic, auto-start/stop
selfdrive/frogpilot/screenrecorder/omx_encoder.cc OMX H.264 hardware encoder
selfdrive/ui/qt/onroad.cc Timer driving frame capture
selfdrive/ui/qt/home.cc Offroad home with Dashcam button
system/loggerd/deleter.py Storage rotation
/data/media/0/videos/ Video output directory