DVR-Scan is detecting wrong framerate.
Iam trying to find the person who drove in to my car and need to analyze 1 week of footage from my Dahua recorder. |
using the following command: dvr-scan.exe -i "d:\schade*.mp4" -r -l 00:00:02
It does not output any file, even though a lot of things happing on the footage (motion).
I am afraid it has something to do with the FPS being detect wrong: DVR-Scan] Appending video Thuis_ch3_main_20241001100001_20241001110001.mp4 (3840 x 2160 at 100.000 FPS).
videos are only 14.99FPS:
Sample file: https://github.com/user-attachments/assets/77df07ea-b12e-4c96-b81c-de41fa006240
Try using the --mask-output flag to see what each frame looks like after processing. You might need to tune some parameters like When I process the sample video you provided, it shows the framerate correctly.
With VLC, I see the resolution of the video as 4k:
Even with the wrong framerate, the output should still be correct with the default output mode, it will just display at the wrong speed. That being said, everything looks fine when I run that sample video:
INFO: controller.parse_settings(): DVR-Scan 1.6.1
DEBUG: controller.parse_settings(): Program arguments:
Namespace(scan_only=True, thumbnails=None, use_pts=False, debug=False, input=['issue-174.mp4'], verbosity='debug', mask_output='mask.avi')
INFO: controller.run_dvr_scan(): Initializing scan context...
INFO: video_joiner._load_input_videos(): Opened video issue-174.mp4 (3840 x 2160 at 14.988 FPS).
DEBUG: scanner._handle_regions(): No regions selected.
INFO: scanner.scan(): Using subtractor MOG2 with kernel_size = 7 (auto), variance_threshold = auto and learning_rate = auto
INFO: scanner.scan(): Scanning input video for motion events...
DEBUG: video_joiner.read(): No more input to process.
Detected: 0 | Progress: 125 frames [00:06, 19.48 frames/s]
INFO: controller.run_dvr_scan(): Processed 125 frames read in 6.5 secs (avg 19.1 FPS).
INFO: controller.run_dvr_scan(): No motion events detected in input.
See if you can find a sample video with some motion in it, and generate a mask file for that area. You should see white pixels where motion is supposed to be - if not, try tuning the kernel size and threshold accordingly.
Hmm I just did some testing and I see the Windows release of v1.6.1 does indeed show the wrong framerate. However, I still get a mask file generated, and the mask looks correct. The speed of the file is wrong since it's playing at 100 FPS, but other than that it looks like each frame was processed correctly. In the next release I'll make sure the FPS issue is fixed.