Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SVC and Simulcast support for AV1 and VP9. #2350

Merged
merged 14 commits into from
Oct 31, 2023

Conversation

jallamsetty1
Copy link
Member

@jallamsetty1 jallamsetty1 commented Sep 13, 2023

Both Simulcast and SVC modes are supported for AV1 and VP9. The default mode for both of them is SVC and is enabled by default unless it is explicitly disabled from config.js.

videoQuality: {
      av1: {
            maxBitratesVideo: {
               low: 100000,
               standard: 300000,
               high: 1000000,
               ssHigh: 2500000
            },
            scalabilityModeEnabled: true,
            useSimulcast: false,
            useKSVC: true
        },
        h264: {
            maxBitratesVideo: {
                low: 200000,
                standard: 500000,
                high: 1500000,
                ssHigh: 2500000
            },
            scalabilityModeEnabled: true
        },
        vp8: {
            maxBitratesVideo: {
                low: 200000,
                standard: 500000,
                high: 1500000,
                ssHigh: 2500000
            },
            scalabilityModeEnabled: false
        },
        vp9: {
            maxBitratesVideo: {
                low: 100000,
                standard: 300000,
                high: 1200000,
                ssHigh: 2500000
            },
            scalabilityModeEnabled: true,
            useSimulcast: false,
            useKSVC: true
        }
}

@jallamsetty1 jallamsetty1 changed the title Feat/add av1 support Add SVC and Simulcast support for AV1 and VP9. Sep 13, 2023
@jallamsetty1
Copy link
Member Author

Depends on jitsi/jitsi-videobridge#1998

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments!

