Uploads encrypted video files and metadata to Tator.
Project description
HMS Import
Import utility for encrypted video and metadata files.
Installation
From Wheel
This assumes you have Python 3.9+ installed and pip3
is on
your path. With the hms-import.whl
file in your current directory, run:
~$ pip3 install ./hms-import.whl
...
~$ hms-import -h
usage: hms-import [-h] config_file
Script for uploading raw, encrypted video files.
positional arguments:
config_file The configuration .ini file used to initialize hms_import.
options:
-h, --help show this help message and exit
From Source
This assumes you have git, Python 3.9+, and poetry installed already.
~$ git clone git@github.com:cvisionai/hms.git
...
~$ cd hms/scripts/hms-import
hms-import$ poetry install
...
hms-import$ poetry run hms-import -h
Usage
The first step is to set up your config.ini
file. Start by copying the contents of
sample_hms-config.ini included below for reference, and replace the
default values:
[Local]
# The directory containing the video files for import
Directory=dir1
# The extension of the encrypted video files
MediaExtension=.video
# The extension of the encrypted metadata files
MetadataExtension=.log
# The maximum number of parallel processes to run, set to 1 to process serially
MaxWorkers=4
[Tator]
# The url to the tator deployment
Host=https://hms.tator.io
# The API token for tator
Token=6485c83cf040deadbeef07b7aea13706
# The integer id of the project to upload the videos to
ProjectId=-1
# The integer id of the media type to create, required if the project has more than one video media type
MediaType=-1
# The integer id of the file type to create for the uploaded encrypted sensor data file
FileType=-1
# The integer id of the image type to create for the trip summary image
SummaryType=-1
# The name of the algorithm to launch upon upload of each trup
AlgorithmName=Decrypt Trip
[Trip]
# The ISO-formatted, timezone aware (if applicable) sail date
SailDate=2023-07-15T19:46:16.671406+00:00
# The ISO-formatted, timezone aware (if applicable) land date
LandDate=2023-07-18T19:46:16.671406+00:00
# The ISO-formatted, timezone aware (if applicable) HDD receipt date
HddDateReceived=2023-07-19T19:46:16.671406+00:00
# The serial number of the hard drive
HddSerialNumber=123ABC
Once configured, you can run the import utility:
$ poetry run hms-import -h
usage: hms-import [-h] config_file
Script for uploading raw, encrypted video files.
positional arguments:
config_file The configuration .ini file used to initialize hms_import.
options:
-h, --help show this help message and exit
Troubleshooting
If 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 filename hms_import.log
. These are rotating logs that cycle
daily (if the log file is not current, it will have an .MM-DD-YY
extension appended to the
filename) and are kept for up to 7 days, so as to not consume disk space without limit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hms_import-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ab64dd2a1ef8cf8c4e92a979b1ff94c2832767bc20cc576c23babcbfe91c6b |
|
MD5 | 7478041d59b85f3e416a4c6649dd7872 |
|
BLAKE2b-256 | ae766458c295feb999b022d40aa65189aac3b21958c4d8c49447bfdc0b4f89a9 |