View Full Version : Providing youtube like upload functionality

Mar 9th, 2009, 05:32 AM
I have a site where people can upload stories and an album of photos.

I'd like to let them upload a video too but given that these can vary so much in format etc, it would be nice to have some sort of function where they can upload their move (mpg, whatever) and a compressed flash video file is created and stored, similar to how youtube seems to do it.

anyone know of a tool out there that does this? which could be incorporated into a php/mysql web application

Mar 9th, 2009, 07:21 AM
A word of warning if you started offering video services, they will consume a huge amount of bandwidth which can equate to costing lots of money.

Mar 9th, 2009, 07:58 AM
I just had the need to do this. I found mostly what I needed here

I uploaded the ffmpeg file to my server. CHMODDED the folder it was in to 777. Created another folder to store the videos. CHMODDED that folder to 777. Then I ran this in php.

exec("/your/absolute/path/to/ffmpeg -i /your/absolute/path/to/yourvideo.mpg -ar 22050 -ab 32 -f flv -s 320x240 /your/absolute/path/to/yourfolder/video.flv");
This seemed to work just fine. Note this will work only on a linux server.