|
1 | 1 |
|
2 | 2 | # :fontawesome-solid-circle-info: User Guide |
3 | 3 |
|
4 | | -## :fontawesome-solid-terminal:Running DVR-Scan |
5 | | - |
6 | | -After installation, the `dvr-scan` command should be available from a terminal or command prompt. Try running `dvr-scan --help`. |
7 | | - |
8 | | -!!! info "For portable versions, replace `dvr-scan` with the path to `dvr-scan.exe` in the extracted files on your system." |
9 | | - |
10 | | -To extract all motion events from a video, you can start with: |
11 | | - |
12 | | - dvr-scan -i video.mp4 |
13 | | - |
14 | | -This will produce output events in your working directory starting with the prefix `video.DSME_` (e.g. `video.DSME_0001.avi`). If you want to limit scanning to a particular part of the video frame, you can use the [region editor](#region-editor): |
15 | | - |
16 | | - dvr-scan -i video.mp4 -r |
17 | | - |
18 | | -DVR-Scan should provide good results for most use cases, but can be fine tuned for specific use cases. There are two main categories of these settings: [detection and sensitivity](docs.md#detection), and [event parameters](docs.md#events). |
19 | | - |
20 | | -See [the documentation](docs.md) for a complete list of all command-line and configuration file options which can be set. You can also type `dvr-scan --help` for an overview of command line options. Lastly, most program options can be set [using a config file](docs.md#config-file). DVR-Scan also looks for a `dvr-scan.cfg` file in the following locations: |
21 | | - |
22 | | - * Windows: `C:/Users/%USERNAME%/AppData/Local/DVR-Scan/dvr-scan.cfg` |
23 | | - * Linux: `~/.config/DVR-Scan/dvr-scan.cfg` or `$XDG_CONFIG_HOME/dvr-scan.cfg` |
24 | | - * OSX: `~/Library/Preferences/DVR-Scan/dvr-scan.cfg` |
25 | | - |
26 | | -These settings will be used by default each time you run DVR-Scan, unless you override them. |
27 | | - |
28 | | -### Running Without Terminal |
29 | | - |
30 | | -A GUI is being developed for DVR-Scan but is not yet available. In the meantime, Windows users can see [Issue #178](https://github.com/Breakthrough/DVR-Scan/issues/178) for instructions on how to create drag-and-drop shortcuts to run DVR-Scan without needing to type commands. |
31 | | - |
32 | | -### Multiple Videos |
33 | 4 |
|
34 | | -You can specify multiple input videos as long as they have the same resolution and framerate: |
35 | 5 |
|
36 | | - dvr-scan -i video1.mp4 video2.mp4 video*.mp4 |
37 | | - |
38 | | -Wildcards are also supported: |
39 | | - |
40 | | - dvr-scan -i video*.mp4 |
41 | | - |
42 | | -Note that this will **concatenate** the videos together *in the order they are specified*. |
43 | | - |
44 | | -This can be undesirable for some types of footage being analyzed. For example, if a folder contains different dashcam footage clips, a significant amount of time can pass between clips (e.g. when the vehicle is shut off). This can result in DVR-Scan generating false events between videos. |
45 | | - |
46 | | -To avoid this, you can run DVR-Scan on each video in a loop. For example, on Windows: |
47 | | - |
48 | | - for /F %i in ('dir *.mp4 /b') do dvr-scan -i %i |
49 | | - |
50 | | -Or on Linux/OSX: |
51 | | - |
52 | | - for f in /mnt/videos/*.mp4 |
53 | | - do |
54 | | - dvr-scan -i $f |
55 | | - done |
56 | | - |
57 | | -Note that multiple inputs also do not support other output modes. You can use `ffmpeg` to [concatenate all input videos](https://trac.ffmpeg.org/wiki/Concatenate) before processing, or use a for-loop as above. |
58 | | - |
59 | | -### Output Format |
60 | | - |
61 | | -By default, DVR-Scan uses the OpenCV VideoWriter for video output. This usually requires the output files be in .AVI format of some kind. |
| 6 | +## :fontawesome-solid-terminal:Running DVR-Scan |
62 | 7 |
|
63 | | -DVR-Scan also supports using `ffmpeg` to extract motion events. This is done by setting `-m`/`--output-mode` to `ffmpeg` (reencode) or `copy` (codec copy mode, may not be frame accurate). For example: |
| 8 | +After installation, you can run DVR-Scan by clicking on the application shortcut, or running `dvr-scan-app` from a terminal. If you downloaded the portable version, run `dvr-scan-app.exe`. |
64 | 9 |
|
65 | | - dvr-scan -i video.mp4 -m ffmpeg |
| 10 | +!!! note "The `dvr-scan` command is the command-line interface for DVR-Scan. To launch the GUI, run `dvr-scan-app`. For help with the command-line interface or config files, see the [Documentation](docs.md) page for details. " |
66 | 11 |
|
67 | | -You can customize the options passed to `ffmpeg` using a [config file](docs.md#config-file) (see [the `ffmpeg-input-args` and `ffmpeg-output-args`](docs.md#output)) settings). |
| 12 | +Start by clicking the <b>Add</b> button to add one or more videos: |
68 | 13 |
|
69 | | -Setting output mode to `ffmpeg` or `copy` has the following caveats: |
| 14 | +<img alt="[Main App Window]" src="../assets/app-main-window.jpg"/> |
70 | 15 |
|
71 | | - - inputs that have a variable framerate (VFR) may not be extracted reliably |
72 | | - - input concatenation is not supported |
73 | | - - overlays are not supported |
| 16 | +To extract and save the motion events from the input, click the <b>Start</b> button. You will be prompted for a location to save the events to, after which scanning will begin: |
74 | 17 |
|
75 | | -You can customize the options passed to `ffmpeg` using a [config file](docs.md#config-file) (see [the `ffmpeg-input-args` and `ffmpeg-output-args`](docs.md#options)) settings). |
76 | 18 |
|
77 | | -### VFR (Variable Framerate) |
| 19 | +<img alt="[Scan Window]" src="../assets/app-scan-window.jpg"/> |
78 | 20 |
|
79 | | -!!! warning "Variable framerate (VFR) video support is still under development and may produce incorrect results." |
| 21 | +Once complete, each event will be saved to the output folder you selected. To tune motion sensitivity, go to <b>Settings -> Motion</b> and adjust threshold, where lower values are more sensitive to motion, and higher values are less sensitive. You can also adjust event settings and more: |
80 | 22 |
|
81 | | -Variable framerate (VFR) videos are *not well supported*, but basic functionality does work. Motion detection and event extraction should work correctly with default settings. Note however that calculated timestamps may be incorrect, and extracted footage may playback at the wrong speed. |
82 | 23 |
|
83 | | -Frame numbers will be accurate, but timestamps will not. This can yield incorrect results when setting output mode to `ffmpeg` or `copy`, as well as inaccurate timestamps when using overlays. This issue is [tracked on Github](https://github.com/Breakthrough/PySceneDetect/issues/168). If this workflow is required, you can re-encode the source material into fixed framerate before processing. |
| 24 | +<img alt="[Motion Settings Window]" src="../assets/app-motion-settings.jpg"/> |
84 | 25 |
|
| 26 | +See [the config option documentation](docs.md#config-file) for a detailed description of each setting. |
85 | 27 |
|
86 | 28 | ## :fontawesome-solid-crop-simple:Region Editor |
87 | 29 |
|
88 | | -With the Region Editor, you can limit motion detection to specific areas of the frame. You can launch the region editor by by adding `-r`/`--region-editor` to the DVR-Scan command: |
89 | | - |
90 | | - dvr-scan -i video.mp4 -r |
91 | | - |
92 | | -The region editor will open and display a rectangle over the first frame: |
| 30 | +The Region Editor allows you to limit motion detection to specific areas of the frame. Once you have a video loaded, check "Set Regions" and press the "Region Editor" button: |
93 | 31 |
|
94 | 32 | <img alt="[Region Editor Startup Window]" src="../assets/region-editor-start.jpg"/> |
95 | 33 |
|
96 | 34 | You can use the mouse to add or move points when editing regions. Left click to add a new point, or drag an existing one. Right click can be used to delete a point, and to add/remove shapes. |
97 | 35 |
|
98 | | -To begin scanning, click File -> Start Scan. You will be prompted to save the regions you have created before scanning so you can re-use them if required. |
| 36 | +To begin scanning, close the region editor, and click the Start button. You will be prompted to save the regions you have created before scanning so you can re-use them if required. |
99 | 37 |
|
100 | 38 | ### Regions |
101 | 39 |
|
|
0 commit comments