Question / Help OBS>NGINIX RTMP>OBS

bassmanrob

New Member
Hi,
First time poster here. With the stay-at-home orders in place I've been producing music livestreams for 2 local venues. The problem is inconsistent upload on the remote OBS machine causes video to freeze & stutter, sometimes audio cuts out, and when/if it comes back, audio & video are out of sync. Lots of times the video stays frozen, and I have to restart the remote stream, quit OBS on the local production machine, then relaunch. I am most suspicious of my NGINX configuration, and the RTMP network source on the local production machine. Is there a way to specify nobuffer on the RTMP source? If I monitor on the RTMP server with "ffplay -fflags nobuffer rtmp://localhost/cam/[streamkey]", that recovers much better than OBS RTMP source. Is there a way to tightly lock audio&video streams so their sync doesn't wander with network hiccups? When I have a consistent, dedicated internet connection this setup works well.

Here's the setup:
========================================
Performer's computer (assorted macbook pros) running current OBS
Ethernet cable to router (wifi off)
x264 software encoding, veryfast cpu, ~2500kbps (adjusted to 80% the measured upload bandwidth), 720p/30fps (same res/framerate on all)
cpu usage is around 25-30%, <1% dropped frames due to encoding/rendering
>=============Internet====================>
>DSL Modem 30mb down, 5mbps upload measured>Ubiquiti Edgerouter X SFP with QOS on up&down for minimal bufferbloat)>
>=====100mpbs ethernet on HP enterprise switch==>
RTMP Server (homebuilt C2D 2.6ghz 4gb)
Lubuntu 19.10 NGINX from default repositories
setup from the OBS support page instructions, CPU & ram have plenty of headroom
tail -20 /etc/nginx/nginx.conf returns:
rtmp {
server {
listen 1935;
chunk_size 4096;
# chunk_size 1024;
sync 10ms;
buflen 500ms;
max_connections 25;

application live {
live on;
record off;
}
application cam {
live on;
record off;
}
}
>=============100m Ethernet====================>
Production machine: MBP core i5 2.7 8gb Catalina
Network source rtmp://10.0.1.10/cam/[streamkey] 1mB buffer
x264 software veryfast 2500kbps
>============Facebook Live================
 
Top