0

Essentially, I have this code:

if(in_array($ext,$audio)&&($ext!=="flac")){
    exec("ffmpeg -i -loglevel 'verbose' ".$fileName.".".$ext." ".$fileName.".flac </dev/null >/dev/null 2>/var/www/resources/ffmpegAudio.log &",$ffmpegOutput);
    print_r($ffmpegOutput);
    $editApproveStatus="Audio entry approved. File converted.";
}

Ultimately, my goal is to convert files and show a live progress of the conversion (or at least something that updates every few seconds), and running in the background, so that the same page can be used to convert further files.

Now I'm already stuck, because the conversion just isn't working. I know that the preceding code should be fine, since it makes it all the way to this if statement above, and no errors are being throw up by the PHP. However, my log output shows:

ffmpeg version 0.8.10-6:0.8.10-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Feb  6 2014 20:59:46 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
-loglevel: No such file or directory

Which also leads me to another question: If ffmpeg is deprecated, and avconv is the way to do, can I still use the exec code in my PHP as is (replacing the ffmpeg bit with avconv)? From what I've seen so far on the avconv page, it looks similar, but I can't be certain that it's exactly the same.

So my two questions: Why isn't the file being converted, and is there any change in the syntax between avconv and ffmpeg?

4

0 回答 0