SetDirectCdnStreamingVideoConfiguration

Sets the video profile of the media streams directly pushed to the CDN by the host.

public abstract int SetDirectCdnStreamingVideoConfiguration(VideoEncoderConfiguration config);

Details

This method only affects video streams captured by cameras or screens, or from custom video capture sources. That is, when you set publishCameraTrack or publishCustomVideoTrack in DirectCdnStreamingMediaOptions as true to capture videos, you can call this method to set the video profiles.

If your local camera does not support the video resolution you set,the SDK automatically adjusts the video resolution to a value that is closest to your settings for capture, encoding or streaming, with the same aspect ratio as the resolution you set. You can get the actual resolution of the video streams through the OnDirectCdnStreamingStats callback.

Parameters

config
Video profile. See VideoEncoderConfiguration.
Note: During CDN live streaming, Agora only supports setting ORIENTATION_MODE as ORIENTATION_MODE_FIXED_LANDSCAPE or ORIENTATION_MODE_FIXED_PORTRAIT.

Returns

  • 0: Success.
  • < 0: Failure.