commit e35dc08769fc83d38131eb47df5710ba5bd8c854
parent d4eed1b8f7299caf0db8eae8432febbfb00d6db6
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date: Mon, 6 Apr 2026 23:08:23 +0200
Revel in victory
Rare enough to be celebrated.
Diffstat:
1 file changed, 64 insertions(+), 0 deletions(-)
diff --git a/guides/sysadmin/opensuse.org b/guides/sysadmin/opensuse.org
@@ -18,6 +18,70 @@ UUID=[…UUID…] […$HOME…]/media xfs user,exec 0 0
$ mkdir ~/media
$ mount ~/media
#+end_example
+** Multimedia
+*** Get more codecs
+Today's symptoms:
+- mpv warns about missing =eac3=,
+- video plays without sound.
+
+I used to follow the openSUSE wiki advice to [[https://en.opensuse.org/SDB:Installing_codecs_from_Packman_repositories][install missing codecs]],
+but over the years I grew tired of baby-sitting zypper through its
+panic attacks whenever Packman lags a bit behind Factory, so today
+(2026-04-06) I finally snapped, and went & found out how hard
+recompiling ffmpeg with those missing codecs actually is.
+
+"Exceedingly simple", turns out? YMMV; the usual war of =./configure=
+attrition:
+
+- could have leveraged ~zypper source-install --build-deps-only~ to
+ install dependencies, but I worry that it overfits & makes future
+ upgrades more difficult (e.g. installing =python3𝓎-foo=, eventually
+ leading to more zypper panics when Tumbleweed drops 3.𝓎);
+
+- ffmpeg defaults to building static libraries, must explicitly
+ =--enable-shared= (*and* =--enable-pic=, which surprised me: with
+ only =--enable-shared=, =configure= does include =-fPIC= in
+ =C*FLAGS=, but the final links fail; without much conviction, tried
+ both after seeing [[https://build.opensuse.org/projects/openSUSE:Factory/packages/ffmpeg-7/files/ffmpeg-7.spec][openSUSE does it too]] and lo! that worked).
+
+#+begin_src sh
+git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
+cd ffmpeg
+sudo zypper install nasm
+./configure --enable-pic --enable-shared --disable-static --prefix=$PWD/.build/install
+make -j8
+make install
+#+end_src
+
+The dynamic loader was unhappy when running mpv though:
+
+#+begin_example
+$ ldd $(which mpv)
+/usr/bin/mpv: […prefix…]/lib/libswscale.so.9: version `LIBSWSCALE_9.5_SUSE' not found (required by /usr/bin/mpv)
+/usr/bin/mpv: […prefix…]/lib/libswresample.so.6: version `LIBSWRESAMPLE_6.3_SUSE' not found (required by /usr/bin/mpv)
+/usr/bin/mpv: […prefix…]/lib/libavdevice.so.62: version `LIBAVDEVICE_62.3_SUSE' not found (required by /usr/bin/mpv)
+/usr/bin/mpv: […prefix…]/lib/libavfilter.so.11: version `LIBAVFILTER_11.14_SUSE' not found (required by /usr/bin/mpv)
+/usr/bin/mpv: […prefix…]/lib/libavformat.so.62: version `LIBAVFORMAT_62.12_SUSE' not found (required by /usr/bin/mpv)
+/usr/bin/mpv: […prefix…]/lib/libavcodec.so.62: version `LIBAVCODEC_62.28_SUSE' not found (required by /usr/bin/mpv)
+/usr/bin/mpv: […prefix…]/lib/libavutil.so.60: version `LIBAVUTIL_60.26_SUSE' not found (required by /usr/bin/mpv)
+#+end_example
+
+/This can only mean one thing/ 😀
+
+#+begin_src sh
+git clone https://github.com/mpv-player/mpv
+cd mpv
+export PKG_CONFIG_PATH=…/ffmpeg/.build/install/lib/pkgconfig
+sudo zypper install libplacebo-devel
+sudo zypper install libass-devel
+meson setup build
+meson configure build
+meson compile -C build
+#+end_src
+
+meson chose to add a =DT_RUNPATH= entry referencing the ffmpeg
+installation prefix found with pkg-config, so I can just run
+=build/mpv= and enjoy my media's audio in all its E-AC-3 glory.
** Network
*** Open ports
#+begin_src sh