Open jeroen13 opened 4 years ago
I'm trying to relay my hikvision ipcam RTSP stream.
I can't get the node js code to work. The RTSP stream from the camera is fine from VLC.
Console loop: node nms.js 2019-9-24 20:08:15 18168 [INFO] Node Media Server v2.1.3 2019-9-24 20:08:15 18168 [INFO] Node Media Rtmp Server started on port: 1935 2019-9-24 20:08:15 18168 [INFO] Node Media Http Server started on port: 8001 2019-9-24 20:08:15 18168 [INFO] Node Media WebSocket Server started on port: 8001 2019-9-24 20:08:15 18168 [INFO] Node Media Relay Server started 2019-9-24 20:08:16 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:16 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:17 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:17 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:18 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:18 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:19 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:19 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:20 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:20 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:21 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:21 18168 [INFO] [Relay end] id= 0
node nms.js 2019-9-24 20:08:15 18168 [INFO] Node Media Server v2.1.3 2019-9-24 20:08:15 18168 [INFO] Node Media Rtmp Server started on port: 1935 2019-9-24 20:08:15 18168 [INFO] Node Media Http Server started on port: 8001 2019-9-24 20:08:15 18168 [INFO] Node Media WebSocket Server started on port: 8001 2019-9-24 20:08:15 18168 [INFO] Node Media Relay Server started 2019-9-24 20:08:16 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:16 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:17 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:17 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:18 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:18 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:19 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:19 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:20 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:20 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:21 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:21 18168 [INFO] [Relay end] id= 0
My code:
`const NodeMediaServer = require('node-media-server');
const config = { logType: 3,
rtmp: { port: 1935, chunk_size: 60000, gop_cache: false, ping: 10000, ping_timeout: 100000 }, http: { port: 8001, allow_origin: '*' }, relay: { ffmpeg: 'C:/Users/jeroe/Documents/Saxion/Development/HikPTZ/node_modules/rtsp-ffmpeg/lib/ffmpeg.exe', tasks: [ { app: 'ptz', mode: 'static', edge: 'rtsp://192.168.2.65:554/Streaming/Channels/101', name: 'main', rtsp_transport : 'tcp' //['udp', 'tcp', 'udp_multicast', 'http'] } ] } };
var nms = new NodeMediaServer(config); nms.run();`
I cant figure out what is wrong.
Same problem, have you found a solution?
Hi @Leafve666,
No I did not find a solution using Node Media Server. I ended up using live555ProxyServer for my purpose.
I'm trying to relay my hikvision ipcam RTSP stream.
I can't get the node js code to work. The RTSP stream from the camera is fine from VLC.
Console loop:
node nms.js 2019-9-24 20:08:15 18168 [INFO] Node Media Server v2.1.3 2019-9-24 20:08:15 18168 [INFO] Node Media Rtmp Server started on port: 1935 2019-9-24 20:08:15 18168 [INFO] Node Media Http Server started on port: 8001 2019-9-24 20:08:15 18168 [INFO] Node Media WebSocket Server started on port: 8001 2019-9-24 20:08:15 18168 [INFO] Node Media Relay Server started 2019-9-24 20:08:16 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:16 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:17 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:17 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:18 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:18 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:19 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:19 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:20 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:20 18168 [INFO] [Relay end] id= 0 2019-9-24 20:08:21 18168 [INFO] [Relay static pull] start 0 rtsp://192.168.2.65:554/Streaming/Channels/101 to rtmp://127.0.0.1:1935/ptz/main 2019-9-24 20:08:21 18168 [INFO] [Relay end] id= 0
My code:
`const NodeMediaServer = require('node-media-server');
const config = { logType: 3,
rtmp: { port: 1935, chunk_size: 60000, gop_cache: false, ping: 10000, ping_timeout: 100000 }, http: { port: 8001, allow_origin: '*' }, relay: { ffmpeg: 'C:/Users/jeroe/Documents/Saxion/Development/HikPTZ/node_modules/rtsp-ffmpeg/lib/ffmpeg.exe', tasks: [ { app: 'ptz', mode: 'static', edge: 'rtsp://192.168.2.65:554/Streaming/Channels/101', name: 'main', rtsp_transport : 'tcp' //['udp', 'tcp', 'udp_multicast', 'http'] } ] } };
var nms = new NodeMediaServer(config); nms.run();`
I cant figure out what is wrong.