Nginx-rtmp-module: Stuttering

Created on 26 Oct 2015  路  7Comments  路  Source: arut/nginx-rtmp-module

The stream stutters when it is played. This is with both the Linux and Windows versions.

What can be done for it to not stutter so much?

The quality is okay and the stuttering happens consistently in regular intervals. This leads me to believe that it is a configuration error.

I've tried a basic setup with no HLS and a setup that downscales the stream using ffmpeg and pushes it into another application directive. Neither of these have worked.

Most helpful comment

I have stuttering too. Module revision 5150993accb5edefa61d71e1c81ad8c02f515428 built with nginx 1.11.5. Bandwidth - 1Gbps (LAN), CPU load minimal.
_Added_: looks like multithreading is an issue. Raised worker_processes, added rtmp_auto_push on;.
A config like this runs smooth as silk:

worker_processes  2;

rtmp_auto_push on;
rtmp {
    server {
        listen 1935;
        application app {
            live on;
            record off;
        }
    }
}

All 7 comments

May I look your server status锛烠PU锛宐andwith锛宎nd so forth.
because the nginx should no problem.

The Linux server is a KVM VPS with 1 core, 768mb of ram, and 1 gigabit of bandwidth.

The Windows machine had 6 cores, 8gb of ram, and it was hosted through localhost.

From what I read, both specs should be ample for a minimal amount of viewers.

What are you using to publish stream?
Try to play with directives:

I'm using OBS.

I tired messing around those directives and several others. Nothing has worked so far.

And max_queue doesn't seem to exist.

I'm having similar problems. I'm just relaying an rtmp-stream without transcoding, but every couple of seconds the rtmp stream keeps stuck and then skips for sometimes just a second, sometimes even a few seconds.

This is my config:

rtmp {
server {
listen 1935;
chunk_size 8192;
buflen 15s;
application live {
live on;
meta copy;
interleave on;
wait_key on;
wait_video on;
publish_notify on;
sync 10ms;
}
}
}

I have stuttering too. Module revision 5150993accb5edefa61d71e1c81ad8c02f515428 built with nginx 1.11.5. Bandwidth - 1Gbps (LAN), CPU load minimal.
_Added_: looks like multithreading is an issue. Raised worker_processes, added rtmp_auto_push on;.
A config like this runs smooth as silk:

worker_processes  2;

rtmp_auto_push on;
rtmp {
    server {
        listen 1935;
        application app {
            live on;
            record off;
        }
    }
}

image
(these black bars are from hls.js where the video pauses to buffer for ~1 second)
I'm having a similar issue, unfortunately upping worker_processes to 2 and adding rtmp_auto_push on; didn't fix it for me.

worker_processes  2;


events {
    worker_connections  1024;
}

rtmp_auto_push on;
rtmp {
    server {
        listen 1935;
        chunk_size 4000;

        application show {
            live on;
            hls on;
            hls_path /mnt/hls/;
            hls_fragment 1;
            hls_playlist_length 15;
            deny play all;
        }
    }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikechen1199 picture mikechen1199  路  6Comments

marcoeg picture marcoeg  路  3Comments

wwwyaron picture wwwyaron  路  4Comments

Mattyzero picture Mattyzero  路  6Comments

ama-ableton picture ama-ableton  路  6Comments