@alezanai/torquator
v1.5.0
Published
Command line interface for Alezan.ai Torquator SaaS
Downloads
40
Readme
@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
Docker Installation
You can also use the docker image
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 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 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|none> design of the output result (default: "arrow")
--nums <nums> numbers to display (default: "all")
--pitch-conf-filename <path> json pitch conf to draw
--minimap display gps position on minimap
--gps-filename <filename> the gps filename
-h, --help display help for command
torquator info
Usage: torquator info [options] <filename>
Arguments:
filename The .mxf/.footage video filename or the .jsonl GPS Filename
Options:
-h, --help display help for command
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
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 can try with the docker version.
Docker: Error response from daemon: ... Access is denied.
Follow instructions from https://stackoverflow.com/questions/43880764/in-docker-for-windows-permissions-denied-for-mkdir-chown/70170971#70170971
Docker render: VideoCapture::New - failed to open capture
Please cross-check that the file exists
Docker render: Error response from daemon: the working directory XXX is invalid, it needs to be an absolute path.
This might be related to the shell used, you can try to prefix the command with MSYS_NO_PATHCONV=1
like
MSYS_NO_PATHCONV=1 docker run --tty -v $(pwd):$(pwd) -w $(pwd) alezanai/torquator render <input-filename> <output-video-filename> <shower-filename>
Debug
export LOG_LEVEL=debug