Closed

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.

// CODE

// 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

error_reporting($nOldErrorReporting);

// 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);

imagecopyresized(

$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.

// END CODE

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

12 freelancers are bidding on average $31 for this job

bjrupani

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
(147 Reviews)
6.5
aftabyounas

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
(112 Reviews)
6.3
WebExpert555

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
(32 Reviews)
6.1
bhaskarmandal

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
(99 Reviews)
6.2
nisharapath

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
(28 Reviews)
5.8
pakistansolution

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
(68 Reviews)
5.7
webgenius0322

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
(44 Reviews)
5.5
romansokolv708

Hi, I'm glad to bid your project. I am very interested in your job. I am a PHP & JS & Python expert and confident on your job. I can do that with my this price for your successful product. As a senior web app full ti More

$50 USD in 1 day
(15 Reviews)
4.7
fashionstar66

Dear Sir, I'm a Web Developer who is specialized in PHP. I have read your description with great interest. I have 6+ years of experience in PHP. I guarantee the best quality of my work and serve full time. if you hire More

$20 USD in 7 days
(8 Reviews)
3.8
SashaMorozov

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
(5 Reviews)
2.7
EnochSoko

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
(8 Reviews)
2.9
Filiumenterprise

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
(0 Reviews)
0.0