Jump to content
dsdsdsdsd

audio converter ... mp3, wav, ogg, webm

Recommended Posts

is there a library that can convert between these filetypes: mp3, wav, ogg, webm

 

 

thanks,

dsdsdsdsd

Share this post


Link to post
Share on other sites

to be honest, I still don't understand ffmpeg ... if you go to the wiki it doesn't even mention php. I keep seeing people refer to 'command line' software, but I am looking for a php script that can do all the conversions.

Share this post


Link to post
Share on other sites

You can get ffmpeg as a PHP extension to bridge the gap, but you aren't going to find something purely PHP to do this.

Share this post


Link to post
Share on other sites

to be honest, I still don't understand ffmpeg ... if you go to the wiki it doesn't even mention php. I keep seeing people refer to 'command line' software, but I am looking for a php script that can do all the conversions.

Most of the time things like this are handled by using exec() to execute an external application with the proper arguments to do the conversion you want. The ffmpeg CLI tool is offered on some hosts and is fairly easy to use. So what you'd do is create a PHP script that lets you specify all the different options you need and then just executes the fmpeg tool to do the actual conversion. Once the conversion is done you can have your PHP script do any further processing that may be necessary.

 

Trying to process the video data within a pure-php solution would likely be painfully slow, if it's possible at all. That is why these types of tasks are done via C either as a PHP extension (if available) or an external CLI tool.

Share this post


Link to post
Share on other sites

so is ffmpeg kind of like the GD engine that processes images on the server?

if I am not mistaken, GD is a server-based application, and php has an API to it ... it is the API that I interact with in php scripts.

IF so then getting ffmpeg is a process, really:
1 - download
2 - install onto server

3 - learn how to interface with it via php
... is this correct?

-- thanks.

Share this post


Link to post
Share on other sites

ffmpeg has nothing to do with PHP or GD, the latter of which is a library and not an application, but your conclusion is correct.

Share this post


Link to post
Share on other sites

from my webhosting company:

Unfortunately, we do not support FFmpeg on our servers and it is not possible to install it on our shared server.

 

Share this post


Link to post
Share on other sites

So now either you find a new hosting company, upgrade to dedicated hosting (where you can control the server and install your own software on it), or don't convert files.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.