Browser-based multi-channel video playing method

By decoding and scaling video stream data on the server side, the problem of heavy decoding burden and poor real-time performance in browser video playback is solved, and multi-channel high-definition video real-time playback on low-performance browser terminals is realized.

CN118540550APending Publication Date: 2024-08-23HANGZHOU EBOYLAMP ELECTRONICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410695314.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing browser video playback methods consume a lot of computing resources when decoding multi-channel high-definition videos, and are difficult to meet the requirements of real-time and multi-channel video playback, especially when the performance of the browser processing platform is low.

Method used

By setting up a receiving module and a processing module on the server side, the browser terminal sends a playback request instruction and target address, and the processing module decodes the video stream data and transmits the data in a unified format to the browser terminal, reducing the decoding burden on the browser side, and in Server-side setup scaling module to optimize data transfer.

Benefits of technology

It realizes the real-time playback of multi-channel high-definition videos on low-performance browser terminals, improves data transmission efficiency, and meets the requirements of real-time and multi-channel video playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540550A
    Figure CN118540550A
Patent Text Reader

Abstract

The embodiment of the invention discloses a multi-channel video playing method based on a browser. According to the method, a browser terminal and a server are arranged in a multi-channel playing system, and a receiving module and a processing module are arranged in the server. Firstly, a browser terminal receives playing task information and sends a playing request instruction to a receiving module in a server; then, the receiving module determines a corresponding target address and transmits the target address back to the browser terminal; furthermore, a processing module in the server calls the video stream data in the receiving module based on the target addresses and decodes the video stream data, and finally, the target data in the unified format is displayed and played in a browser in multiple paths. Through the playing steps, a decoding process which consumes a large amount of computing resources is completed in a processing module of the server, so that only data in a uniform format needs to be played on a browser terminal, and the requirement of playing multiple paths of high-definition videos in real time can be met even if the performance of a browser processing platform is too low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of video surveillance technology, and more particularly to a browser-based multi-channel video playback method. Background Art

[0002] With the rapid development of technology in the field of security video surveillance, the requirements for the real-time and applicability of surveillance video playback are becoming higher and higher. The existing browser playback methods usually use various compression conversion protocols to convert the data stream into various compressed format data. The browser decodes the various compressed format data separately to obtain unified playable format data. However, it takes a lot of time for the browser to decode the compressed format data, which cannot meet the requirements of real-time playback. In addition, when the performance of the browser processing platform is too low, the existing playback method only performs the decoding operation corresponding to a single-channel high-definition video, which has already occupied most of the computing resources, making it difficult to meet the requirements of playing multiple high-definition videos at the same time. Summary of the invention

[0003] The embodiment of this specification provides a browser-based multi-channel video playback method, and its technical solution is as follows: In a first aspect, an embodiment of the present specification provides a browser-based multi-channel video playback method, the method is applied to a browser-based multi-channel video playback system, the system includes a browser terminal and a server, the server includes a receiving module and a processing module, the browser terminal, the receiving module and the processing module are connected to each other in communication, the method includes: The browser terminal acquires the playback task information, generates at least one playback request instruction corresponding to the playback task information, and sends each of the playback request instructions to the receiving module; The receiving module determines the target address corresponding to each of the play request instructions, and transmits each of the target addresses back to the browser terminal; The browser terminal sends a playback control instruction and each of the target addresses to the processing module; The processing module retrieves each video stream data from the receiving module based on each target address, and decodes each video stream data to obtain each target data; The browser terminal obtains each of the target data returned by the processing module, and performs multi-channel display and playback on each of the target data.

[0004] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: In one or more embodiments of the present specification, the playback method is applied to a browser-based multi-channel video playback system, and a browser terminal and a server are set in the playback system. The browser terminal receives the playback task information and sends a playback request instruction to the receiving module in the server. Then, the receiving module determines the corresponding target address and returns it to the browser terminal. Further, the processing module in the server calls each video stream data in the receiving module based on each target address and decodes it. Finally, the decoded target data in each unified format are displayed and played in multiple channels in the browser. Through the above playback steps, the decoding process that consumes a lot of computing resources is placed in the processing module of the server to complete, so that only the unified format data needs to be played on the browser terminal. Even when the performance of the browser processing platform is too low, it can meet the requirements of real-time playback of multiple high-definition videos, and a scaling module can be set in the processing module of the server to scale the transmission data based on the width and height parameters of the display window, thereby improving the data transmission efficiency and further meeting the requirements of real-time playback. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0006] Figure 1 A schematic diagram of the system architecture of a browser-based multi-channel video playback system provided in an embodiment of this specification; Figure 2 A flowchart of a browser-based multi-channel video playback method provided in an embodiment of this specification. DETAILED DESCRIPTION

