Skip to content

Commit

Permalink
Merge pull request #1556 from AgoraIO/endoc-279-Doc-update
Browse files Browse the repository at this point in the history
Sync with cn docs
  • Loading branch information
atovpeko authored Jun 18, 2024
2 parents fbd1fae + 6c04c2e commit a7f7565
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ When enabling <Vg k="SCR_SHR" /> on Android, you only need to call the `startScr

### Limitations


Be aware of the following limitations:

- The video unit price for a screen sharing stream is based on the **video resolution** you set in `ScreenCaptureParameters`. If you do not pass dimensions in `ScreenCaptureParameters`, <Vg k="COMPANY" /> bills you at the default resolution of 1920 x 1080 (2,073,600). See [Pricing](../overview/pricing) for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ Subscribing to your own track incurs additional charges, as illustrated in the f

![Electron Screen Share Subscribing Yourself Additional Charges](/images/video-sdk/screen-sharing-web-electron-subscribing-yourself.svg)

<Vg k="COMPANY" /> suggests that, to avoid double billing, the `uid` returned by each client after successfully joining a channel should be stored in a list. Each time a `user-published` event is monitored, first determine if the track is a local track, and if so, do not subscribe.
- <Vg k="COMPANY" /> suggests that, to avoid double billing, the `uid` returned by each client after successfully joining a channel should be stored in a list. Each time a `user-published` event is monitored, first determine if the track is a local track, and if so, do not subscribe.
- The client sharing the screen should not subscribe to any streams.

### Limitations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,44 +148,44 @@ This section contains information that completes the information in this page, o
### Video profiles table

<PlatformWrapper notAllowed="web">
<Vg k="VSDK" /> provides a selection of video dimensions, framerate, and bitrate to choose from. You can also customize the values according to the following table:

| Resolution (width × height) | Frame rate (fps) | Bitrate (Kbps) |
|---------------------------|------------------|------------------------|
| 160 × 120 | 15 | 110 |
| 120 × 120 | 15 | 90 |
| 320 × 180 | 15 | 240 |
| 180 × 180 | 15 | 160 |
| 240 × 180 | 15 | 200 |
| 320 × 240 | 15 | 300 |
| 240 × 240 | 15 | 240 |
| 424 × 240 | 15 | 370 |
| 640 × 360 | 15 | 680 |
| 360 × 360 | 15 | 440 |
| 640 × 360 | 30 | 1030 |
| 360 × 360 | 30 | 670 |
| 480 × 360 | 15 | 550 |
| 480 × 360 | 30 | 830 |
| 640 × 480 | 15 | 750 |
| 480 × 480 | 15 | 680 |
| 640 × 480 | 30 | 1130 |
| 480 × 480 | 30 | 1030 |
| 848 × 480 | 15 | 920 |
| 848 × 480 | 30 | 1400 |
| 640 × 480 | 10 | 600 |
| 960 × 540 | 15 | 1100 |
| 960 × 540 | 30 | 1670 |
| 1280 × 720 | 15 | 1600 |
| 1280 × 720 | 30 | 2400 |
| 960 × 720 | 15 | 1280 |
| 960 × 720 | 30 | 2000 |
| 1920 × 1080 | 15 | 2500 |
| 1920 × 1080 | 30 | 3780 |
| 1920 × 1080 | 60 | 5730 |
| 2560 × 1440 | 30 | 4850 |
| 2560 × 1440 | 60 | 7350 |
| 3840 × 2160 | 30 | 8910 |
| 3840 × 2160 | 60 | 13500 |
<Vg k="VSDK" /> provides a selection of video dimensions and frame rates to choose from. You can also customize the values according to the following table:

| Resolution (width × height) | Frame rate (fps) |
|------------------|------------------|
| 160 × 120 | 15 |
| 120 × 120 | 15 |
| 320 × 180 | 15 |
| 180 × 180 | 15 |
| 240 × 180 | 15 |
| 320 × 240 | 15 |
| 240 × 240 | 15 |
| 424 × 240 | 15 |
| 640 × 360 | 15 |
| 360 × 360 | 15 |
| 640 × 360 | 30 |
| 360 × 360 | 30 |
| 480 × 360 | 15 |
| 480 × 360 | 30 |
| 640 × 480 | 15 |
| 480 × 480 | 15 |
| 640 × 480 | 30 |
| 480 × 480 | 30 |
| 848 × 480 | 15 |
| 848 × 480 | 30 |
| 640 × 480 | 10 |
| 960 × 540 | 15 |
| 960 × 540 | 30 |
| 1280 × 720 | 15 |
| 1280 × 720 | 30 |
| 960 × 720 | 15 |
| 960 × 720 | 30 |
| 1920 × 1080 | 15 |
| 1920 × 1080 | 30 |
| 1920 × 1080 | 60 |
| 2560 × 1440 | 30 |
| 2560 × 1440 | 60 |
| 3840 × 2160 | 30 |
| 3840 × 2160 | 60 |

<Admonition type="caution" title="Note">
After you set the resolution and frame rate, the SDK automatically sets the corresponding bitrate. Agora does not recommend that you modify the bitrate manually.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@

<PlatformWrapper platform="android">

Use the `setVideoEncoderConfiguration` method to configure video encoding parameters.
You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear. Alternatively, you can call this method within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

```java
// Set the resolution, frame rate, bitrate, and screen orientation mode for video encoding
VideoEncoderConfiguration.VideoDimensions value = VD_640x360;
try {
// Retrieve the selected value from the interface to set the video dimensions
Field tmp = VideoEncoderConfiguration.class.getDeclaredField(dimension.getSelectedItem().toString());
tmp.setAccessible(true);
value = (VideoEncoderConfiguration.VideoDimensions) tmp.get(null);
} catch (NoSuchFieldException e) {
Log.e("Field", "Can not find field " + dimension.getSelectedItem().toString());
} catch (IllegalAccessException e) {
Log.e("Field", "Could not access field " + dimension.getSelectedItem().toString());
}

