Docs / CLI reference

Scene and music

Every command that builds, checks and draws a 3D scene, and every command that checks, plays and measures an episode's music.

A 3D scene and a song are both files your agent writes. The CLI checks them, then draws the scene or plays the song on your computer. These commands send nothing to a model.

Every command on this page needs a signed-in computer. Signed out, each one prints You are not signed in. Ask your agent to run minicut login. and exits with code 10. See Account.

minicut scene api

Prints the import line for a scene script that you run yourself with Node.js.

Usage

Usage
minicut scene api

Details

Put the printed line at the top of your script. The script then has the scene composer's own operations and a save that checks the scene before it writes. MiniCut never runs your script. You run it, so your agent app's permission check sees every run.

Global options: see Global options.

Examples

Get the import line

Command
minicut scene api

You see one import line to copy into your script.

See also

minicut scene build, minicut scene check

minicut scene build

Applies a list of scene operations to a fresh scene, checks it, and writes the scene file.

Usage

Usage
minicut scene build NAME.scene.ops.json [--out FILE]

Replace the following:

  • NAME.scene.ops.json: a data file that lists the scene operations and their arguments.
  • FILE: the scene file to write.

Details

An operations file is data only. A file that holds code is refused. Without --out, the command writes NAME.scene.json beside the operations file and raises its revision number by one. If the scene has problems, nothing is written.

Options

FlagTypeDefaultDescription
--outpathNAME.scene.jsonThe scene file to write.

Global options: see Global options.

Examples

Build a scene from an operations file

Command
minicut scene build episodes/ep01/scenes/c03.scene.ops.json

You see Wrote with the scene file, its revision and a short summary of the scene.

Output

Exit codeMeaning
0The scene file was written.
1The scene has problems. Nothing was written.
2The file is missing or the command is wrong.

See also

minicut scene check

Checks a scene file against the composer's own rules and limits.

Usage

Usage
minicut scene check FILE [--loose]

Replace the following:

  • FILE: the scene file to check.

Details

The check reads the scene's structure and limits first. Then it checks every body against every prop and the floor, at every frame. It prints one line for each problem.

Options

FlagTypeDefaultDescription
--looseswitchoffRun the check without the strict rules.

Global options: see Global options.

Examples

Check a shot's scene

Command
minicut scene check episodes/ep01/scenes/c03.scene.json

You see OK with a summary of the scene, or the number of problems and one line for each.

Output

Exit codeMeaning
0No problems. No body goes through a prop or the floor.
1One or more problems. Each one is printed.
2The file is missing or the command is wrong.

See also

minicut scene render, Checks and loops

minicut scene render

Draws a scene as a still or a clip on your computer.

Usage

Usage
minicut scene render FILE [--camera CAMERA] {--still SECOND|--still middle|--clip} [--project PROJECT --episode EPISODE --clip CLIP] [--id LIBRARY_ID] [--draft | --size WIDTH] [--force]
minicut scene render FILE FILE ... {--still SECOND|--clip} [--draft] [--force]
minicut scene render --project PROJECT --episode EPISODE {--still SECOND|--clip} [--draft] [--force]

Replace the following:

  • FILE: the scene file to draw.
  • CAMERA: the id of a camera in the scene.
  • SECOND: the second of the scene to draw as a still.
  • PROJECT, EPISODE, CLIP: where to save a clip, for example night-market, ep01, c03.
  • LIBRARY_ID: the library entry to save a still into.
  • WIDTH: the frame width in pixels.

Details

A clip is saved as the next take of the named shot. A still goes into your library with --project or --id. Without them, it goes into the cache/stills folder of your MiniCut home folder, and the path is printed. Every render keeps two copies: the clean picture, and a copy in labeled/ with a name tag on every asset, for people to read.

The render is refused while a body goes through a prop or the floor in the frames it would draw. A clip whose scene, camera and size are unchanged since its newest take is not drawn again.

With several files, or with --project and --episode alone, the command draws many scenes in one run. With --project and --episode alone, it draws every shot scene of the episode, in shot order.

Options

FlagTypeDefaultDescription
--camerastringthe scene's own cameraThe camera to draw from.
--stillsecond or middlenoneDraw one still at this second, or at the middle second.
--clipswitch, or a clip idnoneDraw a clip.
--projectstringnoneThe project to save into.
--episodestringnoneThe episode to save into.
--idstringnoneThe library entry to save a still into.
--draftswitchoffDraw half of each side (640 x 360 for 16:9), for mock looks.
--sizenumberthe full sizeAny even width from 128 up to the full width.
--forceswitchoffDraw a clip again even if nothing changed.

Global options: see Global options.

Examples

Draw a still from the middle of a scene

Command
minicut scene render episodes/ep01/scenes/c03.scene.json --still middle --draft

Draw every shot scene of an episode as clips

Command
minicut scene render --project night-market --episode ep01 --clip

You see each scene as it is drawn, then one line with how many were drawn, unchanged and not drawn.

Output

Exit codeMeaning
0Every scene was drawn or was already up to date.
1A scene has a body going through a prop or the floor.
2The command is wrong or a file is missing.
5An option value is wrong. The message names it.

See also

minicut scene check, Generate

minicut scene undo

Puts back the version of a scene before its last write.

Usage

Usage
minicut scene undo FILE

Replace the following:

  • FILE: the scene file.

Details

