WebRTC Degraded Video Quality

I’m having issues with the quality of the WebRTC stream that is sent to our browsers.

In my setup Wowza is receiving a stream over SRTP and then making that stream available for users over WebRTC. The quality of the stream that is sent over WebRTC is quite poor. The SDP lists the framerate as 29.97 (full SDP below) which is what the source stream is. However the observed framerate is closer to 4fps.

My Wowza Application is setup to record all inbound streams. I’ve viewed these recordings that Wowza produces, and they have quality inline with the source stream. However the video that ends up being delivered to the browser is much worse.

Here are links to the videos. This first one is a screen capture of the video as observed when played back through WebRTC: https://www.dropbox.com/s/uwbt1qr4siy0uaa/webrtc-screen-capture.mp4?dl=0 This next one is a chunk of the recording that was saved on the Wowza server: https://www.dropbox.com/s/hrlrft51zx5sqn2/wowza-record.mp4?dl=0

I am running Wowza Streaming Engine: 4.6.0 (build 19395)

Any ideas on how to debug this dramatic loss in quality?

v=0
o=WowzaStreamingEngine-next 1695110103 2 IN IP4 127.0.0.1
s=-
t=0 0
a=fingerprint:sha-256 FF:EF:D6:DF:8C:B1:2B:2E:96:5A:54:76:33:6D:F6:00:A0:54:4A:89:74:65:69:D9:CE:7E:7D:B8:A0:94:1A:1F
a=group:BUNDLE video
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 9 RTP/SAVPF 97
a=rtpmap:97 H264/90000
a=cliprect:0,0,360,640
a=framesize:97 640-360
a=framerate:29.97
a=control:trackID=1
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:994e2e6138b86675ca6be88f653e2919
a=ice-ufrag:caeeada4
a=mid:video
a=msid:{f906044d-6567-42b8-88e5-6e7d25f3ce28} {d22a6898-f08c-444d-9b0c-04c129597cc4}
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-mux
a=setup:actpass
a=ssrc:1781791411 cname:{568776d6-b2cb-4886-b3a1-a7dc494a5724}

Your video is encoded using the H.264 Main profile, which isn’t well supported in most browser’s webrtc implementations. If you switch to baseline 3.1 or lower, you should see better performance on your webrtc playback.

That’s a great idea Jay.

I enabled the Wowza transcoder to transcode my inbound video to H.264 baseline. It’s now sending a profile-level-id of profile-level-id=42801E which is Baseline 3.0. However I’m still seeing only seeing 4-5fps.

Out of curiosity, how did you know I was using H.264 Main profile based on the above SDP? I’m currently stripping the fmtp line from my SDPs since Chrome doesn’t like the profile-level-id being returned by Wowza.

I inspected your source video with ffmpeg to see the encoding.

As for the trancoder output, try baseline 2.1. I have been able to get both browsers to play 3.0, but I found that I needed to supply an ID of a less complex level in the SDP (42E01F seems to make things work reliably, even if the video encoding is at a higher level)

How would I go about changing the transcoder output to baseline 2.1?