y5gfunc.preview.screen_shot¶
screen_shot
¶
Functions:
| Name | Description |
|---|---|
screen_shot |
Takes screenshots of specified frames from a VapourSynth clip. |
screen_shot
¶
screen_shot(clip: VideoNode, frames: Union[list[int], int], path: Union[Path, str], file_name: str, overwrite: bool = True) -> None
Takes screenshots of specified frames from a VapourSynth clip.
This function selects one or more frames from the input video clip, and saves each selected frame as a PNG image using the fpng writer.
The output filenames are generated based on the file_name format string, where a format specifier (like %d) is replaced by the corresponding frame number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
VideoNode
|
The input VapourSynth video node. |
required |
|
Union[list[int], int]
|
The frame number or list of frame numbers to capture. If an integer is provided, it's treated as a single-element list. |
required |
|
Union[Path, str]
|
The directory path where the screenshots will be saved. Can be a string or a pathlib.Path object. |
required |
|
str
|
A format string for the output filename. Must contain a C-style format specifier that will be replaced by the frame number. Example: 'screenshot_%05d' will produce filenames like 'screenshot_00100.png' for frame 100. |
required |
|
bool
|
overwrite parameter for |
True
|
Returns:
| Type | Description |
|---|---|
None
|
None |