-
Notifications
You must be signed in to change notification settings - Fork 12
Command Line.en US
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.
dotnet tool install --global ChapterTool
chaptertool --help
chaptertool formatsFrom source, run:
dotnet run --project src/ChapterTool.CommandLine -- formatschaptertool inspect input.mpls
chaptertool inspect --source input.xmlinspect 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.
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.