def METHOD_NAME(file: File) -> str | None:
    with open(str(file.path), "rb") as image:
        with mmap(image.fileno(), 0, access=ACCESS_READ) as mm:
            position = _locate_embedded_video_google(
                mm
            ) or _locate_embedded_video_google(mm)
            if position == -1:
                return None
            output_dir = f"{settings.MEDIA_ROOT}/embedded_media"
            if not os.path.exists(output_dir):
                os.makedirs(output_dir)
            output_path = f"{output_dir}/{file.hash}_1.mp4"
            with open(output_path, "wb+") as video:
                mm.seek(position)
                data = mm.read(mm.size())
                video.write(data)
            return output_path