If you want to use FFmpeg Library with your PHP, here it is;

sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

sudo yum install ffmpeg ffmpeg-devel -y

After that, install FFmpeg PHP extension;

https://github.com/char0n/ffmpeg-php

Sample Code;

if (class_exists("ffmpeg_movie")) 
{ 
	$mov = new ffmpeg_movie($source_video); 
	$frame = $mov->getFrame(10); //take a screenshot image of frame 10
	if ($frame)
	{
		$gd_image = $frame->toGDImage();
		if ($gd_image)
		{
			imagepng($gd_image, $to_path."/".$filename);
			imagedestroy($gd_image); //save image.
		}
	}
}