CodeVideoΒΆ
A video object.
class CodeVideo(
video_name: str = "CodeVideo",
code_string: str = None,
code_file: str = None,
language: str = None,
line_spacing: float = 0.7,
interval_range: tuple[float, float] = (0.2, 0.2),
camera_floating_max_value: float = 0.1,
camera_move_interval: float = 0.1,
camera_move_duration: float = 0.5,
camera_scale: float = 0.5
)
|
The name of the generated video file. |
|
The code string passed in directly. |
|
The path to the code file. |
|
The code language (for syntax highlighting). |
|
The line spacing of the code. |
|
The range of time intervals for displaying characters (seconds), in tuple form; minimum value is 0.2. |
|
The maximum range of camera floating, value less than or equal to 0. |
|
The time interval for automatic camera movement (seconds), value less than or equal to 0. |
|
The duration of camera movement (seconds), value less than or equal to 0. |
|
The scale of the camera. |
Use validate_call
from pydantic
, which will automatically check the parameter types when you pass them in to ensure their correctness.
Caution
code_string
and code_file
cannot be passed in at the same time, and the code passed in cannot contain non-ASCII characters.