Configuration
Configuration (config.json)
slidemovie allows you to customize video resolution, audio quality, and TTS settings via JSON configuration files.
Configuration Loading Order
The program loads settings in the following order (later sources override earlier ones):
- Built-in Defaults: Hardcoded in the program.
- User Config:
~/.config/slidemovie/config.json(Home directory).- Note: If this file does not exist, it will be automatically created with default values on the first run.
- Local Config:
./config.json(Current working directory). - CLI Arguments: Command-line flags (highest priority for specific settings).
Configuration Options
Here is a complete list of available keys in config.json.
Text-to-Speech (TTS)
See multiai-tts for supported providers and models.
| Key | Type | Default | Description |
|---|---|---|---|
tts_provider |
string | "google" |
The AI provider (google, openai, azure, or voicevox). |
tts_model |
string | "gemini-3.1-flash-tts-preview" |
The specific model name. Required for Google and OpenAI; ignored for Azure and VOICEVOX. |
tts_voice |
string | "sadaltager" |
The voice ID (e.g., alloy for OpenAI, en-US-AvaMultilingualNeural for Azure and English). For VOICEVOX, an integer speaker style ID (e.g., "3"). |
tts_use_prompt |
bool | true |
Whether to send a system prompt to the TTS API. Set true for google and false for OpenAI, Azure and VOICEVOX. |
prompt |
string | "Please speak..." |
The system instruction for the TTS engine. |
prompt_separator |
string | "" |
Separator inserted between the style prompt (prompt + per-slide additional_prompt) and the spoken text. Empty disables it (default). Useful with long prompts to clearly mark where the script begins — e.g. "\n\nScript:\n". See Custom Prompt per Slide. |
chunk_size |
int / null | null |
Max characters per chunk for long narration. null disables splitting (default behavior). Measured against the spoken text only, not the prompt. See Long narration. |
split_chars |
string | "。..!!??\n" |
Candidate characters where the text may be split into chunks. |
chunk_overflow |
string | "extend" |
Behavior when no split candidate is found within chunk_size: "extend" reads on to the next candidate; "error" stops with an error. |
tts_voicevox_url |
string / null | null |
VOICEVOX engine URL. null uses the default (http://127.0.0.1:50021). Only used when tts_provider is voicevox. |
VOICEVOX: VOICEVOX runs as a local engine and must already be running before you build (default
http://127.0.0.1:50021). No API key is required,tts_modelis ignored, andtts_voicemust be an integer speaker style ID. Settts_use_prompttofalseso the style prompt is not read aloud.
Video Format
| Key | Type | Default | Description |
|---|---|---|---|
screen_size |
[int, int] | [1280, 720] |
Resolution [width, height]. Slide images are normalized to this size. |
image_pad_color |
string | "white" |
Padding color used when a slide’s aspect ratio differs from screen_size. The image is scaled to fit and centered, with even letterbox/pillarbox padding of this color. Any ImageMagick color name/value is accepted (e.g. "black"). |
video_fps |
int | 30 |
Frames per second. |
video_codec |
string | "libx264" |
Video encoding codec. |
video_pix_fmt |
string | "yuv420p" |
Pixel format (compatibility). |
Audio Format
| Key | Type | Default | Description |
|---|---|---|---|
audio_codec |
string | "aac" |
Audio encoding codec. |
sample_rate |
int | 44100 |
Sample rate in Hz. |
audio_bitrate |
string | "192k" |
Audio quality bitrate. |
audio_channels |
int | 2 |
1 (Mono) or 2 (Stereo). |
General / Processing
| Key | Type | Default | Description |
|---|---|---|---|
silence_sec |
float | 2.5 |
Silence duration added before each slide speaks. |
max_retry |
int | 2 |
Number of retries if TTS API fails. |
ffmpeg_loglevel |
string | "error" |
Log verbosity for FFmpeg processes. |
show_skip |
bool | false |
If true, logs “skipped” tasks (unchanged files) to the console. Can be enabled via --debug. |
output_root |
string | null |
Custom root directory for video output. Can be overridden by the -o CLI option. |
output_filename |
string | null |
Output video filename (without extension). Defaults to project ID. Can be overridden by the -f CLI option. |
Example config.json
To create a Full HD (1080p) video using OpenAI, save this as config.json in your project folder:
{
"tts_provider": "openai",
"tts_model": "gpt-4o-mini-tts",
"tts_voice": "alloy",
"tts_use_prompt": false,
"screen_size": [1920, 1080]
}
To use VOICEVOX (start the local engine first):
{
"tts_provider": "voicevox",
"tts_voice": "3",
"tts_use_prompt": false
}
Warning: Once you start building a project, the
screen_sizeand FPS are recorded in the status file (status.json). If you change these settings halfway through,slidemoviewill detect an inconsistency and abort to prevent video corruption. To apply new video settings, you may need to delete the files inmovie/directory to rebuild from scratch.