Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Live/ Media Live API Reference/ OTT Channel Management/ Modifying Channel Input Stream Information

Modifying Channel Input Stream Information

Function

Modifies channel input stream information.

URI

PUT /v1/{project_id}/ott/channels/input

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Access-Control-Allow-Internal

No

String

Service authentication token. If authentication is enabled for a service, Access-Control-Allow-Internal must be carried to access the service.

Access-Control-Allow-External

No

String

Service authentication token. If authentication is enabled for a service, Access-Control-Allow-External must be carried to access the service.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

domain

Yes

String

Ingest domain name of a channel.

app_name

Yes

String

Group name or application name.

id

Yes

String

Unique ID of a channel. This parameter is mandatory.

input

No

InputStreamInfo object

Channel output stream information.

Table 4 InputStreamInfo

Parameter

Mandatory

Type

Description

input_protocol

Yes

String

Channel input protocol

  • FLV_PULL

  • RTMP_PUSH

  • HLS_PULL

  • SRT_PULL

  • SRT_PUSH

sources

No

Array of SourcesInfo objects

Information about the primary source stream of a channel. This parameter is optional when the stream input protocol is RTMP_PUSH or SRT_PUSH. In other cases, this parameter is mandatory.

secondary_sources

No

Array of SecondarySourcesInfo objects

Standby input stream array. This parameter is optional. If there is a standby input stream, ensure that the number of channels, codec, and resolution of the primary and standby input streams are the same. If the stream input protocol is RTMP_PUSH, you do not need to specify this parameter.

failover_conditions

No

FailoverConditions object

(Optional) Configuration provided by the channel supplier to switch between the primary and standby media stream URLs.

max_bandwidth_limit

No

Integer

Maximum bandwidth required when the input protocol is HLS_PULL.

A streaming URL provided by the user includes the parameter BANDWIDTH for audios/videos with different bitrates.

  • If the maximum bandwidth is specified, Media Live will pull the media stream that has the highest bitrate and a bandwidth lower than the maximum bandwidth from the URL, and push the stream to the origin server.

  • If the maximum bandwidth is not specified, Media Live will pull the media stream with the largest BANDWIDTH value from the URL, and push the stream to the origin server.

ip_port_mode

No

Boolean

When the stream push protocol is SRT_PUSH and streams are pushed to the origin server, the encoder does not support the input of streamid. In this case, set this parameter to true.

ip_whitelist

No

String

IP address whitelist of the customer for SRT_PUSH

scte35_source

No

String

SCTE-35 signal source of an advertisement.

Only HLS_PULL channels support this configuration. Currently, this field can only be set to SEGMENTS.

ad_triggers

No

Array of strings

Configures an ad trigger.

Options:

  • Splice insert

  • Provider advertisement

  • Distributor advertisement

  • Provider placement opportunity

  • Distributor placement opportunity

audio_selectors

No

Array of InputAudioSelector objects

Configures an audio selector (a maximum of 8).

Table 5 SourcesInfo

Parameter

Mandatory

Type

Description

url

No

String

Channel source stream URL, which is used for external stream pull.

bitrate

No

Integer

Bitrate. This parameter is mandatory when live transcoding is not required.

Unit: bit/s. Value range: (0, 104,857,600] (100 Mbit/s)

width

No

Integer

Width corresponding to the resolution. This parameter is optional.

Value range: 0–4096 (4K)

height

No

Integer

Height corresponding to the resolution. This parameter is optional.

Value range: 0–2160 (4K)

enable_snapshot

No

Boolean

Whether to use the stream for snapshot capturing.

bitrate_for3u8

No

Boolean

Whether to use bitrate to fix the bitrate. Default value: false

passphrase

No

String

Encryption information when the protocol is SRT_PUSH.

backup_urls

No

Array of strings

Standby streaming URL list

stream_id

No

String

Stream ID of the streaming URL in an SRT_PULL channel.

latency

No

Integer

Stream pull latency of an SRT_PULL channel.

Table 6 SecondarySourcesInfo

Parameter

Mandatory

Type

Description

url

No

String

Channel source stream URL, which is used for external stream pull.

bitrate

No

Integer

Bitrate. This parameter is mandatory when live transcoding is not required.

Unit: bit/s. Value range: (0, 104,857,600] (100 Mbit/s)

width

No

Integer

Width corresponding to the resolution. This parameter is optional.

Value range: 0–4096 (4K)

height

No

Integer

Height corresponding to the resolution. This parameter is optional.

Value range: 0–2160 (4K)

bitrate_for3u8

No

Boolean

Whether to use bitrate to fix the bitrate. Default value: false

passphrase

No

String

Encryption information when the protocol is SRT_PUSH

backup_urls

No

Array of strings

Standby streaming URL list

