ユーザ用ツール

サイト用ツール


サイドバー

最新の10件
一覧
webapp:galene

2020年末から開発されているビデオカンファレンスソフトウェア. Go製MITライセンス.

Galèneはエンドツーエンド暗号化はされない.サーバーで権限があればデータを覗き見ることが可能.

公式テストサーバ: https://galene.org:8443/

build

※要Go 1.13以降

$ git clone https://github.com/jech/galene
$ cd galene
$ CGO_ENABLED=0 go build -ldflags='-s -w'

cross build

linux/arm6向けにbuild(Raspberry Pi 1等)

$ GOARCH="arm" GOOS="linux" GOARM=6 CGO_ENABLED=0 go build -o galene_arm6_linux -ldflags='-s -w'

linux/arm7向けにbuild(Raspberry Pi 2等)

$ GOARCH="arm" GOOS="linux" GOARM=7 CGO_ENABLED=0 go build -o galene_arm7_linux -ldflags='-s -w'

linux/arm64向けにbuild(Raspberry Pi 2 model B 1.2〜 + 64bitOS等)

$ GOARCH="arm64" GOOS="linux" CGO_ENABLED=0 go build -o galene_arm64_linux -ldflags='-s -w'

※バイナリ以外に「static data groups」ディレクトリも必要.(groupsは下で作成している)
※Linux/mips, Windowsなどでも動作するらしい.

help

$ ./galene -h
Usage of ./galene:
  -cpuprofile file
        store CPU profile in file
  -data directory
        data directory (default "./data/")
  -groups directory
        group description directory (default "./groups/")
  -http address
        web server address (default ":8443")
  -insecure
        act as an HTTP server rather than HTTPS
  -mdns
        gather mDNS addresses
  -memprofile file
        store memory profile in file
  -mutexprofile file
        store mutex profile in file
  -recordings directory
        recordings directory (default "./recordings/")
  -relay-only
        require use of TURN relays for all media traffic
  -static directory
        web server root directory (default "./static/")
  -turn address
        built-in TURN server address ("" to disable) (default "auto")
  -udp-range range
        UDP port range

グループを設定

test というグループを作成するときの例

$ mksir groups
$ vi groups/test.json

groups/test.json

{
    "op": [{"username": "admin", "password": "1234"}],
    "presenter": [{}]
}

テスト

$ ./galene 

https://localhost:8443/

OR

https://GALENEIPADRESS:8443/

「Group: test」

20220617-192328.jpeg

  • Username: なんでも or andmin
  • Password: なんでも or 1234
  • Enable at start(Groupに入った後で変更可能)
    • Nothing → ROM
    • Microphone → マイク有効(カメラ無効)
    • Camera and microphone → カメラ,マイク有効

20220617-192439.jpeg

グループに参加した状態

20220617-193019.jpeg

右上の「︙(Setting)」からビデオやマイクの設定変更などが出来る.

  • Media Options
    • Camera: → off or 各種カメラ
    • Microphone: → off or 各種マイク
    • ✅ Mirror view
    • □ Blackboard mode (高解像度低fps)になる
    • ✅ Noise suppression
    • □ High-quality audio (音楽再生時など)

20220617-193233.jpeg

  • Other Settings
    • Filter: → none, Holizontal mirror, Virtical mirror
    • Send: → lowest, low, normal, unlimited
    • Simulcast: → off, auto, on(????)
    • Receive: → noting, audio only, screen share(low), screen share, everything(low), everything
    • □ Activity detection (????)

Activity detection はFirefoxでは動作しない

20220617-193350.jpeg

20220617-194722.jpeg

右上の「Disable」で一時的に離脱?(自分のカメラ,マイクともに無効になるが視聴は可能)
「Mute」でマイクミュート
「Share Screen」で画面共有.同時に複数画面の共有も複数人での画面共有も可能
※画面共有終了はブラウザ内の画面共有画面の☓で行う,ウェブブラウザの共有停止ボタンを押すとウェブブラウザが落ちた(Linux上のChromiumベースのBrave 1.39.122)
マイクOnでカメラだけをOffにしたい場合,Setting → Camera Off
※モバイルブラウザでは画面共有は動作しない

チャットウィンドウでの操作

/help: display this help
/leave: leave group
/msg user message: send a private message
/presentfile: broadcast a video or audio file
/raise: raise hand
/renegotiate: renegotiate media streams
/sendfile user: send a file (this will disclose your IP address)
/unraise: unraise hand
  • /leave グループを離れる
  • /msg プライベートメッセージを送信
  • /presentfile 動画音声ファイルのブロードキャスト再生,再生時にはマイクがミュートになる,手動でミュート解除が必要.再生終了してもミュートのままなので注意.
  • /raise 挙手(メンバーリストの○が🖐になる)
  • /renegotiate メディアストリームの再ネゴシエート
  • /sendfile 指定したユーザへのファイル送信
  • /unraise 手を下げる

