Skip to main content

Headless Mode

MONO can run without showing a window. It completes the task specified by its command-line arguments, then exits automatically, which makes it easy to integrate into scripts or other tools.

Currently, headless mode supports batch processing of video files only. The processing is the same as Batch Processing.

Launching​

Asynchronous​

The command returns immediately. MONO processes the task in the background and exits when it is done. Progress and results are written to the files given by -progress and -report.

Open a Command Prompt (cmd) in the MONO installation folder and run the following command.

Dollars_MONO.exe -batchmode -input "D:\videos\a.mp4" "D:\videos\more" -out "D:\output" -report "D:\output\report.json" -progress "D:\output\progress.txt"

Synchronous​

The command waits for MONO to finish before returning, so you can read the exit code directly. An exit code of 0 indicates that all videos were processed successfully. While MONO is running, you can also check progress in the file given by -progress.

Open a Command Prompt (cmd) in the MONO installation folder and run the following two commands. start /wait makes cmd wait until MONO exits, and echo %errorlevel% shows the exit code.

start /wait "" Dollars_MONO.exe -batchmode -input "D:\videos\a.mp4" "D:\videos\more" -out "D:\output" -report "D:\output\report.json"
echo %errorlevel%

Requirements​

  • Available to licensed users only.
  • In MONO, select Remember me and sign in at least once.

Arguments​

ArgumentOptionalDescription
-batchmodeNoRuns MONO in headless mode.
-input path...NoOne or more video files or folders. For a folder, only mp4, avi, mov, mkv and webm files in the folder's top level are processed.
-out folderYesExport folder.
-face none|egao|nvisYesFace capture module.
-hands on|offYesEnhanced hands.
-format fbx|bvh|bvh_cascadeur|bvh_vam|vam_timelineYesExport format.
-report fileYesResult file (JSON).
-progress fileYesProgress file, updated every second.

If -out, -face, -hands or -format is not given, the setting in the MONO interface is used. If -report or -progress is not given, that file is not created.

Options given as arguments apply to this run only and are not saved to your settings.

Results​

An example of the -report file:

{
"exit_code": 0,
"error": null,
"videos": [
{"input": "D:\\videos\\a.mp4", "status": "completed", "output": "D:\\output\\a.fbx", "face_output": null, "error": null}
]
}

The status of each video is completed, failed or skipped.

An example of the -progress file:

progress=0.420
videos_done=1
video_count=3

progress is the progress of the whole batch, from 0 to 1. When processing ends, an exit_code line is added to the file.

Exit Codes​

Exit codeDescription
0All videos completed successfully
1Invalid arguments, or no videos to process
2Insufficient license
3Some videos failed