Choosing the encoder for WebRTC streaming

Since MPlatform SDK version 1.6.1.8195 and MFormats SDK version 1.2.1.8194 you can choose one of predefined video and audio encoders for WebRTC streaming.

Choosing the encoder is very simple: you can specify it using registry settings:  
[HKEY_CURRENT_USER\SOFTWARE\Medialooks\WebRTC]
video_encoder = vp8
audio_encoder = opus

or WebRTC object properties with PropSet method:
m_objWebRTC.PropsSet("video_encoder", "vp8"); 
m_objWebRTC.PropsSet("audio_encoder", "opus");

possible video encoder values: 
  • "vp8" for VP8 encoder
  • "vp9" for VP9 encoder 
  • "h264" for H264 encoder (OpenH264) 

possible audio encoder values:  
  • "opus" for Opus encoder (48 kHz)
  • "isac16" for internet Speech Audio Codec (iSAC) encoder (16 kHz)
  • "isac32" for internet Speech Audio Codec (iSAC) encoder (32 kHz) 

The registry setting is be used by default and can be overridden with PropsSet method. 

Try choosing the encoder for WebRTC streaming using our sample  application: 


 
NOTE: Current version of Chrome browser supports VP8 and VP9 encoders only by default. So if you will use Webcam Receiver Sample with H264 encoder, you will not be able to receive a stream from web camera. Use VP8 or VP9 encoder instead.