def grab_video_preview(video_path, timestamp, dimensions)
      width, height = dimensions
      require 'tempfile'
      tmp = Tempfile.new(['video_preview', ".jpg"])
      file = tmp.path
      command = "ffmpeg -y -i \"#{video_path}\" -s #{width}x#{height} -ss \"#{timestamp}\" -vframes 1 \"#{file}\" 2>&1 >/dev/null"
      # puts "COMMAND: #{command}"
      `#{command}`
      raise "Failed to grab screenshot at #{timestamp} from #{video_path} (using #{command})" unless $CHILD_STATUS.to_i == 0
      tmp
    end
def grab_video_preview(video_path, timestamp, dimensions)
      width, height = dimensions
      require 'tempfile'
      tmp = Tempfile.new(['video_preview', ".jpg"])
      file = tmp.path
      command = "ffmpeg -y -i \"#{video_path}\" -s #{width}x#{height} -ss \"#{timestamp}\" -vframes 1 \"#{file}\" 2>&1 >/dev/null"
      # puts "COMMAND: #{command}"
      `#{command}`
      raise "Failed to grab screenshot at #{timestamp} from #{video_path} (using #{command})" unless $CHILD_STATUS.to_i == 0
      tmp
    end
Grabs a screenshot from the specified video at the specified timestamp using `ffmpeg`
 @param video_path (String) the path to the video file
 @param timestamp (String) the `ffmpeg` timestamp format (e.g. 00.00)
 @param dimensions (Array) the dimension of the screenshot to generate
 @return the TempFile containing the generated screenshot