1

I am trying to run codegen from popen (shell_exec creates the same scenario) in php in my Mac lion MAMP box as follows:

$handle = popen('echoprint-codegen "/Applications/MAMP/htdocs/projectx/codegen/2.mp3" 10 30', 'r')

echo "'$handle'; " . gettype($handle) . "\n";
$read = fread($handle, 2096);
echo $read;
pclose($handle);

But i am perpetually met with

"error":"could not decode", "tag":0, "metadata":{"filename":"/Applications/MAMP/htdocs/projectx/codegen/2.mp3"}}

No matter how i format the cmd inside the handle, with various variations of single and dbl quotes i still get the same thing.

codegen is in the path and so is ffmpeg.

Here's the kicker. Codegen works fine from command line and so does the php script with the popen() or the shell_exec().

From browser it won't work.

Any ideas?

Thank you in advance

Daniel Cukier
  • 11,502
  • 15
  • 68
  • 123
sid405
  • 63
  • 7

1 Answers1

2

To whomever might need help with this, I managed to solve it after i found out that ffmpeg was indeed the problem.

Got the hint from this ffmpeg MAMP "dyld: Library not loaded" error

Community
  • 1
  • 1
sid405
  • 63
  • 7