[0007] The technical solutions in the embodiments of this specification will be described clearly and completely below in conjunction with the drawings in the embodiments of this specification.

[0008] The terms "first" and "second" in the description and claims of this specification and the above-mentioned drawings are for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, even though the embodiment may not be clearly recorded in the following text.

[0009] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.

[0010] First, some terms in the embodiments of the present application will be explained below to facilitate understanding by those skilled in the art.

[0011] See also Figure 1 , Figure 1 A schematic diagram of the architecture of a browser-based multi-channel video playback system provided in an embodiment of this specification is shown.

[0012] like Figure 1 As shown, the system architecture of the browser-based multi-channel video playback method may include at least a browser terminal 10 , a server 20 and a network 30 , and the server 20 may include a receiving module 40 and a processing module 50 .

[0013] The browser terminal 10 includes but is not limited to electronic devices such as smart phones, desktop computers, tablet computers, laptop computers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, etc., and may also be software running on the above electronic devices, such as applications, etc. Optionally, the operating system running on the electronic device may include but is not limited to Android system, IOS system, Linux, Windows, etc. Optionally, the browser terminal 10 sends a play request instruction to the receiving module 40 in the server 20, and the receiving module 40 may obtain the video stream data of the application program interface.

[0014] The server 20 can provide background services for the browser terminal 10. According to the multi-channel video playback request sent by the browser terminal 10, the server 20 will obtain a series of multi-channel video playback instructions. Specifically, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0015] When the server 20 is an independent physical server, a receiving module 40 and a processing module 50 may be provided in the server 20, wherein the receiving module 40 sends the acquired video stream data to the processing module 50 through the network 30 according to the play request instruction sent by the browser terminal 10. The processing module 50 processes the acquired video stream data to obtain target data in a unified format, and transmits the target data to the browser terminal 10 through the network 30 for multi-channel display and playback. When the server 20 is a cloud server of a basic cloud computing service such as a server cluster or a distributed system composed of multiple physical servers, the receiving module 40 and the processing module 50 in the server 20 are used as separate independent physical servers to perform the same processing operations as above.

[0016] The network 30 is used as a medium for providing a communication link between the browser terminal 10, the receiving module 20 and the processing module 40. The network 30 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0017] In addition, it should be noted that Figure 1 What is shown is only one system provided by the present disclosure. In practical applications, other systems may also be included, for example, more sending modules or receiving modules may be included.

[0018] In the embodiments of this specification, the browser terminal 10, the receiving module 40 and the processing module 50 may be directly or indirectly connected via wired or wireless communication, which is not limited in this disclosure.

[0019] See next Figure 2 , Figure 2 A flowchart of a browser-based multi-channel video playback method provided in an embodiment of this specification is shown.

[0020] like Figure 2 As shown, the browser-based multi-channel video playback method may at least include the following steps: S201. The browser terminal obtains playback task information, generates at least one playback request instruction corresponding to the playback task information, and sends each playback request instruction to the receiving module.

[0021] In the embodiment of the present specification, in order to play multiple videos in a browser, a browser terminal and a server can be set in the playback system, and a receiving module and a processing module can be further set in the server, the receiving module is used to obtain the video stream data collected by the multiple network cameras, and receive the playback request instruction issued by the browser terminal, and generate the corresponding target address, and the processing module is used to receive the playback control instruction issued by the browser terminal, and retrieve the video stream data based on the target address, and obtain the target data after decoding. Among them, the browser terminal, the receiving module and the processing module in the system can communicate with each other through the network. When playing multiple videos, the staff issues a playback task to the playback system by clicking on the display playback screen or the mobile terminal, and the browser terminal in the playback system first obtains the issued playback task information. Then, since it is generally necessary to display and play multiple monitoring video data at the same time in the playback task information, the browser terminal determines which specific video stream data of the specified number needs to be played in the playback task information, and generates corresponding multiple playback request instructions. Further, the browser terminal sends all the generated playback request instructions to the receiving module of the server.

[0022] S202: The receiving module determines the target address corresponding to each of the play request instructions, and transmits each of the target addresses back to the browser terminal.

[0023] In the embodiment of the present specification, when playing multiple videos, each playback request corresponds to a target address of a playback data stream, and the playback system needs to complete a series of processing operations such as storage and call of video stream data based on the target address. Therefore, after receiving each playback request instruction, the receiving module in the playback system can determine the target address corresponding to each playback request instruction based on a preset corresponding relationship. Then, the receiving module returns each target address to the browser terminal so that the corresponding video stream data can be processed according to each target address later.

[0024] In one possible implementation, the receiving module determines the target address corresponding to each of the play request instructions, including: The receiving module obtains each of the play request instructions sent by the browser terminal; The target address corresponding to each of the play request instructions is determined based on a preset address database.

[0025] In the embodiment of the present specification, the theoretical maximum number of play request instructions and the configurable addresses in the play system can be counted first, and then an address database in which each play request instruction corresponds to a target address is constructed based on the statistical results. Further, after the receiving module obtains the play request instruction, it searches the preset address database to determine the target address corresponding to each play request instruction.

[0026] S203: The browser terminal sends a playback control instruction and each of the target addresses to the processing module.

[0027] In the embodiment of this specification, after receiving the target addresses returned by the receiving module, the browser terminal needs to send playback control instructions and target addresses to the processing module in the server, so that the subsequent processing module can start video stream data operation processing based on the target addresses after receiving the playback control instructions.

[0028] S204: The processing module retrieves each video stream data from the receiving module based on each target address, and decodes each video stream data to obtain each target data.

[0029] In the embodiments of this specification, in general, the receiving module can obtain video stream data through multiple network cameras or other monitoring devices, and store them in advance in each planned address. When the processing module in the server receives the playback control instruction sent by the browser terminal, it first establishes a connection relationship with the receiving module based on each target address, and then retrieves the corresponding video stream data in each target address from the receiving module. Furthermore, the processing module performs a series of decapsulation, decoding and other processing on the retrieved video stream data to obtain target data in a standard format that can be directly played on the browser.

[0030] In one possible implementation, the processing module retrieves each video stream data from the receiving module based on each target address, including: The processing module establishes an RTSP connection relationship with the receiving module based on each of the target addresses; The receiving module obtains each video stream data based on multiple cameras; The processing module retrieves each video stream data from the receiving module based on the RTSP connection relationship.

[0031] In the embodiment of the present specification, the processing module establishes a real-time streaming protocol, i.e., an RTEP connection relationship with the receiving module based on the acquired target address. In the playback system, the receiving module continuously obtains each video stream data from multiple network cameras, and stores each video stream data based on each planned address. Further, after receiving the playback control instruction, the processing module sends an RTSP request to the receiving module, and retrieves the video stream data corresponding to each target address, so that the processing module can subsequently perform unified data processing on each designated video stream data.

[0032] In one possible implementation, the processing module includes a decapsulation submodule and a decoding submodule, the decapsulation submodule is used to decapsulate each of the video stream data, and the decoding submodule is used to decode each of the video stream data.

[0033] In the embodiment of the present specification, the processing module in the server may be composed of multiple small modules, which may include a decapsulation submodule and a decoding submodule. Since each acquired video stream data is compressed and encapsulated, the decapsulation submodule set in the processing module can be used to decapsulate each video stream data, and the decoding submodule set can decode each video stream data.

[0034] In one possible implementation manner, decoding each of the video stream data to obtain each target data includes: The decapsulation submodule decapsulates each of the video stream data to obtain each encapsulation information; The decoding submodule decodes each of the video stream data based on each of the encapsulation information to obtain each target data.

[0035] In the embodiment of the present specification, after the processing module is provided with a decapsulation module and a decoding module, when decoding each video stream data, each video stream data can be first decapsulated in the decapsulation submodule to obtain the encapsulation information corresponding to each video stream data. Among them, the encapsulation information may include information such as the encoding format, frame rate and resolution of the video stream data. Further, the decoding submodule selects the corresponding decoder through the obtained encapsulation information, and decodes each video stream data to obtain the target data in a unified YUV format.

[0036] In one possible implementation, the decapsulation submodule decapsulates each of the video stream data to obtain each encapsulation information, including: The decapsulation submodule decapsulates each of the video stream data to obtain each decapsulated data; The decapsulation submodule detects each decapsulation data to obtain each encapsulation information.

[0037] In the embodiments of this specification, when the decapsulation module is used to obtain the encapsulation information of each video stream data, each video stream data may be encapsulated into different container formats during the transmission process, such as MP4, AVI, MKV, etc., so it is necessary to first decapsulate it, extract the video stream data from the encapsulation container, and obtain the original decapsulated data. Further, the original decapsulated data includes encapsulation information and original acquisition data, so that information detection is performed on each decapsulated data to obtain encapsulation information including encoding format, frame rate and resolution, and each encapsulation information is sent to the decoding submodule.

[0038] In one possible implementation manner, the decoding submodule decodes each of the video stream data based on each of the encapsulation information to obtain each target data, including: The decoding submodule determines each decoder corresponding to each video stream data based on each encapsulation information; The decoding submodule decodes each of the video stream data based on each of the decoders to obtain each target data.

[0039] In the embodiments of the present specification, after obtaining each encapsulation information, the decoding submodule selects a corresponding appropriate decoder based on key information such as the encoding format and frame rate in the encapsulation information, and decodes each video stream data separately through each determined decoder to obtain each target data in a unified YUV format.

[0040] S205: The browser terminal obtains each target data returned by the processing module, and performs multi-channel display and playback on each target data.

[0041] In the embodiment of the present specification, the browser terminal obtains the unified YUV format target data returned by the processing module, and no other transcoding operations are required. Multiple channels of display and playback of each target data can be directly performed, and each playback and display window corresponds to one channel of target data separately.

[0042] Among them, when multiple playback systems are working at the same time, if there are multiple browser terminals requesting to retrieve video stream data of the same target address, that is, when the same code stream needs to be previewed at the same time, a shared decoded target data strategy can be adopted to directly share each target data to the processing module in other playback systems to avoid repeated stream retrieval and decoding operations and improve playback efficiency.

[0043] In one possible implementation manner, the browser terminal obtains each of the target data returned by the processing module, including: The processing module transmits back each of the target data based on the WebSocket protocol; The browser terminal obtains each of the target data based on the WebSocket protocol.

[0044] In the embodiment of the present specification, the browser terminal and the processing module can be connected via the WebSocket network communication protocol. The specific connection process is as follows: the browser terminal first sends a WebSocket handshake request to the processing module of the server. This request is initiated using the standard HTTP message format, but the connection protocol is upgraded to WebSocket. If the processing module in the server supports the WebSocket protocol, it will agree to the upgrade request and return a successful handshake response. At this point, the HTTP connection is upgraded to a WebSocket connection. When the server completes data decoding and obtains each target data, the processing module sends each target data to the browser terminal via the WebSocket connection, and the browser terminal obtains each target data as a receiving end based on the WebSocket protocol.

[0045] Among them, the use of the WebSocket protocol reduces the delay caused by frequent connection establishment and allows the server to actively send data, which can meet application scenarios that require real-time data transmission.

[0046] In one possible implementation manner, the performing multi-channel display and playback of each target data includes: The browser terminal performs rendering processing on each of the target data to obtain each rendering data; The browser terminal performs multi-channel display and playback of each of the rendering data.

[0047] In the embodiments of this specification, in order to meet the application scenarios of different actual situations, the browser terminal can first render each acquired target data, and can render each target data visually, and perform audio-visual synchronization and interaction optimization to obtain each rendering data. Then, the browser terminal performs multi-channel display and playback of each processed rendering data to present a smooth audio-visual synchronization picture, and each playback display window corresponds to a single channel of rendering data.

[0048] In one possible implementation, the processing module further includes a scaling submodule; The browser terminal sends a playback control instruction and each of the target addresses to the processing module, including: The browser terminal sends a playback control instruction, each of the target addresses and at least one width and height parameter to the processing module, wherein each of the width and height parameters is used to limit the size of each display window; The processing module retrieves each video stream data from the receiving module based on each target address, and decodes each video stream data to obtain each target data, and further includes: The scaling submodule performs scaling processing on each of the target data based on each of the width and height parameters to obtain each scaled data; The browser terminal obtains each of the target data returned by the processing module, and performs multi-channel display and playback of each of the target data, including: The browser terminal obtains each of the zoom data returned by the processing module, and performs multi-channel display and playback on each of the zoom data.

[0049] In the embodiments of this specification, when playing multiple videos in a browser, different window size interfaces need to be set in the display interface to meet the actual monitoring and playback requirements. Therefore, a scaling submodule can be added to the processing module. In addition to sending playback control instructions and target addresses to the processing module, the browser terminal also needs to send various width and height parameters used to limit the size of each display window. Then, after the processing module decodes the data to obtain each target data, it uses the added scaling submodule to scale each target data according to the width and height parameters. Finally, the processing module transmits the scaled data that meets the width and height parameters back to the browser terminal, and displays and plays it in multiple channels.

[0050] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A browser-based multi-channel video playback method, characterized in that: The method is applied to a browser-based multi-channel video playback system, the system includes a browser terminal and a server, the server includes a receiving module and a processing module, the browser terminal, the receiving module and the processing module are connected in pairs, and the method includes: The browser terminal acquires the playback task information, generates at least one playback request instruction corresponding to the playback task information, and sends each of the playback request instructions to the receiving module; The receiving module determines the target address corresponding to each of the play request instructions, and transmits each of the target addresses back to the browser terminal; The browser terminal sends a playback control instruction and each of the target addresses to the processing module; The processing module retrieves each video stream data from the receiving module based on each target address, and decodes each video stream data to obtain each target data; The browser terminal obtains each of the target data returned by the processing module, and performs multi-channel display and playback on each of the target data.

2. The method according to claim 1, characterized in that The receiving module determines the target address corresponding to each of the play request instructions, including: The receiving module obtains each of the play request instructions sent by the browser terminal; The target address corresponding to each of the play request instructions is determined based on a preset address database.

3. The method according to claim 1, characterized in that The processing module retrieves each video stream data from the receiving module based on each target address, including: The processing module establishes an RTSP connection relationship with the receiving module based on each of the target addresses; The receiving module obtains each video stream data based on multiple cameras; The processing module retrieves each video stream data from the receiving module based on the RTSP connection relationship.

4. The method according to claim 1, characterized in that: The processing module includes a decapsulation submodule and a decoding submodule. The decapsulation submodule is used to decapsulate each of the video stream data, and the decoding submodule is used to decode each of the video stream data.

5. The method according to claim 4, characterized in that The decoding of each of the video stream data to obtain each target data includes: The decapsulation submodule decapsulates each of the video stream data to obtain each encapsulation information; The decoding submodule decodes each of the video stream data based on each of the encapsulation information to obtain each target data.

6. The method according to claim 5, characterized in that The decapsulation submodule decapsulates each of the video stream data to obtain each encapsulation information, including: The decapsulation submodule decapsulates each of the video stream data to obtain each decapsulated data; The decapsulation submodule detects each decapsulation data to obtain each encapsulation information.

7. The method according to claim 5, characterized in that The decoding submodule decodes each of the video stream data based on each of the encapsulation information to obtain each target data, including: The decoding submodule determines each decoder corresponding to each video stream data based on each encapsulation information; The decoding submodule decodes each of the video stream data based on each of the decoders to obtain each target data.

8. The method according to claim 1, characterized in that The browser terminal obtains each of the target data returned by the processing module, including: The processing module transmits back each of the target data based on the WebSocket protocol; The browser terminal obtains each of the target data based on the WebSocket protocol.

9. The method according to claim 1, characterized in that: The performing multi-channel display and playback of each target data includes: The browser terminal performs rendering processing on each of the target data to obtain each rendering data; The browser terminal performs multi-channel display and playback of each of the rendering data.

10. The method according to claim 1, characterized in that The processing module also includes a scaling submodule; The browser terminal sends a playback control instruction and each of the target addresses to the processing module, including: The browser terminal sends a playback control instruction, each of the target addresses and at least one width and height parameter to the processing module, wherein each of the width and height parameters is used to limit the size of each display window; The processing module retrieves each video stream data from the receiving module based on each target address, and decodes each video stream data to obtain each target data, and further includes: The scaling submodule performs scaling processing on each of the target data based on each of the width and height parameters to obtain each scaled data; The browser terminal obtains each of the target data returned by the processing module, and performs multi-channel display and playback of each of the target data, including: The browser terminal obtains each of the zoom data returned by the processing module, and performs multi-channel display and playback on each of the zoom data.

Citation Information

Cited By

  • Web end video monitoring distributed decoding method and system

    CN121334343A