class_docstr: extract keyframes from a video and save it as jpg.
  TODO: consider to merge with `CodecProcessor`.
class_docstr_tok: ["extract","keyframes","from","a","video","and","save","it","as","jpg",".","TODO",":","consider","to","merge","with","`","CodecProcessor","`","."]
docstr: keep the shorter side be `self.size`, strech the other.
docstr_tok: ["keep","the","shorter","side","be","`","self.size","`",",","strech","the","other","."]
code: def _get_output_dim(self, height, width):
      """
      keep the shorter side be `self.size`, strech the other.
      """
      if height >= width:
          return int(height * self.size / width), self.size
      else:
          return self.size, int(width * self.size / height)
  
imports: import torch
  import pandas
  import os
  import numpy
  import ffmpeg
  import random
  from torch.utils.data import Dataset
label_desc: Use image node_id 3 for calling the AvKeyframeVideoCompressor obj's underlying member method code with example usage: obj._get_output_dim(height, width) and returns: int,  self, self,  int