Package: hms-import
HMS ImportImport utility for encrypted video and metadata files.InstallationFrom WheelThis assumes you havePython 3.8+installed andpip3is on
your path:~$pip3installhms-import
...
~$hms-import-h
usage:hms-import[-h][--quiet][--verbose]{b3-upload,o2-upload,log-upload}...

ScriptforimportingvideoandmetadatainO2andB3formats.

options:-h,--helpshowthishelpmessageandexit--quietChangestheconsoleloglevelfromINFOtoWARNING;defersto--verbose--verboseChangestheconsoleloglevelfromINFOtoDEBUG;takesprecedenceover--quiet

Commands:{b3-upload,o2-upload,log-upload}b3-uploadImportsvideoandGPSfilesfromunlockedLUKS-encrypteddeviceo2-uploadScriptforuploadingraw,encryptedvideofileslog-uploadUploadsalogfileTatorFrom SourceThis assumes you havegit,Python
3.8+, andpoetryinstalled
already.~$gitclonegit@github.com:cvisionai/hms.git
...
~$cdhms/scripts/hms-import
hms-import$poetryinstall
...
hms-import$poetryrunhms-import-hUsageThis script contains three sub-commands:o2-upload,b3-upload, andlog-upload; their usage is
described below. Additional documentation is available by providing the-hflag, e.g.hms-import o2-upload -h.o2-uploadThe first step is to set up yourconfig.inifile. Start by copying the contents ofsample_hms-config.iniincluded below for reference, and replace the
default values:[Local]# The directory containing the video files for importDirectory=dir1[Tator]# The url to the tator deploymentHost=https://hms.tator.io# The API token for tatorToken=6485c83cf040deadbeef07b7aea13706# The integer id of the project to upload the videos toProjectId=-1# The integer id of the media type to create, required if the project has more than one video media typeMediaType=-1# The integer id of the file type to create for the uploaded encrypted sensor data fileFileType=-1# The integer id of the image type to create for the trip summary imageSummaryType=-1# The name of the algorithm to launch upon upload of each tripAlgorithmName=Decrypt Trip# If true, will skip uploading files and only create media objects; used for legacy O2 importingSkipDecrypt=False[Trip]# The serial number of the hard drive, uncomment and set# HddSerialNumber=123ABCOnce configured, you can run the import utility:$hms-importo2-uploadconfig.iniTroubleshootingIf an import fails, the logs have more detail than the console, they can be found in the same folder
the command was run from, with the filenamehms_import.log. These are rotating logs that cycle
daily (if the log file is not current, it will have an.MM-DD-YYextension appended to the
filename) and are kept for up to 7 days, so as to not consume disk space without limit.b3-uploadThe B3 import sub-command,hms-import b3-upload, requires the following arguments:--hostthe tator hostname (string)--tokenthe tator API token (string)--media-type-idthe media type id (integer)--file-type-idthe file type id (integer)--multi-type-idthe multiview type id (integer)--state-type-idthe state type id (integer)--image-type-idthe image type id (integer)--hdd-snthe serial number of the hard drive--directorythe location of the files to uploadOnce you have those values, use them to call the script:$hms-importb3-upload\--host<TATOR_HOST>\--token<TATOR_TOKEN>\--media-type-id<id>\--file-type-id<id>\--multi-type-id<id>\--state-type-id<id>\--image-type-id<id>\--hdd-sn<sn>\--directory<path/to/files>log-uploadThere is a third command option,log-upload, which is used to upload the log file generated after
runninghms-import, which can be called like so:$hms-importlog-upload\--host<TATOR_HOST>\--token<TATOR_TOKEN>\--log-file-type-id<id>The flag--log-filenameis optional and defaults to the default location of the log file, only
override it if you know what you're doing.