Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#998748: ffmpeg: headless package version

356 views
Skip to first unread message

Yves-Alexis Perez

unread,
Nov 7, 2021, 10:10:03 AM11/7/21
to
Package: ffmpeg
Version: 7:4.4.1-1+b1
Severity: wishlist

Hi,

ffmpeg is sometimes (often?) used to just convert video files and for
example generate previews. In that case, it's not useful/needed to
display anything (or echo any sound) so actually all output stuff could
be skipped, reducing dependencies.

It'd be nice (imho :) to have a way to install a headless ffmpeg
versions on those servers, and not have all those
fontconfig/libasound2/x11-common dependencies.

I'm unsure how hard it is on the packaging side though.

Regards,
--
Yves-Alexis

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (450, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.14.7+ (SMP w/2 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ffmpeg depends on:
ii libavcodec58 7:4.4.1-1+b1
ii libavdevice58 7:4.4.1-1+b1
ii libavfilter7 7:4.4.1-1+b1
ii libavformat58 7:4.4.1-1+b1
ii libavutil56 7:4.4.1-1+b1
ii libc6 2.32-4
ii libpostproc55 7:4.4.1-1+b1
ii libsdl2-2.0-0 2.0.16+dfsg1-5
ii libswresample3 7:4.4.1-1+b1
ii libswscale5 7:4.4.1-1+b1

ffmpeg recommends no packages.

Versions of packages ffmpeg suggests:
pn ffmpeg-doc <none>

-- no debconf information

Yves-Alexis Perez

unread,
Nov 7, 2021, 1:20:03 PM11/7/21
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, 2021-11-07 at 19:08 +0100, Sebastian Ramacher wrote:
> In theory we could do that, except that we would than need
> libavutil56-headless and so on. I don't think that scales.
>
> And … you'll want ffmpeg linked agaist libvdpau1 (and the other
> hardware-accalerted encoding/decoding libraries), so you'll end up with
> x11 libs anyway.

It's a good point, but at least some of the big dependencies would be avoided.
On my LXC container with only nginx or so, installing ffmpeg adds:

0 upgraded, 150 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/94.3 MB of archives.
After this operation, 317 MB of additional disk space will be used.

(and this is with --no-install-recommends)
>
> The additional complexity that this requires is not worth the maintainer
> effort. If you want to reduce ffmpeg's dependencies, you're better off
> building
> it yourself.

Yeah unfortunately I was kind-of expecting this answer. I still think it's a
valid wish (especially with all those cloud environments) but I can understand
the maintenance problem.

Regards,
- --
Yves-Alexis
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAmGIF58ACgkQ3rYcyPpX
RFswQwgAuXQIKmHwb1PPgPaP8W1U+dYakaaBct7QX+kNBlUmLsUoOCw0NbNDCKOh
ZR3uBXX5TWBRg9FgSex3EedC+q8szGnB6AFp3fur2R0Oj07tlRwrztMQP1kWk6rF
QPZG1afeW1guxPi0jmHiyVV0oi9VmO2Q7zzTxjM+GZReohqLvrI7OzyFeFV2qQf6
0Jkqq3z87Y9NyIyW5V7J9Vn2CD1MMxtUrbbPa4hm3PT2hD4xfmWflUIWXnUeyBbi
2i6QTIwHSi2kZ64Mym5KF1Pz3glH/CtMcTCnm3MX7Mczk7Occ5aPUvIsf4p1+2G2
pn+hwq4ubCtHIGRnClBbWmMxuH6/KQ==
=0zaE
-----END PGP SIGNATURE-----

Yves-Alexis Perez

unread,
Nov 11, 2021, 9:40:04 AM11/11/21
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sun, 2021-11-07 at 19:14 +0100, Yves-Alexis Perez wrote:
> On Sun, 2021-11-07 at 19:08 +0100, Sebastian Ramacher wrote:
> > In theory we could do that, except that we would than need
> > libavutil56-headless and so on. I don't think that scales.
> >
> > And … you'll want ffmpeg linked agaist libvdpau1 (and the other
> > hardware-accalerted encoding/decoding libraries), so you'll end up with
> > x11 libs anyway.
>
> It's a good point, but at least some of the big dependencies would be avoided.
> On my LXC container with only nginx or so, installing ffmpeg adds:
>
> 0 upgraded, 150 newly installed, 0 to remove and 0 not upgraded.
> Need to get 0 B/94.3 MB of archives.
> After this operation, 317 MB of additional disk space will be used.

