zoukankan      html  css  js  c++  java
  • 物流-门店监控-在线直播系统搭建-nginx核心部分

     在线直播还是挺容易搭建的,入门很容易。

    按段分成:推流------>转----->拉流

    本次搭建的:

    • OBS Studio对应到推流部分
    • nginx+rtmp-module对应到转部分(ffmpeg推后再介绍)
    • VLC对应拉流部分

    先自行下载nginx以及rtmp包:

    1. http://nginx.org/download/nginx-1.18.0.tar.gz
    2. https://codeload.github.com/arut/nginx-rtmp-module/zip/master

    搭建命令行:

    [root@iZuf6e0il1e05m6rdx5sx4Z sbin]# history
        1  ll
        2  unzip
        3  yum install unzip
        4  unzip
        5  ll
        6  unzip nginx-1.18.0.tar.gz 
        7  ll
        8  unzip nginx-rtmp-module-master.zip 
        9  ll
       10  tar -xvzf nginx-1.18.0.tar.gz 
       11  ll
       12  cd nginx-1.18.0
       13  ll
       14  ./configure --add-module=/root/nginx-rtmp-module-master
       15  ./configure --add-module=/root/nginx-rtmp-module-master  --prefix=/opt/nginx 
       16  make
       17  make install
       18  pwd
       19  ll
       20  pwd
       21  cd /opt/nginx
       22  ll
       23  cd sbin/
       24  ll
       25  nginx
       26  ./nginx
       27  ./nginx -s reload
       28  history
    ---------------------------------------------------------------------------
    [root@iZuf6e0il1e05m6rdx5sx4Z conf]# cat nginx.conf
    
    #user  nobody;
    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
    
        server {
            listen       80;
            server_name  localhost;
    
            location / {
                root   html;
                index  index.html index.htm;
            }
    
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
    }
    
    
    rtmp {
    
        server {
    
            listen 1935;
    
            chunk_size 4000;
    
            # TV mode: one publisher, many subscribers
            application mytv {
    
                # enable live streaming
                live on;
                hls on;
                hls_path /tmp/av;
                hls_fragment 5s;
    
                allow publish all;
            }
        }
    }
    

      

    用OBS Studio做录像以及推流工具,关键配置如下:

     

    VLC拉流,关键配置如下:

     

    搞定

  • 相关阅读:
    Verilog设计Valid-Ready握手协议
    E203 CSR rtl实现分析
    E203 CSR寄存器
    RiscV汇编介绍(1)-编译过程
    RiscV汇编介绍(2)-编译过程
    博客迁移通知
    Visual Studio中的环境变量(以Visual Studio 2013为例)
    Android Studio搜索功能(查找功能)及快捷键图文详解
    《更好的解释(数学篇)》——后序
    《更好的解释(数学篇)》——第十二章
  • 原文地址:https://www.cnblogs.com/aarond/p/online.html
Copyright © 2011-2022 走看看