Git Product home page Git Product logo

Comments (4)

wnpllrzodiac avatar wnpllrzodiac commented on August 26, 2024
rtmp {
    out_queue   4096;
    out_cork    8;
    max_streams 64;

    server {
        listen 2935;

        application myapp {
            live on;
            gop_cache on;
        }

        application slive {
            live on;
            hls on;
            hls_path html/rtmp_hls;
            #on_publish http://localhost:9180/srs_redirect;
        }

        application dash {
            live on;
            dash on;
            dash_path html/rtmp_dash;
        }
    }
}

server {
        listen 2980;

        location / {
            root html;
            index index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            root html/stat.xsl;
        }

        location /live {
            flv_live on; #open flv live streaming (subscribe)
            chunked_transfer_encoding  on; #open 'Transfer-Encoding: chunked' response

            add_header 'Access-Control-Allow-Origin' '*'; #add additional HTTP header
            add_header 'Access-Control-Allow-Credentials' 'true'; #add additional HTTP header
        }

        location /hls {
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }

            alias html/rtmp_hls;
            add_header 'Cache-Control' 'no-cache';
        }

from nginx-http-flv-module.

plainheart avatar plainheart commented on August 26, 2024

如果想要通过 http://192.168.23.71:2980/dash/66.mpd 访问dash文件, 我认为你应该像hls一样,在端口号为2980的http server 配置如下location块:

location /dash {
    alias html/rtmp_dash;
    add_header Cache-Control no-cache;

    # To avoid issues with cross-domain HTTP requests (e.g. during development)
    add_header Access-Control-Allow-Origin *;
}

from nginx-http-flv-module.

wnpllrzodiac avatar wnpllrzodiac commented on August 26, 2024

我最后有一段 dash配置。问题是返回的dash 文件里面有个 time 的通配符。完成无法播放

from nginx-http-flv-module.

winshining avatar winshining commented on August 26, 2024

@wnpllrzodiac 同样的内容发了4条,我删了3条。dash部分的功能我几乎没动过,只改过一个会引起无限循环的bug,在Mac上复现过几次了。要不你恢复回去试试,就改了两行代码。

from nginx-http-flv-module.

Related Issues (20)

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.