いくつかの機能はメンバーリストからも操作できる

20220622-060726.jpeg

/helpに出てこないコマンド

  • /record 録画開始
  • /unrecord 録画終了

※録画には allow-recording の権限が必要,録画ファイルは recordings/グループ名/ 以下に保存される

$ ls -s recordings/test/
total 1924
  64 2022-06-19T00:07:38.797-jch.webm     4 2022-06-19T00:09:22.872-hoge.webm     4 2022-06-19T00:09:23.209-hoge.webm  1848 2022-06-19T00:09:27.458-hoge.webm     4 2022-06-19T00:10:03.374-jch.webm
  • /set resolution [1024, 768] 送信解像度の指定

※指定後ビデオの再起動(Disable/Enable)が必要

ファイアウォール設定

最低でも TCP: 8443 が必要

  • TCP: 8443, 1194
  • UDP: 1194, エフェメラルポート(or -udp-range range)

デブロイ

$ rsync -avcP galene static data groups galene@server.example.org:~

証明書をdata以下にコピー

ssh galene@server.example.org
sudo install -m 400 -o `id -u` -g `id -g`  /etc/letsencrypt/live/server.example.org/fullchain.pem data/cert.pem
sudo install -m 400 -o `id -u` -g `id -g` 
/etc/letsencrypt/live/server.example.org/privkey.pem data/key.pem

※証明書ファイルがない場合起動時に毎回自己証明書が作られる

グローバル設定ファイル

.data/config.json

{
    "canonicalHost": "galene.example.org",
    "admin":[{"username":"root","password":"secret"}]
}

NOTE: canonicalHost を間違えるとブラウザにキャッシュされてしまい面倒><

グループ設定

.groups/groupname.json

{
    "op": [{"username":"jch","password":"1234"}],
    "presenter": [{}],
    "allow-recording": true,
    "allow-anonymous": true,
    "allow-subgroups": true,
    "public": true,
    "displayName": "Galenサンプル",
    "contact": "galene@example.org",
    "comment": "コメント",
    "codecs": ["vp8", "opus"]
}

ユーザーの種類

  • op:: グループ管理者
  • presenter:: カメラやマイクを有効に出来る一般ユーザ
  • other:: 見聞きするだけのリスナー

詳細は README を参照のこと

Galeneを実行

$ ulimit -n 65536
$ nohup ./galene &

サーバーリソース

3接続,ビデオx2,画面共有x1でしばらく動かしているGalèneのメモリ状況

$ pmap -x  `pgrep galene` 
196679:   ./galene
Address           Kbytes     RSS   Dirty Mode  Mapping
0000000000400000    4932    4928       0 r-x-- galene
00000000008d1000    4760    4724       0 r---- galene
0000000000d77000     272     272      84 rw--- galene
0000000000dbb000     276     108     108 rw---   [ anon ]
000000c000000000   16384   13076   13076 rw---   [ anon ]
000000c001000000   10240    2008    2008 rw---   [ anon ]
000000c001a00000    2048       0       0 rw---   [ anon ]
000000c001c00000   36864       0       0 -----   [ anon ]
00007f5da6ef0000   40132   11096   11096 rw---   [ anon ]
00007f5da9621000  263680       0       0 -----   [ anon ]
00007f5db97a1000       4       4       4 rw---   [ anon ]
00007f5db97a2000  293564       0       0 -----   [ anon ]
00007f5dcb651000       4       4       4 rw---   [ anon ]
00007f5dcb652000   36692       0       0 -----   [ anon ]
00007f5dcda27000       4       4       4 rw---   [ anon ]
00007f5dcda28000    4580       0       0 -----   [ anon ]
00007f5dcdea1000       4       4       4 rw---   [ anon ]
00007f5dcdea2000     508       0       0 -----   [ anon ]
00007f5dcdf21000     384      44      44 rw---   [ anon ]
00007ffc949c7000     132      12      12 rw---   [ stack ]
00007ffc949f1000      16       0       0 r----   [ anon ]
00007ffc949f5000       8       4       0 r-x--   [ anon ]
---------------- ------- ------- ------- 
total kB          715488   36288   26444

20220621-223113.jpeg

5人前後で繋いでいたVPSでのリソース状況(17:00過ぎから)

20220621-223213.jpeg

関連ソフトウェア