modules/RTC/TPCUtils.js Show resolved Hide resolved
service/RTC/VideoEncoderScalabilityMode.ts Outdated Show resolved Hide resolved
if (videoQualitySettings) {
for (const codec of VIDEO_CODECS) {
const bitrateSettings = videoQualitySettings[codec]?.maxBitratesVideo
?? videoQualitySettings[codec.toUpperCase()]?.maxBitratesVideo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we have the codecs in upper case in the constant to avoid having to uppercase here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to make sure that the code is case insensitive for the codec value in config.js. If we have them in upper case in the constant, then we need to check if the codec value is in lower case in config.js.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in the same line you are indexing it both ways. It looks super weird.

modules/RTC/TPCUtils.js Show resolved Hide resolved
modules/RTC/TPCUtils.js Show resolved Hide resolved
modules/RTC/TPCUtils.js Outdated Show resolved Hide resolved
modules/RTC/TraceablePeerConnection.js Outdated Show resolved Hide resolved
modules/RTC/TraceablePeerConnection.js Show resolved Hide resolved
modules/browser/BrowserCapabilities.js Show resolved Hide resolved
service/RTC/StandardVideoSettings.ts Outdated Show resolved Hide resolved
@jallamsetty1 jallamsetty1 force-pushed the feat/add-AV1-support branch 2 times, most recently from aae4fb0 to 36cfbcd Compare September 20, 2023 15:21
@jallamsetty1 jallamsetty1 requested a review from saghul September 20, 2023 16:18
Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some more comments, PTAL!

modules/RTC/TPCUtils.js Outdated Show resolved Hide resolved
modules/RTC/TPCUtils.js Show resolved Hide resolved
if (videoQualitySettings) {
for (const codec of VIDEO_CODECS) {
const bitrateSettings = videoQualitySettings[codec]?.maxBitratesVideo
?? videoQualitySettings[codec.toUpperCase()]?.maxBitratesVideo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in the same line you are indexing it both ways. It looks super weird.

modules/RTC/TPCUtils.js Outdated Show resolved Hide resolved
modules/RTC/TPCUtils.js Outdated Show resolved Hide resolved
modules/RTC/TPCUtils.js Show resolved Hide resolved
modules/RTC/TPCUtils.spec.js Show resolved Hide resolved
modules/RTC/TraceablePeerConnection.js Outdated Show resolved Hide resolved
modules/RTC/TraceablePeerConnection.js Outdated Show resolved Hide resolved
service/RTC/StandardVideoSettings.ts Show resolved Hide resolved
Multi-encoding simulcast for H.264 is supported now because of the AV1 DD support added on the bridge side.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useL3T3: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useL3T3: true //(defaults to L3T3_KEY)
        },
    }
}
Both Simulcast and SVC modes are sipported for AV1 and VP9. The default mode for both of them is SVC and is enabled by default unless it is explicitly disabled from config.js.
videoQuality: {
      av1: {
            maxBitratesVideo: {
               low: 100000,
               standard: 300000,
               high: 1000000,
               ssHigh: 2500000
            },
            scalabilityModeEnabled: true,
            useSimulcast: false,
            useL3T3: true
        },
        h264: {
            maxBitratesVideo: {
                low: 200000,
                standard: 500000,
                high: 1500000,
                ssHigh: 2500000
            },
            scalabilityModeEnabled: true
        },
        vp8: {
            maxBitratesVideo: {
                low: 200000,
                standard: 500000,
                high: 1500000,
                ssHigh: 2500000
            },
            scalabilityModeEnabled: false
        },
        vp9: {
            maxBitratesVideo: {
                low: 100000,
                standard: 300000,
                high: 1200000,
                ssHigh: 2500000
            },
            scalabilityModeEnabled: true,
            useSimulcast: false,
            useL3T3: true
        }
}
Also read the deprecated max bitrates correctly, add unit tests to test it.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.
@jallamsetty1 jallamsetty1 requested a review from saghul October 27, 2023 18:33
*/
calculateEncodingsScaleFactor(localVideoTrack, codec, maxHeight) {
if (this.pc.isSpatialScalabilityOn() && this.isRunningInSimulcastMode(codec)) {
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scale factor needs to be reconfigured (for layer suspension) only for the full SVC case. For simulcast case, they remain constant.

return height / activeEncoding.scaleResolutionDownBy;
}

return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make this 0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this method returns null for cases when the send resolution cannot be determined. I think it makes sense to return null here.

* AV1 Dependency Descriptor header extensions is offered by Jicofo. H.264 simulcast is also possible when these
* header extensions are negotiated.
*/
this._supportsAv1HeaderExts = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't renaming this to supportsDDHeaderExt make more sense?


const parsedSdp = transform.parse(description.sdp);
const mLines = parsedSdp.media.filter(m => m.type === MediaType.VIDEO);
const extUri = 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe extract this to the top since it's a module level constant.


if (this._supportsAv1HeaderExts && shouldNegotiateHeaderExts && headerIndex < 0) {
mLine.ext.push({
value: 11,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 11?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 is the header ext id used by Jicofo/bridge for the DD RTP header extension. I have declared it as a variable now.

@@ -403,23 +401,25 @@ export default class JingleSessionPC extends JingleSession {
pcOptions.capScreenshareBitrate = false;
pcOptions.codecSettings = options.codecSettings;
pcOptions.enableInsertableStreams = options.enableInsertableStreams;
pcOptions.videoQuality = options.videoQuality;

if (options.videoQuality) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This converts all the videoQuality key values to lowercase so that the code is case insensitive.

Copy link
Member

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work! Left some nmon-blocking comments, which can be handled in subsequent PRs since I suppose we might need to tweak things a bit.

Also, is mobile ok with this change?

@jallamsetty1
Copy link
Member Author

Amazing work! Left some nmon-blocking comments, which can be handled in subsequent PRs since I suppose we might need to tweak things a bit.

Also, is mobile ok with this change?

Actually, thats a good idea. I will merge this and open a follow-up PR. I don't see many changes though. Yes, no issues with mobile.

@saghul
Copy link
Member

saghul commented Oct 31, 2023

Amazing work! Left some nmon-blocking comments, which can be handled in subsequent PRs since I suppose we might need to tweak things a bit.

Also, is mobile ok with this change?

Actually, thats a good idea. I will merge this and open a follow-up PR. I don't see many changes though. Yes, no issues with mobile.

Let's go then! 🙌

@jallamsetty1 jallamsetty1 merged commit 7b6ce94 into jitsi:master Oct 31, 2023
1 check passed
@jallamsetty1 jallamsetty1 deleted the feat/add-AV1-support branch October 31, 2023 17:40
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
subhamcyara pushed a commit to subhamcyara/lib-jitsi-meet that referenced this pull request Jul 19, 2024
Add SVC and Simulcast support for AV1 and VP9.

The default mode is the full SVC mode for VP9. It works as expected with the current version of JVB.
AV1 in the client is only supported when the bridge negotiates the Dependency Descriptor extension headers which are needed for reading the layer information for AV1 and H.264 video frames.

* feat: Enable H.264 simulcast support.
Multi-encoding simulcast for H.264 is supported now because of the DD header ext support added on the bridge side.

* fix(video-quality): Add default bitrates for all codecs.
Expect the videoQuality settings in the new format, deprecated configs are still supported.
videoQuality: {
    AV1: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1000000,
            ssHigh: 1500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    },
    H264: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP8: {
        maxBitratesVideo: {
            low: 200000,
            standard: 500000,
            high: 1500000,
            ssHigh: 2500000
        }
    },
    VP9: {
        maxBitratesVideo: {
            low: 100000,
            standard: 300000,
            high: 1200000,
            ssHigh: 2500000
        },
        useScalabilityModeAPI: {
            enabled: true,
            useSimulcast: true, //(defaults to SVC),
            useKSVC: true //(defaults to L3T3_KEY)
        },
    }
}

* Disable encodings when requested height for screenshare is 0.

* feat: add unit tests for scalability modes.

* ref: Move all encoding configuration calculation to TPCUtils.

* Add more unit tests for VP9 K-SVC mode.

* Make codec name in settings case insensitive.
Also read the deprecated max bitrates correctly, add unit tests to test it.

* ref(TPC): isSimulcastOn -> isSpatialScalabilityOn.
It makes more sense to call it spatial scalability than simulcast now that full SVC support is available.

* fix: Negotiate AV1 DD header exts only for AV1 and H.264.

* fix: Rename setting useL3T3Mode->useKSVC and adjust the defaults.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants