node media server installation

  docker, nodejs

https://www.npmjs.com/package/node-media-server

mkdir nms
cd nms
npm install node-media-server
nano app.js

const NodeMediaServer = require(‘node-media-server’);

const config = {
rtmp: {
port: 1935,
chunk_size: 60000,
gop_cache: true,
ping: 30,
ping_timeout: 60
},
http: {
port: 8000,
allow_origin: ‘*’
}
};

var nms = new NodeMediaServer(config)
nms.run();

 

node app.js


docker container

docker pull illuspas/node-media-server

docker run --name nms -d -p 1935:1935 -p 8000:8000 illuspas/node-media-server