def exact_frame_count(input_path):
    """Returns the exact number of frames in the video.

    .. warning::

        This method uses the ``-count_frames`` argument of ``ffprobe``, which
        requires decoding the video and can be very slow.

    Args:
        input_path: the path to the video

    Returns:
        the number of frames in the video
    """
    opts = [
        "-count_frames",
        "-select_streams",
        "v:0",
        "-print_format",
        "json",
        "-show_streams",
    ]
    ffprobe = etav.FFprobe(opts=opts)
    output = json.loads(ffprobe.run(input_path).decode())
    return int(output["streams"][0]["nb_read_frames"])
Returns the exact number of frames in the video.

    .. warning::

        This method uses the ``-count_frames`` argument of ``ffprobe``, which
        requires decoding the video and can be very slow.

    Args:
        input_path: the path to the video

    Returns:
        the number of frames in the video
    
fiftyone/utils/video.py