Method and apparatus for determining playing mode of multiple video streams, and computer device
By constructing standard videos and playing them in four-grid and nine-grid layouts on the TV, and determining the decoding frame drop rate based on processor parameters and adjusting the playback mode, the problem of judging the multi-channel video stream playback capability on the TV is solved, ensuring stable operation of the device.
Patent Information
- Application Number
- PCT/CN2024/135398
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-17
- Filing Date
- 2024-11-28
- Publication Date
- 2026-01-22
AI Technical Summary
Existing technologies cannot accurately determine the multi-stream playback capability of TV video playback devices, leading to frequent crashes or system crashes, and making it impossible to stably play multi-grid images for extended periods.
By constructing standard videos and playing them in four-grid and nine-grid layouts on different playback interfaces, the decoding frame drop rate of each window is determined based on the computer processor operating parameters of the video playback device, and the playback mode of multiple video streams is adjusted.
Accurately determine the multi-stream playback capability of video playback devices, ensure device operation safety, avoid crashes or restarts, and provide reasonable multi-grid playback functions.
Smart Images

Figure CN2024135398_22012026_PF_FP_ABST
Abstract
Description
Method, apparatus and computer equipment for determining multi-stream video playback modes Technical Field
[0001] This application relates to the field of audio and video technology, and in particular to a method, apparatus, and computer device for determining the playback mode of multiple video streams. Background Technology
[0002] In the video surveillance field, there is a need for set-top boxes or smart TVs to simultaneously and stably play multi-grid images for extended periods, specifically 1-grid, 2-grid, 4-grid, or 9-grid displays, to achieve the goal of monitoring environmental security. Existing solutions for simultaneously and stably playing multi-grid images for extended periods are all based on PCs (Personal Computers) or separate decoders, which are expensive and not easily scalable. If the multi-grid playback capability of a device is not tested, forcibly playing 4-grid or higher images may lead to frequent application crashes or even system crashes and inability to boot the TV box. Therefore, testing the multi-stream playback capability of video playback devices before enabling multi-stream playback is crucial.
[0003] The current TV (television) playback device ecosystem and hardware are relatively poor. The CPU (Central Processing Unit) and GPU (Graphics Processing Unit) hardware performance of mainstream TVs on the market varies greatly, ranging from dual-core A53 to quad-core A76. This makes it difficult to accurately determine the multi-stream playback capability of a video playback device using simple configuration parameters. Therefore, accurately determining the multi-stream playback capability of a video playback device, and adjusting its multi-stream playback mode accordingly to ensure its safe operation, is a problem that needs to be solved. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, and computer device for determining the multi-stream playback mode of a video playback device that can accurately determine the multi-stream playback capability of the video playback device, thereby adjusting the multi-stream playback mode of the video playback device and ensuring the safe operation of the video playback device.
[0005] Firstly, this application provides a method for determining a multi-channel video stream playback mode, the method comprising:
[0006] A standard video is constructed based on the target bit rate, target frame rate, target encoding method, and target video frame variation.
[0007] The standard video is played in a four-grid layout on the first video playback interface to determine the four-grid playback window, and the standard video is played in a nine-grid layout on the second video playback interface to determine the nine-grid playback window.
[0008] Based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window, the playback level of the video playback device is determined.
[0009] The playback mode of the multiple video streams is adjusted according to the playback level of the video playback device.
[0010] In one embodiment, the playback level of the video playback device is determined based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window, including:
[0011] Based on the operating parameters of the computer processor of the video playback device, determine the available memory of the computer processor and the number of cores of the computer processor;
[0012] If the available memory of the computer processor is greater than or equal to the memory threshold, and the number of cores of the computer processor is greater than the quantity threshold, then the decoding frame drop rate corresponding to each window in the four-grid playback window is determined based on the timestamp corresponding to the maximum change in the screen of each window in the four-grid playback window.
[0013] Based on the timestamps of the most changed frames in each window of the nine-grid playback window, the decoding frame drop rate of each window in the nine-grid playback window is determined.
[0014] The playback level of the video playback device is determined based on the decoding frame drop rate of each window in the four-grid playback window and the decoding frame drop rate of each window in the nine-grid playback window.
[0015] In one embodiment, the playback level of the video playback device is determined based on the decoding frame drop rate corresponding to each window in the four-grid playback window and the decoding frame drop rate corresponding to each window in the nine-grid playback window, including:
[0016] Based on the decoding frame drop rate corresponding to each window in the four-grid playback window, determine the number of first windows in the four-grid playback window whose decoding frame drop rate is less than the first preset probability.
[0017] Determine whether the number of the first windows is greater than or equal to three;
[0018] If so, then based on the decoding frame drop rate corresponding to each window in the nine-grid playback window, determine the number of second windows in the nine-grid playback window whose decoding frame drop rate is less than the first preset probability.
[0019] If the number of the second windows is less than eight, then the playback level of the video playback device is determined to be level five.
[0020] In one embodiment, after determining the number of second windows in the nine-grid playback window whose decoding frame drop rate is less than a first preset probability based on the decoding frame drop rate corresponding to each window in the nine-grid playback window, the method further includes:
[0021] If the number of the second windows is greater than or equal to eight, then the number of the third windows in the second target window is determined to be less than the number of the third target windows with a decoding frame drop rate less than the second preset probability; the second preset probability is less than the first preset probability.
[0022] Determine whether the number of the third windows is greater than or equal to eight;
[0023] If so, then the playback level of the video playback device is determined to be level seven;
[0024] If not, then the playback level of the video playback device is determined to be level six.
[0025] In one embodiment, after determining whether the number of the first windows is greater than or equal to three, the method further includes:
[0026] If not, then determine the number of fourth windows in the four-grid playback window whose decoding frame drop rate is less than the third preset probability; the third preset probability is greater than the first preset probability.
[0027] Determine whether the number of the fourth window is greater than or equal to three;
[0028] If so, then the playback level of the video playback device is determined to be level four;
[0029] If not, then the playback level of the video playback device is determined to be level three.
[0030] In one embodiment, after determining the available memory and the number of cores of the computer processor based on the operating parameters of the computer processor of the video playback device, the method further includes:
[0031] If the available memory of the computer processor is less than the memory threshold, and the number of cores of the computer processor is less than the quantity threshold, then the playback level of the video playback device is determined to be Level 1.
[0032] In one embodiment, after determining the available memory and the number of cores of the computer processor based on the operating parameters of the computer processor of the video playback device, the method further includes:
[0033] If the available memory of the computer processor is greater than or equal to the memory threshold, and the number of cores of the computer processor is less than the quantity threshold, then the playback level of the video playback device is determined to be level two.
[0034] Secondly, this application also provides a multi-channel video stream playback mode determination device, the device comprising:
[0035] The standard video construction module is used to construct a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation.
[0036] The playback window determination module is used to determine a four-grid playback window for playing the standard video in a four-grid layout on the first video playback interface, and to determine a nine-grid playback window for playing the standard video in a nine-grid layout on the second video playback interface.
[0037] The playback level determination module is used to determine the playback level of the video playback device based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window.
[0038] The playback mode determination module is used to adjust the playback mode of the multiple video streams according to the playback level of the video playback device.
[0039] Thirdly, this application also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0040] A standard video is constructed based on the target bit rate, target frame rate, target encoding method, and target video frame variation.
[0041] The standard video is played in a four-grid layout on the first video playback interface to determine the four-grid playback window, and the standard video is played in a nine-grid layout on the second video playback interface to determine the nine-grid playback window.
[0042] Based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window, the playback level of the video playback device is determined.
[0043] The playback mode of the multiple video streams is adjusted according to the playback level of the video playback device.
[0044] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0045] A standard video is constructed based on the target bit rate, target frame rate, target encoding method, and target video frame variation.
[0046] The standard video is played in a four-grid layout on the first video playback interface to determine the four-grid playback window, and the standard video is played in a nine-grid layout on the second video playback interface to determine the nine-grid playback window.
[0047] Based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window, the playback level of the video playback device is determined.
[0048] The playback mode of the multiple video streams is adjusted according to the playback level of the video playback device.
[0049] The aforementioned method, apparatus, and computer equipment for determining multi-stream video playback modes construct a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation. The standard video is then played in a four-grid layout on a first video playback interface to determine a four-grid playback window, and in a nine-grid layout on a second video playback interface to determine a nine-grid playback window. Based on the computer processor's operating parameters, the decoding frame drop rates corresponding to each window in the four-grid and nine-grid playback windows, the playback level of the video playback device is determined. The playback mode of the multi-stream video streams is then adjusted according to the playback level of the video playback device. This solves the problem of accurately determining the multi-stream video playback capability of a video playback device using simple configuration parameters. The above solution determines the playback level of the video playback device based on the computer processor's operating parameters, the playback status of the standard video in the four-grid playback window, and the playback status in the nine-grid playback window. It then adjusts the playback mode of the multi-stream video streams according to the playback level of the video playback device. This accurately assesses the multi-stream video playback capability of the video playback device and adjusts the multi-stream video playback mode accordingly, ensuring the safe operation of the video playback device. Attached Figure Description
[0050] Figure 1 is an application environment diagram of a method for determining the playback mode of multiple video streams in one embodiment;
[0051] Figure 2 is a flowchart illustrating a method for determining the playback mode of multiple video streams in one embodiment;
[0052] Figure 3 is a flowchart illustrating the method for determining the playback mode of multiple video streams in another embodiment;
[0053] Figure 4 is a flowchart illustrating the method for determining the playback mode of multiple video streams in another embodiment;
[0054] Figure 5 is a structural block diagram of a multi-channel video stream playback mode determination device in one embodiment;
[0055] Figure 6 is an internal structure diagram of a computer device in one embodiment. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0057] The multi-stream playback mode determination method provided in this application embodiment can be applied to the application environment shown in Figure 1. The terminal 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104 or placed on a cloud or other network server. The server 104 constructs a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation; it performs four-grid playback on the standard video in a first video playback interface to determine a four-grid playback window, and performs nine-grid playback on the standard video in a second video playback interface to determine a nine-grid playback window; based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window, it determines the playback level of the video playback device; it adjusts the playback mode of the multi-stream video streams according to the playback level of the video playback device, and sends the determined playback mode of the multi-stream video streams to the terminal 102 via the communication network. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0058] In one embodiment, as shown in Figure 2, a method for determining the playback mode of multiple video streams is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0059] S210. Construct a standard video based on the target bit rate, target frame rate, target encoding method, and target video frame variation.
[0060] For example, the target bitrate is 200kb / s, the target frame rate is 25fps, the target encoding method is H.265 encoding, and the target video frame change is the change in a classroom with forty students. A one-minute video is recorded based on the target bitrate, target frame rate, target encoding method, and target video frame change as a standard video for use in subsequent processes.
[0061] S220. Play the standard video in a four-grid layout on the first video playback interface and define the four-grid playback window. Then, play the standard video in a nine-grid layout on the second video playback interface and define the nine-grid playback window.
[0062] The first and second video playback interfaces refer to the playback interfaces of the same video playback device. Both interfaces can be simulated using a programmable video playback interface within an activity that is not visible during the playback process.
[0063] Specifically, the standard video is played in a four-grid layout within the video playback interface of the activity that is not visible during playback, thus defining the four-grid playback window. Conversely, the standard video is played in a nine-grid layout within the same activity that is also not visible during playback, thus defining the nine-grid playback window.
[0064] S230. Based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window, determine the playback level of the video playback device.
[0065] It should be noted that video playback devices are categorized into seven playback levels, from Level 1 to Level 7. Level 1 indicates the device can only stably play one video stream for extended periods using software decoding. Level 2 indicates the device has difficulty stably playing two video streams for extended periods using software decoding; prolonged playback may result in the system killing the application process or triggering a system restart. However, switching one of the video streams to hardware decoding allows for stable, extended playback. Level 3 indicates the device can stably play two video streams for extended periods using software decoding, but playing a four-grid layout is difficult; prolonged four-grid playback may result in the system killing the application process or triggering a system restart. Level 4 indicates the device can stably play four video streams for extended periods using software decoding, but prolonged playback may result in the system killing the application process or triggering a system restart. However, switching one of the video streams to hardware decoding allows for stable, extended playback. Level 5 indicates the device can stably play four video streams for extended periods using software decoding, but playing a nine-grid layout is difficult; prolonged nine-grid playback may result in the system killing the process or triggering a system restart. A playback level of six for a video playback device indicates that it has difficulty stably playing nine video streams using software decoding for extended periods. Prolonged playback may lead to the system killing the application process or triggering a system restart. However, switching one of the video streams to hardware decoding allows for stable, long-term playback. A playback level of seven for a video playback device indicates that it can stably play nine video streams using software decoding for extended periods.
[0066] Based on the multi-grid requirements of real-world business scenarios, a playback level classification is derived by combining business needs with device hardware capabilities. This classification is then directly applied to the requirements, ensuring that appropriate functionality is provided to users according to the playback level, thus preventing issues such as video playback device crashes or restarts. Alternatively, playback level detection can be used to select video playback devices that meet business needs. For example, if a video playback device is detected to have a playback level of five, only the highest four-grid video playback functionality will be provided. Or, if a batch of devices capable of playing nine-grid videos needs to be provided to users, detection can be performed beforehand, selecting a batch of video playback devices with a playback level of seven to avoid selecting devices whose surface-level hardware parameters meet playback requirements but whose actual playback levels do not.
[0067] The operating parameters of the computer processor in a video playback device include the available memory of the computer processor and the number of cores of the computer processor.
[0068] S240. Adjust the playback mode of multiple video streams according to the playback level of the video playback device.
[0069] Specifically, the correspondence between the playback level of the video playback device and the playback modes of multiple video streams can be preset. After determining the playback level of the video playback device, the playback modes of the multiple video streams can be adjusted according to the playback level of the video playback device and the correspondence between the playback level of the video playback device and the playback modes of the multiple video streams.
[0070] For example, if the playback level of the video playback device is level four, the playback mode of the multi-video stream will be adjusted to decode and play one of the video streams in the four-grid using hardware decoding.
[0071] In the aforementioned method for determining the playback mode of multiple video streams, a standard video is constructed based on the target bitrate, target frame rate, target encoding method, and target video frame variation. The standard video is then played in a four-grid layout on the first video playback interface to determine a four-grid playback window, and in a nine-grid layout on the second video playback interface to determine a nine-grid playback window. Based on the computer processor operating parameters of the video playback device, the decoding frame drop rates corresponding to each window in the four-grid and nine-grid playback windows, the playback level of the video playback device is determined. The playback mode of the multiple video streams is then adjusted according to the playback level of the video playback device. This solves the problem of accurately determining the multi-stream playback capability of a video playback device using simple configuration parameters. The above solution, by determining the playback level of the video playback device based on its computer processor operating parameters, the playback status of the standard video in the four-grid and nine-grid windows, and adjusting the playback mode of the multiple video streams accordingly, can accurately determine the multi-stream playback capability of the video playback device, thereby adjusting the multi-stream playback mode and ensuring the operational safety of the video playback device.
[0072] In one embodiment, as shown in Figure 3, the playback level of the video playback device is determined based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window. This includes:
[0073] S310. Determine the available memory and the number of cores of the computer processor based on the operating parameters of the computer processor of the video playback device.
[0074] It should be noted that the available memory and number of cores of the computer's processor can be used to make a preliminary judgment on the playback level of the video playback device.
[0075] S320. If the available memory of the computer processor is greater than or equal to the memory threshold, and the number of cores of the computer processor is greater than the quantity threshold, then the decoding frame drop rate corresponding to each window in the four-grid playback window is determined based on the timestamp of the largest change in the frame corresponding to each window in the four-grid playback window.
[0076] The memory threshold and quantity threshold can be set according to actual needs. For example, the memory threshold can be 150M, and there can be two quantity thresholds.
[0077] For example, if the available memory of the computer processor is greater than or equal to 150M and the number of cores of the computer processor is greater than two, then based on the timestamp of the maximum change of the screen in each window of the four-grid playback window, the video screen corresponding to the timestamp of the maximum change of the screen in each four-grid playback window is collected, and the decoding frame loss rate of the video screen corresponding to the timestamp of the maximum change of the screen in each four-grid playback window is used as the decoding frame loss rate of each window in the four-grid playback window.
[0078] S330. Based on the timestamps of the most changed frames in each window of the nine-grid playback window, determine the decoding frame drop rate for each window in the nine-grid playback window.
[0079] Specifically, based on the timestamps of the most changed frames in each window of the nine-grid playback window, the video frames corresponding to the timestamps of the most changed frames in each nine-grid playback window are collected, and the decoding frame drop rate of the video frames corresponding to the timestamps of the most changed frames in each nine-grid playback window is used as the decoding frame drop rate of each window in the nine-grid playback window.
[0080] S340. Determine the playback level of the video playback device based on the decoding frame drop rate of each window in the four-grid playback window and the decoding frame drop rate of each window in the nine-grid playback window.
[0081] The above scheme determines the decoding frame drop rate for each window in a four-grid playback window based on the timestamps of the most changed frames in each window, and the same scheme determines the decoding frame drop rate for each window in a nine-grid playback window based on the timestamps of the most changed frames in each window. This ensures that the obtained decoding frame drop rates can characterize the maximum frame drop rate of the video played in each grid, thereby improving the reliability of the subsequent determination of the playback level of the video playback device and increasing the efficiency of determining the decoding frame drop rate of the video played in each grid. Furthermore, the above method for determining the playback level of the video playback device is unaffected by external network factors, user habits, and bitrate changes caused by frame variations, and can accurately determine the playback level of the video playback device based on the most specific circumstances.
[0082] In one embodiment, as shown in Figure 4, the playback level of the video playback device is determined based on the decoding frame drop rate corresponding to each window in the four-grid playback window and the decoding frame drop rate corresponding to each window in the nine-grid playback window, including:
[0083] S410. Based on the decoding frame drop rate of each window in the four-grid playback window, determine the number of first windows in the four-grid playback window whose decoding frame drop rate is less than the first preset probability.
[0084] The first preset probability can be set according to actual needs; for example, the first preset probability can be 5%.
[0085] For example, based on the decoding frame drop rate corresponding to each window in the four-grid playback window, the number of first target windows with a decoding frame drop rate of less than 5% in the four-grid playback window is determined.
[0086] S420. Determine whether the number of the first window is greater than or equal to three.
[0087] S430. If so, then based on the decoding frame drop rate corresponding to each window in the nine-grid playback window, determine the number of second windows in the nine-grid playback window whose decoding frame drop rate is less than the first preset probability.
[0088] Specifically, if the number of first windows is greater than or equal to three, the playback level of the video playback device is tentatively set to level five, and the number of second target windows with a decoding frame drop rate of less than 5% in the nine-grid playback window is further determined based on the decoding frame drop rate corresponding to each window in the nine-grid playback window.
[0089] S440. If the number of second windows is less than eight, then the playback level of the video playback device is determined to be level five.
[0090] Specifically, if the number of second windows is less than eight, then the playback level of the video playback device is determined to be level five.
[0091] The above solution provides a method for determining the playback level of a video playback device based on the decoding frame drop rate in the four-grid playback window and the decoding frame drop rate of each window in the nine-grid playback window, which can improve the reliability of the playback level of the video playback device.
[0092] In one embodiment, after determining the number of second windows in the 3x3 grid playback window whose decoding frame drop rate is less than a first preset probability based on the decoding frame drop rate corresponding to each window in the 3x3 grid playback window, the method further includes:
[0093] If the number of second windows is greater than or equal to eight, then determine the number of third windows in the second target window whose decoding frame drop rate is less than the second preset probability; the second preset probability is less than the first preset probability; determine whether the number of third windows is greater than or equal to eight; if yes, then determine the playback level of the video playback device as level seven; if no, then determine the playback level of the video playback device as level six.
[0094] The second preset probability can be set according to actual needs, for example, it can be 1%.
[0095] For example, if the number of second windows is greater than or equal to eight, then the number of third target windows in the second target window that have a decoding frame drop rate of less than 1% is determined. If the number of third windows is greater than or equal to eight, then the playback level of the video playback device is determined to be level seven; otherwise, the playback level of the video playback device is determined to be level six.
[0096] The above solution provides a playback level for seven-level video playback devices and a method for determining the playback level for six-level video playback devices, which can improve the reliability of the playback level of video playback devices.
[0097] In one embodiment, after determining whether the number of first windows is greater than or equal to three, the method further includes:
[0098] If not, determine the number of fourth windows in the four-grid playback window whose decoding frame drop rate is less than the third preset probability; if the third preset probability is greater than the first preset probability, determine whether the number of fourth windows is greater than or equal to three; if yes, determine the playback level of the video playback device as level four; if not, determine the playback level of the video playback device as level three.
[0099] The third preset probability can be set according to actual needs; for example, the third preset probability can be 10%.
[0100] Specifically, if the number of first windows is less than three, then the number of fourth target windows with a decoding frame drop rate of less than 10% in the four-grid playback window is further determined. If the number of fourth windows is greater than or equal to three, then the playback level of the video playback device is determined to be level four; otherwise, the playback level of the video playback device is determined to be level three.
[0101] The above solution provides a method for determining the playback level of a three-level video playback device and a method for determining the playback level of a four-level video playback device, which can improve the reliability of the playback level of the video playback device.
[0102] In one embodiment, after determining the available memory and the number of cores of the computer processor based on the operating parameters of the computer processor of the video playback device, the method further includes:
[0103] If the available memory of the computer processor is less than the memory threshold, and the number of cores of the computer processor is less than the quantity threshold, then the playback level of the video playback device is determined to be Level 1.
[0104] For example, if the available memory of the computer processor is less than 150M and the number of cores of the computer processor is less than two, then the playback level of the video playback device is determined to be Level 1.
[0105] The above solution provides a method for determining the playback level of a Level 1 video playback device, further improving the reliability of the playback level of the video playback device.
[0106] In one embodiment, after determining the available memory and the number of cores of the computer processor based on the operating parameters of the computer processor of the video playback device, the method further includes:
[0107] If the available memory of the computer processor is greater than or equal to the memory threshold, and the number of cores of the computer processor is less than the quantity threshold, then the playback level of the video playback device is determined to be level two.
[0108] For example, if the available memory of the computer processor is greater than or equal to 150M and the number of cores of the computer processor is less than two, then the playback level of the video playback device is determined to be level two.
[0109] The above solution provides a method for determining the playback level of a secondary video playback device, further improving the reliability of the playback level of the video playback device.
[0110] For example, based on the above embodiments, the method for determining the playback mode of multiple video streams includes:
[0111] Record a 1-minute video as a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation, to be used in subsequent processes.
[0112] Based on the operating parameters of the computer processor used in the video playback device, determine the available memory and the number of processor cores. If the available memory is less than 150MB and the number of processor cores is less than two, the playback level of the video playback device is determined to be Level 1. If the available memory is greater than or equal to 150MB and the number of processor cores is less than two, the playback level of the video playback device is determined to be Level 2.
[0113] If the available memory of the computer processor is less than 150MB and the number of cores in the computer processor is less than two, then the playback level of the video playback device is determined to be Level 1. If the available memory of the computer processor is greater than or equal to the memory threshold and the number of cores in the computer processor is less than the number threshold, then the playback level of the video playback device is determined to be Level 2.
[0114] If the computer processor has 150MB or more of available memory and more than two cores, the standard video is played in a four-grid layout within an activity-based video playback interface that is not visible during playback. The decoding frame drop rate for each grid is collected at a selected point in the four-grid playback window where significant frame changes occur. Based on the decoding frame drop rate for each window in the four-grid playback window, the number of first target windows with a decoding frame drop rate less than 5% is determined. The number of first windows is then checked to see if it is greater than or equal to three. If the number of first windows is greater than or equal to three, the playback level of the video playback device is tentatively set to level five. Furthermore, based on the decoding frame drop rate for each window in the nine-grid playback window, the number of second target windows with a decoding frame drop rate less than 5% in the nine-grid playback window is determined. If the number of second windows is less than eight, the playback level of the video playback device is set to level five.
[0115] If the number of first windows is less than three, then the number of fourth target windows with a decoding frame drop rate of less than 10% in the four-grid playback window is further determined. If the number of fourth windows is greater than or equal to three, then the playback level of the video playback device is determined to be level four; otherwise, the playback level of the video playback device is determined to be level three.
[0116] If the number of second windows is greater than or equal to eight, then the number of third target windows in the second target window that have a decoding frame drop rate of less than 1% is determined. If the number of third windows is greater than or equal to eight, then the playback level of the video playback device is determined to be level seven; otherwise, the playback level of the video playback device is determined to be level six.
[0117] In the aforementioned method for determining the playback mode of multiple video streams, a standard video is constructed based on the target bitrate, target frame rate, target encoding method, and target video frame variation. The standard video is then played in a four-grid layout on the first video playback interface to determine a four-grid playback window, and in a nine-grid layout on the second video playback interface to determine a nine-grid playback window. Based on the computer processor operating parameters of the video playback device, the decoding frame drop rates corresponding to each window in the four-grid and nine-grid playback windows, the playback level of the video playback device is determined. The playback mode of the multiple video streams is then adjusted according to the playback level of the video playback device. This method solves the problem of accurately determining the multi-stream playback capability of a video playback device using only simple configuration parameters. The above solution determines the playback level of the video playback device based on the computer processor's operating parameters, the playback status of the standard video in the four-grid playback window, and the playback status in the nine-grid window. It then adjusts the playback mode of the multiple video streams according to the playback level of the video playback device. This accurately assesses the multi-stream playback capability of the video playback device, thereby adjusting the multi-stream playback mode and ensuring the safe operation of the video playback device.
[0118] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0119] Based on the same inventive concept, this application also provides a multi-channel video stream playback mode determination device for implementing the multi-channel video stream playback mode determination method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the multi-channel video stream playback mode determination device provided below can be found in the limitations of the multi-channel video stream playback mode determination method described above, and will not be repeated here.
[0120] In one embodiment, as shown in FIG5, a multi-channel video stream playback mode determination device is provided, including: a standard video construction module 501, a playback window determination module 502, a playback level determination module 503, and a playback mode determination module 504, wherein:
[0121] Standard video construction module 501 is used to construct a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation.
[0122] The playback window determination module 502 is used to determine the four-grid playback window for playing the standard video in a four-grid layout on the first video playback interface, and to determine the nine-grid playback window for playing the standard video in a nine-grid layout on the second video playback interface.
[0123] The playback level determination module 503 is used to determine the playback level of the video playback device based on the computer processor operating parameters of the video playback device, the decoding frame drop rate corresponding to each window in the four-grid playback window, and the decoding frame drop rate corresponding to each window in the nine-grid playback window.
[0124] The playback mode determination module 504 is used to adjust the playback mode of multiple video streams according to the playback level of the video playback device.
[0125] For example, the playback level determination module 503 is specifically used for:
[0126] Based on the operating parameters of the computer processor in the video playback device, determine the available memory and the number of cores of the computer processor.
[0127] If the available memory of the computer processor is greater than or equal to the memory threshold, and the number of cores of the computer processor is greater than the quantity threshold, then the decoding frame drop rate corresponding to each window in the four-grid playback window is determined based on the timestamp of the largest change in the frame in each window.
[0128] Based on the timestamps of the most changed images in each window of the nine-grid playback window, the decoding frame drop rate of each window in the nine-grid playback window is determined.
[0129] The playback level of the video playback device is determined based on the decoding frame drop rate of each window in the four-grid playback window and the decoding frame drop rate of each window in the nine-grid playback window.
[0130] For example, the playback level determination module 503 is also specifically used for:
[0131] Based on the decoding frame drop rate of each window in the four-grid playback window, determine the number of first windows in the four-grid playback window whose decoding frame drop rate is less than the first preset probability.
[0132] Determine if the number of the first window is greater than or equal to three;
[0133] If so, then based on the decoding frame drop rate corresponding to each window in the nine-grid playback window, determine the number of second windows in the nine-grid playback window whose decoding frame drop rate is less than the first preset probability.
[0134] If the number of second windows is less than eight, then the playback level of the video playback device is determined to be level five.
[0135] For example, the playback level determination module 503 is also specifically used for:
[0136] If the number of second windows is greater than or equal to eight, then the number of third windows in the second target window is determined to be less than the number of third target windows with a decoding frame drop rate less than the second preset probability; the second preset probability is less than the first preset probability.
[0137] Determine if the number of third windows is greater than or equal to eight;
[0138] If so, then the playback level of the video playback device is determined to be level seven;
[0139] If not, then the playback level of the video playback device is determined to be level six.
[0140] For example, the playback level determination module 503 is also specifically used for:
[0141] If the number of first windows is less than three, then the number of fourth windows in the four-grid playback window with a decoding frame drop rate less than the third preset probability is determined; the third preset probability is greater than the first preset probability.
[0142] Determine if the number of fourth windows is greater than or equal to three;
[0143] If so, then the playback level of the video playback device is determined to be level four;
[0144] If not, then the playback level of the video playback device is determined to be level three.
[0145] For example, the playback level determination module 503 is also specifically used for:
[0146] If the available memory of the computer processor is less than the memory threshold, and the number of cores of the computer processor is less than the quantity threshold, then the playback level of the video playback device is determined to be Level 1.
[0147] For example, the playback level determination module 503 is also specifically used for:
[0148] If the available memory of the computer processor is greater than or equal to the memory threshold, and the number of cores of the computer processor is less than the quantity threshold, then the playback level of the video playback device is determined to be level two.
[0149] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram is shown in Figure 6. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for determining a multi-channel video stream playback mode. The display unit of the computer device is used to form a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0150] Those skilled in the art will understand that the structure shown in Figure 6 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0151] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0152] Step 1: Construct a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation.
[0153] Step 2: On the first video playback interface, play the standard video in a four-grid layout and confirm the four-grid playback window. On the second video playback interface, play the standard video in a nine-grid layout and confirm the nine-grid playback window.
[0154] Step 3: Determine the playback level of the video playback device based on the computer processor operating parameters of the video playback device, the decoding frame drop rate of each window in the four-grid playback window, and the decoding frame drop rate of each window in the nine-grid playback window.
[0155] Step 4: Adjust the playback mode of the multiple video streams according to the playback level of the video playback device.
[0156] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0157] Step 1: Construct a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation.
[0158] Step 2: On the first video playback interface, play the standard video in a four-grid layout and confirm the four-grid playback window. On the second video playback interface, play the standard video in a nine-grid layout and confirm the nine-grid playback window.
[0159] Step 3: Determine the playback level of the video playback device based on the computer processor operating parameters of the video playback device, the decoding frame drop rate of each window in the four-grid playback window, and the decoding frame drop rate of each window in the nine-grid playback window.
[0160] Step 4: Adjust the playback mode of the multiple video streams according to the playback level of the video playback device.
[0161] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0162] Step 1: Construct a standard video based on the target bitrate, target frame rate, target encoding method, and target video frame variation.
[0163] Step 2: On the first video playback interface, play the standard video in a four-grid layout and confirm the four-grid playback window. On the second video playback interface, play the standard video in a nine-grid layout and confirm the nine-grid playback window.
[0164] Step 3: Determine the playback level of the video playback device based on the computer processor operating parameters of the video playback device, the decoding frame drop rate of each window in the four-grid playback window, and the decoding frame drop rate of each window in the nine-grid playback window.
[0165] Step 4: Adjust the playback mode of the multiple video streams according to the playback level of the video playback device.
[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0167] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0168] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0169] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for determining a multi-channel video stream playback mode, characterized in that, The method comprises the following steps: constructing a standard video according to a target code rate, a target frame rate, a target encoding mode and a target video picture change amount; playing the standard video in a four-square grid in a first video playing interface to determine a four-square grid playing window, and playing the standard video in a nine-square grid in a second video playing interface to determine a nine-square grid playing window; determining a playing level of a video playing device according to computer processor running parameters of the video playing device, a decoding frame loss rate corresponding to each window in the four-square grid playing window and a decoding frame loss rate corresponding to each window in the nine-square grid playing window; adjusting a playing mode of the video playing device corresponding to the multiple video streams according to the playing level.
2. The method of claim 1, wherein, The method for determining a playing level of a video playing device according to computer processor running parameters of the video playing device, a decoding frame loss rate corresponding to each window in the four-square grid playing window and a decoding frame loss rate corresponding to each window in the nine-square grid playing window comprises the following steps: determining available memory of the computer processor and the core number of the computer processor according to the computer processor running parameters of the video playing device; if the available memory of the computer processor is greater than or equal to a memory threshold value and the core number of the computer processor is greater than a quantity threshold value, determining the decoding frame loss rate corresponding to each window in the four-square grid playing window based on a timestamp corresponding to the maximum changed picture of the standard video in the four-square grid playing window; determining the decoding frame loss rate corresponding to each window in the nine-square grid playing window based on a timestamp corresponding to the maximum changed picture of the standard video in the nine-square grid playing window; determining the playing level of the video playing device according to the decoding frame loss rate corresponding to each window in the four-square grid playing window and the decoding frame loss rate corresponding to each window in the nine-square grid playing window.
3. The method of claim 2, wherein, The method for determining a playing level of a video playing device according to a decoding frame loss rate corresponding to each window in a four-square grid playing window and a decoding frame loss rate corresponding to each window in a nine-square grid playing window comprises the following steps: determining a first window number of a first target window with a decoding frame loss rate less than a first preset probability in the four-square grid playing window according to the decoding frame loss rate corresponding to each window in the four-square grid playing window; determining whether the first window number is greater than or equal to three; if yes, determining a second window number of a second target window with a decoding frame loss rate less than a first preset probability in the nine-square grid playing window according to the decoding frame loss rate corresponding to each window in the nine-square grid playing window; if the second window number is less than eight, determining the playing level of the video playing device as level five.
4. The method of claim 3, wherein, After determining the second window number of the second target window with a decoding frame loss rate less than a first preset probability in the nine-square grid playing window according to the decoding frame loss rate corresponding to each window in the nine-square grid playing window, the method further comprises the following steps: if the second window number is greater than or equal to eight, determining a third window number of a third target window with a decoding frame loss rate less than a second preset probability in the second target window; the second preset probability is less than the first preset probability; determining whether the third window number is greater than or equal to eight; If yes, it is determined that the playing level of the video playing device is seven. If no, it is determined that the playing level of the video playing device is six.
5. The method of claim 3, wherein, After determining whether the first window quantity is greater than or equal to three, the method further comprises: If no, it is determined that the fourth window quantity of a fourth target window in the four-grid playing window, in which the decoding frame loss rate is less than a third preset probability, is determined; the third preset probability is greater than the first preset probability. It is determined whether the fourth window quantity is greater than or equal to three. If yes, it is determined that the playing level of the video playing device is four. If no, it is determined that the playing level of the video playing device is three.
6. The method of claim 2, wherein, After determining the available memory of the computer processor and the core number of the computer processor according to the computer processor running parameters of the video playing device, the method further comprises: If the available memory of the computer processor is less than a memory threshold, and the core number of the computer processor is less than a quantity threshold, it is determined that the playing level of the video playing device is one.
7. The method of claim 2, wherein, After determining the available memory of the computer processor and the core number of the computer processor according to the computer processor running parameters of the video playing device, the method further comprises: If the available memory of the computer processor is greater than or equal to a memory threshold, and the core number of the computer processor is less than a quantity threshold, it is determined that the playing level of the video playing device is two.
8. A multi-path video stream play mode determination apparatus characterized by comprising: The multi-path video stream playing mode determination apparatus comprises: a standard video construction module, configured to construct a standard video according to a target code rate, a target frame rate, a target encoding mode and a target video picture change amount; a playing window determination module, configured to perform four-grid playing on the standard video in a first video playing interface, to determine a four-grid playing window, and to perform nine-grid playing on the standard video in a second video playing interface, to determine a nine-grid playing window; a playing level determination module, configured to determine a playing level of the video playing device according to computer processor running parameters of the video playing device, a decoding frame loss rate corresponding to each window in the four-grid playing window, and a decoding frame loss rate corresponding to each window in the nine-grid playing window; a playing mode determination module, configured to adjust a playing mode of the multi-path video stream according to the playing level of the video playing device. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
Citation Information
Patent Citations
Interaction method and device capable of realizing adaptive grids at front end
CN105975635A
Method and device for mixed playing of multi-channel videos based on soft and hard decoding of Android terminal
CN113301346A
Video processing method and device, electronic equipment and computer readable storage medium
CN113612922A
Multi-channel video stream playing mode determination method and device and computer equipment
CN118509650A
Moving image communication quality determination apparatus
US6591396B1