admin 管理员组

文章数量: 1184232

i am using videojs to play video on my website(it's a HTML5 website) so for a better support i need to make 3 formats of each video mp4,webM,ogv.

But in my website user can upload video also.

So please tell me how can i automatically convert videos after/while uploading to these formats.

I am using PHP5+JS for development.

i am using videojs to play video on my website(it's a HTML5 website) so for a better support i need to make 3 formats of each video mp4,webM,ogv.

But in my website user can upload video also.

So please tell me how can i automatically convert videos after/while uploading to these formats.

I am using PHP5+JS for development.

Share Improve this question asked Aug 17, 2011 at 6:58 PeeyushPeeyush 4,82817 gold badges66 silver badges92 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 8

As the conversion will need to happen on the server side, you will only be able to do this once the upload has been pleted. HTML5 is great but is does not support video transcoding.

I would suggest to have a look at ffmpeg, it's an extremely powerful mand line utility that allow you transcode your video's with the finest precision, in fact youtube uses this to convert their video's as well.

It is a free tool and there is more than enough documentation to get you started at http://ffmpeg/

We have a system set up in PHP where the upload occurs, conversion then takes place and the videos appear to the clients once the conversion is plete. However, one thing to note... I have always had trouble with ffmpeg conversions for iPhone, iPad, iPod, iOS, etc.

本文标签: phpHow to convert video to mp4 webm ogv while uploading Stack Overflow