How to Use

Last update:2023-12-19 15:19:13

This document is to guide you how to config WebRTC for your streams.

Usually, it’s RTMP push stream and WebRTC pull stream.

RTMP push stream

you can use OBS to push your stream. (push stream need to remove B frame because WebRTC video encoding doesn’t support B frame, otherwise your playback will be stuterring.)


WebRTC pull stream

CDNetworks support WebRTC pull stream for 3 client types: Web, IOS, Android.

  1. Web
    we provide H5 demo for you to test: http://webrtc-demo.8686c.com/cdnwplayer/play.html
    If customer is good with the test performance, contact our customer service to help embed.
    Note: H5 client only support the standard webRTC, that is to say, B frame and AAC are not support, if customer’s push stream requires B frame or andio format is AAC, will need do extra transcoding, it will gain latency.
  2. IOS/Android
    we provide sdk for customer, our sdk can support B frame, H265 and AAC.
    If you want to test our sdk, please contact customer service.

In addition, CDNetworks also provide WebRTC push stream if needed.

WebRTC push stream

note:
WebRTC supports only Opus for audio encoding and H.264 without B frame for video encoding when pulling streams. If you push streams through any other protocol (for example RTMP, which uses AAC format of audio, or normal H.264 with B frame), you need to transcode RTMP into standard WebRTC for stream pulling, which increases latency and costs due to transcoding.
there need several steps to make sure you can use OBS to push WebRTC stream.
First of all, you need to make sure:

  1. your OBS version is 26 or over it. https://obsproject.com/download
  2. install CDNetworks plug-in, which is only supported for Windows version. obs-webrtc-plugin

Then follow below steps to configure.

  1. Upzip the plug-in zip file, copy “services.json” file from the path: “obs-webrtc-plugin\data\obs-plugins\rtmp-services”
  2. Replace the “services.json” file under your OBS installation directory(you need to find the path in your laptop)
  3. copy the “obs-webrtc.dll” file from the path:“obs-webrtc-plugin\obs-plugins\64bit” under your OBS installation directory.

    Now, the settings are completed. but if in the next step, you are not able to push stream, please check below.
  4. Check this directory “C:\Users\xxx\AppData\Roaming\obs-studio\plugin_config\rtmp-services”, also update the “services.json” file here as well.

Now, the settings are completed. Then ask customer service to get the push URL and pull URL.

Then, you can open your OBS settings and config as below. you will find wangsu webRTC after your webRTC setting finished and succeed. and type in your push url into the stream key field.

If all your settings are good and you still cannot push the stream, it might because your OBS version too high, please try lower your OBS version to 26 and try again.

Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!