dashcam: re-enable screen recorder, disable training data video

- Re-enable FrogPilot OMX screen recorder (H.264 MP4, 1440x720, 2Mbps)
- Auto-start recording when car is on, auto-stop when off
- Hide all recorder UI elements (invisible to driver)
- Add ScreenRecorderDebug param for bench testing without car
- Disable encoderd (camera .hevc files) — CAN/sensor logs still recorded
- Raise deleter free space threshold from 5GB to 9GB
- Deleter rotates oldest videos before log segments
- Add CLAUDE.md project documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-11 07:28:30 +00:00
parent e2a0c1894a
commit 8ae7ef6eaf
9 changed files with 325 additions and 14 deletions

View File

@@ -132,13 +132,20 @@ void ScreenRecorder::stop() {
}
void ScreenRecorder::update_screen() {
if (!uiState()->scene.started) {
bool car_on = uiState()->scene.started || uiState()->scene.screen_recorder_debug;
if (!car_on) {
if (recording) {
stop();
}
return;
}
if (!recording) return;
// CLEARPILOT: auto-start recording when car is on (or debug flag set)
if (!recording) {
start();
return;
}
if (milliseconds() - started > 1000 * 60 * 3) {
stop();

View File

@@ -229,6 +229,7 @@ def manager_init(frogpilot_functions) -> None:
("ScreenBrightnessOnroad", "101"),
("ScreenManagement", "1"),
("ScreenRecorder", "1"),
("ScreenRecorderDebug", "1"),
("ScreenTimeout", "30"),
("ScreenTimeoutOnroad", "30"),
("SearchInput", "0"),

View File

@@ -62,8 +62,9 @@ procs = [
PythonProcess("timed", "system.timed", always_run, enabled=not PC),
PythonProcess("dmonitoringmodeld", "selfdrive.modeld.dmonitoringmodeld", driverview, enabled=(not PC or WEBCAM)),
NativeProcess("encoderd", "system/loggerd", ["./encoderd"], allow_logging),
NativeProcess("stream_encoderd", "system/loggerd", ["./encoderd", "--stream"], notcar),
# CLEARPILOT: disabled video encoding (camera .hevc files) — CAN/sensor logs still recorded via loggerd
# NativeProcess("encoderd", "system/loggerd", ["./encoderd"], allow_logging),
# NativeProcess("stream_encoderd", "system/loggerd", ["./encoderd", "--stream"], notcar),
NativeProcess("loggerd", "system/loggerd", ["./loggerd"], allow_logging),
NativeProcess("modeld", "selfdrive/modeld", ["./modeld"], only_onroad),
#NativeProcess("mapsd", "selfdrive/navd", ["./mapsd"], only_onroad),

View File

@@ -919,14 +919,14 @@ void AnnotatedCameraWidget::initializeFrogPilotWidgets() {
animationFrameIndex = (animationFrameIndex + 1) % totalFrames;
});
// Initialize the timer for the screen recorder
// QTimer *record_timer = new QTimer(this);
// connect(record_timer, &QTimer::timeout, this, [this]() {
// if (recorder_btn) {
// recorder_btn->update_screen();
// }
// });
// record_timer->start(1000 / UI_FREQ);
// CLEARPILOT: screen recorder timer — feeds frames to the OMX encoder
QTimer *record_timer = new QTimer(this);
connect(record_timer, &QTimer::timeout, this, [this]() {
if (recorder_btn) {
recorder_btn->update_screen();
}
});
record_timer->start(1000 / UI_FREQ);
}
void AnnotatedCameraWidget::updateFrogPilotWidgets() {
@@ -1016,7 +1016,7 @@ void AnnotatedCameraWidget::paintFrogPilotWidgets(QPainter &p) {
drawSLCConfirmation(p);
}
// recorder_btn->setVisible(scene.screen_recorder && !mapOpen);
// CLEARPILOT: screen recorder runs invisibly, no UI button shown
recorder_btn->setVisible(false);
}

View File

@@ -391,6 +391,7 @@ void ui_update_frogpilot_params(UIState *s) {
scene.screen_brightness = screen_management ? params.getInt("ScreenBrightness") : 101;
scene.screen_brightness_onroad = screen_management ? params.getInt("ScreenBrightnessOnroad") : 101;
scene.screen_recorder = screen_management && params.getBool("ScreenRecorder");
scene.screen_recorder_debug = params.getBool("ScreenRecorderDebug");
scene.screen_timeout = screen_management ? params.getInt("ScreenTimeout") : 120;
scene.screen_timeout_onroad = screen_management ? params.getInt("ScreenTimeoutOnroad") : 10;
scene.standby_mode = screen_management && params.getBool("StandbyMode");

View File

@@ -231,6 +231,7 @@ typedef struct UIScene {
bool road_name_ui;
bool rotating_wheel;
bool screen_recorder;
bool screen_recorder_debug;
bool show_aol_status_bar;
bool show_cem_status_bar;
bool show_jerk;