debian 12 编译 vlc/libvlc 支持 rtsp

debian 官方从11开始,不再提供支持 rtsp 的 VLC deb 包,通过 libvlc 播放 rtsp 也无法实现,因此需要自己编译。

# 安装编译环境,编译依赖库以及 contrib 第三方工具

1
2
3
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

 建议添加阿里云的镜像源

1
2
3
4
5
6
7
8
9
10
11
sudo nano /etc/apt/sources.list.d/aliyun.list
 
# 添加 debian 阿里云源到 /etc/apt/sources.list
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib<br><br>sudo apt update

 # 下载 vlc 源代码,解压

1
2
3
wget http://download.videolan.org/pub/videolan/vlc/3.0.21/vlc-3.0.21.tar.xz
tar xvJf vlc-3.0.21.tar.xz
cd vlc-3.0.21

# 创建编译目录

1
2
3
cd contrib
mkdir native && cd native
../bootstrap

# 下载 live555 源代码并编译,注意不是 live555 的最新版本,而是 videolan 提供的特定版本

1
2
wget http://downloads.videolan.org/pub/contrib/live555/live.2016.11.28.tar.gz -O ../contrib/tarballs/live.2016.11.28.tar.gz
make .live555

  # 配置 vlc 的编译参数,关键是指定安装位置,以及启用 rtsp,其他可选参数还有 --disable-alsa --disable-chromaprint --enable-shared 等, 开始编译

1
2
../../configure --prefix=/usr --enable-realrtsp --enable-live555
make

  # 编译完成后,查看是否已支持 live555

1
./vlc --list | grep live555

 # 安装

1
make install

 # 如果未安装在 /usr 下,想引用 libvlc 需要自己添加环境变量。也可以修改 /etc/ld.so.conf 或添加 /etc/ld.so.conf.d/libvlc.conf,填写"自定义的安装目录/lib",然后执行

1
sudo ldconfig

 # 本文参考
https://wiki.videolan.org/UnixCompile/
https://wiki.videolan.org/Configure/
https://blog.csdn.net/x740073529/article/details/133711117
https://blog.csdn.net/m0_37554445/article/details/122986059

 

posted @   树欲静·而风不止  阅读(86)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示