Processing Config
Configuration settings for generating shorts.
Configuration values used throughout the processing pipeline.
This Pydantic settings model manages all parameters required for video processing,
including crop aspect ratios, scene generation limits, and timing boundaries for
the generated short clips. Values can be loaded from environment variables or a .env file.
Attributes:
| Name | Type | Description |
|---|---|---|
target_ratio_w |
int
|
Target width for the final crop aspect ratio. |
target_ratio_h |
int
|
Target height for the final crop aspect ratio. |
scene_limit |
int
|
Maximum number of top scenes to render from a single video. |
x_center |
float
|
Horizontal center point for the crop (0.0=left, 1.0=right). |
y_center |
float
|
Vertical center point for the crop (0.0=top, 1.0=bottom). |
max_error_depth |
int
|
Maximum number of retries if GPU rendering fails. |
min_short_length |
int
|
Minimum permissible duration (in seconds) for a generated short. |
max_short_length |
int
|
Maximum permissible duration (in seconds) for a generated short. |
max_combined_scene_length |
int
|
Maximum permitted length for a contiguous block of action. |
Source code in src/shorts_maker/config.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
middle_short_length
property
Return the mid point between min and max short lengths.