[FFmpeg-user] using atempo in PHP

Jevlachov D. jevlachov at gmail.com
Mon Oct 15 17:12:36 CEST 2012


Thanks for your quick answers. I was stupid enough not to check ffmpeg
version. I have FFmpeg version 0.6.5, atempo appeared only in the last
release.
Thanks again

On Mon, Oct 15, 2012 at 10:00 PM, Reindl Harald <h.reindl at thelounge.net>wrote:

> because "atempo" is NOT a param, you missed -filter:a
> the things starting with - are params
> the values after params should be escaped
> genearlly, everywhere if you generate shell-commands
>
> -filter:a 'atempo=1.5'
>
> Am 15.10.2012 16:46, schrieb Jevlachov D.:
> > 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.
> >
> > On Mon, Oct 15, 2012 at 6:39 PM, Reindl Harald <h.reindl at thelounge.net
> >wrote:
> >
> >>
> >>
> >> Am 15.10.2012 13:18, schrieb Tom Evans:
> >>> On Mon, Oct 15, 2012 at 11:08 AM, Jevlachov D. <jevlachov at gmail.com>
> >> wrote:
> >>>> Can't figure out how to use atempo properly.
> >>>>
> >>>> part of the script looks like this:
> >>>>
> >>>> echo shell_exec("ffmpeg -y -i original.mp3 -filter:a
> >>>> atempo=1.5 converted.mp3 2>ffmpeg.log &");
> >>>>
> >>>> (example code taken from here
> >>>>
> >>
> http://ffmpeg.org/trac/ffmpeg/wiki/Using%20FFmpeg%20from%20PHP%20scripts)
> >>>>
> >>>> It returns "sh: line 1: converted.mp3: command not found" in log file.
> >>>>
> >>>> Thanks!
> >>>
> >>> That sounds more like you can't figure out how to use PHP properly
> >>> tbh. Put another way, you're not even running ffmpeg yet..
> >>>
> >>> Is there not a PHP command that allows you to specify the command and
> >>> arguments as an array, bypassing all that shell nonsense?
> >>
> >>
> >>
> >
> >
> >>
> >> _______________________________________________
> >> ffmpeg-user mailing list
> >> ffmpeg-user at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>
> >>
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
>
> --
>
> Reindl Harald
> the lounge interactive design GmbH
> A-1060 Vienna, Hofmühlgasse 17
> CTO / CISO / Software-Development
> p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
> icq: 154546673, http://www.thelounge.net/
>
> http://www.thelounge.net/signature.asc.what.htm
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>


More information about the ffmpeg-user mailing list