>>106350007
if anyone wants to experiment with librempeg+mpv, but is concerned about overriding libav* libraries system-wide. here is what you need to do (assumes Arch, adapt accordingly).
1. with librempeg, pass this to configure:
--prefix=/opt/librempeg --build-suffix="libre"
2. also with librempeg, do this, so other programs (e.g. mpv) can find libre's libraries while searching for non-libre-suffixed ones:
# pkg-config files for libs without libre suffix
for lf in $pkgdir/opt/librempeg/lib/pkgconfig/lib*libre.pc; do
lli=$(expr "$lf" : '.*/\(.*\)\.pc')
lff=$(expr "$lf" : '.*/\(.*\)libre\.pc')
cp -a $lf ${lf/$lli/$lff}
sed -i "s|^Name: $lli|Name: $lff|" ${lf/$lli/$lff}
done
3. to build a program against the libre libraries, pass this before build calls (example with meson):
PKG_CONFIG_PATH=/opt/librempeg/lib/pkgconfig:/usr/lib/pkgconfig meson setup build ...
4. Check built program (e.g. mpv)
% readelf -d /usr/bin/mpv | rg 'NEEDED.*libav'
0x0000000000000001 (NEEDED) Shared library: [libavcodeclibre.so.62]
0x0000000000000001 (NEEDED) Shared library: [libavfilterlibre.so.11]
0x0000000000000001 (NEEDED) Shared library: [libavformatlibre.so.62]
0x0000000000000001 (NEEDED) Shared library: [libavutillibre.so.60]
0x0000000000000001 (NEEDED) Shared library: [libavdevicelibre.so.62]
and with that, you have no confusion about what libraries are used (both at build-time and load-time) by whatever program.
so now you can start the ffmpeg deprecation process at your end too.