The following packages have been kept back: ffmpeg

No, I thought it was one or the other solution.

After pinning, apt shows all packages as up to date, so not a fix still.

OK, I am confused. My ffmpeg version is 5.1.3, so why does it show that it can be upgraded to 4.4? Would home assistant with python 3.11 install properly in this case?

root@DietPi:~# ffmpeg
ffmpeg version 5.1.3-1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Bumping thisā€¦ Please help

What a mess. I am not sure why with libsrt1.4-gnutls installed, APT still does not automatically pull the needed versions for libavcodec58 and libavfilter7 from the RPi package repository. They are definitely there and have highest priority as of the epoch version 8:

# apt policy libavcodec58
libavcodec58:
  Installed: (none)
  Candidate: 8:4.3.6-0+deb11u1+rpt2
  Version table:
     8:4.3.6-0+deb11u1+rpt2 500
        500 https://archive.raspberrypi.org/debian bullseye/main armhf Packages
# apt policy libavfilter7
libavfilter7:
  Installed: (none)
  Candidate: 8:4.3.6-0+deb11u1+rpt2
  Version table:
     8:4.3.6-0+deb11u1+rpt2 500
        500 https://archive.raspberrypi.org/debian bullseye/main armhf Packages

@urostor
Can you check which package versions are installed now?

dpkg -l | grep -E ' (ffmpeg|libav|libpostproc|libsw).*'
1 Like

Here is the output:

ii  ffmpeg                                 7:5.1.3-1                        arm64        Tools for transcoding, streaming and playing of multimedia files
ii  libavahi-client3:arm64                 0.8-10                           arm64        Avahi client library
ii  libavahi-common-data:arm64             0.8-10                           arm64        Avahi common data files
ii  libavahi-common3:arm64                 0.8-10                           arm64        Avahi common library
ii  libavahi-compat-libdnssd1:arm64        0.8-10                           arm64        Avahi Apple Bonjour compatibility library
ii  libavahi-core7:arm64                   0.8-10                           arm64        Avahi's embeddable mDNS/DNS-SD library
ii  libavc1394-0:arm64                     0.5.4-5                          arm64        control IEEE 1394 audio/video devices
ii  libavcodec59:arm64                     7:5.1.3-1                        arm64        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice59:arm64                    7:5.1.3-1                        arm64        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter8:arm64                     7:5.1.3-1                        arm64        FFmpeg library containing media filters - runtime files
ii  libavformat59:arm64                    7:5.1.3-1                        arm64        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavif15:arm64                        0.11.1-1                         arm64        Library for handling .avif files
ii  libavutil57:arm64                      7:5.1.3-1                        arm64        FFmpeg library with functions for simplifying programming - runtime files
ii  libpostproc56:arm64                    7:5.1.3-1                        arm64        FFmpeg library for post processing - runtime files
ii  libswresample4:arm64                   7:5.1.3-1                        arm64        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale6:arm64                      7:5.1.3-1                        arm64        FFmpeg library for image scaling and various conversions - runtime files

Looks all good, all packages from Debian Bookworm as intended. Where does ā€œit show that it can be upgraded to 4.4ā€?

