El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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/ Cloud Live/ Stream Push/ Recording Live Video to OBS/ Configuring a Recording Callback

Configuring a Recording Callback

Updated on 2024-12-06 GMT+08:00

You can configure an HTTP/HTTPS URL to receive recording status feedback. The system will send POST requests in JSON format to your server, so that you can know the recording status.

Prerequisites

Procedure

  1. Log in to the Live console.
  2. In the navigation pane, choose Domains.
  3. Click Manage in the Operation column of the desired ingest domain name.
  4. In the navigation pane, choose Templates > Recording (New).
  5. Click Create Callback Template.

    In the displayed dialog box, enter a callback URL, as shown in Figure 1. Table 1 describes the callback parameters.
    Figure 1 Adding a callback URL
    Table 1 Recording callback parameters

    Parameter

    Description

    Protocol

    A callback URL supports HTTP and HTTPS. HTTPS is more secure than HTTP and is recommended.

    Callback URL

    The callback URL cannot contain message headers or parameters. Only the HTTP/HTTPS protocol is supported. HTTPS is recommended.

    Callback Type

    When callback messages are sent. The options are as follows:

    • Record File Complete
    • Record Start
    • Record New File Start
    • Record Over
    • Record Failed

    For details about callback types, see Table 2.

    Callback Authentication

    If this function is enabled, you need to configure Authentication Algorithm and Authentication Key.

    Authentication Algorithm

    The encrypted content in callback messages varies depending on the authentication algorithm. MD5 is not secure and HMACSHA256 is recommended.

    • MD5: MD5(key + auth_timestamp)
    • HMACSHA256: HMACSHA256(auth_timestamp + event_type + publish_domain + app + stream + download_url + play_url, key)

    Authentication Key

    The value can be customized and consist of at least 32 characters in digits and letters.

Editing or Deleting a Recording Callback

You can perform the following operations on your recording callback:

  • Editing a recording callback

    Click Edit in the Operation column of the row containing the target recording callback in the callback list to edit the callback.

  • Deleting a recording callback

    Click Delete in the Operation column of the row containing the target recording callback in the callback list to delete the callback.

Callback Example

Table 2 describes the fields in a callback message body.

{
    "project_id": "70b76xxxxxx34253880af501cdxxxxxx",
    "job_id": "dc0a1773-0cef-xxxx-xxxx-9a38fdb095d2",
    "task_id": "51126d0ebe94b1da00d2e21a10xxxxxx",
    "event_type": "RECORD_FILE_COMPLETE",
    "publish_domain": "push.example.com",
    "app": "live",
    "stream": "mystream",
    "record_format": "HLS",
    "download_url": "https://obs.cn-north-4.myhuaweicloud.com/live/record-xxxx-mystream-1589967495/record-push.example.com-live-mystream-1589967495.m3u8",
    "asset_id": "1a0d8e9bfaexxxxxxbe5021e62aa1e96",
    "file_size": 3957964,
    "record_duration": 120,
    "start_time": "2020-03-08T14:10:25Z",
    "end_time": "2020-03-08T14:12:25Z",
    "width": 1280,
    "height": 720,
    "obs_location": "https://obs.cn-north-4.myhuaweicloud.com",
    "obs_bucket": "mybucket",
    "obs_object": "live/record-xxxx-mystream-1589967495/record-hwpublish.myun.tv-live-mystream-1589967495.m3u8",
    "auth_sign": "4f97f46759axxxxxx7ad21e9935dc175",
    "auth_timestamp": 1583676745
}
Table 2 Message body

Field

Description

project_id

Project ID.

job_id

Name of a file. This parameter is carried when the value of event_type is RECORD_NEW_FILE_START or RECORD_FILE_COMPLETE.

task_id

Recording task ID, which uniquely identifies a recording task.

event_type

Message type.

Options:

  • RECORD_START. This event is triggered when you start recording.
  • RECORD_NEW_FILE_START. This event is triggered in either of the following scenarios:
    • The system starts creating the first recording file.
    • After a live stream is resumed, if Maximum Stream Pause Length is set to Generate a new file after a stream is paused., the system starts to create a recording file.
    • If the current recording duration exceeds the configured one, the system starts to create another recording file.
  • RECORD_FILE_COMPLETE. This event is triggered in either of the following scenarios:
    • When the recording duration reaches the configured recording length, a recording file has been generated. The system starts creating a new recording file.
    • After a live stream is interrupted, if Maximum Stream Pause Length is set to Generate a new file after a stream is paused., a recording file has been created. Once the stream is resumed, the system will start creating a new recording file.
  • RECORD_OVER. This event is triggered when a live stream has been paused beyond the time indicated by Maximum Stream Pause Length and a recording has been created.
  • RECORD_FAILED. This event is triggered when stream pulling fails or uploading recordings to OBS fails.

publish_domain

Ingest domain name.

app

Application name.

stream

Stream name.

record_format

Recording format. The HLS, FLV, and MP4 formats are supported.

download_url

Address to download the recording. This parameter is used only when event_type is RECORD_FILE_COMPLETE.

NOTE:

The quality of video playback using the download address cannot be guaranteed.

asset_id

Name of a recording file

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

file_size

File size.

Unit: byte

record_duration

Duration of a recording.

Unit: second

start_time

Start time of a recording, which is, time when the first frame is received. The format is yyyy-mm-ddThh:mm:ssZ.

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

end_time

End time of a recording. The format is yyyy-mm-ddThh:mm:ssZ.

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

width

Width of a video recording

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

height

Height of a recording.

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

obs_location

Region where the OBS bucket for storing the recording is located.

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

obs_bucket

OBS bucket where recordings are stored.

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

obs_object

OBS path where recordings are stored.

This parameter is used only when event_type is RECORD_FILE_COMPLETE.

auth_sign

Event notification signature. This parameter is carried when an authentication key is configured.

  • MD5: auth_sign = MD5(key + auth_timestamp)
  • HMACSHA256: HMACSHA256(auth_timestamp + event_type + publish_domain + app + stream + download_url + play_url, key)

key indicates the key used for authentication.

auth_timestamp

UNIX timestamp when the event notification signature expires. This parameter is carried when an authentication key is configured.

The value is a decimal Unix timestamp, that is, the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC/GMT.

If the time specified by auth_timestamp has expired, the notification will become invalid to avoid network replay attacks.

error_message

Description about a failed recording.

This parameter is used only when event_type is RECORD_FAILED.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback