Open
Description
While essentia is built using ffmpeg version 2, the dynamically linked library will point to something like /usr/lib/libavcodec.so.59
.
On recent ArchLinux and soon, a lot of of other distributions, ffmpeg is shipped in version 5.
libavcodec
When importing essentia in python, a linker error is thrown:
❯ python
Python 3.9.10 (main, Mar 12 2022, 17:44:28)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import essentia
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/.cache/pypoetry/virtualenvs/essentia-pulse-m4Vcd7y0-py3.9/lib/python3.9/site-packages/essentia/__init__.py", line 1, in <module>
from . import _essentia
ImportError: /home/user/.cache/pypoetry/virtualenvs/essentia-pulse-m4Vcd7y0-py3.9/lib/python3.9/site-packages/essentia/_essentia.cpython-39-x86_64-linux-gnu.so: undefined symbol: avcodec_decode_audio4
>>>
There are several other projects affected by this which have the details already documented:
- Fails to build with ffmpeg 5.0 gazebosim/gazebo-classic#3180
- Caffe2 uses FFMPEG functions that are deprecated in FFMPEG 4.0 and gone in 5.0 pytorch/pytorch#72254
Relevant code in essentia, at least for avcodec_decode_audio4
:
essentia/src/algorithms/io/audioloader.cpp
Line 264 in 07d089f
libavresample
libavresample
is also used which needs to be replaced as it has also been removed from ffmpeg.