views:

138

answers:

6

I am building a mobile website were users can upload/download videos and am looking for a library that can convert the media files from mpeg, 3gp, mov depending on what the user wants to download.

thanks in advance.

+1  A: 

ffdshow is a great lib for that.

libavcodec to be more precise.

Antony Hatchkins
+2  A: 

You should not only search for Library to do this, if you are using linux you can find an application that do this for you with CLI support,then using that application cli you can change your format;

$result=shell_exec('application_name [parameters] input-file output-file')

for example you can use ffmpeg

$result=shell_exec('ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg')
amir beygi
A: 

Take a look at FFmpeg. You could use as a command line tool.

Hippo
+1  A: 

Use FFmpeg gem in Ruby, it's really cool and easy to use.

khelll
A: 

In the past, I ran VLC from the command-line and used it to do my conversions (it's free, supports nearly all audio and video formats, and works on many different platforms). If you have VLC installed on the server, you can access it this way using any language that has a system() command or equivalent.

bta
A: 

Or if you want something to use directly from Java, try Xuggler, a Java-based interface to FFmpeg.

Xuggle