Skip to content

Command line

tracell alone starts the app. With a command it works without the window (track, live), drives an open window (gui), prints the reference (reference) or the agent skill (skill).

The commands are words, not options: tracell track, without dashes. Set the mask, the contours and the tracker in the app, save them with File > Save, and give that file as --preset. Every command has its own help: tracell --help, tracell track --help, tracell gui --help, and so on.

For scripts and agents, see also Scripts and agents, the settings reference and the result files.

A recorded video

tracell track video.avi --preset settings.json --out results

Writes the trajectory table, the cell summary and the settings used, and prints their paths. Ctrl+C keeps the frames tracked so far.

Option Meaning
--preset FILE Settings saved by the app (File > Save). Default: the app's defaults
--out FOLDER Where the results go (default: next to the video)
--name NAME Name prefix of the files (one video only)
--frames FIRST LAST Frame range (default: the preset's, else the whole video)
--format csv|xlsx|txt Table format
--video-out Also write the video with traces
--json Results as JSON lines on stdout (below)
--quiet, --debug Print only the result and errors; log more

Several videos

tracell track videos --preset settings.json --out results --parallel

Give several files, a folder (its .avi, .mp4 and .cine files) or a pattern such as videos/*.avi. Each video gets its own files, named after it.

Option Meaning
--series One video after the other (the default)
--parallel Several videos at a time, one per core of the PC
--cores N With --parallel: at most N videos at a time. Every video at work takes its own memory

Settings for one video. A settings file with the video's name beside it is used for that video instead of --preset: run3.json for run3.avi.

A video that cannot be tracked does not stop the others. A table at the end lists every video with the settings it used, its cells and points, or what went wrong; the command ends with code 1 if any failed. Ctrl+C stops all of them and keeps what each had tracked.

A live session

tracell live --preset settings.json --out sessions --cells 1000 --crops both

Runs AutoTrack on the camera and writes a session folder while it runs. Without a camera, --virtual-camera video.avi replays a video as the camera.

Option Meaning
--partitions N, --frames N, --cells N, --seconds S Stop rule (one; default: the preset's)
--frames-per-partition N Frames in one partition
--virtual-camera VIDEO Replay a video file as the camera, to try a session without one
--camera-service PORT The port your camera service listens on. Without it, the port in Edit > Preferences is used
--crops none|with_background|without_background|both, --crop-size PX Cell crops
--record Also save the raw frames
--record-format lossless|compact With --record: lossless FFV1 (the default, every pixel) or compact MJPEG (smaller, a little lossy)
--json, --quiet, --debug As for track

Ctrl+C or SIGTERM stops the session and keeps what was tracked.

An open window

tracell gui drives a TraCell window open on the same computer, as a person at it would: it opens a video, changes settings, presses Track, AutoTrack or Stop, and the window shows each step. Whoever sits at the window sees what a script or an agent does, and can take over at any time. Every reply is JSON.

tracell gui open run3.avi
tracell gui set view.tracker.search_range=12.5 model.contour.min_area=4
tracell gui track --frames 0 2000
tracell gui wait
tracell gui export results --format csv
tracell gui screenshot window.png

The window's rules apply. A button or menu item is pressed only while it is enabled, as for the mouse. While Track, an export, AutoTrack, Record or a Capture runs, the only thing accepted is stop, plus reading (status, get, wait, screenshot) and opening a tool window (show); anything else is refused with exit code 4. A message box a command opens is closed as Cancel would close it, and its text is returned.

Command Meaning
tracell gui list The open windows: process ID and video
tracell gui status What the window holds and does: video, frame, frame range, preset, what runs, tracked cells, session folder, last export, status message, open tool windows
tracell gui wait [--timeout S] Wait until nothing runs, then print the status
tracell gui get [NAME] A setting, a group such as view.tracker, or all of them
tracell gui set NAME=VALUE ... Change settings; all of them or, if one is wrong, none
tracell gui load PRESET, save [PRESET] File > Load, File > Save (as)
tracell gui open VIDEO, close File > Open, File > Close
tracell gui frame N, play, pause Move through the video
tracell gui track [--frames FIRST LAST] Press Track
tracell gui export FOLDER [--name] [--format] [--video] [--traces/--no-traces] [--partitions shown|all] [--crops] File > Export, without its dialog. A live session's video is one file per partition
tracell gui autotrack, record, liveview Press AutoTrack, Record, Live View in Live Tracking, with the settings it shows
tracell gui stop Stop what runs, with its own Stop
tracell gui quit [--save | --discard] Close TraCell and wait until it has ended; changed settings need one of the two
tracell gui show WINDOW Open a tool window: mask, tracker, live_tracking, live_dashboard, ...
tracell gui controls [WINDOW] Every menu item and visible button, and whether it is enabled now
tracell gui menu 'Tools > Mask > Show Mask' Choose any menu item
tracell gui press WINDOW BUTTON Press any button by its text
tracell gui screenshot FILE [--of WINDOW] A picture of the window as it looks now

Setting names are the keys of a saved preset joined by dots; Settings reference lists them all. The groups adjustment, chopper, contour, mask and tracker are held as model.G and view.G; set changes both, whichever you name. --window PID picks a window; without it the newest one is used. A change shows as unsaved in the window. Only your own user account can reach a window.

JSON output

With --json, track and live print one JSON object per line on stdout as things happen; progress and messages go to stderr. tracell gui always answers in JSON.

Command Lines
track {"event": "video", "video", "settings", "cells", "points", "message", "written": [paths]} per video (or with "error"), then {"event": "finished", "ok", "stopped", "videos", "failed"}
live {"event": "started", "folder"}, then {"event": "partition", "folder", "partition", "frames", "cells", "complete_cells", "table", "crops", ...} per partition as it is written, then {"event": "finished", "ok", "stopped", "folder", "partitions", "complete_cells"}
any, on failure {"event": "error", "error", "code"}

Exit codes

Code Meaning
0 Done. tracell track/live also end with 0 when stopped with Ctrl+C or SIGTERM: what was tracked is kept (several videos: 1 when some were not started).
1 Failed: a video, preset, camera or setting that cannot be used, or tracell track with several videos where any failed. The reason is on stderr (and in the JSON with --json).
2 The command line itself is wrong: an unknown option, a missing argument, a value out of range.
3 tracell gui: no TraCell window is open, or the one asked for does not answer.
4 tracell gui: the window is busy (Track, an export or AutoTrack runs), so the request was refused. Wait (tracell gui wait) and send it again.
5 tracell gui wait: still busy after --timeout seconds; tracell gui quit: TraCell has not ended after --timeout seconds.

The reference in the program

tracell reference settings [NAME], columns, files and exit-codes print the same reference as these pages, as text, --format json or --format markdown.

tracell skill prints the agent skill, the instructions an AI agent needs to use this command line; tracell skill --install [--dir FOLDER] installs it for Claude Code.

Where the command comes from

On Windows the installer has the option "Add the tracell command to PATH". On Linux the package and the install script both provide tracell.