All Products
Search
Document Center

:Live streaming

Last Updated:Jul 27, 2023

Video instances provide players for web applications, iOS applications, and Android applications. The players provide low-latency and high-quality live streaming.

Prerequisites

An IoT Platform instance of the video type is purchased, and a video device is connected to IoT Platform. For more information, see Device Connection.

Background information

  • The live streaming feature supports the following three video protocols. This feature also supports encrypted transmission for video streams and non-encrypted transmission for video streams. The following table describes the requirements that must be met before you transmit encrypted video streams.

    Video protocol

    Encryption and decryption methods

    HTTP Live Streaming (HLS)

    The HLS encryption. For more information, see HLS encryption.

    Real Time Messaging Protocol (RTMP)

    • Encryption: encrypts video I frames and audio frames in AES-128 based on keyframes.

    • Decryption: uses initialization vectors (IVs) and keys. You can obtain an IV and a key from the value of the DecryptKey field in the response that is returned for a QueryLiveStreaming call.

    HTTP-FLV

    • Encryption: encrypts video I frames and voice frames in AES-128 based on keyframes.

    • Decryption: uses initialization vectors (IVs) and keys. You can obtain an IV and a key from the value of the DecryptKey field in the response of a QueryLiveStreaming call.

  • When a live streaming request is received from a device, IoT Platform automatically triggers the stream pushing of the device. Make sure that the quota of the upstream bandwidth is sufficient for the network environment in which the device resides. Otherwise, video stuttering occurs. After the playback stops, IoT Platform automatically stops the stream pushing of the device and releases the upstream bandwidth.

Device-side development

Device-side development is required when your IP camera is directly connected to IoT Platform. For more information, see Device-side development.

Cloud-side development

You can call the QueryLiveStreaming operation to obtain the URL that can be used by a device to start live streaming.

Note

Each URL is valid for 10 seconds. A URL is valid for only once.

Application-side development

If you want to enable the live streaming feature on an application, you must configure a player on the application.

LinkVisual allows you to configure players on web applications, iOS applications, or Android applications. For more information about how to configure a player on an application, see Guide to application-side development.

The following table describes the playback protocols and encoding protocols that are supported by application-specific players.

Note
  • The playback latency of RTMP or HTTP-FLV is lower than the playback latency of HLS. The playback latency of HLS ranges from 5 seconds to 10 seconds.

  • Make sure that the encoding protocol configured for IP cameras meets your business requirements. Otherwise, errors may occur during live streaming.

Player

Playback protocol

Video encoding protocol

Audio encoding protocol

Web

  • HLS

  • HTTP-FLV

H.264

  • Advanced Audio Coding (AAC)

  • G.711

iOS

  • RTMP

  • HLS

  • H.264

  • H.265

Android

  • RTMP

  • HLS

  • H.264

  • H.265

What to do next

After you obtain the live streaming URL of a device by using the player of an application, you can start live streaming.