[FFmpeg-user] using atempo in PHP

Michael Bradshaw mbradshaw at sorensonmedia.com
Mon Oct 15 16:58:00 CEST 2012


On Mon, Oct 15, 2012 at 8:46 AM, Jevlachov D. <jevlachov at gmail.com> wrote:
> It was wrong path to ffmpeg.
> That's what I have now:
>
> $path = '/usr/bin/ffmpeg';
> $source = 'Help_-_The_Beatles.mp3';
> $target = 'converted.mp3';
> $exec_string = $path.' -i '.escapeshellarg($source).' atempo=1.5
> '.escapeshellarg($target).'  2>ffmpeg.log &';
> echo exec($exec_string);
>
> It gives me: Unable to find a suitable output format for 'atempo=1.5'
> I guess something is wrong with $target. Can't figure out what.
> What I need is just simple speedup (atempo) of given mp3.

It thinks "atempo=1.5" is the output file name because you haven't
told it it's an audio filter. Audio filters are put in the "-af"
parameter. Try doing "-af atempo=1.5"


More information about the ffmpeg-user mailing list