如何使用 libcamera-vid 和 VLC 直播 Raspberry Pi 摄像头

在 Pi 上,运行以下命令

libcamera_livestream.sh
libcamera-vid -t0 --width 1920 --height 1080 --framerate 10 --nopreview --codec h264 --profile high --intra 5 --listen -o tcp://0.0.0.0:8494

在你想播放直播的计算机上,运行以下命令

vlc_connect_command.txt
vlc tcp/h264://192.168.1.234:8494

其中 192.168.1.234 是 Raspberry Pi 的 IP 地址。

在内部,这使用通过 TCP 的原始 H.264 流。这在本地网络上效果最好,但如果你的网络设置允许,它也可以通过 VPN 或互联网工作。

原始来源:Github 讨论


Check out similar posts by category: Raspberry Pi, Video