PHP script to create thumbnail from loaded video

I need you to create a php script that will create a thumbnail from a uploaded video via a file form.

You will not be allowed to save the video to a folder but you just has to work with $_FILES variable.

I have this code for creating thumbnail from an image, I need you to write the equivalent but for videos.


// read photo

$fileTmpName_o = $_FILES['video']['tmp_name']; // temporary file at server side

$oTempFile = fopen($fileTmpName_o, "r");

$sBinaryPhoto = fread($oTempFile, fileSize($fileTmpName_o));

// Try to read image

$nOldErrorReporting = error_reporting(E_ALL & ~(E_WARNING)); // ingore warnings

$oSourceImage = imagecreatefromstring($sBinaryPhoto); // try to create image


// If file uploaded is video

$nWidth = imagesx($oSourceImage); // get original source image width

$nHeight = imagesy($oSourceImage); // and height

// create small thumbnail

$nDestinationWidth = 300;

$nDestinationHeight = 300;

//$oDestinationImage = imagecreatetruecolor($nDestinationWidth, $nDestinationHeight);

$oDestinationImage = imagecreate($nDestinationWidth, $nDestinationHeight);


$oDestinationImage, $oSourceImage,

0, 0, 0, 0,

$nDestinationWidth, $nDestinationHeight,

$nWidth, $nHeight); // resize the image

ob_start(); // Start capturing stdout.

imageJPEG($oDestinationImage); // As though output to browser.

$sBinaryThumbnail = ob_get_contents(); // the raw jpeg image data.

ob_end_clean(); // Dump the stdout so it does not screw other output.


Skills: PHP, Software Architecture, MySQL, HTML

See more: how to create thumbnail image from video in laravel, create thumbnail from video url php, php create thumbnail from image url, how to create thumbnail image from video in php without using ffmpeg, create video thumbnail in codeigniter, create thumbnail from video php without ffmpeg, php generate thumbnail from video file, create thumbnail from video php ffmpeg, flash create thumbnail streaming video, php script create href subdirectories, php script create draw images, php script mouseover thumbnail image, create thumbnail embeded video, php script create m3u links, php script create xml sql, php script create database, create thumbnail xml video playlist, php script create email receive attachment folder, php script create pdf thumbnail, php script create family tree

About the Employer:
( 8 reviews ) Roma, Italy

Project ID: #20708481

10 freelancers are bidding on average $31 for this job


Hello hiring member i hope you are doing well i am bhavika i have 3+years experience in php , laravel , ajax , jquery , javascript , html ,css , bootstrap so we can do it and we can start it right now so please give me More

$25 USD in 1 day
(180 Reviews)

Hi I am software engineer and full stack PHP developer your project is looking very interesting and I am looking forward to your message

$30 USD in 1 day
(158 Reviews)

Hi Dear. My name is Ruyun. After reading your description carefully and I am convinced that I would be a perfect fit for this role. I am a senior Web developer with high skills in Laravel/Ci/Django/Symfony/Yii/Cakephp More

$20 USD in 7 days
(34 Reviews)

Hello. I read your project fully and I am interested in this field. As you can see my profile, I have rich experiences in web. If you hire me, I will do my best and you will see successfully result. Please contact me. More

$20 USD in 1 day
(48 Reviews)

Hi, I am 8 years experienced PHP developer. I understand your point. I can complete this project within two hours . Please check my profile for my work quality . Thanks, Bhaskar Mandal

$30 USD in 1 day
(100 Reviews)

Dear client. I always try learning modern skills and expanding my knowledge all the time. My aim is to produce websites that look beautiful and professional, are highly functional, load quickly and smoothly. And I’m pa More

$20 USD in 7 days
(84 Reviews)

Hi, i am a professional website developer and designer from more than 6 years. My expert zone includes Wordpress, Woocommerce, Custom plugins, PHP laravel etc. i have develop variety of websites. I can fullfil all of More

$100 USD in 7 days
(80 Reviews)

Dear sir. I have just read your requirements carefully. I am very interested in your project. Although I am new in freelancer, I have more than 5 years of experiences in Website Design. I'm an expert in Web(php, [login to view URL] More

$20 USD in 1 day
(7 Reviews)

Greetings, I have read your job description, and I can assure you that I will be able to deliver an excellent job. I am a full stack developer with great experience in PHP, Laravel, jQuery, ajax, javascript, react js, More

$10 USD in 1 day
(10 Reviews)

Dear Sir, Read your requirements, and our skills match the required implementation. We are a fast- growing company, and have well- trained resources available to initiate your project immediately. Below, are a few int More

$30 USD in 25 days
(1 Review)