class_docstr: Wraps a VecEnv or VecEnvWrapper object to record rendered image as mp4 video.
  It requires ffmpeg or avconv to be installed on the machine.
  
  :param venv: (VecEnv or VecEnvWrapper)
  :param video_folder: (str) Where to save videos
  :param record_video_trigger: (func) Function that defines when to start recording.
                                      The function takes the current number of step,
                                      and returns whether we should start recording or not.
  :param video_length: (int)  Length of recorded videos
  :param name_prefix: (str) Prefix to the video name
class_docstr_tok: ["Wraps","a","VecEnv","or","VecEnvWrapper","object","to","record","rendered","image","as","mp4","video",".","It","requires","ffmpeg","or","avconv","to","be","installed","on","the","machine",".",":","param","venv",":","(","VecEnv","or","VecEnvWrapper",")",":","param","video_folder",":","(","str",")","Where","to","save","videos",":","param","record_video_trigger",":","(","func",")","Function","that","defines","when","to","start","recording",".","The","function","takes","the","current","number","of","step",",","and","returns","whether","we","should","start","recording","or","not",".",":","param","video_length",":","(","int",")","Length","of","recorded","videos",":","param","name_prefix",":","(","str",")","Prefix","to","the","video","name"]
code: def start_video_recorder(self):
      self.close_video_recorder()
  
      video_name = "{}-step-{}-to-step-{}".format(
          self.name_prefix,
          self.step_id,
          self.step_id + self.video_length,
      )
      base_path = os.path.join(self.video_folder, video_name)
      self.video_recorder = video_recorder.VideoRecorder(
          env=self.env,
          base_path=base_path,
          metadata={"step_id": self.step_id},
      )
  
      self.video_recorder.capture_frame()
      self.recorded_frames = 1
      self.recording = True
  
file_path: stable-baselines/stable_baselines/common/vec_env/vec_video_recorder.py
imports: import os
  from gym.wrappers.monitoring import video_recorder
  from stable_baselines import logger
  from stable_baselines.common.vec_env.base_vec_env import VecEnvWrapper
  from stable_baselines.common.vec_env.dummy_vec_env import DummyVecEnv
  from stable_baselines.common.vec_env.subproc_vec_env import SubprocVecEnv
  from stable_baselines.common.vec_env.vec_frame_stack import VecFrameStack
  from stable_baselines.common.vec_env.vec_normalize import VecNormalize
label_desc: Use image node_id 3 for calling the VecVideoRecorder obj's underlying member method code with example usage: obj.start_video_recorder() without return types