ubuntu 中的 ffmpeg 问题(libavcodec.so)

发布于 2024-09-04 01:47:59 字数 722 浏览 13 评论 0原文

我运行 Ubuntu 并尝试从这里使用 Java 中的 ffmpeg 包装器: http://code.google.com/p/javacv/

似乎工作正常在其他系统上,但在 Ubuntu 中项目崩溃了 有以下错误: 线程“main”中出现异常 java.lang.UnsatisfiedLinkError:查找时出错 函数'avcodec_decode_video2':/usr/lib/i686/cmov/libavcodec.so: 未定义的符号:avcodec_decode_video2

不过,ffmpeg 在命令行中工作得很好。

JavaCV 作者推荐我查看此链接: http://linux-tipps.blogspot。 com/2009/05/pretending-package-is-installed-by.html

可能我做错了什么,但它无法重新安装 libavcodec51 像这样。

所以问题是: 1. 上面的解决方案好吗?我应该让它成功 不知何故? 2.还有哪些其他方法可以解决这个问题?

感谢您提前提出的建议!

I run Ubuntu and try to use the ffmpeg wrapper in Java from here:
http://code.google.com/p/javacv/

It seems to work fine on other systems, but in Ubuntu the project crashes
with the following mistake:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up
function 'avcodec_decode_video2': /usr/lib/i686/cmov/libavcodec.so:
undefined symbol: avcodec_decode_video2

ffmpeg is working great from the command line, though.

JavaCV author recommended me to check this link:
http://linux-tipps.blogspot.com/2009/05/pretending-package-is-installed-by.html

Probably I'm doing something wrong, but it cannot reinstall libavcodec51
like this.

So the questions are:
1. Is those solution above a good one so I should bring it to success
somehow?
2. What are the other ways to solve the problem?

Thank you for your suggestions in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ι不睡觉的鱼゛ 2024-09-11 01:47:59

libavcodec 使用 C 链接构建,但使用 C++ 构建时,标头不会将声明放在 extern "C" 包装器周围。如果 libavcodec 的 Java 本机接口包装器是使用 C++ 编译器构建的,它将使用 C++ 链接定义函数。在这种情况下,它需要类似:

extern "C" {
#include <libavcodec.h>
}

libavcodec is built with C linkage, but the header does not place the declarations around an extern "C" wrapper when built with C++. If the Java Native Interface wrapper to libavcodec is built with a C++ compiler, it will define the functions using C++ linkage. In this case it needs something like:

extern "C" {
#include <libavcodec.h>
}
捶死心动 2024-09-11 01:47:59

方法一
1.如果Flash播放器要求您更新,请先更新它。
下载并解压 Flash tar.gz。以 root 身份打开该文件夹。现在输入以下命令:

TGS install_flash_player_11_linux.x86_64 # cp -v libflashplayer.so /var/lib/mozilla/plugins/
'libflashplayer.so'-> '/var/lib/mozilla/plugins/libflashplayer.so'

TGS install_flash_player_11_linux.x86_64 # cp -v libflashplayer.so /usr/lib/adobe-flashplugin/
'libflashplayer.so'-> '/usr/lib/adobe-flashplugin/libflashplayer.so'

TGS install_flash_player_11_linux.x86_64 #

  1. 更新 libavcodec

milan@TGS ~ $ sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next

milan@TGS ~ $ sudo apt-get update

milan @TGS ~ $ sudo apt-get install ffmpeg

方法2

只需在firefox中启用libavcodec:
在地址栏输入about:config,回车
点击“我接受风险”搜索libavcodec
将 media.libavcodec.allow-obsolete;false 更改为 true

http://www.techyo.ga/2016/12/solved-libavcodev-may-be-vulnerable-or.html

Method 1
1.First update your Flash player if its asking you to update.
Download and extract Flash tar.gz.open that folder as root.Now enter following command:

TGS install_flash_player_11_linux.x86_64 # cp -v libflashplayer.so /var/lib/mozilla/plugins/
‘libflashplayer.so’ -> ‘/var/lib/mozilla/plugins/libflashplayer.so’

TGS install_flash_player_11_linux.x86_64 # cp -v libflashplayer.so /usr/lib/adobe-flashplugin/
‘libflashplayer.so’ -> ‘/usr/lib/adobe-flashplugin/libflashplayer.so’

TGS install_flash_player_11_linux.x86_64 #

  1. Update libavcodec

milan@TGS ~ $ sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next

milan@TGS ~ $ sudo apt-get update

milan@TGS ~ $ sudo apt-get install ffmpeg

Method 2

just enable libavcodec in firefox:
type about:config in the address bar, enter
click "I accept the risk" search libavcodec
change media.libavcodec.allow-obsolete;false to true

http://www.techyo.ga/2016/12/solved-libavcodev-may-be-vulnerable-or.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文