All Products
Search
Document Center

ApsaraVideo Live:Windows

Last Updated:Mar 17, 2026

This document describes how to quickly run the ApsaraVideo Real-time Communication (ARTC) sample project and experience its real-time audio and video features.

Download the sample source code

Alibaba Cloud provides an open source sample project that demonstrates how to use the ARTC SDK APIs. This project helps developers more intuitively understand and integrate the SDK features. For more information, see the Windows sample project repository.

Prerequisites

Before running the sample project, ensure your development environment meets the following requirements:

  • Development tool: Visual Studio 2015 or later. Use the latest stable version.

  • Test device: A Windows PC running Windows 7 or later.

  • Network environment: Stable network connectivity.

  • Application setup: Obtain the AppID and AppKey for your ApsaraVideo Real-time Communication application. For details, see Create Application.

Procedure

Step 1: Get the sample project

Clone the ARTC sample project to your local machine:

git clone https://github.com/MediaBox-Demos/amdemos-artc
Note

This repository contains sample projects for multiple native platforms using the ARTC SDK. The Windows platform sample is located in the Windows/ folder.

The sample project includes client-side code for generating tokens to help you test.

The following shows the file structure of the Windows/ARTCExample project.

├── Windows                            // Root directory of the Windows project structure
│   ├── ARTCExample                    // Source code directory for the API example
│       ├── ARTCExampleDefine.h        // Set AppId, AppKey, and other information
│       ├── include                    // ARTC SDK header files directory
│           ├── ...                    // Other files
│   ├── lib                            // ARTC SDK static library directory
│       ├── x64                        // x64 version of ARTC libraries
│           ├── AliRTCSdk.lib           // Symbol file
│           ├── ...                    // Other ARTC SDK files
│       ├── x86                        // x86 version of ARTC libraries
│           ├── AliRTCSdk.lib           // Symbol file
│           ├── ...                    // Other ARTC SDK files
│   ├── ARTCExample.sln                // Demo project file

Step 2: Configure the sample project

  1. After downloading the source code, open the Windows folder.

  2. You can go to SDK download/integration to download the Windows ARTC SDK. You must place the static libraries in the lib folder and the header files in the include folder as shown above. After successfully compiling the main project, you must place the DLL files in the project's output directory.

  3. In the Windows folder, open the project file ARTCExample.sln.

  4. Configure your ApsaraVideo Real-time Communication AppID and AppKey. Open the file Windows/ARTCExample/ARTCExampleDefine.h and enter the AppID and AppKey obtained from the console.

#define ARTC_APP_ID  <ApsaraVideo Real-time Communication AppID>
#define ARTC_APP_KEY <ApsaraVideo Real-time Communication AppKey>

Step 3: Compile and run the sample project

  1. You can select the ARTCExample project and compile it.

  2. At runtime, you must place the ARTC DLL files in the application binary output directory of the project. By default, this directory is the debug/release folder under the x64 folder, which is one level above the ARTCExample folder.

  3. After successful compilation, you can run the app to try the API example.