I have a proprietary app that has a WebRTC (m83) module which is used to broadcast a screencast of the app’s window. Instead of the app’s built-in WebRTC module I want to use the mediasoup suite.
I am able to access the origin of the screencast and I successfully hooked it to libmediasoupclient which sends the stream to mediasoup. Then I consume it in mediasoup-client in a modern browser. This works well.
But the app’s screencast setup seems to be optimized for its case - the video being static most of the time: if there is no change from the previous frame, it just displays black frames. In a way, this is similar to mediasoup-client’s “zeroRtpOnPause”. My libmediasoup enabled application just sends whatever it receives from the proprietary app, so there’s a black screen most of the time in the browser.
Do you know if this a default optimization of WebRTC for sending screencasts (VideoTrackSource->is_screncast(): true)?
Ideally I would like to take advantage of this optimization and adapt my setup such that the screen image in mediasoup-client is updated only when there’s a new non-black frame. Otherwise it should just display the last received frame.
Is this possible, or do I need to take care of the optimization at the application level?