Configuration Options
Visit the Configuration File section for information about how to use these configuration options.
Workspace
This is the location where DTrack stores data. This includes saved recordings, audio clips, trained models, temporary data, etc.
Default Value:
"_workspace/"
Type Configuration Variable Environment Variable string workspace DTRACK_WORKSPACE
Workspace Keep Temp
Keep temporary data after extracted for review.
Default Value:
false
Type Configuration Variable Environment Variable boolean keep_temp DTRACK_KEEP_TEMP
Record Audio Device
The device identifier used to record audio.
Default Value:
"plughw"
Type Configuration Variable Environment Variable string audio_device RECORD_AUDIO_DEVICE
List audio devices:
ffmpeg -loglevel warning -sources alsa
Sample Output:
Auto-detected sources for alsa: null [Discard all samples (playback) or generate zero samples (capture)] hw:CARD=Snowflake,DEV=0 [Direct hardware device without any conversions] plughw:CARD=Snowflake,DEV=0 [Hardware device with all software conversions] default:CARD=Snowflake [Default Audio Device] sysdefault:CARD=Snowflake [Default Audio Device] front:CARD=Snowflake,DEV=0 [Front output / input] dsnoop:CARD=Snowflake,DEV=0 [Direct sample snooping device]Look for devices with: "software conversions"
- It is likely worth taking time to test available options.
Record Audio Options
Additional ffmpeg options used for audio capture.
Default Value:
[ "-f", "alsa" ]
Type Configuration Variable Environment Variable list audio_options RECORD_AUDIO_OPTIONS
Record Video Device
The device identifier used to record video.
Default Value:
"/dev/video0"
Type Configuration Variable Environment Variable string video_device RECORD_VIDEO_DEVICE
List video devices:
ls -1 /dev/video*
- Sample Output:
/dev/video0 /dev/video1 /dev/video2 /dev/video3List capabilities:
ffmpeg -hide_banner -f v4l2 -list_formats all -i <DEVICE>
Sample Output:
[v4l2 @ 0x5612] Compressed: mjpeg: Motion-JPEG : 640x360 640x480 960x540 1024x576 1280x720 1920x1080 2560x1440 3840x2160 [v4l2 @ 0x5612] Compressed: h264: H.264 : 640x360 640x480 960x540 1024x576 1280x720 1920x1080 2560x1440 3840x2160 [v4l2 @ 0x5612] Compressed: Unsupported: HEVC : 640x360 640x480 960x540 1024x576 1280x720 1920x1080 2560x1440 3840x2160 [v4l2 @ 0x5612] Raw : yuyv422: YUYV 4:2:2 : 640x360 640x480 960x540 1024x576 1280x720 1920x1080 [in#0 @ 0x5612] Error opening input: Immediate exit requested Error opening input file /dev/video2.This output shows a camera capable of recording 4K video.
Record Video Options
Additional ffmpeg options used for video capture.
List video devices using:
ls /dev/video*List video device capabilities using:
v4l2-ctl -d $DEVICE --list-formats-ext; look for'H264' (H.264, compressed).Default Value:
[ "-f", "v4l2", "-input_format", "h264", "-video_size", "1920x1080", "-framerate", "20" ]
Type Configuration Variable Environment Variable list video_options RECORD_VIDEO_OPTIONS
Record Video Timestamp
Long string that defines the datestamp that is added on top of recorded video.
The default value uses
Monospace Bold, set to a brightRed, 48-Pointfont. This font is provided by thefonts-freefont-ttfpackage,This filter is applied to every frame, so it is possible to add
hflip,vflip,to the start of the string, which will result in an image that is flipped both horizontally and vertically--perfect for an upside-down camera.Default Value:
"drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf:text=%{localtime}:fontcolor=red@0.9:x=7:y=7:fontsize=48"
Type Configuration Variable Environment Variable string video_timestamp RECORD_VIDEO_TIMESTAMP
Record Video Advanced
Video creation arguments that ultimately control the final recorded video quality.
A sensible range for 1080p video is between
3Mand8M, with3.5Mbeing the observed upper limit on a Raspberry Pi 5--due to lack of hardware encoder.Default Value:
[ "libx264", "-crf", "23", "-preset", "fast", "-tune", "zerolatency", "-maxrate", "3M", "-bufsize", "24M" ]
Type Configuration Variable Environment Variable list video_advanced RECORD_VIDEO_ADVANCED
Record Inspect Models
List of tags used for training, and trained models used for automatic detection.
Default Value:
[ ]
Type Configuration Variable Environment Variable list inspect_models RECORD_INSPECT_MODELS
Record Inspect Backlog
Defines the maximum number of "segments" that can back up in each queue before newly recorded audio is discarded from queue.
Default Value:
5
Type Configuration Variable Environment Variable integer inspect_backlog RECORD_INSPECT_BACKLOG
Record Inspect Trust
Confidence level required to assume a match was found.
Default Value:
0.50
Type Configuration Variable Environment Variable decimal inspect_trust RECORD_INSPECT_TRUST
Record Duration
Length of time to use for each recording.
- Very short recordings will suffer inadequate compression and are harder to review.
- Very long recordings will be much larger and more difficult to submit.
Default Value:
"00:10:00"
Type Configuration Variable Environment Variable string record_duration RECORD_DURATION
Train Batch Size
Number of samples to use in each round of training.
Default Value:
16
Type Configuration Variable Environment Variable integer train_batch_size TRAIN_BATCH_SIZE
Train Epochs
Maximum number of learning attempts before stopping.
Default Value:
200
Type Configuration Variable Environment Variable integer train_epochs TRAIN_EPOCHS
Train Patience
Maximum number of attempts to build a better model before stopping early.
Default Value:
10
Type Configuration Variable Environment Variable integer train_patience TRAIN_PATIENCE
Train Rate
Step size used to adjust learning. This may be decreased during training to prevent over-fitting data samples.
Default Value:
0.0001
Type Configuration Variable Environment Variable decimal train_rate TRAIN_RATE