Today is the end of the first holiday assignment for graduate students.

There were three rounds of homework evaluation in winter vacation, and there were seven groups in total. We won the first place, and the group bonus was 900 yuan

Although the amount is not large, it can be regarded as living up to the efforts of all members of our group for such a long time.

So, simply record the work during the winter vacation~

Task received

The school was closed on January 10, when the new coronavirus was not news. I thought it was another boring winter vacation.

Our winter vacation was originally from January 10th to February 5th (the twelfth day of the first month)

So although we all felt that the deadline was approaching in December, we still tacitly didn't discuss the winter vacation homework.

On the fourth day of the first month, the team leader finally began to realize that "there is a big problem". So the group leader kindly called us to get up at two o'clock in the afternoon and start work.

At that time, although I only heard that the epidemic was very serious, and the school's notice only prohibited me from coming to school before the 15th day of the first month, no one knew that the epidemic had become so serious, and the school was delayed to start in March.

 15833222376866.jpg

 15833215732722.jpg
15833215732722.jpg
 15833215911232.jpg
15833215911232.jpg
 15833216055634.jpg
15833216055634.jpg

On January 28, the fourth day of the first month, if the deadline is set, the time is very urgent, but I have no desire to start writing code, and even have an inexplicable confidence.

But the team leader's task arrangement also has a closer deadline, so around 3:00 every afternoon is simply a time for soul torture

 15833233993798.jpg

After February 4, the company asked for the current progress report of the project on February 7:

 15835723889295.jpg

So we must finish a rough initial version on or about February 6. That is, at least the client can broadcast the conversation.


Need to be serious

At this time, I was not very clear about the process of the whole project. What are recorder and grabber. I really don't know what the relationship between player, client and capture is.

As for our video conference, the company has studied live broadcast before, and has been developing and maintaining theia project. The function of this project is to broadcast live, watch, shoot, and connect.

 15833241762834.jpg

Anyway, on the evening of February 7, we basically had a usable version.

 15833245673827.jpg
The interface basically follows the theia project. In order to simplify the process, the client only pulls a mixed stream of multiple users.

In this way, I didn't do much homework for the winter vacation for a week. On February 15, I thought I would learn javafx and rewrite the interface on the client side. The current interface is quite retro.


Interface reconstruction and process sorting

When I was an undergraduate, I used netbeans to write Java desktop programs. Netbeans can directly drag controls to create a good interface. Now I use Scala+javafx, so I learned the usage of screnbuilder and jxml, and found a helloworld demo of Scala+javafx on the Internet.

 15833262158328.jpg

On the 19th, I basically reconstructed the interface and redesigned the entire client process. I basically rewrote the entire client module.

On February 25, according to the requirements of winter vacation homework, we found that we still had some functions unfinished:

 15833266198543.jpg

These functions make the functions of the whole conference more complicated.

In addition, the previous practice of client pulling only one mixed stream is simple, but the problem is obvious. The delay is too high, about 5 seconds or 6 seconds, and the user's own image and voice have delays in the mixed stream, which is strange.

Therefore, we finally decided to pull multiple user streams on the client side. This problem increases the memory overhead on the client side, but the effect is that the delay is lower and the conference effect is better.

Moreover, in the last few days, the client's canvas is dynamically allocated according to the identity of the speaker and supporter.

It's one thing to write code. When we do joint debugging and testing together, bugs will emerge one by one.


Prepare for the final selection
On February 28, we started the first test. At that time, because I opened a global agent new Image(url) This place is unable to load pictures, so I got stuck when I opened the conference interface. So there were only two other people in our group in the first test.

At that time, there were few test problems. By the evening of the 29th, three people had tested, and the problems became particularly numerous. Not only the client side, but also the background side had some problems with the processing of ws messages.

On the afternoon of March 1, we started the test again, which basically did not affect the use of major functions.

The first round of evaluation began on March 2. We recorded a 4~5 minute video and sent it to the video website, and then the seniors and sisters of the second year of graduate school were evaluated
In the morning of March 4, the second round, 3 into 2, also recorded a video of 1 to 2 minutes to send to the video website, and then competed in other groups
In the afternoon of March 4, the third round, two into one, was started. The other teams directly watched the web video (after mixed stream) for evaluation.

Because our client interface is beautiful, we also made a small script for the video we recorded in the second round, coupled with Zhu once's "perfect partner" bgm. The video we viewed on the web in the third round has good mixed streaming effect, low latency, and the sound and picture are basically synchronized.

So in the end, we got the first place.

From the beginning, we felt that it was too late. In the end, each of us began to improve our part towards the goal of the third round.

It can be regarded as living up to our efforts~

The final completed interface:

 IMG_1699.jpg

At the same time, the web side can view and manage videos.

Relevant technologies and tools:

  • scala
  • javafx
  • Srs streaming server
  • ffmepeg

Project address: https://github.com/HiddenTrackMJ/geek

Welcome star, fork~

Last modification: June 16, 2020
Do you like my article?
Don't forget to praise or appreciate, let me know that you accompany me on the way of creation.