VP9 + SVC on native iOS (libmediasoupclient)

We are considering to switch our product from VP8 with simulcast to VP9 with SVC. On the web application we’ve managed to implement this transition, but on native iOS client I struggle with creating SVC producer. The error I get in WebRTC logs is Attempted to set RtpParameters scalabilityMode to an unsupported value for the current codecs.

I’m using WebRTC m120 and libmediasoupclient 3.4.1 (with patches from m112 branch and some custom patches).

When creating producer, I use next parameters (pseudocode):

encodings: [
  {
    "scaleResolutionDownBy": 1,
    "maxBitrateBps": 5_000_000,
    "scalabilityMode": "L3T3_KEY"
  }
]

codecOptions: {
  "profile-id": 0,
  "x-google-start-bitrate": 1000
}

codec: {
  "preferredPayloadType": 109,
  "mimeType": "video/VP9",
  "clockRate": 90000,
  "rtcpFeedback": [
    {
      "parameter": "",
      "type": "goog-remb"
    },
    {
      "parameter": "",
      "type": "transport-cc"
    },
    {
      "parameter": "fir",
      "type": "ccm"
    },
    {
      "parameter": "",
      "type": "nack"
    },
    {
      "parameter": "pli",
      "type": "nack"
    }
  ],
  "kind": "video",
  "parameters": {}
}
""

If I remove scalabilityMode parameter, producer starts normally and I can consume video.

Does anyone have a positive experience producing VP9 with SVC enabled from native iOS code?

How about contributing this as a patch to libmediasoupclient?

1 Like

I’ve sent pull requests almost 6 months ago, still waiting for reaction from maintainers :sweat_smile:

2 Likes

Sorry for the delay. We will check in a few weeks.

1 Like

PR has been reviewed and merged. @fedulvtubudul , apologies for the delay.

1 Like

We would be grateful if you could collaborate on moving to m120.

2 Likes

Hello Alexander,
Just curious, did you try every possible value of scalabilityMode as referenced by W3 here ?
None of them work?
(sorry no experience with iOS native code)

I’ve tried different modes, but none of them were recognized.

After debugging WebRTC Cpp-ObjC bindings I’ve discovered one of the problems with SVC support in objc_video_encoder_factory.mm. I’ve made a patch for that, which makes us a little closer to a working solution.

But even though I can create a producer now, and SVC modes are recognized as supported with this fix, we still didn’t manage to produce actual SVC stream from iPhone. After changing RTPSender parameters to let’s say L3T1 mode, I check actual sender parameters and its L1T2 or something like that. I had to switch to another tasks for couple of weeks now but will return to this SVC-related experiments. If I’ll find any working solution, I’ll drop a line here.