Video stuttering when playing OSS-hosted content typically has two root causes: the video file exceeds the recommended bitrate for smooth delivery, or Alibaba Cloud CDN fetches the entire file from OSS before serving any data to the viewer. Address both causes in the order listed below.
Check the video bitrate and resolution
A bitrate that exceeds the viewer's available bandwidth causes the player to stall while waiting for data. Verify that your video meets the following specs before uploading to OSS:
| Parameter | Recommended value |
|---|---|
| Resolution | 1920 x 1080 |
| Bitrate | 500–4,000 Kbit/s |
If the video exceeds these values, re-encode it to a lower bitrate before uploading. For the full list of supported resolutions and bitrates, see What resolutions and bitrates does ApsaraVideo Live support?
Enable range origin fetch in Alibaba Cloud CDN
Without range origin fetch, a CDN point of presence (POP) must download the entire video file from OSS before it can serve any portion to the viewer. This causes long initial load times and stuttering, especially for large files.
When range origin fetch is enabled, the CDN POP includes a Range header in its back-to-origin request. OSS responds with only the requested byte range, so the CDN POP can start serving data to the viewer immediately while fetching the rest in the background.
| State | Behavior |
|---|---|
| Range origin fetch disabled | CDN POP downloads the entire file from OSS before serving the viewer |
| Range origin fetch enabled | CDN POP fetches and serves byte ranges on demand; playback starts sooner |
Enabling range origin fetch:
Reduces the time before playback starts
Increases the cache hit ratio for partial content requests
Reduces origin traffic and load on OSS
Speeds up resource loading
To enable range origin fetch, see Configure range origin fetch.