How to livestream Raspberry Pi camera using libcamera-vid & VLC
On the pi, run the following command
libcamera-vid -t0 --width 1920 --height 1080 --framerate 10 --nopreview --codec h264 --profile high --intra 5 --listen -o tcp://0.0.0.0:8494
On the computer where you want to play the livestream, run the following command
vlc tcp/h264://192.168.1.234:8494
where 192.168.1.234
is the IP address of the raspberry pi.
Internally, this uses a raw H.264 stream over TCP. This works best over the local network, but it will also work over VPN or the internet, if your networking setup allows it.
Original source: Github discussion