src/Sulu/Bundle/MediaBundle/Media/ImageConverter/MediaImageExtractor.php
private function convertVideoToImage($resource)
    {
        $temporaryFilePath = $this->createTemporaryFile($resource);
        $this->videoThumbnail->generate($temporaryFilePath, '00:00:02:01', $temporaryFilePath);

        $extractedImage = file_get_contents($temporaryFilePath);
        unlink($temporaryFilePath);

        return $this->createTemporaryResource($extractedImage);
    }
private function convertVideoToImage($resource)
    {
        $temporaryFilePath = $this->createTemporaryFile($resource);
        $this->videoThumbnail->generate($temporaryFilePath, '00:00:02:01', $temporaryFilePath);

        $extractedImage = file_get_contents($temporaryFilePath);
        unlink($temporaryFilePath);

        return $this->createTemporaryResource($extractedImage);
    }
private function convertVideoToImage ( $ resource ) { $ temporaryFilePath = $ this -> createTemporaryFile ( $ resource ) ; $ this -> videoThumbnail -> generate ( $ temporaryFilePath , '00:00:02:01' , $ temporaryFilePath ) ; $ extractedImage = file_get_contents ( $ temporaryFilePath ) ; unlink ( $ temporaryFilePath ) ; return $ this -> createTemporaryResource ( $ extractedImage ) ; }
Converts one frame of a video to an image using FFMPEG.

@param resource $resource

@return resource
Converts one frame of a video to an image using FFMPEG .