npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@alezanai/torquator

v1.5.0

Published

Command line interface for Alezan.ai Torquator SaaS

Downloads

75

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