• rtmp服务器创建和设置


    1,安装ubuntu 16.4 依赖

    sudo apt-get update
    sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev libtool libpcrecpp0v5 openssl -y

    2,安装nginx1.14.2

      2.1 下载软件

    wget http://nginx.org/download/nginx-1.14.2.tar.gz

      2.2 解压软件到当前目录    

    tar xvf nginx-1.14.2.tar.gz

    3,下载nginx-rtmp-module  

    git clone https://github.com/adwpc/nginx-rtmp-module.git

    4,配置nginx

    ./configure --sbin-path=/usr/local/nginx/nginx 
    --prefix=/usr/local/nginx 
    --conf-path=/usr/local/nginx/nginx.conf 
    --pid-path=/usr/local/nginx/nginx.pid 
    --with-http_ssl_module 
    --with-stream --with-mail=dynamic 
    --add-module=../nginx-rtmp-module

    5,修改makefile文件,查找并删除“-Werror“字符串

    vim nginx-1.14.2/objs/Makefile

    6,编译并安装Nginx

    make
    make install

    7,修改nginx.conf文件,添加rmtp支持

    rtmp {
        server {
            listen 1935;
    
            application live {
                live on;
            }
            
            application hls {
                live on;
                hls on;  
                hls_path temp/hls;  
                hls_fragment 8s;  
            }
        }
    }

    8,运行nginx

    cd /usr/local/nginx/
    ./nginx

    9,如果提示创建temp/hls失败,手动创建temp文件夹后,再次运行nginx

  • 相关阅读:
    网络相关要看的
    第四章节 树(2)
    第四章节 树(1)
    第三章节 表,栈,队列
    android动画
    面试
    人工神经网络入门(4) —— AFORGE.NET简介
    Accord.NET Framework 介绍
    DotNet 资源大全中文版
    AI Accord.NET入门
  • 原文地址:https://www.cnblogs.com/visio/p/12017040.html
Copyright © 2020-2023  润新知