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.95k stars 1.52k forks source link

[Need Urgent Help] RTMP Relay of dynamic pull failure #139

Open Goaldaydayup opened 5 years ago

Goaldaydayup commented 5 years ago

Dear sir,

Please refer to the following log from my nms server. The ip address in log is dummy one and not a real one. But my test uses real ip.

User requested video (rtmp://47.52.118.150:1935/live/lmcdt011) can NOT be found in nms and is relayed to pull from source video (rtmp://119.19.118.15/live/lmcdt011) , but stream can not be found.

I have checked source video (rtmp://119.19.118.15/live/lmcdt011 ) that can be played via VLC player. But video relay in nms failed.

I have checked the following log and found that rtmp path seems not correct in following log line.

10/19/2018 23:54:53 1863 [INFO] [Relay dynamic pull] start TI0RWH68 rtmp://119.19.118.15//live/lmcdt011  to  rtmp://127.0.0.1:1935//live/lmcdt011

10/19/2018 23:54:53 1863 [INFO] [rtmp play] Stream not found. id=TI0RWH68 streamPath=/live/lmcdt011  streamId=1

Should be rtmp://119.19.118.15/live/lmcdt011 There is one more '/' in your log line, like this 'rtmp://119.19.118.15//live/lmcdt011'

So is it possible that steam is not found because path is not correct in your code ?

If this is a problem, please help to fix it to make rtmp relay of dynamic pull work. If this is not a problem, please let me know.

Thanks.

David

[root@rtmp Node-Media-Server]# node app.js
10/19/2018 23:54:38 1863 [INFO] Node Media Relay Server started
10/19/2018 23:54:38 1863 [INFO] Node Media Rtmp Server started on port: 1935
10/19/2018 23:54:38 1863 [INFO] Node Media Http Server started on port: 8000
10/19/2018 23:54:38 1863 [INFO] Node Media WebSocket Server started on port: 8000
10/19/2018 23:54:53 1863 [INFO] [rtmp connect] id=TI0RWH68 ip=::ffff:183.90.84.37 app=live args={"app":"live","flashVer":"LNX 9,0,124,2","tcUrl":"rtmp://47.52.118.150:1935/live","fpad":false,"capabilities":15,"audioCodecs":4071,"videoCodecs":252,"videoFunction":1}
10/19/2018 23:54:53 1863 [INFO] [Relay dynamic pull] start TI0RWH68 rtmp://119.19.118.15//live/lmcdt011  to  rtmp://127.0.0.1:1935//live/lmcdt011
10/19/2018 23:54:53 1863 [INFO] [rtmp play] Stream not found. id=TI0RWH68 streamPath=/live/lmcdt011  streamId=1
10/19/2018 23:54:54 1863 [INFO] [Relay end] id= TI0RWH68
chrisspiegl commented 4 years ago

Hello @Goaldaydayup , is your issue fixed? Please close the issue if so.

rkanani108 commented 3 years ago

Hi @Goaldaydayup / @chrisspiegl ,

I am facing the same issues as above, let me know if any fixes.

keerttttt commented 3 years ago

So, pretty late to the party, but i did find the problem: check the file node_relay_server.js replace line 129 containing this: conf.inPath = hasApp ?${conf.edge}/${stream}:${conf.edge}${streamPath}; to: conf.inPath = hasApp ?${conf.edge}/${stream}:${conf.edge};

Then, with me, it works :)