def validate_video_sample(sample):
    """Validates that the sample's media is a video.

    Args:
        sample: a :class:`fiftyone.core.sample.Sample`

    Raises:
        ValueError if the sample's media is not a video
    """
    if sample.media_type != fom.VIDEO:
        raise ValueError(
            "Expected media type '%s' but found '%s' for filepath '%s'"
            % (fom.VIDEO, sample.media_type, sample.filepath)
        )
Validates that the sample's media is a video.

    Args:
        sample: a :class:`fiftyone.core.sample.Sample`

    Raises:
        ValueError if the sample's media is not a video
    
fiftyone/core/validation.py