Raspberry Pi 4 - SSD boot steps - force ffmpeg from zmrepo (7:4.1.4-1~zm1)

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
mightymos
Posts: 2
Joined: Sun Mar 07, 2021 9:08 pm

Raspberry Pi 4 - SSD boot steps - force ffmpeg from zmrepo (7:4.1.4-1~zm1)

Post by mightymos »

I hope these steps help someone or can be improved.
Premade image is helpful but does not seem to boot from SSD:
https://zmrepo.zoneminder.com/ftp/syste ... .1.img.bz2

Flashed Raspberry Pi OS image on Raspberry Pi 4 Model B Rev 1.4 (8GB RAM model) using balenaEtcher to SSD.
Booting only from SSD (no SD card) via USB:
https://www.jeffgeerling.com/blog/2020/ ... -4-usb-ssd
(also added empty "ssh" file to /boot partition because remoting in due to no display)
Flashed image => 2021-01-11-raspios-buster-armhf-lite.zip

Then followed directions here:
https://wiki.zoneminder.com/Debian_10_B ... om_ZM_Repo

Similar approach to image [2020-02-13-raspbian-buster-zoneminder-1.34-0.1]
Also add zmrepo(s) by adding file and contents:
[/etc/apt/sources.list.d/zoneminder_repo_ffmpeg.list]
deb https://zmrepo.zoneminder.com/debian/ffmpeg buster/

[/etc/apt/sources.list.d/zoneminder_repo_1.34.list]
deb https://zmrepo.zoneminder.com/debian/release-1.34 buster/

Issue is of trying to force/manage installation of ffmpeg from zmrepo.
According to forum/wiki we want ffmeg from this repo because works with h.264 (and h.265?) cameras/zoneminder.

To install ffmpeg:
sudo apt install ffmpeg=7:4.1.4-1~zm1
Output:
The following packages have unmet dependencies:
ffmpeg : Depends: libavcodec58 (= 7:4.1.4-1~zm1)
Depends: libavdevice58 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
Depends: libavfilter7 (= 7:4.1.4-1~zm1)
Depends: libavformat58 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
Depends: libavresample4 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
Depends: libavutil56 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
Depends: libpostproc55 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
Depends: libswresample3 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
Depends: libswscale5 (= 7:4.1.4-1~zm1) but 7:4.1.6-1~deb10u1+rpt1 is to be installed
E: Unable to correct problems, you have held broken packages.

Appears very similar to this topic output:
viewtopic.php?f=40&t=29358&p=115067&hil ... ry#p115067

Then tried:
sudo apt install zoneminder ffmpeg=7:4.1.4-1~zm1 libavcodec58=7:4.1.4-1~zm1 libavdevice58=7:4.1.4-1~zm1 libavfilter7=7:4.1.4-1~zm1 libavformat58=7:4.1.4-1~zm1 libavresample4=7:4.1.4-1~zm1 libavutil56=7:4.1.4-1~zm1 libpostproc55=7:4.1.4-1~zm1 libswresample3=7:4.1.4-1~zm1 libswscale5=7:4.1.4-1~zm1

This appeared to finally work.

Examples of ffmpeg versions/repos available as of [3/7/2021]:
Installed: (none)
Candidate: 7:4.1.6-1~deb10u1+rpt1
Version table:
7:4.1.6-1~deb10u1+rpt1 500
500 http://archive.raspberrypi.org/debian buster/main armhf Packages
7:4.1.6-1~deb10u1 500
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
7:4.1.4-1~zm1 500
500 https://zmrepo.zoneminder.com/debian/ffmpeg buster/ Packages

Considered alternative of trying to install ffmpeg from deb-multimedia repo but seems like more difficulty.
Seems like a lot of steps here however.
Also doing apt update or apt upgrade will upgrade to the 7:4.1.6-1 and destroy all this work.
In previous experiments, ffmpeg from raspberrypi repo seemed to cause flickering green video or no video feed at all.

However ffmpeg from zmrepo does seem to play well with zoneminder and Amcrest cameras (2x IP3M-941B, 1x IP5M-T1179EW-28MM).
Cameras set to limit 10 fps and 720p.
Will monitor stability.

Is there a better way of handling multiple repos?
Post Reply