DVR-Scan icon indicating copy to clipboard operation
DVR-Scan copied to clipboard

Report file name in report for globbed files

Open millerthegorilla opened this issue 1 year ago • 2 comments

Description of Problem & Solution When globbing input files, dvr-scan runs successfully and completes, and finally reports what it found. The list of motion events gives offsets into the one-from-appended-mp4s video. Whilst the report provides useful information in the case where dvr-scan is running on one mp4 only, with offsets to the motion, it doesn't convey any real detail when globbing. It would be more useful when globbing to provide the filename where the motion was detected.

Media Examples:

|   Event #    |  Start Time  |   Duration   |   End Time   |
-------------------------------------------------------------
|  Event    1  |  00:12:57.1  |  00:00:07.7  |  00:13:04.8  |
|  Event    2  |  00:13:15.3  |  00:00:10.9  |  00:13:26.2  |
|  Event    3  |  00:13:54.7  |  00:00:06.5  |  00:14:01.3  |
...

Proposed Implementation: when files are globbed...

-------------------------------------------------------------
|   Event #    |  Start Time  |   Duration   |   End Time   |   filepath |
-------------------------------------------------------------
|  Event    1  |  00:12:57.1  |  00:00:07.7  |  00:13:04.8  | ./bob.mp4 |
|  Event    2  |  00:13:15.3  |  00:00:10.9  |  00:13:26.2  | ../dir1/dave.mp4 |
|  Event    3  |  00:13:54.7  |  00:00:06.5  |  00:14:01.3  | ./mp4s_8_22/10456.mp4 |

Alternative Solutions: I could use bash/python/other to array the files and then loop through running dvr-scan per item, but this would defeat the point of using globbing...

millerthegorilla avatar Aug 22 '22 10:08 millerthegorilla

This makes me wonder if there should be a flag that indicates how multiple inputs are treated (either separately or appended). In this case, one could set the flag to scan each video separately, and provide a different event list for each filepath. That would also allow the timecodes to align with those files.

Thoughts?

Breakthrough avatar Aug 23 '22 00:08 Breakthrough

I think that is sort of what I am looking for, at least it would be capable of providing the type of information that would be useful.

An issue is with whether it would be more or less efficient?

I had imagine that the solution would be to push each filename, along with time code onto a stack or other data structure with quick lookup times and then referencing that data structure when reporting to simply provide the filename in which the event occurred.

But my use case is not especially complex, and I haven used dvr-scan regularly enough to know that others would find that extra information useful with certainty.

It does seem likely that those using globbing would prefer to have event related file names reported, but if one is going to scan each file individually, then one can simply use dvr-scan with bash to do so...

millerthegorilla avatar Aug 25 '22 10:08 millerthegorilla