Skip to content

Command Line.en US

TautCony edited this page Sep 1, 2026 · 1 revision

Command Line

The command-line tool lists supported formats, inspects sources, and converts chapters without opening the desktop UI. It requires a compatible .NET 10 Runtime. Matroska and general media sources may need external tools; BDMV uses the managed parser.

Install and start

dotnet tool install --global ChapterTool
chaptertool --help
chaptertool formats

From source, run:

dotnet run --project src/ChapterTool.CommandLine -- formats

Inspect a source

chaptertool inspect input.mpls
chaptertool inspect --source input.xml

inspect reports the importer, groups, entries, chapter count, frame rate, and diagnostics. For multi-entry sources, note the zero-based group/entry indexes or select by stable entry-id.

Convert

chaptertool convert input.xml --format txt --output chapters.txt
chaptertool convert input.xml --format vtt --stdout
chaptertool convert input.xml --format xml --xml-language zho
chaptertool convert input.mpls --format qpf --entry-index 1 --frame-rate 23.976
Option Meaning
--source, -i Input file or directory
--format, -f txt, xml, qpf, timecodes, tsmuxer, cue, json, vtt, or celltimes
--output, -o Output path
--stdout, -s Write to stdout; incompatible with --output
--group-index, -gi Multi-group index
--entry-index, -ei Entry index within a group
--entry-id Select by stable entry id
--xml-language, -xl XML chapter language
--source-file-name, -sfn Media name referenced by CUE
--frame-rate, -fr Frame-rate override; must be positive
--expression Lua timestamp expression
--expression-preset Built-in expression preset
--force Replace an existing explicit output file
--encoding utf8, utf16le, utf16be, utf32le, or utf32be
--bom Write a BOM
--language Terminal output language

Commands return 0 on success and a nonzero code for argument, selection, or import errors. Diagnostics are written to stderr. --expression and --expression-preset cannot be used together. When --output is omitted, a non-conflicting name is generated in the configured default directory or alongside the input. Explicit existing output paths require --force.

Clone this wiki locally