Closed millerthegorilla closed 1 year ago
I forgot to mention that I am using a glob of ...dir/*/.mp4
I have just tried with a smaller amount of files, that are all the same FPS and I still get the same issue.
I am using a bash for loop to find files that are at 10fps using ffprobe, and then running dvr-scan on them.
FPS=10
for file in $(find . -type f -name "*mp4"); do if [[ $(ffprobe $file 2>&1| grep ",* fps" | cut -d "," -f 5 | cut -d " " -f 2) == $FPS ]]; then dvr-scan -bb --threshold 1.5 -i $file -d ../output/ ; fi; done
I have guestimated the motion detection threshold at 1.5, in order to only capture people in the frame, rather than just shadows moving. I don't know if this is too high a value, but it is just above what stops shadows from being detected.
Hey @millerthegorilla;
Sorry about that, indeed this is a bug and will happen anytime you are using multiple input videos. Indeed it seems like multiple file inputs are broken in the v1.5 release, my apologies. I'll try to get a fix out for this ASAP, and mark this as a known issue on the releases page / changelog.
Regarding shadows, currently shadow detection is disabled, but I'm working on adding an option to enable it for v1.6. Thanks for sharing the parameters that work best for your use case. Could you also share the resolution of videos you're processing?
Thanks!
P.S. Sorry again about this bug - it seems that I forgot to add a test case to verify multiple videos work correctly, so I'll also make sure to add a test case for that to ensure this doesn't crop up again. Thanks for the report.
TODOs to close this out:
_get_next_frame()
with a recursive call to read(...)
)VideoJoiner
that explicitly reads all frames of multiple joined videos Fixed and re-released v1.5.1. This should now work as intended. Thanks for the report!
P.S. Please do let me know if you run into any more issues!
Many thanks for your help. I don't have the machine to hand at the moment, but videos are 1080p at 25fps. I don't know what you mean by shadow detection, but any lower than 1.5 and a shadow on the wall was being recorded as moving. I am guessing that you mean to add an option to detect a difference between people and shadows. In any case, thanks a lot for your effort, great app!
I am guessing that you mean to add an option to detect a difference between people and shadows
@millerthegorilla correct, some background subtraction methods have shadow detection which should help reduce false positives in cases like this. That will probably be part of DVR-Scan v1.6, so stay tuned 👍
Cool. But it would definitely be of use if one could specify a target framerate for input files, so that only input files of that framerate would be appended when globbing....
Hi, I am getting the following error : AttributeError: 'VideoJoiner' object has no attribute '_get_next_frame'
the error is:
I am using Fedora 36 silverblue and ffmpeg -version:
I am selecting multiple files using globbing. I note that some of the files are reported as 19 FPS and others are 10 FPS, so perhaps this might be the issue? If FPS incompatibility is an issue is there any chance that an option might be introduced so that when selecting multiple files through globbing or otherwise, only files of a given FPS are processed. This would allow me to run two scans, one on the 19FPS and one on the 10FPS.
MTia...