Instant video loading solution is a technology that enables users to access video content instantly, reducing buffering and enhancing user experience. This solution is crucial for applications like live streaming, video calls, and online meetings. It ensures smooth and uninterrupted playback, whether for business collaborations, social interactions, or entertainment.
As demand for seamless digital experiences grows in remote work, gaming, and education, instant video loading is essential. It improves user engagement by eliminating delays, allowing for immediate access to video content. In live streaming, virtual classrooms, or team meetings, this solution ensures a lag-free, immersive video experience. To integrate the solution easily, you can use ZEGOCLOUD Video Call SDK.
What is Instant Video Loading?
Instant Video Loading allows users to see video content instantly after joining a live stream or video call. This reduces wait times and significantly improves the user experience by providing immediate access to the video feed.
In live streaming, it ensures seamless switching between streams, even when scrolling up or down. This eliminates any black screens, buffering, or stuttering, creating a smoother, uninterrupted viewing experience. The result is a faster, more fluid interaction that keeps users engaged.
ZEGOCLOUD Instant Video Loading Solution
To ensure quick loading of the host stream, ZEGOCLOUD optimizes the travel time of audio and video data from capture to rendering, focusing on two key areas:
- Reducing time at each stage of the video transmission process.
- Shifting from serial to parallel task execution for greater efficiency.
Reduction of Time Consumption at All Stages
As shown in the figure, the complete audio/video transmission process consists of 9 stages, where ZEGOCLOUD has made efforts to reduce transmission time.
Stages | Optimization |
establish contact | To minimize the connection establishment time, we have built a proximity access service that allows connections to be established in the closest, fastest way possible. |
video capture | To increase the acquisition rate, we will choose the optimal acquisition parameters and call the most efficient system API according to the user’s scenario, equipment, and system model. |
pretreatment | To achieve the best balance between user experience and transmission efficiency, we are constantly optimizing our pre-processing algorithms, the original 3A algorithm, to be able to deal with echo, noise, and microphone sound volume control with the highest efficiency. |
video encoding | We use our own Z264 and Z265 encoding algorithms, with a 30% increase in encoding efficiency compared to the standard 264 and 265 algorithms. At the same time, the encoded data is smaller and can be transmitted at a lower bit rate with the same image quality. |
video transmission | We use ZEGOCLOUD’s private transport protocol for transmission, which allows us to flexibly control the retransmission mechanism, forward error correction, flow control policies, etc., greatly improving transmission efficiency. |
Jitter buffer | We use TSM (Time scale modification) technology to ensure optimal smoothness and latency. |
reprocess | In reprocessing, we use AI mini-models to achieve the effect of doing big things with small models in the processing of dirty block removal, motion compensation, frame loss compensation, and spatial audio. |
video decoding | Decoding is the same as encoding, using our self-developed coding and decoding algorithms to improve decoding efficiency. |
Shift from serial to parallel task execution
As shown in the figure, normal publish and subscription streaming are implemented serially, leading to longer process times. ZEGOCLOUD optimizes the SDK’s underlying architecture to enable parallel publishing and subscribing, significantly reducing overall time consumption.
Advantages of Instant Video Loading
ZEGOCLOUD’s underlying architecture features independently designed modules for rooms, streams, and signals. It enables concurrent processing. This significantly reduces the time to join a room and subscribe to a video stream.
By using the instant video loading solution shown in the picture below, video streams can be pulled by stream ID without waiting for notifications, greatly reducing the waiting time.
The time it takes in two modes to display the first frame of video on the same network | ||
Mode | First Frame Time | Optimization |
Normal Program | 916.45 ms | 0% |
Instant Video Loading Program | 599.7 ms | 34.6% |
Distribution of the time it takes different RTC vendors to pull the first frame of video | ||||
Vendor | Within 2s | Within 3s | Within 5s | Over 5s |
ZEGOCLOUD | 92% | 97% | 99% | 1% |
Competitor | 70% | 85% | 95% | 5% |
How to Implement Instant Video Loading
As shown before, simply know the stream ID and subscribe in advance, without waiting for a new stream notification.
Enable Instant Video Loading in the Server Configuration
To use the instant video loading function, please contact our technical support to enable it.
Set the Stream ID
Simply set the stream ID according to the rules, commonly using a prefix + room ID + user ID
format, such as:
Rule | Example |
main_roomID_userID | main_123456_user0000 |
Code Logic
Initialize SDK
func initSDK() {
ZegoExpressEngine.setRoomMode(.multiRoom)
// Initializing the SDK instance
let profile = ZegoEngineProfile()
profile.appID = appID
profile.appSign = appSign
profile.scenario = .general
ZegoExpressEngine.createEngine(with: profile, eventHandler: self)
}
Join Room and Publish Stream
func joinRoomAndPublishStream() {
// Creating a user object
let user = ZegoUser(userID: "userA")
// Logging in to a room
ZegoExpressEngine.shared().loginRoom("roomID", user: user)
// Starting to publish a stream
let streamID = "main_roomID_userA"
ZegoExpressEngine.shared().startPublishingStream(streamID)
}
Join Room and Subscribe to Stream
func joinRoomAndSubscribeStream() {
// Creating a user object
let user = ZegoUser(userID: "userB")
// Logging in to a room
ZegoExpressEngine.shared().loginRoom("roomID", user: user)
// Starting to subscribe a stream
let config = ZegoPlayerConfig()
config.roomID = "roomID"
let canvas = ZegoCanvas.view(self.view_A)
let streamID = "main_roomID_userA"
ZegoExpressEngine.shared().startPlayingStream(streamID, canvas: canvas, config: config)
}
Conclusion
In conclusion, instant video loading is a revolutionary technology. It significantly enhances the user experience by minimizing buffering and enabling instant access to video content. ZEGOCLOUD optimizes the video transmission process by reducing time across all 9 stages and supports parallel stream publishing and subscribing. With ZEGOCLOUD’s efficient solution, integrating this feature becomes effortless—just use the streamID for subscription in advance. This ensures faster load times and a more interactive experience for your users. Now, Sign up today and enjoy 10,000 minutes free of charge to start creating your live streaming app today and unlock endless possibilities for connection and engagement!
Let’s Build APP Together
Start building with real-time video, voice & chat SDK for apps today!