Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am recently facing some weird problems with ffmpeg command line
I had it working perfectly on a ubuntu machine, but recently it gives me a "symbol lookup error" for almost every command, for example, doing something as simple as:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_decode_video2
The first guess was I had messed up with a part of source code, or maybe there is mismatch in my libav* versions , or something like that, so I used svn update to make my version up-to-date, and rebuild the whole thing, the problem still persists.
I don't have any problem making ffmpeg, the problem comes when I use the command line though.
Does anybody have an idea where it may come from?
(just for reference, my configure options are like this:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_decode_video2
I don't have any problem making ffmpeg, the problem comes when I use the command line though.
Does anybody have an idea where it may come from?
Hehehe (evil laugh)
You updated something, right?
This is quite common if you regularly update your system. What seems to have happened is that some part of ffmpeg has been updated or auto-updated, while leaving others at their existing version. One of the libraries you are using has probably upgraded itself to a version where it no longer supports the function or symbol the FFMPEG binary itself is trying to access.
This is one reason why I -never- auto-update my Linux distro installs - auto-updates often break more stuff than they help or fix.
You'll probably need to recompile FFMPEG itself against your own, local source, to ensure that the binary you are trying to use is compatible with the libraries it refers to. You seem to be using shared libraries (.so) - and one of the .so files have been updated, and no longer supports a function the FFMPEG binary (which wasn't updated, apparently) expects.
This is quite common if you regularly update your system. What seems to have happened is that some part of ffmpeg has been updated or auto-updated, while leaving others at their existing version. One of the libraries you are using has probably upgraded itself to a version where it no longer supports the function or symbol the FFMPEG binary itself is trying to access.
This is one reason why I -never- auto-update my Linux distro installs - auto-updates often break more stuff than they help or fix.
You'll probably need to recompile FFMPEG itself against your own, local source, to ensure that the binary you are trying to use is compatible with the libraries it refers to. You seem to be using shared libraries (.so) - and one of the .so files have been updated, and no longer supports a function the FFMPEG binary (which wasn't updated, apparently) expects.
Thanks a lot for your reply.
I see the problem right now.
All the troublemaker() functions are in libavcodec.
I have my ffmpeg downloaded from svn, and I build it from the source by myself (i.e. not using my Ubuntu's Package manager)
But when I look at the package manger's list, there is another libavcodec there as well, and it seems these two are conflicting each other...
So, the simple solution for me, seems to be removing the "libavcodec" that package manager shows, and make sure I have only one version of this thing. The problem is that, when I try to do this, it informs me that it should remove the gstreamer, and gnome desktop as well. I don't care about gstreamer, as I'm not doing anything with audio/video on that system except what I do with ffmpeg, but won't the removal on gnome desktop cause me problems?(I am thinking there may be a simpler solution than changing to a KDE desktop to bypass this)
So, the simple solution for me, seems to be removing the "libavcodec" that package manager shows, and make sure I have only one version of this thing. The problem is that, when I try to do this, it informs me that it should remove the gstreamer, and gnome desktop as well. I don't care about gstreamer, as I'm not doing anything with audio/video on that system except what I do with ffmpeg, but won't the removal on gnome desktop cause me problems?(I am thinking there may be a simpler solution than changing to a KDE desktop to bypass this)
Ah the joys of package management...
Yes, removing the entire GNOME desktop will cause you considerable problems, so don't do it via the package manager.
I'm not sure how you are going to solve that in the "package managed" way, but what I'd do is to simply find the invalid libavcodec.so (or maybe libavcodec.a) file individually, and manually rename it so the linker and / or system executables won't be able to find it. Note that this might break your package management infrastructure (since your package manager database will insist that the old file is there, when it has been renamed) - but it should solve the problem of your FFMPEG binary missing certain functions - since the executable should then find the "correct" libavcodec library.
If the FFMPEG executable now crashes in total, simply copy the "correct" libavcodec library file to whatever directory the "invalid" libavcodec library file was initially located in. Then the FFMPEG binary should probably work.
If you later find that the package manager is all grumpy, you can of course just rename the "invalid" libavcodec library file back to what it was (for example, when initially renaming the libavcodec file, simply name it libavcodec.so.bak - so that when you need to rename it back, just take the .bak away.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.