VP9 SVC and FullHD - video freezes after 5-10 seconds

I’m using the latest mediasoup-demo installed locally. Everything works fine with the default settings.
I want to use FullHD (1920x1080) resolution, so I added it to the sample app

const VIDEO_CONSTRAINS =
{
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
hd : { width: { ideal: 1280 }, height: { ideal: 720 } },
fhd : { width: { ideal: 1920 }, height: { ideal: 1080 } }
};

Also I modified the default resolution to be ‘fhd’ instead of ‘hd’.
The app now works fine, the video codec is VP8.

I want to use VP9, so I added forceVP9=true to the URL params.
Now the video call starts but after 5-10 seconds the remote video freezes.

I tried to add simulcast=false to the URL params. Now with SVC disabled the app works fine again.

I did another test. Now with HD resolution (1280x720) + VP9 + SVC. Everything works fine.

I’m using the latest Chrome 75 and the latest macOS 10.14.5 on MacMini 2014.

Any ideas what could cause the problem?
Is it caused by the browser or by the SFU server?

Hi,

So you made a modification (VIDEO_CONSTRAINTS) after which the demo does not work. Then revert your own modification and the demo works.

Are you asking why your modification doesn’t work?

Yes, I’m asking why VP9 SVC does not work after the modification. I only changed the video resolution to FullHD.

I don’t know why it does not work or why the video stops after a while. In fact, in my Macbook Pro I cannot get webcam FHD resolution (it just generates HD 1280x720) so I assume you have a different webcam that generates FHD. This is, I cannot reproduce the problem.

Anyway, mediasoup provides lot of log levels, log tags, RTC stats, etc, all them properly documented in the API. You provide cero mentions to them, so this is just “the demo does not work after changing something”.

Please, read the mediasoup API documentation, enable RTP, BWE, simulcast, SVC logs, etc. Check the producer and consumer RTP stats, and realize of what is happening. We spent lot of time documenting everything in detail for people to use it and for people to diagnoste issues that later can report to us.

Today I traced the problem.
The VP9 + SVC + FullHD causes the browser to stop encoding after about 700-800 frames. The bitrate goes to zero. I checked these on chrome://webrtc-internals.
Then I started chrome with debug log ‘–enable-logging --v=1’.

[58540:36099:0723/185020.479200:ERROR:video_stream_encoder.cc(760)] Failed to initialize the encoder associated with codec type: VP9 (2)
[58540:36099:0723/185020.479287:ERROR:video_stream_encoder.cc(786)] Failed to configure encoder.
[58540:36099:0723/185020.479576:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7
[58540:36099:0723/185020.480517:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7
[58540:9223:0723/185020.481380:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7
[58540:36099:0723/185020.508365:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7
[58540:34819:0723/185020.538945:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7
[58540:36099:0723/185020.584776:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7
[58540:36099:0723/185020.613607:ERROR:video_stream_encoder.cc(1363)] Failed to encode frame. Error code: -7

Looks like a VP9 encoder issue.

You may want to open an issue in chrome.

Good catch. You may want to tell Chrome developers about it :

Filled Chrome issue: https://bugs.chromium.org/p/webrtc/issues/detail?id=10830

1 Like

Cool. BTW ensure you are not limiting the mediasoup transport bitrate (the demo limits it via REMB if you set maxIncomingBitrate in the config.js file.

I’d recommend you testing the same video settings using other WebRTC apps, specially P2P apps.