Skip to content
interpolini

CLI and config

Usage

interpolini-cli renders clips without the window. It is in the same folder as the app. It saves each result as Render describes.

interpolini-cli clip.mp4
interpolini-cli first.mp4 second.mp4
-c, --config <name|file>
Load a named config or an ini file
-s, --set <setting>
Change one setting
--from <seconds>
Start of the part to render
--to <seconds>
End of the part to render
--mute <track>
Leave out an audio track
-1, --join
Put all clips into one file
-g, --global
Skip the configs in the folders of the clips
-j, --json
Print events as JSON lines
-h, --help
Show the usage
-V, --version
Show the version

The CLI reads the same config files and the same settings as the window.

Settings

-s section.key=value replaces one setting of the config for this run. Repeat it for more settings. The names are the names in the config file. A key with a space needs quotes.

interpolini-cli -s blending.fps=120 -s output.codec=hevc clip.mp4
interpolini-cli -s "mask.peel limit=10" -s mask.enabled=no clip.mp4

An unknown name or value gives a warning, and the run continues. An argument in another form stops the run with exit code 2.

Part of a clip

--from and --to render a part of the clip. --mute 2 leaves out the second audio track. The first track is 1. --join puts all clips into one file, in the order you give them.

interpolini-cli --from 10 --to 25 clip.mp4
interpolini-cli --mute 2 clip.mp4
interpolini-cli --join first.mp4 second.mp4

Batch and scripts

interpolini renders several clips one after the other. Each clip takes its own config. --config name loads interpolini.name.ini for every clip. --global skips the configs in the folders of the clips.

interpolini-cli -c fast *.mp4
interpolini-cli --global *.mp4
interpolini-cli --json clip.mp4

--json prints one JSON line for each event: start, info, warning, preparing, progress, done and failed.

{"event":"start","clip":"clip.mp4"}
{"event":"progress","frame":120,"frames":1800,"fps":96.5}
{"event":"done","clip":"clip.mp4","output":"clip - interpolini.mp4","seconds":18.7}

The exit code is 0 when all clips are done, 1 when a clip failed, 2 for wrong arguments and 130 when you stop the render.

Wrap the CLI

If you decide to use interpolini-cli in your own project, a script or an app that wraps it, run it with --json and read the events from stdout. Take the path of the result from the done event, because interpolini never overwrites a file and adds a number to the name when it is taken.

Pass the arguments as a list and not as one shell string, and give each clip as a full path. The CLI has no marker for the end of the options, so a relative path to a clip named --join would turn that option on. Always pass at least one clip, because without one the CLI opens a file dialog and waits. Pass -c with the path of your own ini file as well, so the settings don't depend on an interpolini.ini next to the clip or the app.

If what you're running is public, please don't pass arbitrary or user-controlled strings in -s or the config: output.options goes to the encoder as it is, and color.lut makes interpolini read a file. Clips from other people are a risk of their own, because FFmpeg decodes them inside the process. For those, run the CLI in a sandbox or a container with a time limit and without network access, which it never needs.

To stop a render, send one interrupt, which is Ctrl C, or SIGTERM on Linux and macOS. interpolini closes the file at the next frame, so it is shorter but still plays, and exits with code 130. A second interrupt quits at once and deletes the unfinished file. Don't kill the process, because that leaves a broken file behind.

File picker

Start interpolini-cli without a clip to choose clips in a file dialog, which is also what happens when you double-click the program. On Linux it opens a terminal first, and the terminal stays open until you press Enter.

interpolini.ini

A config is a text file named interpolini.ini, or interpolini.name.ini for a named config. A line is key: value and a section starts with [name]. A line that starts with ; or # is a comment.

[interpolation]
engine: rife
fps: 480

[rife]
backend: tensorrt
model: rife-v4.25

[blending]
fps: 60
weighting: equal

[output]
codec: hevc
quality: 18

Write only the keys you want to change. The others keep their defaults. The window writes these files too: Save in the Config row of the panel writes the file of the config, and New adds interpolini.name.ini next to the app.

Lookup order

For each clip, interpolini looks for the config in this order:

  1. the folder of the clip
  2. the folder of the app
  3. the built-in defaults

The default config is interpolini.ini. --config name looks for interpolini.name.ini in the same places, and the file must exist. A path to an ini file loads that file. The app creates interpolini.ini next to itself at first start.