Jump to content

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


dsdsdsdsd

Recommended Posts

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.

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.

Use ffmpeg. I found a FFMPEG PHP class in GitHub. I forked it and I might do my own fixes to it if needed, it hasn't been updated in a long time (the last latest update was from 5 months ago)

 

The original repo is located at https://github.com/swider132/FFmpeg-PHP-Class

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.