当前位置: 动力学知识库 > 问答 > 编程问答 >

ffmpeg not working from php

问题描述:

spent 8 hours trying to make it work:

i installed the version from http://ffmpeg.org/releases/ffmpeg-2.5.3.tar.bz2

and also tried the yum version but it as not new enough for youtube-dl

tried

export PATH=$PATH:/usr/local/bin/ffmpeg and php apache still cant find ffmpeg

apache user runs php script on centos 6.5

calling my youtube-dl.php from php command line as root works (with ffmpeg) -

calling my youtube-dl.php from php apache user works (not with ffmpeg) -

what iam trying to do - shell exec youtube-dl (youtube dl calls ffmpeg in its binary code which there is now to modifiy it to add the full path)

this works but the ffmpeg part

my youtube-dl.php file

$output = shell_exec('youtube-dl -o "/home/test/%(title)s.%(ext)s" '.$url.' -f bestvideo+bestaudio 2>&1');

echo "<pre>$output</pre>";

# which ffmpeg

/usr/local/bin/ffmpeg

(someone on other pages on this site says local/bin is for customized versions but i downloaded it directly from ffmpeg and did the standard ./configure make make install )

done:

chmod 755 to /usr/local/bin/ffmpeg

running ffmpeg as a test command directly (sometimes works and doesnt as i upgraded/rebooted/updatedb/etc)

$output = shell_exec('ffmpeg 2>&1');

echo "

$output
";

result:

sh: ffmpeg: command not found

i here a lot of people voting down - i am learning and sharing thank you in advance

I read all of these with similar problems but didnt help:

Similar Questions

FFMPEG PHP does not seem to work

FFmpeg not working

Recording audio with FFMPEG works in terminal but not through exec() of PHP

ffmpeg-php permission denied on localhost

C++ program from PHP not working properly

FFMPEG works from command line but not PHP

Calling a shellscript from php - not working correctly

PHP Internal Server Error 500 when using ffmpeg to convert files

PHP code not proceeding to the line after exec ffmpeg

ffmpeg not working from php script but works from command line

PHP exec() Not Working With ffmpeg

ffmpeg not work with PHP exec()

ffmpeg php exec not working

分享给朋友:
您可能感兴趣的文章:
随机阅读: