Live Broadcast Quickstart - Windows

Step 1: Obtain the SDK

Download the latest SDK from downloads or contact sales-us@agora.io.

The following shows the windows package structure:

../../_images/windows_0.11.png

Where:

  • ./examples: including the Open Video Call application and Open Live sample codes(Open Video Call is for communication and Open Live is for live broadcast)
  • ./sdk: including the required libraries

Step 2: Prepare the Environments

  1. Be sure that the following development environment requirements are satisfied:

    • Microsoft Visual C++ 2013 or later
    • Microsoft Visual Studio (recommended)
    • Microsoft Windows 7 or above
    • Prepare an App ID. Refer to Obtaining an App ID
  2. Be sure that the following libraries are ready.

    1. If you use the sample code downloaded in Step 1: Obtain the SDK , then no extra operation is required for this step.

    2. If you use the sample code downloaded from https://github.com/AgoraIO/OpenLive-Windows:

      • Add the sdk/include folder to the INCLUDE directory of your project.
      • Add the sdk/lib folder to the LIB directory of your project, and make sure that mediasdk.lib is linked with your project.
      • Copy all .dll files under the sdk/dll folder to the directory where your executable file is located.

Step 3: Demonstrate the Live Broadcast

Agora provides a sample code called Open Live. Follow this section to compile and run it.

../../_images/windows-live-1.png

Compiling the Sample Code

  1. Use the Visual Studio 2013 (or higher) to open the solution file.
  2. Open the AgoraObject.h file and locate the APP_ID line with macro definition as shown below:
../../_images/windows-live-2.png
  1. Enter your App ID.
  2. Compile the entire solution in the Release mode.

After the compilation is complete, copy all the dynamic link libraries under the SDK/dll directory to the Release folder.

../../_images/windows-live-3.png

Executing the Sample Code

  1. Double click the OpenVideoCall.exe to open it.

    ../../_images/windows-live-4.png
  2. Fill the channel name.

  3. Select the ClientRole as Broadcaster or Audience.

  4. Click the Join to join the channel.