illuspas / Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH/MP4 Media Server
https://www.npmjs.com/package/node-media-server
MIT License
5.91k stars 1.51k forks source link

Dynamic and Static Pulling #468

Closed talk2dug closed 3 years ago

talk2dug commented 3 years ago

I am working on a project that will have hundreds of cameras and we need to auto populate the edge nodes. On the edge nodes we are creating a static pull and then the front edge nodes dynamicly pull those feeds and feed them to the user.

In a previous post I wrote that we are having issues with the cameras we have they are telling the player its sending 100 frames a sec. TO get around this we have to use a few switches in ffmpeg. My question is, is there a way to set these flags in the static pull section of the config?

-re -rtsp_transport tcp -i rtsp://admin:PASSWORD@${nodeIP}:554/cam/realmonitor?channel=1&subtype=1 -codec copy -f flv rtmp://127.0.0.1/streams/${nodeName}-camera1

illuspas commented 3 years ago

Whether this option is used in the configuration?

      rtsp_transport : 'tcp' 
relay: {
  ffmpeg: '/usr/local/bin/ffmpeg',
  tasks: [
    {
      app: 'cctv',
      mode: 'static',
      edge: 'rtsp://admin:admin888@192.168.0.149:554/ISAPI/streaming/channels/101',
      name: '0_149_101',
      rtsp_transport : 'tcp' 
    }
  ]
}
illuspas commented 3 years ago

Or maybe '-re' is not used here: https://github.com/illuspas/Node-Media-Server/blob/master/src/node_relay_session.js#L28