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

Dynamic push #350

Open dat0825 opened 4 years ago

dat0825 commented 4 years ago

When I config in app.js like this { app: 'live', mode: 'push', edge: 'rtmp://127.0.0.1', appendName: false } And after I call api POST http://localhost:port/api/relay/push with body { app: 'live', name: 'LIlZB0c2ae', url: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov', appendName: false }. It returns 'OK'. But output console shows: [rtmp play] Stream not found... Can anyone help me ? Many thanks !

sandrocsimas commented 4 years ago

You should send the request with application/x-www-form-urlencoded.

Raj123456788 commented 3 years ago

@dat0825: Can you please update steps if you got it working?

vladuma commented 3 years ago

I have exactly the same issue. Did anyone got it working? BTW, using application/x-www-form-urlencoded did not help

AlexRypun commented 3 years ago

As I understand, "[rtmp play] Stream not found" is an expected behaviour while there is no publishing. The newly created session is added to idlePlayers context.idlePlayers.add(this.id); and once you start to stream everything should work.