Git Product home page Git Product logo

wechat_live's Introduction

wechat_live

使用方法

  1. 设置服务器器,直接在聊天窗口输入命令

#服务器192.168.31.1 (这里替换自己的服务器ip)

2.开启命令

#ksp

3.关闭命令

#gsp

4.切换前后摄像头

#hjt

服务器搭建

服务器系统 Ubuntu 安装 nginx 和 srs 简单配置一下即可 .

nginx直接在github clone 到服务器 nginx 设置 nginx安装好后在nginx.conf文件中最后加入

rtmp {

    server {
        listen 2018;
        application rtmplive {
            live on;
            max_connections 1024;
            
        }
        
        application hls{
        
            live on;
            hls on;
            hls_path /usr/local/var/www/hls;
            hls_fragment 1s;
        }
    }
    
}

重启Nginx: nginx -s reload 是配置生效

srs配置 ~/srs/trunk/conf 目录新建一个 .conf的文件 配置内容如下

listen              2018;

max_connections     1000; 

http_server {

    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
    
}

vhost __defaultVhost__ {
    
    hls {
        enabled         on;
        hls_path        ./objs/nginx/html;
        hls_fragment    5;
        hls_window      60;
    }

    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
        hstrs       on;
    }

    gop_cache       off;
    queue_length    10;
    min_latency     on;
    mr {
        enabled     off;
    }
    mw_latency      100;
    tcp_nodelay     on;

}

然后运行命令是配置生效 ./objs/srs -c conf/名称.conf

wechat_live's People

Contributors

yh8577 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.