[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#998748: ffmpeg: headless package version



-----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 <corsac@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-----


Reply to: