How to I Upload, convert and display video using php

snualexan
snualexan used Ask the Experts™
on
Hi masters..

My problem is how can i upload, convert and display video using php. please guide a newbie.. thanks in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
For upload, PHP has robust functionality.  See this section of the online PHP manual: http://www.php.net/features.file-upload 

There should be enough there to allow you to create the file upload component.  The trick is that, AFAIK, there is no built-in support yet in PHP for video file formats and I have not seen any relevant PECL or PEAR packages either.  If you know something about the stream formats of the files you're working with, PHP does have fairly advanced stream functions and you could roll your own PHP code for handling video streams.  Another suggestion would be to see if there is an inexpensive package that a vendor has already put together.  A quick Google search yielded "AlstraSoft Video Share Enterprise" at http://www.alstrasoft.com/videoshare.htm which might have the functions you're looking for (I have no idea, I just searched for it).

Author

Commented:
actually i was able to upload the video and grab the thumbnail from it, now my problem is that i couldn't make it display.  please guide me..
Commented:
You're going to need a player of some sort.  That alstrasoft product may work - Flowplayer looks like it might also be a good alternative (http://www.flowplayer.org/), but I think you'll have to depend on the user to convert their file prior to upload or find a converter, as I am quite sure PHP does not yet have this functionality (it would be cool if it did though).  If you can find a command-line converter you can use PHP's shell functions to call the converter in your script.  Good luck.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial