Skip to main content

WebRTC configuration

It uses efficient H.264 encoding to save bandwidth. Video is streamed via the WebRTC protocol, which you might have encountered when using Discord or Google Chat for video calls.

It is compatible with BliKVM v1, v2, v3, and all DIY devices based on the HDMI-CSI bridge.

You can switch video modes in the system menu of the Web UI. If you don't see the switch option, it might be because your browser does not support H.264 video.

When the KVM has multiple IP addresses (e.g., Ethernet and Wi‑Fi are both connected, or a VPN is active), H.264 video mode may fail due to an ICE error in a multi‑IP environment. You can fix this by restricting which network interface WebRTC uses.
  1. SSH into the KVM and run ifconfig to see interface names, for example:
root@blikvm(rw):~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.8 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::3609:81d9:30b1:858c prefixlen 64 scopeid 0x20<link>
inet6 2409:8a1e:7bd5:24a0:a75:9560:80e:7086 prefixlen 64 scopeid 0x0<global>
ether d8:3a:dd:26:a8:1d txqueuelen 1000 (Ethernet)
RX packets 31424 bytes 4853302 (4.6 MiB)
RX errors 0 dropped 4420 overruns 0 frame 0
TX packets 56486 bytes 59463233 (56.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1257 bytes 162450 (158.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1257 bytes 162450 (158.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1420
inet 10.0.0.2 netmask 255.255.255.255 destination 10.0.0.2
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 22796 bytes 3297976 (3.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 55462 bytes 57044224 (54.4 MiB)
TX errors 8 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.45 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2409:8a1e:7bd5:24a0:d82e:28b5:f282:3ce2 prefixlen 64 scopeid 0x0<global>
inet6 fe80::63b:12f1:44bd:24f2 prefixlen 64 scopeid 0x20<link>
ether d8:3a:dd:26:a8:1e txqueuelen 1000 (Ethernet)
RX packets 8506 bytes 516509 (504.4 KiB)
RX errors 0 dropped 4406 overruns 0 frame 0
TX packets 457 bytes 43843 (42.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  1. Run rw to remount the system read‑write, then edit nano /mnt/exec/release/lib/pi/janus_configs/janus.jcfg. Find the ice_ignore_list setting and configure it. In the example above the KVM has three interfaces; if you want WebRTC to use wg0, set:
ice_ignore_list = "eth0,wlan0"
  1. Restart the web service: systemctl restart kvmd-web.

How It Works

MJPEG video is streamed via an HTTP connection similar to fetching the Web UI. This means for remote access, you only need to forward ports 80 and 443 on your router (if it has a public external IP address).

In contrast, WebRTC is a completely different video transmission method. It uses P2P connections and UDP. This reduces network load but makes the connection more complex—BliKVM needs to understand your network configuration to use it correctly: public IP, NAT type, etc.

To achieve this, BliKVM checks which network interface is used for the default gateway and tries to find out your external IP address using Google's STUN server.

Choosing Google's STUN server is for reliability reasons.

If you don't want to use it, you can choose any other public STUN server or set up your own server. If you find that you can't get an image under public network, please check the configuration below:

Edit /opt/janus/etc/janus/janus.jcfg (example):

stun_server = "stun1.l.google.com"
stun_port = 19302

Then restart the entire service using systemctl restart kvmd-web.