encode-dashcam¶
Batch encode dashcam footage, merging rear and front camera footage.
This command’s defaults are intended for use with Red Tiger dashcam output and file structure.
The rear camera view will be placed in the bottom right of the video scaled by dividing the
width and height by the --rear-view-scale-divisor value specified. It will also be cropped
using the --rear-crop value unless --no-rear-crop is passed.
Files are automatically grouped using the regular expression passed with
-M/--match-regexp. This RE must contain at least one group and only the first group will
be considered. Make dubious use of non-capturing groups if necessary. The captured group string
is expected to be usable with the time format specified with --time-format (see
strptime documentation at
https://docs.python.org/3/library/datetime.html#datetime.datetime.strptime).
Front and rear files are paired by timestamp proximity (within --max-offset seconds). Files
without a corresponding partner are logged and skipped without deletion.
Original files whose content is successfully converted are sent to the wastebin.
Example use:
encode-dashcam Movie_F/ Movie_R/ ~/output_dir
Usage
encode-dashcam [OPTIONS] FRONT_DIR [REAR_DIR] [OUTPUT_DIR]
Options
- --clip-length <clip_length>¶
Clip length in minutes.
- --crf <crf>¶
Constant rate factor.
- --hwaccel <hwaccel>¶
-hwaccel string for ffmpeg.
- --level <level>¶
Level (HEVC).
- --max-offset <max_offset>¶
Maximum seconds between front and rear timestamps for pairing.
- --no-chapters¶
Disable chapter markers in output.
- --no-hwaccel¶
Disable hardware decoding.
- --no-rear-crop¶
Disable rear video cropping.
- --no-setpts¶
Disable use of setpts.
- --preset <preset>¶
Output preset (various codecs).
- --rear-crop <rear_crop>¶
Crop string for the rear camera view.
- --rear-view-scale-divisor <rear_view_scale_divisor>¶
Scaling divisor for rear view.
- --setpts <setpts>¶
setpts= string. Defaults to speeding video by 4x.
- --tier <tier>¶
Tier (HEVC).
- --time-format <FORMAT>¶
Time format to parse from video files.
- --video-bitrate <BITRATE>¶
Video bitrate.
- --video-decoder <DECODER>¶
Video decoder (for hardware decoding only).
- --video-encoder <ENCODER>¶
Video encoder.
- --video-max-bitrate <BITRATE>¶
Maximum video bitrate.
- -D, --no-delete¶
Do not delete original files.
- -M, --match-regexp <RE>¶
Regular expression to find the date string.
- -O, --overwrite¶
Overwrite existing files.
- -T, --temp-dir <temp_dir>¶
Temporary directory for processing.
- -d, --debug¶
Enable debug output.
Arguments
- FRONT_DIR¶
Required argument
- REAR_DIR¶
Optional argument
- OUTPUT_DIR¶
Optional argument