MiroTalk RTMP Servers
We introduced two types of RTMP (Real-Time Messaging Protocol) servers: Node Media Server and Nginx RTMP. These servers handle streaming media efficiently, making them suitable for applications like MiroTalk SFU (Selective Forwarding Unit).
Prerequisites
$ sudo apt update
# Install docker
$ sudo apt install -y docker.io
# Instal docker-compose
$ sudo apt install -y docker-compose
# Install ffmpeg
$ sudo apt install -y ffmpeg
Node Media Server
Node Media Server uses Node.js to handle RTMP streaming efficiently, suitable for applications like MiroTalk SFU.
Setup Instructions
-
Navigate to Server Directory:
-
Configure Server:
-
Set Up Docker:
-
Manage Server:
-
Admin dashboard:
https://your-domain-name:8043/admin
Api server:https://your-domain-name:8043/api/server
Api streams:https://your-domain-name:8043/api/streams
Nginx RTMP
Nginx RTMP adds RTMP streaming support to the Nginx web server and reverse proxy.
Setup Instructions
-
Navigate to Server Directory:
-
Set Up Docker:
-
Manage Server:
-
Check stat::
https://your-domain-name:1935/stat
Demo Projects
Explore our 2 demo projects designed to test your RTMP capabilities:
client-server-axios
- Method: POST
- Description: This project utilizes Axios for communication.
client-server-socket
- Technology: socket.io
- Description: This project uses socket.io for real-time communication.
Feel free to try them out and see how they work with your RTMP setup!
Using OBS with RTMP Server
To stream from OBS (Open Broadcaster Software) to an MiroTalk RTMP server:
Configure Stream Settings:
- Go to Settings.
- Select Stream.
- Set Service to Custom....
- Enter Server as
rtmp://your-domain-name:1935/live
. - Use a unique Stream key, e.g.,
something-random
.
Start Streaming:
- Start streaming from OBS.
- Share your RTMP URL:
rtmp://your-domain-name:1935/live/something-random
.
Note
If your Node Media Server
has authentication enabled with the following settings:
auth: {
play: true, // Require authentication for playing streams
publish: true, // Require authentication for publishing streams
secret: 'mirotalkRtmpSecret' // Secret key used for generating a valid RTMP URL
},
You need to generate a valid RTMP URL using the sign.js
script. Follow these steps:
-
Run the
sign.js
script to generate a valid RTMP URL: -
The generated URL will look like this:
Replace your-domain-name
, something-random
, and xxxxxx-xxxxxxxxxxxxxxxxxxxxxx
with the appropriate values.