Welcome to the Media Server setup guide! Media Server is a robust streaming platform designed for seamless content broadcasting. Ideal for content creators, businesses, or individuals keen on sharing content globally, this guide will assist you in establishing your Media Server. Let's begin!
- 🐧 OS: Debian 10 or higher
- 🧠 RAM: Minimum of 512MB
- 🚀 CPU: At least 1 Core
For a hassle-free installation of Media Server using Ansible, visit the media-server-deploy repository.
Install necessary tools and Node.js:
apt update && apt install -y git curl nano xz-utils
curl -sL https://deb.nodesource.com/setup_15.x | bash -
apt install -y nodejs
Set up FFmpeg for media processing:
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/
Clone the repository and install dependencies:
cd ~ && git clone https://github.com/mediafoundation/mediaserver.git
cd mediaserver && npm i
- Rename
config.js.example
toconfig.js
. - Customize
config.js
with your settings.
Update the secret passphrase to secure your RTMP server:
nano config.js
const config = {
passphrase: "Your Secret Passphrase",
//...
}
After CDN integration, update Media Server's config with your new subdomain:
nano config.js
const config = {
//...
cdn_url: "https://cdn.example.com",
//...
}
To launch Media Server, navigate to its directory and run:
node app.js
Ensure proper setup by visiting your server's IP in a browser. You should see the Media Server homepage:
http://YOUR.IP.ADDRESS/
💡 Restart Media Server after configuration changes.
Delete a stream using:
curl -X "DELETE" http://admin:admin@localhost/api/streams/live/STREAM_NAME
Monitor streams and network usage via the admin panel:
http://YOUR.IP.ADDRESS:8080/admin
Set admin credentials in config.js
:
// mediaserver/config.js
//...
auth: {
api : true,
api_user: 'admin',
api_pass: 'admin',
},
//...
Media Server is based on illuspas' Node-Media-Server, a Node.js implementation of a RTMP/HTTP-FLV/WS-FLV/HLS/DASH Media Server, utilizing Arut's nginx RTMP Module.