Stylish MediaMTX wrapper and chatbox with freehand drawings
Find a file
2026-01-04 21:52:59 +00:00
config ikasti 2026-01-04 21:08:03 +00:00
font ikasti 2026-01-04 21:08:03 +00:00
img ikasti 2026-01-04 21:08:03 +00:00
inc fix error migrating to config system 2026-01-04 21:52:59 +00:00
sound ikasti 2026-01-04 21:08:03 +00:00
.gitignore ikasti 2026-01-04 21:08:03 +00:00
___FALLBACK.jpg ikasti 2026-01-04 21:08:03 +00:00
base.js ikasti 2026-01-04 21:08:03 +00:00
checkAdmin.php ikasti 2026-01-04 21:08:03 +00:00
checkName.php ikasti 2026-01-04 21:08:03 +00:00
hsluv.min.js ikasti 2026-01-04 21:08:03 +00:00
markOnline.php ikasti 2026-01-04 21:08:03 +00:00
README.md fix error migrating to config system 2026-01-04 21:52:59 +00:00
sendChatMessage.php ikasti 2026-01-04 21:08:03 +00:00
setStreamInfo.php ikasti 2026-01-04 21:08:03 +00:00
stream.js ikasti 2026-01-04 21:08:03 +00:00
streamInfo.php ikasti 2026-01-04 21:08:03 +00:00
streamList.php ikasti 2026-01-04 21:08:03 +00:00
watch.css ikasti 2026-01-04 21:08:03 +00:00
watch.php ikasti 2026-01-04 21:08:03 +00:00

ikasti

ikasti is a stylish wrapper around a WebRTC-only MediaMTX installation, that adds basic stream management, viewer numbers and discovery, and rich chat with both messages and freehand drawings (à la PictoChat).

ikasti is a hobby project written in a "stream of consciousness" style and not meant as a production product, so please use it with caution. It may cast your lunch money into the deep sea, where it will be spent on colorful squid-shaped cushions.

Setup

  1. Make sure you have the PHP extensions mbstring and yaml.
  2. Make sure you already have a working, reachable MediaMTX WebRTC installation.
  3. Place ikasti somewhere where you are able to serve it.
  4. Move /config/config.example.php to /config/config.php. See default-config.php to see what you can change, but the most important ones are mediamtx_endpoint, mediamtx_config and staff_key.
  5. Set up nginx or whatever server you like. It should redirect requests like /beans/ to /watch.php?id=beans

Example

My MediaMTX setup lives in /var/mediamtx, and the ikasti setup lives in /var/mediamtx/viewer. MediaMTX is at mtx.ikg.sh, and ikasti at s.ikg.sh.

Here's my nginx setup to match it:

# mtx.ikg.sh -> mediamtx
server {
	server_name mtx.ikg.sh;
	listen 443 ssl;

	ssl_certificate /etc/letsencrypt/live/ikg.sh/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/ikg.sh/privkey.pem;

	location / {
        proxy_pass http://127.0.0.1:24152/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto http;
        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;

        client_max_body_size 1G;
    }
}

# s.ikg.sh
server {
	listen 443 ssl;
	root /var/mediamtx/viewer;

	ssl_certificate /etc/letsencrypt/live/ikg.sh/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/ikg.sh/privkey.pem;

	index index.php index.html;

	server_name s.ikg.sh;

	error_page 404 /___FALLBACK.jpg;

    rewrite ^/streamshots/([^\/.]+)(\..+)?$ /snapshots/$1.jpg? last;
    rewrite ^/([^\/.]+)/?$ /watch.php?id=$1? last;

    location ~ /\. { internal; }

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
	}
}