class_docstr: Video writer.
  
  Args:
      path (str): The path to save a video.
      fps (int): The fps of the saved video.
      frame_size (tuple): The frame size (width, height) of the saved video.
      is_color (bool): Whethe to save the video in color format.
class_docstr_tok: ["Video","writer",".","Args",":","path","(","str",")",":","The","path","to","save","a","video",".","fps","(","int",")",":","The","fps","of","the","saved","video",".","frame_size","(","tuple",")",":","The","frame","size","(","width",",","height",")","of","the","saved","video",".","is_color","(","bool",")",":","Whethe","to","save","the","video","in","color","format","."]
code: def __init__(self, path, fps, frame_size, is_color=True):
      self.is_color = is_color
  
      ppmatting.utils.mkdir(path)
      fourcc = cv2.VideoWriter_fourcc("M", "J", "P", "G")
      self.cap_out = cv2.VideoWriter(
          filename=path,
          fourcc=fourcc,
          fps=fps,
          frameSize=frame_size,
          isColor=is_color,
      )
  
file_path: PaddleSeg/Matting/ppmatting/utils/video.py
imports: import os
  import warnings
  import cv2
  import paddle
  import numpy
  import ppmatting
  import ppmatting.transforms
label_desc: Use image node_id 1 to create a new VideoWriter object  with example: obj = VideoWriter(path, fps, frame_size, is_color)