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
Managed Threat Detection
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

Pushing Local PC Desktop Streams to SRS Using OBS

Updated on 2025-02-14 GMT+08:00

Application Scenario

SRS is a simple and an efficient real-time video server that supports various real-time streaming media protocols, such as RTMP, WebRTC, HLS, HTTP-FLV, and SRT. Supported By FlexusL, the SRS image uses Ubuntu 22.04 and is deployed using Docker. The Nginx and Docker have been preconfigured in the image. This section describes how to push PC desktop streams to SRS using OBS.

Resource Planning and Costs

This practice uses the following resource planning as an example. You can adjust it as required.

Resource

Configuration

Description

Cloud server

  • vCPUs: 2
  • Memory: 4 GiB

Select appropriate instance specifications based on your service requirements.

Image

SRS

Select the SRS application image.

Security group

Inbound rule:

  • Protocol & Port

    TCP: 80, 9001, 1935, 1985, 8080, 8000

    Source: 0.0.0.0/0

  • Protocol & Port

    ICMP: all

    Source: 0.0.0.0/0

  • 80: Specifies the internal forwarding port of application images.
  • 9001: Allows external access to the application management page.
  • 1935: Allows access to the RTMP livestreaming server.
  • 1985: Allows access to the HTTP API server to deliver HTTP-API and WebRTC streams.
  • 8080: Allows access to the HTTP livestreaming server to deliver HTTP-FLV and HLS streams.
  • 8000: Allows access to the WebRTC media server.

Domain name

wpwebsite.com

  • If the website is only used for personal development or testing, there is no need to add a domain name.
  • If the website is open to the public, add and resolve a domain name for the cloud server.

Process

Procedure

Description

Step 1: Purchase a FlexusL Instance

Purchase a FlexusL instance and select the SRS application image.

Step 2: Configure Security Groups

Add inbound security group rules to ensure that the application preinstalled in the image can be accessed.

Step 3: Reset the Password and Log In to the FlexusL Instance

A FlexusL instance does not have an initial password. After creating a FlexusL instance, set a password for the FlexusL instance before logging in to it.

Step 4: Learn About the SRS Dashboard

Understand the SRS working interface.

Step 4: Push Local PC Desktop Streams to SRS Using OBS

Learn how to push local PC desktop streams to SRS using OBS.

Step 1: Purchase a FlexusL Instance

  1. Log in to the FlexusLconsole and click Buy FlexusL.
  2. Specify required parameters for the FlexusL instance.

    Parameter

    Example

    Description

    Region

    CN-Hong Kong

    For low network latency and quick resource access, select the region nearest to your target users. After a FlexusL instance is created, the region cannot be changed. Exercise caution when selecting a region.

    Application Image

    SRS

    Select the SRS application image.

    Instance Specifications

    2 vCPUs | 4 GiB memory and 80 GiB system disk

    Select instance specifications as needed.

    Instance Name

    SRS-Example

    Customize an instance name that is easy to identify, for example, SRS-Example.

    (Optional) Associated Services

    • Data disk: 10 GiB
    • Host security
    • Cloud backup vault: 90 GiB

    You can bundle any of EVS, HSS (basic edition), and CBR to your FlexusL instances as needed and set specifications as needed.

    Required Duration

    1 month

    The minimum duration of a purchase is one month and the maximum duration is three years.

    Auto-renew is enabled by default, which means the purchased FlexusL instances will be automatically renewed before they expire. If you do not enable auto-renew during the purchase process, you can still enable it later after the instances are created. For more information about auto-renewal rules, see Auto-Renewal Rules.

    Quantity

    1

    Set the number of FlexusL instances to be purchased.

  3. Click Buy Now and complete the payment as prompted.
  4. Go back to the FlexusL console and view the purchased FlexusL instance.

Step 2: Configure Security Groups

Add inbound security group rules to ensure that the application preinstalled in the image can be accessed.

  1. Log in to the FlexusL console and click a resource card to go to the instance details page.
  2. In the navigation pane on the left, choose Cloud Servers. Locate the server and click its name.

  3. On the Security Groups tab, click Add Rule. In the displayed dialog box, add rules displayed in the following figure and click OK.

    The following figure only displays common rules. You can add more rules as needed.

    Table 1 Security group rules

    Priority

    Action

    Type

    Protocol & Port

    Source

    Description

    100

    Allow

    IPv4

    TCP: 9001

    0.0.0.0/0

    Allows external access to the application dashboard.

    100

    Allow

    IPv4

    TCP: 1935

    0.0.0.0/0

    Allows access to the RTMP livestreaming server.

    100

    Allow

    IPv4

    TCP: 1985

    0.0.0.0/0

    Allows access to the HTTP API server to deliver HTTP-API and WebRTC streams.

    100

    Allow

    IPv4

    TCP: 8080

    0.0.0.0/0

    Allows access to the HTTP livestreaming server to deliver HTTP-FLV and HLS streams.

    100

    Allow

    IPv4

    TCP: 8000

    0.0.0.0/0

    Allows access to the WebRTC media server.

