HLS NGINX-RTMP [error] 1281#0: *58 hls: force fragment split: 10.002 秒

HLS NGINX-RTMP [error] 1281#0: *58 hls: force fragment split: 10.002 sec

如果你能为我提供一些启示,我将不胜感激。

所以,基本上我从我的编码器中拉出一个流并且它工作,我得到了 m3u8 输出并且它是可访问的但是 HLS 视频是跳动的并且我丢失了帧。剧情不连续

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.0:1935

这是我的配置文件:

#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/;
        }
    }
}

**好的所以..我有消息了。基本上那个配置是​​完美的。我丢失所有这些包的原因是因为编码器和专用服务器之间的距离。

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

干杯**