class_docstr: Creates a video component that can be used to upload/record videos (as an input) or display videos (as an output).
  For the video to be playable in the browser it must have a compatible container and codec combination. Allowed
  combinations are .mp4 with h264 codec, .ogg with theora codec, and .webm with vp9 codec. If the component detects
  that the output video would not be playable in the browser it will attempt to convert it to a playable mp4 video.
  If the conversion fails, the original video is returned.
  Preprocessing: passes the uploaded video as a {str} filepath or URL whose extension can be modified by `format`.
  Postprocessing: expects a {str} or {pathlib.Path} filepath to a video which is displayed, or a {Tuple[str | pathlib.Path, str | pathlib.Path | None]} where the first element is a filepath to a video and the second element is an optional filepath to a subtitle file.
  Examples-format: a {str} filepath to a local file that contains the video, or a {Tuple[str, str]} where the first element is a filepath to a video file and the second element is a filepath to a subtitle file.
  Demos: video_identity, video_subtitle
code: def preprocess(self, payload: VideoData | None) -> str | None:
      if payload is None:
          return None
      assert payload.video.path
      file_name = Path(payload.video.path)
      uploaded_format = file_name.suffix.replace(".", "")
      needs_formatting = (
          self.format is not None and uploaded_format != self.format
      )
      flip = self.sources == ["webcam"] and self.mirror_webcam
  
      if self.min_length is not None or self.max_length is not None:
          # With this if-clause, avoid unnecessary execution of `processing_utils.get_video_length`.
          # This is necessary for the Wasm-mode, because it uses ffprobe, which is not available in the browser.
          duration = processing_utils.get_video_length(file_name)
          if self.min_length is not None and duration < self.min_length:
              raise gr.Error(
                  f"Video is too short, and must be at least {self.min_length} seconds"
              )
          if self.max_length is not None and duration > self.max_length:
              raise gr.Error(
                  f"Video is too long, and must be at most {self.max_length} seconds"
              )
  
      if needs_formatting or flip:
          format = (
              f".{self.format if needs_formatting else uploaded_format}"
          )
          output_options = (
              ["-vf", "hflip", "-c:a", "copy"] if flip else []
          )
          output_options += ["-an"] if not self.include_audio else []
          flip_suffix = "_flip" if flip else ""
          output_file_name = str(
              file_name.with_name(
                  f"{file_name.stem}{flip_suffix}{format}"
              )
          )
          output_filepath = Path(output_file_name)
          if output_filepath.exists():
              return str(output_filepath.resolve())
          if wasm_utils.IS_WASM:
              raise wasm_utils.WasmUnsupportedError(
                  "Video formatting is not supported in the Wasm mode."
              )
          ff = FFmpeg(
              inputs={str(file_name): None},
              outputs={output_file_name: output_options},
          )
          ff.run()
          return str(output_filepath.resolve())
      elif not self.include_audio:
          output_file_name = str(
              file_name.with_name(f"muted_{file_name.name}")
          )
          if Path(output_file_name).exists():
              return output_file_name
          if wasm_utils.IS_WASM:
              raise wasm_utils.WasmUnsupportedError(
                  "include_audio=False is not supported in the Wasm mode."
              )
          ff = FFmpeg(
              inputs={str(file_name): None},
              outputs={output_file_name: ["-an"]},
          )
          ff.run()
          return output_file_name
      else:
          return str(file_name)
  
imports: from __future__ import annotations
  import tempfile
  import warnings
  from pathlib import Path
  from typing import Any, Callable, Literal, Optional
  from gradio_client import utils
  from gradio_client.documentation import document, set_documentation_group
  import gradio
  from gradio import processing_utils, utils, wasm_utils
  from gradio.components.base import Component
  from gradio.data_classes import FileData, GradioModel
  from gradio.events import Events
label_desc: Use image node_id 2 for calling the Video obj's underlying member method code with example usage: obj.preprocess(payload) and returns: None, str, str, output_file_name, str, output_file_name