code: def crop_fn_videoframereader_opencv(input_path, output_path, t1, t2):
      start_time, end_time = t1, t2
  
      frame_reader = VideoFrameReader(input_path)
      fps = frame_reader.fps
      ts = start_time
      frame = frame_reader.get_frame_for_time(ts)
  
      # We are using the VideoWriter directly instead of write_video_rgb
      # due to memory issues of holding all frames
      # in memory before writing
      writer = cv2.VideoWriter(
          output_path,
          FFMPEG_FOURCC["avc1"],
          fps=fps,
          frameSize=(frame.width, frame.height),
          isColor=True,
      )
      while ts <= end_time and frame is not None:
          frame = np.array(frame)
          frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
          writer.write(frame)
  
          ts = frame_reader.get_next_frame_time_stamp()
          frame = frame_reader.read()
  
      writer.release()
  
      return True
  
imports: import glob
  import numpy
  import os
  import re
  import tempfile
  from addict import Dict
  from collections import defaultdict
  from pathlib import Path
  from subprocess import call
  import cv2
  from ..dataset import GluonCVMotionDataset, DataSample, FieldNames, get_resized_video_location
  from ..io.video_io import VideoFrameReader, VideoSortedFolderReader, cmd_with_addn_args, FFMPEG_FOURCC
label_desc: Use image node_id 7 for calling a global function with example usage: crop_fn_videoframereader_opencv(input_path, output_path, t1, t2) and returns: True