This topic describes how to use a virtual studio for live streaming.

Prerequisites

Background information

  • Virtual studios are provided as a type of production studio. You can use a virtual studio to perform cross-site live streaming by using multiple devices and cameras. You can deliver various live streaming scenes, such as dual screens, split-screens, and picture-in-picture, by using cloud-based chroma key. This way, the audience can have an immersive live streaming experience. This topic describes how to get started with a virtual studio, from opening a virtual studio to streaming in the virtual studio.
  • For information about how to call API operations to use a virtual studio, see API guide.

Workflow

A virtual studio is based on a standard production studio, which is integrated with the chroma key feature. You can use a virtual studio in the same way that you use a standard production studio. To use a virtual studio, you must complete the following stages:
  1. Live stream settings: You can configure settings for live streams, such as the streaming domain, output resolution, transcoding settings, and recording settings, in the production studio.
  2. Live streaming configurations: You must add media files and configure the output layout before you start live streaming.
  3. Live streaming: You can use PVW to preview mixed streams and use PGM for live outputs.

Live stream settings

The procedure varies based on whether you want to configure a production studio immediately after you create it.
  • If you want to configure a production studio immediately after you create it, start from Step 2 to configure the live stream settings.
  • If you already have a production studio and you want to use the production studio for live streaming, start from Step 1 to configure the live stream settings.
  1. Log on to the ApsaraVideo Live console. In the left-side navigation pane, click Production Studios.
  2. Find the virtual studio that you created and click Open in the Actions column. Virtual studio
  3. Open the Studio Settings dialog box. The first time that you create a production studio and enter the production studio page, the Studio Settings dialog box is displayed. You can also click Live Stream Settings in the upper-right corner of the production studio page to open the Studio Settings dialog box.
    Virtual studio
    ParameterDescription
    DomainSelect a domain name for which a CNAME record is configured from the Domain drop-down list.
    OutputSelect the original resolution of the live stream from the Output drop-down list. Valid values: Low Definition 360p (640 × 360), Standard Definition 480p (854 × 480), High Definition 720p (1280 × 720), Ultra High Definition 1080p (1920 × 1080), Portrait Low Definition 360p (360 × 640), Portrait Standard Definition 480p (480 × 854), Portrait High Definition 720p (720 × 1280), and Portrait Ultra High Definition 1080p (1080 × 1920).
    Transcoding Specifications
    • Low Definition
    • Standard Definition
    • High Definition
    • Ultra High Definition
    Select one or more transcoding specifications for the live stream. Valid values: Low Definition, Standard Definition, High Definition, and Ultra High Definition.
    Note The resolution of the transcoded stream cannot exceed the resolution of the original stream. For example, if you select Low Definition for Transcoding Specifications, you can switch only between original quality and low definition during playback.
    RecordingOptional. Turn on Recording to record live streams.

    Automatic Recording and Manual Recording are supported. If you select Automatic Recording, recording is automatically started after live streaming starts. If you select Manual Recording, you can start or stop recording based on your business requirements after live streaming starts.

    1. Specify the Object Storage Service (OSS) bucket in which you want to store the recording files.
      Note You can store the recording files only in an OSS bucket that resides in the same region as the production studio. Cross-region recording is not supported.
    2. Select one or more formats of the recording files.
    3. Specify the recording length. If you set Recording Length to 10 minutes, the system generates a recording file for a live stream every 10 minutes.
    Stream DelayOptional. Turn on Stream Delay to configure a delay for the output. The delay can range from 15 to 300 seconds.
    Standby ResourceOptional.
    • Live Stream: Select Select Live Stream or Enter Streaming URL to specify a standby video.
    • VOD Resource: Click Select and select a video from the Video and Audio page in the ApsaraVideo VOD console. The selected video is played before live streaming starts or when an exception occurs during live streaming.
      Important If you use videos from ApsaraVideo VOD as video sources or standby videos, the videos must be stored in the same region as the production studio. For example, if the production studio is created in the China (Shanghai) region, you can use only the videos from ApsaraVideo VOD that are stored in the China (Shanghai) region as materials.
    • Image: Click Select from Media Library or Local Upload to specify a standby image. Supported image formats include JPG and PNG. The size of the image cannot exceed 10 MB.
    Multi-way Stream RelayOptional. Click Add URL to add a relay URL.
    Important
    • After you add or delete a relay URL, the stream relay settings take effect only after you restart PGM.
    • If your live stream uses the features of a third-party platform, you are charged additional fees for stream relay. By default, there are three relay URLs that are free of charge under a domain name. If you specify more than three relay URLs, you are charged for the excess relay URLs. The pricing is the same as that of live center stream relay in ApsaraVideo Live. For more information, see Billing of stream relay.

Live streaming configurations

  1. Add input sources. You can add the following input sources to a virtual studio:
    • Chroma Key Input Source: You can add live streams that have a green background. The green background of the streams can be removed by using the chroma key feature. Click the Chroma Key Input Source tab in the virtual studio and add video sources.
    • Multimedia Input Source: You can add on-demand videos or live streams. These streams are played in multimedia windows. Click the Multimedia Input Source tab in the virtual studio and add media files.
    Click Add Media File. In the Add Resource dialog box, select a live stream as the video source or select a video source from ApsaraVideo VOD. The following table describes the parameters. Input sources
    Adding MethodDescription
    Live Stream
    • Select Live Stream: After you select a domain name, the ingest URLs of all live streams under the domain name are displayed. You can select an ingest URL to add it to the production studio.
    • Enter Streaming URL: Enter a streaming URL in the RTMP, FLV, or RTS format.
    VODClick Select and select a video from the drop-down list. Set the Loop parameter to Once or Loop. Then, click OK.
    Note Before you can select on-demand video files from VOD, you must select the on-demand video files that you want to add to the production studio on the Video and Audio page in the ApsaraVideo VOD console and choose More > Make Available on Cloud Studio in the Actions column. After the on-demand video files are uploaded and preprocessed, you can use the on-demand video files in the production studio. For more information about the preprocessing rules and billing methods, see https://www.alibabacloud.com/product/apsaravideo-for-vod/pricing.
    Local Stream IngestStream Ingest Mode:
    • Screen Sharing: Select an application window or desktop as the input source.
    • Camera: Use a local camera as the input source.

    Resolution: Select a resolution based on your business requirements.

  2. Click + Layout to configure the layout of the virtual studio.
    1. In the Layout Settings dialog box, select Studio Layout for Layout Type and specify a value for the Layout Name parameter. You can add common layouts or studio layouts to the virtual studio. You can switch between layouts to play standby videos, advertisements, and live streams.
      Add layout
    2. In the Layout Settings dialog box, add a background image on the Background Image tab. You can select an image from the template library or upload an image from your local PC.
      Note The background image is scaled to fill in the screen of the live stream. We recommend that you use an image whose height and width match the height and width of the screen of the live stream. The size of the image cannot exceed 10 MB.
    3. On the Chroma Key Materials tab of the Layout Settings dialog box, click + Add to add chroma key materials. After you select an input source, configure chroma key settings for the input source. The following table describes the parameters. You can add multiple input sources for chroma key to a virtual studio. Chroma key materials
      ParameterDescription
      Input SourceSelect an input source from the drop-down list.
      Portrait TypeValid values: Full-length and Half-length.
      Color Gamut for Chroma KeyValid values: Green, Blue, and Live-action.
      Position/SizeHorizontal Offset and Vertical Offset are supported. The size of the material can be zoomed in and out.
    4. On the Multimedia Materials tab of the Layout Settings dialog box, click + Add to add multimedia materials. You can add up to three multimedia windows to a virtual studio to insert videos or images.
    5. On the Order of Layers tab of the Layout Settings dialog box, modify the overlay sequence of materials.
    6. Click OK.

Live streaming

  1. Start live streaming. Click the layout that you want to use and click Start in the upper-right corner of the virtual studio. The video sources are displayed based on the layout in the PVW window.
  2. Click Synchronize to PGM. The PGM window displays the live streams for the audience.
    Switch the materials for live streaming. Click the layout to which you want to switch. After the new layout is displayed in the PVW window, click Synchronize to PGM to ingest the live stream to the audience.
    Important
    • The virtual studio allows you to change the live stream that is played in the PVW window by switching to another layout that you configured. To change the layout of the virtual studio or the materials that are played in the virtual studio during live streaming, you must configure multiple layouts in advance. The materials include chroma key materials and materials that are displayed in multimedia windows.
    • To ensure a smooth switch, we recommend that you specify names that can help you identify the layouts that you create.
  3. To stop live streaming, click Stop in the upper-right corner of the virtual studio.

References

You can add common layouts or studio layouts to a production studio. For more information, see Create a layout.