eloan Posted March 26, 2007 Share Posted March 26, 2007 Hi, In my app I need convert different audio files to mp3, which seems to be more complicated than I thought. To put it straight: I'm a noob at linux. PHP isn't a problem but as soon as I need to do something more advanced in linux I'm lost. So my problem: I want to convert .m4a to .mp3 files, which I figured out works with FAAD2 and LAME. Now this might not be the best or nicest way, but it works. So the commands i use in the shell are: $ faad file.m4a #this converts the file to .wav $ lame file.wav file.mp3 #this converts the file to .mp3 This works fine, but as soon as I try to execute the code with PHP the problems start shell_exec("faad file.m4a") just returns an empty string and executes no command the strange thing is that when executing shell_exec("faad") it returns Usage:faad infile.aac....so faad seems to be found When executing lame, nothing happens at all. even shell_exec("lame") returns an empty string I installed lame and faad as root, so there might be some kind of rights problem, but I really have no clue how to solve it.. don't know if this info helps but "which lame", and "which faad" return "/usr/local/bin/lame" and "/usr/bin/faad/" thanks for your help greets from switzerland Link to comment https://forums.phpfreaks.com/topic/44380-convert-audio-files/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.