0

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!

4

2 回答 2

0

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

extern "C" {
#include <libavcodec.h>
}
于 2010-07-12T22:35:31.610 回答
0

方法 1 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'</p>

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

TGS install_flash_player_11_linux.x86_64 #

  1. 更新 libavcodec

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

米兰@TGS ~ $ sudo apt-get update

米兰@TGS ~ $ sudo apt-get install ffmpeg

方法二

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

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

于 2016-12-07T08:21:36.030 回答