Skip to content

Skip detect pipeline when detect.enabled is false #144

Done

Description

@actran

What problem does this solve?

When a camera has detect.enabled: false (object detection disabled), the ffmpeg detect pipeline still runs, wasting CPU resources.

Example: A sidewalk_180 camera with a 2560×720 stitched 180° feed:

sidewalk_180:
  ffmpeg:
    inputs:
      - path: rtsp://127.0.0.1:8554/sidewalk_180
        roles: [detect, record, audio]  # detect role required by Fregata
  detect:
    enabled: false  # no inference runs

The runtime ffmpeg command still includes the detect pipeline:

-r 5 -vf fps=5,scale=2560:720 -threads 2 -f rawvideo -pix_fmt yuv420p pipe:

This consumes ~17% CPU on an M2 Mac Mini for a pipeline whose output is never used — no inference runs, no trackers initialize, no snapshots or review items are generated from it.

After reducing the detect resolution to 1280×360 (the only workaround), CPU dropped to ~3% — an 82% reduction.

Proposed solution

In frigate/config/camera/camera.py (or wherever create_ffmpeg_cmds is called), skip generating the detect pipeline output when detect.enabled is false for that camera.

The detect role should still be required (for Fregata validation), but the actual ffmpeg output for the detect role should only be created when detection is enabled.

Impact:

  • Users who disable detection on specific cameras (e.g., for recording-only cameras, 180°/fisheye cameras, or cameras where detection quality is poor) would save significant CPU
  • No breaking change — detection-enabled cameras are unaffected
  • The detect role requirement for validation can remain

Alternatives considered

No response

Pre-flight checks

  • I searched existing issues and discussions and found no similar request.
  • This is specific to Fregata's macOS experience, not a general Frigate feature request (which belongs upstream).

Activity

  1. added
    enhancement
    on Nov 28, 2026
  2. locked and limited conversation to collaborators on Nov 28, 2026
  3. converted this issue into a discussion #145 on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions