Video

Actions for handling video files

Module: implementation.datasources.video



VideoRead

Read video file. Subclass of Action. Type of Action[Dict[str, Any], cv2.VideoCapture]


execute

Arguments:

  • input_data (Any): Expected keys:

    • "path_to_file" (str): Path to video file;

Returns:

  • cv2.VideoCapture: Video;




VideoWrite

Write video frame by frame to file. Subclass of Action. Type of Action[Dict[str, Any], None]


execute

Arguments:

  • input_data (Any): Expected keys:

    • "path_to_file" (str): Path to video file;

    • "fourcc" (str): Codec to use;

    • "fps" (int): FPS to use;

    • "width" (int): Frame width to use in pixels;

    • "height" (int): Frame height to use in pixels;

    • "frames" (ndarray): Frames to write;

Raises:

  • Exception: If unable to write file.




VideoReleaseCapture

Release video capture. Subclass of Action. Type of Action[cv2.VideoCapture, None]


execute

Arguments:

  • input_data (cv2.VideoCapture): Video capture to release.



Last updated