So I went ahead and gave it a try. For the sake of interested people, here's
some details.

With the following patch against Bullseye branch (disabling input and output
devices, and disabling some features) I'm down to:

apt install --no-install-recommends --with-source ffmpeg_4.3.3-0+deb11u1+nox1_amd64.changes ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libass9 libasyncns0 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libblas3 libbluray2 libbs2b0 libchromaprint1
libcodec2-0.9 libdrm-common libdrm2 libflac8 libfribidi0 libgfortran5 libgme0 libgraphite2-3 libgsm1 libharfbuzz0b liblapack3 liblilv-0-0 libmfx1
libmp3lame0 libmpg123-0 libmysofa1 libnorm1 libogg0 libopenmpt0 libopus0 libpgm-5.3-0 libpocketsphinx3 libpostproc55 libpulse0 libquadmath0 librabbitmq4
librubberband2 libsamplerate0 libserd-0-0 libshine3 libsnappy1v5 libsndfile1 libsord-0-0 libsoxr0 libspeex1 libsphinxbase3 libsratom-0-0 libsrt1.4-gnutls
libssh-gcrypt-4 libswresample3 libswscale5 libtwolame0 libudfread0 libva2 libvdpau1 libvidstab1.1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx6
libwavpack1 libwrap0 libx264-160 libxvidcore4 libzmq5 libzvbi-common libzvbi0 ocl-icd-libopencl1
Suggested packages:
ffmpeg-doc libbluray-bdj opus-tools pulseaudio serdi sordi speex opencl-icd
Recommended packages:
libaacs0 pocketsphinx-en-us va-driver-all | va-driver vdpau-driver-all | vdpau-driver
The following NEW packages will be installed:
ffmpeg libass9 libasyncns0 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libblas3 libbluray2 libbs2b0 libchromaprint1
libcodec2-0.9 libdrm-common libdrm2 libflac8 libfribidi0 libgfortran5 libgme0 libgraphite2-3 libgsm1 libharfbuzz0b liblapack3 liblilv-0-0 libmfx1
libmp3lame0 libmpg123-0 libmysofa1 libnorm1 libogg0 libopenmpt0 libopus0 libpgm-5.3-0 libpocketsphinx3 libpostproc55 libpulse0 libquadmath0 librabbitmq4
librubberband2 libsamplerate0 libserd-0-0 libshine3 libsnappy1v5 libsndfile1 libsord-0-0 libsoxr0 libspeex1 libsphinxbase3 libsratom-0-0 libsrt1.4-gnutls
libssh-gcrypt-4 libswresample3 libswscale5 libtwolame0 libudfread0 libva2 libvdpau1 libvidstab1.1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx6
libwavpack1 libwrap0 libx264-160 libxvidcore4 libzmq5 libzvbi-common libzvbi0 ocl-icd-libopencl1
0 upgraded, 71 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/34.3 MB of archives.
After this operation, 104 MB of additional disk space will be used.

So about a third and no need for X11 stuff. I could have removed some more things but for now it's ok for me.


diff --git a/debian/changelog b/debian/changelog
index 36a64c50..a137cb7a 100644
- --- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ffmpeg (7:4.3.3-0+deb11u1+nox1) UNRELEASED; urgency=medium
+
+ * Rebuild without input/output devices
+
+ -- Yves-Alexis Perez <cor...@debian.org> Wed, 10 Nov 2021 08:48:11 +0100
+
ffmpeg (7:4.3.3-0+deb11u1) bullseye-security; urgency=medium

* New upstream version 4.3.3
diff --git a/debian/control b/debian/control
index 8bc8f8d9..15d737f7 100644
- --- a/debian/control
+++ b/debian/control
@@ -138,7 +138,7 @@ Build-Depends:
# # --enable-libv4l2
# libv4l-dev [!hurd-any],
# autodetected: hwaccels 'h263_vaapi, mpeg2_vaapi, vc1_vaapi, h264_vaapi,
mpeg4_vaapi, wmv3_vaapi'
- - libva-dev (>= 1.3) [!hurd-any],
+# libva-dev (>= 1.3) [!hurd-any],
# autodetected: hwaccels 'h263_vdpau, mpeg2_vdpau, vc1_vdpau, h264_vdpau,
mpeg4_vdpau, wmv3_vdpau, mpeg1_vdpau', decoders 'h264_vdpau, mpeg1_vdpau,
mpeg4_vdpau, mpeg_vdpau, vc1_vdpau, wmv3_vdpau'
libvdpau-dev,
# --enable-libvidstab
diff --git a/debian/rules b/debian/rules
index bf37128c..c3fbb9b9 100755
- --- a/debian/rules
+++ b/debian/rules
@@ -198,6 +198,13 @@ ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
--target-os=$(DEB_HOST_ARCH_OS)
endif

