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

how to command a dynamic push #491

Open ivyminyang opened 2 years ago

ivyminyang commented 2 years ago

Hello, I can use localhost in the output address in ffmpeg to push the stream, but I am not be able to use hostname(exmaple.com) and IP to push, I have found that authentication can publish the rtmp address with hostname, but I have not figured out how to do it, I have found out the guide information with

3.expiration time: 2017/8/23 11:25:21 ,The calculated expiration timestamp is

1503458721

4.The combination HashValue is:

HashValue = md5("/live/stream-1503458721-nodemedia2017privatekey”) HashValue = 80c1d1ad2e0c2ab63eebb50eed64201a

5.Final request address rtmp://192.168.0.10/live/stream?sign=1503458721-80c1d1ad2e0c2ab63eebb50eed64201a The 'sign' keyword can not be modified

May I please ask how can I cammand in ffmpeg will it be like this? ffmpeg.exe -re -i .\test.mp4 -c copy -f flv rtmp://hostname.com:1935/live/stream?sign=1503458721-80c1d1ad2e0c2ab63eebb50eed64201a

And I have another question, how does the dynamic push works, and what is the purpose of it, how to command a push with javascript? And when the stream file is not in the server but in the user, how can I transfer the stream? Thank you very much for your time