Step 3: Reset the Password and Log In to the FlexusL Instance

This section describes how to log in to a FlexusL instance. A FlexusL instance does not have an initial password. After creating a FlexusL instance, set a password for the FlexusL instance before logging in to it.

  1. In the Image area on the Overview page of the FlexusL console, click Access to go to the application dashboard and check whether the application has been up and running. If yes, go to the next step.
    NOTICE:

    Wait for several minutes until the image with the pre-installed application is up and running. Then, you can perform operations such as restarting or stopping the instance, or resetting the password. Otherwise, the initial password may become invalid and you cannot log in to the application dashboard.

    Figure 1 Entry to the application dashboard

    After the application is started, the initialization wizard page of the dashboard is displayed, as shown in Figure 2.

    Figure 2 Initial page of the SRS dashboard
    NOTE:

    If the dashboard is not properly displayed, check the following causes:

    • The port for accessing the dashboard is not allowed. Check whether the port is allowed based on Step 2: Configure Security Groups.
    • The dashboard is being started. Try again later.
  2. Locate the resource card and choose > Reset Password to reset the password.

    A FlexusL instance does not have an initial password. Set a password for the FlexusL instance before logging in to it. For details, see Resetting the Password for a FlexusL Instance.

    Figure 3 Resetting a password
  3. Locate the target instance and click Remote Login and enter the username and password as prompted to log in to the FlexusL instance.

    The username is root, and the password is the one set in 2.

Step 4: Learn About the SRS Dashboard

Application images are based on the Ubuntu OS of the code page. You can log in to the visualized dashboard to configure applications easily.

  1. In the Image area on the Overview page of the FlexusL console, click Access to go to the application dashboard.

    NOTE:

    If the dashboard is not properly displayed, check the following causes:

    • The port for accessing the dashboard is not allowed. Check whether the port is allowed based on Step 2: Configure Security Groups.
    • The dashboard is being started. Try again later.
  2. Check the SRS dashboard.
    You do not need to set the username and password for logging in to SRS. On the SRS dashboard, you can:
    • Log in to the SRS console.
    • Obtain the ingest URL.
    • Start SRS player to watch the livestreaming content.
    Figure 4 Initial page of the SRS dashboard

After the SRS application is set up, you can use SRS to push and watch livestreams.

Step 4: Push Local PC Desktop Streams to SRS Using OBS

This section describes how to push local PC desktop streams to SRS using OBS.

  1. Download and install OBS based on your operating system.
  2. Open OBS tool and click Settings in the Controls area.

  3. On the Stream page, configure parameters and click Apply.

    Parameter

    Description

    Service

    Multiple platforms can push livestreams via OBS. For SRS, select Custom.

    Server

    Enter the stream pushing address specified by SRS, for example, rtmp://124.70.x.x/live/.

    Stream key

    Specify a character string following the specified stream pushing address, for example, the livestream following live/ in rtmp://124.70.x.x/live/.

    Use authentication

    Select Use authentication and set the Username and Password.

  4. In the Output page, configure parameters and click Apply.

    Set Video Bitrate to 1000 kbps. Select Software for Video Encoder to avoid the need for high-end graphics cards and prevent potential streaming issues. Configure other parameters as needed.

  5. Click OK.
  6. In the displayed Sources area, click +, select Display Capture, create a source, and click OK.

  7. Perform any operation to change the desktop screen, and you can see that the screen starts to capture desktop content. Click OK.
  8. Click Start Streaming. After the connection is successful, a green block is displayed in the lower right corner, indicating that the stream pushing is successful.

  1. Log in to the FlexusL console and click a resource card to go to the instance details page.
  2. On the Overview page, in the Image area, click Access to access the image application dashboard.

  3. Start SRS player.

  4. Watch the desktop livestreams.
  1. Download and install OBS based on your operating system.
  2. Open OBS tool and click Settings in the Controls area.

  3. On the Stream page, configure parameters and click Apply.

    Parameter

    Description

    Service

    Multiple platforms can push livestreams via OBS. For SRS, select Custom.

    Server

    Enter the stream pushing address specified by SRS, for example, rtmp://124.70.x.x/live/.

    Stream key

    Specify a character string following the specified stream pushing address, for example, the livestream following live/ in rtmp://124.70.x.x/live/.

    Use authentication

    Select Use authentication and set the Username and Password.

  4. In the Output page, configure parameters and click Apply.

    Set Video Bitrate to 1000 kbps. Select Software for Video Encoder to avoid the need for high-end graphics cards and prevent potential streaming issues. Configure other parameters as needed.

  5. Click OK.
  6. In the displayed Sources area, click +, select Display Capture, create a source, and click OK.

  7. Perform any operation to change the desktop screen, and you can see that the screen starts to capture desktop content. Click OK.
  8. Click Start Streaming. After the connection is successful, a green block is displayed in the lower right corner, indicating that the stream pushing is successful.

  1. Log in to the FlexusL console and click a resource card to go to the instance details page.
  2. On the Overview page, in the Image area, click Access to access the image application dashboard.

  3. Start SRS player.

  4. Watch the desktop livestreams.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback