Video playing method and device
By dynamically adjusting the pane area according to the video resolution and playback window size of the camera device, the problem of low video matching with the area in multi-channel video playback is solved, and more efficient video playback effects and less picture distortion is achieved.
Patent Information
- Application Number
- CN202311856865.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
In the prior art, when playing multi-channel video, the matching degree between the video and the playback area is low, resulting in poor playback effect.
By determining the size of the video playback window and the video resolution of the camera device, dynamically adjust the pane area to ensure that the pane area of the camera device is consistent with its video resolution, and using proportional or full-scale playback to reduce picture distortion.
It improves the effect of video playback, enhances the utilization rate of pane areas, reduces the distortion of video images, and improves the quality of multi-channel video playback.
Smart Images

Figure CN120234069A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video display technology, and in particular, to a video playing method and device. Background Art
[0002] The video playing system supports the multi-channel video playing function, that is, the images captured by multiple camera devices are played simultaneously in a video playing window.
[0003] For the multi-channel video playing function, it is necessary to split the screen of the video playing window, determine the playing areas corresponding to each camera device, and then play. Currently, the main ways of splitting the screen are to evenly divide or fixedly divide the video playing window. However, in this way of splitting the screen, the matching degree between the video and the corresponding playing area is relatively low, and the playing effect is not good. Summary of the Invention
[0004] This application provides a video playing method and device to solve the problem that the playing effect is not good due to the relatively low matching degree between the video and the corresponding playing area.
[0005] In a first aspect, this application provides a video playing method, including:
[0006] Determine the size of the video playing window and the video resolutions respectively captured by at least two camera devices that play videos through the video playing window;
[0007] Based on the video resolutions respectively captured by the at least two camera devices and the size of the video playing window, determine the pane areas of the at least two camera devices respectively from the video playing window;
[0008] Play the videos captured by the corresponding camera devices in each of the pane areas.
[0009] In a second aspect, this application provides a video playing device, including:
[0010] A determination module, configured to determine the size of the video playing window and the video resolutions respectively captured by at least two camera devices that play videos through the video playing window;
[0011] A processing module, configured to determine the pane areas of the at least two camera devices respectively from the video playing window based on the video resolutions respectively captured by the at least two camera devices and the size of the video playing window;
[0012] A playing module, configured to play the videos captured by the corresponding camera devices in each of the pane areas.
[0013] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the video playback method according to any one of the first aspect is implemented.
[0014] For the video playback method and device provided by the present application, first, the size of the video playback window and the video resolutions respectively captured by at least two camera devices that play videos through the video playback window are determined. Then, based on the video resolutions respectively captured by the at least two camera devices and the size of the video playback window, at least two pane regions corresponding to the respective camera devices are determined from the video playback window, and the videos captured by the corresponding camera devices are played in each pane region. Since the pane regions of the camera devices are jointly determined based on the resolutions of the camera devices in combination with the size of the video playback window, the videos captured by the camera devices can be better adapted to the pane regions of the camera devices, thereby improving the video playback effect. Description of the Drawings
[0015] To more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 It is a comparison schematic diagram of two playback modes in a corridor mode;
[0017] Figure 2 It is a flowchart of the video playback method provided by the embodiment of the present application;
[0018] Figure 3 It is a flowchart of determining the pane region of the camera device provided by the embodiment of the present application;
[0019] Figure 4 It is a flowchart of determining the window layout region of the first type of camera device provided by the embodiment of the present application;
[0020] Figure 5 It is a schematic diagram of the window layout region provided by the embodiment of the present application Figure 1 ;
[0021] Figure 6 It is a schematic diagram of the window layout region provided by the embodiment of the present application Figure 2 ;
[0022] Figure 7 It is a flowchart of determining the window layout region of the second type of camera device provided by the embodiment of the present application;
[0023] Figure 8 Schematic diagram of the layout area provided by the embodiment of the present application;
[0024] Figure 9 Schematic diagram of stretching the window layout area of the first type of camera device provided by the embodiment of the present application;
[0025] Figure 10 Schematic diagram of determining the window layout area of the second type of camera device provided by the embodiment of the present application;
[0026] Figure 11 Schematic diagram of determining the window layout area of the seventh camera device provided by the embodiment of the present application;
[0027] Figure 12 Schematic diagram of the structure of the video playback device provided by the embodiment of the present application;
[0028] Figure 13 Schematic diagram of the physical structure of an electronic device provided by the embodiment of the present application. Detailed implementation manners
[0029] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without making creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.
[0030] First, the basic concepts related to the embodiments of the present application will be introduced.
[0031] Full - scale playback: The playback ratio of the video is determined according to the size of the corresponding pane area, that is, the live video of the video fills the entire pane area.
[0032] Proportional playback: Ignoring the aspect ratio of the corresponding pane area, the playback ratio of the video is played according to the ratio of the actual playback channel.
[0033] In places such as airports, subways, and hospitals, due to the large number of installed camera devices, it is necessary to play the videos captured by multiple camera devices in one video playback window. In a multi - channel video playback scenario, it is necessary to split the video playback window. Currently, there are mainly two ways of splitting the screen. The first is to evenly divide or fixedly divide the video playback window, and the second is to determine the layout mode of each video by cropping and stretching the video.
[0034] Uniform partitioning means that the video playback window is evenly divided to obtain several pane areas of the same size for playing videos from different camera devices; fixed partitioning means that the partitioning method of the video playback window is preset to obtain several fixed pane areas for playing videos from different camera devices. Therefore, neither uniform partitioning nor fixed partitioning can meet the requirement of dynamically partitioning the pane area when the video channel changes, and the matching degree between the pane area and the video is relatively low. Moreover, by cropping and stretching the video, the original aspect ratio of the video will also be affected, resulting in corresponding video distortion.
[0035] Figure 1 It is a comparison schematic diagram of two playback methods in a corridor mode. As Figure 1 shown, taking the video playback in the corridor mode as an example, due to the low matching degree between the pane area and the video, the utilization rate of the pane area is relatively low when playing at a proportional scale, while when playing at a full scale, serious distortion occurs in the displayed picture.
[0036] Based on this, the embodiments of the present application provide a video playback method. In a multi-channel video playback scenario, customized window opening is implemented based on the resolution of the camera device, so that the pane area is more adapted to the video captured by the camera device, thereby improving the video playback effect. The solutions of the embodiments of the present application will be introduced below with reference to the accompanying drawings.
[0037] Figure 2 It is a flowchart of the video playback method provided by the embodiments of the present application. As Figure 2 shown, the method includes:
[0038] S21, determining the size of the video playback window and the video resolutions of at least two camera devices that play videos through the video playback window respectively.
[0039] The video playback window is used to play videos captured by at least two camera devices. The size of the video playback window may include the horizontal size and the vertical size of the video playback window.
[0040] In some embodiments, if the video playback window is the playback window of video playback software, the size of the video playback window can be determined based on the display resolution of the corresponding video playback device and the running mode of the video playback software. For example, the running modes of the video playback software include full-screen mode and reduced-down mode. In the full-screen mode, the video playback window fills the display interface of the video playback device, so the size of the video playback window can be obtained through the display resolution of the video playback device; in the reduced-down mode, the video playback window does not fill the display interface of the video playback device, so it is necessary to jointly determine the size of the video playback window by combining the display resolution of the video playback device and the reduced-down mode.
[0041] The imaging device is used to capture corresponding videos. The imaging device may include, for example, a fisheye camera, a dome camera, a quad camera, a bullet camera, etc. The embodiments of the present application do not limit this. Among them, during the shooting process of each imaging device, there is a video resolution for the captured video. The video resolution captured by the imaging device may include a video horizontal resolution and a video vertical resolution. The video horizontal resolution is used to indicate the number of pixels included in the horizontal direction of the video captured by the corresponding imaging device, and the video vertical resolution is used to indicate the number of pixels included in the vertical direction of the video captured by the corresponding imaging device.
[0042] S22. Based on the video resolutions captured by at least two imaging devices and the size of the video playback window, determine the pane regions of at least two imaging devices respectively from the video playback window.
[0043] After obtaining the video resolutions captured by each imaging device, the pane regions of each imaging device can be determined in the video playback window based on the video resolutions captured by each imaging device and the size of the video playback window. For each imaging device, the pane region of the imaging device is the region in the video playback window used to play the captured video. Since the pane region of the imaging device is determined based on the video resolution captured by the imaging device, the size of the pane region of the imaging device has a high degree of adaptability to the video resolution captured by the imaging device, and can improve the utilization rate of the video playback window on the premise of ensuring that the picture is not overly distorted.
[0044] S23. In each pane region, play the video captured by the corresponding imaging device.
[0045] After determining the pane regions of each imaging device, the video captured by the corresponding imaging device can be played in each pane region.
[0046] The video playback method provided by the embodiments of the present application first determines the size of the video playback window and the video resolutions captured by at least two imaging devices that play videos through the video playback window, and then based on the video resolutions captured by at least two imaging devices respectively and the size of the video playback window, determines the pane regions of at least two imaging devices respectively from the video playback window, and plays the videos captured by the corresponding imaging devices in each pane region. Since the pane regions of each imaging device are jointly determined based on the video resolution captured by the imaging device in combination with the size of the video playback window, it can make the videos captured by the imaging device more adaptable to the pane regions of the imaging device, thereby improving the video playback effect.
[0047] Based on any of the above embodiments, the solutions of the embodiments of the present application will be further introduced below with reference to the accompanying drawings.
[0048] Figure 3The flowchart for determining the pane area of a camera device provided by an embodiment of this application is as follows Figure 3 shown, including:
[0049] S31. For each camera device, based on the video resolution captured by the camera device, determine the image size type of the image captured by the camera device.
[0050] After obtaining the video resolution captured by each camera device, the image size type of each camera device can be determined according to the horizontal video resolution and vertical video resolution captured by each camera device. Among them, the image size type includes a first image size type and a second image size type. The first image size type is that the horizontal video resolution captured by the camera device is less than or equal to the vertical video resolution (abbreviated as type A in the following embodiments), and the second image size type is that the horizontal video resolution captured by the camera device is greater than the vertical video resolution (abbreviated as type B in the following embodiments); alternatively, the first image size type is type B, and the second image size type is type A.
[0051] For any camera device, after obtaining the video resolution captured by the camera device, by comparing the horizontal video resolution and vertical video resolution captured by the camera device, the image size type of the image captured by the camera device can be determined.
[0052] S32. Based on the video resolution and image size type captured by at least two camera devices respectively, determine the window layout areas of at least two camera devices respectively in the layout area corresponding to the video playback window.
[0053] Based on the image size type of each camera device, the camera devices can be classified. Among them, if there is a camera device with the first image size type among at least two camera devices, it is determined as the first type of camera device; if there is a camera device with the second image size type among at least two camera devices, it is determined as the second type of camera device.
[0054] After classifying each camera device, the window layout areas of at least two camera devices can be determined based on the video resolution captured by at least two camera devices respectively and the type of the camera device.
[0055] In a possible implementation manner, at least two camera devices include at least one first type of camera device, and the first type of camera device is a camera device that captures the first image size type. After obtaining the video resolution captured by at least one first type of camera device respectively, in the order from high to low of the vertical video resolution captured by at least one first type of camera device, starting from the first position of the layout area corresponding to the video playback window, determine the window layout areas of at least one first type of camera device in this layout area.
[0056] Figure 4 This is a flowchart for determining the window layout area of a first-type imaging device provided by an embodiment of the present application. As Figure 4 shown, it includes:
[0057] S41. Determine the window layout area of the first imaging device with the maximum video vertical resolution among at least one first-type imaging device. The window layout area of the first imaging device is located at the first position.
[0058] In the embodiment of the present application, the first-type imaging device can be an imaging device of type A or an imaging device of type B. In the following embodiments, for the sake of description, it is assumed that the first-type imaging device is an imaging device of type A as an example for introduction. Those skilled in the art can know that in the case where the first-type imaging device is an imaging device of type B, the method for determining the corresponding window layout area is similar.
[0059] First, determine the window layout area of the first imaging device. The first imaging device is the imaging device with the maximum video vertical resolution among at least one first-type imaging device. The window layout area of the first imaging device is located at the first position in the layout area corresponding to the video playback window. The first position can be, for example, the leftmost side of the layout area, the rightmost side of the layout area, the upper left corner of the layout area, the upper right corner of the layout area, the lower left corner of the layout area, the lower right corner of the layout area, etc. The embodiment of the present application does not limit this.
[0060] The number of the first imaging devices can be one or more. If the number of the first imaging devices is one, set the window layout area of this one first imaging device at the first position. If the number of the first imaging devices is multiple, the window layout areas of the multiple first imaging devices can be determined respectively. For example, the window layout area of any one of the multiple first imaging devices can be set at the first position, and the other first imaging devices are arranged adjacent to each other in sequence.
[0061] Figure 5 This is a schematic diagram of the window layout area provided by an embodiment of the present application Figure 1 , as Figure 5 shown. The layout area 50 corresponding to the video playback window is exemplified by a dotted line. The layout area 50 includes a first layout area and a second layout area. The first layout area is the layout area corresponding to the first image size type, and the second layout area is the layout area corresponding to the second image size type. Among the imaging devices of type A, the imaging devices with the maximum video vertical resolution are determined, including imaging device 1, imaging device 2, and imaging device 3. Then, the window layout areas of imaging device 1, imaging device 2, and imaging device 3 can be determined first.
[0062] Taking the leftmost position as the layout area 50 as an example, since the vertical resolutions of the videos captured by the imaging device 1, the imaging device 2, and the imaging device 3 are equal, any one of these three imaging devices can have its window layout area set at the leftmost side of the layout area 50, and then the window layout areas of the remaining two imaging devices are set adjacent to each other in sequence.
[0063] In a possible implementation, when the vertical resolutions of the videos captured by the imaging device 1, the imaging device 2, and the imaging device 3 are equal, the horizontal resolutions of the videos captured by the imaging device 1, the imaging device 2, and the imaging device 3 can be compared, and then based on the horizontal resolutions of the captured videos, the window layout areas of the imaging device 1, the imaging device 2, and the imaging device 3 are determined. For example, in Figure 5 where the horizontal resolutions of the videos captured by the imaging device 1, the imaging device 2, and the imaging device 3 are, in descending order, the imaging device 1, the imaging device 2, and the imaging device 3, the window layout area of the imaging device 1 can be set at the leftmost side of the layout area 50, then the window layout area of the imaging device 2 is set adjacent to the window layout area of the imaging device 1, and the window layout area of the imaging device 3 is set adjacent to the window layout area of the imaging device 2.
[0064] S42. When there is a first other imaging device other than the first imaging device among at least one first-type imaging device, determine a second imaging device with the second largest vertical resolution of the captured video from the first other imaging devices.
[0065] After determining the window layout area of the first imaging device, determine whether there is a first other imaging device other than the first imaging device among at least one first-type imaging device. If there is no first other imaging device, the window layout areas of the first-type imaging devices are all determined; if there is a first other imaging device, the window layout area of the first other imaging device needs to be further determined.
[0066] Specifically, when it is determined that there is a first other imaging device, first determine a second imaging device with the second largest vertical resolution of the captured video from the first other imaging devices, where the vertical resolution of the video captured by the second imaging device is less than the vertical resolution of the video captured by the first imaging device, but the second imaging device is the imaging device with the largest vertical resolution among the first other imaging devices.
[0067] S43. Based on the video resolution of the second imaging device, determine the window layout area of the second imaging device, and the window layout area of the second imaging device is adjacent to the window layout area of the first imaging device.
[0068] After determining the second imaging device, the window layout area of the second imaging device can be obtained based on the video resolution captured by the second imaging device. The window layout area of the second imaging device is adjacent to the window layout area of the first imaging device, and the top of the window layout area of the second imaging device is flush with the top of the window layout area of the first imaging device.
[0069] For specific reference, please see Figure 6 the example of Figure 6 which is a schematic diagram of the window layout area provided by the embodiments of the present application Figure 2 As Figure 6 shown, after determining the window layout areas of imaging device 1, imaging device 2, and imaging device 3 in the layout area 50, determine the imaging device with the largest vertical video resolution among the remaining type-A imaging devices, that is, imaging device 4. Then, based on the video resolution captured by imaging device 4, determine the window layout area of imaging device 4. The window layout area of imaging device 4 is adjacent to the window layout area of imaging device 3.
[0070] S44. When there is a second other imaging device other than the second imaging device among the first other imaging devices, based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, and the video resolution captured by the second other imaging device, determine the window layout area of the second other imaging device.
[0071] After determining the window layout area of the second imaging device, it is necessary to further determine whether there is a second other imaging device other than the second imaging device among the first other imaging devices. If not, the window layout areas of the first type of imaging devices have all been determined. If so, it is necessary to further determine the window layout area of the second other imaging device.
[0072] When there is a second other imaging device among the first other imaging devices, first determine whether there is a third imaging device among the second other imaging devices. Among them, the vertical video resolution captured by the third imaging device is less than or equal to the difference between the vertical video resolution captured by the first imaging device and the vertical video resolution captured by the second imaging device, and the horizontal video resolution captured by the third imaging device is less than or equal to the horizontal video resolution captured by the second imaging device.
[0073] When there is a third imaging device, based on the video resolution captured by the third imaging device, the window layout area of the third imaging device can be determined. The window layout area of the third imaging device is adjacent to both the window layout area of the first imaging device and the window layout area of the second imaging device.
[0074] Please refer to Figure 6For example, after determining the window layout area of the imaging device 4, among the remaining type-A imaging devices, it is determined whether there is a third imaging device that satisfies the condition that the vertical resolution of the captured video is less than the difference between the vertical resolution of the video captured by the imaging device 1 and the vertical resolution of the video captured by the imaging device 4, and the horizontal resolution of the captured video is less than or equal to the horizontal resolution of the video captured by the imaging device 4. If there is such a device, the window layout area of the corresponding third imaging device can be set below the window layout area of the imaging device 4.
[0075] As Figure 6 shown, the imaging device 5 satisfies the above conditions. The vertical resolution of the video captured by the imaging device 5 is equal to the difference between the vertical resolution of the video captured by the imaging device 1 and the vertical resolution of the video captured by the imaging device 4, and the horizontal resolution of the video captured by the imaging device 5 is less than the horizontal resolution of the video captured by the imaging device 4. Therefore, based on the video resolution captured by the imaging device 5, the window layout area of the imaging device 5 can be determined. The window layout area of the imaging device 5 is located below the window layout area of the imaging device 4 and is adjacent to the window layout areas of both the imaging device 3 and the imaging device 4.
[0076] After determining the window layout area of the third imaging device, it is determined whether there is a third other imaging device other than the third imaging device among the second other imaging devices.
[0077] In the case where there is a third other imaging device other than the third imaging device among the second other imaging devices, based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, the video resolution captured by the third imaging device, and the video resolution captured by the third other imaging device, the window layout area of the third other imaging device is determined.
[0078] Specifically, first, based on the video resolution captured by the first imaging device, the video resolution captured by the second imaging device, the video resolution captured by the third imaging device, and the video resolution captured by the third other imaging device, a candidate area is determined in the layout area.
[0079] Among them, the candidate area is the area in the area formed by the width of the window layout area of the second imaging device and the height difference between the window layout areas of the first imaging device and the second imaging device, excluding the window layout area of the third imaging device. Please refer to Figure 6 shown, the candidate area is as Figure 6 shown by the shaded part in the figure, that is, the area in the area formed by taking the height difference between the window layout areas of the imaging device 1 and the imaging device 4 as the height of the candidate area and the width of the window layout area of the imaging device 4 as the width of the candidate area, excluding the window layout area of the imaging device 5.
[0080] Then, determine whether there is a fourth imaging device among the third other imaging devices whose captured video resolution meets the size of the candidate area, and a fifth imaging device other than the fourth imaging device.
[0081] The fourth imaging device is an imaging device that can be arranged in the candidate area. The number of fourth imaging devices may be 0, or one or more. Based on the video resolution captured by the third other imaging devices, it can be determined whether there is a fourth imaging device that meets the size of the candidate area.
[0082] Specifically, determine whether there is an imaging device among the third other imaging devices whose captured video vertical resolution is less than or equal to the difference between the video vertical resolution captured by the first imaging device and the video vertical resolution captured by the second imaging device, and whose captured video horizontal resolution is less than or equal to the difference between the video horizontal resolution captured by the second imaging device and the video horizontal resolution captured by the third imaging device. If there is such an imaging device, it can be determined as the fourth imaging device.
[0083] As Figure 6 shown, after determining the window layout area of imaging device 5, there is only a first other area below the window layout area of imaging device 4 except for the window layout area of imaging device 5, and only an imaging device whose captured video vertical resolution is less than or equal to the difference between the video vertical resolution captured by imaging device 1 and the video vertical resolution captured by imaging device 4, and whose captured video horizontal resolution is less than or equal to the difference between the video horizontal resolution captured by imaging device 4 and the video horizontal resolution captured by imaging device 5 can be arranged in the first other area.
[0084] In the case where there is a fourth imaging device, based on the video resolution captured by the fourth imaging device, determine the window layout area of the fourth imaging device. The window layout area of the fourth imaging device is adjacent to the window layout areas of the second imaging device and the third imaging device.
[0085] Please refer to Figure 6 , among the remaining type-A imaging devices, imaging device 6 meets the condition that the vertical resolution is less than or equal to the difference between the vertical resolution of imaging device 1 and the vertical resolution of imaging device 4, and the horizontal resolution is less than or equal to the difference between the horizontal resolution of imaging device 4 and the horizontal resolution of imaging device 5. Therefore, the window layout area of imaging device 6 is located below the window layout area of imaging device 4, and the window layout area of imaging device 6 is adjacent to the window layout areas of imaging device 4 and imaging device 5.
[0086] After determining the window layout area of each fourth imaging device, the remaining area in the candidate area available for arranging imaging devices is also updated accordingly. For example, in Figure 6After determining the window layout area of the imaging device 6, the area available for arranging the imaging device in the candidate area is Figure 6 the area obtained by subtracting the window layout area of the imaging device 6 from the shaded part in Figure 6 . Then, it is determined whether there is an imaging device among the remaining third other imaging devices that can be arranged in the candidate area. If there is, it is determined as the fourth imaging device until there is no imaging device among the remaining third other imaging devices that can be arranged in the candidate area.
[0087] The fifth imaging device is an imaging device whose video resolution of the captured video does not meet the size of the candidate area, that is, an imaging device other than the fourth imaging device among the third other imaging devices. In the case where there is a fifth imaging device, based on the resolution of the fifth imaging device, the window layout area of the fifth imaging device is determined, where the window layout area of the fifth imaging device is adjacent to the window layout area of the second imaging device.
[0088] Please refer to Figure 6 , after determining the window layout area of the imaging device 4, the window layout area of the fifth imaging device can be set adjacent to the window layout area of the imaging device 4. If there are multiple fifth imaging devices, they can be set adjacent in sequence based on the descending order of the vertical resolution of the captured video, where the window layout area of the imaging device with the largest vertical resolution of the captured video is set adjacent to the window layout area of the imaging device 4. After determining the window layout area of the fifth imaging device, there is a corresponding remaining area below the window layout area of the fifth imaging device. The height of this remaining area is the difference between the vertical resolutions of the videos captured by the first imaging device and the fifth imaging device, and the width of this remaining area is equal to the horizontal resolution of the video captured by the fifth imaging device. Then, it is determined whether there is an imaging device among the unarranged first-type imaging devices whose video resolution meets the size of the remaining area. If there is, its window layout area is set in the remaining area. Among them, the implementation process of determining whether there is an imaging device among the unarranged first-type imaging devices whose video resolution meets the size of the remaining area is similar to the implementation process of determining whether there is a fourth imaging device among the third other imaging devices whose video resolution meets the size of the candidate area, and will not be elaborated here.
[0089] In the above embodiments, it is introduced how to determine the window layout area of the first-type imaging device in the case where at least two imaging devices include at least one first-type imaging device. In some cases, at least two imaging devices further include at least one second-type imaging device, and the second-type imaging device is an imaging device that captures the second image size type. Next, how to determine the window layout area of the second-type imaging device will be introduced with reference to the accompanying drawings.
[0090] Figure 7The flowchart for determining the window layout area of the second type of camera device provided by the embodiments of the present application is as follows Figure 7 shown, including:
[0091] S71. Based on the window layout areas of at least one first type of camera device, determine the first layout area corresponding to the first image size type in the layout area.
[0092] The first layout area includes the window layout areas of at least one first type of camera device.
[0093] Figure 8 The schematic diagram of the layout area provided by the embodiments of the present application is as follows Figure 8 shown, exemplifying the window layout areas of each camera device of type A. Therefore, based on the airspace of the window layout areas of each camera device of type A, determine the first layout area corresponding to type A. Among them, the height of the first layout area is determined by the vertical resolution of the video captured by camera device 1, and the width of the first layout area is determined by the horizontal resolutions of the videos captured by camera device 1, camera device 2, camera device 3, camera device 4, and camera device 7.
[0094] S72. Determine whether there is an idle area in the first layout area.
[0095] The idle area is the area in the first layout area except for the window layout areas of at least one first type of camera device.
[0096] Specifically, for the window layout area of each first type of camera device in the first layout area, if there is an area below the window layout area of the first type of camera device that does not include the window layout areas of other camera devices, and the vertical resolution captured by the first type of camera device is less than the height of the first layout area, then determine the target width in the width of the window layout area of the first type of camera device, and use the target width as the width of the area, and stretch it downward regularly to the bottom of the first layout area to obtain the corresponding idle area. Among them, the target width is the width of the area below the window layout area of the first type of camera device that does not include the window layout areas of other camera devices.
[0097] Please refer to Figure 8, there is no window layout area for other imaging devices below the imaging device 6. Therefore, the width of the window layout area of the imaging device 6 can be determined as the corresponding target width p, and using p as the area width, stretch it downward regularly to the bottom of the first layout area, then the idle area C corresponding to the imaging device 6 can be obtained. There is an area with a window layout area that does not include other imaging devices below the imaging device 4. Therefore, the width of the window layout area of the imaging device can be subtracted by the widths of the window layout areas of the imaging devices 5 and 6 to obtain the corresponding target width p, and using p as the area width, stretch it downward regularly to the bottom of the first layout area, then the idle area D corresponding to the imaging device 4 can be obtained. Through a similar method, the idle area E corresponding to the imaging device 7 can be obtained.
[0098] In the case where there is no second type of imaging device, the window layout area of the first type of imaging device can be stretched. For specific details, please refer to Figure 9 the example.
[0099] Figure 9 is a schematic diagram of stretching the window layout area of the first type of imaging device provided by the embodiment of the present application. As Figure 9 shown, it illustrates the process of determining how to stretch the window layout area of the A-type imaging device in the case where there are three idle areas C, D, and E and no B-type imaging device.
[0100] Please refer to Figure 9 the example. Since there is no B-type imaging device, for the idle areas C and D, the window layout area of the imaging device 6 can be stretched proportionally first until the window layout area of the imaging device 6 reaches the corresponding boundary, which includes the bottom of the first layout area or the rightmost side of the window layout area of the imaging device 4 (whichever arrives first). If there is still a vacancy, it can be filled by the way of border adsorption, so that the window layout area of the imaging device 6 fills the idle areas C and D.
[0101] For the idle area E, the window layout area of the rightmost imaging device 7 can be stretched proportionally.
[0102] S73. Based on the determination result and the video resolutions captured by at least one second type of imaging device respectively, determine the window layout areas of at least one second type of imaging device.
[0103] It is determined that there is a free area in the first layout area, or there is no free area. Based on the determination result and the video resolution captured by each of at least one second-type camera device, it is possible to determine whether there is a sixth camera device among at least one second-type camera device, and a seventh camera device other than the sixth camera device. In the embodiments of the present application, the sixth camera device is a camera device suitable for setting the corresponding window layout area in the free area, and the seventh camera device is a camera device not suitable for setting the corresponding window layout area in the free area.
[0104] Specifically, if the determination result indicates that there is no free area in the first layout area, it is determined that there is no sixth camera device among at least one second-type camera device, and then all second-type camera devices are determined as seventh camera devices.
[0105] If the determination result indicates that there is a free area in the first layout area, it is necessary to combine the size of the free area and the video resolution captured by the second-type camera device to determine whether there is a sixth camera device and a seventh camera device among at least one second-type camera device.
[0106] To determine whether there is a sixth camera device among the second-type camera devices, the following two aspects of factors are mainly considered:
[0107] One aspect of the factor is whether the difference between the vertical resolution of the video captured by the second-type camera device and the height of the free area is greater than a first preset threshold. Since the free area is the remaining area in the first layout area after removing the window layout area of the first-type camera device, the size of the free area is usually small. If the vertical resolution of the video captured by the second-type camera device is high, the display effect of setting its window layout area in the free area is also not good. Therefore, for any free area, it is possible to determine whether there is a camera device among at least one second-type camera device whose vertical resolution of the captured video and the height of the free area have a difference less than or equal to the first preset threshold.
[0108] Another aspect of the factor is whether the difference between the first aspect ratio of the video captured by the second-type camera device and the second aspect ratio of the free area is greater than a second preset threshold. The aspect ratio of the video captured by the second-type camera device can be calculated from the vertical resolution and horizontal resolution of the video, and the aspect ratio of the free area can be calculated from the height and width of the free area. If the difference between the first aspect ratio and the second aspect ratio is greater than the second preset threshold, setting the window layout of this camera device in this free area will cause a large picture distortion and a poor display effect. Therefore, for any free area, it is possible to determine whether there is a camera device among at least one second-type camera device whose corresponding first aspect ratio and the second aspect ratio of the free area have a difference less than or equal to the second preset threshold.
[0109] For any idle area, in the second type of camera device, if there is a camera device whose difference between the vertical resolution of the captured video and the height of the idle area is less than or equal to the first preset threshold, and the difference between the corresponding first aspect ratio and the second aspect ratio of the idle area is less than or equal to the second preset threshold, then it is determined as the sixth camera device. If there are other camera devices in at least one second type of camera device besides the sixth camera device, then the other camera devices are determined as the seventh camera devices.
[0110] Then, when there is a sixth camera device in at least one second type of camera device, the idle area is determined as the window layout area of the sixth camera device.
[0111] Figure 10 It is a schematic diagram for determining the window layout area of the second type of camera device provided by the embodiment of the present application. As Figure 10 shown, it exemplifies how to determine the window layout area of one B type of camera device when there are three idle areas C, D, and E and only one B type of camera device exists.
[0112] Please refer to Figure 10 the example in. Among these three idle areas, it is judged whether there is an idle area where the difference between the second aspect ratio corresponding to the idle area and the first aspect ratio corresponding to the B type of camera device is less than or equal to the second preset threshold, and the difference between the height corresponding to the idle area and the vertical resolution of the video captured by the B type of camera device is less than or equal to the first preset threshold. As Figure 10 shown, the idle area E meets the above conditions, so the idle area E is determined as the window layout area of the B type of camera device.
[0113] For the idle area C and the idle area D, the window layout area of the camera device 6 can be stretched proportionally until the window layout area of the camera device 6 reaches the corresponding boundary, which includes the bottom of the first layout area or the rightmost side of the window layout area of the camera device 4 (whichever is reached first). If there are still vacancies, they can be filled by border adsorption so that the window layout area of the camera device 6 fills the idle area C and the idle area D.
[0114] When there is a seventh camera device in at least one second type of camera device, based on the resolution of the seventh camera device, the window layout area of the seventh camera device is determined.
[0115] For the seventh camera device, first, the second layout area corresponding to the second image size type is determined in the layout area, and the second layout area is adjacent to the first layout area. Then, based on the video resolution captured by the seventh camera device, the window layout area of the seventh camera device is determined in the second layout area.
[0116] Figure 11 This is a schematic diagram for determining the window layout area of the seventh camera device provided by an embodiment of the present application. As Figure 11 shown, the seventh camera device includes camera device 11 and camera device 12, and camera device 12 is the last B-type camera device. The vertical resolution of the video captured by camera device 11 is greater than that of the video captured by camera device 12. Therefore, the window layout area of camera device 11 is determined first. The window layout area of camera device 11 is adjacent to the window layout area of camera device 1.
[0117] Then, the window layout area of camera device 12 is determined, and the window layout area of camera device 12 is adjacent to the window layout area of camera device 11.
[0118] In some cases, please refer to the left example in Figure 11 . If the window layout area of camera device 12 does not reach the boundary of the second layout area, the first difference between the window layout area of camera device 12 and the bottom of the second layout area and the second difference between the window layout area of camera device 12 and the rightmost side of the second layout area can be determined first, and equal ratio stretching is performed based on the smaller value between the first difference and the second difference, and then border adsorption is performed on the other side. As Figure 11 shown on the left, the width of the window layout area of camera device 12 can be supplemented first to align with the rightmost side of the first layout area, and then the height of the same length is supplemented downward. This equal ratio stretching method will not cause distortion. If the window layout area of camera device 12 is still not aligned with the height of the window layout area of camera device 11 after the supplement, continue to stretch downward until they are consistent. Although a certain degree of picture distortion will occur during this stretching, the degree of picture distortion is small.
[0119] In some cases, please refer to the right example in Figure 11 . If the width of the window layout area of camera device 12 exceeds the boundary of the second layout area, the width of the window layout area of camera device 12 needs to be reduced to be consistent with the rightmost side of the first layout area. As Figure 11 shown on the right, the width of the window layout area of camera device 12 can be compressed first to align with the rightmost side of the first layout area, and then border adsorption is performed downward to make the window layout area of camera device 12 aligned with the height of the window layout area of camera device 11. Although a certain degree of picture distortion will occur during this stretching, the degree of picture distortion is small.
[0120] It should be noted that for the seventh camera device, the implementation method of determining the window layout area of the seventh camera device in the second layout area is similar to the implementation method of determining the window layout area of the first type of camera device in the first layout area, and will not be elaborated here.
[0121] S33. Determine, from the video playback window, the pane regions of at least two camera devices respectively based on the window layout regions of the at least two camera devices respectively and the size of the video playback window.
[0122] After obtaining the window layout regions of the at least two camera devices respectively, it is possible to determine the ratio between the window layout region of each camera device and the video playback window based on the window layout regions of the at least two camera devices respectively and the size of the video playback window, and then determine the pane region of each camera device based on this ratio.
[0123] Specifically, first determine the width and height of the layout region. Among them, the width of the layout region is equal to the sum of the horizontal resolutions of the videos captured by all the first-type camera devices in the topmost layer within the first layout region. When only the first-type camera devices are included in the at least two camera devices, the height of the layout region is equal to the vertical resolution of the video captured by the first camera device; when both the first-type camera devices and the second-type camera devices are included in the at least two camera devices, the height of the layout region is equal to the vertical resolution of the video captured by the first camera device plus the vertical resolution of the video captured by the leftmost second-type camera device.
[0124] Taking Figure 11 as an example, the width of the layout region is equal to the sum of the horizontal resolutions of the videos captured by Camera Device 1, Camera Device 2, Camera Device 3, Camera Device 4, and Camera Device 7, and the height of the layout region is equal to the sum of the vertical resolutions of the videos captured by Camera Device 1 and Camera Device 11.
[0125] After obtaining the height and width of the layout region, in combination with the size of the video playback window, the width scaling ratio m and the height scaling ratio n can be obtained. Among them, m = width of the video playback window / width of the layout region, and n = height of the video playback window / height of the layout region.
[0126] For each camera device, based on the width of the window layout region of this camera device and m, the width of the pane region of this camera device can be obtained, and based on the height of the window layout region of this camera device and n, the height of the pane region of this camera device can be obtained.
[0127] Then, establish a corresponding coordinate system. Based on the height and width of the pane areas of each camera device, as well as the relative positional relationship between the pane areas of each camera device, determine the coordinates of the pane areas of each camera device. Then, perform windowing based on the coordinates of the pane areas of each camera device, and play the video captured by the corresponding camera device in the pane area of each camera device. Among them, the playback mode can be adapted to proportional playback or full-proportional playback. Specifically, for each camera device, based on the aspect ratio of the width and height of the pane area of this camera device and the aspect ratio of the width and height of the resolution of this camera device, calculate the error value caused by image stretching, and compare it with a preset error threshold. If the error value is greater than or equal to the preset error threshold, then select the proportional playback mode; if the error value is less than the preset error threshold, then select the full-proportional playback mode.
[0128] In summary, the solution of the embodiment of the present application classifies camera devices according to the aspect ratio of the video resolution captured by the camera devices, determines the window layout areas of each camera device in a recursive manner, fills the idle areas through equal stretching and scaling, etc., calculates the absolute coordinates of the corresponding pane areas after the window layout areas are regularly arranged, performs customized and rational windowing, and adapts the playback mode, enabling camera devices with different video resolutions to play videos in the pane area close to the true resolution ratio, reducing the picture distortion of the video, and also improving the utilization rate of the playback pane and enhancing the video display effect.
[0129] The video playback device provided by the present application will be described below. The video playback device described below can be mutually referred to the video playback method described above.
[0130] Figure 12 is a schematic structural diagram of the video playback device provided by the embodiment of the present application, as Figure 12 shown, the device includes:
[0131] A determination module 121, configured to determine the size of the video playback window and the video resolutions captured by at least two camera devices that play videos through the video playback window;
[0132] A processing module 122, configured to determine the pane areas of the at least two camera devices from the video playback window based on the video resolutions captured by the at least two camera devices and the size of the video playback window;
[0133] A playback module 123, configured to play the videos captured by the corresponding camera devices in each of the pane areas.
[0134] In a possible implementation manner, the processing module 122 is specifically configured to:
[0135] For each camera device, based on the video resolution captured by the camera device, determine the image size type of the image captured by the camera device;
[0136] Based on the video resolutions and image size types captured by the at least two camera devices respectively, determine the window layout areas of the at least two camera devices respectively in the layout area corresponding to the video playback window;
[0137] Based on the window layout areas of the at least two camera devices respectively and the size of the video playback window, determine the pane areas of the at least two camera devices respectively from the video playback window.
[0138] In a possible implementation manner, at least one first type of camera device is included in the at least two camera devices, the first type of camera device is a camera device of a first image size type, and the processing module 122 is specifically configured to:
[0139] In the order from high to low of the vertical video resolutions captured by the at least one first type of camera device respectively, starting from the first position of the layout area, determine the window layout areas of the at least one first type of camera device respectively in the layout area.
[0140] In a possible implementation manner, the processing module 122 is specifically configured to:
[0141] Determine the window layout area of the first camera device with the maximum vertical video resolution captured among the at least one first type of camera device, and the window layout area of the first camera device is located at the first position;
[0142] When there is a first other camera device other than the first camera device among the at least one first type of camera device, determine a second camera device with the second largest vertical video resolution captured from the first other camera device;
[0143] Based on the video resolution captured by the second camera device, determine the window layout area of the second camera device, and the window layout area of the second camera device is adjacent to the window layout area of the first camera device;
[0144] When there is a second other camera device other than the second camera device among the first other camera devices, based on the video resolution captured by the first camera device, the video resolution captured by the second camera device, and the video resolution captured by the second other camera device, determine the window layout area of the second other camera device.
[0145] In a possible implementation manner, the processing module 122 is specifically configured to:
[0146] Determine whether there is a third camera device among the second other camera devices, where the vertical resolution of the video captured by the third camera device is less than or equal to the difference between the vertical resolution of the video captured by the first camera device and the vertical resolution of the video captured by the second camera device, and the horizontal resolution of the video captured by the third camera device is less than or equal to the horizontal resolution of the video captured by the second camera device;
[0147] In the case where the third camera device exists, determine the window layout area of the third camera device based on the video resolution of the video captured by the third camera device, and the window layout area of the third camera device is adjacent to the window layout area of the first camera device and the window layout area of the second camera device;
[0148] In the case where there is a third other camera device other than the third camera device among the second other camera devices, determine the window layout area of the third other camera device based on the video resolution of the video captured by the first camera device, the video resolution of the video captured by the second camera device, the video resolution of the video captured by the third camera device, and the video resolution of the video captured by the third other camera device.
[0149] In a possible implementation manner, the processing module 122 is specifically configured to:
[0150] Determine whether there is a fourth camera device among the third other camera devices whose captured video resolution meets the candidate area size, and a fifth camera device other than the fourth camera device; the candidate area is an area other than the window layout area of the third camera device in the area formed by the width of the window layout area of the second camera device and the difference in height between the window layout areas of the first camera device and the second camera device;
[0151] In the case where the fourth camera device exists, determine the window layout area of the fourth camera device based on the video resolution of the video captured by the fourth camera device, and the window layout area of the fourth camera device is adjacent to the window layout area of the second camera device and the window layout area of the third camera device;
[0152] In the case where the fifth camera device exists, determine the window layout area of the fifth camera device based on the video resolution of the video captured by the fifth camera device, and the window layout area of the fifth camera device is adjacent to the window layout area of the second camera device.
[0153] In a possible implementation, at least one second type of camera device is further included in the at least two camera devices, and the second type of camera device is a camera device of a second image size type. The processing module 122 is specifically configured to:
[0154] Based on the window layout regions of the at least one first type of camera device respectively, determine a first layout region corresponding to the first image size type in the layout region;
[0155] Determine whether there is an idle region in the first layout region;
[0156] Based on the determination result and the video resolutions captured by the at least one second type of camera device respectively, determine the window layout regions of the at least one second type of camera device.
[0157] In a possible implementation, the processing module 122 is specifically configured to:
[0158] Based on the determination result and the video resolutions captured by the at least one second type of camera device respectively, determine whether there is a sixth camera device among the at least one second type of camera device, and a seventh camera device other than the sixth camera device;
[0159] When the sixth camera device exists in the at least one second type of camera device, determine the idle region as the window layout region of the sixth camera device;
[0160] When the seventh camera device exists in the at least one second type of camera device, based on the video resolution captured by the seventh camera device, determine the window layout region of the seventh camera device.
[0161] In a possible implementation, the processing module 122 is specifically configured to:
[0162] Determine a second layout region corresponding to the second image size type in the layout region, and the second layout region is adjacent to the first layout region;
[0163] Based on the video resolution captured by the seventh camera device, determine the window layout region of the seventh camera device in the second layout region.
[0164] Figure 13 Illustrates a schematic physical structure diagram of an electronic device, such as Figure 13As shown in the figure, the electronic device may include: a processor 1310, a communications interface 1320, a memory 1330, and a communication bus 1340. Among them, the processor 1310, the communications interface 1320, and the memory 1330 complete communication with each other through the communication bus 1340. The processor 1310 may call the logical instructions in the memory 1330 to execute a video playback method, which includes: determining the size of the video playback window and the video resolution captured by each of at least two camera devices that play videos through the video playback window; based on the video resolution captured by each of the at least two camera devices and the size of the video playback window, determining the pane area of each of the at least two camera devices from the video playback window; and playing the video captured by the corresponding camera device in each pane area.
[0165] In addition, when the logical instructions in the above-mentioned memory 1330 are implemented in the form of a software functional unit and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0166] On the other hand, this application also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the video playback method provided by the above-mentioned various methods. The method includes: determining the size of the video playback window and the video resolution captured by each of at least two camera devices that play videos through the video playback window; based on the video resolution captured by each of the at least two camera devices and the size of the video playback window, determining the pane area of each of the at least two camera devices from the video playback window; and playing the video captured by the corresponding camera device in each pane area.
[0167] In another aspect, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the video playback method provided by the above-mentioned various methods. The method includes: determining the size of the video playback window and the video resolution of each of at least two camera devices that play videos through the video playback window; determining, from the video playback window, the pane regions of each of the at least two camera devices based on the video resolution of each of the at least two camera devices and the size of the video playback window; and playing the videos captured by the corresponding camera devices in each of the pane regions.
[0168] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts. Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A video playback method, characterized in that, Including: Determine the size of the video playback window and the video resolution of each of at least two camera devices that play videos through the video playback window; Based on the video resolution of each of the at least two camera devices and the size of the video playback window, determine the pane area of each of the at least two camera devices from the video playback window; In each of the pane areas, play the video captured by the corresponding camera device.
2. The method according to claim 1, wherein The determining, based on the video resolution of each of the at least two camera devices and the size of the video playback window, the pane area of each of the at least two camera devices from the video playback window includes: For each camera device, based on the video resolution of the video captured by the camera device, determine the type of the image size captured by the camera device; Based on the video resolution and image size type of each of the at least two camera devices, determine the window layout area of each of the at least two camera devices in the layout area corresponding to the video playback window; Based on the window layout area of each of the at least two camera devices and the size of the video playback window, determine the pane area of each of the at least two camera devices from the video playback window.
3. The method according to claim 2, wherein At least one of the at least two camera devices is a first type of camera device, and the first type of camera device is a camera device that captures a first image size type. The determining, based on the video resolution and image size type of each of the at least two camera devices, the window layout area of each of the at least two camera devices in the layout area corresponding to the video playback window includes: In the order of the video vertical resolution captured by each of the at least one first type of camera device from high to low, starting from the first position of the layout area, determine the window layout area of each of the at least one first type of camera device in the layout area.
4. The method according to claim 3, wherein The determining, in the order of the video vertical resolution captured by each of the at least one first type of camera device from high to low, starting from the first position of the layout area, the window layout area of each of the at least one first type of camera device in the layout area includes: Determine the window layout area of the first camera device with the maximum video vertical resolution captured among the at least one first type of camera device, and the window layout area of the first camera device is located at the first position; When there is a first other camera device other than the first camera device among the at least one first type of camera device, determine the second camera device with the second largest video vertical resolution captured from the first other camera device; Based on the video resolution of the second camera device, determine the window layout area of the second camera device, and the window layout area of the second camera device is adjacent to the window layout area of the first camera device. In the case that there is a second other imaging device other than the second imaging device in the first other imaging device, based on the video resolution of the video captured by the first imaging device, the video resolution of the video captured by the second imaging device, and the video resolution of the video captured by the second other imaging device, determine the window layout area of the second other imaging device.
5. The method according to claim 4, wherein The determining the window layout area of the second other imaging device based on the video resolution of the video captured by the first imaging device, the video resolution of the video captured by the second imaging device, and the video resolution of the video captured by the second other imaging device includes: Determine whether there is a third imaging device in the second other imaging device, where the vertical resolution of the video captured by the third imaging device is less than or equal to the difference between the vertical resolution of the video captured by the first imaging device and the vertical resolution of the video captured by the second imaging device, and the horizontal resolution of the video captured by the third imaging device is less than or equal to the horizontal resolution of the video captured by the second imaging device; In the case that there is the third imaging device, based on the video resolution of the video captured by the third imaging device, determine the window layout area of the third imaging device, where the window layout area of the third imaging device is adjacent to both the window layout area of the first imaging device and the window layout area of the second imaging device; In the case that there is a third other imaging device other than the third imaging device in the second other imaging device, based on the video resolution of the video captured by the first imaging device, the video resolution of the video captured by the second imaging device, the video resolution of the video captured by the third imaging device, and the video resolution of the video captured by the third other imaging device, determine the window layout area of the third other imaging device.
6. The method according to claim 5, characterized in that The determining the window layout area of the third other imaging device based on the video resolution of the video captured by the first imaging device, the video resolution of the video captured by the second imaging device, the video resolution of the video captured by the third imaging device, and the video resolution of the video captured by the third other imaging device includes: Determine whether there is a fourth imaging device in the third other imaging device whose captured video resolution meets the candidate area size, and a fifth imaging device other than the fourth imaging device; the candidate area is the area formed by the width of the window layout area of the second imaging device, the difference in height between the window layout areas of the first imaging device and the second imaging device, and excluding the window layout area of the third imaging device; In the case that there is the fourth imaging device, based on the video resolution of the video captured by the fourth imaging device, determine the window layout area of the fourth imaging device, where the window layout area of the fourth imaging device is adjacent to both the window layout area of the second imaging device and the window layout area of the third imaging device; In the presence of the fifth imaging device, based on the video resolution captured by the fifth imaging device, determine the window layout area of the fifth imaging device, and the window layout area of the fifth imaging device is adjacent to the window layout area of the second imaging device.
7. The method according to any one of claims 3-6, characterized in that The at least two imaging devices further include at least one second-type imaging device, where the second-type imaging device is an imaging device that captures a second image size type. The determining of the window layout areas of the at least two imaging devices respectively in the layout area corresponding to the video playback window based on the video resolutions and image size types captured by the at least two imaging devices respectively includes: Based on the window layout areas of the at least one first-type imaging device respectively, determine the first layout area corresponding to the first image size type in the layout area; Determine whether there is an idle area in the first layout area; Based on the determination result and the video resolutions captured by the at least one second-type imaging device respectively, determine the window layout areas of the at least one second-type imaging device.
8. The method according to claim 7, wherein The determining of the window layout areas of the at least one second-type imaging device based on the determination result and the video resolutions captured by the at least one second-type imaging device respectively includes: Based on the determination result and the video resolutions captured by the at least one second-type imaging device respectively, determine whether there is a sixth imaging device and a seventh imaging device other than the sixth imaging device among the at least one second-type imaging device; In the case where the sixth imaging device exists in the at least one second-type imaging device, determine the idle area as the window layout area of the sixth imaging device; In the case where the seventh imaging device exists in the at least one second-type imaging device, based on the video resolution captured by the seventh imaging device, determine the window layout area of the seventh imaging device.
9. The method according to claim 8, wherein The determining of the window layout area of the seventh imaging device based on the video resolution captured by the seventh imaging device includes: Determine the second layout area corresponding to the second image size type in the layout area, and the second layout area is adjacent to the first layout area; Based on the video resolution captured by the seventh imaging device, determine the window layout area of the seventh imaging device in the second layout area.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the video playback method according to any one of claims 1 to 9.