alicloud_live_caster

更新时间:

Provides a Live Caster resource.

Relying on Alibaba Cloud's powerful technologies such as live video broadcasting, media processing, and video AI, cloud guide integrates capabilities such as graphic packaging, real-time keying, multi-language translation, and multi-channel mixed streaming to innovate traditional guide services in the cloud. Provide easy-to-use cloud-based guide services for event performances, news reports, live events, off-site broadcasts and other scenes, without hardware, reduce user guide costs, and create a better live broadcast experience.

For information about Live Caster and how to use it, see What is Caster.

-> NOTE: Available since v1.238.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

provider "alicloud" {
  region = "cn-shanghai"
}

resource "alicloud_live_caster" "default" {
  caster_name  = var.name
  payment_type = "PayAsYouGo"
  norm_type    = "1"
}

Argument Reference

The following arguments are supported:

  • auto_switch_urgent_config - (Optional) Automatic standby broadcast configuration. eofThres: indicates that the broadcast is automatically cut and prepared after the flow interruption time, in seconds.

  • auto_switch_urgent_on - (Optional) Turn on the cut-off automatic switch for broadcast preparation.

    true: open.

    false: closed.

  • callback_url - (Optional) The callback address of the user. To receive Callback Notifications, enter an available address and accept the HTTP protocol. If this parameter is set to null, the callback notification from the director Station is canceled by default.

  • caster_name - (Optional) Guide station name.

  • delay - (Optional, Float) Delayed playback. Time unit: seconds.

    • 0 (default): Disables the delay.
    • Greater than 0: Enable latency.
    • Empty: The delay configuration is cleared by default.

    The maximum supported setting is 300 seconds.

  • domain_name - (Optional) Master play domain name.

  • norm_type - (Required, ForceNew, Int) Guide station specification type. Value:

    • 0: Broadcast single type.
    • 1: General purpose.
  • payment_type - (Required, ForceNew) The paymen type of the resource

  • program_effect - (Optional, Int) Carousel effective flag.

    0: Not in effect.

    1: Entry into force.

  • program_name - (Optional) The carousel station name, which can be configured when using the carousel function.

  • record_config - (Optional) Record configuration information. The format is JSON. The configuration element information is as follows:

    • endpoint: the API server address of the Alibaba Cloud service.
    • ossBucket: The name of the ossBucket.
    • videoFormat: The Format of the video file that you can export. For example, [{"OssObjectPrefix": "record/{AppName}/{StreamName}/{StartTime }{ EndTime}", "Format": "m3u8", "CycleDuration":21600, "SliceOssObjectPrefix": "record/{AppName}/{StreamName}/{UnixTimestamp}"},{"OssObjectPrefix": "record/{AppName}/{StreamName}/{StartTime }{ EndTime}", "Format": "flv", "cyleduration":21600}.
    • interval: time interval, in milliseconds (ms).
  • resource_group_id - (Optional, Computed) Resource Group id

  • resource_type - (Optional) resource type

  • side_output_url - (Optional) The user-defined stream ingest address corresponding to the bypass output address of the guide station. If this parameter is left blank, the streaming address corresponding to the output address automatically generated by Alibaba Cloud is used by default.

  • side_output_url_list - (Optional) The list of multiple forwarding stream addresses, which can be the CDN forwarding stream addresses of Alibaba Cloud or a third-party vendor. A guide can add up to 20 RTMP forwarding addresses.

  • sync_groups_config - (Optional) Multi-View synchronization configuration to synchronize multiple video sources. Multi-View synchronization is divided into two modes:

    • mode 0: (In the anchor mode, multiple video sources are synchronized according to the specified mode.)
    • mode 1: (Conference mode, there is no concept of anchor video, all video sources are synchronized with each other.)
    • Anchor mode: hostResourceId: the video source of the anchor in Anchor mode.
    • Conference mode: no hostRsoureId field, only the resource ids in the resourceIds to be provided.
  • tags - (Optional, Map) The tag of the resource

  • transcode_config - (Optional) Transcoding configuration.

    JSON format string, Please capitalize the first letter of the internal field of the structure, hump format input. If this parameter is set to null, the transcoding configuration is cleared by default. If the transcoding template is null, an error is reported when the director starts.

  • urgent_image_id - (Optional) The ID of the picture material of the media library.

  • urgent_image_url - (Optional) Prepare the URL of the picture material.

  • urgent_live_stream_url - (Optional) The prepared live stream URL.

  • urgent_material_id - (Optional) Prepared video, media library material ID. If this parameter is set to null, the standby configuration is cleared by default.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.
  • create_time - Creation time.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 5 mins) Used when create the Caster.
  • delete - (Defaults to 5 mins) Used when delete the Caster.
  • update - (Defaults to 5 mins) Used when update the Caster.

Import

Live Caster can be imported using the id, e.g.

$ terraform import alicloud_live_caster.example <id>