makemkvcon libavcodec.so.58 have .59

The place to discuss linux version of MakeMKV
Post Reply
brentl99
Posts: 2
Joined: Sun Oct 23, 2022 5:28 pm

makemkvcon libavcodec.so.58 have .59

Post by brentl99 »

I just built ffmpeg and makemkv. However, the 1.17.2 binary for makemkv-bin requires two libraries that are "old". libavcodec.so.58 and libavutil.so.56. Compiling ffmpeg gives me libavcodec.so.59 and libavutil.so.57.
brentl99
Posts: 2
Joined: Sun Oct 23, 2022 5:28 pm

Re: makemkvcon libavcodec.so.58 have .59

Post by brentl99 »

As a work around, I edited the the libavcode and libavutil version.h files and recompiled ffmpeg.
TraubeMinze735
Posts: 1
Joined: Mon Nov 18, 2024 8:34 pm
Contact:

Re: makemkvcon libavcodec.so.58 have .59

Post by TraubeMinze735 »

Even tho this thread is 2 years old, this problem still exist.
This time on Fedora 41 with MakeMKV Version 1.17.8 since i upgraded from Fedora 39.
Fedora 39 appears to be the last Release that had the correct FFmpeg Libs for the latest MakeMKV, these are:

Code: Select all

libavcodec.so.60
libavutil.so.58
But Fedora 41 ships with FFmpeg 7.0.2 that is way to new, so i also did what brentl99 recommend. Since this took me ages to figure out, i wanted to write a little guide how to do it. In case anyone needs to do this in the future again.

1. Download the source package for the latest FFmpeg
Currently on Fedora this is Version 7.0.2, you can get it from here:
https://download1.rpmfusion.org/free/fe ... 41.src.rpm

2. Install all packages needed for the compilation

Code: Select all

dnf install fedora-packager
rpmdev-setuptree
dnf builddep ffmpeg-7.0.2-4.fc41.src.rpm
We wont build FFmpeg with the .src.rpm tho, this is only to install all dependenices.
In my case i also had to manually install libvpl-devel since dnf missed it.

3. Extract the .src.rpm to get the pure source code
Extract the .src.rpm with an archiver of your choice, in my case Ark.
Inside you should find the ffmpeg-7.0.2.tar.xz archive, this is the one we need.
Copy it to a different directory and extract it as well. In my case ~/Downloads and change into the source directory.

Now we have to modify the source code like brentl99 said.
In case of this FFmpeg version we need to modify:

Code: Select all

libavcodec/version_major.h
Change line 28 to #define LIBAVCODEC_VERSION_MAJOR  60
libavutil/version.h
Change line 81 to #define LIBAVUTIL_VERSION_MAJOR  58
If you dont want to do this yourself, you can get the already edited tarball i used from here (if you trust me lol):

https://traubeminze.xyz/fileshare/ffmpe ... 7.0.tar.gz

4. Build the custom FFmpeg

Code: Select all

./configure --enable-shared --disable-static
make
make install DESTDIR="/opt/ffmpeg-makemkv/"
You can change DESTDIR to whatever you want of course. You shouldn't install into your real root tho. This will probably mess up your actual FFmpeg installation.

5. Link the new librarys
In my case:

Code: Select all

ln -sv /opt/ffmpeg-makemkv/usr/local/lib/libavutil.so.58 /usr/lib64/libavutil.so.58
ln -sv /opt/ffmpeg-makemkv/usr/local/lib/libavcodec.so.60 /usr/lib64/libavcodec.so.60
The location can warry from distro to distro of course, this guide is only tested on my Fedora installation.
MakeMKV should start now :)
Post Reply