You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: shared/video-sdk/enhance-call-quality/configure-video-encoding/index.mdx
+88-80Lines changed: 88 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@ import NotAvailable from '@docs/shared/common/not-available.mdx'
4
4
5
5
Customer satisfaction with your <Vgk="VIDEO"/> integrated <Vplk="CLIENT" /> depends on the quality of video and audio it provides. The sharpness, smoothness, and overall quality of the video is directly linked to the frame rate, bitrate, and other video encoder settings. Choosing improper settings can result in poor video quality. Conversely, if the settings are too demanding, the available bandwidth quickly gets choked, leading to a suboptimal experience for your users.
6
6
7
-
<PlatformWrapperplatform="web">
8
-
Try out the [online demo](https://webdemo-global.agora.io/index.html) to [Adjust video profile](https://webdemo-global.agora.io/example/advanced/adjustVideoProfile/index.html).
9
-
</PlatformWrapper>
10
-
11
7
<PlatformWrappernotAllowed="react-js">
12
8
13
9
This page guides you on configuring the video encoder settings to ensure optimal video quality in your <Vpdk="NAME" /> <Vplk="CLIENT" />.
@@ -18,49 +14,34 @@ In <Vg k="VSDK"/> you can set the video dimensions, framerate, bitrate, orientat
18
14
19
15
<PlatformWrappernotAllowed="web">
20
16
21
-
### Resolution, frame rate, and bitrate
17
+
####Resolution, frame rate, and bitrate
22
18
23
19
***Resolution**: Defines the video encoding resolution in pixels. The default value is `960 × 540`. Higher resolutions generally result in better video clarity. Note that this parameter does not determine the final video orientation. Refer to [Video orientation](#video-orientation) for setting the video output orientation.
24
20
25
21
***Frame rate**: Represents the number of frames encoded per second (FPS). The default value is `15` FPS. A higher frame rate contributes to smoother video playback. For use-cases demanding high video smoothness, consider setting this parameter to `20` or `25`. It is advised not to exceed a frame rate of `30`.
26
22
27
23
***Bitrate**: Indicates the video encoding bitrate in Kbps. The default mode is set to *Standard Bitrate*. In this mode, the <Vgk="VSDK"/> dynamically sets an appropriate bitrate based on the channel profile, resolution, and frame rate.
28
24
29
-
To find a suitable bitrate for a given combination of dimensions and framerate, refer to the [Video profiles table](#video-profiles-table).
25
+
***Minimum bitrate**: Sets the minimum video encoding bitrate in Kbps. The SDK automatically adjusts bitrate based on network conditions. The default value for this parameter allows the SDK to determine the minimum bitrate automatically, which is recommended for most use cases. Setting this parameter higher than the default value forces the video encoder to maintain higher quality, but may increase packet loss and affect video playback smoothness.
26
+
27
+
<Vpdk="SDK" /> offers a variety of resolutions and frame rates to choose from. To specify your own configuration, refer to the [Video profiles table](#video-profiles-table).
30
28
31
29
To achieve high video quality, it's crucial to maintain a balanced relationship between resolution, bitrate, and frame rate. Higher resolutions necessitate a higher bitrate. If the bitrate is fixed, an excessively high frame rate can reduce the resolution.
32
30
33
31
The configured parameter settings represent maximum values under ideal conditions. In cases where video quality cannot reach the set maximum values due to network constraints or other factors, the actual values are adjusted to match the specified maximum resolution, frame rate, or bitrate as closely as possible.
34
32
35
-
<Admonitiontype="caution"title="Note">
36
-
Video encoder configuration settings may affect billing. If settings are lowered due to adaptation, billing is based on the video resolution actually subscribed to by the user. For details, see [Pricing](../overview/pricing).
33
+
<Admonitiontype="info">
34
+
Billing is based on actual video resolution, not configured settings. For example, if network adaptation reduces your video from 1280×720 to 640×360, you are billed for the lower resolution that users actually receive.
37
35
</Admonition>
38
36
39
37
</PlatformWrapper>
40
38
41
39
<PlatformWrapperplatform="web">
42
40
</PlatformWrapper>
43
41
44
-
### Recommended video settings
45
-
46
-
The recommended video settings vary by use-case. For example, in a one-to-one online class, the video windows of the teacher and student are both large, which calls for higher resolution, frame rate, and bitrate. However, in a one-to-many online class, the video windows are smaller. You can set lower resolution, frame rate, and bitrate to accommodate bandwidth limitations.
47
-
48
-
Use the following as a guide when configuring video settings for these use-cases:
The way video is displayed on the playing device depends on `orientationMode` used on the encoding device, orientation of the capturing device, orientation of the playing device, and whether screen rotation is enabled on the playing device. On the capturing device, you can set the `orientationMode` to:
66
47
@@ -70,21 +51,35 @@ The way video is displayed on the playing device depends on `orientationMode` us
70
51
71
52
***Fixed Portrait**
72
53
73
-
In this mode, the output video is always in landscape mode relative to the Status Bar. If the captured video is in portrait mode, the video encoder crops it. This method is suitable for situations where the receiving end cannot process the rotation information.
74
-
75
-
***Fixed Landscape**
76
-
77
54
In this mode, the output video is always in portrait mode relative to the Status Bar. If the captured video is in landscape mode, the video encoder crops it. This method is suitable for situations where the receiving end cannot process the rotation information.
55
+
56
+
***Fixed Landscape**
78
57
79
-
The following images illustrate different combinations.
58
+
In this mode, the output video is always in landscape mode relative to the Status Bar. If the captured video is in portrait mode, the video encoder crops it. This method is suitable for situations where the receiving end cannot process the rotation information, such as web browsers or legacy applications.
80
59
81
60
<PlatformWrapperplatform="ios, macos">
82
61
<Admonitiontype="caution"title="Note">
83
62
On the macOS platform, the Status Bar is always positioned directly above the vertical ground direction, so there is no UI (Screen rotation) lock. The UI lock below applies only to the iOS platform.
84
63
</Admonition>
85
64
</PlatformWrapper>
86
65
87
-
#### Orientation mode: _Adaptive_
66
+
The following table shows how video orientation behaves under different mode and device configurations:
67
+
68
+
| Orientation mode | Screen rotation | Capturing device | Recording server | Receiving end display |
To enhance the video experience for users in low-bandwidth conditions, the <Vgk="VSDK"/> offers the `degradationPreference` parameter. This parameter allows you to set your preference for video encoding downgrade when bandwidth is limited.
124
+
#### Degradation preference
124
125
125
-
### Mirror mode
126
-
127
-
By default, Video SDK does not mirror the video during encoding. You use the `mirrorMode` parameter to decide whether to mirror the video that remote users see.
126
+
To enhance the video experience for users in low-bandwidth conditions, the <Vgk="VSDK"/> offers the `degradationPreference` parameter. This parameter determines how video adapts when bandwidth is limited: prioritize frame rate for smooth playback, prioritize resolution for visual clarity, balance both qualities, or let the SDK decide automatically based on the scenario.
128
127
129
-
###Minimum encoding frame rate
128
+
#### Mirror mode
130
129
131
-
For specific requirements related to video quality or transmission frame rate, adjust the minimum encoding frame rate parameter `minBitrate`. It sets the minimum video encoding bitrate in Kbps. The <Vgk="VSDK"/> performs bitrate adaptation based on network conditions. Increasing this parameter beyond the default value compels the video encoder to produce high-quality images, but it may lead to increased packet loss, affecting video playback smoothness.
132
-
133
-
<Admonitiontype="caution"title="Caution">The default value of `minBitrate` meets the requirements of most real-time use-cases. For general use-cases, <Vgk="COMPANY"/> suggests not changing the default value.</Admonition>
130
+
By default, Video SDK does not mirror the video during encoding. You use the `mirrorMode` parameter to decide whether to mirror the video that remote users see.
134
131
135
132
</PlatformWrapper>
136
133
137
134
## Prerequisites
138
135
Ensure that you have implemented the [SDK quickstart](../../video-calling/get-started/get-started-sdk) in your project.
139
136
140
-
## Implement video encoder configuration
137
+
## Implementation
141
138
142
139
<ProjectImplement/>
143
140
141
+
### Troubleshooting
142
+
143
+
The following are some common issues and their solutions:
144
+
145
+
| Issue | Possible solution |
146
+
|--------|--------------------|
147
+
|**Blurry video**| Increase resolution or bitrate |
148
+
|**Choppy/laggy playback**| Reduce resolution, increase minimum bitrate, or use maintain framerate degradation |
149
+
|**High bandwidth usage**| Lower resolution or frame rate |
150
+
|**Video orientation incorrect**| Use fixed portrait or fixed landscape orientation mode |
151
+
144
152
## Reference
145
153
146
154
This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.
@@ -152,42 +160,42 @@ This section contains content that completes the information on this page, or po
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.
0 commit comments