SvenVD / rpisurv

Robust Platform for Integrated Streaming
https://community.rpisurv.net
GNU General Public License v2.0
625 stars 101 forks source link

Use Raspberry Pi OS Lite (Debian v12 bookworm) 32Bit or 64Bit on Pi 5 for a RpiSurv fresh install? #189

Open SemoTech opened 7 months ago

SemoTech commented 7 months ago

Hello @SvenVD,

As I posted about before and you are aware, I've been having some camera freezing issues with RpiSurv on a Pi4B 2GB that could be related to the GPU getting overloaded or possibly failing. As such I just ordered a Pi5 4GB and plan to do a clean OS install on it (Raspberry Pi OS Lite Debian 12 - bookworm) but need advice as to what build to install. Is RpiSurv compatible with both 32 Bit and 64 Bit "Raspberry Pi OS Lite"? Which bit flavor do you recommend I use?

Also, any tweaks for RpiSurv to get the most out of the new Pi5 GPU and run 9 cameras smoothly again?

Thank you.

SemoTech commented 7 months ago

Well I tried both the 32Bit and 64Bit versions of (Raspberry Pi OS Lite Debian 12 - bookworm), the only versions that are supported on the Pi5 and unfortunately neither works!

As you install with "sudo ./install.sh" and after a lot of files get downloaded and installed, the installer exists with an error!


Processing triggers for libvlc-bin:armhf (1:3.0.20-0+rpt5+deb12u1) ...
Processing triggers for libgdk-pixbuf-2.0-0:armhf (2.42.10+dfsg-1+b1) ...
Your version of vlc does not have the needed mmal options. Rpisurv needs those
Minimum tested vlc version for Rpisurv is (VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72),
Maximum tested vlc version for Rpisurv is (VLC media player 3.0.17.4 Vetinari (3.0.13-8-g41878ff4f2)
Aborting installation, upgrade to latest vlc player with mmal support
pi@pi5:~/rpisurv $ vlc --version
VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
VLC version 3.0.20 Vetinari (3.0.20-0-g6f0d0ab126b)
Compiled by Raspbian buildd for bookworm on Raspbian armhf buildd (Feb 20 2024 15:31:25)
Compiler: gcc version 12.2.0 (Raspbian 12.2.0-14+rpi1)
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public Licence;
see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.
pi@pi5:~/rpisurv $ 

The included version of VLC with both distributions does indeed support "mmal" so RpiSurv needs to be updated to work with the newer versions of VLC...

Anyone else have and other suggestions and advises if 64 Bit is better than 32Bit for RpiSurv?

SvenVD commented 7 months ago

As I own no pi5 nor bookworm, could you paste output of vlc --help it should contain mmal options

SemoTech commented 7 months ago

Thanks @SvenVD here you go:

pi@pi5:~ $ vlc --list | grep mmal
VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
  mmal_xsplitter         MMAL x11 splitter for Raspberry Pi
pi@pi5:~

While still on bookworm 32Bit, I even used the "fix" from HERE and:

  1. Created a new file /etc/apt/preferences.d/vlc containing:
    
    Package: vlc*
    Pin: origin archive.raspberrypi.org
    Pin-Priority: 600

Package: libvlc* Pin: origin archive.raspberrypi.org Pin-Priority: 600

2. Forced load of the archive versions:

sudo apt -y remove vlc libvlc sudo dpkg --configure -a # Make sure that all the packages are properly configured sudo apt-get clean # Clean up the old archived packages sudo apt-get update --allow-releaseinfo-change # Update the package list sudo apt-get -y dist-upgrade sudo apt-get -y install vlc # May have been removed earlier sudo apt-get -y install python3-vlc # May also have been removed sudo apt -y remove vlc-data # Old dependencies seem to hang around sudo apt-get -y install vlc-plugin-base # And re-install

Than again issued:

pi@pi5:~ $ cd rpisurv/ pi@pi5:~/rpisurv $ sudo ./install.sh

and got:

Your version of vlc does not have the needed mmal options. Rpisurv needs those Minimum tested vlc version for Rpisurv is (VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72), Maximum tested vlc version for Rpisurv is (VLC media player 3.0.17.4 Vetinari (3.0.13-8-g41878ff4f2) Aborting installation, upgrade to latest vlc player with mmal support pi@pi5:~/rpisurv $

More details on current mmal:

pi@pi5:~/rpisurv $ sudo -u pi vlc -H | grep mmal VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b) -V, --vout {any,wl_dmabuf,mmal_xsplitter,gles2,gl,xcb_xv,xcb_x11,fb,drm_vout,caca,omxil_vout,aa,yuv,wl_shm,vmem,vdummy,vdummy,flaschen,none} pi@pi5:~/rpisurv $



Any other suggestions?
akoryuerek commented 7 months ago

Uninstall current vlc and the try this.

sudo apt install vlc=3.0.17.4

SemoTech commented 7 months ago

sudo apt install vlc=3.0.17.4

Thanks @akoryuerek but no dice getting to install it on Pi5 w/ bookworm 32bit, see below:

pi@pi5:~ $ sudo apt install vlc=3.0.17.4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package vlc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Version '3.0.17.4' for 'vlc' was not found
pi@pi5:~ $ 
SvenVD commented 7 months ago

Seems we are also running into https://github.com/RPi-Distro/vlc/issues/80#issuecomment-1817884925. Or can you still have the mmal on 32 bit on bookworm?

SemoTech commented 7 months ago

Seems we are also running into RPi-Distro/vlc#80 (comment). Or can you still have the mmal on 32 bit on bookworm?

That's crazy! Any alternatives to VLC we could use on bookworm v12 and the Pi5?

jdarwood007 commented 7 months ago

Seems we are also running into RPi-Distro/vlc#80 (comment). Or can you still have the mmal on 32 bit on bookworm?

I don't have a 5, but a 4 and it can install bookworm. Same issue occurs on 32 bit. Bullseye I couldn't get to work either.

dlasher commented 5 months ago

Would love to see RPISURV using something like SDL2 (https://wiki.libsdl.org/SDL2/FrontPage) or SDL3 (https://wiki.libsdl.org/SDL3/FrontPage) instead as video output --- well supported, and used by quite a few projects.

Additionally, multiple emulation/retro-gaming platforms use SDL, no issues with framerate there:

UntouchedWagons commented 4 months ago

Any updates on this? I've got two pi 3Bs still running Debian 10 because I've been unable to install rpisurv on any debian version newer.

SvenVD commented 4 months ago

I am in the middle of a proof of concept trying something out for the next version of rpisurv. However to finish it will take some time as my time is very limited.

dlasher commented 4 months ago

Appreciate the update - hoping for something to give me a reason to update the old RPISURV2 installs.

SemoTech commented 4 months ago

Nice! We will wait patiently @SvenVD... But can you give us a hint?
Does it have anything to do with SDL2 or SDL3 for better compatibility with Pi5 running v12 Bookworm? Thanks.

SvenVD commented 4 months ago

I am now focusing on x86 hardware like https://www.asus.com/displays-desktops/mini-pcs/pn-series/asus-expertcenter-pn42/ Reasons:

SemoTech commented 4 months ago

Interesting to hear for sure. Sadly much larger footprint and more expensive hardware.

I would have thought the improved GPU and CPU in the Pi5 would have helped on the performance side as would moving away from VLC.

dlasher commented 4 months ago
  • More powerful, more simultaneous streams possible

Honestly we don't need more than 9 streams per screen (for 99% of setups) and a PI will handle that.

  • More stability long term vs raspberry pi changing and breaking stuff every major release. Like the case is now for VLC rpi version ( which is a blocker)

But you can solve that by shifting away from VLC (As has been suggested above with SDL).

On the bright side, the focus on x86 and intel GPU accel means the older NUC will be usable, but those are still $120-150'ish, which is a FAR cry from a POE powered PI. :(

(look at what the emulation platforms have done - by embracing SDL they become platform independent)

SvenVD commented 4 months ago

There is probably a good chance that it will work on x86 as well as pi 5, but we will see.

SvenVD commented 5 days ago

Update: I now released a complete new version (4) that works on following hardware https://github.com/SvenVD/rpisurv/tree/v4_latest?tab=readme-ov-file#verified-hardware-list see https://github.com/SvenVD/rpisurv/tree/v4_latest

UntouchedWagons commented 5 days ago

I'll see if I can test V4 on a Pi 3B running Debian 12 tomorrow.

SvenVD commented 5 days ago

I'll see if I can test V4 on a Pi 3B running Debian 12 tomorrow.

The new version relies on Xorg (xfce4 and lightdm) ( Since Wayland can not control window position ) and mpv player. The installer also expects Ubuntu packages.

Versions of the Raspberry Pi other than 5 need special hardware decoding in the player, so for those better keep using the older Rpisurv versions, unless you can find and enable older rpi hardware decoding with mpv options for each stream manually in https://github.com/SvenVD/rpisurv/blob/d1da3c2275dd36e2118cc0b2899faf60d1866f99/surveillance/etc/monitor1.yml#L95

For the Raspberry Pi 5 I guess your best chance would be to use Ubuntu and make X work.Combination of here? or here?? (if X isn't working out of the box). Also the freeform_advanced_mpv_options can be used to enable specialized Raspberry Pi 5 options if needed. Happy to hear the results, thanks for testing.

UntouchedWagons commented 1 day ago

Okay I installed Ubuntu 24.04 on my Pi 3B and got rpisurv V4 installed but I just get a black screen. If I tap the touchscreen I get a cursor but that's it.

SvenVD commented 1 day ago

Versions of the Raspberry Pi other than 5 need special hardware decoding in the player, so for those better keep using the older Rpisurv versions, unless you can find and enable older rpi hardware decoding with mpv options for each stream manually in

Versions of the Raspberry Pi other than 5 and even for 5 need special hardware decoding in the player, so for those better keep using the older Rpisurv versions, unless you can find and enable older rpi hardware decoding with mpv options for each stream manually

UntouchedWagons commented 1 day ago

Yeah that problem with that is I'm stuck on Debian 10, if I try to update the packages everything just breaks and I have to restore a img backup.