You can use Open Broadcaster Software (OBS), the Push SDK demo, or Push SDK to ingest a stream. This topic describes how to use these different methods to ingest a stream.
Prerequisites
An ingest URL is generated. For more information, see Generate ingest and streaming URLs.
Usage notes
ApsaraVideo Live does not allow you to ingest multiple streams to a URL at the same time. If you attempt to ingest multiple streams at the same time, only the first stream is ingested.
If you encounter issues such as stream ingest exceptions during stream ingest, you can use the troubleshooting tool to troubleshoot the issues. The tool allows you to diagnose common stream ingest issues and provides suggestions for you to resolve specific exceptions. For more information, see Troubleshooting.
If you use a third-party stream ingest tool, we recommend that you configure high availability policies to respond to stream ingest failures and alarms. This prevents your live streaming business from being interrupted by stream ingest failures caused by system issues. You can also configure a callback to monitor the stream ingest status. This way, a streaming URL is issued after the stream is ingested. For more information, see Manage callbacks.
Use OBS to ingest a stream
OBS supports Windows, macOS, and Linux. In the following example, OBS Studio V27.2.3 for Windows is used. The operations that you perform to ingest a stream are similar for OBS Studio of other versions or on other platforms. For more information about how to use OBS, see Use OBS to ingest streams.
Download and install OBS Studio. Download link: OBS Studio.
Run OBS Studio.
In the menu bar, choose .
On the Settings page, click Stream and configure the following parameters.
Parameter
Description
Service
Select Custom....
Server
Enter the generated ingest URL that is signed. Example:
rtmp://demo.aliyundoc.com/app/stream?auth_key=1543302081-0-0-9c6e7c8190c10bdfb3c0************
.Stream Key
Leave this parameter empty.
Go to the homepage of OBS Studio. Find the Sources section, add a source, and then click Start Streaming.
(Optional) Install the Queen SDK plug-in for OBS to debug retouching effects. For more information, see User guide to the Queen SDK plug-in for OBS.
In the ApsaraVideo Live console, go to the Stream Management page. On the Active Streams tab, you can view and manage the ingested audio or video stream.
Use the Push SDK demo to ingest a stream
Use a mobile device to scan the QR code to download the Push SDK demo.
NoteIf you use an iOS device and receive a message indicating that the demo is from an untrusted enterprise developer, tap
. On the page that appears, find the permissions required by Taobao and tap Trust.Run the Push SDK demo.
Select Camera Pushing or Screen Sharing.
NoteOnly YUV files are allowed when you ingest local streams from a mobile device.
Enter the generated ingest URL that is signed. Example:
rtmp://demo.aliyundoc.com/app/stream?auth_key=1543302081-0-0-9c6e7c8190c10bdfb3c0************
. Configure other parameters based on your business requirements.Click Start to start stream ingest.
In the ApsaraVideo Live console, go to the Stream Management page. On the Active Streams tab, you can view and manage the ingested audio or video stream.
Use Push SDK to ingest a stream
Push SDK for iOS
Integrate Push SDK for iOS. For more information, see SDK integration.
Configure the stream ingest parameters based on your business requirements and ingest a stream. For more information, see Use Push SDK for iOS.
Exceptions may occur when you configure the stream ingest parameters or ingest a stream. For more information, see Handle errors, exceptions, and special cases.
Push SDK for Android
Integrate Push SDK for Android. For more information, see SDK integration.
Configure the stream ingest parameters based on your business requirements and ingest a stream. For more information, see Use Push SDK for Android.
Exceptions may occur when you configure the stream ingest parameters or ingest a stream. For more information, see Handle errors, exceptions, and special cases.
Push SDK for Flutter
Integrate Push SDK for Flutter. For more information, see SDK integration.
Configure the stream ingest parameters based on your business requirements and ingest a stream. For more information, see Use Push SDK for Flutter.
Push SDK for Web
Integrate Push SDK for Web. For more information, see Integrate the co-streaming SDK for Web.
What to do next
After a stream is ingested, you can play the stream. For more information, see Live stream playback.
References
For information about stream management, see Manage streams.