Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
Changing lag and jitter of rtmp stream using OBS and nginx

I have a MEVO camera that I'm using to stream video to OBS via my debian nginx rtmp server. I also have a USB webcam connected directly to my PC running OBS, and I'm streaming video from my smartphone to OBS via the same nginx rtmp server and an app called Larix Broadcaster. CPU usage of the OBS PC: 15%; nginx rtmp server: 2%.

MEVO               > nginx-rtmp > OBS
USB webcam                      > OBS
Smartphone (Larix) > nginx-rtmp > OBS

This works but the streams are not in sync with each other. There is a latency of about 2-5 seconds between the MEVO and OBS (and there is also a different latency between Larix and OBS.) The webcam is instant. I don't mind the 2 second latency - I can set a manual async delay in OBS on the webcam to sync it up with the MEVO. The problem is that the latency is not consistent. Every time I start streaming the MEVO it changes!

Then, when I finally manage to sync the streams (lucky shot), also while streaming they go in and out of sync (jitter). Only in the 100-200ms range, but enough to be visible.

Looking at the MEVO, I believe it only supports RTMP. So moving to another protocol won't work for me.

What could be the cause of the jitter and the changing latency? Could it be the network? The MEVO and OBS are both on a fast 1Gbps wired network.

I tried setting the Network Buffering in OBS to 1MB, 2MB or whatever, but it doesn't help. I also tried changing the buflen in nginx.conf, but to no avail.

nginx.conf:

worker_processes  1;

events {
    worker_connections  1024;
}

rtmp {
    server {
        listen 1935;
        chunk_size 4096;
        buflen 1000ms;
        application live {
            live on;
            record off;
            max_connections 20;
        }
    }
}
  • I'm streaming the MEVO to rtmp://10.0.0.1/live/mevo (mevo is the stream key)
  • I'm streaming Larix to rtmp://10.0.0.1/live/larix (larix is the stream key)

Please help me fix the jitter and changing latency in OBS! Thanks.


Update as I'm trying to fix the changing startup lag:

  • I tried setting chunk_size to 2048, but this doens't help.
  • When I add: wait_key on; I never get the stream to show in OBS.

Any ideas?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I'm from Softvelum team which is behind Larix Broadcaster.

I'd recommend to change "Keyframe frequency" to 1 second and set "Max buffer items" to 70. You can read Q13 from this page https://softvelum.com/larix/faq/ to lean more about this setting. As for "catching" the sync-up - this happens if you start streaming close to key frame start. If you have 300 items in buffer - this is about 3 seconds, so you can get in the middle and get 1.5-2 seconds behind the real-time.

Try to play with buffer and keyframe to see how it works.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!