Well, when I do apt update, this is the result:

Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm InRelease
Get:3 https://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Hit:4 https://archive.raspberrypi.org/debian bullseye InRelease
Get:5 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:6 https://deb.debian.org/debian bookworm-backports InRelease [49.7 kB]
Fetched 150 kB in 4s (39.0 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

And apt list --upgradable shows:

Listing... Done
ffmpeg/stable 8:4.3.6-0+deb11u1+rpt2 arm64 [upgradable from: 7:5.1.3-1]
N: There is 1 additional version. Please use the '-a' switch to see it

But it canā€™t be ā€œupdatedā€ since libavcodec58 etc are not going to be installed.

Maybe this could be informative:

$ apt policy ffmpeg
ffmpeg:
  Installed: 7:5.1.3-1
  Candidate: 8:4.3.6-0+deb11u1+rpt2
  Version table:
     8:4.3.6-0+deb11u1+rpt2 500
        500 https://archive.raspberrypi.org/debian bullseye/main arm64 Packages
 *** 7:5.1.3-1 500
        500 https://deb.debian.org/debian bookworm/main arm64 Packages
        100 /var/lib/dpkg/status

following should reduce priority of archive.raspberrypi.org Can't install ffmpeg on fresh installation first boot Ā· Issue #6461 Ā· MichaIng/DietPi Ā· GitHub

Yeah, I tried this yesterday and it doesnā€™t work.

Here is the full output:

root@DietPi:~# cat << '_EOF_' > /etc/apt/preferences.d/dietpi-ffmpeg
> Package: ffmpeg* libav* libpostproc* libsw*
> Pin: origin archive.raspberrypi.org
> Pin-Priority: -1
> _EOF_
root@DietPi:~# apt update
Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm InRelease
Get:3 https://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Hit:4 https://archive.raspberrypi.org/debian bullseye InRelease
Get:5 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:6 https://deb.debian.org/debian bookworm-backports InRelease [49.7 kB]
Fetched 150 kB in 4s (36.8 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: https://archive.raspberrypi.org/debian/dists/bullseye/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
root@DietPi:~# apt install ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ffmpeg is already the newest version (7:5.1.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@DietPi:~# ffmpeg -version
ffmpeg version 5.1.3-1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100
root@DietPi:~# apt install --reinstall ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 1795 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://deb.debian.org/debian bookworm/main arm64 ffmpeg arm64 7:5.1.3-1 [1795 kB]
Fetched 1795 kB in 0s (4094 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 75128 files and directories currently installed.)
Preparing to unpack .../ffmpeg_7%3a5.1.3-1_arm64.deb ...
Unpacking ffmpeg (7:5.1.3-1) over (7:5.1.3-1) ...
Setting up ffmpeg (7:5.1.3-1) ...
Processing triggers for man-db (2.11.2-2)

Again, when ffmpeg and others are pinned, all packages are shown as ā€œup to dateā€. But the ffmpeg version is always 5.1.3.

It seems that despite being pinned, the origin is still deb.debian.org
(ah OK, this is expected behaviour)

which version do you expect? 5.1.3-1 is the latest available on Bookworm as well as on Trixi and sid Debian -- Package Search Results -- ffmpeg

RPI repository is providing older version 4.3.6-0 (Bullseye)

Yes I expect version 5.1.3 to be the one installed. However, I am not sure if home assistantā€™s av-ha would compile properly with it (when reinstalling to update pyenv to python 3.11), as people seemed to have some problems in other threads due to not having version 4.4.

but there is no version 4.4. Even not on the Bullseye RPI repository. However other user run HA-AV install using ffmpeg 5.1.3 DietPi-Software | Home Assistant: Service fails on Bullseye/Buster ARMv6/7/RISC-V systems Ā· Issue #6444 Ā· MichaIng/DietPi Ā· GitHub

Well, then I must have hallucinated it :rofl:

OK, I thought there is a version 4.4 with a higher epoch (8) than 5.1 but which was for some reason hidden. Now all makes sense.

A similar problem now arose with those two libraries:

libjack-jackd2-0/stable 1.9.21~dfsg-3 armhf [upgradable from: 1.9.21~dfsg-2]
libmpv-dev/stable 0.35.1-4 armhf [upgradable from: 0.32.0-3]

(this is on a pi zero 2)

I am posting here because it might be related and instead of pinning individual packages when they are found to be broken, a general solution would be better.

The final solution would be for the PRI Foundation to provide Bookworm packages. :wink:

Well, then do you suggest creating a separate topic about this? I am bound not to be the only one who will encounter it. Or should it be kept here?

I donā€™t think creating a new topic will solve it :wink:

For a final solution we have to wait for the RPI foundation to provide bookworm packages. Until then we can just work with apt pinningā€¦

Could you post the whole error message when you try to upgrade those two packages? Those are Bookworm => Bookworm version upgrades, so those should not cause the same error.

Well, OK, doing them one by one did the trick actually.

root@pizero2w:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libjack-jackd2-0 libmpv-dev
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
root@pizero2w:~# apt upgrade  libmpv-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmpv-dev : Depends: libjack-dev
E: Broken packages
root@pizero2w:~# apt upgrade libjack-jackd2-0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libmpv1
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  gir1.2-ibus-1.0 icu-devtools libarchive-dev libasound2-dev libass-dev libavcodec-dev
  libavdevice-dev libavdevice59 libavfilter-dev libavfilter8 libavformat-dev libavutil-dev
  libbluray-dev libcaca-dev libcdio-cdda-dev libcdio-dev libcdio-paranoia-dev libdbus-1-dev
  libdecor-0-dev libdrm-dev libdrm-etnaviv1 libdrm-exynos1 libdrm-freedreno1 libdrm-omap1
  libdrm-tegra0 libdvdnav-dev libdvdread-dev libepoxy-dev libfribidi-dev libgbm-dev
  libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-subset0 libibus-1.0-5
  libibus-1.0-dev libicu-dev libjack-jackd2-dev liblua5.2-dev libmpv2 libmujs-dev libmujs2
  libncurses-dev libpciaccess-dev libpipewire-0.3-0 libpipewire-0.3-dev libplacebo-dev
  libplacebo208 libpostproc-dev libpulse-dev libpulse-mainloop-glib0 libreadline-dev
  librubberband-dev libsamplerate0-dev libsdl2-dev libset-scalar-perl libsixel-dev libsixel1
  libslang2-dev libsndio-dev libspa-0.2-dev libspa-0.2-modules libspirv-cross-c-shared-dev
  libspirv-cross-c-shared0 libswresample-dev libswscale-dev libuchardet-dev libudfread-dev
  libva-dev libva-glx2 libvdpau-dev libwayland-bin libwayland-dev libwebrtc-audio-processing1
  libxcursor-dev libxfixes-dev libxi-dev libxinerama-dev libxkbcommon-dev libxml2-dev
  libxpresent-dev libxpresent1 libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev
  libzimg-dev libzimg2 wayland-protocols
The following packages will be upgraded:
  libjack-jackd2-0 libmpv-dev
2 upgraded, 90 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.2 MB of archives.
After this operation, 175 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Many packages laterā€¦

root@pizero2w:~# apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libmpv1
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1463 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 96029 files and directories currently installed.)
Removing libmpv1:armhf (0.32.0-3) ...
Processing triggers for libc-bin (2.36-9) ...
root@pizero2w:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Okay, looks good now. Not sure why you needed to do the libjack-jackd2-0 upgrade manually for APT to finally upgrade libmpv-dev, but great that this worked.

If this happened during our Bookworm upgrade script, please repeat it once, to have all needed software migrations/reinstall done.