Since 11, debian no longer provides VLC deb packages that support rtsp, and it is not possible to play rtsp through libvlc, so you need to compile it yourself.
# Installation of the build environment, compilation of dependencies and contrib third-party tools
sudo apt install git g++ make libtool automake autopoint pkg-config flex bison lua5.2 sudo apt build-dep vlc
sudo apt install subversion yasm cvs cmake ragel
It is recommended to add the mirror source of AliCloud
sudo nano /etc/apt// # Add debian ari cloud source to /etc/apt/ deb /debian/ bookworm main non-free non-free-firmware contrib deb-src /debian/ bookworm main non-free non-free-firmware contrib deb /debian-security/ bookworm-security main deb-src /debian-security/ bookworm-security main deb /debian/ bookworm-updates main non-free non-free-firmware contrib deb-src /debian/ bookworm-updates main non-free non-free-firmware contrib deb /debian/ bookworm-backports main non-free non-free-firmware contrib deb-src /debian/ bookworm-backports main non-free non-free-firmware contrib
sudo apt update
# Download the vlc source code and unzip it.
wget /pub/videolan/vlc/3.0.21/vlc-3.0. tar xvJf vlc-3.0. cd vlc-3.0.21
# Create a compilation directory
cd contrib mkdir native && cd native ../bootstrap
# Download the live555 source code and compile it, note that it is not the latest version of live555, but a specific version provided by videolan.
wget /pub/contrib/live555/live.2016.11. -O ../contrib/tarballs/live.2016.11.
make .live555
# Configure vlc compilation parameters, the key is to specify the installation location, and enable rtsp, other optional parameters are --disable-alsa --disable-chromaprint --enable-shared, etc., start compilation
../../configure --prefix=/usr --enable-realrtsp --enable-live555
make
# After compiling, check to see if live555 is supported.
./vlc --list | grep live555
# Installation
make install
# If you don't have libvlc installed under /usr, you need to add an environment variable to reference libvlc. You can also modify /etc/ or add /etc//, fill in the "customized installation directory /lib", and then run
sudo ldconfig
# This article is referenced
/UnixCompile/
/Configure/
/x740073529/article/details/133711117
/m0_37554445/article/details/122986059