ffmpeg MAMP“dyld:未加载库”错误

编程入门 行业动态 更新时间:2024-10-27 09:37:08
本文介绍了ffmpeg MAMP“dyld:未加载库”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在通过PHP的 exec()命令在MAMP中的Mac OSX 10.7.3上使用ffmpeg,我有一个绝对路径设置为调用ffmpeg,例如

/ opt / local / bin / ffmpeg -i/sample.avi

但是我收到以下错误 -

dyld:库不加载:/opt/local/lib/libjpeg.8.dylib参考自:/opt/local/lib/libopenjpeg.1.dylib原因:不兼容的库版本:libopenjpeg.1.dylib需要版本13.0.0或更高版本,但libJPEG .dylib提供版本12.0.0

NB ffmpeg是通过Macports安装的。

它可以从命令行工作。

该怎么办? >

编辑

我已经重新打开了 - 原来以为 shell_exec ()解决了这个问题,但实际上应该有所不同 - 直到今天进一步调查才明白。这是我的代码使用shell_exec并仍然给出上面的错误:

$ cmd ='/ opt / local / bin / ffmpeg - H'; $ cmd = escapeshellcmd($ cmd)。 '2>& 1'; $ output = shell_exec($ cmd); var_dump($ output);

解决方案

问题是DYLD_LIBRARY_PATH设置为MAMP,我已经通过macports安装了ffmpeg。

这可能不是最好的修复,但现在我已经开始运行:

在 / Applications / MAMP / Library / bin / envvars 文件中,并注释如下行:

$ b $ $ b $ / code code code code pre>

并重新启动Apache

I am using ffmpeg on Mac OSX 10.7.3 in MAMP through PHP's exec() command, I have an absolute path set to call ffmpeg, e.g.

/opt/local/bin/ffmpeg -i "/sample.avi"

But I receive the following error -

dyld: Library not loaded: /opt/local/lib/libjpeg.8.dylib Referenced from: /opt/local/lib/libopenjpeg.1.dylib Reason: Incompatible library version: libopenjpeg.1.dylib requires version 13.0.0 or later, but libJPEG.dylib provides version 12.0.0

N.B. ffmpeg was installed through Macports.

It works from the command line.

What to do?

EDIT

I've reopened this - originally thought shell_exec() solved the issue, but infact it should be called differently - and I didn't realise until investigating further today. Here is my code using shell_exec and still giving the error above:

$cmd = '/opt/local/bin/ffmpeg -h'; $cmd = escapeshellcmd($cmd) . ' 2>&1'; $output = shell_exec($cmd); var_dump($output);

解决方案

The problem is that the DYLD_LIBRARY_PATH is set in MAMP and I've installed ffmpeg via macports.

This might not be the best fix but it has me up and running for now:

In the /Applications/MAMP/Library/bin/envvars file and comment the following lines as below:

#DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH" #export DYLD_LIBRARY_PATH

and restart Apache

更多推荐

ffmpeg MAMP“dyld:未加载库”错误

本文发布于:2023-11-26 15:34:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634285.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   错误   ffmpeg   MAMP   dyld

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!