Skip to content

Commit 6d4c620

Browse files
committed
[docs] Reorganize config file template to match UI
1 parent e1695bc commit 6d4c620

File tree

14 files changed

+317
-300
lines changed

14 files changed

+317
-300
lines changed

dist/pre_release.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ def build_docs(use_local_images=True):
113113
print("Postprocessing docs.")
114114

115115
delete_and_replace = [
116+
"assets/app-ffmpeg-settings.jpg",
117+
"assets/app-input-settings.jpg",
118+
"assets/app-main-window.jpg",
119+
"assets/app-motion-settings.jpg",
120+
"assets/app-opencv-settings.jpg",
121+
"assets/app-scan-window.jpg",
116122
"assets/bounding-box.gif",
117123
"assets/dvr-scan-logo.png",
118124
"assets/dvr-scan.ico",
24.2 KB
Loading

docs/assets/app-input-settings.jpg

22.1 KB
Loading

docs/assets/app-main-window.jpg

47.9 KB
Loading
33.7 KB
Loading
35.2 KB
Loading

docs/assets/app-scan-window.jpg

20.7 KB
Loading

docs/docs.md

Lines changed: 222 additions & 140 deletions
Large diffs are not rendered by default.

docs/faq.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22
# :fontawesome-solid-keyboard:Frequently Asked Questions
33

44

5-
----------------------------------------------------------
6-
7-
8-
### How do I run DVR-Scan?
9-
10-
Currently, DVR-Scan is a command-line program only, and must be launched from a terminal or command prompt (e.g. `cmd.exe` on Windows).
11-
In the meantime, Windows users can [use these instructions](https://github.com/Breakthrough/DVR-Scan/issues/178) create helpful drag-and-drop shortcuts. These will allow you to run DVR-Scan by dragging and dropping the video(s) you want to scan.
12-
13-
!!! note "A [beta release for the new GUI version of DVR-Scan](https://github.com/Breakthrough/DVR-Scan/releases/tag/v1.7-dev0) is now available for testing on Windows/Linux/OSX!"
5+
## Command-Line Interface
146

157

168
----------------------------------------------------------

docs/guide.md

Lines changed: 12 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,39 @@
11

22
# :fontawesome-solid-circle-info: User Guide
33

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
334

34-
You can specify multiple input videos as long as they have the same resolution and framerate:
355

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
627

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`.
649

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. "
6611

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:
6813

69-
Setting output mode to `ffmpeg` or `copy` has the following caveats:
14+
<img alt="[Main App Window]" src="../assets/app-main-window.jpg"/>
7015

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:
7417

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).
7618

77-
### VFR (Variable Framerate)
19+
<img alt="[Scan Window]" src="../assets/app-scan-window.jpg"/>
7820

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:
8022

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.
8223

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"/>
8425

26+
See [the config option documentation](docs.md#config-file) for a detailed description of each setting.
8527

8628
## :fontawesome-solid-crop-simple:Region Editor
8729

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:
9331

9432
<img alt="[Region Editor Startup Window]" src="../assets/region-editor-start.jpg"/>
9533

9634
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.
9735

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.
9937

10038
### Regions
10139

0 commit comments

Comments
 (0)