CN113660516B - Video display method, device, equipment and medium - Google Patents
Video display method, device, equipment and medium Download PDFInfo
- Publication number
- CN113660516B CN113660516B CN202111212749.9A CN202111212749A CN113660516B CN 113660516 B CN113660516 B CN 113660516B CN 202111212749 A CN202111212749 A CN 202111212749A CN 113660516 B CN113660516 B CN 113660516B
- Authority
- CN
- China
- Prior art keywords
- target video
- size parameter
- video
- display screen
- texture view
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation 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)
- Controls And Circuits For Display Device (AREA)
Abstract
The present disclosure provides a video display method, apparatus, device, and medium, the method including: acquiring a target video and a tailorable range of the target video; determining an initial size parameter of a texture view according to the initial size parameter of the target video and the size parameter of the display screen, wherein the initial size parameter of the texture view is larger than the size parameter of the display screen; adjusting the target video to be the same as the initial size parameter of the texture view, and determining the non-cuttable content of the adjusted target video based on the cuttable range; adjusting a view visible area of the texture view displayed on the display screen according to the initial size parameter of the texture view, the size parameter of the display screen and the non-cuttable content, and displaying the adjusted local content in the target video through the view visible area, wherein the local content comprises the non-cuttable content; the size parameter of the visible area of the view is consistent with the size parameter of the display screen. The display effect of the video can be effectively improved.
Description
Technical Field
The present disclosure relates to the field of video processing technologies, and in particular, to a video display method, apparatus, device, and medium.
Background
Electronic devices with display screens, such as mobile phones and tablet computers, mostly have a video playing function. Because the size proportions of the display screens of the electronic devices are not consistent, and the size proportions of different videos are not completely consistent, when the electronic devices play videos in a full-screen mode, the situation that the size proportions of the display screens are not consistent with the size proportions of the videos is very common, and at the moment, a phenomenon that a texture view (a view control used for displaying a video picture on the display screen and the view size when displaying the video is consistent with the video size) cannot occupy the whole display screen occurs, namely, in the full-screen mode, the video content cannot occupy the whole display screen, and the screen part which is not occupied is uniformly filled and displayed with a black background, so that the whole viewing effect is not good.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a video display method, apparatus, device, and medium.
According to an aspect of the present disclosure, there is provided a video display method including: acquiring a target video and a tailorable range of the target video; acquiring a size parameter of a display screen for displaying the target video; determining an initial size parameter of a texture view according to the initial size parameter of the target video and the size parameter of the display screen, wherein the initial size parameter of the texture view is larger than the size parameter of the display screen; adjusting the target video to be the same as the initial size parameter of the texture view; determining the non-tailorable content of the adjusted target video based on the tailorable range; according to the initial size parameter of the texture view, the size parameter of the display screen and the non-cuttable content, adjusting a view visible area of the texture view displayed on the display screen, and displaying the adjusted local content in the target video through the view visible area; wherein the local content at least comprises the non-cuttable content, and the size parameter of the view visible area is consistent with the size parameter of the display screen.
According to another aspect of the present disclosure, there is provided a video display apparatus including: the video acquisition module is used for acquiring a target video and a tailorable range of the target video; the size acquisition module is used for acquiring size parameters of a display screen for displaying the target video; the view determining module is used for determining an initial size parameter of a texture view according to the initial size parameter of the target video and the size parameter of the display screen, wherein the initial size parameter of the texture view is larger than the size parameter of the display screen; the video adjusting module is used for adjusting the target video to be the same as the initial size parameter of the texture view; the content determining module is used for determining the non-cuttable content of the adjusted target video based on the cuttable range; the display module is used for adjusting a view visible area displayed on the display screen by the texture view according to the initial size parameter of the texture view, the size parameter of the display screen and the non-cuttable content, and displaying the adjusted local content in the target video through the view visible area; wherein the local content at least comprises the non-cuttable content, and the size parameter of the view visible area is consistent with the size parameter of the display screen.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the aforementioned video display method.
According to another aspect of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the above-described video display method.
The technical scheme provided by the embodiment of the disclosure can firstly obtain the target video and the tailorable range of the target video, determining an initial size parameter of the texture view according to the initial size parameter of the target video and the size parameter of the display screen, wherein the initial size parameter of the texture view is larger than the size parameter of the display screen, then adjusting the target video to be consistent with the initial size parameter of the texture view, determining the non-clipping content of the adjusted target video based on the clipping range, finally adjusting the view visible area (the size parameter is consistent with the size parameter of the display screen) of the texture view displayed on the display screen according to the initial size parameter of the texture view, the size parameter of the display screen and the non-clipping content, and displaying the local content (including the non-tailorable content) in the adjusted target video through the view visible area. According to the method, the non-cuttable content of the adjusted video is determined, the view visible area of the texture view with the size larger than that of the display screen is adjusted, the size parameter of the view visible area is consistent with that of the display screen, the non-cuttable content in the adjusted video can be completely displayed in the view visible area, full-screen display is better achieved on the basis that the non-cuttable content in the video can be completely displayed (namely the whole quality of the video is not affected), and the display effect of the video and the watching experience of a user are comprehensively improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic view of a video display provided by an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a video display method according to an embodiment of the disclosure;
fig. 3 is a schematic diagram of a tailorable video provided by an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a video display method according to an embodiment of the disclosure;
FIG. 5 is a schematic view of a video display provided by an embodiment of the present disclosure;
FIG. 6 is a schematic view of a video display provided by an embodiment of the present disclosure;
FIG. 7 is a schematic view of a video display provided by an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a video display device according to an embodiment of the disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and its variants as used in this disclosure are intended to be inclusive, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description. It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
When a user plays a video by using an electronic device with a display screen, such as a mobile phone, a computer, a television, and the like, the problem that the video cannot be played in a full screen often occurs, and particularly when the electronic device is a mobile phone, the problem that the video cannot be played in the full screen is more frequent. The reason is that different manufacturers of electronic devices (such as different manufacturers of mobile phones) have different designs for defining the size ratio (aspect ratio) of the display screens, which results in inconsistent size ratios of the display screens of the electronic devices. The display screen usually uses a texture view (TextureView), which is a view control for displaying a video picture on the display screen, and can carry the video to play on the electronic device. In the prior art, the default size of the texture view in the full screen condition is the same as the size of the display screen, when the video is played, the size of the texture view is adjusted to be consistent with the size of the video, and when the video is played on the display screen through the texture view, the texture view is adjusted to be consistent with the size of the display screen in an equal proportion (the video is also adjusted in an equal proportion) in an ideal state, and the video can be played in the full screen. However, under the condition that the sizes of the display screens are various and the sizes of the videos are not completely uniform, the ideal state is difficult to realize, in the equal proportion adjustment, the adjustment proportion of the width and the height is consistent, unless the size proportion of the texture view is consistent with the size proportion of the display screen, the texture view carrying the videos can be adjusted (zoomed) in equal proportion to be consistent with the size of the display screen, and the problem that the texture view cannot fully occupy the display screen, namely the videos cannot be played in full screen can be caused.
For example, because the size ratio of the texture view is not consistent with the size ratio of the display screen, the width of the texture view is adjusted to be consistent with the width of the display screen according to a certain ratio a, and the height of the texture view also needs to be adjusted in an equal ratio according to the ratio a, but the actual height obtained after adjustment according to the ratio a is necessarily different from the height of the display screen, and the actual height may be greater than the height of the display screen or smaller than the height of the display screen. Similarly, the height of the texture view is adjusted to be consistent with the height of the display screen according to a certain proportion B, the width of the texture view also needs to be adjusted in an equal proportion according to the proportion B, but the actual width obtained after adjustment according to the proportion B is different from the width of the display screen, and the actual width may be larger than the width of the display screen or smaller than the width of the display screen. In any way, the texture view cannot be adjusted to be consistent with the size of the display screen, and the texture view cannot occupy the display screen, that is, the video displayed by the texture view cannot occupy the display screen. Specifically, a proportion is selected from proportion a and proportion B for display, and the precondition for selecting the proportion is that texture views at the proportion can be all displayed on a display screen (vertical screen display), and the final effect may be: the width of the texture view is consistent with the width of the display screen, but the height of the texture view is smaller than the height of the display screen; alternatively, the height of the texture view coincides with the height of the display screen, but the width of the texture view is smaller than the width of the display screen. In either way, there is a problem that the display screen cannot be filled with width or height, and the part that is not filled with the black background is filled with the black background.
For easy understanding, reference may be made to a schematic diagram of video display shown in fig. 1, which illustrates both horizontal and vertical screens in full-screen mode, where the unoccupied part of the video is filled with a black background, the horizontal screen has a height that is the same as the height of the display screen but a width that is less than the width of the display screen, and the vertical screen has a width that is the same as the width of the display screen but a height that is less than the height of the display screen. Of course, fig. 1 is only an exemplary illustration, and not all cases are listed, such as the case where the width of the video coincides with the width of the display screen, but the height is smaller than the height of the display screen in the landscape screen.
In order to enable a texture view to occupy the whole display screen, in other words, to achieve the effect of full-screen display of a video, an embodiment of the present disclosure provides a video display method, fig. 2 is a schematic flow diagram of a video display method provided by an embodiment of the present disclosure, the method may be executed by a video display apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device, such as an electronic device that can play a video through a display screen, such as a mobile phone, a tablet computer, a desktop computer, a television, and the like, as shown in fig. 1, the method mainly includes the following steps S202 to S212:
step S202, a target video and a tailorable range of the target video are obtained. The target video is the video to be displayed.
In some embodiments, the received video may be directly used as a target video to be displayed, and the video may be directly transmitted from an external device (or a network) to an electronic device that performs the video display method; in other embodiments, a video selected by a user from a plurality of videos may also be used as a target video to be displayed; in other embodiments, the target video may also be obtained according to a video search condition of the user, where the video search condition includes information such as a video source, a video name, and the like. The above is merely an exemplary illustration, and the embodiment of the present disclosure does not limit the specific manner of acquiring the target video to be displayed.
The target video acquired by the embodiment of the present disclosure is a cuttable video, and specifically, the content of the video may be cut when playing, for example, the edge area of one or more of the four sides of the top, bottom, left, and right of the video may be cut within a certain range, that is, the cut video content may not be displayed when playing. It should be noted that the above "cropping" is merely a popular expression for easy understanding, and the cropped video content is not displayed substantially. In some embodiments, in a case where the target video is determined to be cuttable (that is, the target video is determined to contain content that is not necessarily displayed), a file parameter of the target video may be retrieved, and a cuttable range of the target video may be extracted from the file parameter; for example, a designated field in a header file of the target video carries a tailorable range, and the electronic device can extract the tailorable range from the designated field; in other embodiments, the tailorable range of the target video may be obtained from the acquisition source of the target video, for example, different video producers may define different tailorable ranges, and the tailorable range of the video may be directly known from the acquisition source of the target video. In other embodiments, the type of the video can be detected, and the range of the video to be cropped can be determined according to the type of the video; the video types such as live lecture videos, movies, fantasy and the like can be preset as the allowable range of different video types, and the allowable range of the target video is the corresponding range of the type to which the target video belongs. If the target video is not cuttable, the cuttable range is 0.
In some embodiments, the tailorable range may be characterized in terms of a percentage of tailorable area to total area, such as including: a first percentage between a width of the lateral croppeable region and a width of the target video; and/or a second percentage between the height of the vertically croppeable region and the height of the target video. In some specific embodiments, when the width value of the target video is greater than the height value, the target video contains a horizontal cropped area, and the cropped range of the target video includes a first percentage; when the width value of the target video is smaller than the height value, the target video contains a vertical tailorable area, and the tailorable range of the target video comprises a second percentage. The first percentage and the second percentage may be, for example, 5%, 7%, 10%, etc., and may be determined according to actual circumstances, and the range of the percentages is not limited herein. In practical applications, when the tailorable area is multiple, the first percentage and the second percentage may be total percentages, or may be individual percentages of each tailorable area, and the specific setting may be flexible. For ease of understanding, reference may be made to a schematic diagram of a tailorable video shown in fig. 3, which schematically illustrates a horizontal tailorable area in the case of a landscape screen and a vertical tailorable area in the case of a portrait screen, where the horizontal tailorable area in the case of the landscape screen includes both left and right sides (two in total) and the vertical tailorable area in the case of the portrait screen includes both upper and lower sides (two in total). In practical application, the cutting areas can be set up vertically and horizontally, and can be determined according to practical conditions.
Step S204, size parameters of a display screen for displaying the target video are acquired.
In practical applications, the size parameter may comprise a width value and a height value, i.e. the size parameter of the display screen comprises a width value and a height value of the display screen. The display screen for displaying the target video is a display screen of an electronic device executing the video display method, and the display screen can be directly embedded in the electronic device, such as a mobile phone, a computer, a television and the like; the display screen may also be an external display screen controlled by the electronic device in a wired/wireless manner, which is not limited herein.
Step S206, determining an initial size parameter of the texture view according to the initial size parameter of the target video and the size parameter of the display screen; the initial size parameter of the texture view is proportional to the initial size parameter of the target video, and the initial size parameter of the texture view is larger than the size parameter of the display screen.
When the target video is acquired, the initial size parameters of the target video, such as the initial width value and the initial height value of the target video, can be obtained. In the embodiment of the present disclosure, the initial size parameter of the texture view is not default to be the same as the size parameter of the display screen, or adjusted to be the same as the initial size parameter of the target video, that is, not determined by the initial size parameter of the target video, but is determined based on the initial size parameter of the target video and the size parameter of the display screen, and the finally determined initial size parameter of the texture view is larger than the size parameter of the display screen and is proportional to the initial size parameter of the target video. Specifically, if the initial width value of the texture view is proportional to the initial width value of the target video by a certain ratio X, the initial height value of the texture view is proportional to the initial height value of the target video by the certain ratio X, and neither the initial height value nor the initial width value of the texture view is smaller than the corresponding value of the display screen, the initial size parameter of the texture view may be considered to be larger than the size parameter of the display screen. In some embodiments, the initial height value of the texture view is greater than the height value of the display screen, and the initial width value of the texture view is equal to the width value of the display screen; in other embodiments, the initial width value of the texture view is greater than the width value of the display screen, and the initial height value of the texture view is equal to the height value of the display screen; in other embodiments, the initial width value of the texture view is greater than the width value of the display screen and the initial height value of the texture view is greater than the height value of the display screen. All three ways can be regarded as that the initial size parameter of the texture view is larger than the size parameter of the display screen.
In step S208, the target video is adjusted to be the same as the initial size parameter of the texture view. Since the initial size parameter of the texture view is proportional to the initial size parameter of the target video, and the texture view is used for carrying the target video for playing and displaying, the target video needs to be adjusted to be the same as the initial size parameter of the texture view according to the ratio, in other words, the target video is adjusted to be the same as the initial size parameter of the texture view, that is, the initial size parameter of the target video is adjusted to be the same as the actual size parameter of the texture view based on the ratio between the initial size parameter of the texture view and the initial size parameter of the target video.
In step S210, the non-cuttable content of the adjusted target video is determined based on the cuttable range.
Since the target video is adjusted to be the same as the initial size parameter of the texture view in the above steps, the actual size parameter of the target video is greater than the size parameter of the display screen at this time, and thus, some video content cannot be displayed on the display screen. Since the target video is a tailorable video and the tailorable range of the target video is obtained, the embodiments of the present disclosure may further determine the non-tailorable content of the adjusted target video based on the tailorable range, so as to subsequently crop the video (in other words, may also be referred to as cropping a texture view for displaying the video), retain the non-tailorable content, and perform the cropping only within the range of the tailorable content.
In some embodiments, the tailorable content of the adjusted target video may be determined based on the actual size parameter and the tailorable range of the adjusted target video; and taking the contents except the tailorable contents in the adjusted target video as the non-tailorable contents. Furthermore, it is also possible to determine the non-cuttable range based on the cuttable range of the target video, and then calculate the non-cuttable content of the adjusted target video based on the non-cuttable range.
Step S212, adjusting a view visible area of the texture view displayed on the display screen according to the initial size parameter of the texture view, the size parameter of the display screen and the uncut content, and displaying the local content in the adjusted target video through the view visible area; the local content at least comprises non-cuttable content, and the size parameter of the view visible area is consistent with that of the display screen.
The above-mentioned manner of "adjusting the view visible region of the texture view displayed on the display screen" may also be understood as "cutting the texture view", and similarly, the "cutting" is only a popular expression for easy understanding, and the cut-out portion of the texture view is substantially only not displayed on the display screen, that is, the view invisible region, and accordingly, the video displayed through the view invisible region cannot be seen by the user, that is, cannot be displayed on the display screen. In some embodiments, whether the view visible area of the texture view displayed on the display screen can be adjusted (i.e., whether the texture view can be cropped) may be determined according to the initial size parameter of the texture view, the size parameter of the display screen, and the non-cropped content, and in the case that it is determined that the view visible area of the texture view displayed on the display screen can be adjusted (i.e., in the case that it is determined that the cropping can be performed), the view visible area of the texture view displayed on the display screen is adjusted again, so that the size parameter of the view visible area is consistent with the size parameter of the display screen (i.e., the texture view is cropped to be the same as the size of the display screen). The view visible area is equivalent to the clipped texture view, the clipped texture view can be directly displayed on the display screen, and the size parameter of the view visible area is equivalent to the actual size parameter of the clipped texture view.
One way to determine whether the texture view can be adjusted to the view visible area displayed on the display screen is as follows: the non-tailorable content of the target video can be completely displayed in the view visible area; in other words, one way to determine whether a texture view can be cropped is: the non-cropped content of the target video may be displayed in its entirety in the cropped texture view.
According to the method, the non-cuttable content of the adjusted video is determined, the view visible area of the texture view with the size larger than that of the display screen is adjusted, the size parameter of the view visible area is consistent with that of the display screen, the non-cuttable content of the adjusted video can be completely displayed in the view visible area, full-screen display is well achieved on the basis that the non-cuttable content of the video can be completely displayed (namely the overall quality of the video is not affected), the video and the display screen are well adapted, and the display effect of the video and the watching experience of a user are comprehensively improved.
For convenience of understanding, the embodiment of the present disclosure provides a specific implementation manner of the step S206, that is, determining the initial size parameter of the texture view according to the initial size parameter of the target video and the size parameter of the display screen may be implemented by referring to the following steps a to c:
step a, determining the display mode of the display screen.
In some embodiments, the display mode of the display screen may include a landscape screen display or a portrait screen display. For example, the display mode of the display screen may be determined according to the current state of the display screen. For example, in response to determining that the width of the display screen is not less than the height thereof in the current state, the display mode of the display screen is determined to be landscape display, and in response to determining that the width of the display screen is less than the height thereof in the current state, the display mode of the display screen is determined to be portrait display. For example, for electronic devices such as notebook computers and televisions, the display mode is usually fixed as the horizontal screen display, while for electronic devices such as mobile phones and tablet computers, the display mode is not fixed, so it is necessary to determine whether the display screen is currently in the horizontal screen state or the vertical screen state according to the current width and height of the display screen.
And b, determining the proportion between the initial size parameter of the texture view and the initial size parameter of the target video according to the initial size parameter of the target video, the size parameter of the display screen and the display mode. The ratio between the initial size parameter of the texture view and the initial size parameter of the target video is directly related to the initial size parameter of the target video and the display mode, and in particular, the embodiment of the present disclosure provides a way to determine the ratio, which can be seen as follows:
and in response to the fact that the display mode is determined to be the landscape display mode, determining a first ratio between the height value of the display screen and the initial height value of the target video, and taking the first ratio as a ratio between the initial size parameter of the texture view and the initial size parameter of the target video. That is, if the display is a landscape display, the situation that the landscape cannot be fully occupied easily occurs, and therefore, the ratio (first ratio) corresponding to the height value is preferably used as the ratio between the initial size parameter of the texture view and the initial size parameter of the target video, that is, the ratio between the initial height value of the texture view and the initial height value of the target video is the first ratio, and the ratio between the initial width value of the texture view and the initial width value of the target video is also the first ratio.
And in response to the fact that the display mode is determined to be vertical screen display, determining a second ratio between the width value of the display screen and the initial width value of the target video, and taking the second ratio as a ratio between the initial size parameter of the texture view and the initial size parameter of the target video. That is, if the display is a portrait display, the situation that the vertical direction cannot be occupied easily occurs, so that the ratio (second ratio) corresponding to the width value is preferentially taken as the ratio between the initial size parameter of the texture view and the initial size parameter of the target video, that is, the ratio between the initial width value of the texture view and the initial width value of the target video is the second ratio, and the ratio between the initial height value of the texture view and the initial height value of the target video is also the second ratio.
And c, determining the initial size parameter of the texture view according to the proportion and the initial size parameter of the target video.
In specific implementation, the initial width value of the target video can be multiplied by the proportion to obtain a width product value; multiplying the initial height value of the target video by the proportion to obtain a height product value; the width product value and the height product value are used as initial size parameters of the texture view. In some embodiments, if the ratio is the first ratio, the initial height of the texture view is the same as the height of the display screen, and the initial width of the texture view is greater than the width of the display screen; if the ratio is the second ratio, the initial width value of the texture view is the same as the width value of the display screen, and the initial height value of the texture view is greater than the height value of the display screen.
In a specific embodiment, it may be determined that the uncut content can be displayed on the display screen in response to the size parameter of the display screen and the size parameter of the uncut content, and the view visible area of the texture view displayed on the display screen may be continuously adjusted according to the initial size parameter of the texture view and the size parameter of the display screen, so that the size parameter of the view visible area is consistent with the size parameter of the display screen. That is, firstly, judging whether the uncut contents can be displayed on the display screen according to the size parameters of the display screen and the size parameters of the uncut contents; if so, clipping the texture view according to the initial size parameter of the texture view and the size parameter of the display screen so as to enable the actual size parameter of the clipped texture view to be consistent with the size parameter of the display screen. If not, the texture view is not clipped, and the length and the width of the texture view are proportionally adjusted by adopting an equal ratio adjusting strategy in the related technology until the texture view can be completely displayed in the display screen (but cannot be full). The embodiment of the disclosure adjusts the view visible area of the texture view displayed on the display screen (i.e., the texture view is cropped) only when it is ensured that the non-cropped content can be displayed on the display screen, so as to prevent the video quality from being affected because the non-cropped content cannot be displayed in the view visible area (i.e., is cropped).
On the basis of the foregoing video display method, the embodiment of the present disclosure further provides a video display method, and referring to a flow chart of a video display method shown in fig. 4, for ease of understanding, in the method, "a video allowing a part of content not to be displayed on a display screen" is simply referred to as "a croppeable video", and "a process of adjusting a view visible region where a texture view is displayed on a display screen" is simply referred to as "cropping a texture view". As shown in fig. 4, the method mainly includes the following steps S402 to S430:
step S402, acquiring video information of a target video to be displayed; the video information includes one or more of a size parameter, a video source, and a video type. The video types can be various video types such as web lessons, movies, fantasy and the like.
Step S404, judging whether the target video is a cuttable video according to the video information; if yes, go to step S406, and if no, go to step S430.
In some embodiments, a video producer may produce video at a particular scale in conjunction with the size of the various display screens already in the market, such as a video with size parameters (which may also be characterized in terms of resolution) of 1700X 720: wherein 1700 is characterized by width and 720 is characterized by height; alternatively, the size parameter of the video is 720X 1700: among them, 720 is wide and 1700 is high. Such a tailor-made-scale video may have a longer width/height, which is convenient to leave tailorable ranges on the left and right sides for landscape screens and on the top and bottom sides for portrait screens. The size of the video which can be cut can be stored in advance, and then whether the video can be cut or not is judged based on the size of the obtained target video.
In some embodiments, whether the video is cuttable or not can also be determined according to the video source (video producer), and various video source identifiers for producing the cuttable video can be stored in advance and then whether the video is cuttable or not can be determined according to the source of the target video. For example, videos produced by the video source M are all cuttable videos, and if the acquired target video is from M, the target video can be directly determined to be a cuttable video.
In some embodiments, whether the video is cuttable or not can also be judged according to the video type. For example, the content of the web lesson video is mainly concentrated in the central core area, and the periphery is mostly white walls, so that the web lesson video can be confirmed to be a clip video. In practical application, various types of videos can be researched and counted, the tailorable range corresponding to each video type is analyzed, and the tailorable range of some video types is 0, namely that the video types cannot be tailorable; the range of the cuttable range of some video types is 3 percent, namely, the cuttable video and the like; and then, the range which can be cut and corresponds to each video type is stored in advance, so that the subsequent judgment is facilitated.
In practical applications, one or more of the above manners may be adopted to determine whether the target video is a cropped video.
In step S406, the initial width and initial height of the target video, and the width and height of the display screen are obtained.
Step S408, judging the display mode of the display screen according to the width and the height of the display screen; if the display mode is horizontal screen display, executing the step S410-the step S418; if the display mode is vertical screen display, executing steps S420-S428.
Step S410, a first ratio between the height of the display screen and the initial landscape display height of the target video is calculated.
In the landscape display, it is assumed that the initial size parameter of the target video is 1700X 720, that is, the initial width is 1700 and the initial height is 720; the size parameters of the display screen are as follows: 2340X 1080; that is, the width is 2340 and the height is 1080. At this time, a first ratio between the height of the display screen and the initial height of the target video is: 1080/720= 1.5.
Step S412, calculating to obtain an initial height value of the texture view based on the first ratio and the initial height value of the target video; and calculating to obtain an initial width value of the texture view based on the first ratio and the initial width value of the target video.
With the first ratio 1.5 as a reference, the initial height value of the texture view is: 1.5 × 720=1080, the initial width value of the texture view is: 1.5 x1700 = 2550.
Step S414, obtaining the width cuttable range of the target video, and calculating the maximum cuttable width range based on the initial width value of the texture view and the width cuttable range.
Assuming that the obtained width cuttable range of the target video is 10% in the horizontal direction, that is, the width of the horizontal cuttable region occupies 10% of the width of the target video, optionally, the left side cuttable region of the target video occupies 5% of the width of the target video, and the right side cuttable region occupies 5% of the width of the target video, that is, the cuttable regions are uniformly set according to the left and right sides. The maximum cuttable width range is the initial width value of the texture view. At this time, the maximum cuttable width range is: 2550 × 10% = 255; alternatively, it can also be calculated as: the maximum tailorable width range on the left side is: 2550 × 5% =127.5, the maximum cuttable width range on the right side is: 2550 x 5% =127.5, the maximum range of total tailorable widths is still 127.5+127.5= 255. It can be understood that the initial size parameter of the texture view is determined based on the initial size parameter of the target video and is proportional to the initial size parameter of the target video (1.5 above), and the texture view is used for carrying the target video, i.e. for displaying the target video, so the actual size of the target video is also adjusted to be consistent with the initial size parameter of the texture view, i.e. the actual size parameter of the target video is also: 2550X 1080. The maximum cuttable width range is the maximum cuttable width range of the texture view and is also the maximum cuttable width range of the target video. For ease of understanding, reference may also be made to a video display diagram as shown in FIG. 5, where for simplicity of illustration, the texture view and the height value of the display are not identified in FIG. 5, and as can be seen from the above calculations, the initial height of the texture view is the same as the height of the display.
Step S416, calculating the width of the video uncut content based on the maximum cuttable width range, and judging whether the width of the uncut content is greater than the width of the display screen; if not, step S418 is performed, and if yes, step S430 is performed.
The actual width of the target video (also the initial width of the texture view) is 2550, the maximum cuttable width range is 255, so the width of the non-cuttable content (also referred to as core content) is 2550-.
Step S418, clipping the left and right sides of the texture view until the actual width value of the texture view is equal to the width value of the display screen, and displaying the local content of the target video through the clipped texture view, where the local content at least includes the non-clipping content. The process of cutting the left side and the right side of the texture view is equivalent to the process of transversely adjusting the view visible area displayed on the display screen by the texture view, the width of the view visible area is directly influenced, the actual width value of the texture view is also the width value of the view visible area, and the left side area and the right side area of the cut texture view are equivalent to the transverse invisible area of the view.
The initial width of the texture view is 2550 and the width of the display screen is 2340, so the texture view only needs to be cropped to have a width of: 2550-; in specific implementation, the left side and the right side can be respectively cut, each side is cut 210/2=105, the actual width value of the texture view after cutting is the same as the width value of the display screen, and in addition, the actual height value of the texture view is still 1080, which is the same as the height value of the display screen, so that the texture view after cutting can exactly cover the display screen and contains the core content of the target video. For ease of understanding, with further reference to fig. 6 on the basis of fig. 5, fig. 6 illustrates the final cropping width of the texture view, the left actual cropping 105, and the right actual cropping 105, the cropped texture view having a size that is consistent with the display screen size, and the texture view completely overlaying the display screen.
In step S420, a second ratio between the width of the display screen and the initial width of the target video is calculated.
In the vertical screen display, the initial size parameter of the target video is 720X1700, that is, the initial width is 720 and the initial height is 1700; the size parameters of the display screen are as follows: 1080X 2340; that is, 1080 for width and 2340 for height. At this time, a second ratio between the width of the display screen and the initial width of the target video is: 1080/720= 1.5.
Step S422, calculating to obtain an initial width value of the texture view based on the second ratio and the initial width value of the target video; and calculating to obtain an initial height value of the texture view based on the second ratio and the initial height value of the target video.
With the second ratio of 1.5 as a reference, the initial width value of the texture view is: 1.5 × 720=1080, the initial height value of the texture view is: 1.5 x1700 = 2550.
Step S424, a height cuttable range of the target video is obtained, and a maximum cuttable height range is calculated based on the initial height value of the texture view and the height cuttable range.
Assuming that the height cuttable range of the obtained target video is vertical 10%, that is, the height of the vertical cuttable region occupies 10% of the height of the target video, optionally, the upper side cuttable region of the target video occupies 5% of the height of the target video, and the lower side cuttable region occupies 5% of the height of the target video, that is, the cuttable regions are uniformly arranged according to the upper side and the lower side. The maximum cuttable height range is the initial height value of the texture view. At this time, the maximum cuttable height range is: 2550 × 10% = 255; alternatively, it can also be calculated as: the maximum cuttable height range of the upper side is: 2550 × 5% =127.5, the maximum cuttable height range on the underside is: 2550 x 5% =127.5, the maximum tailorable total height range is still 127.5+127.5= 255. It can be understood that the initial size parameter of the texture view is determined based on the initial size parameter of the target video and is proportional to the initial size parameter of the target video (1.5 above), and the texture view is used for carrying the target video, i.e. for displaying the target video, so the actual size of the target video is also adjusted to be consistent with the initial size parameter of the texture view, i.e. the actual size parameter of the target video is also: 1080X 2550. The maximum cuttable height range is the maximum cuttable height range of the texture view and is also the maximum cuttable height range of the target video.
Step S426, calculating the height of the video uncut content based on the maximum cuttable height range, and judging whether the height of the uncut content is greater than the height of the display screen; if not, step 428 is performed, and if so, step 430 is performed.
The actual height of the target video (also the initial height of the texture view) is 2550, and the maximum cuttable height range is 255, so the height of the non-cuttable content (also referred to as core content) is 2550 and 255=2295, and 2295 is smaller than 2340 (the height of the display screen), which means that the display screen can completely display the non-cuttable content of the target video, so that the non-cuttable content meets the cutting condition, and the problem of cutting off the core content does not occur, at this time, step S428 can be executed to cut the upper and lower sides of the texture view, otherwise, the cutting operation is not executed again, so as to prevent the core content of the video from not being completely displayed on the display screen.
In step S428, the upper and lower sides of the texture view are clipped until the actual height value of the texture view is equal to the height value of the display screen, and the clipped texture view displays the local content of the target video, where the local content at least includes the non-clip-able content. The process of cutting the upper side and the lower side of the texture view is equivalent to the process of vertically adjusting the view visible area displayed on the display screen by the texture view, the height of the view visible area is directly influenced, the actual height value of the texture view is also the height value of the view visible area, and the upper side area and the lower side area of the cut texture view are equivalent to the vertical invisible area of the view.
The initial height of the texture view is 2550 and the height value of the display screen is 2340, so the texture view only needs to be cropped to a height of: 2550-; in specific implementation, the upper side and the lower side can be respectively cut, each side is cut 210/2=105, the actual height value of the texture view after cutting is the same as the height value of the display screen, and in addition, the actual width value of the texture view is still 1080, which is the same as the width value of the display screen, so that the texture view after cutting can exactly cover the display screen and contains the core content of the target video.
Step S430, an geometric adjustment strategy is performed on the texture view to completely display the texture view on the display screen, and the target video is displayed through the texture view after the geometric adjustment strategy is performed. That is, if it is determined that the clipping condition is not satisfied, the geometric adjustment processing can be directly performed according to the related art, and the clipping operation is not performed any more, thereby preventing the core content from being clipped to affect the video quality.
The geometric adjustment strategy can be implemented by referring to the related content of the aforementioned geometric adjustment strategy in the embodiments of the present disclosure, and the specific implementation process can refer to the related technology, which is not described herein again.
For easy understanding, the embodiment of the present disclosure provides a case that the cropping condition is not satisfied, that is, the non-cropped content cannot be completely displayed on the display screen, which is described by taking a horizontal screen as an example, and referring to another video display diagram shown in fig. 7, an initial size parameter of the target video is 1700X 720, and a size parameter of the display screen is: 2340X 1080, the first ratio between the height of the display screen and the initial height of the target video is: 1080/720=1.5, the initial height value of the texture view is: 1.5 × 720=1080, the initial width value of the texture view is: 1.5 × 1700=2550, the range of the obtained target video that can be cropped in width is horizontal 4%, where the left region of the target video that can be cropped accounts for 2% of the width of the target video, the right region that can be cropped accounts for 2% of the width of the target video, and the range of the left maximum cropped width is: 2550 × 2% =51, the maximum range of tailorable widths on the right side is: 2550 × 2% =51, the maximum cuttable total width range is still 51 +51=102, the width of the non-cuttable content (which may also be referred to as core content) is 2550 + 102=2448, and 2448 is greater than 2340 (the width of the display screen), which indicates that the display screen cannot completely display the non-cuttable content of the target video, and thus the cutting condition is not met. At this time, the texture view is not cut any more, and the geometric adjustment strategy of the related technology is directly adopted for realization.
As can be seen from comparison between fig. 5 and fig. 7, the larger the tailorable range of the target video is, the less the non-tailorable content is, and the easier the tailoring condition is to be satisfied, that is, the higher the probability that the display screen can completely contain the non-tailorable content is.
By the video display method provided by the embodiment of the disclosure, the problem that the electronic equipment cannot play the video in a full screen mode can be effectively solved, and the influence on the watching experience of a user due to the fact that the black background is filled because the video cannot completely fill the display screen of the electronic equipment is avoided. The method has better universality, particularly can solve the problem that the video commonly existing in the current mobile phone can not be displayed in a full screen, the screen width-height ratio of the full-screen mobile phone in the prior art is mostly 18:9, the size ratio causes that most of the video can not occupy the full screen, except the full-screen mobile phone, the screen ratios of other most of the mobile phones in the market have certain differences, such as the screen width-height ratio of some mobile phones is 13:6, the screen width-height ratio of some mobile phones is 19:9 and the like, which are only simple indications, in practical application, the screen width-height ratios of the mobile phones are very various, the video display method provided by the embodiment of the disclosure can obtain the clipping range of the video to be displayed, set the initial size of the texture view to be larger than the size of the display screen, and when the clipping condition is judged to be met (the non-clipping content in the video can be completely displayed on the display screen), the texture view can be cut, and the cut texture view is consistent with the display screen in size, so that full-screen display is better realized on the basis of ensuring that the uncut content in the video can be completely displayed (namely the whole quality of the video is not affected), and the display effect of the video and the watching experience of a user are comprehensively improved.
In addition, the above manner provided by the embodiment of the present disclosure can not only effectively implement adaptation between videos of various sizes and display screens of various sizes, so that the videos can be displayed in full screen better, but also for videos of types such as online education videos (web lesson videos), core content (blackboard writing) in the videos can be displayed in the display screen more clearly, and peripheral useless content (such as white walls around black borders) can be cut off, so that a user can more intuitively grasp the core of the video, and viewing experience of the user is also better improved.
Corresponding to the foregoing video display method, an embodiment of the present disclosure further provides a video display apparatus, and fig. 8 is a schematic structural diagram of a video display apparatus provided in an embodiment of the present disclosure, which may be implemented by software and/or hardware and may be generally integrated in an electronic device. As shown in fig. 8, the video display apparatus 800 includes:
a video obtaining module 802, configured to obtain a target video and a tailorable range of the target video;
a size obtaining module 804, configured to obtain a size parameter of a display screen for displaying a target video;
a view determining module 806, configured to determine an initial size parameter of the texture view according to the initial size parameter of the target video and the size parameter of the display screen, where the initial size parameter of the texture view is proportional to the initial size parameter of the target video, and the initial size parameter of the texture view is larger than the size parameter of the display screen;
a video adjustment module 808, configured to adjust the target video to be the same as the initial size parameter of the texture view;
a content determining module 810, configured to determine non-tailorable content of the adjusted target video based on the tailorable range;
a display module 812, configured to adjust a view visible region of the texture view displayed on the display screen according to the initial size parameter of the texture view, the size parameter of the display screen, and the non-cuttable content, and display a local content in the adjusted target video through the view visible region; the local content at least comprises non-cuttable content, and the actual size parameter of the view visible area is consistent with the size parameter of the display screen.
According to the method, the non-cuttable content of the adjusted video is determined, the view visible area of the texture view with the size larger than that of the display screen is adjusted, the size parameter of the view visible area is consistent with that of the display screen, the non-cuttable content in the adjusted video can be completely displayed in the view visible area, full-screen display is better achieved on the basis that the non-cuttable content in the video can be completely displayed (namely the whole quality of the video is not affected), and the display effect of the video and the watching experience of a user are comprehensively improved.
In some embodiments, the view determination module 806 is further configured to: determining a display mode of the display screen, wherein the display mode comprises horizontal screen display or vertical screen display; determining the proportion between the initial size parameter of the texture view and the initial size parameter of the target video according to the initial size parameter of the target video, the size parameter of the display screen and the display mode; and determining an initial size parameter of the texture view according to the proportion and the initial size parameter of the target video.
In some embodiments, the dimensional parameters include a width value and a height value; a view determination module 806 further configured to: in response to determining that the display mode is landscape display, determining a first ratio between the height value of the display screen and the initial height value of the target video, and taking the first ratio as a ratio between an initial size parameter of the texture view and an initial size parameter of the target video; and in response to the fact that the display mode is vertical screen display, determining a second ratio between the width value of the display screen and the initial width value of the target video, and taking the second ratio as a ratio between the initial size parameter of the texture view and the initial size parameter of the target video.
In some embodiments, the dimensional parameters include a width value and a height value; a view determination module 806 further configured to: multiplying the initial width value of the target video by the ratio to obtain a width product value; multiplying the initial height value of the target video by the ratio to obtain a height product value; and taking the width product value and the height product value as initial size parameters of the texture view.
In some implementations, the content determination module 810 is further to: determining the adjustable tailorable content of the target video based on the adjusted actual size parameter of the target video and the adjustable tailorable range; and taking the content except the tailorable content in the adjusted target video as the non-tailorable content.
In some embodiments, the display module 812 is further configured to: according to the size parameter of the display screen and the size parameter of the non-tailorable content, responding to the size parameter of the display screen and the size parameter of the non-tailorable content, determining that the non-tailorable content can be displayed on the display screen, and according to the initial size parameter of the texture view and the size parameter of the display screen, adjusting a view visible area displayed on the display screen by the texture view, so that the size parameter of the view visible area is consistent with the size parameter of the display screen.
In some embodiments, the tailorable range of the target video is obtained by one of: calling file parameters of the target video, and extracting a tailorable range of the target video from the file parameters; obtaining a tailorable range of the target video through an acquisition source of the target video; and obtaining the tailorable range of the target video according to the video type of the target video.
In some embodiments, the tailorable range comprises: a first percentage between a width of a lateral croppeable region and a width of the target video; and/or a second percentage between a height of a vertically croppeable area and a height of the target video.
In some implementations, when the width value of the target video is greater than the height value, the target video includes a horizontally cropped area, the cropped range of the target video including the first percentage; when the width value of the target video is less than the height value, the target video includes a vertically croppeable area, and the range of the target video that can be cropped includes the second percentage.
The video display device provided by the embodiment of the disclosure can execute the video display method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
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 apparatus embodiments may refer to corresponding processes in the method embodiments, and are not described herein again.
An exemplary embodiment of the present disclosure also provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, is for causing the electronic device to perform a method according to an embodiment of the disclosure.
The disclosed exemplary embodiments also provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is adapted to cause the computer to perform a method according to an embodiment of the present disclosure.
The exemplary embodiments of the present disclosure also provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor of a computer, is adapted to cause the computer to perform a method according to an embodiment of the present disclosure.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform a video display method provided by embodiments of the present disclosure. The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
Referring to fig. 8, a block diagram of a structure of an electronic device 800, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the electronic apparatus 900 includes a computing unit 901, which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The calculation unit 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
A number of components in the electronic device 900 are connected to the I/O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the electronic device 900, and the input unit 906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. Output unit 907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. Storage unit 908 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 909 allows the electronic device 900 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and/or chipsets, such as bluetooth (TM) devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 901 performs the respective methods and processes described above. For example, in some embodiments, the video display method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 900 via the ROM 902 and/or the communication unit 909. In some embodiments, the computing unit 901 may be configured to perform the video display method in any other suitable way (e.g., by means of firmware).
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes 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 codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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.
As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A video display method, comprising:
acquiring a target video and a tailorable range of the target video; wherein the tailorable range of the target video is obtained by one of the following modes: calling file parameters of the target video, and extracting a tailorable range of the target video from the file parameters; obtaining a tailorable range of the target video through an acquisition source of the target video; obtaining a tailorable range of the target video according to the video type of the target video;
acquiring a size parameter of a display screen for displaying the target video;
determining an initial size parameter of a texture view according to the initial size parameter of the target video and the size parameter of the display screen, wherein the initial size parameter of the texture view is larger than the size parameter of the display screen;
adjusting the target video to be the same as the initial size parameter of the texture view;
determining the non-tailorable content of the adjusted target video based on the tailorable range;
according to the initial size parameter of the texture view, the size parameter of the display screen and the non-cuttable content, adjusting a view visible area of the texture view displayed on the display screen, and displaying the adjusted local content in the target video through the view visible area; wherein the local content at least comprises the non-cuttable content, and the size parameter of the view visible area is consistent with the size parameter of the display screen;
wherein the determining of the adjusted non-tailorable content of the target video based on the tailorable range comprises:
determining the adjustable tailorable content of the target video based on the adjusted actual size parameter of the target video and the adjustable tailorable range;
and taking the content except the tailorable content in the adjusted target video as the non-tailorable content.
2. The video display method of claim 1, wherein said determining an initial size parameter of a texture view based on an initial size parameter of the target video and a size parameter of the display screen comprises:
determining a display mode of the display screen, wherein the display mode comprises horizontal screen display or vertical screen display;
determining the proportion between the initial size parameter of the texture view and the initial size parameter of the target video according to the initial size parameter of the target video, the size parameter of the display screen and the display mode;
and determining an initial size parameter of the texture view according to the proportion and the initial size parameter of the target video.
3. The video display method of claim 2, wherein the size parameters include a width value and a height value;
and wherein the determining the ratio between the initial size parameter of the texture view and the initial size parameter of the target video according to the initial size parameter of the target video, the size parameter of the display screen, and the display manner comprises:
in response to determining that the display mode is landscape display, determining a first ratio between the height value of the display screen and the initial height value of the target video, and taking the first ratio as a ratio between an initial size parameter of the texture view and an initial size parameter of the target video;
and in response to the fact that the display mode is vertical screen display, determining a second ratio between the width value of the display screen and the initial width value of the target video, and taking the second ratio as a ratio between the initial size parameter of the texture view and the initial size parameter of the target video.
4. The video display method of claim 2, wherein the size parameters include a width value and a height value;
and wherein said determining an initial size parameter of the texture view based on the scale and an initial size parameter of the target video comprises:
multiplying the initial width value of the target video by the ratio to obtain a width product value;
multiplying the initial height value of the target video by the ratio to obtain a height product value;
and taking the width product value and the height product value as initial size parameters of the texture view.
5. The video display method of any of claims 1 to 4, wherein said adjusting the view visible area of the texture view presented on the display screen in accordance with the initial size parameter of the texture view, the size parameter of the display screen, and the non-croppeable content comprises:
in response to determining that the non-cropped content can be displayed on the display screen according to the size parameter of the display screen and the size parameter of the non-cropped content, adjusting the view visible area of the texture view displayed on the display screen according to the initial size parameter of the texture view and the size parameter of the display screen so that the size parameter of the view visible area is consistent with the size parameter of the display screen.
6. The video display method of claim 1, wherein the tailorable range comprises: a first percentage between a width of a lateral croppeable region and a width of the target video; and/or a second percentage between a height of a vertically croppeable area and a height of the target video.
7. The video display method according to claim 6,
if the width value of the target video is greater than the height value, the target video includes a horizontally croppeable region, a croppeable range of the target video including the first percentage;
if the width value of the target video is less than the height value, the target video includes a vertically croppeable region, and the range of the target video that can be cropped includes the second percentage.
8. A video display apparatus comprising:
the video acquisition module is used for acquiring a target video and a tailorable range of the target video; wherein the tailorable range of the target video is obtained by one of the following modes: calling file parameters of the target video, and extracting a tailorable range of the target video from the file parameters; obtaining a tailorable range of the target video through an acquisition source of the target video; obtaining a tailorable range of the target video according to the video type of the target video;
the size acquisition module is used for acquiring size parameters of a display screen for displaying the target video;
the view determining module is used for determining an initial size parameter of a texture view according to the initial size parameter of the target video and the size parameter of the display screen, wherein the initial size parameter of the texture view is larger than the size parameter of the display screen;
the video adjusting module is used for adjusting the target video to be the same as the initial size parameter of the texture view;
the content determining module is used for determining the non-cuttable content of the adjusted target video based on the cuttable range;
the display module is used for adjusting a view visible area displayed on the display screen by the texture view according to the initial size parameter of the texture view, the size parameter of the display screen and the non-cuttable content, and displaying the adjusted local content in the target video through the view visible area; wherein the local content at least comprises the non-cuttable content, and the size parameter of the view visible area is consistent with the size parameter of the display screen;
the content determination module is further to: determining the adjustable tailorable content of the target video based on the adjusted actual size parameter of the target video and the adjustable tailorable range; and taking the content except the tailorable content in the adjusted target video as the non-tailorable content.
9. An electronic device, comprising:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to carry out the video display method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program for executing the video display method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111212749.9A CN113660516B (en) | 2021-10-19 | 2021-10-19 | Video display method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111212749.9A CN113660516B (en) | 2021-10-19 | 2021-10-19 | Video display method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113660516A CN113660516A (en) | 2021-11-16 |
CN113660516B true CN113660516B (en) | 2022-01-25 |
Family
ID=78484209
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111212749.9A Active CN113660516B (en) | 2021-10-19 | 2021-10-19 | Video display method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113660516B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115348478B (en) * | 2022-07-25 | 2023-09-19 | 深圳市九洲电器有限公司 | Equipment interactive display method and device, electronic equipment and readable storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9442562B2 (en) * | 2011-05-27 | 2016-09-13 | Dolby Laboratories Licensing Corporation | Systems and methods of image processing that adjust for viewer position, screen size and viewing distance |
CN104301746A (en) * | 2013-07-18 | 2015-01-21 | 阿里巴巴集团控股有限公司 | Video file processing method, server and client |
WO2015015058A1 (en) * | 2013-07-31 | 2015-02-05 | Nokia Corporation | Method and apparatus for video coding and decoding |
CN105306997B (en) * | 2014-05-30 | 2018-12-14 | 广州市动景计算机科技有限公司 | Mobile terminal playing mode switching method and device |
TWI597655B (en) * | 2014-06-12 | 2017-09-01 | 蘋果公司 | Methods for multitasking on an electronic device with a touch-sensitive display,and a non-transitory computer readable storage medium |
CN106454407B (en) * | 2016-10-25 | 2020-03-06 | 广州华多网络科技有限公司 | Video live broadcasting method and device |
CN111050204A (en) * | 2019-12-27 | 2020-04-21 | 北京达佳互联信息技术有限公司 | Video clipping method and device, electronic equipment and storage medium |
CN111147911A (en) * | 2019-12-27 | 2020-05-12 | 北京达佳互联信息技术有限公司 | Video clipping method and device, electronic equipment and storage medium |
CN112423021B (en) * | 2020-11-18 | 2022-12-06 | 北京有竹居网络技术有限公司 | Video processing method and device, readable medium and electronic equipment |
-
2021
- 2021-10-19 CN CN202111212749.9A patent/CN113660516B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113660516A (en) | 2021-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102364443B1 (en) | Display apparatus for displaying and method thereof | |
US9892716B2 (en) | Image display program, image display method, and image display system | |
WO2017193576A1 (en) | Video resolution adaptation method and apparatus, and virtual reality terminal | |
CN106980510B (en) | Window self-adaption method and device of player | |
US9756282B2 (en) | Method and apparatus for processing a video signal for display | |
CN112181342B (en) | Display method, display device, electronic equipment and storage medium | |
KR101045589B1 (en) | Playback equipment for contents received over network and method thereof | |
US20140143691A1 (en) | User interface generating apparatus and associated method | |
EP3054423B1 (en) | Apparatus and method for processing animation | |
CN107103890B (en) | The method and apparatus of application is shown on fixed-direction display | |
WO2009088150A1 (en) | Image display controlling method and apparatus of mobile terminal | |
US20170161232A1 (en) | Method and electronic device for configuring a video player in a web page | |
JP2019532566A (en) | Video processing apparatus and recording medium | |
CN106303655A (en) | A kind of media content play cuing method and device | |
WO2023109404A1 (en) | Terminal display method and terminal display apparatus | |
CN113660516B (en) | Video display method, device, equipment and medium | |
CN103609135B (en) | Image output device, image output method and the method that image output is carried out using computer program | |
CN104462099B (en) | A kind of information processing method and electronic equipment | |
CN103164192A (en) | Individuation interface forming method and system for set top box | |
CN108132716A (en) | Method of adjustment, equipment and the computer readable storage medium of browse page | |
TW202013955A (en) | Method for dynamically adjusting clarity of image and image processing device using the same | |
TWI493443B (en) | Electronic apparatus and method of displaying application thereof | |
CN111010525B (en) | Method for dynamically adjusting image definition and image processing device thereof | |
JP6973567B2 (en) | Information processing equipment and programs | |
CN115396717B (en) | Display device and display image quality adjusting method |
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 |