what is the codec of the Screen Sharing ?

burak guder

Member
I want to share screen with re-publish (rtmp-push) feature but only h264 codec can be used because the v8 cod requires extra core usage.
How do I ensure that only h264 is used in webrtc inputs?
 

Max

Administrator
Staff member
H.264 is used by default.
Some devices and browsers do not support H.264 codec.
In such a case VP8 is used.

On WebRTC end you can remove all other codecs using stripCodecs option

1. On WebRTC client.
Code:
publishStream = session.createStream({

    ...
    stripCodecs: "vp8,VP8"
}).on(STREAM_STATUS.PUBLISHING, function (publishStream) {
    ...
});
publishStream.publish();
2. Or globally on server.
Code:
codecs=opus,...,h264,...
Exclude VP8 from codec list.

If browser supports VP8 only and VP8 codec is removed, WebRTC session will not be established with error.
 
Top