class_docstr: Video dataset from file.
  
  This class requires that OpenCV be installed.
class_docstr_tok: ["Video","dataset","from","file",".","This","class","requires","that","OpenCV","be","installed","."]
docstr: Return the number of frames in a video file.
  
  Raises:
      RuntimeError: no frames found.
docstr_tok: ["Return","the","number","of","frames","in","a","video","file",".","Raises",":","RuntimeError",":","no","frames","found","."]
code: def get_num_frames(self) -> int:
      """
      Return the number of frames in a video file.
  
      Raises:
          RuntimeError: no frames found.
      """
      num_frames = int(self._get_cap().get(cv2.CAP_PROP_FRAME_COUNT))
      if num_frames == 0:
          raise RuntimeError("0 frames found")
      return num_frames
  
imports: from __future__ import annotations
  import os
  import sys
  import tempfile
  from collections.abc import Callable
  from typing import TYPE_CHECKING, Any
  import numpy
  from torch.utils.data import Dataset, IterableDataset
  from monai.utils.enums import ColorOrder
  from monai.utils.module import optional_import
label_desc: Use image node_id 3 for calling the VideoFileDataset obj's underlying member method code with example usage: obj.get_num_frames() and returns: num_frames