It undoes the last write from the MiniCut app or from an agent. The last 20 versions are kept.

Global options: see Global options.

See also

minicut scene panorama

Sets or clears the panorama picture of a scene.

Usage

Usage
minicut scene panorama FILE {--image PICTURE|--box BOX_ID|--clear}

Replace the following:

  • FILE: the scene file.
  • PICTURE: a picture on your computer. It is also put on the episode's board.
  • BOX_ID: the id of a picture box on the episode's board.

Options

FlagTypeDefaultDescription
--imagepathnoneUse this picture from your computer.
--boxstringnoneUse this picture box from the board.
--clearswitchoffRemove the panorama picture.

Global options: see Global options.

See also

minicut scene to-board

Copies a picture or clip next to the scene and adds it as a box on the episode's board.

Usage

Usage
minicut scene to-board FILE MEDIA [--label WORDS]

Replace the following:

  • FILE: a scene file inside an episode, <project>/episodes/epNN/scenes/NAME.scene.json.
  • MEDIA: the picture or clip to send to the board.
  • WORDS: the label for the new box.

Details

The episode needs a board first. Make one with minicut board new --project PROJECT --episode EPISODE.

Options

FlagTypeDefaultDescription
--labelstringnoneThe label for the new box.

Global options: see Global options.

See also

minicut scene panorama, Generate

minicut music

Gives your own music script what it needs, then checks, plays and measures the song file it writes.

Usage

Usage
minicut music api [--json]
minicut music instruments [--json]
minicut music cuts EPISODE_FOLDER [--json]
minicut music check SONG
minicut music render SONG [--from SECONDS --to SECONDS] [--stems] [--no-mp3]
minicut music measure WAV [--episode EPISODE_FOLDER]
minicut music from-midi MIDI --map MAP [--out SONG]

Replace the following:

  • EPISODE_FOLDER: the episode folder, for example episodes/ep01.
  • SONG: a song file, NAME.song.json.
  • SECONDS: a time in the song, in seconds.
  • WAV: a .wav file that minicut music render made.
  • MIDI: a .mid file from any music tool.
  • MAP: a .json file that maps the MIDI tracks to instruments.

Details

Your agent writes its own music script in Python 3.9 or newer and runs it itself. The script writes a song file. A song file is data only: instruments by catalog id, synths by preset id, no paths and no code. MiniCut never runs your script, and the music commands open no network connection. Your agent runs these commands in the Mock loop.

SubcommandDoes
apiPrints the import lines for your music script. The module uses the Python standard library only.
instrumentsLists instrument ids, note ranges, drum kit pieces and settings.
cutsLists the episode's shots, cuts, scene changes and spoken lines, in seconds.
checkChecks that a song file can be played: ids, ranges and limits.
renderPlays the song into audio files beside it.
measureReports loudness, peaks, hits on cuts and the music level under spoken lines.
from-midiTurns a MIDI file into a song file.

render writes NAME.wav, NAME.mp3, NAME.beats.json, NAME-waveform.png and NAME.report.json beside the song. It needs the instrument samples that minicut setup installs once, about 396 MB.

Options

FlagTypeDefaultDescription
--jsonswitchoffapi, instruments and cuts: print the result as JSON.
--fromsecondsthe startrender: start playing at this time.
--tosecondsthe endrender: stop playing at this time.
--stemsswitchoffrender: also write each instrument as its own file.
--no-mp3switchoffrender: skip the .mp3 file.
--episodepathnonemeasure: compare the music with this episode's cuts and spoken lines.
--mappathnonefrom-midi: the file that maps MIDI tracks to instruments. Required.
--outpathNAME.song.json beside the MIDI filefrom-midi: the song file to write.

Global options: see Global options.

Examples

Read the timing of an episode

Command
minicut music cuts episodes/ep01 --json

Check and play a song

Command
minicut music check episodes/ep01/music/score.song.json
minicut music render episodes/ep01/music/score.song.json

You see the problems in the song file, if any, then the files that render wrote.

Measure the result against the episode

Command
minicut music measure episodes/ep01/music/score.wav --episode episodes/ep01

Output

Exit codeMeaning
0The command finished.
2The command could not run: a file is missing, or a tool needs minicut setup.
5The song file or MIDI map has problems. Each one is printed.

Limits

LimitValue
Song file size32 MB
Time for one render30 minutes
Time for one measure10 minutes

See also

Setup, Checks and loops

Errors

MessageWhat to do
You are not signed in. Ask your agent to run minicut login.Run minicut login, then run the command again.
no such file: ...Check the path to the scene file.
Not written: N problem(s). ... is unchanged.Fix the problems printed above it, then build again.
Use --draft or --size <width>, not both.Pick one of the two.
--size is the frame width in pixels: an even number from 128 to ...Give an even width in that range.
Each clip is saved as the next take of its shot: add --project <id> --episode epNN.Add --project and --episode to draw clips from many scenes.
this episode has no board yet: make one with minicut board new ...Run the minicut board new command in the message.
no Python found. Run: minicut setupRun minicut setup.
the music tools are not set up (...). Run: minicut setupRun minicut setup.
no instrument samples in .... Run: minicut setup (about 396 MB, once). Nothing was rendered.Run minicut setup.
the song file is over 32 MBMake the song file smaller.
Stopped: it ran past the time limit.Render a shorter part with --from and --to.

Next