nodejs创建rtmp-streamer服务器

田易安
2023-12-01

http://www.nodemedia.cn/products/node-media-server/ 文档说的是明明白白的
https://www.npmjs.com/package/node-media-server npm上说的也是明明白白的

npm install node-media-server
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();
 类似资料: