Janus
をテンプレートにして作成
[
トップ
] [
タイトル一覧
|
ページ一覧
|
新規
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* Janus [[WebRTC]] Server
** Build (Rocky Linux 9)
*** ツール
dnf -y install jansson-devel libconfig-devel libmicrohtt...
-- [[meson]]: [[cmake]] みたいなビルド設定ツール
-- [[ninja]]: [[make]] みたいな ビルドツール
dnf install libnice libnice-devel
dnf install libwebsockets libwebsockets-devel
dnf install usrsctp usrsctp-devel
**** libsrtp2 (SRTP: Secure Real-time Transport Protocol)
<pre>
#git clone https://github.com/cisco/libsrtp.git # このま...
git clone --branch v2.5.0 --depth 1 https://github.com/ci...
cd libsrtp
./configure --prefix=/usr/local --enable-openssl
make -j"$(nproc)"
make install
</pre>
**** 最新版
- libnice
<pre>
git clone https://gitlab.freedesktop.org/libnice/libnice....
cd libnice/
meson setup build --prefix=/usr/local
ninja -C build
ninja -C build install
</pre>
-libwebsocket
<pre>
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir -p build && cd build
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_...
make -j"$(nproc)"
make install
</pre>
*** Janus
<pre>
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
./autogen.sh
./configure --prefix=/usr/local --enable-rest --enable-we...
make -j"$(nproc)"
make install
make configs
</pre>
** 設定
*** 設定ファイル
**** /usr/local/etc/janus/janus.jcfg
api_secret = "" # Janus REST API 用の認証キー
admin_secret = "" # Janus 管理用 API の認証キー
- [[coturn]] を使用するなら,以下を追加
<pre>
nat: {
stun_server = "janus.jogrid.net"
stun_port = 3478
#nice_debug = "nice_debug option is NOT SUPPORTED...
#full_trickle = true
#ice_nomination = "regular"
#ice_consent_freshness = true
#ice_keepalive_conncheck = true
#ice_lite = true
#ice_tcp = true
</pre>
**** /usr/local/etc/janus/janus.transport.http.jcfg (デフ...
http = true
port = 8088 # for REST
**** /usr/local/etc/janus/janus.transport.websockets.jcfg...
ws = true
ws_port = 8188 # for Web Socket
**** /usr/local/etc/janus/janus.plugin.audiobridge.jcfg
<pre>
general: {
# 必要に応じて設定(例)
# string_ids = true
# rtp_port_range = "50000-60000"
# local_ip = "1.2.3.4"
# events = true
}
room-1234: {
description = "Demo Room"
is_private = false
secret = "room-secret" # ルーム操作用パスワード
pin = "room-pin" # 参加時パスワード(必要なら)
sampling_rate = 48000 # or 16000
spatial_audio = true
audiolevel_ext = true
audiolevel_event = true
audio_active_packets = 100
audio_level_average = 25
record = false
# record_dir = "/var/recordings/"
# record_file = "room-1234.wav"
# allow_rtp_participants = false
# rtp_forward_* = ... # 外部RTP転送を使う場合のみ
}
</pre>
*** Systemd
**** janus.service
<pre>
[Unit]
Description=Janus WebRTC Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/janus -F /usr/local/etc/janus
Restart=on-failure
User=root
[Install]
WantedBy=multi-user.target
</pre>
*** Apache で HTTPS, WSS リバースプロキシ
- [[Virtual Host の設定>Apache/Configuration-2.4/VirtualH...
**** 仮想ホスト設定(WSS対応)
- [[certbot]] の設定
- [[conf.d/janus.conf>Apache/Configuration-2.4/VirtualHos...
** STUN/TURN([[coturn]])
*** 設定
- see [[coturn]]
** TEST
*** Janus の単体疎通テスト
**** REST (8088)
curl http://localhost:8088/janus/info
**** WS (8188)
printf '%s\n' '{"janus":"info","transaction":"t1"}' | we...
**** WSS
printf '%s\n' '{"janus":"info","transaction":"t1"}' | we...
*** Coturn の STUN/TURN 動作確認
- see [[coturn]]
*** Janus + Coturn 経由の WebRTC 動作確認
*** ICE 候補の種類を確認(ブラウザ DevTools)
** for OpenSimulator
*** OpenSim.ini
<pre>
[JanusVoice]
; …略…
IceServers = [
{"urls":["stun:stun.l.google.com:19302"]},
{"urls":["turn:janus.jogrid.net:3478"], "username":"<T...
{"urls":["turns:janus.jogrid.net:5349"], "username":"<...
]
</pre>
#br
#br
終了行:
* Janus [[WebRTC]] Server
** Build (Rocky Linux 9)
*** ツール
dnf -y install jansson-devel libconfig-devel libmicrohtt...
-- [[meson]]: [[cmake]] みたいなビルド設定ツール
-- [[ninja]]: [[make]] みたいな ビルドツール
dnf install libnice libnice-devel
dnf install libwebsockets libwebsockets-devel
dnf install usrsctp usrsctp-devel
**** libsrtp2 (SRTP: Secure Real-time Transport Protocol)
<pre>
#git clone https://github.com/cisco/libsrtp.git # このま...
git clone --branch v2.5.0 --depth 1 https://github.com/ci...
cd libsrtp
./configure --prefix=/usr/local --enable-openssl
make -j"$(nproc)"
make install
</pre>
**** 最新版
- libnice
<pre>
git clone https://gitlab.freedesktop.org/libnice/libnice....
cd libnice/
meson setup build --prefix=/usr/local
ninja -C build
ninja -C build install
</pre>
-libwebsocket
<pre>
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir -p build && cd build
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_...
make -j"$(nproc)"
make install
</pre>
*** Janus
<pre>
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
./autogen.sh
./configure --prefix=/usr/local --enable-rest --enable-we...
make -j"$(nproc)"
make install
make configs
</pre>
** 設定
*** 設定ファイル
**** /usr/local/etc/janus/janus.jcfg
api_secret = "" # Janus REST API 用の認証キー
admin_secret = "" # Janus 管理用 API の認証キー
- [[coturn]] を使用するなら,以下を追加
<pre>
nat: {
stun_server = "janus.jogrid.net"
stun_port = 3478
#nice_debug = "nice_debug option is NOT SUPPORTED...
#full_trickle = true
#ice_nomination = "regular"
#ice_consent_freshness = true
#ice_keepalive_conncheck = true
#ice_lite = true
#ice_tcp = true
</pre>
**** /usr/local/etc/janus/janus.transport.http.jcfg (デフ...
http = true
port = 8088 # for REST
**** /usr/local/etc/janus/janus.transport.websockets.jcfg...
ws = true
ws_port = 8188 # for Web Socket
**** /usr/local/etc/janus/janus.plugin.audiobridge.jcfg
<pre>
general: {
# 必要に応じて設定(例)
# string_ids = true
# rtp_port_range = "50000-60000"
# local_ip = "1.2.3.4"
# events = true
}
room-1234: {
description = "Demo Room"
is_private = false
secret = "room-secret" # ルーム操作用パスワード
pin = "room-pin" # 参加時パスワード(必要なら)
sampling_rate = 48000 # or 16000
spatial_audio = true
audiolevel_ext = true
audiolevel_event = true
audio_active_packets = 100
audio_level_average = 25
record = false
# record_dir = "/var/recordings/"
# record_file = "room-1234.wav"
# allow_rtp_participants = false
# rtp_forward_* = ... # 外部RTP転送を使う場合のみ
}
</pre>
*** Systemd
**** janus.service
<pre>
[Unit]
Description=Janus WebRTC Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/janus -F /usr/local/etc/janus
Restart=on-failure
User=root
[Install]
WantedBy=multi-user.target
</pre>
*** Apache で HTTPS, WSS リバースプロキシ
- [[Virtual Host の設定>Apache/Configuration-2.4/VirtualH...
**** 仮想ホスト設定(WSS対応)
- [[certbot]] の設定
- [[conf.d/janus.conf>Apache/Configuration-2.4/VirtualHos...
** STUN/TURN([[coturn]])
*** 設定
- see [[coturn]]
** TEST
*** Janus の単体疎通テスト
**** REST (8088)
curl http://localhost:8088/janus/info
**** WS (8188)
printf '%s\n' '{"janus":"info","transaction":"t1"}' | we...
**** WSS
printf '%s\n' '{"janus":"info","transaction":"t1"}' | we...
*** Coturn の STUN/TURN 動作確認
- see [[coturn]]
*** Janus + Coturn 経由の WebRTC 動作確認
*** ICE 候補の種類を確認(ブラウザ DevTools)
** for OpenSimulator
*** OpenSim.ini
<pre>
[JanusVoice]
; …略…
IceServers = [
{"urls":["stun:stun.l.google.com:19302"]},
{"urls":["turn:janus.jogrid.net:3478"], "username":"<T...
{"urls":["turns:janus.jogrid.net:5349"], "username":"<...
]
</pre>
#br
#br
ページ名: