A video streaming playback method
By setting up an independent plug-in on the client device to receive and process video stream requests, the problem of excessive browser load is solved, the smoothness and stability of video stream playback is improved, and the fast response and efficient transmission of the video stream are ensured.
Patent Information
- Application Number
- CN202411088897.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-09
AI Technical Summary
In the existing technology, when the browser directly loads and plays the video stream, the browser load will be too high, resulting in freezes and delays, affecting the user experience.
By setting up a plug-in that is independent of the front-end browser on the client device, receives the video stream playback request, requests the video stream to the back-end server, and passes it back to the front-end browser for playback, reducing the load on the browser and pre- The set protocol address and listening mechanism efficiently manage video stream requests.
It improves the smoothness and stability of video stream playback, reduces delays, ensures a quick response to each video stream request, and quickly delivers the video stream to the front-end browser, improving data processing and transmission efficiency.
Smart Images

Figure CN118612504B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video stream playback, and in particular to a video stream playback method. Background Art
[0002] In the prior art, when a browser directly loads and plays a video stream, it is easy to compete with other tasks of the browser for resources, resulting in a decrease in the performance of the browser page. The usual practice is to initiate a request for the video stream through the browser itself and obtain the video data directly from the backend server, but this method will cause the browser to be overloaded. When users perform operations such as input, scrolling, and dragging on the browser, they will feel obvious lag and delay, affecting the user experience. Summary of the invention
[0003] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a video stream playback method, which solves the technical problem in the prior art that when a browser directly loads and plays a video stream, the browser itself initiates a request for the video stream and directly obtains video data from a back-end server, thereby causing excessive browser load and browser freeze.
[0004] In order to achieve the above object, the main technical solutions adopted by the present invention include:
[0005] An embodiment of the present invention provides a video stream playback method, which is applied to a video stream processing system, wherein the video stream processing system includes a backend server and a client device and a plurality of cameras respectively connected to the backend server for communication; the video stream playback method includes:
[0006] The front-end browser running on the client device receives at least one video stream playback request triggered by the user, and sends the video stream playback request to a preset protocol address;
[0007] Each video stream playback request corresponds to the ID of a camera in the video stream processing system one by one;
[0008] The client device is pre-set with a first plug-in, the first plug-in reads the video demand information in each video stream playback request in the protocol address, and requests the back-end server for the video stream corresponding to the video demand information respectively;
[0009] Wherein, each piece of video demand information corresponds to a video stream playback request one by one;
[0010] After receiving the video stream returned by the back-end server, the first plug-in transmits the video stream back to the front-end browser;
[0011] The front-end browser plays the received video streams in sequence according to the order in which the video streams are received.
[0012] Preferably,
[0013] The backend server specifies a database to store the video stream captured by each camera;
[0014] The video demand information includes the ID of the camera connected to the backend server and the specified time period;
[0015] The first plug-in is developed based on an open source framework, and the execution environment of the first plug-in is independent of the front-end browser.
[0016] Preferably,
[0017] The first plug-in requests the back-end server for a video stream corresponding to the video demand information, specifically including:
[0018] The first plug-in requests the video streams corresponding to the video demand information from the backend server one by one in a preset order, wherein after receiving each video stream returned by the backend server, the first plug-in requests the next video stream from the backend server.
[0019] Preferably,
[0020] After receiving the video stream playback request triggered by the user, the front-end browser also determines the preset parameter information corresponding to the video stream playback request based on the video stream playback request, obtains the buffering time corresponding to the video stream playback request based on the preset parameter information corresponding to the video stream playback request, and sends the preset parameter information corresponding to the video stream playback request to the back-end server;
[0021] The parameter information includes: a preset video stream weight, processing time, video quality weight, minimum resolution, maximum resolution, minimum frame rate, and maximum frame rate corresponding to the video stream playback request.
[0022] Preferably,
[0023] The front-end browser plays the received first video stream using a buffering time corresponding to the first video stream;
[0024] The first video stream is any video stream received by the front-end browser;
[0025] The buffering time corresponding to the first video stream is the buffering time corresponding to the first video stream playback request;
[0026] The first video stream playback request corresponds to the first video stream.
[0027] Preferably,
[0028] The front-end browser obtains the buffering time corresponding to the video stream playback request based on the preset parameter information corresponding to the video stream playback request, specifically including:
[0029] The front-end browser uses formula (1) as a first objective function based on pre-set parameter information corresponding to the video stream playback request, and uses a numerical optimization method based on the first objective function to obtain a buffer time corresponding to the video stream playback request;
[0030] The formula (1) is:
[0031] ;
[0032] in, w i Triggered by the user n Video stream playback request i A preset video stream weight corresponding to a video stream playback request;
[0033] t i Triggered by the user n Video stream playback request i The preset processing time corresponding to each video stream playback request;
[0034] B i Triggered for the user to be acquired n Video stream playback request i The buffering time corresponding to each video stream playback request;
[0035] Q i Triggered by the user n Video stream playback request i A preset video quality weight corresponding to a video stream playback request;
[0036] is a preset first weight coefficient;
[0037] is a preset second weight coefficient.
[0038] Preferably,
[0039] After the back-end server in the video stream processing system obtains the request for the video stream corresponding to the video demand information sent by the first plug-in to the back-end server, the back-end server obtains the video stream corresponding to the video demand information in the designated database and transmits the video stream corresponding to the video demand information to the first plug-in.
[0040] Preferably, the backend server transmits the video stream corresponding to the video demand information to the first plug-in, specifically including:
[0041] The backend server transmits the video stream corresponding to the video demand information to the first plug-in according to the bandwidth corresponding to the video demand information.
[0042] Preferably,
[0043] The bandwidth corresponding to the video demand information is obtained by using a preset second objective function and a preset constraint condition;
[0044] Among them, the second objective function is:
[0045] ;
[0046] L i Triggered by the user n Video stream playback request i The bandwidth corresponding to the video stream playback request;
[0047] The pre-set constraints are:
[0048] ;
[0049] ;
[0050] ;
[0051] L a is the total bandwidth available between the backend server and the client devices;
[0052] L min,i It is with i The minimum bandwidth requirement of the video stream corresponding to each video stream playback request;
[0053] L max,i It is with i The maximum bandwidth requirement of the video stream corresponding to the video stream playback request.
[0054] Preferably,
[0055] L min,i = and i The minimum resolution width corresponding to the video stream playback request is × i The height of the minimum resolution corresponding to the video stream playback request is × iThe minimum frame rate corresponding to a video stream playback request × the preset compression factor;
[0056] L max,i = and i The maximum resolution width corresponding to the video stream playback request is × i The maximum resolution height corresponding to the video stream playback request is × i The maximum frame rate corresponding to the video stream playback request is multiplied by the preset compression factor.
[0057] The beneficial effects of the present invention are as follows: in a video stream playback method of the present invention, a front-end browser sends a video stream playback request through a pre-set protocol address, and an independent first plug-in processes and transmits the video stream. Since the first plug-in is executed independently, the front-end browser load is reduced, and the smoothness and stability of the video stream playback are improved. In addition, by using the pre-set protocol address and the monitoring mechanism of the first plug-in, the video stream playback request can be efficiently managed and processed, ensuring that each video stream request can be quickly responded to and the video stream is quickly transmitted to the front-end browser. The first plug-in monitors the protocol address, reads the video demand information and requests the corresponding video stream from the back-end server, which improves the efficiency of data processing and transmission and reduces delays.
[0058] The video stream playing method of the present invention can manage these tasks more efficiently without being disturbed by other tasks of the front-end browser, because the first plug-in is specifically responsible for processing video stream requests and video stream transmission, thereby improving the efficiency of video stream processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A flow chart of a video stream playing method of the present invention;
[0060] Figure 2 Schematic diagram of the structure of a video stream processing system in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0062] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0063] See also Figure 1This embodiment provides a video stream playback method, which is applied to a video stream processing system. Figure 2 The video stream processing system includes a backend server and a client device and a plurality of cameras respectively connected to the backend server for communication; the video stream playing method includes:
[0064] The front-end browser running on the client device receives at least one video stream playback request triggered by the user, and sends the video stream playback request to a preset protocol address;
[0065] Each video stream playback request corresponds to the ID of a camera in the video stream processing system one by one;
[0066] The client device is pre-set with a first plug-in, the first plug-in reads the video demand information in each video stream playback request in the protocol address, and requests the back-end server for the video stream corresponding to the video demand information respectively;
[0067] The video demand information includes the ID of the camera connected to the backend server and the specified time period;
[0068] Wherein, each piece of video demand information corresponds to a video stream playback request one by one;
[0069] After receiving the video stream returned by the back-end server, the first plug-in transmits the video stream back to the front-end browser;
[0070] The first plug-in is developed based on an open source framework, and the execution environment of the first plug-in is independent of the front-end browser.
[0071] The front-end browser plays the received video streams in sequence according to the order in which the video streams are received.
[0072] The designated database in the backend server stores the video stream captured by each camera.
[0073] For example, a user opens a front-end browser on a client device (such as a PC, mobile phone, tablet, etc.) and selects a video stream to be viewed through the operation interface (such as a specific camera and time period). The front-end browser receives at least one video stream playback request triggered by the user and sends the video stream playback request to a pre-set protocol address.
[0074] Each video stream playback request corresponds to the ID of the camera in the system. For example, if the user selects the video stream with camera ID 101, the front-end browser will generate a video stream playback request containing the camera ID.
[0075] A first plug-in is pre-set on the client device. The first plug-in is developed based on an open source framework and runs in an execution environment independent of the browser. The first plug-in monitors the protocol address and reads the video demand information in each video stream playback request. The video demand information includes the camera ID connected to the backend server and the specified time period (for example, 15:00 to 15:30 on July 1, 2024).
[0076] The first plug-in requests the corresponding video stream from the back-end server according to the video demand information. The back-end server retrieves and returns the corresponding video stream from the specified database according to the camera ID and time period in the request. After receiving the video stream returned by the back-end server, the first plug-in passes the video stream back to the front-end browser. The front-end browser plays the received video streams in the order in which the video streams are received. The user can watch smooth and coherent video content in the front-end browser.
[0077] In this embodiment, the first plug-in runs in an independent execution environment and does not compete with the front-end browser for resources, which reduces the browser's CPU and memory usage, enables the browser to maintain a low load, ensures that video stream processing and transmission are more efficient, and improves the smoothness and stability of video playback. Each video stream playback request corresponds to the camera ID one by one, and cameras and client devices can be flexibly added or removed without affecting the overall system performance and stability. The front-end browser plays the video streams in the order in which they are received, ensuring the order and continuity of video playback, so that users can obtain a consistent and smooth viewing experience. The independent execution of the first plug-in reduces dependence on the front-end browser and reduces development complexity. The first plug-in monitors the protocol address, reads the video demand information and requests the corresponding video stream from the back-end server, which improves the efficiency of data processing and transmission and reduces delays.
[0078] In this embodiment, the first plug-in requests the backend server for a video stream corresponding to the video demand information, specifically including:
[0079] The first plug-in requests the video streams corresponding to the video demand information from the backend server one by one in a preset order, wherein after receiving each video stream returned by the backend server, the first plug-in requests the next video stream from the backend server.
[0080] The user chooses to watch the video streams of three cameras (with IDs 101, 102, and 103) in the front-end browser and specifies the time period from 15:00 to 15:30 on July 1, 2024.
[0081] The browser receives the three video stream playback requests triggered by the user and sends them to the pre-set protocol address. Each request contains the camera ID and the specified time period.
[0082] The first plug-in pre-set on the client device monitors the protocol address and reads the video demand information in each video stream playback request.
[0083] The plugin requests video streams in order:
[0084] Step 1: The first plug-in sends a request to the backend server to obtain the video stream of camera ID 101, with the time period being 15:00 to 15:30 on July 1, 2024.
[0085] Step 2: After receiving the request, the backend server retrieves the corresponding video stream from the database and returns the video stream to the first plug-in.
[0086] Step 3: After successfully receiving the first video stream, the first plug-in sends the next request to the backend server in a pre-set order to obtain the video stream of camera ID 102, and the time period is also from 15:00 to 15:30 on July 1, 2024.
[0087] Step 4: After receiving the request, the backend server retrieves the corresponding video stream from the database and returns the video stream to the first plug-in.
[0088] Step 5: After successfully receiving the video stream of camera 102, the first plug-in continues to send the last request to the backend server in sequence to obtain the video stream of camera ID 103.
[0089] Step 6: The backend server retrieves the corresponding video stream and returns it to the first plug-in.
[0090] In this embodiment, video streams are requested and processed one by one in a pre-set order, ensuring the orderly processing of each request, avoiding request confusion and resource competition, and improving the stability and reliability of the system. Video streams are requested one by one instead of requesting multiple video streams at the same time, avoiding the occupation of system resources by too many concurrent requests and optimizing resource management. Only one video stream request is processed at a time, so the first plug-in can respond and process faster, reducing processing delays and improving the smoothness of video playback.
[0091] Specifically, after receiving the video stream playback request triggered by the user, the front-end browser also determines the preset parameter information corresponding to the video stream playback request based on the video stream playback request, obtains the buffering time corresponding to the video stream playback request based on the preset parameter information corresponding to the video stream playback request, and sends the preset parameter information corresponding to the video stream playback request to the back-end server;
[0092] The parameter information includes: a preset video stream weight, processing time, video quality weight, minimum resolution, maximum resolution, minimum frame rate, and maximum frame rate corresponding to the video stream playback request.
[0093] For example, suppose that the user chooses to watch the video stream of the camera (ID is 101) in the front-end browser, and the specified time period is from 15:00 to 15:30 on July 1, 2024. The front-end browser receives the video stream playback request triggered by the user, and determines the corresponding pre-set parameter information based on the request. Based on the video stream playback request, the front-end browser determines the pre-set parameter information including: video stream weight: for example, 3 (the higher the weight, the higher the priority); processing time: for example, 30 seconds; video quality weight: for example, 5 (the higher the weight, the higher the quality requirement); minimum resolution: for example, 720p; maximum resolution: for example, 1080p; minimum frame rate: for example, 24 frames / second;
[0094] Maximum frame rate: for example, 60 frames per second; the browser calculates the buffering time based on pre-set parameter information corresponding to the video stream playback request.
[0095] The front-end browser sends the determined parameter information and the video stream playback request to the back-end server. These parameter information help the back-end server to better understand and process the video stream request.
[0096] In this embodiment, the parameter information can be the parameters manually configured by the administrator for each camera in the system settings. For example, the camera ID 101 is set to have a maximum resolution of 1080p, a minimum resolution of 720p, a maximum frame rate of 60fps, a minimum frame rate of 24fps, a video quality weight of high (8), and a video stream weight of high (8).
[0097] In this embodiment, the front-end browser uses a buffering time corresponding to the first video stream to play the received first video stream;
[0098] The first video stream is any video stream received by the front-end browser;
[0099] The buffering time corresponding to the first video stream is the buffering time corresponding to the first video stream playback request;
[0100] The first video stream playback request corresponds to the first video stream.
[0101] For example, it is assumed that the front-end browser receives the first video stream returned from the back-end server.
[0102] According to the buffering time corresponding to the first video stream, the front-end browser starts to preload the first video stream data. During the buffering time corresponding to the first video stream, the front-end browser does not play the video immediately, but pre-downloads and caches part of the first video stream data.
[0103] During the buffering time corresponding to the first video stream (e.g., 5 seconds), the front-end browser continuously downloads the data of the first video stream through network requests and stores it in memory. The front-end browser checks whether the downloaded data is sufficient to support smooth playback. The front-end browser pre-downloads at least a few seconds of video content to ensure that there is no lag during playback. When the buffering time corresponding to the first video stream ends, the front-end browser has cached enough video data. Then, the front-end browser starts playing the pre-loaded video stream data, and the user can see smooth video playback at this time.
[0104] In this embodiment, by applying a buffer time before playing, the front-end browser can preload enough video data to ensure smooth playback without lag. The predetermined buffer time can effectively reduce the delay during playback and improve the immediacy of video playback.
[0105] The front-end browser obtains the buffering time corresponding to the video stream playback request based on the preset parameter information corresponding to the video stream playback request, specifically including:
[0106] The front-end browser uses formula (1) as a first objective function based on pre-set parameter information corresponding to the video stream playback request, and uses a numerical optimization method based on the first objective function to obtain a buffer time corresponding to the video stream playback request;
[0107] The formula (1) is:
[0108] ;
[0109] in, w i Triggered by the user n Video stream playback request i A preset video stream weight corresponding to a video stream playback request;
[0110] t i Triggered by the user n Video stream playback request i The preset processing time corresponding to each video stream playback request;
[0111] B i Triggered for the user to be acquired n Video stream playback requesti The buffering time corresponding to each video stream playback request;
[0112] Q i Triggered by the user n Video stream playback request i A preset video quality weight corresponding to a video stream playback request;
[0113] is a preset first weight coefficient;
[0114] is a preset second weight coefficient.
[0115] In this embodiment, by pre-setting the video stream weight, processing time and video quality weight, and using the numerical optimization method to calculate the buffering time, the system can dynamically adjust the buffering time of each video stream to achieve the best playback effect. Assuming that a video stream has a higher weight and a shorter processing time, the optimization function will tend to reduce the buffering time of the video stream, thereby reducing playback delay and improving user experience.
[0116] After the back-end server in the video stream processing system obtains the request for the video stream corresponding to the video demand information sent by the first plug-in to the back-end server, the back-end server obtains the video stream corresponding to the video demand information in the designated database and transmits the video stream corresponding to the video demand information to the first plug-in.
[0117] In the practical application of this embodiment, the backend server transmits the video stream corresponding to the video demand information to the first plug-in, specifically including:
[0118] The backend server transmits the video stream corresponding to the video demand information to the first plug-in according to the bandwidth corresponding to the video demand information.
[0119] In this embodiment, the backend server transmits the video stream according to the bandwidth parameter in the video demand information, so that the video transmission process fully utilizes the network bandwidth and avoids bandwidth waste or shortage.
[0120] If the bandwidth specified in the video demand information is 5 Mbps, the backend server will transmit the video stream according to this bandwidth, ensuring that the video stream can be transmitted with the best quality when the network permits, while avoiding unnecessary bandwidth occupation.
[0121] Transmitting video streams according to the broadband in the video demand information can ensure that video data is transmitted at an appropriate rate, thereby reducing transmission delays and packet loss and improving transmission efficiency. When the network is in good condition, the server can transmit video data at a higher bandwidth rate, ensuring that the video stream reaches the client quickly and reducing waiting time.
[0122] In the practical application of this embodiment, the bandwidth corresponding to the video demand information is obtained by using a preset second objective function and a preset constraint condition;
[0123] Among them, the second objective function is:
[0124] ;
[0125] L i Triggered by the user n Video stream playback request i The bandwidth corresponding to the video stream playback request;
[0126] The pre-set constraints are:
[0127] ;
[0128] ;
[0129] ;
[0130] L a is the total bandwidth available between the backend server and the client devices;
[0131] L min,i It is with i The minimum bandwidth requirement of the video stream corresponding to each video stream playback request;
[0132] L max,i It is with i The maximum bandwidth requirement of the video stream corresponding to the video stream playback request.
[0133] L min,i = and i The minimum resolution width corresponding to the video stream playback request is × i The height of the minimum resolution corresponding to the video stream playback request is × i The minimum frame rate corresponding to a video stream playback request × the preset compression factor;
[0134] L max,i= and i The maximum resolution width corresponding to the video stream playback request is × i The maximum resolution height corresponding to the video stream playback request is × i The maximum frame rate corresponding to the video stream playback request is multiplied by the preset compression factor.
[0135] In this embodiment, through the second objective function and constraint conditions, the bandwidth of each video stream can be reasonably allocated within the total available bandwidth to ensure that bandwidth resources are fully utilized. Avoid bandwidth waste and maximize the transmission efficiency and playback effect of video streams. Bandwidth allocation is performed based on parameters such as video stream weight, processing time, and video quality weight to ensure that important video streams obtain higher bandwidth, thereby ensuring the quality and smoothness of the video. When watching important video streams, users can get better picture quality and smoother playback experience.
[0136] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0137] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0138] In the present invention, unless otherwise clearly specified and limited, when a first feature is “on” or “below” a second feature, it may be that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Moreover, when a first feature is “above”, “above” or “above” a second feature, it may be that the first feature is directly above or obliquely above the second feature, or it may simply mean that the first feature is higher in level than the second feature. When a first feature is “below”, “below” or “below” a second feature, it may be that the first feature is directly below or obliquely below the second feature, or it may simply mean that the first feature is lower in level than the second feature.
[0139] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0140] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may alter, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A video stream playback method, characterized in that: The method is applied to a video stream processing system, which includes a backend server and a client device and a plurality of cameras respectively connected to the backend server for communication; The video stream playing method comprises: The front-end browser running on the client device receives at least one video stream playback request triggered by the user, and sends the video stream playback request to a preset protocol address; Each video stream playback request corresponds to the ID of the camera in the video stream processing system one by one; the client device is pre-set with a first plug-in, the first plug-in reads the video demand information in each video stream playback request in the protocol address, and requests the back-end server for the video stream corresponding to the video demand information; wherein each video demand information corresponds to the video stream playback request one by one; After receiving the video stream returned by the back-end server, the first plug-in transmits the video stream back to the front-end browser; the front-end browser plays the received video streams in sequence according to the order in which the video streams are received; After receiving the video stream playback request triggered by the user, the front-end browser also determines the preset parameter information corresponding to the video stream playback request based on the video stream playback request, obtains the buffering time corresponding to the video stream playback request based on the preset parameter information corresponding to the video stream playback request, and sends the preset parameter information corresponding to the video stream playback request to the back-end server; the parameter information includes: the preset video stream weight, processing time, video quality weight, minimum resolution, maximum resolution, minimum frame rate, and maximum frame rate corresponding to the video stream playback request; The front-end browser uses the buffering time corresponding to the first video stream to play the received first video stream; the first video stream is any video stream received by the front-end browser; The buffering time corresponding to the first video stream is the buffering time corresponding to the first video stream playback request; the first video stream playback request corresponds to the first video stream; The front-end browser obtains the buffering time corresponding to the video stream playback request based on the preset parameter information corresponding to the video stream playback request, specifically including: The front-end browser uses formula (1) as the first objective function based on the pre-set parameter information corresponding to the video stream playback request, and uses a numerical optimization method based on the first objective function to obtain the buffer time corresponding to the video stream playback request; the formula (1) is: ; in, w i Triggered by the user n Video stream playback request i A preset video stream weight corresponding to a video stream playback request; t i Triggered by the user n Video stream playback request i The preset processing time corresponding to each video stream playback request; B i Triggered for the user to be acquired n Video stream playback request i The buffering time corresponding to each video stream playback request; Q i Triggered by the user n Video stream playback request i A preset video quality weight corresponding to a video stream playback request; is a preset first weight coefficient; is a preset second weight coefficient.
2. The video stream playing method according to claim 1, characterized in that: The backend server specifies a database to store the video stream captured by each camera; The video demand information includes the ID of the camera connected to the backend server and the specified time period; The first plug-in is developed based on an open source framework, and the execution environment of the first plug-in is independent of the front-end browser.
3. The video stream playing method according to claim 2, characterized in that: The first plug-in requests the back-end server for a video stream corresponding to the video demand information, specifically including: The first plug-in requests the video streams corresponding to the video demand information from the backend server one by one in a preset order, wherein after receiving each video stream returned by the backend server, the first plug-in requests the next video stream from the backend server.
4. The video stream playing method according to claim 3, characterized in that: After the back-end server in the video stream processing system obtains the request for the video stream corresponding to the video demand information sent by the first plug-in to the back-end server, the back-end server obtains the video stream corresponding to the video demand information in the designated database and transmits the video stream corresponding to the video demand information to the first plug-in.
5. The video stream playing method according to claim 4, characterized in that: The back-end server transmits the video stream corresponding to the video demand information to the first plug-in, specifically including: The backend server transmits the video stream corresponding to the video demand information to the first plug-in according to the bandwidth corresponding to the video demand information.
6. The video stream playing method according to claim 5, characterized in that: The bandwidth corresponding to the video demand information is obtained by using a preset second objective function and a preset constraint condition; Among them, the second objective function is: ; L i Triggered by the user n Video stream playback request i The bandwidth corresponding to the video stream playback request; The pre-set constraints are: ; ; ; L a is the total bandwidth available between the backend server and the client devices; L min,i It is with i The minimum bandwidth requirement of the video stream corresponding to each video stream playback request; L max,i It is with i The maximum bandwidth requirement of the video stream corresponding to the video stream playback request.
7. The video stream playing method according to claim 6, characterized in that: L min,i = and i The minimum resolution width corresponding to the video stream playback request is × i The height of the minimum resolution corresponding to the video stream playback request is × i The minimum frame rate corresponding to a video stream playback request × the preset compression factor; L max,i = and i The maximum resolution width corresponding to the video stream playback request is × i The maximum resolution height corresponding to the video stream playback request is × i The maximum frame rate corresponding to the video stream playback request is multiplied by the preset compression factor.
Citation Information
Patent Citations
Video stream transmission method and device
CN109525802A
Video stream playing method and video stream playing equipment
CN112468883A
Video data processing method and device
IN201937028859A
Method and device for playing plug-in in browser
WO2014101486A1