+CONFIG+= --disable-indevs --disable-outdevs \
+ --disable-sdl2 \
+ --disable-libflite \
+ --disable-librsvg \
+ --disable-libtheora
+
+
# Use the default debhelper scripts, where possible.
%:
dh $@ --with pkgkde_symbolshelper
@@ -250,8 +257,8 @@ build_%: prebuild_%

# Set the library path for the dynamic linker, because the tests otherwise
don't find the libraries.
override_dh_auto_test-arch:
- - export
LD_LIBRARY_PATH="libavcodec:libavdevice:libavfilter:libavformat:libavresample:
libavutil:libpostproc:libswresample:libswscale"; \
- - dh_auto_test -a --sourcedirectory=debian/standard -- -k
+# export
LD_LIBRARY_PATH="libavcodec:libavdevice:libavfilter:libavformat:libavresample:
libavutil:libpostproc:libswresample:libswscale"; \
+# dh_auto_test -a --sourcedirectory=debian/standard -- -k

# No tests for indep build.
override_dh_auto_test-indep:

- --
Yves-Alexis
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAmGNKoMACgkQ3rYcyPpX
RFsEUAgAlBFy101v+71Emw425iWYa2iWF3X3T13N+pCgcPwitKO2ckhQAWXw6QeM
QIgZhh2FYZvnhiVv2V8cQOEbeX1ERSIa5JnwbReFTQB/FPKeqO2wHiNrmEdcjiYv
iDYUZ7YPDMlp7XN7FQBUq6W7Asx1SluBsFjorvpy5oSu4qJ+GX06p2Fnhyc4lJ3e
wKDjnTmEmNBNkofRitqbPvKAyPVbv0+o6d15qj5k+KIwvw4b5NLbyel4wwdgY/D7
ld1RGxrtfMY03JQE9FM/jjEzS9CH6ptzHc+CVTpJdrfqCgz5rIk40iQym0E+kKdi
OwKrIbBey+Zkjp+1YrvJh3oph3JtqQ==
=vI3r
-----END PGP SIGNATURE-----

Patrice Duroux

unread,
Nov 11, 2021, 11:00:04 AM11/11/21
to
Hi,

And furthermore among the reverse dependencies of ffmpeg, some may claim only
the headless version. Any idea on this?

This "headless" approach is something nice for me and I was thinking of it
regarding a revision proposal of the graphviz packaging (see #998256).

Best,
Patrice

Fabian Greffrath

unread,
Nov 12, 2021, 5:06:30 AM11/12/21
to
Hi corsac,

Am 11.11.2021 15:36, schrieb Yves-Alexis Perez:
> So I went ahead and gave it a try. For the sake of interested people,
> here's
> some details.

could you prepare a patch that makes this available as a package
build-time option, e.g. if DEB_BUILD_OPTIONS contains "headless"?

Thanks!

- Fabian

Yves-Alexis Perez

unread,
Nov 12, 2021, 6:30:03 AM11/12/21
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Yeah, I can try that. I think the exact configuration options might be open to
discussion but I can surely propose rough merge request for discussions if
there's interest from the maintainers.

Regards,
- --
Yves-Alexis
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAmGOTwkACgkQ3rYcyPpX
RFuw7AgAlDW2VNG/N9iI9CUrwXdOOCQmz6uiSFJ0NMXf1kUXQsL3EmK4gx8ye50t
ntw0dq3L0xwO+P5X5OPBEadXAQZV51sU7X7HrfGeEtqwUXV2BVDDo/6igzh76W9E
pZYP4sfP/pENfAAJec/1uzqHWR867zMSpzVbg17QDUAZQ20hjApnBOfBRuqKklKp
QuGD0CjnB/sTvh44AcvViXKnDIRDrcZl2uOo/V52PZe0ic5C300ipWgrFEEp8BfG
NVTyT+6HxeB4gq5RF0YC2VTfDbPoTxP6ZFYPrL35TwThuYsnS+TfmoSzvXSxpmGv
yetzAKseh0KKv/GCxsJSJISoyVOdrg==
=T/d+
-----END PGP SIGNATURE-----
0 new messages