def video_metadata_type_casting(self, field, value):
        """Cast needed video metadata fields to other types than the default str."""
        if field == "rotate":
            return (field, float(value))

        elif field == "displaymatrix":
            match = re.search(r"[-+]?\d+(\.\d+)?", value)
            if match:
                # We must multiply by -1 because displaymatrix return info
                # about how to rotate to show video, not about video rotation
                return (field, float(match.group()) * -1)

        return (field, value)
Cast needed video metadata fields to other types than the default str.
moviepy/video/io/ffmpeg_reader.py