![]() ![]() Although there are default values set in node-media-server, it is recommended to set it once, just use the following configuration. It is important to note that the mediaroot parameter should be specified when converting to hls stream. Especially when combined with hls, the packet loss rate is higher, so it is not recommended to push rtsp stream. During the test, I found that when pushing rtsp stream, either green screen will appear or packet loss will occur. Push rtsp (Real Time Streaming Protocol), only need to change the above /video.mp4. rtmp address is the command address in FFmpeg The former can be played on a computer, while the latter can be played on a mobile phone and a computer. The above command will generate two kinds of stream addresses after passing through node-media-server. video.mp4 -c copy -f flv rtmp://localhost:1935/live/STREAM_NAME When executing the following code, you need to start the node-media-server.įfmpeg -re -i. Use the FFmpeg command to push the address. And write the following code, and then run app.jsĬonst NodeMediaServer= require('node-media-server') Ĭan access localhost:8000/admin to access the management interface of node-media-server. Npm install node-media-server Write and run node-media-serverĬreate app.js. Click start streaming to broadcast your stream. Enter your streaming key issued by NodeStream and click Apply. Node-media-server is based on node.Js So we need to use npm to install. Select Custom service and rtmp://127.0.0.1:1935/live in server input. When you play with a video player, you're pulling stream. Pull stream means to pull the video stream from the streaming media server, and the viewer can watch it by pulling the stream address published by the streaming media server. You can understand it as a transit station, which is used to convert stream format or do some operation on video stream and push out stream address.įfmpeg is used as a streaming tool to push the video or video stream you need to convert to the streaming media server. Node-media-server is a streaming media server. Here's a point (if there is a mistake, please point it out) Used things: nodeJs, ffmpeg, node-media-server. ![]() The environment of this article is windows. Take a note of the process of using node-media-server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |