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运行程序

相关推荐
EasyCVR1 小时前
EHOME视频平台EasyCVR视频融合平台使用OBS进行RTMP推流,WebRTC播放出现抖动、卡顿如何解决?
人工智能·算法·ffmpeg·音视频·webrtc·监控视频接入
安步当歌4 小时前
【WebRTC】视频编码链路中各个类的简单分析——VideoStreamEncoder
音视频·webrtc·视频编解码·video-codec
安步当歌19 小时前
【WebRTC】视频采集模块中各个类的简单分析
音视频·webrtc·视频编解码·video-codec
wyw00001 天前
解决SRS推送webrtc流卡顿问题
webrtc·srs
安步当歌4 天前
【WebRTC】WebRTC的简单使用
音视频·webrtc
西部秋虫4 天前
Windows下FFmpeg集成metaRTC实现webrtc推拉流的例子
ffmpeg·webrtc
johnny2336 天前
《Web性能权威指南》-WebRTC-读书笔记
webrtc
xiejiashu7 天前
EasyPlayer.js网页播放器,支持FLV、HLS、WebSocket、WebRTC、H.264/H.265、MP4、ts各种音视频流播放
websocket·webrtc·h.264·flv播放器·hls播放器
Dreamt灬7 天前
webrtc agc2实现原理
webrtc
程序员阿灿8 天前
WebRTC学习六:MediaStream 常用API介绍
音视频·webrtc