nginx:rtmp

rtmp (Real Time Messaging Protocol) real-time messaging protocol
Nginx rtmp function point
Supports live audio and video Supports
flv/mp4 video format, the input can be a file or HTTP stream H264/AAC encoding Support online transcoding with FFmpeg Support HLS (HTTP LiveStreaming) requires libavformat (>= 8.53.31.100) from ffmpeg (ffmpeg.org) HTTP callbacks (publish/play/record/update etc) support external Program (exec) HTTP control module for recording audio/video and dropping clients Advanced memory control technology to achieve smooth live streaming while using a small amount of memory. Can work with the following. FMS server (Wirecast, FMS, Wowza,) Player (JWPlayer, FlowPlayer, StrobeMediaPlayback,) External program (ffmpeg, avconv, rtmpdump, flvstreamer ) Statistics in XML/XSL in machine- & human- readable form











Support cross-platform Linux/FreeBSD/MacOS
Project address: https://github.com/arut/nginx-rtmp-module
nginx-rtmp-module Directives: https://github.com/arut/nginx-rtmp-module/wiki /Directives
In general, Nginx-rtmp is a relatively lightweight project, which can meet the collection, encoding and distribution of live broadcasts. This project enriches and improves nginx's support for video. In particular, nginx-rtmp supports HLS. .
===================================================== ========
Installation under mac:
-------------------------------------- ---------------------------------
brew tap homebrew/nginx
brew install nginx-full --with-rtmp-module
brew info nginx-full
---------------------------------------------- --------------------------
Installation under linux:
-------------------- -------------------------------------------------- -In
the source directory (with configure file)
nginx -V (replace --prefix and its subsequent configuration with the following command --prefix=...)
sudo ./configure --prefix=... --add-module=/usr/local/Cellar/nginx_module /nginx-rtmp-module-master
make (no make install)
===================================== =====================
nginx.conf:
#rtmp service 
rtmp 
{  #Declare
an rtmp instance
  server 
  {  #Add
a listening port to Nginx to receive rtmp connections
     listen 1935; 
#Maximum block size for stream integration. The default value is 4096. The larger this value is set, the smaller the CPU load. This value cannot be lower than 128
     chunk_size 4096; #Create 
a publishing application live, and the address published to the application is: rtmp://ip address:1935/live/ 
     application live 
     { 
#Switch the live mode, that is, one-to-many broadcast
        live on ;
#Play the specified mp4 file directory
        #play /home/video/mp4;
        allow play all; 
     } 
   } 


http
{
...
}
==========================================================

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326181195&siteId=291194637