Skip to content

Option to validate camera streams by fetching a snapshot image #406

Description

@Ullaakut

Description

Overview

Add an option to enhance stream validation by attempting to fetch a snapshot from each video stream, confirming camera accessibility not just through network or authentication checks but by retrieving an actual image frame from the stream.

Goals

  • Provide a configurable option to enable snapshot validation in Cameradar scan settings. Should be off by default.
  • When enabled, for each identified stream, attempt to fetch a snapshot (image frame) early in the validation process (ideally using ffmpeg or a similar tool).
  • Indicate in the results/report whether a snapshot was successfully retrieved for each stream.
  • Ideally, should allow specifying a destination path or output method for retrieved snapshots (e.g., local folder, stdout as base64, etc.)

Potential Solutions

  • Use ffmpeg to attempt to extract and save a single frame from the discovered video stream URLs.
    • Pros:
      • ffmpeg is widely available, reliable, and supports many protocols/streams.
      • Approach is scriptable and can run as part of the container.
    • Cons:
      • May increase scan time, especially on many streams.
      • Handling error cases for all types of camera endpoints may be complex.
      • If running Cameradar in a self-contained/self-destructing Docker container, displaying the image output is non-trivial—there’s no guaranteed terminal image support (see open questions).

Additional Info

Open Questions

  • How can the user best view these snapshots, considering Cameradar may be running in a disposable Docker container?
    • Is there a cross-terminal way to display images in modern terminals or should snapshots be written to disk or as downloadable files?
  • Does this approach significantly slow down scans and should it be off by default?

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement of existing features.featureFeature request/implementation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions