简体   繁体   English

如何安装ffmpeg-php Mac OS X豹

[英]How to install ffmpeg-php Mac OS X leopard

Has anyone been able to install ffmpeg-php on osx? 有没有人能够在osx上安装ffmpeg-php? i was able to install ffmpeg via mac ports. 我能够通过mac端口安装ffmpeg。 ffmpeg-php wont install. ffmpeg-php不会安装。

Problems: cannot find shared directory because macports installs it to /opt/local/include/ and /opt/local/lib. 问题:无法找到共享目录,因为macports将其安装到/ opt / local / include /和/ opt / local / lib。 ffmpeg-php looks in /usr/local/include/ffmpeg ffmpeg-php在/ usr / local / include / ffmpeg中查找

phpize returns a whole bunch of warnings, not sure if this is a problem or not. phpize返回一大堆警告,不确定这是否是一个问题。

When i get all the headers/libraries in the right locations make is still throwing fits. 当我得到正确位置的所有标题/库时,make仍然是合适的。

Has anyone actually done this? 有人真的这样做过吗? or... 要么...

is there an alturnative to ffmpeg? 对于ffmpeg有什么反响? I want to be able to create pictures of video frames on the fly. 我希望能够动态创建视频帧的图片。

I haven't been able to compile it either although ffmpeg can still be useful without that extension. 虽然ffmpeg在没有扩展名的情况下仍然有用,但我无法编译它。 Here's a simple example that grabs a jpg every 5th secoond: 这是一个简单的例子,每隔5个secoond抓一个jpg:

$ffmpeg = '/opt/local/bin/ffmpeg';
$vid = 'test.mpg';
$cmd = $ffmpeg.' -i '.$vid.' -r 0.2 -sameq -f image2 '.$vid.'.%03d.jpg';
exec($cmd);

My "Formula" for ffmpeg-php is accepted. 我接受了ffmpeg-php的“公式”。

Install homebrew , and run: 安装自制程序 ,然后运行:

brew install ffmpeg-php

And you're good to go. 你很高兴去。

I just went through the whole process of installing it on my OSX 10.6.2 using these instructions as guidelines. 我刚刚使用这些说明作为指导,完成了在OSX 10.6.2上安装它的整个过程。 What also helped me was getting the right files following instructions on the site linked here (for the ffmpeg part) and the "simple" instructions under "Installation" from ffmpeg-php site itself for your actual question. 还有什么帮助我得到正确的文件,按照这里链接的网站说明(对于ffmpeg部分)和ffmpeg-php网站本身的 “安装”下的“简单”说明,以获得实际问题。 All without any macport. 所有没有任何macport。

Can't say it was easy, but it's working just fine. 不能说这很容易,但它的工作正常。 It's a very long process that I just won't quote here. 这是一个非常漫长的过程,我不会在这里引用。 Hopefully it's suffice to say basically you need the most recent ffmpeg then everything is a regular "./configure && make" process. 希望它足以说基本上你需要最新的ffmpeg然后一切都是常规的“./configure && make”过程。

My ffmpeg configuration options were these: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-libfaad --enable-gpl 我的ffmpeg配置选项如下: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64 --enable-libfaad --enable-gpl

Just as a note, this is how I found those links on google (all those search options are default for me, including the filtering by last year). 就像一张纸条, 这是我在谷歌上找到这些链接的方式 (所有这些搜索选项对我来说都是默认的,包括去年的过滤)。 Funny thing, the first result was this question, thus I'm here answering it. 有趣的是,第一个结果是这个问题,因此我在这里回答它。 ;-) ;-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM