In Short: I tried to reinstall ffmpeg: sudo apt install ffmpeg
:
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:
ffmpeg : Depends: libavcodec58 (= 7:4.1.6-1~deb10u1)
Depends: libavdevice58 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libavfilter7 (= 7:4.1.6-1~deb10u1)
[...]
E: Unable to correct problems, you have held broken packages.`
How to resolve those missing dependencies?
Full question:
When I ran ffmpeg -i "./input.mp4" -vcodec libvpx-vp9 -acodec libvorbis -b:v 9M "./output.webm"
the resulting did not have a bitrate of 9MB but a much smaller one even though the bitrate of the input-videos that I tried this with were either exactly 9MB or larger.
I'm interested in why this occurred and nothing helped to solve this problem except using -crf
instead. With that I could get the output file's bitrate to match the input file's bitrate by trial and error. This problem may or may not be related to the following problem. Maybe I should create a separate question for it.
Because of the problem described above I tried to reinstall ffmpeg. It looks like I had ffmpeg installed from Basil Gello's Kodi repository (the Kodi version in Debian's main repos is very outdated). At first I tried reinstalling ffmpeg from the main repositories by removing the repo and running sudo apt-get update && sudo apt-get --reinstall install ffmpeg
by which I got:
Reinstallation of ffmpeg is not possible, it cannot be downloaded.
so I added that repo again and ran: sudo apt-get --reinstall install ffmpeg/buster-backports
. This was the output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'ffmpeg'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libavcodec58' because of 'ffmpeg'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libavutil56' because of 'libavcodec58'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libswresample3' because of 'libavcodec58'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libavdevice58' because of 'ffmpeg'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libavfilter7' because of 'libavdevice58'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libavformat58' because of 'libavfilter7'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libpostproc55' because of 'libavfilter7'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libswscale5' because of 'libavfilter7'
Selected version '7:4.3.1-6~bpo10+1' (kodi-nightly-debian-repo:1.0/stable-backports [amd64]) for 'libavresample4' because of 'ffmpeg'
The following packages were automatically installed and are no longer required:
i965-va-driver:i386 intel-media-va-driver:i386 libgomp1:i386 libigdgmm5:i386 libsoxr0:i386 libva-drm2:i386 libva-x11-2:i386 libva2:i386
libvdpau-va-gl1:i386 libvdpau1:i386 mesa-va-drivers:i386 mesa-vdpau-drivers:i386 ocl-icd-libopencl1:i386 va-driver-all:i386 vdpau-driver-all:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libpostproc55 libswresample3 libswscale5
Suggested packages:
ffmpeg-doc
The following packages will be REMOVED:
libavcodec-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libavutil56:i386 libpostproc-dev libswresample-dev libswresample3:i386
libswscale-dev
The following packages will be upgraded:
ffmpeg libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libpostproc55 libswresample3 libswscale5
10 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
Need to get 9,752 kB of archives.
After this operation, 39.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 ffmpeg amd64 7:4.3.1-6~bpo10+1 [1,584 kB]
Get:2 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libavdevice58 amd64 7:4.3.1-6~bpo10+1 [114 kB]
Get:3 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libavfilter7 amd64 7:4.3.1-6~bpo10+1 [1,281 kB]
Get:4 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libswscale5 amd64 7:4.3.1-6~bpo10+1 [195 kB]
Get:5 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libavformat58 amd64 7:4.3.1-6~bpo10+1 [1,037 kB]
Get:6 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libavcodec58 amd64 7:4.3.1-6~bpo10+1 [4,942 kB]
Get:7 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libswresample3 amd64 7:4.3.1-6~bpo10+1 [95.0 kB]
Get:8 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libpostproc55 amd64 7:4.3.1-6~bpo10+1 [91.0 kB]
Get:9 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libavresample4 amd64 7:4.3.1-6~bpo10+1 [92.0 kB]
Get:10 https://basilgello.github.io/kodi-nightly-debian-repo buster-backports/main amd64 libavutil56 amd64 7:4.3.1-6~bpo10+1 [320 kB]
Fetched 9,752 kB in 8s (1,242 kB/s)
Reading changelogs... Done
apt-listchanges: Do you want to continue? [Y/n] y
apt-listchanges: Mailing root: apt-listchanges: changelogs for hostname(Reading database ... 427402 files and directories currently installed.)
Removing libavfilter-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libavformat-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libavcodec-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libavresample-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libswscale-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libswresample-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libswresample3:i386 (7:4.3.1-5.1~bpo10+1) ...
Removing libavutil56:i386 (7:4.3.1-5.1~bpo10+1) ...
Removing libpostproc-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
Removing libavutil-dev:amd64 (7:4.3.1-5.1~bpo10+1) ...
(Reading database ... 427211 files and directories currently installed.)
Preparing to unpack .../0-ffmpeg_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking ffmpeg (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../1-libavdevice58_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libavdevice58:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../2-libavfilter7_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libavfilter7:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../3-libswscale5_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libswscale5:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../4-libavformat58_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libavformat58:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../5-libavcodec58_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libavcodec58:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../6-libswresample3_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libswresample3:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../7-libpostproc55_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libpostproc55:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../8-libavresample4_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libavresample4:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Preparing to unpack .../9-libavutil56_7%3a4.3.1-6~bpo10+1_amd64.deb ...
Unpacking libavutil56:amd64 (7:4.3.1-6~bpo10+1) over (7:4.3.1-5.1~bpo10+1) ...
Setting up libavutil56:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libpostproc55:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libswscale5:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libswresample3:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libavresample4:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libavcodec58:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libavformat58:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libavfilter7:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up libavdevice58:amd64 (7:4.3.1-6~bpo10+1) ...
Setting up ffmpeg (7:4.3.1-6~bpo10+1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
[ Rootkit Hunter version 1.4.6 ]
File updated: searched for 181 files, found 146
Scanning processes...
Scanning candidates...
Scanning processor microcode...
Scanning linux images...
Running kernel seems to be up-to-date.
The processor microcode seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
User sessions running outdated binaries: [...]
Now the ouput of sudo apt install ffmpeg
always is:
Reading package lists... Done
Building dependency tree
Reading state information... 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:
ffmpeg : Depends: libavcodec58 (= 7:4.1.6-1~deb10u1)
Depends: libavdevice58 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libavfilter7 (= 7:4.1.6-1~deb10u1)
Depends: libavformat58 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libavresample4 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libavutil56 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libpostproc55 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libswresample3 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
Depends: libswscale5 (= 7:4.1.6-1~deb10u1) but 7:4.3.1-6~bpo10+1 is to be installed
E: Unable to correct problems, you have held broken packages.
How to resolve those missing dependencies? I can't just reinstall those, many other core packages depend on these.
I also tried running sudo apt-get clean ; sudo apt-get update ; sudo apt-get check ; sudo apt-get purge ffmpeg* -y ; sudo apt-get autoremove -y ; sudo apt-get -f satisfy ffmpeg -y
This did not solve the problem.
I'm running Debian 10 with KDE. Any help is appreciated.
aptitude
's interactive resolver -- that tries a lot more different combinations and will also suggest downgrades if that leads back to a consistent state.