Why use --camera_name_suffix for batch import?

The --camera_name_suffix argument is only useful when importing directory structures that look the same but are in fact video files from different cameras. 

For example, if you have the same model NVR in two different locations that were set up with the same internal name (e.g. "NVR-01"), then the exported video files will have filenames that collide.  The file NVR-01/ch011530626606.mp4 from the garage of buildingA would be indistinguishable from NVR-01/ch011530628905.mp4 from the store entrance of buildingB. So the camera names derived from the imported video filenames would collide without the use of --camera_name_suffix.

The --camera_name_suffix is just a way to force differentiation among cameras with each invocation of import_video.py so that you have unique camera names like "NVR-01/ch01-buildingA", "NVR-01/ch01-buildingB" in your account upon completion of the import.

For example, running import_video.py on the filename:
NVR-01/ch011530626606.mp4
 
with the arguments:
--regex "^(?P<camera>[^\/]+\/ch\d{2})(?P<epoch>\d+)\.mp4" \
--camera_name_suffix "-buildingA"
 
produces a camera name:
NVR-01/ch01-buildingA
 
because the regex capture groups are:
Group `camera` 0-11 `NVR-01/ch01`
Group `epoch` 11-21 `1530626606`

and the --camera_name_suffix is appended to the camera capture group.

Have more questions? Submit a request

Comments