WebRTC to RTMP: Reducing latency

domi91c

New Member
I recently setup WCS5 on an AWS micro instance. My web app allows two users to have a conversation through WebRTC, and I'm sending one side of that conversation to Flashphoner to be converted in real-time to an RTMP stream, which I then feed into OBS as a Media Source. From the web app to OBS, I'm getting about 3-5 seconds of latency. For the project I'm working on, it won't be feasible unless I can get the latency down to about 0.5 to 1 second.

So I'm requesting information on what I can do to lower this latency. Is < 1 second of latency possible with Flashphoner?

I imagine that I might need an AWS instance with higher resources? Please let me know what else I can do for improvements.
 

Max

Administrator
Staff member
Good day.
I'm getting about 3-5 seconds of latency. For the project I'm working on, it won't be feasible unless I can get the latency down to about 0.5 to 1 second.
3-5 seconds latency is normal for RTMP playback.
So I'm requesting information on what I can do to lower this latency. Is < 1 second of latency possible with Flashphoner?
Yes, using WebRTC.
My web app allows two users to have a conversation through WebRTC, and I'm sending one side of that conversation to Flashphoner to be converted in real-time to an RTMP stream, which I then feed into OBS as a Media Source.
The case seems to be excessive. Please clarify: do you publish WebRTC stream to WCS then play it via RTMP in local OBS as source to republish to some third party server? If yes, you could push stream from WCS to third party RTMP server directly. In this case, the latency on WCS side
should be minimal.
I imagine that I might need an AWS instance with higher resources?
t2.micro seems sutable for WebRTC streaming testing only, without transcoding.
If you plan to test RTMP republishing case, you might need more capable instance (t2.medium for example).
 
Top