ZEGO Real-Time Video iOS (Objective-C) SDK

website·Indexed 34 days ago

https://doc-zh.zego.im/real-time-video-ios-oc/introduction/entry

A real-time audio and video interaction service providing low-latency (down to 200ms) communication for iOS using Objective-C. The SDK includes features for room management, stream publishing and subscribing, multi-source capture, cloud and local proxies, and audio/video preprocessing. It supports various scenarios such as video calling and live streaming with built-in QoS strategies and 3A processing.

Tokens
1.6M
Snippets
8.5K
Records
11.4K
Agent score
63%

What's inside ZEGO

  1. Overview of Object Segmentation and Alpha Channel Transmission

    ZEGO Express SDK provides object segmentation and Alpha data transmission to create immersive video interactions. Instead of standard rectangular video areas, the SDK captures the original video and appends Alpha information (representing transparency) to the bottom of the frame, creating a video with double the height. The receiving end separates the original video from the Alpha data and uses the Alpha channel to render only the main subject, making the background transparent. This allows multiple users from different locations to be rendered onto a single shared background image or video.
  2. Overview of CDN Stream Publishing Authentication

    CDN stream publishing authentication prevents unauthorized users from stealing push URLs or forging them to cause traffic loss. When enabled via the ZEGO Console, push URLs must include specific authentication parameters to be accepted.

    Important Notes:

    • Keep your authentication KEY secure.
    • If using RTC-to-CDN or Mixed-stream-to-CDN, ZEGO servers generate these parameters automatically. You only need to manually generate them if pushing from a third-party platform.
    • Choose the authentication method based on your AppID's primary business region:
      • Mainland China: Use Tencent Cloud or Huawei Cloud authentication.
      • Hong Kong, Macau, Taiwan, or Overseas: Use Wangsu Cloud authentication.
  3. Overview of Zego Real-Time Video for iOS (Objective-C)

    Zego Real-Time Video provides a high-reliability, multi-platform audio and video interaction service with ultra-low latency for global users. It is designed for developers who need to integrate real-time communication into iOS applications using Objective-C.
  4. Overview of Multi-Source Capture

    Multi-source capture allows developers to manage audio and video source configurations for different channels. This enables real-time interaction features such as screen sharing and audio mixing.

    Key Characteristics and Constraints:

    • Multiple audio/video sources can be set for a streaming channel, but a single source can only be occupied by one channel at a time.
    • The main stream supports dynamic switching of audio/video sources and audio mixing. Auxiliary streams only support specifying the capture source before streaming and do not support mixing.
    • For screen capture, only iOS and Android support simultaneous video and audio capture; other platforms only support video capture (audio must be implemented manually).
  5. Overview of Video Enhancement Features in ZEGO Express SDK

    The ZEGO Express SDK provides several video pre-processing enhancement capabilities to adjust the visual quality of the stream at the publishing end:

    • Basic Beauty: Adjusts whitening, smoothing, sharpening, and rosy effects to improve skin appearance.
    • Low-Light Enhancement: Increases brightness in dark environments to ensure faces are visible or recognizable. Supports automatic mode and AI-based algorithms.
    • Video Noise Reduction: Reduces visual noise caused by poor camera quality or low light.
    • Color Enhancement: Increases saturation of under-saturated colors while protecting skin and lip tones for a more realistic look.
  6. Overview of CDN Live Streaming in ZEGO Express SDK

    ZEGO Express SDK supports pushing streams to a Content Delivery Network (CDN) via two methods: Relay CDN and Direct-to-CDN. This allows users to watch live content via web browsers or third-party players.

    Technical Constraints:

    • Audio formats supported: AAC, MP3.
    • Video formats supported: H.264, H.265 (requires CDN configuration).
    • CDN authentication is enabled by default for security.
  7. Overview of Object Segmentation in Zego Express SDK

    Object Segmentation is a premium AI-driven feature that identifies subjects in a video frame and assigns transparency (Alpha channel) to pixels. Subject pixels are set to opaque, while non-subject pixels are set to transparent. This enables features such as background blur, virtual backgrounds, and 'speaker mode' (rendering the subject over other content).

    Two types of segmentation are supported:

    1. Green Screen Segmentation: Specifically for users with a physical green screen (ideal for e-commerce or exams).
    2. Any Background Segmentation: AI-based subject identification without the need for a green screen (ideal for online education or meetings).

    Important Constraints:

    • This is a paid feature and requires a special SDK build from ZEGO technical support (provide your AppID).
    • Only one streaming channel can have object segmentation enabled at a time to conserve system resources.
    • Third-party filters used for pre-processing must support Alpha channel pass-through.
  8. Overview of ZEGO Media Player capabilities

    The Media Player component allows developers to play audio and video media files and supports streaming the played media data to remote users. Common use cases include playing test audio to verify devices, playing background music mixed into a stream, and streaming video files using custom video capture.
  9. Overview of ZEGO Cloud Proxy modes

    Cloud Proxy routes all SDK traffic through a cloud-based proxy server to enable communication with RTC and L3 services in restrictive network environments. There are two available modes:

    1. Standard Cloud Proxy: Directly uses the cloud proxy mode upon SDK initialization. Best for environments with strict internal network restrictions (e.g., hospitals, government offices).
    2. Intelligent Cloud Proxy: Attempts a direct connection first. If no connection is established within 1 second and the user is on a non-cellular network, it automatically switches to Cloud Proxy mode. Best for mixed environments where users may be on either public or restrictive networks.
  10. Overview of H.265 Video Coding in ZEGO Express SDK

    H.265 is a high-efficiency video coding standard supported by the ZEGO Express SDK (version 2.12.0 and higher). It is designed to transmit higher quality video under limited bandwidth, typically reducing the bitrate by approximately 30% compared to H.264 for the same image quality.

    Key considerations:

    • Performance: H.265 software encoding consumes about 3x the computing power of H.264, and software decoding consumes about 1.5x.
    • Compatibility: Most devices support hardware encoding and decoding for H.265, but older or low-end devices may not.
    • Platform Limitation: H.265 stream pulling is currently NOT supported on Web and Mini Program platforms.
    • Version Requirement: All clients must be upgraded to version 2.12.0 or higher to avoid decoding anomalies when using H.265.
  11. Overview of ZEGO Express SDK Video Calling Concepts

    To implement real-time video calling with the ZEGO Express SDK for Android Java, it is important to understand the following core concepts:

    • ZEGO Express SDK: A real-time audio and video SDK providing high-definition, low-latency communication services.
    • Stream: A set of audio/video data encapsulated in a specific encoding format. A user can push multiple streams (e.g., camera and screen share) and pull multiple streams. Each stream is identified by a streamID.
    • Pushing a Stream: The process of sending encapsulated audio/video data to the ZEGO cloud.
    • Pulling a Stream: The process of retrieving and playing an existing audio/video stream from the ZEGO cloud.
    • Room: A virtual space used to organize users. Users must log into a room to push or pull streams. A room is uniquely identified by a roomID within a specific AppID.
  12. Overview of CDN Live Streaming options

    ZEGO Express SDK provides two ways to stream to a CDN to allow users to watch content via web browsers or third-party players:

    1. Relay CDN (Recommended): The stream is first pushed to the ZEGO Real-Time Audio-Video Cloud and then relayed to a ZEGO or third-party CDN. This allows the use of ZEGO's real-time interactive services (e.g., co-hosting/mic-sharing). Ideal for show-hosting or voice chat rooms.
    2. Direct CDN: The stream is pushed directly from the local client to the CDN, bypassing the ZEGO cloud. ZEGO's real-time interactive services are unavailable. Ideal for single-stream broadcasts like e-commerce, gaming, or large online classes.

    Technical Constraints:

    • Audio: Supports AAC and MP3.
    • Video: Supports H.264 and H.265 (requires CDN configuration).