// Apply the configured video encoder settings
engine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(
value,
VideoEncoderConfiguration.FRAME_RATE.valueOf(framerate.getSelectedItem().toString()),
Integer.valueOf(et_bitrate.getText().toString()),
VideoEncoderConfiguration.ORIENTATION_MODE.valueOf(orientation.getSelectedItem().toString())
));
// Video encoding configuration
this.engine?.setVideoEncoderConfiguration({
// Set video codec type to H264
codecType: VideoCodecType.VideoCodecH264,
// Set video encoding resolution to 640 x 360 (px)
dimensions: {
width: 640,
height: 360,
},
// Set frame rate to 15 fps
frameRate: 15,
// Set bitrate mode to StandardBitrate
bitrate: 0,
// Set minimum encoding bitrate to 1 Kbps
minBitrate: -1,
// Set orientation mode to Adaptive
orientationMode: OrientationMode.OrientationModeAdaptive,
// Set degradation preference to MaintainQuality
degradationPreference: DegradationPreference.MaintainQuality,
// Disable mirror mode when sending encoded video
mirrorMode: VideoMirrorModeType.VideoMirrorModeDisabled,
});
```
</PlatformWrapper>
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

<PlatformWrapper platform="electron">

Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear; you can also call this method within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

```javascript
// Video encoding parameter configuration
// Configure video encoding parameters
this.engine?.setVideoEncoderConfiguration({
// Set the video codec type to H.264
// Set the video codec type to H264
codecType: VideoCodecType.VideoCodecH264,
// Set the video encoding resolution to 640 x 360 pixels
// Set the video encoding resolution to 640 x 360 (px)
dimensions: {
width: 640,
height: 360,
},
// Set the frame rate
// Set the frame rate to 15 fps
frameRate: 15,
// Set the bitrate mode to StandardBitrate
bitrate: 0,
// Set the minimum encoding bitrate
minBitrate: 1,
// Set the rotation mode to Adaptive
// Set the minimum encoding bitrate to 1 Kbps
minBitrate: -1,
// Set the orientation mode to Adaptive
orientationMode: OrientationMode.OrientationModeAdaptive,
// Set the degradation preference to MaintainQuality
degradationPreference: DegradationPreference.MaintainQuality,
// Disable mirroring mode when sending encoded video
// Disable mirror mode when sending encoded video
mirrorMode: VideoMirrorModeType.VideoMirrorModeDisabled,
});
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@

<PlatformWrapper platform="flutter">

Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear, or you can call it within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

