Talk to us
Talk to us
menu

Enhance Your Social App with Instant Video Loading Solution

Enhance Your Social App with Instant Video Loading Solution

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

    Instant Video Loading: Reduction of Time Consumption

    As shown in the figure, the complete audio/video transmission process consists of 9 stages, where ZEGOCLOUD has made efforts to reduce transmission time.

    StagesOptimization
    establish contactTo 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 captureTo 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.
    pretreatmentTo 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 encodingWe 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 transmissionWe 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 bufferWe use TSM (Time scale modification) technology to ensure optimal smoothness and latency.
    reprocessIn 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 decodingDecoding is the same as encoding, using our self-developed coding and decoding algorithms to improve decoding efficiency.

    Shift from serial to parallel task execution

    Instant Video Loading: Serial to Parallel Tasks

    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.

    Instant Video Loading Advantages

    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
    ModeFirst Frame TimeOptimization
    Normal Program916.45 ms0%
    Instant Video Loading Program599.7 ms34.6%
    Distribution of the time it takes different RTC vendors to pull the first frame of video
    VendorWithin 2sWithin 3sWithin 5sOver 5s
    ZEGOCLOUD92%97%99%1%
    Competitor70%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:

    RuleExample
    main_roomID_userIDmain_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!

    Talk to us

    Take your apps to the next level with our voice, video and chat APIs

    Free Trial
    • 10,000 minutes for free
    • 4,000+ corporate clients
    • 3 Billion daily call minutes

    Stay updated with us by signing up for our newsletter!

    Don't miss out on important news and updates from ZEGOCLOUD!

    * You may unsubscribe at any time using the unsubscribe link in the digest email. See our privacy policy for more information.