views:

48

answers:

1

Hi,

I have a website that allows users to upload videos to it, After they upload videos, I would like to be able to display them using a flash player.

One flash player i know is flowplayer, althrough if anyone knows a better one I will be happy to know.

In any case, as I understood from a brief google search, there are no players that can play .avi/.mpeg files, but they can only play .flv files.

I began searching for ways to convert my user's avi's/mpeg's and found that I can use ffmpeg to convert the video to .flv using system().

Is this the best solution for me? I feel like ffmpeg takes a lot of CPU and once I have enough users the server will crash..

Thanks!

+4  A: 

Just an outline

(Note: i don't own nor wrote a PHP video sharing site, so treat these like tips)

  • Set up your web server and PHP to be capable of accepting large files via HTTP
  • Let users upload their videos via a web interface
  • Upon successful upload add uploaded video to a queue
  • Set up a fully server side script that handles video processing (No PHP)
  • Run a cron job on this queue when your server is able to crunch uploaded videos
  • Notify users when videos are done

Hope it helps in some way.

fabrik