```dart
await _engine.setVideoEncoderConfiguration(
const VideoEncoderConfiguration(
// Set resolution
dimensions: VideoDimensions(width: 1920, height: 1080),
// Set frame rate
frameRate: 15,
// Set bitrate
bitrate: 800,
// Set rotation mode
orientationMode: OrientationMode.orientationModeAdaptive,
// Set degradation preference
degradationPreference: DegradationPreference.maintainQuality,
dimensions: VideoDimensions(width: 1920, height: 1080), // Set resolution
frameRate: 15, // Set frame rate
bitrate: 800, // Set bitrate
orientationMode: OrientationMode.orientationModeAdaptive, // Set orientation mode
degradationPreference: DegradationPreference.maintainQuality, // Set degradation preference
),
);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ agoraKit.setVideoEncoderConfiguration(AgoraVideoEncoderConfiguration(size: resol
bitrate: AgoraVideoBitrateStandard,
orientationMode: orientation))
```

</PlatformWrapper>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<PlatformWrapper platform="react-native">

Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear; you can also call this method within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<PlatformWrapper platform="unity">

Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear. Alternatively, you can call this method within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

Expand All @@ -17,14 +17,15 @@ VideoEncoderConfiguration config = new VideoEncoderConfiguration
bitrate = 0,
// Set the minimum encoding bitrate to 1 Kbps
minBitrate = 1,
// Set the rotation mode to ADAPTIVE
// Set the orientation mode to ADAPTIVE
orientationMode = ORIENTATION_MODE.ORIENTATION_MODE_ADAPTIVE,
// Set the degradation preference to MAINTAIN_FRAMERATE
degradationPreference = DEGRADATION_PREFERENCE.MAINTAIN_FRAMERATE,
// Set the mirror mode to AUTO when sending encoded video
// Set the mirror mode for encoding video to AUTO
mirrorMode = VIDEO_MIRROR_MODE_TYPE.VIDEO_MIRROR_MODE_AUTO
};
// Set video encoding properties
// Set the video encoding properties
RtcEngine.SetVideoEncoderConfiguration(config);
```

</PlatformWrapper>
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@

<PlatformWrapper platform="unreal">

Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear; alternatively, you can call this method within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

```cpp
// Create a video encoding configuration object
VideoEncoderConfiguration videoConfig;

// Set the video width
videoConfig.dimensions.width = 1280;

// Set the video height
videoConfig.dimensions.height = 720;
videoConfig.dimensions.height = 720;

// Set the frame rate to 15 fps
videoConfig.frameRate = FRAME_RATE_FPS_15;
videoConfig.frameRate = FRAME_RATE_FPS_15;

// Set the bitrate to 800 Kbps
videoConfig.bitrate = 800 * 1000;
// Set the rotation mode to ADAPTIVE
videoConfig.orientationMode = ORIENTATION_MODE_ADAPTIVE;
videoConfig.bitrate = 800 * 1000;

// Set the orientation mode to ADAPTIVE
videoConfig.orientationMode = ORIENTATION_MODE_ADAPTIVE;

// Set the degradation preference to MAINTAIN_QUALITY
videoConfig.degradationPreference = MAINTAIN_QUALITY;
videoConfig.degradationPreference = MAINTAIN_QUALITY;

// Apply the video encoding configuration
rtcEngine->setVideoEncoderConfiguration(videoConfig);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<PlatformWrapper platform="windows">
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method at any point after initialization, whether it's before or after joining a channel. For optimal performance, best practice is to enable the video module by calling `enableVideo` before calling `setVideoEncoderConfiguration`. This approach reduces the time required for the first frame to be generated.
Use the `setVideoEncoderConfiguration` method to configure video encoding parameters. You can call this method before `enableVideo` to speed up the time for the first frame to appear. Alternatively, you can call this method within the channel to flexibly adjust video encoding properties.

To set video encoder configuration, refer to the following code:

Expand All @@ -22,6 +22,5 @@ videoConfig.degradationPreference = MAINTAIN_QUALITY;

// Apply the video encoding configuration
rtcEngine->setVideoEncoderConfiguration(videoConfig);

```
</PlatformWrapper>
Loading

0 comments on commit a7f7565

Please sign in to comment.