Welcome to the Media Server setup guide! Media Server is a powerful streaming platform that allows you to broadcast content seamlessly. Whether you're a content creator, a business, or just someone looking to share content with the world, this guide will help you get started with setting up your very own Media Server. Let's dive in!
- 🐧 OS: Debian 10+
- 🧠 RAM: 512MB
- 🚀 CPU: 1 Core
apt update && apt install -y git curl nano xz-utils
curl -sL https://deb.nodesource.com/setup_15.x | bash -
apt install -y nodejs
cd /tmp && rm -r ffmpeg*
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xvf ffmpeg-release-amd64-static.tar.xz
cd ffmpeg-* && mv ffmpeg ffprobe /usr/bin/
cd ~ && git clone https://github.com/mediafoundation/mediaserver.git
cd mediaserver && npm i
Navigate to the Media Server directory and start it up:
node app.js
Visit your server's IP in a browser. If everything's set up right, you'll see the Media Server homepage:
http://YOUR.IP.ADDRESS/
Protect your RTMP server by updating the default secret passphrase:
nano config.js
const config = {
passphrase: "Your Secret Passphrase",
//...
}
To scale up your streaming platform for millions of users and make it available through a powerful and decentralized CDN, add your server as a resource on Media Network via the Media Network App.
Follow this tutorial using your server IP address.
After adding your origin server IP address to Media Network, a new random subdomain will be assigned to you. Update the config file of your Media Server with this domain:
nano config.js
const config = {
//...
cdn_url: "https://Resource_ID.medianetwork.cloud",
//...
}
💡 Remember to restart your Media Server after editing the configuration to apply changes.
curl -X "DELETE" http://admin:admin@localhost/api/streams/live/STREAM_NAME
Access the built-in admin panel to monitor streams and network usage:
http://YOUR.IP.ADDRESS:8080/admin
Set up your admin credentials:
// mediaserver/config.js
//...
auth: {
api : true,
api_user: 'admin',
api_pass: 'admin',
},
//...
Media Server is a fork of illuspas' Node-Media-Server, a Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH Media Server based on Arut's nginx RTMP Module.