@alezanai/torquator
Command line interface for Alezan.ai Torquator SaaS
Installation
Torquator render command is using opencv4nodejs.
To avoid re-compiling the code each time, you can do export OPENCV_BUILD_ROOT=~/opencv
so it will reuse the existing openc installation.
npm install -g @alezanai/torquator
Full installation
the render
command requires the opencv package to be used.
It can be installed using
torquator-install-opencv
Simple usage
First you need to Assume an AWS Role that give you access to torquator SaaS.
Then you can run
export AWS_PROFILE=<your profile>
torquator replay <video filename> <gps-filename> --race-name <race name>
<race name>
: should be like 2022-10-05_R1C1_A
(A=Attelé)
Commands
torquator torquator replay
Usage: torquator replay [options] <video-filename> <gps-filename>
Arguments:
video-filename The .mxf/.footage video filename
gps-filename The .jsonl video filename
Options:
--race-name <raceName> The race name (ex 2020-12-08_R4C3_A)
--output [filename] The .jsonl shower output filename
--env [string] The environment (default: "prd")
--client-id [string] The client id (default: "equidia")
--user-id [string] The user id (default: "YYYY-MM-DD_torquator_cli")
--region [string] aws region (default: "eu-west-1")
--aws-account-id [string] Service provider account id
-f, --force If set, reupload the material with the same name without throwing error
--reuse If set, reuse existing cloud file without re-uploading, --force and --reuse cannot be use together
-h, --help display help for command
torquator torquator render
Usage: torquator render [options] <video-filename> <output-video-filename> <shower-filename>
Arguments:
video-filename The .mxf/.footage video filename
output-video-filename The .mxf/.footage output video filename
shower-filename jsonl showers input filename
Options:
--start [num] Number of second to offset at the begining of the file (default: 0)
--duration [num] Maximum number of second of the output
--start-date [date] ISO Date String to force the start of the video timestamp
--display-frame-info will print frame info
--display-interpolation will print interpolate box in different color
--template <box|sky-shower|arrow|arrow-trackid> design of the output result (default: "arrow")
--nums <nums> numbers to display (default: "all")
--pitch-conf-path <path> json pitch conf to draw
-h, --help display help for command
torquator torquator info
Usage: torquator info [options] <video-filename>
Arguments:
video-filename The .mxf/.footage video filename
Options:
-h, --help display help for command
torquator torquator slice
Usage: torquator slice [options] <video-filename> <output-filename>
Arguments:
video-filename The .mxf/.footage video filename
output-filename The .mxf/.footage output video filename
Options:
--start <num> Number of second to offset at the begining of the file
--duration <num> Maximum number of second of the output
-h, --help display help for command
debug
To get more debugging information just do
export LOG_LEVEL=debug
on Windows
set LOG_LEVEL=debug
Docker Usage
You can also use the docker image
docker run --tty -v $(pwd):$(pwd) -w $(pwd)\
alezanai/torquator \
render \
<input-filename> \
<output-video-filename> \
<shower-filename>
Connect to AWS from docker
With AWS_PROFILE
We suggest to use the AWS_PROFILE
environment variable with $HOME/.aws/credentials
and $HOME/.aws/config
docker run --tty -v $(pwd):$(pwd) -w $(pwd) \
-v $HOME/.aws/credentials:/root/.aws/credentials:ro \
-v $HOME/.aws/config:/root/.aws/config:ro \
-e AWS_PROFILE \
alezanai/torquator \
render \
<input-filename> \
<output-video-filename> \
<shower-filename>
Directly with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
You can also use AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
docker run --tty -v $(pwd):$(pwd) -w $(pwd) \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
alezanai/torquator \
render \
<input-filename> \
<output-video-filename> \
<shower-filename>
Known issues
### Cannot read property 'VideoCapture' of undefined
This might occurs because Opencv is not installed, you should try npm run opencv
Debug
export LOG_LEVEL=debug