Skip to content

wildcards produce different detection than file by file run #138

@Solarbytes

Description

@Solarbytes

Bug/Issue Description: EDITED - FPS was correctly detected by DVR-scan, older clips did not have that discrepancy which led me to think that the frame rate was incorrectly detected by DVR-scan. The recording device is a SBC (pcduino3 nano). It has an A20 CPU @1GHZ and 1GB RAM, so theoretically, it should be up to the job... not sure what could explain this drop in FPS on 3 clips out of the set of 4.

I am scanning dashcam footage for human movement near my car. When I run dvr-scan -i 2023-08-06_13-54-20*.mp4 -- threshold 200, I get one motion detection and the output is a combination of two different clips. I believe that this is caused by the following discrepancy detected by dvr-scan:
_INFO: video_joiner._load_input_videos(): Opened video 2023-08-06_13-54-20-back.mp4 (1280 x 960 at 32.396 FPS).
INFO: video_joiner._load_input_videos(): Appending video 2023-08-06_13-54-20-front.mp4 (1280 x 960 at 23.976 FPS).
WARNING: video_joiner.load_input_videos(): Warning: framerate does not match first input. Timecodes may be incorrect.

This somehow causes the program to identify the change from clip 1 to clip 2 as a motion, while it is just the transition between two clips.

Required Information:

Provide a full copy of the command line options you are using, and add --verbosity debug, for example:

root@gaetano-MacBookAir:/mnt/tesladrive# dvr-scan -i /mnt/tesladrive/RecentClips/2023-08-06/2023-08-06_13-54-20*.mp4 --threshold 200 --verbosity debug
INFO: controller._init_dvr_scan(): DVR-Scan v1.5.1
DEBUG: controller._init_dvr_scan(): User config file not found.
DEBUG: controller._init_dvr_scan(): Parsing program options.
INFO: scanner.__init__(): Initializing scan context...
INFO: video_joiner._load_input_videos(): Opened video 2023-08-06_13-54-20-back.mp4 (1280 x 960 at 32.396 FPS).
INFO: video_joiner._load_input_videos(): Appending video 2023-08-06_13-54-20-front.mp4 (1280 x 960 at 23.976 FPS).
WARNING: video_joiner._load_input_videos(): Warning: framerate does not match first input. Timecodes may be incorrect.
INFO: video_joiner._load_input_videos(): Appending video 2023-08-06_13-54-20-left_repeater.mp4 (1280 x 960 at 23.976 FPS).
WARNING: video_joiner._load_input_videos(): Warning: framerate does not match first input. Timecodes may be incorrect.
INFO: video_joiner._load_input_videos(): Appending video 2023-08-06_13-54-20-right_repeater.mp4 (1280 x 960 at 24.000 FPS).
WARNING: video_joiner._load_input_videos(): Warning: framerate does not match first input. Timecodes may be incorrect.
DEBUG: scanner.scan_motion(): Using detector MOG2 with params: kernel_size = 5
INFO: scanner.scan_motion(): Scanning 4 input videos for motion events...
Detected: 1 | Progress:  98%|██ 5976/6116 [02:13<00:03, 44.92 frames/s]
ERROR: scanner.scan_motion(): Failed to decode 4 frame(s) from video, timestamps may be incorrect. Try re-encoding or remuxing video (e.g. ffmpeg -i video.mp4 -c:v copy out.mp4). See https://github.com/Breakthrough/DVR-Scan/issues/62 for details.
INFO: scanner._post_scan_motion(): Processed 5976 frames read in 133.0 secs (avg 44.9 FPS).
INFO: scanner._post_scan_motion(): Detected 1 motion events in input.
INFO: scanner._post_scan_motion(): List of motion events:
-------------------------------------------------------------
|   Event #    |  Start Time  |   Duration   |   End Time   |
-------------------------------------------------------------
|  Event    1  |  00:00:57.7  |  00:00:04.5  |  00:01:02.2  |
-------------------------------------------------------------
INFO: scanner._post_scan_motion(): Comma-separated timecode values:
00:00:57.724,00:01:02.200
INFO: scanner._post_scan_motion(): Motion events written to disk.

Expected Behavior:
With a threshold of 200, I was expecting no motion detection in the 4 clips involved.

Computing Environment:

  • OS: Linux Mint (5.15.0-78-generic 85-Ubuntu SMP)
  • Python Version: Python 3.10.12
  • OpenCV Version: 4.8.0

Additional Information:
NA

Media [Videos/Images/Screenshots]:
2023-08-06_13-54-20-back.DSME_0001.avi.zip

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions