background

Earlier the company will hold a press conference, and this time the way to live. Since this is the first time for live broadcasting, online live broadcasting is basically connected to a third party, at the company level, basically creating a page with live broadcasting area embedded in it. Finally, the online page is as follows:

Simple analysis

As can be seen from the above figure, the top is the video playing area, and the bottom is the specific business functions, such as advertising space, lottery, capital retention, launch assistance, etc. The specific business functions can be tested according to the requirements document. The main variable is: how to test the live broadcast function?

Let’s start with features. Here are some scenarios:

  • The style of the live broadcast before it started.
  • Live presentation.
  • After the live broadcast.
  • The style in which the live stream is interrupted.
  • Style of live cache loading.
  • Style when broadcasting other unknown exceptions.
  • Frame rate.
  • Clarity switch.
  • Whether the picture is synchronized, whether the sound quality is distorted.
  • Mobile network, WiFi playback.
  • Mobile network and WiFi can automatically buffer loading, WiFi cut mobile network will pop up traffic consumption confirmation box.
  • Interruption behaviors such as switching between the front and the back, locking the screen, disconnecting the network, and suspending the recovery, observe whether the connection is reconnected.
  • Whether to switch between vertical and horizontal screens to play videos normally.

Performance related:

  • Single interface pressure measurement, concurrent.
  • Flow loss.
  • Bandwidth pressure.
  • Stability.
  • Memory usage.
  • Abnormal recovery speed.
  • Whether the multi-interface dependency responds properly.

Compatibility related:

  • Resolution.
  • Check whether multiple clients can play correctly.

Safety related:

  • As a yellow.

The process of live broadcasting

To put it simply, the video recorded by the anchor is pushed to the server, and the server distributes it to the audience.

Push stream end is the anchor client: collection, coding, push stream. Server processing: transcoding, recording, screenshot, yellow authentication. The player is the audience client: pull, decode, render.Copy the code

In general, most companies will not only do live in their own platform, such as the station B, trill, teeth and other platforms do live at the same time, the third-party platform, by means of pull flow to put forwarded to live their own platform, easy to understand, each link is a test point here, only this time using a cloud service, Therefore, a lot of details do not need to pay attention to, completely trust in a cloud.

Problems encountered

During the whole process of live broadcasting, we also encountered some problems, such as interruption of streaming caused by restart of partners’ servers, feedback of users’ viewing cards, and abnormal services caused by sudden upgrade of cloud vendors. Therefore, we listed some improvement points:

  • If there is a third party partner for live broadcast activities, the technical contact person of the partner shall be obtained, and the problem shall be solved in time through communication;
  • Spare live broadcast rooms shall be considered for live broadcast activities if expenses permit;
  • Self-controlled live broadcast players should report the data of lag rate and slow ratio;
  • Take the initiative to confirm with the cloud vendor in advance whether there is any change during the activity. If there is any change, determine the impact area and prepare emergency plans.

How to Play Live stream

Now that I have tested the live broadcast, I remember that I saw some explanation videos or game playback loops on the live broadcast platform before. It is supposed to push the local video onto the live broadcast platform and play the local video all the time. But how does this work?

First, go to a live streaming platform and get the push stream code:

Then jb uses OBS software. Click here for the official website link to download the client and open it. The interface is as follows:

To prepare a movie locally, click the + sign on the source and select the video source:

Then choose a movie:

Here you can see the movie playing locally:

At this point, click on the Settings to the right:

Select stream, here the server is corresponding to the RTMP address, stream key is the live stream code:

Then, click on the start Stream to the right

Then go to B station to see the picture, the local picture synchronization up, wonderful ah!