Stutter on playback using WHIP/webRTC stream to CloudFlare Stream

deepdev

New Member
I'm testing on my MBPro M1, 16GB machine and see the following and have the following settings for the stream:

- I am window capture'ing and tried browser capture source as well (same exact playback result for each). I have a web 3D app that I am capturing and streaming.
- I'm streaming to CloudStream, WHIP / Live Input for WebRTC streaming.
- I playback the stream using CF's sample app / player on my same local machine in a separate browser instance.
- I tried a few settings - 1920x1020 capture dimensions, 30fps, 48 and 60fps, moved my output bitrate up from 2.5mbps to 7mbps, set the encoder for Output settings to "Video Encoder - Hardware (Apple H.264)"

The resulting playback when I move at all within my 3d app/scene results in MAJOR stuttering when I'm viewing the playback. My GPU isn't maxed, it's only about 30% utilization on the MBP (capturing, encoding, streaming and viewing all on the same machine). Of course in my source app window there's no stuttering of the 3D scene, only when viewing the playback/stream (within the stream/video itself). It's like maybe OBS can't capture at a high enough frame rate? Or maybe CloudFlare Stream is limiting / dropping framerate / frames?

Not sure where to start debugging this, I'm new to OBS.

Thing is, a few months ago when I was building a POC using CF Stream and my 3D web app, I used getDisplayMedia and wrote some code in my 3D web app to connect directly to CloudFlare Stream and stream my app. Again, with the same MBP and doing the capture/streaming/playback on the same machine. The playback quality was excellent / no stuttering at all.

I have a very very fast download and sufficient (about 20mbps) upload internet connection. But anyway, I also did the getDisplayMedia test with another Media / Streaming provider (think it was getstream.io) some time ago and had the same experience - great responsiveness / no stuttering at all.

I was considering using OBS as my capture tool instead of the getUserMedia / stream direct from the browser option. OBS has some really great features and the Browser Source is super slick. But, i guess there's either a limitation I'm not aware or more likely some dumb novice mistake on my part when I setup the stream/encoding...?

Thanks!!!
 

tracekira

New Member
I am not sure if its the same issue or similar as yours but I have major stutters when I capture using a capture card and OBS full screen projector.
 

deepdev

New Member
I am not sure if its the same issue or similar as yours but I have major stutters when I capture using a capture card and OBS full screen projector.
Thanks I'm going to do one last test tonight and see if I can do any capture without stutter on my WebGL scene... Odd, I've never seen stutter like this. I don't have time to debug OBS or my environment to narrow down root cause but I'll drop a note here if I come up with more info or a work-around with OBS. I've spent time creating a work-around to not use OBS over past couple days. We'll see if I can use OBS at all for my use case. I'd like to have it in the mix but there's other options for what I'm doing.

Ultimately, my 3D app runs on a server, unattended and I built an API that controls my app and when to render a scene and capture / record it. But, I'll drop more info here if I come up with anything that works (different OS, or different approach/settings with OBS, etc).

Thanks
 
Top