CN112399123B - Video definition adjusting method and device, electronic equipment and storage medium - Google Patents

Video definition adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112399123B
CN112399123B CN202110071207.8A CN202110071207A CN112399123B CN 112399123 B CN112399123 B CN 112399123B CN 202110071207 A CN202110071207 A CN 202110071207A CN 112399123 B CN112399123 B CN 112399123B
Authority
CN
China
Prior art keywords
display window
target
current
video stream
resolution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110071207.8A
Other languages
Chinese (zh)
Other versions
CN112399123A (en
Inventor
程丹雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Youmi Technology Shenzhen Co ltd
Original Assignee
Youmi Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Youmi Technology Shenzhen Co ltd filed Critical Youmi Technology Shenzhen Co ltd
Priority to CN202110071207.8A priority Critical patent/CN112399123B/en
Publication of CN112399123A publication Critical patent/CN112399123A/en
Application granted granted Critical
Publication of CN112399123B publication Critical patent/CN112399123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0117Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving conversion of the spatial resolution of the incoming video signal

Abstract

The application discloses a method and a device for adjusting video definition, electronic equipment and a storage medium, and relates to the technical field of display, the equipment detects zoom adjustment operation on a display window, and when the zoom adjustment operation on the display window is detected, a target resolution corresponding to the adjusted display window is obtained, wherein the target resolution is obtained based on the current zoom level of the display window and the current resolution of the adjusted display window.

Description

Video definition adjusting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of display technologies, and in particular, to a method and an apparatus for adjusting video definition, an electronic device, and a storage medium.
Background
With the development of network technology and multimedia technology, more and more users adopt electronic devices to play videos. Generally, when a user plays a video on an electronic device, the electronic device displays the video stream on a display window of the electronic device according to a fixed video stream preset or default by the user for the user to watch. When a user adjusts the display window, the size of the display window changes, and when the fixed video stream is in the adjusted display window, the displayed resolution is not favorable for viewing, which affects the viewing experience of the user.
Disclosure of Invention
In view of the foregoing problems, the present application provides a method and an apparatus for adjusting video definition, an electronic device, and a storage medium, which can solve the foregoing technical problems.
In a first aspect, an embodiment of the present application provides a method for adjusting video sharpness, which is applied to an electronic device, and the method includes: detecting a zoom adjustment operation on a display window; when the zoom adjustment operation on the display window is detected, acquiring a target resolution corresponding to the adjusted display window, wherein the target resolution is obtained based on the current zoom level of the display window and the current resolution of the adjusted display window; acquiring a target bit rate of the video stream corresponding to the target resolution; and acquiring a target video stream at the target bit rate, and displaying the target video stream at the target resolution in the adjusted display window.
In a second aspect, an embodiment of the present application provides an apparatus for adjusting video sharpness, where the apparatus includes a zoom adjustment detection module, configured to detect a zoom adjustment operation on a display window; a target resolution obtaining module, configured to obtain a target resolution corresponding to the adjusted display window when the zoom adjustment operation on the display window is detected, where the target resolution is obtained based on a current zoom level of the display window and a current resolution of the adjusted display window; a target bit rate obtaining module, configured to obtain a target bit rate of the video stream corresponding to the target resolution; and the display module is used for acquiring a target video stream at the target bit rate and displaying the target video stream at the target resolution in the adjusted display window.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the above-described methods.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
Compared with the prior art, the application provides a method and a device for adjusting video definition, an electronic device and a storage medium, the electronic device detects zoom adjustment operation on a display window, and when the zoom adjustment operation on the display window is detected, obtains a target resolution corresponding to the adjusted display window, wherein the target resolution is obtained based on a current zoom level of the display window and a current resolution of the adjusted display window.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an application environment of a video sharpness adjustment system suitable for use in an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a method for adjusting video sharpness according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart illustrating a method for adjusting video sharpness according to another embodiment of the present application;
fig. 4 is a flowchart illustrating a method for adjusting video sharpness according to another embodiment of the present application;
fig. 5 is a flowchart illustrating a method for adjusting video sharpness according to yet another embodiment of the present application;
fig. 6 is a schematic flow chart illustrating a method for adjusting video sharpness according to yet another embodiment of the present application;
FIG. 7 is a schematic interface diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 8 is a schematic view of another interface of an electronic device provided by an embodiment of the present application;
FIG. 9 is a schematic view illustrating still another interface of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a block diagram illustrating an apparatus for adjusting video sharpness according to an embodiment of the present application;
fig. 11 is a block diagram of an electronic device for executing an adjustment method of video sharpness according to an embodiment of the present application;
fig. 12 is a storage unit for storing or carrying program codes for implementing an adjustment method of video sharpness according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
With the development of network technology and multimedia technology, more and more users adopt electronic devices to play videos. Generally, when a user plays a video on an electronic device, the electronic device displays the video stream on a display window of the electronic device according to a fixed video stream preset or default by the user for the user to watch. When a user zooms and adjusts the display window, the size of the display window changes, and when the fixed video stream is in the adjusted display window, the displayed resolution is not favorable for viewing, and the viewing experience of the user is influenced.
The inventor finds that when a user resizes a display window, no matter whether the display window is reduced or enlarged, the fixed video stream display causes some problems, for example, when the display window is reduced, the total amount of pixels provided by the fixed video stream is not changed, but the size of the display window is reduced, so that the resolution of the adjusted display window is increased, the adjusted display window may not display the whole image, and the resolution required by the reduced window can clearly display the video image under the condition of reduction, and because the video stream is fixed, the code stream and the bandwidth requirement of the transmission video stream are not reduced, and the transmission bandwidth resource is wasted. For example, when the display window is enlarged, the total amount of pixels provided by the fixed video stream is unchanged, and the size of the display window is increased, so that the resolution of the adjusted display window is reduced, and it is difficult to restore the real video image under the condition of lower resolution, which causes that the user cannot clearly watch the video, and reduces the watching experience of the user.
In view of the above technical problems, the inventors have found through long-term research and provide a method, an apparatus, an electronic device, and a storage medium for adjusting video definition according to the present application, and when a user performs a zoom adjustment operation on a display window, obtain a target resolution corresponding to the adjusted display window, where the target resolution is convenient for the user to view a video, obtain a target bit rate of a video stream corresponding to the target resolution, play the target video stream at the target resolution, and display the target video stream, so that a better viewing effect can be obtained, and viewing experience of the user is improved.
For convenience of understanding, this embodiment shows a possible implementation manner of the video sharpness adjustment system, and fig. 1 shows an application environment schematic diagram of the video sharpness adjustment system according to the embodiment of the present application, please refer to fig. 1, where the video sharpness adjustment system 100 includes an electronic device 110 and a server 120, and the electronic device 110 is connected to the server 120. The server 120 sends a video stream to the electronic device 110 for display, where the video stream may be a live video stream, a video stream of an opposite user in a video call with the user, or a video stream of a user watching a tv show, a movie, or a short video online.
Fig. 2 is a schematic flow chart illustrating a method for adjusting video definition according to an embodiment of the present application, where when a user performs zoom adjustment on a display window, a target video stream is obtained, and the target video stream is displayed at a target resolution, so that a better viewing effect can be obtained, and viewing experience of the user is improved. In a specific embodiment, the method for adjusting video definition is applied to the electronic device 110 shown in fig. 1, the device 200 for adjusting video definition shown in fig. 10, and the electronic device 300 (fig. 11) equipped with the device 200 for adjusting video definition. The following will describe a specific flow of the embodiment by taking the electronic device 110 as an example, but it is understood that the electronic device applied in the embodiment may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, a projection device, and the like, and is not limited herein. As will be described in detail with respect to the flow shown in fig. 2, the method for adjusting video definition may specifically include the following steps:
step S110, detecting a zoom adjustment operation on the display window.
When the display window plays a video in an initial video stream, when a user needs to perform zoom adjustment operation on the display window according to a watching requirement, the user can directly perform zoom adjustment operation on the display screen of the electronic device, the zoom operation can be operations such as clicking, touching, dragging and sliding on the display screen, and can also be operations performed through external equipment, such as clicking and sliding through a mouse, and then performing input operation through a keyboard and a remote controller, and the electronic device can detect the zoom adjustment operation of the display window in real time and timely acquire the zoom requirement of the user.
When the electronic device does not detect the zooming operation of the user on the display window, it indicates that the user does not need to zoom and adjust the display window, and the electronic device continues to acquire an initial video stream to play at the adjusted display window, wherein the initial video stream is a video stream preset by the user, a video stream default by the system, or a video stream adjusted by the user before.
Step S120, when the zoom adjustment operation on the display window is detected, obtaining a target resolution corresponding to the adjusted display window, where the target resolution is obtained based on the current zoom level of the display window and the current resolution of the adjusted display window.
When the zoom adjustment operation on the display window is detected, it is indicated that the user has a zoom requirement, and the size of the display window is adjusted according to the zoom adjustment operation of the user. When the user adjusts the display window, the user may adjust the display window several times, and the adjustment is attempted to the size desired by the user. Presetting a preset time interval, judging whether a new zooming operation is received after the preset time interval of the current zooming operation (namely the current zooming operation, namely the latest zooming operation), and if the new zooming operation is received, namely the time interval between two adjacent zooming operations is smaller than the preset time interval, indicating that the current zooming operation is not finished; and when a new zooming and adjusting operation is not received, the zooming and adjusting of the current round is finished, and the display window adjusted by the current zooming and adjusting operation is used as the adjusted display window. And taking one round of zoom adjustment as an adjustment unit, and taking the display window adjusted by the last zoom adjustment operation in the round of zoom adjustment as the adjusted display window, so that the problem that a user needs to frequently switch video streams after each adjustment is avoided, and the reduction of user experience and the waste of processor resources are avoided.
For example, the preset time interval may be 10 seconds, and the user performs two zoom adjustment operations, i.e., a first zoom adjustment operation and a second zoom adjustment operation, in a certain round of zoom adjustment. When the user performs the first zoom adjustment, namely the first zoom adjustment operation, and performs the second zoom adjustment, namely the second zoom adjustment operation, after 3 seconds, since the time interval between the first zoom adjustment and the second zoom adjustment is less than the preset time interval of 10 seconds, the zoom adjustment of the current round is still continued, and when the zoom adjustment operation of the user is not received again after the preset time interval of 10 seconds after the second zoom adjustment, the display window after the second zoom adjustment operation is considered as the adjusted display window.
The total amount of pixels provided by the initial video stream may be displayed with good resolution when displayed on the display window before adjustment, it being understood that the initial video stream is suitable for use in the display window before adjustment. Because the total amount of pixels provided by the initial video stream is not changed, and the size of the display window is changed, the pixels provided by the initial video stream are still used for displaying, the obtained current resolution is changed, and the displayed video picture may be blurred, so that the initial video stream is not suitable for the adjusted display window any more. And obtaining the target resolution according to the current zoom level of the display window and the adjusted current resolution of the display window, and obtaining a clearer viewing effect by displaying at the target resolution.
The zoom level may control a display scale of the video image in the display window, where the zoom level is positively correlated with the display scale, and when the zoom level is larger, the display scale is larger, and conversely, when the zoom level is smaller, the display scale is smaller, for example, when the zoom level is 100%, the video image is displayed in an original size, and when the zoom level is 200%, the video image is displayed after being enlarged by 2 times. Unlike the current resolution, the zoom level does not change with the zoom of the display window. The current zoom level is the zoom level of the adjusted display window, and since the zoom level does not change with the zoom of the display window, if the user does not adjust the zoom level, the current zoom level is the same as the zoom level of the display window before adjustment.
And step S130, acquiring the target bit rate of the video stream corresponding to the target resolution.
And acquiring a target bit rate of the video stream corresponding to the target resolution, wherein the video stream corresponding to the target bit rate can display video images more clearly.
When the zoom adjustment operation is an operation of enlarging the display window, the acquired target bit rate becomes large, so that details of the transmitted video image are increased, and the user has a good viewing experience. When the zoom adjustment operation is an operation of reducing the display window, the acquired target bit rate becomes small, so that details of the transmitted video image become small, the target bit rate adapts to the reduced display window, and the bandwidth resource can also be saved.
Step S140, obtaining a target video stream at the target bit rate, and displaying the target video stream at the target resolution in the adjusted display window.
And acquiring the target video stream at the target bit rate, wherein the acquired target video stream is adapted to the adjusted display window, and compared with the method that the initial video stream is displayed in the current resolution ratio in the adjusted display window, the target video stream is displayed in the target resolution ratio in the adjusted display window, so that a clearer video image can be displayed.
According to the method, the device, the electronic device and the storage medium for adjusting the video definition, the electronic device detects zoom adjustment operation on a display window, and when the zoom adjustment operation on the display window is detected, a target resolution corresponding to the adjusted display window is obtained, wherein the target resolution is obtained based on a current zoom level of the display window and a current resolution of the adjusted display window.
On the basis of the previous embodiment, the present application provides a method for adjusting video definition, which is used to obtain a target resolution matched with an adjusted display window, fig. 3 shows a flow diagram of a method for adjusting video definition according to another embodiment of the present application, please refer to fig. 3, where the method for adjusting video definition specifically includes the following steps:
and step S210, detecting the zooming adjustment operation of the display window.
For detailed description of step S210, please refer to step S110, which is not described herein again.
Step S220, when the zoom adjustment operation on the display window is detected, acquiring the current zoom level and the current resolution.
The current zoom level is the zoom level of the adjusted display window, and is used for representing the display scale of the video image in the adjusted display window. Since the zoom level does not change with the zoom of the display window, if the user does not adjust the zoom level, the current zoom level is the same as the zoom level of the display window before adjustment.
And the current resolution is the resolution corresponding to the adjusted display window, and the resolution of the initial media stream is also displayed for the adjusted display window. Since the total amount of pixels provided by the initial video stream is not changed and the size of the display window is changed, the pixels provided by the initial video stream are still used for displaying, the obtained current resolution is changed, and the displayed video picture may be blurred, so that the initial video stream is no longer suitable for the adjusted display window.
Step S230, determining the current zoom level and the target resolution corresponding to the current resolution based on a first preset mapping relationship, where the first preset mapping relationship at least includes a corresponding relationship among the current zoom level, the current resolution, and the target resolution.
Optionally, the first preset mapping relationship may be a relationship mapping table.
And determining the current zoom level and the target resolution corresponding to the current resolution based on the first preset mapping relation, and displaying the target resolution to obtain a clearer viewing effect.
And step S240, acquiring the target bit rate of the video stream corresponding to the target resolution.
And step S250, acquiring a target video stream at the target bit rate, and displaying the target video stream at the target resolution in the adjusted display window.
For detailed description of steps S240 to S250, please refer to steps S130 to S140, which are not described herein again.
In this embodiment, when the adjusted display window displays an initial video stream, a video image cannot be clearly displayed at a current resolution, the current resolution and a current zoom level are first obtained, then, based on a first preset mapping relationship, a target resolution corresponding to the current zoom level and the current resolution is determined, then, a target bit rate of the video stream corresponding to the target resolution is obtained, a target video stream is obtained at the target bit rate, and the target video stream is displayed at the target resolution in the display window after a season, so that a clear display effect can be obtained.
In this embodiment, on the basis of the foregoing embodiment, a method for adjusting video definition is provided, where a target resolution is adjusted according to a difference between a size of a window before zooming and a size of a window after zooming, so as to obtain a better video image playing effect, fig. 4 shows a flowchart of a method for adjusting video definition according to another embodiment of the present application, and please refer to fig. 4, where the method for adjusting video definition specifically includes the following steps:
step S310, the zoom adjustment operation of the display window is detected.
For detailed description of step S310, please refer to step S110, which is not described herein again.
Step S320, when the zoom adjustment operation on the display window is detected, obtaining an actual zoom value of the display window, where the actual zoom value is a difference between the size of the display window after zooming and the size of the display window before zooming.
When the zoom adjustment operation on the display window is detected, the size of the display window before zooming and the size of the display window after zooming are obtained, and then the difference between the size of the display window after zooming and the size of the display window before zooming is calculated and is used as the actual zoom value of the display window, and it can be understood that the actual zoom value is the actual zoom size or length.
In some embodiments, when the user performs zoom adjustment by merely adjusting the long side or the wide side of the display window, the size of the display window may be the length of the long side or the length of the wide side of the display window. For example, if the user performs zoom adjustment by adjusting the long side of the display window, and the size of the display window is the length of the long side of the display window, the length of the long side of the display window before zooming is acquired, the length of the long side of the display window after zooming is acquired, and the difference between the length of the long side of the display window after zooming and the length of the long side of the display window before zooming is calculated to obtain the actual zoom value.
In other embodiments, the size of the display window may be the length of the diagonal of the display window when the user's zoom adjustment adjusts the long side and the wide side of the display window. And obtaining an actual zooming value according to the difference between the length of the diagonal line of the zoomed display window and the length of the diagonal line of the display window before zooming.
And S330, when the actual zoom value is larger than a preset zoom value, acquiring the target resolution corresponding to the adjusted display window.
The preset zooming value is a critical value between the clearness and the unsharpness of the video content displayed by the display window after zooming adjustment.
The user carries out zoom adjustment operation on the display window, when the actual zoom value is smaller than the preset zoom value, the actual zoom value is smaller, namely the size change of the display window before and after zoom adjustment is smaller, the resolution change before and after zoom adjustment is smaller, the user can not perceive the change by naked eyes, the adjusted display window can still play clearer video images, and the user is not influenced to watch the video images. In order to avoid the waste of bandwidth resources and processor resources caused by repeatedly adjusting the resolution, the adjusted display window is zoomed and the initial video stream is continuously played at the current resolution.
When the actual zoom value is greater than the preset value, it indicates that the actual zoom value is larger, that is, the size change of the display window before and after zoom adjustment is larger, the resolution change before and after zoom adjustment is also larger, and the user can perceive the change by naked eyes, which may affect the user to watch the video image.
And step S340, acquiring the target bit rate of the video stream corresponding to the target resolution.
And step S350, acquiring a target video stream at the target bit rate, and displaying the target video stream at the target resolution in the adjusted display window.
For the detailed description of steps S340 to S350, refer to steps S130 to S140, which are not described herein again.
In this embodiment, when a zoom adjustment operation on a display window is detected, an actual zoom value of the display window is obtained, and when the actual zoom value is greater than a preset zoom value, it indicates that the actual zoom value is larger, that is, a size change of the display window before and after the zoom adjustment is larger, a resolution change before and after the zoom adjustment is also larger, and a user can perceive the change by naked eyes, which may affect the user to watch a video image.
In this embodiment, on the basis of the foregoing embodiment, a method for adjusting video definition is provided, where a target resolution is adjusted according to a size of a window to obtain a better video image playing effect, and fig. 5 shows a flowchart of a method for adjusting video definition provided in another embodiment of the present application, and please refer to fig. 5, where the method for adjusting video definition specifically includes the following steps:
and step S410, detecting the zooming adjustment operation of the display window.
For detailed description of step S410, please refer to step S110, which is not described herein again.
Step S420, when the zoom adjustment operation on the display window is detected, obtaining the current window size of the adjusted display window.
When a zoom adjustment operation on the display window is detected, the adjusted current size of the display window is obtained, and in some embodiments, when a user performs zoom adjustment only by adjusting a long side or a wide side of the display window, the current window size may be the length of the long side or the length of the wide side of the adjusted display window.
In other embodiments, when the user's zoom adjustment adjusts the long side and the wide side of the display window, the current window size may be the length of the diagonal of the adjusted display window.
In order to determine how to adjust the resolution according to the current window size, in the present embodiment, a preset window size may be obtained in advance, where the preset window size is a critical value for controlling whether the video stream is adjusted or not.
In some embodiments, the preset window size may be set according to the manufacturer's experience.
In other embodiments, the preset window size may be obtained based on the mapping relationship, specifically, the current network condition and the processor performance of the electronic device are obtained first. And determining a preset window size corresponding to the current network condition and the processor performance based on a second preset mapping relation, wherein the second preset mapping relation at least comprises the corresponding relation among the current network condition, the processor performance and the preset window size. Optionally, the second preset mapping relationship may be a mapping table.
When the current window size is smaller than the preset window size, for example, in a scene in which the user reduces the display window, the user reduces the display window from being larger than the preset size to being smaller than the preset size.
In other embodiments, in a scenario where the user zooms out the display window, the display window before adjustment displays an initial video stream, the initial video stream corresponding to an initial bit rate, the initial bit rate being a higher bit rate. Since the user reduces the display window, the total amount of pixels provided by the initial video stream is not changed, and the display window is reduced, the resolution of the adjusted display window is increased, but the reduced display window does not need to display too many details, and the adjusted display window can be played at a lower bit rate in order to save bandwidth resources. The updated resolution corresponding to the adjusted display window is obtained, the updated bit rate corresponding to the updated resolution is obtained again, the updated video stream is obtained at the updated bit rate, and the updated video stream is displayed by the adjusted display window at the updated resolution. Wherein the updated bit rate is less than the initial bit rate.
And step S430, when the current window size is larger than a preset window size, acquiring the target resolution corresponding to the adjusted display window.
When the current window size is larger than the preset window size, for example, in a scene in which the user enlarges the display window, the user enlarges the display window from being smaller than the preset size to being larger than the preset size, and obtains a target resolution corresponding to the adjusted display window.
And step S440, acquiring a target bit rate of the video stream corresponding to the target resolution.
And step S450, acquiring a target video stream at the target bit rate, and displaying the target video stream at the target resolution in the adjusted display window.
For detailed description of steps S440 to S450, please refer to steps S130 to S140, which are not described herein again.
In this embodiment, when a user performs zoom adjustment operation on a display window, a current window size corresponding to the adjusted display window is obtained, when the current window size is larger than a preset window size, a target resolution corresponding to the adjusted display window is obtained, a target bit rate of a video stream corresponding to the target resolution is obtained, the target video stream is obtained at the target bit rate, and the target video stream is displayed at the adjusted display window at the target resolution, so that an enlarged display window can display a clear video image.
On the basis of the foregoing embodiment, this embodiment provides a method for adjusting video definition, when a user of an electronic device makes a video call, a display window of the electronic device includes two display areas, the two display areas are used for displaying the user and an opposite user respectively, and definition adjustment is performed according to a display area where the opposite user is located in the video call, fig. 6 shows a flow diagram of a method for adjusting video definition provided in yet another embodiment of the present application, please refer to fig. 6, where the method for adjusting video definition specifically includes the following steps:
step S510, detecting a zoom adjustment operation on the display window.
For detailed description of step S510, please refer to step S110, which is not described herein again.
Step S520, when the electronic device is in a video call mode and the zoom adjustment operation on the display window is detected, acquiring a video content displayed in an adjusted first display area, where the display window includes the first display area and a second display area, and an area of the first display area is larger than an area of the second display area.
When the electronic equipment is in a video call mode, a display window of the electronic equipment displays a user picture and an opposite user picture, wherein the user picture is locally collected by a camera of the electronic equipment, and the opposite user picture is an image displayed after a video stream acquired by the electronic equipment from a server.
Optionally, the display window of the electronic device includes at least two display areas, each display area displaying one participant participating in the video call, that is, at least two display areas are respectively used for displaying the user and the counterpart user participating in the video call. In the present embodiment, taking two participants of a video call, that is, a user and a counterpart user as an example, the display window includes the first display region 111 and the second display region 112 shown in fig. 7 to 9, and the area of the first display region 111 is larger than that of the second display region 112. As shown in fig. 7, when the first display area 111 displays the user a, the second display area 112 displays the opposite user B. Alternatively, when the first display area displays the opposite user, the second display area displays the user (not shown in the figure).
In the video call mode, a zoom adjustment operation of the display window by the user is detected, and optionally, the zoom adjustment operation may be a click operation on the first display area 111 or the second display area 112 shown in fig. 7. And then, video content of the first display area 111 is acquired, wherein the content displayed in the first display area may include the user or include the opposite user.
When the video content does not include a picture of the user of the opposite party in the video call, it can be understood that the video content includes the user, the first display area displays the user picture, and the second display area displays the picture of the user of the opposite party. And the opposite user displays in the second display area with smaller area, and the zoom size of the zoom adjustment on the second display area is smaller, so that the corresponding second target video stream is obtained at the current resolution, the second target video stream is displayed in the adjusted second display area at the current resolution, and the adjusted second display area can still play a clearer opposite user picture without influencing the live video broadcast of the user. In order to avoid the waste of bandwidth resources and processor resources caused by repeatedly adjusting the resolution, the second target video stream (i.e. the aforementioned initial video stream) is still played at the current resolution in the scaled and adjusted second display region.
Step S530, when the video content includes a picture of an opposite user in a video call, obtaining a first target resolution corresponding to the adjusted first display area.
As shown in fig. 8, the first display area 111 is switched from the display user a to the display opposite user B according to the touch and click operation of the user, and the video content includes a picture of the opposite user in the video call. Since the opposite user B is displayed in the first display region 111 with a larger area, and the influence of the zoom adjustment on the first display region 111 is larger, when the initial video stream including the opposite user B is displayed in the first display region 111, since the total amount of pixels provided by the initial video stream is not changed, and the display region of the initial video stream is switched from the second display region 112 with a smaller area to the first display region 111 with a larger area, as shown in fig. 8, the current pixels displaying the first display region 111 of the opposite user B are unclear, it is necessary to obtain the first target resolution corresponding to the adjusted first display region, and it can be understood that the adjusted first display region is displayed at the first target resolution, so that a good display effect can be obtained.
It should be noted that, in fig. 8, the picture of the user a is always clearly displayed on the second display area 112 through the picture locally captured by the camera of the electronic device.
And step S540, acquiring a first target bit rate of the video stream corresponding to the target resolution.
For detailed description of step S540, please refer to step S130, which is not described herein again.
Step S550, acquiring a first target video stream at the first target bitrate, and displaying the first target video stream in the adjusted first display area at the first target resolution.
As shown in fig. 9, the acquired first target video stream may provide more details of the opposite user, and the picture of the opposite user B may be clearly displayed in the first display area 111.
In this embodiment, when the electronic device is in a video call mode, the display window includes a first display area and a second display area, the area of the first display area is larger than the area of the second display area, when the zoom adjustment operation on the display window is detected, the video content displayed in the adjusted first display area is acquired, and when the video content does not include the picture of the opposite user in the video call, it is indicated that the picture of the opposite user is displayed in the second display area with a smaller area, and because the zoom size adjusted by the zoom adjustment on the second display area is smaller, the second display area can continue to be displayed at the current resolution; when the video content comprises a picture of the opposite user in the video call, the opposite user is in a first display area with a larger area, the influence of zoom adjustment on the first display area is larger, the initial video stream is displayed in the adjusted first display area with the current resolution, the displayed picture of the opposite user is not clear, a first target resolution corresponding to the adjusted first display area needs to be obtained, and the adjusted first display area is displayed with the first target resolution to obtain a good display effect.
To implement the above method embodiments, this embodiment provides an apparatus for adjusting video definition, and fig. 10 shows a block diagram of the apparatus for adjusting video definition according to an embodiment of the present application, and referring to fig. 10, an apparatus 200 for adjusting video definition includes: a zoom adjustment detection module 210, a target resolution acquisition module 220, a target bitrate acquisition module 230, and a display module 240.
A zoom adjustment detection module 210, configured to detect a zoom adjustment operation on the display window.
A target resolution obtaining module 220, configured to, when the zoom adjustment operation on the display window is detected, obtain a target resolution corresponding to the adjusted display window, where the target resolution is obtained based on a current zoom level of the display window and a current resolution of the adjusted display window.
A target bitrate obtaining module 230, configured to obtain a target bitrate of the video stream corresponding to the target resolution.
A display module 240, configured to obtain a target video stream at the target bitrate, and display the target video stream at the target resolution in the adjusted display window.
Optionally, the target resolution obtaining module 220 includes: a current resolution acquisition sub-module and a first target resolution acquisition sub-module.
A current resolution obtaining sub-module, configured to obtain the current zoom level and the current resolution when the zoom adjustment operation on the display window is detected.
A first target resolution obtaining sub-module, configured to determine, based on a first preset mapping relationship, the current zoom level and the target resolution corresponding to the current resolution, where the first preset mapping relationship at least includes a correspondence relationship between the current zoom level, the current resolution, and the target resolution.
Optionally, the target resolution obtaining module 220 includes: an actual zoom value acquisition sub-module and a second target resolution acquisition sub-module.
And the actual zooming value obtaining submodule is used for obtaining an actual zooming value of the display window when the zooming adjustment operation on the display window is detected, wherein the actual zooming value is a difference value between the size of the zoomed display window and the size of the display window before zooming.
And the second target resolution obtaining submodule is used for obtaining the target resolution corresponding to the adjusted display window when the actual zoom value is larger than a preset zoom value.
Optionally, the target resolution obtaining module 220 includes: a current window size obtaining submodule and a third target resolution obtaining submodule.
And the current window size obtaining submodule is used for obtaining the adjusted current window size of the display window when the zooming adjustment operation on the display window is detected.
And the third target resolution obtaining submodule is used for obtaining the target resolution corresponding to the adjusted display window when the current window size is larger than the preset window size.
Optionally, the apparatus 200 for adjusting video sharpness further includes: the device comprises a performance acquisition module and a preset window size acquisition module.
And the performance acquisition module is used for acquiring the current network condition and the processor performance of the electronic equipment.
A preset window size obtaining module, configured to determine, based on a second preset mapping relationship, a preset window size corresponding to the current network condition and the processor performance, where the second preset mapping relationship at least includes a correspondence relationship between the current network condition, the processor performance, and the preset window size.
Optionally, the target resolution obtaining module 220 includes: a video content acquisition sub-module and a fourth target resolution acquisition sub-module.
The video content obtaining sub-module is configured to obtain, when the electronic device is in a video call mode and the zoom adjustment operation on the display window is detected, video content displayed in an adjusted first display area, where the display window includes the first display area and a second display area, and an area of the first display area is larger than an area of the second display area.
And the fourth target resolution acquisition sub-module is used for acquiring the first target resolution corresponding to the adjusted first display area when the video content comprises the picture of the opposite user in the video call.
Optionally, the display module 240 includes: and displaying the submodule.
And the display sub-module is used for acquiring a first target video stream at the first target bit rate and displaying the first target video stream at the first target resolution in the adjusted first display area.
Optionally, the apparatus 200 for adjusting video sharpness further includes: and an adjusting module.
And the adjusting module is used for acquiring a corresponding second target video stream at the current resolution when the video content does not comprise the picture of the opposite user in the video call, and displaying the second target video stream at the current resolution in an adjusted second display area.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Fig. 11 is a block diagram of an electronic device for performing an adjustment method of video sharpness according to an embodiment of the present application, and please refer to fig. 11, which shows a block diagram of an electronic device 300 according to an embodiment of the present application. The electronic device 300 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 300 in the present application may include one or more of the following components: a processor 310, a memory 320, and one or more applications, wherein the one or more applications may be stored in the memory 320 and configured to be executed by the one or more processors 310, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 310 may include one or more processing cores, among other things. The processor 310 connects various parts throughout the electronic device 300 using various interfaces and lines, and performs various functions of the electronic device 300 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 320 and calling data stored in the memory 320. Alternatively, the processor 310 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 310 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content to be displayed; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 310, but may be implemented by a communication chip.
The Memory 320 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 320 may be used to store instructions, programs, code sets, or instruction sets. The memory 320 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the mobile terminal 300 in use, such as a phonebook, audio-video data, chat log data, and the like.
Fig. 12 is a storage unit for storing or carrying program codes for implementing an adjustment method of video sharpness according to an embodiment of the present application, please refer to fig. 12, which shows a block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 400 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 400 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 400 includes a non-volatile computer-readable storage medium. The computer readable storage medium 400 has storage space for program code 410 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. Program code 410 may be compressed, for example, in a suitable form.
To sum up, according to the method and apparatus for adjusting video definition, an electronic device and a storage medium provided by the present application, the electronic device detects a zoom adjustment operation on a display window, and when the zoom adjustment operation on the display window is detected, obtains a target resolution corresponding to the adjusted display window, where the target resolution is obtained based on a current zoom level of the display window and a current resolution of the adjusted display window.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (4)

1. A method for adjusting video definition, applied to an electronic device, includes:
detecting a zoom adjustment operation on a display window when the display window displays an initial video stream, wherein the zoom adjustment operation is an operation of enlarging the display window;
acquiring the current network condition and the processor performance of the electronic equipment;
determining a preset window size corresponding to the current network condition and the processor performance based on a second preset mapping relation, wherein the second preset mapping relation at least comprises the corresponding relation among the current network condition, the processor performance and the preset window size;
when the zooming adjustment operation on the display window is detected, acquiring the current window size of the adjusted display window;
when the current window size is smaller than the preset window size, the adjusted display window displays the initial video stream;
when the current window size is larger than a preset window size, acquiring a target resolution corresponding to the adjusted display window, wherein the target resolution is obtained based on the current zoom level of the display window and the current resolution of the adjusted display window;
acquiring a target bit rate of the video stream corresponding to the target resolution;
and acquiring a target video stream at the target bit rate, and displaying the target video stream at the target resolution in the adjusted display window.
2. An apparatus for adjusting video sharpness, applied to an electronic device, includes:
the device comprises a zooming adjustment detection module, a zooming adjustment detection module and a zooming adjustment detection module, wherein the zooming adjustment detection module is used for detecting zooming adjustment operation on a display window when the display window displays an initial video stream, and the zooming adjustment operation is the operation of zooming in the display window;
the performance acquisition module is used for acquiring the current network condition and the processor performance of the electronic equipment;
a preset window size obtaining module, configured to determine, based on a second preset mapping relationship, a preset window size corresponding to the current network condition and the processor performance, where the second preset mapping relationship at least includes a corresponding relationship between the current network condition, the processor performance, and the preset window size;
a current window size obtaining submodule, configured to obtain a current window size of the adjusted display window when the zoom adjustment operation on the display window is detected;
a third target resolution obtaining sub-module, configured to, when the current window size is smaller than the preset window size, display the initial video stream on the adjusted display window; when the current window size is larger than a preset window size, acquiring a target resolution corresponding to the adjusted display window, wherein the target resolution is obtained based on the current zoom level of the display window and the current resolution of the adjusted display window;
a target bit rate obtaining module, configured to obtain a target bit rate of the video stream corresponding to the target resolution;
and the display module is used for acquiring a target video stream at the target bit rate and displaying the target video stream at the target resolution in the adjusted display window.
3. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of claim 1.
4. A computer-readable storage medium having program code stored therein, the program code being invoked by a processor to perform the method of claim 1.
CN202110071207.8A 2021-01-19 2021-01-19 Video definition adjusting method and device, electronic equipment and storage medium Active CN112399123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110071207.8A CN112399123B (en) 2021-01-19 2021-01-19 Video definition adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110071207.8A CN112399123B (en) 2021-01-19 2021-01-19 Video definition adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112399123A CN112399123A (en) 2021-02-23
CN112399123B true CN112399123B (en) 2021-06-01

Family

ID=74625148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110071207.8A Active CN112399123B (en) 2021-01-19 2021-01-19 Video definition adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112399123B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596561B (en) * 2021-07-29 2023-06-27 北京达佳互联信息技术有限公司 Video stream playing method, device, electronic equipment and computer readable storage medium
CN115883725A (en) * 2021-09-27 2023-03-31 天翼爱音乐文化科技有限公司 Method, system, equipment and storage medium for displaying video color ring
CN114143188B (en) * 2021-11-18 2023-06-23 深圳大学 Video processing method and device, electronic equipment and storage medium
CN115243092B (en) * 2022-07-01 2024-02-23 网易(杭州)网络有限公司 Video playing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848382A (en) * 2010-05-31 2010-09-29 深圳市景阳科技股份有限公司 Method and system for adjusting video streaming image resolution ratio and code stream
CN102547206A (en) * 2010-12-30 2012-07-04 中国移动通信集团公司 Method and device for determining video transmission parameter during video communication
CN102595093A (en) * 2011-01-05 2012-07-18 腾讯科技(深圳)有限公司 Video communication method for dynamically changing video code and system thereof
CN103517137A (en) * 2013-09-30 2014-01-15 广州华多网络科技有限公司 Network video transmission method and system, sending/receiving end processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848382A (en) * 2010-05-31 2010-09-29 深圳市景阳科技股份有限公司 Method and system for adjusting video streaming image resolution ratio and code stream
CN102547206A (en) * 2010-12-30 2012-07-04 中国移动通信集团公司 Method and device for determining video transmission parameter during video communication
CN102595093A (en) * 2011-01-05 2012-07-18 腾讯科技(深圳)有限公司 Video communication method for dynamically changing video code and system thereof
CN103517137A (en) * 2013-09-30 2014-01-15 广州华多网络科技有限公司 Network video transmission method and system, sending/receiving end processing method and device

Also Published As

Publication number Publication date
CN112399123A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN112399123B (en) Video definition adjusting method and device, electronic equipment and storage medium
CN113395478B (en) Method, system and storage medium for providing high resolution video stream
US9172907B2 (en) Method and apparatus for dynamically adjusting aspect ratio of images during a video call
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
US20160306504A1 (en) Presenting a Message in a Communication Session
CN107682714B (en) Method and device for acquiring online video screenshot
US9509741B2 (en) Snapshot capture for a communication session
US10241660B2 (en) Display control apparatus, method for controlling the same, and storage medium
JP2009518103A (en) Method and system for enabling a user to play a large screen game with a mobile device
JP2007151078A (en) Video distribution system, client terminal and control method thereof
WO2021008418A1 (en) Layer composition method and apparatus, electronic device, and storage medium
CN107148776B (en) Method, device and system for acquiring video data and computer readable storage medium
CN111246270B (en) Method, device, equipment and storage medium for displaying bullet screen
CN108810610B (en) Screen sharing method and device
CN111432261A (en) Video window picture display method and device
CN111314624A (en) Preview picture generation method, device, hard disk video recorder and storage medium
CN112764853A (en) Screen projection method, equipment and system
CN109587555B (en) Video processing method and device, electronic equipment and storage medium
CN113559498A (en) Three-dimensional model display method and device, storage medium and electronic equipment
CN107547913B (en) Video data playing and processing method, client and equipment
CN114285978A (en) Video processing method, video processing device and electronic equipment
CN112911362B (en) Video picture moving and scaling method and device, electronic equipment and readable storage medium
CN114827708A (en) Video playing method and device and electronic equipment
CN113891018A (en) Shooting method and device and electronic equipment
CN109819187B (en) Video recording control method and device, mobile terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant