View Single Post
  #1 (permalink)  
Old 09-06-2008, 07:18 AM
kmughal89 kmughal89 is offline
Newbie
 
Join Date: Sep 2008
Posts: 2
Credits: 0
Rep Power: 0
kmughal89 is on a distinguished road
Default Calling Audio Conversion Tool with PHP on Win 2003

I am working on a web site where I have this requirement to convert audio files into mp3s. The following audio formats are to be converted into mp3: .wav, .wma, .aac, .vox, .aif, .amr, .ogg, .aiff

I am using an audio converter called AudioCommander,Command-line Audio Converter (MP3, WMA, WAV, OGG, CD, AMR, AAC, AC3, 3GP, MOV, AVI) - Encoder, Decoder[/url]), calling this tool on command line in PHP, this is the code:

PHP Code:
<?php
    
function convert($commander)
   {
       
$app_path="$commander /f c:\source\ /usfp /op c:\source\ /fmt MP3 /mp3f 1 /mp3c 2 /mp3m 0 /mp3b 5";
       echo 
exec($app_path);
   }
   
$commander "C:\BBox_Converter\AudioCommander.exe";
   
convert($commander);
?>
Now this code works just great and fine on Win XP and Vista, but running the same script on Win 2003 server yields no result at all. The web server on Win 2003 is Apache 2.2. I have to make it work on Windows 2003 server with PHP 5.2 and Apache 2.2.....I believe the problem on Win 2003 is the way the tool is invoked/called to work, something's wrong with the command in PHP, What am I doing wrong here? Any help or guidance at all will be highly appreciated.

Thanks in advance.
Khawar

Last edited by Jaan; 09-06-2008 at 10:04 AM. Reason: Please use code tags when you're posting your codes..
Reply With Quote

Sponsored Links