stream_id

No

String

Stream ID of the streaming URL in an SRT_PULL channel.

latency

No

Integer

Stream pull latency of an SRT_PULL channel.

Table 7 FailoverConditions

Parameter

Mandatory

Type

Description

input_loss_threshold_msec

No

Integer

Duration threshold for stopping input streams. When the threshold is reached, the primary/standby switchover is automatically triggered.

Unit: millisecond. Value range: 0–3,600,000

(Optional) The default value is 2,000 ms.

input_preference

No

String

Whether the primary ingest URL has the highest priority (PRIMARY) or the primary and standby URLs are switched equally (EQUAL).

In the equal switchover mode, the standby URL is used and will not be automatically switched to the primary URL.

(Optional) The default value is EQUAL.

Table 8 InputAudioSelector

Parameter

Mandatory

Type

Description

name

Yes

String

Name of an audio selector. Enter only letters, digits, hyphens (-), and underscores (_).

The name of each selector must be unique within the same channel.

selector_settings

No

AudioSelectorSettings object

Configures an audio selector.

Table 9 AudioSelectorSettings

Parameter

Mandatory

Type

Description

audio_language_selection

No

AudioSelectorLangSelection object

Configures a language selector.

audio_pid_selection

No

AudioSelectorPidSelection object

Configures a PID selector.

audio_hls_selection

No

AudioSelectorHlsSelection object

Configures an HLS selector.

Table 10 AudioSelectorLangSelection

Parameter

Mandatory

Type

Description

language_code

Yes

String

Enter a language code of 2 or 3 lowercase letters.

language_selection_policy

No

String

Language output policy.

Options:

  • LOOSE: loose match. For example, if the language code eng is selected, an audio stream in English will be preferentially selected. If there is no audio stream in English, the audio stream with the lowest PID will be selected.

  • STRICT: strict match. For example, if the language code eng is selected, only an audio stream in English will be selected. If there is no audio stream in English, a muted segment will be automatically added. When this audio selector is used to play the video, the video is muted.

Table 11 AudioSelectorPidSelection

Parameter

Mandatory

Type

Description

pid

Yes

Integer

Sets the PID value.

Table 12 AudioSelectorHlsSelection

Parameter

Mandatory

Type

Description

name

Yes

String

HLS audio selector name

group_id

Yes

String

HLS audio selector GID

Response Parameters

Status code: 200

Table 13 Response body parameters

Parameter

Type

Description

result_code

String

Error code.

result_msg

String

Error description.

domain

String

Ingest domain name.

app_name

String

Group name or application name. This parameter is mandatory.

id

String

Unique ID of a channel. This parameter is mandatory.

sources

Array of SourceRsp objects

Ingest URL list. During channel creation, the ingest URL list is returned only when the input stream protocol is RTMP_PUSH.

Table 14 SourceRsp

Parameter

Type

Description

url

String

RTMP ingest URL.

bitrate

Integer

Bitrate.

Unit: bit/s. Value range: (0, 104,857,600] (100 Mbit/s)

width

Integer

Width corresponding to the resolution. Value range: 0–4096 (4K)

height

Integer

Height corresponding to the resolution. Value range: 0–2160 (4K)

enable_snapshot

Boolean

Whether to use the stream for snapshot capturing.

Status code: 400

Table 15 Response body parameters

Parameter

Type

Description

result_code

String

Error code.

result_msg

String

Error description.

domain

String

Ingest domain name.

app_name

String

Group name or application name. This parameter is mandatory.

id

String

Unique ID of a channel. This parameter is mandatory.

Example Requests

PUT https://{endpoint}/v1/{project_id}/ott/channels/input

{
  "domain" : "push.testott.hls.com",
  "app_name" : "ott",
  "id" : "test",
  "input" : {
    "input_protocol" : "RTMP_PUSH",
    "sources" : [ {
      "width" : 100,
      "bitrate_for3u8" : false,
      "enable_snapshot" : false,
      "bitrate" : 1024,
      "passphrase" : "",
      "url" : "rtmp://192.168.8.158/ott/adtestdrm?vhost=pull.testott.hls.com",
      "height" : 100
    } ]
  }
}

Example Responses

Status code: 200

Demo Information

{
  "result_code" : "LIVE.100000000",
  "result_msg" : "SUCCESS",
  "domain" : "push.testott.hls.com",
  "app_name" : "ott",
  "id" : "test"
}

Status code: 400

Error response

{
  "result_code" : "LIVE.103011019",
  "result_msg" : "The resource to access is not exists",
  "domain" : "push.testott.hls.com",
  "app_name" : "test",
  "id" : "test-abc"
}

Status Codes

Status Code

Description

200

Demo Information

400

Error response

Error Codes

See Error Codes.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback