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!
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>
}
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 #
- 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
精彩评论