首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >1281#0:*58 hls:强制片段拆分: 10.002秒

1281#0:*58 hls:强制片段拆分: 10.002秒
EN

Stack Overflow用户
提问于 2017-06-12 23:30:12
回答 1查看 1.6K关注 0票数 1

如果你能给我一点启示,我会很感激的。

所以,基本上,我从我的编码器拉一个流,它工作,我得到的m3u8输出,它是可访问的,但HLS视频是不稳定的,我失去了帧。这出戏不连续。

代码语言:javascript
复制
2017/06/12 16:04:09 [error] 1281#0: *58 hls: force fragment split: 10.002 sec

(编辑后从RTSP.) 2017/06/13 10:48:55错误1281#0:*763 hls:强制片段拆分: 10.416秒,客户端: XX,服务器:0.0.0:1935年

下面是我的配置文件:

代码语言:javascript
复制
#user  nobody;
worker_processes  1;
events {
    worker_connections  1024;
}

# RTMP configuration

rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

        application live {
        live on;

        exec_pull ffmpeg -re -i rtsp://xxx/xxx -c copy -f flv rtmp://xxx:1935/live/xxx;

        exec_pull ffmpeg -re -i rtsp://xxx:8080/xxx -c copy -f flv rtmp://xxx:1935/live/xxx;

        # Turn on HLS
        hls on;
        hls_path /tmp/hls/;
        hls_fragment 3;
        hls_playlist_length 60;

        }
    }
}

http {
    sendfile off;
    tcp_nopush on;
    directio 512;
    default_type application/octet-stream;

    server {
        listen 80;
        server_name  localhost;

         # rtmp statistics
        location /stat {
        rtmp_stat all;
        rtmp_stat_stylesheet stat.xsl;
        }

    location /stat.xsl {
        # you can move stat.xsl to a different location
        # under linux you could use /var/user/www for example
        root html;          
    }

    location / {
        # Disable cache
        add_header 'Cache-Control' 'no-cache';

        # CORS setup
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
        add_header 'Access-Control-Allow-Headers' 'Range';

        # allow CORS preflight requests
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Headers' 'Range';
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }

        types {
            application/dash+xml mpd;
            application/vnd.apple.mpegurl m3u8;
            video/mp2t ts;
        }

                root /tmp/;
        }
    }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-15 17:33:31

**好吧。我有新消息。基本上,这种配置是完美的。我丢失所有这些包的原因是编码器和专用服务器之间的距离。

建议在编码器所在的地方让服务器.所以,这对我有用。

干杯**

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44510164

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档