nicetoolbox.utils.video.cut_length

nicetoolbox.utils.video.cut_length(video_file: str, output_base: str, start_frame: int | None = None, number_of_frames: int | None = None) str[source]

Cuts a specified length from a video file and saves it as a new file.

Parameters:
  • video_file (str) – The path to the input video file.

  • output_base (str) – The base name for the output file. The file extension will be added automatically.

  • start_frame (int, optional) – The starting frame index for the cut. Defaults to None.

  • number_of_frames (int, optional) – The number of frames to include in the cut. Defaults to None.

Returns:

The path to the output file.

Return type:

str