Giter Site home page Giter Site logo

kwaivideoteam / las Goto Github PK

View Code? Open in Web Editor NEW
263.0 263.0 47.0 57.66 MB

LAS (Live Adaptive Streaming), an adaptive bitrate streaming technique that enables high quality and low-latency live streaming of media content over HTTP, WebRTC, and so on.

License: MIT License

JavaScript 10.66% HTML 3.27% TypeScript 67.23% Shell 0.19% C 18.65%

las's People

Contributors

johnwenjunwu avatar kongxiao0532 avatar zhouchaopku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

las's Issues

直接跑srs不成功

部署了srs然后把manifest.json的url改了报202-source buffer error错误,能不能把转码视频上传下,是不是codec有问题?
ffmpeg.exe -re -i test.mp4 -vcodec libx264 -vf scale=1280:720 -b:v 2000k -x264-params "no-scenecut=1:threads=8:keyint=90" -acodec aac -f flv rtmp://192.168.6.62:1935/live/out0 -vcodec libx264 -vf scale=960:540 -b:v 1000k -x264-params "no-scenecut=1:threads=8:keyint=90" -acodec aac -f flv rtmp://192.168.6.62:1935/live/out1 -vcodec libx264 -vf scale=640:360 -b:v 500k -x264-params "no-scenecut=1:threads=8:keyint=90" -acodec aac -f flv rtmp://192.168.6.62:1935/live/out2

SRS 转码配置失败

SRS: 4.0.29(Leo)
Commit: 53326d8

部署配置:

listen              1935;
max_connections     1000;
daemon              off;
srs_log_tank        console;
srs_log_level       trace;

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

http_api {
    enabled         on;
    listen          1985;
}

vhost __defaultVhost__ {

    tcp_nodelay     on
    min_latency     on;
    
    play {
        gop_cache       on;
        queue_length    10;
        mw_latency      100;
    }

    publish {
        mr          off;
    }
    
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }

    atc             on;
    transcode {
        enabled     on;
        ffmpeg      /usr/bin/ffmpeg;
        
        engine low {
            enabled         on;
            vcodec          libx264;
            vbitrate        600;
            vwidth          360;
            vheight         640;
            vthreads        12;
            vprofile        main;
            vpreset         veryfast;
            vparams {
                -x264-params "no-scenecut=1:keyint=90";
            }
            acodec          copy;
            output          rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
        }

        engine medium {
            enabled         on;
            vcodec          libx264;
            vbitrate        1200;
            vwidth          540;
            vheight         960;
            vthreads        12;
            vprofile        main;
            vpreset         veryfast;
            vparams {
                -x264-params "no-scenecut=1:keyint=90";
            }
            acodec          copy;
            output          rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
        }

        engine high {
            enabled         on;
            vcodec          libx264;
            vbitrate        1600;
            vwidth          720;
            vheight         1280;
            vthreads        12;
            vprofile        main;
            vpreset         veryfast;
            vparams {
                -x264-params "no-scenecut=1:keyint=90";
            }
            acodec          copy;
            output          rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
        }
    }
}

推流:OBS 26.0.2 (MacOS)

错误讯息:

[2020-11-24 17:54:17.771][Warn][31543][233][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.771][Warn][31543][233][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.771][Warn][31543][234][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.771][Warn][31543][234][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.771][Warn][31543][234][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.771][Warn][31543][234][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.771][Warn][31543][234][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.772][Trace][31543][238] HTTP client ip=61.220.72.232, request=0, to=15000ms
[2020-11-24 17:54:17.772][Error][31543][238][11] serve error code=3009 : parse message : parse 517B, nparsed=0, err=16/HPE_INVALID_METHOD invalid HTTP method
thread [31543][238]: parse_message() [src/service/srs_service_http_conn.cpp:95][errno=11]
thread [31543][238]: parse_message_imp() [src/service/srs_service_http_conn.cpp:127][errno=11](Resource temporarily unavailable)
[2020-11-24 17:54:17.782][Trace][31543][239] HTTP client ip=61.220.72.232, request=0, to=15000ms
[2020-11-24 17:54:17.782][Error][31543][239][11] serve error code=3009 : parse message : parse 517B, nparsed=0, err=16/HPE_INVALID_METHOD invalid HTTP method
thread [31543][239]: parse_message() [src/service/srs_service_http_conn.cpp:95][errno=11]
thread [31543][239]: parse_message_imp() [src/service/srs_service_http_conn.cpp:127][errno=11](Resource temporarily unavailable)
[2020-11-24 17:54:17.901][Warn][31543][232][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.901][Warn][31543][232][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.901][Warn][31543][232][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.901][Warn][31543][232][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.901][Warn][31543][232][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.905][Warn][31543][233][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.905][Warn][31543][233][11] aac ignore type=1 for no sequence header
[2020-11-24 17:54:17.905][Warn][31543][233][11] aac ignore type=1 for no sequence header

我用原始 SRS4.0 release 部署配置是可行的,也不会有这些错误讯息,是什么原因呢?

带宽预测

docs/LAS1.0.pfg的 6.3.2网络状态收集有一段话
在网络状态收集层面,采用固定时间采点 的模式,即每隔一个固定时间𝑇(𝑚𝑠),统计该时间段实际下载的数据量 𝑆(𝐵𝑦𝑡𝑒𝑠),从而得到一个带宽采样点𝐵(𝑘𝑏𝑝𝑠) = 𝑆 ∗ 8/𝑇。典型的,𝑇 = 500𝑚𝑠。 基于这些带宽的采样点,通过滤波和预测算法,估计网络的真实带宽,作为 码率调整的依据。 注:带宽估计的参考实现逻辑,将在参考代码给出
然后我查看了ijklas.c的OnStatisticInfo方法,RateAdaptionState的bw_c也是根据统计固定时间间隔的下载数据来估算的,也就是说只有在卡顿状态下,该值近似与带宽,而网络状态良好时,该值与流的码率大致相同,不能反应实际带宽。

请问这里是失误还是故意没有给出基于卡尔曼滤波的代码实现吗?

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.