代替フロントエンドのPyrite

  • Docker(Galène同梱)かnpx, npmで導入
    • 今回はDockerで試した
      • Disk 1.2GBほど必要footnote:[Dockerを使わないGalène単体は11MB程]
$ git clone https://github.com/garage44/pyrite
$ cd pyrite/docker
$ PYRITE_UID=`id -u` PYRITE_GID=`id -g` docker-compose up
$ xdg-open http://localhost:3030/
  • 見た目が今どき
  • i18n対応(今の所英/仏/独)や2種類のテーマがある
  • ビデオ,マイクの確認もしやすい
  • ユーザー,グループの管理がWebで出来るのが便利
  • node.js導入済みなら導入しても良さそう

Galène streaming gateway

OBS studioからローカルに配信してgalene-streamからGaleneに配信というのがよくある利用法だったと思うが,現在はOBS studioに仮想カメラ機能がついたのでそちらのほうが便利かもしれない.でもファイルやストリーミングをGaleneに配信するのに便利.

導入

$ sudo apt install python3-pip python3-gi python3-gi-cairo python3-websockets gir1.2-gst-plugins-bad-1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-nice
$ pip3 install --user galene-stream

help

$ galene-stream -h
usage: galene-stream [-h] [--debug] -i INPUT -o OUTPUT [-b BITRATE] -g GROUP -u USERNAME [-p PASSWORD]

Galène stream gateway.

optional arguments:
  -h, --help            show this help message and exit
  --debug               debug mode: show debug messages
  -i INPUT, --input INPUT
                        URI to use as GStreamer "uridecodebin" module input, e.g. "rtmp://localhost:1935/live/test"
  -o OUTPUT, --output OUTPUT
                        Galène server to connect to, e.g. "wss://galene.example.com/ws"
  -b BITRATE, --bitrate BITRATE
                        VP8 encoder bitrate in bit/s, you should adapt this to your network, default to 1048576
  -g GROUP, --group GROUP
                        Join this group
  -u USERNAME, --username USERNAME
                        Group username
  -p PASSWORD, --password PASSWORD
                        Group password

ローカルの udp://localhost:8888/galene.example.com:8443test グループに bot ユーザで転送

$ galene-stream --input "udp://localhost:8888" --output "wss://galene.example.com:8443/ws" --group test --username bot

ファイルをストリームする

$ galene-stream --debug --input "file:///mnt/home/matoken/Videos/HELLO.webm" --output "wss://galene.example.com:8443/ws" --group test --username bot

smg://〜 などもokだった

Tips

カメラの左右が切れてしまう

アスペクト比が合わなくて左右が切られてしまう場合.

テキストチャットで以下のコマンドで送信解像度を指定する.以下は640×320の場合.

/set resolution [640, 320]

この後,手動でビデオの再接続を行う.

Androidで画面共有をしたい

今の所Galèneはモバイルブラウザでは画面共有が出来ない.

Androidで画面をスクリーンキャストするアプリケーションはいくつかあるようなので,これとgalene-streamを組み合わせることでAndroidの画面をGalèneに流すことができそう(未検証)

Groupの設定を手で書きたくない

PHP製のGalène roomsや,

Nodejs製のGalène代替フロントエンドのPyriteにもグループ編集機能がある

apache httpdの後ろでGalèneを動かしてリバースプロキシで公開したい

<IfModule mod_ssl.c>

<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/meet

ErrorLog ${APACHE_LOG_DIR}/galene/error.log
CustomLog ${APACHE_LOG_DIR}/galene/access.log combined

ServerName galene.serveur.com
SSLCertificateFile /etc/letsencrypt/live/galene/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/galene/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://localhost:3000%{REQUEST_URI} [P]

SSLProxyEngine on

SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off

ProxyPassMatch ^/(ws)$  ws://localhost:3000/$1

あまり通信をしたくない

受信側は,Setting → Receive:で「audio only」で声だけ聞くようにしたり,「screen share (low)」で声と画面共有(低画質)を視聴するなど出来る.

送信側は,Setting → Camera → offでカメラをoffに出来る.カメラの画質はSend:で「lowest」や「low」にすることで帯域を節約できる.

日本語化(i18n)

未対応

Pyriteはi18nに対応して現在3ヶ国語に対応している

Stylusでも実現できる?

全員とファイルを共有したい

Galène以外の方法を使う

発表

関連url

コメント

コメントを入力. Wiki文法が有効です:
   ___    ____   ___    __    _  __
  / _ \  / __/  / _ \  / /   / |/ /
 / // / / _/   / , _/ / /__ /    / 
/____/ /___/  /_/|_| /____//_/|_/
 
webapp/galene.txt · 最終更新: 2022/06/22 21:38 by matoken