You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
I've been playing around with the codegen program locally on my machine today and yesterday. I was just experimenting by creating a PHP app that calls codegen. It took the longest time figuring out why PHP would recognize the 'echoprint-codegen' program, but if I ran 'echoprint-codegen' from terminal it would work just.
I finally was able to make the php script recognize it work by giving it an exact path to the program, something like the following:
I cannot reproduce this issue with the information you've given. However, I think the issue might be with spaces in the audio filename. Can you try with the filename quoted - e.g.
$cmd = 'ffmpeg -i "karma.mp3"';
exec($cmd." 2>&1", $out, $ret);
if ($ret){
echo "There was a problem!\n";
print_r($out);
}else{
echo "Everything went better than expected!\n\n";
print_r($out);
}
For me it was complaining that it could not find the libfreetype dylib.
It was because i'm running it on MAMP and the answer is to comment out the DYLD_LIBRARY_PATH
on /Applications/MAMP/Library/bin/envvars
I also had this problem but was not using MAMP. It turned out the Apache user, in my case _www, did not have /usr/local/bin in it's PATH. You can test this with an echo shell_exec("env"). You can add the path depending on your OS or I simply created a symlink to ffmpeg from one of it's included paths.
Activity
alastair commentedon Aug 3, 2011
I cannot reproduce this issue with the information you've given. However, I think the issue might be with spaces in the audio filename. Can you try with the filename quoted - e.g.
and also with the filename double quoted -
Also, see if the script works if you give it a path to an audio file that has no spaces in the name.
Thanks
chadhutchins commentedon Aug 3, 2011
Dang, that's unfortunate. Thanks for giving it a look though.
I tried your suggestions, but nothing worked.
I'm using an audio file with no spaces in the name or path, and I tried several different types of quote combinations. See below:
Example 1
Example 2
Example 3
Example 4
However, if I run the commands inside any of the shell_exec() functions in Terminal, I get the following as expected:
Thanks again for looking at this. Any ideas?
slawo commentedon Aug 25, 2011
Hi!
You might want to check if your song is not protected with some sort of DRM.
S
mattsims commentedon Sep 6, 2011
Hi Chad,
Did you ever get to the bottom of this? I'm having the same problem.
Regards,
Matt.
chadhutchins commentedon Sep 9, 2011
I didn't. I'll report back if/when I do though.
On Tue, Sep 6, 2011 at 5:05 PM, mattsims <
reply@reply.github.com>wrote:
Jurager commentedon Mar 23, 2012
I had the same issue, I just re-installed ffmpeg and the problem disappeared.
sidis405 commentedon Aug 22, 2012
hi i'm sorry to re-open an old issue but i'm stuck here
just like the thread starter im trying to run
$handle = popen('/Applications/MAMP/htdocs/projectx/codegen/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 no matter what i am perpetually stuck with
"error":"could not decode", "tag":0, "metadata":{"filename":"/Applications/MAMP/htdocs/projectx/codegen/2.mp3"}}Now, my filename has no single quotes so i believe i would need to make no use of the Posix ticket up there.
I reinstalled ffmpeg as someone above suggested. Nothing.
From the trace i can see this:
I saw somewhere else that it meant that ffmpeg could not be found.
Recompiled codegen with the absolute ffmpeg path of my installation. Nothing.
On another note. While ffmpeg was reinstalling i ran the php script that uses codegen.
And got the same result.
Meanwhile from the shell runs fine.
Am i missing something extrmely obvious here?
( i really wouldn't mind if that was the case :)
Best reagrds and thank you in advance
sidis405 commentedon Aug 23, 2012
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 :
http://stackoverflow.com/questions/10107671/ffmpeg-mamp-dyld-library-not-loaded-error/12099991#12099991
$cmd = 'ffmpeg -i "karma.mp3"'; exec($cmd." 2>&1", $out, $ret); if ($ret){ echo "There was a problem!\n"; print_r($out); }else{ echo "Everything went better than expected!\n\n"; print_r($out); }For me it was complaining that it could not find the libfreetype dylib.
It was because i'm running it on MAMP and the answer is to comment out the DYLD_LIBRARY_PATH
on /Applications/MAMP/Library/bin/envvars
jon-eckstein commentedon Apr 30, 2013
I also had this problem but was not using MAMP. It turned out the Apache user, in my case _www, did not have /usr/local/bin in it's PATH. You can test this with an echo shell_exec("env"). You can add the path depending on your OS or I simply created a symlink to ffmpeg from one of it's included paths.