CN113825020B - Video definition switching method, device, equipment, storage medium and program product - Google Patents

Video definition switching method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN113825020B
CN113825020B CN202111097028.8A CN202111097028A CN113825020B CN 113825020 B CN113825020 B CN 113825020B CN 202111097028 A CN202111097028 A CN 202111097028A CN 113825020 B CN113825020 B CN 113825020B
Authority
CN
China
Prior art keywords
video stream
old
picture
new
video
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
CN202111097028.8A
Other languages
Chinese (zh)
Other versions
CN113825020A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111097028.8A priority Critical patent/CN113825020B/en
Publication of CN113825020A publication Critical patent/CN113825020A/en
Application granted granted Critical
Publication of CN113825020B publication Critical patent/CN113825020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure provides a video definition switching method, a video definition switching device, electronic equipment, a computer readable storage medium and a computer program product, and relates to the technical field of media clouds. The method comprises the following steps: acquiring a definition switching instruction aiming at a target video; determining an old video stream before switching and a new video stream after switching according to the definition switching indication; when the definition difference between the new video stream and the old video stream is larger than the preset difference, gradually replacing the old picture of the old video stream on a universal canvas in a pushing mode, wherein the size of the universal canvas is matched with the highest resolution of the target video. According to the method, the universal canvas matched with the highest resolution is used for presenting the video stream pictures, so that the canvas does not need to be replaced because of the fact that the size of the canvas does not correspond to each time when the video stream is replaced, the performance cost and the time consumption are reduced, the picture switching of the new video stream and the old video stream can be smoother by adopting the pushing alternative scheme, and the video definition switching experience of a user is improved.

Description

Video definition switching method, device, equipment, storage medium and program product
Technical Field
The present disclosure relates to the field of data stream switching technologies, and in particular, to the field of media cloud technologies, and in particular, to a video definition switching method, a video definition switching device, an electronic device, a computer readable storage medium, and a computer program product.
Background
In general, a video website provides videos with different resolutions for users to select, and after the users perform a switching operation of the resolutions and video streams at a player, video frame data of a new media stream is displayed immediately. This results in a particularly abrupt switching process in case of very large differences in sharpness from front to back.
Therefore, how to make the player smooth as much as possible when switching between sharpness and video stream during playing is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the disclosure provides a video definition switching method, a video definition switching device, electronic equipment, a computer readable storage medium and a computer program product.
In a first aspect, an embodiment of the present disclosure provides a video sharpness switching method, including: acquiring a definition switching instruction aiming at a target video; determining an old video stream before switching and a new video stream after switching according to the definition switching indication; and in response to the difference in definition between the new video stream and the old video stream being greater than the preset difference, gradually replacing the old picture of the old video stream with the new picture of the new video stream on a universal canvas in a pushing manner, wherein the size of the universal canvas is matched with the highest resolution of the target video.
In a second aspect, an embodiment of the present disclosure provides a video sharpness switching apparatus, including: a switching instruction acquisition unit configured to acquire a sharpness switching instruction for a target video; a new and old video stream determining unit configured to determine an old video stream before switching and a new video stream after switching according to the sharpness switching instruction; and the push type smooth replacing unit is configured to gradually replace the old picture of the old video stream on the universal canvas in a push mode in response to the difference of the definition of the new video stream and the old video stream being larger than the preset difference, wherein the size of the universal canvas is matched with the highest resolution of the target video.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to implement a video sharpness switching method as described in any of the implementations of the first aspect when executed.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement a video sharpness switching method as described in any of the implementations of the first aspect when executed.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, is capable of implementing a video sharpness switching method as described in any of the implementations of the first aspect.
The video definition switching method provided by the embodiment of the disclosure comprises the following steps: acquiring a definition switching instruction aiming at a target video; determining an old video stream before switching and a new video stream after switching according to the definition switching indication; and in response to the difference in definition between the new video stream and the old video stream being greater than the preset difference, gradually replacing the old picture of the old video stream with the new picture of the new video stream on a universal canvas in a pushing manner, wherein the size of the universal canvas is matched with the highest resolution of the target video.
According to the video stream frame display method and device, the universal canvas matched with the highest resolution is used for displaying the frames of the video stream, so that the canvas is not required to be replaced due to the fact that the size of the canvas is not corresponding to each time when the video stream is replaced, performance overhead and time consumption are reduced, the adopted pushing replacement scheme can enable the frame switching of the new video stream and the old video stream to be smoother, abrupt sense is reduced, and video definition switching experience of a user is further improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture in which the present disclosure may be applied;
fig. 2 is a flowchart of a video definition switching method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another video sharpness switching method according to an embodiment of the present disclosure;
fig. 4 is a flowchart of yet another video sharpness switching method according to an embodiment of the present disclosure;
fig. 5 is a flowchart of still another video sharpness switching method according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of switching a 360P video stream to a 720P video stream according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a video definition switching apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device adapted to perform a video sharpness switching method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of video sharpness switching methods, apparatus, electronic devices, and computer-readable storage media of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various applications for implementing information communication between the terminal devices 101, 102, 103 and the server 105, such as a video on demand application, an audio on demand application, an instant messaging application, and the like, may be installed on the terminal devices.
The terminal devices 101, 102, 103 and the server 105 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smartphones, tablets, laptop and desktop computers, etc.; when the terminal devices 101, 102, 103 are software, they may be installed in the above-listed electronic devices, which may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not particularly limited herein. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server; when the server is software, the server may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not particularly limited herein.
The terminal devices 101, 102, 103 can provide various services through various built-in applications, taking as an example a video-on-demand type application that can provide a smooth video stream switching function, the terminal devices 101, 102, 103 can achieve the following effects when running the video-on-demand type application: firstly, acquiring a definition switching instruction (for example, clicking a definition adjusting button at a certain position of a touch screen) which is input by a user and aims at a target video; then, determining an old video stream before switching and a new video stream after switching according to the definition switching instruction; next, a new video is pulled from the server 105 through the network 104; and when the definition difference between the new video stream and the old video stream is larger than the preset difference, gradually replacing the old picture of the old video stream on a universal canvas in a pushing mode, wherein the size of the universal canvas is matched with the highest resolution of the target video.
The video sharpness switching method provided in the subsequent embodiments of the present disclosure is generally performed by the terminal apparatuses 101, 102, 103 that directly present video pictures to the user, and accordingly, the video sharpness switching apparatus is generally also provided in the terminal apparatuses 101, 102, 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to fig. 2, fig. 2 is a flowchart of a video sharpness switching method according to an embodiment of the disclosure, wherein the flowchart 200 includes the following steps:
step 201: acquiring a definition switching instruction aiming at a target video;
this step aims at acquiring a sharpness switch instruction for a target video by an execution subject of the video sharpness switch method (e.g., terminal apparatuses 101, 102, 103 shown in fig. 1). The definition switch indication generally indicates that the target video is switched from the low definition version to the high definition version, but may also refer to that the target video is switched from the high definition version to the low definition version, and video data of different definition versions corresponds to different video stream sources, and definition switch may also be understood as switching video streams.
A low-definition video stream typically has a lower resolution, whereas a high-definition video stream has a higher resolution, whereas a higher resolution video stream has a larger corresponding picture size with the same size of each pixel block; in the case of a fixed picture size, there are more pixel blocks per unit size.
Step 202: determining an old video stream before switching and a new video stream after switching according to the definition switching indication;
on the basis of step 201, this step aims at determining, by the above-described execution body, the old video stream before switching and the new video stream after switching according to the sharpness switch instruction. The old video stream before switching can determine relevant parameters from the place where the pull stream source is currently established, the definition parameters of the new video stream after switching can be determined (usually marked on the user display interface to generate the definition switching indication according to the definition adjustment requirement of the user) before the new video stream is pulled, and relevant parameters except the definition parameters can be requested from a server (such as the server 105 shown in fig. 1) for providing the new video stream, or can be read after the data connection for pulling the new video stream is successfully established.
In the present disclosure, determining the new and old video streams before and after switching is to determine the difference of the video content definition corresponding to the two video streams, so as to select a subsequent processing mode according to the determined difference result.
Step 203: and in response to the difference in definition between the new video stream and the old video stream being greater than the preset difference, gradually replacing the old picture of the old video stream with the new picture of the new video stream on the universal canvas in a pushing manner.
Based on step 202, this step aims at gradually replacing the old picture of the old video stream with the new picture of the new video stream on the universal canvas in a pushing manner when the difference of the definition of the new video stream and the old video stream is larger than the preset difference by the execution subject. The definition difference may be defined according to a general resolution difference, or may be determined according to some user-defined parameters, for example, a degree of blurring required for blurring a clearer video stream picture to a blurred video stream, and the corresponding preset difference is mainly determined according to whether the user can be more obviously noticed during switching.
It should be noted that, the general canvas described in this disclosure is a new canvas different from the existing canvas, and the size of the existing canvas is consistent with the actual resolution of the video stream to be played, for example, the size of the existing canvas is only capable of just accommodating 360P video frames, if the existing canvas is temporarily switched to 1080P video, the original canvas cannot be accommodated because the video resolution of 1080P is far greater than the video resolution of 360P, and therefore, the original canvas needs to be destroyed to reestablish a new canvas enough to accommodate 1080P video. The size of the canvas does not appear to be visible to the user because it typically provides a fixed size display interface at the web page or application side and sets forces to fill the fixed size display interface in a "fill" manner no matter what the actual size of the canvas is. In practice, the method is accompanied by the destruction of the original canvas and the reconstruction of the new canvas when the definition is switched every time, so that not only is the steps more, but also the cost of performance is not small, and obvious black screen and abrupt switching feeling are easily brought when the new canvas and the old canvas are replaced.
To solve this problem, the present disclosure adopts an implementation scheme that does not need to change the canvas every time a video stream is switched, that is, the size of the universal canvas is fixedly matched to the highest resolution of the target video, that is, in the case that the size is matched to the highest resolution, the size of the universal canvas is enough to accommodate the actual resolution of the corresponding video stream anyway, while in order to avoid that the video stream of the low definition version cannot fill the universal canvas (that is, the actual resolution of the actual video stream presented on the universal canvas is smaller than the highest resolution), only the picture of the actual video stream needs to be enlarged to the maximum resolution so as to fill the universal canvas. That is, compared with the prior art that adopts the mode of simultaneously amplifying the canvas which just accommodates the video stream content with corresponding resolution, the scheme adopted by the present disclosure only needs to amplify the picture of the actual video stream in the canvas, thereby avoiding the canvas destruction and reconstruction operation required by each switching.
The scheme of the general canvas solves the time delay caused by the destruction and reconstruction operation of the canvas and avoids invalid performance cost, and by adopting a mode of gradually replacing the old picture of the old video stream on the general canvas in a pushing mode, the scheme can bring smoother definition switching experience to a viewer in a gradual mode, so that the definition switching can be very natural under the condition of no sense.
According to the video definition switching method provided by the embodiment of the disclosure, the universal canvas matched with the highest resolution is used for presenting the pictures of the video stream, so that the canvas is not required to be replaced because of the non-correspondence of the size of the canvas when the video stream is replaced each time, the performance cost and the time consumption are reduced, and the adopted push replacement scheme can also enable the picture switching of the new video stream and the old video stream to be smoother, the abrupt sense is reduced, and further the video definition switching experience of a user is improved.
Referring to fig. 3, fig. 3 is a flowchart of another video sharpness switching method according to an embodiment of the disclosure, wherein the flowchart 300 includes the following steps:
step 301: acquiring a definition switching instruction aiming at a target video;
step 302: determining an old video stream before switching and a new video stream after switching according to the definition switching indication;
step 303: determining a target advancing direction of a video picture according to the recorded video viewing preference;
in comparison with the embodiment shown in the flowchart 200, the purpose of step 303 added in this embodiment is to obtain a video viewing preference for determining in what direction to advance a new screen, where the preference may include a gesture of the user holding the executing body, a self-setting direction of the gesture for switching video, etc., where when the executing body is of a type that can be held by the user, holding may cause a more or less occlusion of a portion of the screen display content, and setting the start end of the target advancing direction close to the occluded portion may further increase the smoothness of the switching.
The usual propulsion modes include left-to-right and right-to-left, and some other unconventional propulsion modes are not excluded, such as oblique propulsion, etc., and can be determined by the user according to personal feeling and sensitivity.
Step 304: and gradually replacing the old picture on the universal canvas in a mode of pushing along the target pushing direction in response to the difference of the definition of the new video stream and the old video stream being greater than the preset difference.
In the case of the determined target pushing direction in step 303, compared with step 203 of the process 200, the method further defines the pushing manner of the new frame on the universal canvas, that is, pushing along the target pushing direction, so that the whole gradual replacement process is more natural, and the video definition switching experience of the user is further improved.
Referring to fig. 4, fig. 4 is a flowchart of yet another video sharpness switching method according to an embodiment of the disclosure, wherein the flowchart 400 includes the following steps:
step 401: acquiring a definition switching instruction aiming at a target video;
step 402: determining an old video stream before switching and a new video stream after switching according to the definition switching indication;
step 403: determining a unit step of propulsion according to the definition difference in response to the definition difference between the new video stream and the old video stream being greater than a preset difference;
compared to the embodiment shown in the flowchart 200, the purpose of the step 403 added in this embodiment is to determine the unit step of the new frame pushing under the pushing frame replacement scheme, that is, by setting the unit step to the sharpness difference matching, the smoothness of the new frame replacement and the old frame replacement can be improved as much as possible under the control of the unit step.
The process 200 has been described that the definition difference may be determined in a plurality of ways, and the correspondence relationship between the definition difference and the unit step size may be slightly different for different definition difference determining ways, but the core principles are that the larger the definition difference is, the smaller the unit step size is, the smaller the definition difference is, and the larger the unit step size is.
Step 404: the new picture is gradually replaced by the old picture on the universal canvas in a unit step advancing way.
In the case that the step 403 determines the advancing unit step, compared with the step 203 of the flow 200, the present step further defines the advancing speed of the new picture on the universal canvas, i.e. the advancing unit step is performed in unit time, so that the whole gradual replacement process is more natural; compared with the smooth feeling of the new and old picture replacement according to the pushing direction considered in the process 300, the present embodiment mainly considers the smooth feeling of the new and old picture replacement from the pushing speed, and can also further improve the video definition switching experience of the user.
Of course, according to the practical situation, the two improvement points of fig. 3 and fig. 4 can be combined to obtain a preferred embodiment of unit step length considering both the propulsion direction and the propulsion, further, in the case of combining a plurality of preferred influencing factors at the same time, the value of a certain preferred influencing factor can be properly adjusted, for example, in the case of having adopted propulsion along the target propulsion direction, the value of the unit step length can be smaller than that in the case of adopting the scheme of adjusting the propulsion speed alone.
Referring to fig. 5, fig. 5 is a flowchart of still another video sharpness switching method according to an embodiment of the disclosure, wherein the flowchart 500 includes the following steps:
step 501: acquiring a definition switching instruction aiming at a target video;
step 502: determining an old video stream before switching and a new video stream after switching according to the definition switching indication;
step 503: in response to the sharpness difference between the new video stream and the old video stream being greater than the preset difference and there being a transitional video stream having a resolution intermediate between the new video stream and the old video stream, gradually replacing the transitional picture of the transitional video stream with the old picture on the universal canvas in a push manner;
step 504: and gradually replacing the transition picture by pushing the new picture on the universal canvas along the same pushing direction in response to the replacement duty ratio of the transition picture to the old picture exceeding the preset duty ratio.
The preset duty ratio is allowed to be set by the user, but in combination with practical situations, the preset duty ratio is set to be about 50% so as to bring a better effect.
Different from any embodiment described above, in this embodiment, when the difference in definition between the new video stream and the old video stream is greater than the preset difference, the situation that there is a transitional video stream with a resolution between the new video stream and the old video stream is also considered, and a scheme is provided in which the transitional picture of the transitional video stream is gradually replaced by the old picture on the universal canvas in a pushing manner, and then the transitional picture is gradually replaced by the new picture on the universal canvas in a pushing manner along the same pushing direction, so as to bring better definition switching experience, and further promote the video definition switching experience of the user.
On the basis of any of the above embodiments, since the present disclosure adopts a scheme of gradually replacing an old picture with a new picture on a general canvas in a push manner, it is still necessary to keep acquiring video data for generating the old picture from the old video stream until the old picture is not completely replaced with the new picture, so that the acquisition of video data from the old video stream can be terminated only when the old picture is completely replaced with the new picture, thereby bringing about a better sharpness switching experience.
For a further understanding, the disclosure further provides a specific implementation scheme in combination with a specific application scenario, please refer to the schematic diagram shown in fig. 6:
1) The user A generates a target video content X through a video-on-demand application installed on a smart phone of the user A;
2) The user A perceives that the currently default definition of 360P of the video content X is lower, so that the definition switching target is set to 720P by clicking a definition switching button;
3) The video-on-demand application determines that the difference of the definition between the old video stream before switching and the new video stream to be switched exceeds one grade (namely, the definition grade of 480P is usually arranged between 360P and 720P) according to the received definition switching target, and the definition of the old video stream is smaller than 480P, so that a judging result of activating the push type smooth switching function is obtained;
4) The video on demand type is applied to pull 720P new video stream from the server, and the video is watched by the user by holding the smart phone by the right hand, so that the target pushing direction is determined to be right to left;
5) The video on demand class application advances the new picture of the new video stream (i.e., the picture of 720P) on the universal canvas in a right-to-left advance direction to gradually replace the old picture of the old video stream (i.e., the picture of 360P).
With further reference to fig. 7, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a video sharpness switching apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus is particularly applicable to various electronic devices.
As shown in fig. 7, the video sharpness switching apparatus 700 of the present embodiment may include: a switching instruction acquisition unit 701, a new and old video stream determination unit 702, and a push type smooth substitution unit 703. Wherein, the switching instruction acquisition unit 701 is configured to acquire a sharpness switching instruction for a target video; a new and old video stream determining unit 702 configured to determine an old video stream before switching and a new video stream after switching according to the sharpness switching instruction; the push-type smooth replacing unit 703 is configured to gradually replace the old picture of the old video stream with the new picture of the new video stream on the universal canvas in a push manner in response to the difference of the sharpness of the new video stream and the old video stream being greater than the preset difference, the size of the universal canvas being matched with the highest resolution of the target video.
In the present embodiment, in the video sharpness switching apparatus 700: the specific processing of the switching instruction acquiring unit 701, the new and old video stream determining unit 702, and the push type smooth replacing unit 703 and the technical effects thereof may refer to the relevant descriptions of steps 201 to 203 in the corresponding embodiment of fig. 2, and are not repeated here.
In some optional implementations of this embodiment, the video sharpness switching apparatus 700 further includes:
and a small resolution picture enlarging unit configured to enlarge a picture of the actual video stream to a maximum resolution so as to fill the universal canvas in response to an actual resolution of the actual video stream presented on the universal canvas being smaller than the maximum resolution.
In some optional implementations of this embodiment, the video sharpness switching apparatus 700 further includes:
a preference-based advancing direction determining unit configured to determine a target advancing direction of a video picture according to recorded video viewing preferences before gradually replacing an old picture of an old video stream with a new picture of a new video stream on a general canvas in a manner of advancing, including left-to-right and right-to-left;
correspondingly, the push-type smooth substitution unit 703 may be further configured to:
the new picture is gradually replaced by the old picture on the general canvas in a way of pushing along the target pushing direction.
In some optional implementations of this embodiment, the video sharpness switching apparatus 700 further includes:
a unit step determining unit configured to determine a advancing unit step from the sharpness difference;
correspondingly, the push-type smooth substitution unit 703 may be further configured to:
the new picture is gradually replaced by the old picture on the universal canvas in a unit step advancing way.
In some optional implementations of the present embodiment, the push smoothing replacement unit 703 may be further configured to:
in response to the presence of a transitional video stream having a resolution intermediate between that of the new video stream and the old video stream, progressively replacing the transitional pictures of the transitional video stream with the old pictures in a progressive manner on the universal canvas;
and gradually replacing the transition picture by pushing the new picture on the universal canvas along the same pushing direction in response to the replacement duty ratio of the transition picture to the old picture exceeding the preset duty ratio.
In some optional implementations of this embodiment, the video sharpness switching apparatus 700 further includes:
and a termination acquisition unit configured to terminate acquisition of video data from the old video stream in response to the old picture being completely replaced with the new picture.
The video definition switching device provided by the embodiment presents the picture of the video stream by using the universal canvas matched with the highest resolution, so that the canvas is not required to be replaced because of the non-correspondence of the canvas size when the video stream is replaced each time, the performance cost and the time consumption are reduced, and the adopted push replacement scheme can also enable the picture switching of the new video stream and the old video stream to be smoother, reduce the abrupt sense, and further promote the video definition switching experience of a user.
According to an embodiment of the present disclosure, the present disclosure further provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to implement the video sharpness switching method described in any of the embodiments above.
According to an embodiment of the present disclosure, there is also provided a readable storage medium storing computer instructions for enabling a computer to implement the video sharpness switching method described in any of the above embodiments when executed.
The disclosed embodiments provide a computer program product that, when executed by a processor, enables the video sharpness switching method described in any of the embodiments above.
Fig. 8 illustrates a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the respective methods and processes described above, for example, a video sharpness switching method. For example, in some embodiments, the video sharpness switching method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM 802 and/or communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the video sharpness switching method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the video sharpness switching method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) service.
According to the technical scheme of the embodiment of the disclosure, the universal canvas matched with the highest resolution is used for presenting the picture of the video stream, so that the canvas is not required to be replaced because of the non-correspondence of the size of the canvas when the video stream is replaced each time, the performance cost and the time consumption are reduced, and the adopted push replacement scheme can also enable the picture switching of the new video stream and the old video stream to be smoother, the abrupt sense is reduced, and the video definition switching experience of a user is further improved.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A video sharpness switching method, comprising:
acquiring a definition switching instruction aiming at a target video;
determining an old video stream before switching and a new video stream after switching according to the definition switching indication;
in response to the difference of the definition of the new video stream and the old video stream being greater than a preset difference, gradually replacing old pictures of the old video stream by new pictures of the new video stream on a general canvas in a pushing manner, wherein the size of the general canvas is matched with the highest resolution of the target video, and other new canvases are not needed to be newly built or destroyed in the video stream switching process except the general canvas;
wherein the gradually replacing the old picture of the old video stream with the new picture of the new video stream on the universal canvas in a pushing way comprises the following steps:
gradually replacing transition pictures of the transition video stream with the old pictures in a pushing manner on the universal canvas in response to the existence of the transition video stream having a resolution intermediate between the new video stream and the old video stream; gradually replacing the transition picture by pushing the new picture on the universal canvas in the same pushing direction in response to the replacement duty ratio of the transition picture to the old picture exceeding a preset duty ratio;
in response to an actual resolution of an actual video stream presented on the universal canvas being less than the highest resolution, a picture of the actual video stream is enlarged to the highest resolution to fill the universal canvas.
2. The method of claim 1, wherein prior to progressively replacing new pictures of the new video stream with old pictures of the old video stream in a push manner on a universal canvas, further comprising:
determining a target pushing direction of a video picture according to the recorded video watching preference, wherein the pushing mode comprises left-to-right and right-to-left;
correspondingly, the step of gradually replacing the old picture of the old video stream with the new picture of the new video stream on the universal canvas in a pushing manner comprises the following steps:
and gradually replacing the old picture on the universal canvas in a mode of pushing the new picture along the target pushing direction.
3. The method of claim 1, further comprising:
determining a unit step of propulsion according to the definition difference;
correspondingly, the step of gradually replacing the old picture of the old video stream with the new picture of the new video stream on the universal canvas in a pushing manner comprises the following steps:
gradually replacing the old picture on the universal canvas by the new picture in a way of pushing according to the unit step length.
4. A method according to any one of claims 1-3, further comprising:
responsive to the old picture being completely replaced by the new picture, the acquisition of video data from the old video stream is terminated.
5. A video sharpness switching apparatus, comprising:
a switching instruction acquisition unit configured to acquire a sharpness switching instruction for a target video;
a new and old video stream determining unit configured to determine an old video stream before switching and a new video stream after switching according to the definition switching instruction;
a push type smooth replacing unit, configured to gradually replace old pictures of the old video stream on a general canvas in a push manner in response to the difference of the definition of the new video stream and the old video stream being greater than a preset difference, wherein the size of the general canvas is matched with the highest resolution of the target video, and other new canvases are not needed to be newly built or destroyed in the video stream switching process except the general canvas;
wherein the push type smooth substitution unit is further configured to: gradually replacing transition pictures of the transition video stream with the old pictures in a pushing manner on the universal canvas in response to the existence of the transition video stream having a resolution intermediate between the new video stream and the old video stream; gradually replacing the transition picture by pushing the new picture on the universal canvas in the same pushing direction in response to the replacement duty ratio of the transition picture to the old picture exceeding a preset duty ratio;
and a small resolution picture amplifying unit configured to amplify pictures of an actual video stream presented on the general canvas to the highest resolution in response to the actual resolution of the actual video stream being smaller than the highest resolution, so as to fill the general canvas.
6. The apparatus of claim 5, further comprising:
a preference-based advancing direction determining unit configured to determine a target advancing direction of a video picture according to a recorded video viewing preference before gradually replacing a new picture of the new video stream with an old picture of the old video stream on a general canvas in a manner of advancing, including left-to-right and right-to-left;
correspondingly, the push-type smooth replacement unit is further configured to:
and gradually replacing the old picture on the universal canvas in a mode of pushing the new picture along the target pushing direction.
7. The apparatus of claim 5, further comprising:
a unit step determining unit configured to determine a advancing unit step from the sharpness difference;
correspondingly, the push-type smooth replacement unit is further configured to:
gradually replacing the old picture on the universal canvas by the new picture in a way of pushing according to the unit step length.
8. The apparatus of any of claims 5-7, further comprising:
and a termination acquisition unit configured to terminate acquisition of video data from the old video stream in response to the old picture being completely replaced with the new picture.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the video sharpness switching method of any of claims 1-4.
10. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the video sharpness switching method of any of claims 1-4.
CN202111097028.8A 2021-09-18 2021-09-18 Video definition switching method, device, equipment, storage medium and program product Active CN113825020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111097028.8A CN113825020B (en) 2021-09-18 2021-09-18 Video definition switching method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111097028.8A CN113825020B (en) 2021-09-18 2021-09-18 Video definition switching method, device, equipment, storage medium and program product

Publications (2)

Publication Number Publication Date
CN113825020A CN113825020A (en) 2021-12-21
CN113825020B true CN113825020B (en) 2023-09-29

Family

ID=78914924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111097028.8A Active CN113825020B (en) 2021-09-18 2021-09-18 Video definition switching method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN113825020B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900731B (en) * 2022-03-31 2024-04-09 咪咕文化科技有限公司 Video definition switching method and device
CN115426452A (en) * 2022-08-22 2022-12-02 杭州萤石软件有限公司 Channel picture exchange method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103347155A (en) * 2013-06-18 2013-10-09 北京汉博信息技术有限公司 Transition special effect module and method for achieving switching of different transition effects of two video streams
CN105163163A (en) * 2015-08-31 2015-12-16 深圳市茁壮网络股份有限公司 Display method and device and set-top box
CN107071536A (en) * 2017-03-29 2017-08-18 武汉斗鱼网络科技有限公司 User's switching definition loads the method and system of video flowing
CN107197371A (en) * 2016-03-15 2017-09-22 广州市动景计算机科技有限公司 The switching method and device of video definition
CN107370980A (en) * 2016-05-11 2017-11-21 中兴通讯股份有限公司 Video switching method, apparatus and system
CN110689835A (en) * 2019-09-27 2020-01-14 福建捷联电子有限公司 HDMI single-interface display capable of switching resolution

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657520A (en) * 2014-11-18 2016-06-08 乐视网信息技术(北京)股份有限公司 Video definition switching method and video player
WO2018142159A1 (en) * 2017-02-03 2018-08-09 Tv One Limited Method of video transmission and display

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103347155A (en) * 2013-06-18 2013-10-09 北京汉博信息技术有限公司 Transition special effect module and method for achieving switching of different transition effects of two video streams
CN105163163A (en) * 2015-08-31 2015-12-16 深圳市茁壮网络股份有限公司 Display method and device and set-top box
CN107197371A (en) * 2016-03-15 2017-09-22 广州市动景计算机科技有限公司 The switching method and device of video definition
CN107370980A (en) * 2016-05-11 2017-11-21 中兴通讯股份有限公司 Video switching method, apparatus and system
CN107071536A (en) * 2017-03-29 2017-08-18 武汉斗鱼网络科技有限公司 User's switching definition loads the method and system of video flowing
CN110689835A (en) * 2019-09-27 2020-01-14 福建捷联电子有限公司 HDMI single-interface display capable of switching resolution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A WebGL-based 3D virtual home roaming by seamlessly connecting videos to panoramas;Lingjun Tao;《2015 8th International Congress on Image and Signal Processing (CISP)》;全文 *
适配分辨率动态变化的低复杂度视频场景切换检测方法;方宏俊;《计算机科学》;全文 *

Also Published As

Publication number Publication date
CN113825020A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
CN108833975B (en) Video playing processing method and device
WO2021147657A1 (en) Frame interpolation processing method and related product
CN113825020B (en) Video definition switching method, device, equipment, storage medium and program product
US20160198208A1 (en) Desktop-cloud-based media control method and device
KR20060103459A (en) Compose rate reduction for displays
EP3410302B1 (en) Graphic instruction data processing method, apparatus
US7616220B2 (en) Spatio-temporal generation of motion blur
CN111277861B (en) Method and device for extracting hot spot segments in video
US11587526B2 (en) Luminance adaption to minimize discomfort and improve visibility
US20220076476A1 (en) Method for generating user avatar, related apparatus and computer program product
US10110887B2 (en) Display diagnostics for enhancing performance of display devices
CN109587555B (en) Video processing method and device, electronic equipment and storage medium
CN114168793A (en) Anchor display method, device, equipment and storage medium
JP6389279B2 (en) Display interface bandwidth modulation
WO2020038071A1 (en) Video enhancement control method, device, electronic apparatus, and storage medium
CN109859328B (en) Scene switching method, device, equipment and medium
CN113810755B (en) Panoramic video preview method and device, electronic equipment and storage medium
CN111405362B (en) Video output method, video output device, video equipment and computer readable storage medium
EP3264284B1 (en) Data processing method and device
CN113891136A (en) Video playing method and device, electronic equipment and storage medium
CN114125135B (en) Video content presentation method and device, electronic equipment and storage medium
CN111880869A (en) Picture adjusting method, device and system
CN112346687A (en) Information interaction method and device, electronic equipment and readable storage medium
CN113824985B (en) Live streaming method, apparatus, device, storage medium and computer program product
CN112383676B (en) Video file processing method and device, electronic equipment 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