Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since WCS build 5.2.1504 a stream can be played from server via WebRTC in a number of video qualities like HLS ABR. A browser will play a first available quality track, then playing client can switch between quailities qualities if necessary.

Since builds WCS 5.2.1663 and SFU SDK 2.0.231 player may switch between available ABR qualities automatically when playback channel state is changing. Automatic quality switching is based on WebRTC playback statistics data.

Supported platforms and browsers

...

WCS must be restarted to apply the quality profiles settings.

Using the same video quality profiles for HLS ABR and WebRTC ABR

Since build 5.2.1665, if video quality profiles are equal for HLS ABR and WebRTC ABR configurations, the same encoders will be used. For example, with WebRTC ABR setup

Code Block
languageyml
themeRDark
profiles:
  240p:
    height: 240
    bitrate: 500
    codec: h264
    gop: 60
    fps: 30

  480p:
    height: 480
    bitrate: 1000
    codec: h264
    gop: 60
    fps: 30

  720p:
    height: 720
    bitrate: 1500
    codec: h264
    gop: 60
    fps: 30

and HLS ABR setup

Code Block
languageyml
themeRDark
profiles:
  -240p:
    audio:
      codec: mpeg4-generic
      rate: 48000
      channels: 2
      groupId: audio
    video:
      height: 240
      bitrate: 500
      codec: h264
      gop: 60
      fps: 30
      audioGroupId: audio

  -480p:
    audio:
      codec: mpeg4-generic
      rate: 48000
      channels: 2
      groupId: audio
    video:
      width: 0
      height: 480
      bitrate: 1000
      codec: h264
      gop: 60
      fps: 30
      audioGroupId: audio

  -720p:
    audio:
      codec: mpeg4-generic
      rate: 48000
      channels: 2
      groupId: audio
    video:
      width: 0
      height: 720
      bitrate: 1500
      codec: h264
      gop: 60
      fps: 30
      audioGroupId: audio

only 3 video encoders will be created

Image Added

The following video profile parameters should be equal if they are set:

  • height
  • width (if set and not equal to 0)
  • codec
  • bitrate
  • fps
  • gop
  • profile
  • level
  • codecImpl

Video quality profiles sorting

Since build 5.2.1663, video quality profiles will be sorted in the order set in /usr/local/FlashphonerWebCallServer/conf/wcs_sfu_bridge_profiles.yml file. For example, if the profiles described like this

Code Block
languageyml
themeRDark
profiles:
  240:
    height: 240
    bitrate: 500
    codec: h264
    gop: 60
    fps: 30

  480:
    height: 480
    bitrate: 1000
    codec: h264
    gop: 60
    fps: 30

  720:
    height: 720
    bitrate: 1500
    codec: h264
    gop: 60
    fps: 30

  1080:
    height: 1080
    bitrate: 3000
    codec: h264
    gop: 60
    fps: 30

a client will receive a profiles list ordered like

Code Block
themeRDark
240, 480, 720, 1080

If there are two profiles with the same name in the setup, an undefined behavior occurs. To resolve it, server will use only the last profile with the same name.

Force transcoding of a maximum ABR quality only if there are B-frames in a source stream

To reduce a server load while video encoding, since WCS build 5.2.1840 it is possible to transcode a maximum ABR quality (which is usually the original stream resolution and bitrate) only if there are B-frames in a source stream. The feature may be enabled by the following parameter

Code Block
themeRDark
h264_b_frames_force_transcoding=true

In this case the server will detect B-frames in a stream analizing a certain frames count (10 by default)

Code Block
themeRDark
frame_cnt_to_determine_their_type=10

If there are B-frames in the stream, the maximum ABR quality will be transcoded and will be available for playback.

If there are no B-frames in the stream, the maximum ABR quality will not be transcoded. The original quality should be requested separately from a playing client.

Quick manual on testing

1. For test we use:

...