Video Conversion in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bhavsarparag
Forum Newbie
Posts: 1
Joined: Wed Apr 16, 2008 7:47 am

Video Conversion in php

Post by bhavsarparag »

Hi Guys,


I want to convert video from avi to flv. For that i have used ffmpeg. Its converting file into flv format but i am not able to display that converted flv in browser.

Is there any other method to do video conversion ?
What can be the problem in my current way of implementation of ffmpeg ?

Thanks.

Regards,

PARAG.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Video Conversion in php

Post by onion2k »

Flash video files can only be played in a browser using Flash. You need to convert the avi, then have a Flash app in the browser load the resulting flv file.
mabus
Forum Newbie
Posts: 17
Joined: Wed Apr 16, 2008 11:52 pm

Re: Video Conversion in php

Post by mabus »

Here's one solution to this, but I hope you're developing or atleast running your app on a linux environment.

This will require an installation of "ffmpeg". It has a video converstion tool, which will enable you to convert any video files to flv. Then you will also need an flv player to play that. I would suggest using "JFW Player". To be able to use the app, you will need to execute the application from the shell, which can be done by doing a simple ...

system ();

where the parameter of this functions is a string , which is the actuall command to convet a video to flv.
example: ffmpeg -i videofile.mov -sameq outputfile.flv.

Google is your friend, so search for ffmpeg, and jfw flash player.

Hope this helps.
Post Reply