tool

Video manipulation tool.

Classes

ManipulationTool

Video manipulation tool.

class ManipulationTool(overwrite=False, verbose=True)[source]

Bases: VideoTool

Video manipulation tool.

Parameters:
  • overwrite (bool) – Whether to overwrite existing files, otherwise raise an error.

  • verbose (Union[bool, int]) – Whether to execute the computation verbosely.

process(in_video_path, out_video_path, start=None, end=None, x_min=None, y_min=None, x_max=None, y_max=None, width=None, height=None)[source]

Offers to trim, crop and resize your video (in that exact order).

Parameters:
  • in_video_path (Union[str, Path]) – Path to input video.

  • out_video_path (Union[str, Path]) – Path to output video.

  • start (Optional[float]) – Start timestamp to trim the video.

  • end (Optional[float]) – End timestamp to trim the video.

  • x_min (Optional[int]) – Top coordinate to crop the video.

  • y_min (Optional[int]) – Left coordinate to crop the video.

  • x_max (Optional[int]) – Bottom coordinate to crop the video.

  • y_max (Optional[int]) – Right coordinate to crop the video.

  • width (Optional[int]) – Width to resize the video.

  • height (Optional[int]) – Height to resize the video.

Returns: