public function fromVideo($originalPath, $destinationPath, $newWidth, $newHeight)
    {
        if (!$this->isGdLoaded || !$this->isFfmpegLoaded) {
            $message = '';
            if (!$this->isGdLoaded) {
                $message .= 'The GD extension is missing \n';
            }
            if (!$this->isFfmpegLoaded) {
                $message .= 'The Ffmpeg extension is missing \n';
            }

            throw new UnloadedExtensionException($message);
        }

        $media = new \ffmpeg_movie($originalPath);
        $frameCount = $media->getFrameCount();
        $frame = $media->getFrame(round($frameCount / 2));

        if ($frame) {
            $image = $frame->toGDImage();
            $this->resize($newWidth, $newHeight, $image, $destinationPath);

            return $destinationPath;
        }

        $exception = new ExtensionNotSupportedException();
        $exception->setExtension(pathinfo($originalPath, PATHINFO_EXTENSION));
        throw $exception;
    }