code: def transform_video(
      input_path,
      output_path,
      fps=None,
      min_fps=None,
      max_fps=None,
      size=None,
      min_size=None,
      max_size=None,
      reencode=False,
      verbose=False,
      **kwargs,
  ):
      """Transforms the video according to the provided parameters using
      ``ffmpeg``.
  
      In addition to the size and frame rate parameters, if ``reencode == True``,
      the following basic ``ffmpeg`` command structure is used to re-encode the
      video as an H.264 MP4::
  
          ffmpeg \\
              -loglevel error -vsync 0 -i $INPUT_PATH \\
              -c:v libx264 -preset medium -crf 23 -pix_fmt yuv420p -vsync 0 -an \\
              $OUTPUT_PATH
  
      Args:
          input_path: the path to the input video
          output_path: the path to write the output video
          fps (None): an optional frame rate at which to resample the videos
          min_fps (None): an optional minimum frame rate. Videos with frame rate
              below this value are upsampled
          max_fps (None): an optional maximum frame rate. Videos with frame rate
              exceeding this value are downsampled
          size (None): an optional ``(width, height)`` for each frame. One
              dimension can be -1, in which case the aspect ratio is preserved
          min_size (None): an optional minimum ``(width, height)`` for each
              frame. A dimension can be -1 if no constraint should be applied.
              The frames are resized (aspect-preserving) if necessary to meet
              this constraint
          max_size (None): an optional maximum ``(width, height)`` for each
              frame. A dimension can be -1 if no constraint should be applied.
              The frames are resized (aspect-preserving) if necessary to meet
              this constraint
          reencode (False): whether to reencode the video (see main description)
          verbose (False): whether to log the ``ffmpeg`` command that is executed
          **kwargs: keyword arguments for ``eta.core.video.FFmpeg(**kwargs)``
      """
      _transform_video(
          input_path,
          output_path,
          fps=fps,
          min_fps=min_fps,
          max_fps=max_fps,
          size=size,
          min_size=min_size,
          max_size=max_size,
          reencode=reencode,
          verbose=verbose,
          **kwargs,
      )
  
imports: import itertools
  import json
  import logging
  import os
  import eta.core.frameutils
  import eta.core.image
  import eta.core.numutils
  import eta.core.utils
  import eta.core.video
  import fiftyone
  import fiftyone.core.metadata
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.core.validation
label_desc: Use image node_id 6 for calling a global function with example usage: transform_video(input_path, output_path, fps, min_fps, max_fps, size, min_size, max_size, reencode, verbose) without return types