WebRTC janus安装编译教程

janus编译

系统 ubuntu 22.04

1.更新系统

shell 复制代码
apt-get update -y

2.安装依赖

shell 复制代码
apt install libmicrohttpd-dev libjansson-dev \
	libssl-dev libsofia-sip-ua-dev libglib2.0-dev \
	libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
	libconfig-dev pkg-config libtool automake cmake git wget -y	
apt-get install -y \
		libavutil-dev \
		libavformat-dev \
		libavcodec-dev \
		libmicrohttpd-dev \
		libjansson-dev \
		libssl-dev \
		libsofia-sip-ua-dev \
		libglib2.0-dev \
		libopus-dev \
		libogg-dev \
		libcurl4-openssl-dev \
		liblua5.3-dev \
		libconfig-dev \
		libusrsctp-dev \
		libwebsockets-dev \
		libnanomsg-dev \
		librabbitmq-dev \
		pkg-config \
		gengetopt \
		libtool \
		automake \
		build-essential \
		wget \
		git \
		gtk-doc-tools

3.安装Meson and Ninja

shell 复制代码
apt install meson ninja-build -y

4.设置python优先级

shell 复制代码
update-alternatives --install /usr/bin/python python /usr/bin/python3 1

5.安装libnice

shell 复制代码
git clone https://gitlab.freedesktop.org/libnice/libnice
cd libnice
meson --prefix=/usr build && ninja -C build && ninja -C build install

export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig


Installing stun/tools/stund to /usr/bin
Installing stun/tools/stunbdc to /usr/bin
Installing nice/libnice.so.10.13.1 to /usr/lib/x86_64-linux-gnu
Installing symlink pointing to libnice.so.10.13.1 to /usr/lib/x86_64-linux-gnu/libnice.so.10
Installing symlink pointing to libnice.so.10 to /usr/lib/x86_64-linux-gnu/libnice.so
Installing /libnice/agent/address.h to /usr/include/nice
Installing /libnice/agent/agent.h to /usr/include/nice
Installing /libnice/agent/candidate.h to /usr/include/nice
Installing /libnice/agent/debug.h to /usr/include/nice
Installing /libnice/agent/interfaces.h to /usr/include/nice
Installing /libnice/agent/pseudotcp.h to /usr/include/nice
Installing /libnice/stun/stunagent.h to /usr/include/stun
Installing /libnice/stun/stunmessage.h to /usr/include/stun
Installing /libnice/stun/win32_common.h to /usr/include/stun
Installing /libnice/stun/debug.h to /usr/include/stun
Installing /libnice/stun/constants.h to /usr/include/stun
Installing /libnice/stun/usages/bind.h to /usr/include/stun/usages
Installing /libnice/stun/usages/ice.h to /usr/include/stun/usages
Installing /libnice/stun/usages/turn.h to /usr/include/stun/usages
Installing /libnice/stun/usages/timer.h to /usr/include/stun/usages
Installing /libnice/nice/nice.h to /usr/include/nice
Installing /libnice/build/nice-version.h to /usr/include/nice
Installing /libnice/build/meson-private/nice.pc to /usr/lib/x86_64-linux-gnu/pkgconfig

6.安装libsrtp

wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
tar xfv v2.2.0.tar.gz
cd libsrtp-2.2.0
./configure --prefix=/usr --enable-openssl
make shared_library && make install

/usr/bin/install -c -d /usr/include/srtp2
/usr/bin/install -c -d /usr/lib
cp ./include/srtp.h /usr/include/srtp2
cp ./crypto/include/cipher.h /usr/include/srtp2
cp ./crypto/include/auth.h /usr/include/srtp2
cp ./crypto/include/crypto_types.h /usr/include/srtp2
if [ -f libsrtp2.a ]; then cp libsrtp2.a /usr/lib/; fi
if [ -f libsrtp2.dll.a ]; then cp libsrtp2.dll.a /usr/lib/; fi
if [ -f libsrtp2.so.1 ]; then \
        /usr/bin/install -c -d /usr/lib; \
        cp libsrtp2.so.1 /usr/lib/; \
        cp libsrtp2.so /usr/lib/; \
        if [ -n "1" ]; then \
                ln -sfn libsrtp2.so.1 /usr/lib/libsrtp2.so; \
        fi; \
fi
/usr/bin/install -c -d /usr/lib/pkgconfig
cp ./libsrtp2.pc /usr/lib/pkgconfig/

7.安装usrsctp

git clone https://github.com/sctplab/usrsctp
cd usrsctp
./bootstrap
./configure --prefix=/usr --disable-programs --disable-inet --disable-inet6
make && make install

8.安装libwebsockets

git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
git checkout v4.3-stable
mkdir build
cd build
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make && make install

9.安装mqtt

git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c
make && make install

10.安装libnanomsg-dev

apt-get install aptitude -y
aptitude install libnanomsg-dev -y

11.安装rabbitmq-c

git clone https://github.com/alanxz/rabbitmq-c
cd rabbitmq-c
git submodule init
git submodule update
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make && make install

12.安装janus

git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --enable-post-processing --prefix=/usr/local && \
	make && \
	make install && \
	make configs

13.安装完成后,直接执行janus运行程序

相关推荐
星就前端叭2 小时前
【开源】一款基于Vue3 + WebRTC + Node + SRS + FFmpeg搭建的直播间项目
前端·后端·开源·webrtc
web150854159359 小时前
vue 集成 webrtc-streamer 播放视频流 - 解决阿里云内外网访问视频流问题
vue.js·阿里云·webrtc
m0_748232399 小时前
WebRTC学习二:WebRTC音视频数据采集
学习·音视频·webrtc
m0_748237159 小时前
WebRTC 环境搭建
webrtc
重生之豪哥9 小时前
WebRtc webrtc-streamer部署
webrtc
Amarantine、沐风倩✨21 小时前
设计一个监控摄像头物联网IOT(webRTC、音视频、文件存储)
java·物联网·音视频·webrtc·html5·视频编解码·七牛云存储
mo47761 天前
Webrtc音频模块(四) 音频采集
音视频·webrtc
红米饭配南瓜汤1 天前
WebRTC服务质量(09)- Pacer机制(01) 流程概述
网络·音视频·webrtc
玩电脑的辣条哥4 天前
aioice里面candidate固定UDP端口测试
python·网络协议·udp·webrtc
玩电脑的辣条哥5 天前
本地部署webrtc应用怎么把http协议改成https协议?
http·https·webrtc