Handles the `save-images` command.
(
context: CliContext,
scenes: SceneList,
cuts: CutList,
num_images: int,
frame_margin: int,
image_extension: str,
encoder_param: int,
filename: str,
output: str | None,
show_progress: bool,
scale: int,
height: int,
width: int,
interpolation: Interpolation,
threading: bool,
)
| 167 | |
| 168 | |
| 169 | def save_images( |
| 170 | context: CliContext, |
| 171 | scenes: SceneList, |
| 172 | cuts: CutList, |
| 173 | num_images: int, |
| 174 | frame_margin: int, |
| 175 | image_extension: str, |
| 176 | encoder_param: int, |
| 177 | filename: str, |
| 178 | output: str | None, |
| 179 | show_progress: bool, |
| 180 | scale: int, |
| 181 | height: int, |
| 182 | width: int, |
| 183 | interpolation: Interpolation, |
| 184 | threading: bool, |
| 185 | ): |
| 186 | """Handles the `save-images` command.""" |
| 187 | del cuts # save-images only uses scenes. |
| 188 | assert context.video_stream is not None |
| 189 | |
| 190 | images = save_images_impl( |
| 191 | scene_list=scenes, |
| 192 | video=context.video_stream, |
| 193 | num_images=num_images, |
| 194 | frame_margin=frame_margin, |
| 195 | image_extension=image_extension, |
| 196 | encoder_param=encoder_param, |
| 197 | image_name_template=filename, |
| 198 | output_dir=output, |
| 199 | show_progress=show_progress, |
| 200 | scale=scale, |
| 201 | height=height, |
| 202 | width=width, |
| 203 | interpolation=interpolation, |
| 204 | threading=threading, |
| 205 | ) |
| 206 | # Save the result for use by `save-html` if required. |
| 207 | context.save_images_result = (images, output) |
| 208 | |
| 209 | |
| 210 | def split_video( |
nothing calls this directly
no outgoing calls
no test coverage detected