I have a media page on my site, where users can upload pictures, and they display on the site. Im wondering if i could do this with videos as well. Also, I would like to know if i could make so admins have to approve the image before it gets posted on the site (logic not code). I think it would be fairly simple. Thanks in advance =]
Hi Mate, you could do this on your server, who do you host with? there is a few bits of software needed to convert the uploaded file to .flv (flash) example code on one of my sites would be: function make_flv($uploadedmoviesdir,$outputflvdirectory,$var_loggedinuser) { $timestamp = time(); ## convert string $encode = "/usr/bin/ffmpeg -i $uploadedmoviesdir -sameq -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 $outputflvdirectory"; $scrcap = "/usr/bin/ffmpeg -i $outputflvdirectory -s 320x240 -ss 00:00:05 -t 00:00:01 -f image2 flvmovies/screencaps/$var_loggedinuser-$timestamp-screencap.jpg"; //$filein = "/usr/bin/ffmpeg -i $outputflvdirectory 2> flvmovies/filestats/$var_loggedinuser-$timestamp-info.txt"; ## execute exec($encode); exec($scrcap); //exec($filein); return("$var_loggedinuser-$timestamp-screencap.jpg"); } PHP: this also makes a screencap of the video! and im using dreamhost hope it helps Graham
what software woudl i need? Im using godaddy for my hosting. also, how would i impliment this script?
Hi Mate, could you check with them they have ffmpeg support! thats really it the rest is fairly easy i can write a function for you Graham