หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

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

Single Stream Recording

Updated on 2023-11-01 GMT+08:00

Scenario

The audio/video streams of each user in a room can be recorded and saved in independent files.

Working Principles

The single stream recording provided by SparkRTC can be enabled automatically, that is, automatic single stream recording. The following figure shows how the function is implemented.

Figure 1 Single stream recording
Figure 2 Automatic single stream recording

Implementation

  1. Create an OBS bucket for storing recordings. If you already have one, go to 2.
    NOTE:

    The reliability of a single-AZ bucket is lower than that of a multi-AZ bucket. To prevent recording failures caused by OBS exceptions, you are advised to create multi-AZ buckets for storing recordings.

  2. Authorize SparkRTC to store recordings in the bucket.
  3. Configure recording rules for SparkRTC and enable automatic recording. After you join a room, the recording rule with the same recording rule ID as that in the application automatically takes effect. The recordings are stored in OBS based on the recording settings. You can set a callback URL to obtain notifications about the recording status.
  4. Join a room: After configuring recording rules, you can use the SparkRTC app to join a room for real-time interaction. SparkRTC will record the ongoing audio/video stream based on the configured recording rules.
    NOTE:

    If automatic recording is not enabled during recording rule configuration, you need to call the SparkRTC API to start, query, and control a cloud recording task after joining a room. Then SparkRTC can record images based on the recording rule ID in the API calling request.

  5. View recordings. After the recording is complete, you can receive the callback message of the recording task in the configured callback URL. You can obtain the basic information about the recordings and manage the recordings in OBS, such as downloading, sharing, and deleting them.
    NOTE:

    The resolution of recordings is the same as that of the pushed streams.

Procedure

  1. Create a bucket by referring to OBS Help Center. If you have one, go to 2.

    NOTE:

    The OBS bucket to be created must be located in the CN North-Beijing4 region.

  2. Authorize access to OBS.

    1. Log in to the SparkRTC console.
    2. In the navigation pane, choose OBS Authorization.
    3. In the row of the target OBS bucket, click Authorize.

  3. Configure a recording rule.

    1. Log in to the SparkRTC console.
    2. In the navigation pane, choose Apps.
    3. Click Configure in the row of the application for which you want to create a recording rule.
    4. On the Recording Rule tab page, click Add. The Add Recording Rule page is displayed.
      NOTE:

      Only one recording rule can be created for an application ID.

    5. Configure recording parameters according to Table 1.
      Table 1 Recording parameters

      Parameter

      Description

      Storage Bucket

      OBS bucket where the recording is stored.

      Currently, recorded files can be stored only in OBS buckets of CN North-Beijing4.

      Region

      Region where the OBS bucket is deployed.

      Storage Path

      Path of the OBS bucket where the recording is stored.

      Record As

      Recording format, which can be HLS and MP4.

      HLS

      File Naming

      Storage path and filename prefix of M3U8 files.

      Default format:
      {app_id}/{record_format}/{stream}_{file_start_time}/{stream}_{file_start_time}

      The meanings of the preceding variables are as follows:

      • app_id: app ID
      • record_format: recording format
      • stream: stream name
      • file_start_time: file generation time

      Recording Length

      The recording length can be 0 or 1 to 720 minutes (12 hours). If a stream has been recorded for more than 12 hours, another file will be created based on the naming rule. If the recording length is 0, the entire stream is recorded as a file.

      Max Stream Pause Length

      Values:

      • Generate a new file when a stream is paused
      • Do not generate a new file when a stream is paused: The maximum stream pause length is 30 days.
      • Other: If the stream pause length is within the specified range, the system does not generate a new file. Otherwise, a new file is generated.

      MP4

      File Naming

      Storage path and filename prefix of MP4 files.

      Default format:
      {app_id}/{record_format}/{stream}_{file_start_time}/{stream}_{file_start_time}

      The meanings of the preceding variables are as follows:

      • app_id: app ID
      • record_format: recording format
      • stream: stream name
      • file_start_time: file generation time

      Recording Length

      The recording length ranges from 1 to 180 minutes (3 hours). If a stream has been recorded for more than 3 hours, another file will be created based on the naming rule.

      Max Stream Pause Length

      Values:

      • Generate a new file when a stream is paused
      • Other: If the stream pause length is within the specified range, the system does not generate a new file. Otherwise, a new file is generated.
    6. Click OK.

    7. In the recording rule list, enable automatic recording as required. When automatic recording is enabled, if a new room is created under the app, the system automatically performs single stream recording during real-time communication in the room based on the configured recording rule.
      NOTE:

      Automatic recording takes effect only for rooms created under the app after you enable it.

  4. Join a room.

    After configuring recording rules, you can use the SparkRTC app to join a room for real-time interaction. SparkRTC will record the ongoing audio/video stream based on the configured recording rules.

    NOTE:

    If automatic recording is not enabled during recording rule configuration, you need to call the SparkRTC API to start a cloud recording task after joining a room. Then SparkRTC can record images based on the recording rule ID in the API calling request.

  5. Replay recordings.

    When the recording is complete, view recordings on the OBS console or through callback messages.

    • Viewing recordings on the OBS console
      1. In the navigation pane of the OBS console, choose Object Storage.
      2. In the bucket list, click the bucket that stores SparkRTC recordings.

        The Overview page is displayed.

      3. In the navigation pane, choose Objects to view the recording information.
      4. Download and share the recordings as required. For details, see OBS Documentation.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback