[mirotalksfu] - update readme

هذا الالتزام موجود في:
Miroslav Pejic
2023-10-15 22:07:52 +02:00
الأصل 4e58a07a3b
التزام a2b521b6f2
3 ملفات معدلة مع 69 إضافات و381 حذوفات

129
README.md
عرض الملف

@@ -1,11 +1,11 @@
# <p align="center">MiroTalk SFU</p>
<p align="center">Free WebRTC - SFU - Simple, Secure, Scalable Real-Time Video Conferences Up to 4k, compatible with all browsers and platforms.</p>
<p align="center">Free WebRTC - SFU - Simple, Secure, Scalable Real-Time Video Conferences with support for up to 4k resolution. It's compatible with all major browsers and platforms</p>
<hr />
<p align="center">
<a href="https://sfu.mirotalk.com/">sfu.mirotalk.com</a>
<a href="https://sfu.mirotalk.com/">Explore MiroTalk SFU</a>
</p>
<hr />
@@ -19,7 +19,7 @@
<hr />
<p align="center">
For questions, discussions, help & support, join with us on <a href="https://discord.gg/rgGYfeYW3N">discord</a>
Join our community for questions, discussions, and support on <a href="https://discord.gg/rgGYfeYW3N">Discord</a>
</p>
<hr />
@@ -29,43 +29,45 @@
<br/>
- Is `100% Free` - `Open Source` - `Self Hosted` and [PWA](https://en.wikipedia.org/wiki/Progressive_web_application)!
- No download, plug-in or login required, entirely browser-based.
- Unlimited number of conference rooms, without call time limitation.
- Desktop and Mobile compatible.
- Translated in 133 languages.
- Optimized Room URL Sharing for mobile.
- Possibility to Password protect the Room for the meeting.
- Lobby mode lets you protect your meeting by only allowing people to enter after a formal approval by a moderator.
- Webcam Streaming up to 4K quality (Front - Rear for mobile).
- Echo cancellation and noise suppression that makes your audio crystal clear.
- Screen Sharing to present documents, slides, and more ...
- File Sharing (with drag-and-drop), share any files to your participants in the room.
- Take a snapshot from the video frame(screen/cam) to save it as an image on your device.
- Chat with Emoji Picker to show you feeling, private messages, Markdown support, possibility to Save the conversations, and many more.
- ChatGPT (openAI), designed to answer users' questions, provide relevant information, and connect them with relevant resources.
- Is `100% Free` - `Open Source (AGPLv3)` - `Self Hosted` and [PWA](https://en.wikipedia.org/wiki/Progressive_web_application)!
- Unlimited conference rooms with no time limitations.
- Translated into 133 languages.
- Host protection to prevent unauthorized access.
- Room password protection.
- Compatible with desktop and mobile devices.
- Optimized mobile room URL sharing.
- Webcam streaming with front and rear camera support for mobile devices.
- Crystal-clear audio streaming with speaking detection and volume indicators.
- Screen sharing for presentations.
- File sharing with drag-and-drop support.
- Choose your audio input, output, and video source.
- Supports video quality up to 4K.
- Supports advance Picture-in-Picture (PiP) offering a more streamlined and flexible viewing experience.
- Record your screen, audio, and video.
- Snapshot video frames and save them as PNG images.
- Chat with an Emoji Picker for expressing feelings, private messages, Markdown support, and conversation saving.
- ChatGPT (powered by OpenAI) for answering questions, providing information, and connecting users to relevant resources.
- Speech recognition, execute the app features simply with your voice.
- Push to talk, like a walkie-talkie.
- Advance collaborative whiteboard for the teachers.
- Select Microphone - Speaker and Video source.
- Recording your Screen, Audio, or Video.
- Share any YouTube video in real-time to your participants.
- Share any mp4, webm, ogg video in real-time to your participants with possibility to download it.
- Full-Screen Mode on mouse click on the Video element, Zoom In/Out on video mouse wheel.
- Possibility to Change UI Themes.
- Possibility to protect your Host with username and password (default disabled).
- Push-to-talk functionality, similar to a walkie-talkie.
- Advanced collaborative whiteboard for teachers.
- Real-time sharing of YouTube embed videos, video files (MP4, WebM, OGG), and audio files (MP3).
- Full-screen mode with one-click video element zooming and pin/unpin.
- Customizable UI themes.
- Right-click options on video elements for additional controls.
- Supports [REST API](app/api/README.md) (Application Programming Interface).
- [Slack](https://api.slack.com/apps/) API integration.
- [Sentry](https://sentry.io/) for error reporting.
- Integration with [Slack](https://api.slack.com/apps/) for enhanced communication.
- Utilizes [Sentry](https://sentry.io/) for error reporting.
- And much more...
</details>
<details>
<summary>About</summary>
- [Presentation](https://www.canva.com/design/DAE693uLOIU/view)
<br>
- [Video](https://www.youtube.com/watch?v=_IVn2aINYww)
- [Presentation](https://www.canva.com/design/DAE693uLOIU/view)
- [Video Overview](https://www.youtube.com/watch?v=_IVn2aINYww)
</details>
@@ -74,18 +76,18 @@
<br/>
- You can `join` directly to `room` by going to
- You can `directly join a room` by using link like:
- https://sfu.mirotalk.com/join?room=test&password=0&name=mirotalksfu&audio=0&video=0&screen=0&notify=0
| Params | Type | Description |
| -------- | -------------- | --------------- |
| room | string | room Id |
| password | string/boolean | room password |
| name | string | user name |
| audio | boolean | audio stream |
| video | boolean | video stream |
| screen | boolean | screen stream |
| notify | boolean | welcome message |
| room | string | Room Id |
| password | string/boolean | Room password |
| name | string | User name |
| audio | boolean | Audio stream |
| video | boolean | Video stream |
| screen | boolean | Screen stream |
| notify | boolean | Welcome message |
> **Note**
>
@@ -103,7 +105,7 @@
<br/>
Embedding a meeting into a service or app using an iframe.
To embed a meeting in `your service or app` using an iframe, use the following code:
```html
<iframe
@@ -120,7 +122,7 @@ Embedding a meeting into a service or app using an iframe.
<br/>
- You will need to have `NodeJS` and all [requirements](https://mediasoup.org/documentation/v3/mediasoup/installation/#requirements) installed, this project has been tested with Node version [16.X](https://nodejs.org/en/blog/release/v16.15.1/) and [18.X](https://nodejs.org/en/blog/release/v18.16.0).
- Before running MiroTalk SFU, ensure you have `Node.js` and all [requirements](https://mediasoup.org/documentation/v3/mediasoup/installation/#requirements) installed. This project has been tested with Node version [16.X](https://nodejs.org/en/blog/release/v16.15.1/) and [18.X](https://nodejs.org/en/download).
- Requirements install example for `Ubuntu 20.04`
@@ -158,7 +160,7 @@ $ npm start
$ PORT=3011 npm start
```
- Open in browser https://localhost:3010 or `:3011` if default port changed.
- Open [https://localhost:3010](https://localhost:3010) or `:3011` if the default port has been changed in your browser.
<br/>
@@ -174,8 +176,8 @@ $ PORT=3011 npm start
![docker](public/images/docker.png)
- Install [docker engine](https://docs.docker.com/engine/install/)
- Install [docker compose](https://docs.docker.com/compose/install/)
- Repository [docker hub](https://hub.docker.com/r/mirotalk/sfu)
- Install [docker engine](https://docs.docker.com/engine/install/) and [docker compose](https://docs.docker.com/compose/install/)
```bash
# Copy app/src/config.template.js in app/src/config.js IMPORTANT (edit it according to your needs)
@@ -190,8 +192,7 @@ $ docker-compose up # -d
$ docker-compose down
```
- Open in browser https://localhost:3010
- Repository [docker hub](https://hub.docker.com/r/mirotalk/sfu)
- Open [https://localhost:3010](https://localhost:3010) in your browser.
</details>
@@ -200,7 +201,7 @@ $ docker-compose down
<br/>
You can start videoconferencing directly from your Local PC, and be reachable from any device outside your network, simply by following [these documentation](docs/ngrok.md).
You can start a video conference directly from your local PC and make it accessible from any device outside your network by following [these instructions](docs/ngrok.md), or expose it directly on [HTTPS](app/ssl/README.md).
</details>
@@ -209,16 +210,7 @@ You can start videoconferencing directly from your Local PC, and be reachable fr
<br/>
To `Self-Host MiroTalk SFU` on `Your` dedicated `Server`, read [this documentation](docs/self-hosting.md).
</details>
<details>
<summary>Notes</summary>
<br/>
- Run the project on a `Linux or Mac` system as the `mediasoup` installation could have issues on `Windows`.
For `self-hosting MiroTalk SFU` on your own dedicated server, please refer to [this comprehensive guide](docs/self-hosting.md). It will provide you with all the necessary instructions to get your MiroTalk SFU instance up and running smoothly.
</details>
@@ -227,7 +219,7 @@ To `Self-Host MiroTalk SFU` on `Your` dedicated `Server`, read [this documentati
<br/>
- The API documentation uses [swagger](https://swagger.io/) at https://localhost:3010/api/v1/docs or check it on live [here](https://sfu.mirotalk.com/api/v1/docs).
- The [API documentation](https://docs.mirotalk.com/mirotalk-sfu/api/) uses [swagger](https://swagger.io/) at https://localhost:3010/api/v1/docs or check it on live [here](https://sfu.mirotalk.com/api/v1/docs).
```bash
# The response will give you a entrypoint / Room URL for your meeting.
@@ -255,7 +247,7 @@ Use [my personal link](https://hetzner.cloud/?ref=XdRifCzCK3bn) to receive `€
---
If you need help to deploy `MiroTalk SFU` instance on `your dedicated cloud server`, or for other needs, don't hesitate to contact us at sfu.mirotalk@gmail.com
To set up your own instance of `MiroTalk SFU` on a dedicated cloud server, please refer to our comprehensive [self-hosting documentation](https://docs.mirotalk.com/mirotalk-sfu/self-hosting/). This guide will walk you through the process step by step, ensuring a smooth and successful deployment.
</details>
@@ -268,8 +260,6 @@ If you need help to deploy `MiroTalk SFU` instance on `your dedicated cloud serv
For personal use, you can start with a single $5 a month cloud server and scale up as needed. You can use [this link](https://m.do.co/c/1070207afbb1) to get a `$100 credit for the first 60 days`.
If you need help to deploy `MiroTalk SFU` instance on `your dedicated cloud server`, or for other needs, don't hesitate to contact us at sfu.mirotalk@gmail.com
</details>
<details>
@@ -313,9 +303,9 @@ https://sfu.mirotalk.com
[![AGPLv3](public/images/AGPLv3.png)](LICENSE)
MiroTalk is free and can be modified and forked. But the conditions of the AGPLv3 (GNU Affero General Public License v3.0) need to be respected. In particular modifications need to be free as well and made available to the public. Get a quick overview of the license at [Choose an open source license](https://choosealicense.com/licenses/agpl-3.0/).
MiroTalk SFU is free and open-source under the terms of AGPLv3 (GNU Affero General Public License v3.0). Please `respect the license conditions`, In particular `modifications need to be free as well and made available to the public`. Get a quick overview of the license at [Choose an open source license](https://choosealicense.com/licenses/agpl-3.0/).
For a MiroTalk license under conditions other than AGPLv3, please contact us at license.mirotalk@gmail.com or [purchase directly from CodeCanyon](https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970).
To obtain a [MiroTalk SFU license](https://docs.mirotalk.com/license/licensing-options/) with terms different from the AGPLv3, you can conveniently make your [purchase on CodeCanyon](https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970). This allows you to tailor the licensing conditions to better suit your specific requirements.
</details>
@@ -324,9 +314,7 @@ For a MiroTalk license under conditions other than AGPLv3, please contact us at
<br/>
Do you find MiroTalk useful?
Support the project by [becoming a backer or sponsor](https://github.com/sponsors/miroslavpejic85). Your logo will show up here with a link to your website.
Do you find MiroTalk SFU indispensable for your needs? Join us in supporting this transformative project by [becoming a backer or sponsor](https://github.com/sponsors/miroslavpejic85). By doing so, not only will your logo prominently feature here, but you'll also drive the growth and sustainability of MiroTalk SFU. Your support is vital in ensuring that this valuable platform continues to thrive and remain accessible for all. Make an impact back MiroTalk SFU today and be part of this exciting journey!
| | |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
@@ -356,6 +344,15 @@ Try also [MiroTalk C2C](https://github.com/miroslavpejic85/mirotalkc2c) cam 2 ca
</details>
<details>
<summary>MiroTalk BRO</summary>
<br>
Try also [MiroTalk BRO](https://github.com/miroslavpejic85/mirotalkbro) live broadcasting.
</details>
<details>
<summary>MiroTalk WEB</summary>

عرض الملف

@@ -1,44 +1,11 @@
# MiroTalk SFU - Ngrok
![ngrok](../public/images/ngrok.png)
#### What is the purpose and functionality of Ngrok?
If you want to expose MiroTalk SFU from your `Local PC` to outside in `HTTPS`, you need to do 2 things:
https://docs.mirotalk.com/ngrok/ngrok/
1. Add the [Ngrok](https://ngrok.com) `authToken` and change the `announcedIp` on `app/src/config.js`.
#### How to exposing MiroTalk SFU with Ngrok?
```js
/*
Ngrok
1. Goto https://ngrok.com
2. Get started for free
3. Copy YourNgrokAuthToken: https://dashboard.ngrok.com/get-started/your-authtoken
*/
ngrokAuthToken: 'YourNgrokAuthToken', <--- put it here
announcedIp: 'Your-Public-Static-IPv4-here' <--- take it from https://api.ipify.org If empty '' will be auto detected.
```
https://docs.mirotalk.com/mirotalk-sfu/ngrok/
---
2. You need to do a `port forwarding` on your router, something like this:
| Name | Protocol | Port Wan | Port Lan | IP Destination |
| ------------- | --------- | ----------- | ----------- | ----------------- |
| `MiroTalkSfu` | `TCP/UDP` | 40000:40100 | 40000:40100 | `Your Local IPv4` |
| `MiroTalkSfu` | `TCP` | 3010 | 3010 | `Your Local IPv4` |
Make sure your firewall not blocking rtcPorts `range: 40000:40100`
Then, when you run it with `npm start`, you should see in the console log this line
```bash
server_tunnel: 'https://xxxxxxxxxxxxxxxxxx.ngrok.io'
```
So open it in your browser, join in the room, share it to whom you want and wait participants to join.
---
## Support
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/mirotalk/mirotalk-sfu-free-video-calls-messaging-screen-sharing-recording)

عرض الملف

@@ -1,283 +1,7 @@
# MiroTalk SFU - Self Hosting
## Requirements
#### How can I self-host MiroTalk SFU on my own server?
- Recommended: [Hetzner](https://www.hetzner.com/cloud) (`CPX11` it's enough, OS: `Ubuntu 20.04 LTS / 22.04.1 LTS`).
- Use [my personal link](https://hetzner.cloud/?ref=XdRifCzCK3bn) to receive `€20 in cloud credits`.
- [Node.js](https://nodejs.org/en/) at least `16.15.1 LTS` & npm
- Your domain name, example: `your.domain.name`
- Set a DNS A record for that domain that point to Your Server public IPv4
> DNS A Record: The Address Mapping record (or DNS host record) stores a hostname and its corresponding IPv4 address. When users search for your website, the A record redirects this traffic from the web address (xxxxx.com human-readable domain) to the IPv4 address.
https://docs.mirotalk.com/mirotalk-sfu/self-hosting/
---
Install the requirements (Note: Many of the installation steps require `root` or `sudo` access)
```bash
# Gcc g++ make
$ apt-get update
$ apt-get install -y build-essential
# Python 3.8 and pip
$ DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
$ apt install -y software-properties-common
$ add-apt-repository -y ppa:deadsnakes/ppa
$ apt update
$ apt install -y python3.8 python3-pip
# NodeJS 18.X and npm
$ apt install -y curl dirmngr apt-transport-https lsb-release ca-certificates
$ curl -sL https://deb.nodesource.com/setup_18.x | bash -
$ apt-get install -y nodejs
$ npm install -g npm@latest
```
---
## Quick start
```bash
# Clone this repo
$ git clone https://github.com/miroslavpejic85/mirotalksfu.git
# Go to to dir mirotalksfu
$ cd mirotalksfu
# Copy app/src/config.template.js in app/src/config.js
$ cp app/src/config.template.js app/src/config.js
```
---
Change the `announcedIp` with your `Server public IPv4` on `app/src/config.js`
```js
{
ip: '0.0.0.0',
announcedIp: 'Server Public IPv4', // 'xx.xxx.xxx.xx'
}
```
Set the `inbound rules` if you have the Firewall enabled
| Port range | Protocol | Source | Description |
| ----------- | -------- | --------- | ------------------- |
| 3010 | TCP | 0.0.0.0/0 | App listen on tcp |
| 40000-40100 | TCP | 0.0.0.0/0 | RTC port ranges tcp |
| 40000-40100 | UDP | 0.0.0.0/0 | RTC port ranges udp |
```bash
# Check the firewall Status: (active/inactive)
ufw status
# If active then allow traffic
ufw allow 3010/tcp
ufw allow 40000:40100/tcp
ufw allow 40000:40100/udp
# ssh, http, https, nginx...
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
```
---
```bash
# Install dependencies - be patient, the first time will take a few minutes, in the meantime have a good coffee ;)
$ npm install
# Start the server
$ npm start
```
Check if is correctly installed: https://your.domain.name:3010
---
## PM2
![pm2](../public/images/pm2.png)
Using [PM2](https://pm2.keymetrics.io) to run it as daemon
```bash
$ npm install -g pm2
$ pm2 start app/src/Server.js
$ pm2 save
$ pm2 startup
```
---
## Docker
![docker](../public/images/docker.png)
If you want to use `Docker`
Repo: https://hub.docker.com/r/mirotalk/sfu
```bash
# Install docker and docker-compose
$ sudo apt install docker.io
$ sudo apt install docker-compose
# Copy app/src/config.template.js in app/src/config.js IMPORTANT (edit it according to your needs)
$ cp app/src/config.template.js app/src/config.js
# Copy docker-compose.template.yml in docker-compose.yml and edit it if needed
$ cp docker-compose.template.yml docker-compose.yml
# Get official image from Docker Hub
$ docker pull mirotalk/sfu:latest
# Create and start containers as deamon
$ docker-compose up -d
```
Check if is correctly installed: https://your.domain.name:3010
---
## Nginx & Certbot
![nginx](../public/images/nginx.png)
In order to use it without the port number at the end, and to have encrypted communications, we going to install [nginx](https://www.nginx.com) and [certbot](https://certbot.eff.org)
```bash
# Install Nginx
$ sudo apt-get install nginx
# Install Certbot (SSL certificates)
$ sudo apt install snapd
$ sudo snap install core; sudo snap refresh core
$ sudo snap install --classic certbot
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Setup Nginx sites
$ sudo vim /etc/nginx/sites-enabled/default
```
Paste this:
```bash
# HTTP — redirect all traffic to HTTPS
server {
if ($host = your.domain.name) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80 ;
server_name your.domain.name;
return 404;
}
```
```bash
# Check if all configured correctly
$ sudo nginx -t
# Active https for your domain name (follow the instruction)
$ sudo certbot certonly --nginx
# Add let's encrypt part on nginx config
$ sudo vim /etc/nginx/sites-enabled/default
```
Paste this:
```bash
# MiroTalk SFU - HTTPS — proxy all requests to the Node app
server {
# Enable HTTP/2
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name your.domain.name;
# Use the Lets Encrypt certificates
ssl_certificate /etc/letsencrypt/live/your.domain.name/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your.domain.name/privkey.pem;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://localhost:3010/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
```
```bash
# Check if all configured correctly
$ sudo nginx -t
# Restart nginx
$ service nginx restart
$ service nginx status
# Auto renew SSL certificate
$ sudo certbot renew --dry-run
# Show certificates
$ sudo certbot certificates
```
Check Your MiroTalk SFU instance: https://your.domain.name/
---
## Update script
In order to have always Your MiroTalk SFU updated to latest, we going to create a script
```bash
cd
# Create a file sfuUpdate.sh
$ vim sfuUpdate.sh
```
---
If you use `PM2`, paste this:
```bash
#!/bin/bash
cd mirotalksfu
git pull
pm2 stop app/src/Server.js
sudo npm install
pm2 start app/src/Server.js
```
---
If you use `Docker`, paste this:
```bash
#!/bin/bash
cd mirotalksfu
git pull
docker pull mirotalk/sfu:latest
docker-compose up -d
docker images |grep '<none>' |awk '{print $3}' |xargs docker rmi
```
---
Make the script executable
```bash
$ chmod +x sfuUpdate.sh
```
Follow the commits of the MiroTalk SFU project [here](https://github.com/miroslavpejic85/mirotalksfu/commits/main)
To update your instance of MiroTalk SFU at latest commit, execute:
```bash
./sfuUpdate.sh
```
---
## Support
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/mirotalk/mirotalk-sfu-free-video-calls-messaging-screen-sharing-recording)