CN113747226A - Video display method and device, electronic equipment and program product - Google Patents

Video display method and device, electronic equipment and program product Download PDF

Info

Publication number
CN113747226A
CN113747226A CN202111051873.1A CN202111051873A CN113747226A CN 113747226 A CN113747226 A CN 113747226A CN 202111051873 A CN202111051873 A CN 202111051873A CN 113747226 A CN113747226 A CN 113747226A
Authority
CN
China
Prior art keywords
area
video
played
terminal
aspect ratio
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.)
Granted
Application number
CN202111051873.1A
Other languages
Chinese (zh)
Other versions
CN113747226B (en
Inventor
高宇
王辉
付平非
王兆宇
王展
陈壬
王森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202111051873.1A priority Critical patent/CN113747226B/en
Publication of CN113747226A publication Critical patent/CN113747226A/en
Application granted granted Critical
Publication of CN113747226B publication Critical patent/CN113747226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows

Abstract

According to the video display method, the video display device, the electronic equipment and the program product, the video playing area of the terminal is determined; according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played; and displaying the processed video to be played in a video playing area of the terminal. Compared with the mode that the video is directly processed according to the video size in the prior art, the video playing area is determined firstly, and then the processing mode of the video is determined based on the playing area size and the video size, so that the display mode of the video can be flexibly adjusted, the phenomenon that the video content is cut or the area of a black area in the display area is too large is avoided when the aspect ratio of the video is very large or very small, and the display effect is improved.

Description

Video display method and device, electronic equipment and program product
Technical Field
The disclosed embodiments relate to the field of computers, and in particular, to a video display method, a video display device, an electronic device, and a program product.
Background
With the development of internet technology, users can browse multimedia contents including videos through multimedia applications.
In the prior art, in order to enable a user to obtain a better browsing experience, a multimedia application program fills or clips a video according to an aspect ratio of the video, so that the processed video can be displayed on a terminal screen.
However, for video, when the aspect ratio of video is very large or very small, the problems of clipping video content or too large area of "black left" area in the display area are easily caused by adopting the existing video processing and displaying mode, and the display effect is poor.
Disclosure of Invention
In view of the above problems, embodiments of the present disclosure provide a video display method, an apparatus, an electronic device, and a program product, so that a terminal can process and display a video in multiple ways according to a size of a playing area and a video size of the terminal.
In a first aspect, an embodiment of the present disclosure provides a video display method, including:
determining a video playing area of a terminal;
according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played;
and displaying the processed video to be played in a video playing area of the terminal.
In a second aspect, an embodiment of the present disclosure provides a video display apparatus, including:
the playing area determining module is used for determining a video playing area of the terminal;
the video processing module is used for performing filling processing and/or cutting processing on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played to obtain the processed video to be played;
and the display module is used for displaying the processed video to be played in a video playing area of the terminal.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and
a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of the first aspects.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of the first aspect is implemented.
In a fifth aspect, the present disclosure provides a computer program product including computer instructions that, when executed by a processor, implement the method of any one of the first aspect.
According to the video display method, the video display device, the electronic equipment and the program product, the video playing area of the terminal is determined; according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played; and displaying the processed video to be played in a video playing area of the terminal. Compared with the mode that the video is directly processed according to the video size in the prior art, the video playing area is determined firstly, and then the processing mode of the video is determined based on the playing area size and the video size, so that the display mode of the video can be flexibly adjusted, the phenomenon that the video content is cut or the area of a black area in the display area is too large is avoided when the aspect ratio of the video is very large or very small, and the display effect is improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic diagram of a first interface of a video display method in the prior art;
FIG. 2 is a schematic interface diagram of another video display method in the prior art;
FIG. 3 is a schematic diagram of a network architecture upon which the present disclosure is based;
fig. 4 is a schematic flowchart of a video display method according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart illustrating a process of determining a video playing area in a case where a virtual navigation bar is displayed on a terminal screen according to an embodiment of the present disclosure;
fig. 6 is a schematic area diagram of a first remaining area provided by an embodiment of the present disclosure;
fig. 7 is a schematic area diagram of a second remaining area provided by an embodiment of the present disclosure;
fig. 8 is a schematic area diagram of a third remaining area provided by an embodiment of the present disclosure;
fig. 9 is a schematic area diagram of a fourth remaining area provided by an embodiment of the present disclosure;
fig. 10 is a schematic flowchart of determining a video playing area in a case that a virtual navigation bar is not displayed on a terminal screen according to an embodiment of the present disclosure;
fig. 11 is a schematic area diagram of a fifth remaining area provided by an embodiment of the present disclosure;
fig. 12 is a schematic area diagram of a sixth remaining area provided by an embodiment of the present disclosure;
fig. 13 is a schematic area diagram of a seventh remaining area provided by the embodiment of the present disclosure;
fig. 14 is a schematic diagram of a first process of a video to be played according to an embodiment of the present disclosure;
fig. 15 is a schematic diagram of a second process of a video to be played according to an embodiment of the present disclosure;
fig. 16 is a schematic diagram of a third process of a video to be played according to an embodiment of the present disclosure;
fig. 17 is a block diagram of a video playing apparatus according to an embodiment of the present disclosure;
fig. 18 is a schematic diagram of a hardware structure of an electronic device according to the disclosed embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
With the development of internet technology, users can browse multimedia contents including videos through multimedia applications.
In the prior art, in order to enable a user to obtain a better browsing experience, a multimedia application program fills or clips a video according to an aspect ratio of the video, so that the processed video can be displayed on a terminal screen.
Specifically, the processing of video in the prior art can be determined by the size relationship between the video size, which generally refers to the aspect ratio of the video, and the standard size, which generally has an aspect ratio of 18:9 for terminal-based video.
For example, fig. 1 is an interface schematic diagram of a video presentation method in the prior art, as shown in fig. 1, a video size of a video may be represented by an aspect ratio, for example, in an original video 101, the aspect ratio of the video is 2:1, since the aspect ratio of the original video 101 is greater than that of a standard size, when the terminal 100 displays the original video 101, generally, content on left and right sides of the original video 101 is cropped, and black filling processing is performed on upper and lower ends of the original video 101 to obtain a processed video 102 as shown in fig. 1, and the processed video 102 is presented on a screen.
For example, fig. 2 is an interface schematic diagram of another video presentation method in the prior art, as shown in fig. 2, in an original video 201, the aspect ratio is 9: 21. Since the aspect ratio of the original video 201 is smaller than that of the standard size, when the terminal 200 displays the original video 201, the original video 201 is generally overlaid in the width direction, and the content on the left and right sides of the video is clipped to obtain the processed video 202 as shown in fig. 2, and the processed video 202 is displayed on the screen.
However, for video, when the aspect ratio of video is very large or very small, the problems of clipping video content or too large area of "black left" area in the display area are easily caused by adopting the existing video processing and displaying mode, and the display effect is poor.
To address such a problem, according to an embodiment of the present disclosure, by determining a video playing area of a terminal; according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played; and displaying the processed video to be played in a video playing area of the terminal. Compared with the mode that the video is directly processed according to the video size in the prior art, the video playing area is determined firstly, and then the processing mode of the video is determined based on the playing area size and the video size, so that the display mode of the video can be flexibly adjusted, the phenomenon that the video content is cut or the area of a black area in the display area is too large is avoided when the aspect ratio of the video is very large or very small, and the display effect is improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a network architecture based on the present disclosure, and the network architecture shown in fig. 3 may specifically include a user terminal 1 and a server 2.
The user terminal 1 may specifically be a hardware device such as a user mobile phone, a desktop computer, an intelligent home device, a tablet computer, and the like, which may be installed or bear an application program, and in addition, the video display apparatus provided in the present disclosure may specifically be integrated in the application program of the user terminal 1.
The server 2 may specifically be an independent server or a server cluster disposed in the cloud, and may be configured to provide corresponding application services and application support for the application program in the user terminal 1.
The video display method provided by the present disclosure is carried in the video display device of the user terminal 1 shown in fig. 3, the user terminal 1 can be connected to the server 2 through the network, and when the video content issued by the server 2 needs to be displayed in the application program, the video display device of the user terminal 1 processes the video to be played based on the video display method provided by the present disclosure, so as to provide the application program to display the processed video to be played.
Based on the foregoing network architecture, in a first aspect, referring to fig. 4, fig. 4 is a schematic flowchart of a video display method according to an embodiment of the present disclosure.
The video display method provided by the embodiment of the disclosure comprises the following steps:
step 401, determining a video playing area of the terminal.
Step 402, according to the area size of the video playing area and the video size of the video to be played, performing filling processing and/or clipping processing on the video of the video to be played to obtain a processed video to be played.
And 403, displaying the processed video to be played in a video playing area of the terminal.
It should be noted that the main execution body of the video presentation method provided by this example is the video presentation apparatus carried by the aforementioned user terminal. The video display device can be specifically integrated in the aforementioned multimedia application program, and when the multimedia application program needs to play a video to be played, the video display method provided by the present disclosure is executed, so that the multimedia application program can display the video to be played processed by the video display device.
Specifically, when the multimedia application program is triggered by the user and determines that the video is to be played, the video display apparatus starts to execute the video display method provided by the embodiment of the present disclosure.
Unlike the prior art, the way in which the multimedia application directly processes the video according to the video size is different, in this embodiment, the video display apparatus first needs to determine a video playing area that the terminal can use to play the video. The video playing area is the playing area which is closest to the standard video size based on a series of parameters such as a terminal model, a software system, application display configuration and the like.
And then, the video display device fills and/or cuts the video of the video to be played according to the area size of the video playing area and the video size of the video to be played to obtain the processed video to be played and displays the processed video to be played in the video playing area of the terminal.
In the embodiment of the present disclosure, since the video playing area determined first is the playing area with the size closest to that of the standard video, when the video to be played is processed subsequently according to the video playing area, the content of clipping the video to be played is the smallest.
Particularly, when the aspect ratio of the video to be played is large or small, the video content can not be excessively cut and the phenomenon that the area of a black area in a display area is too large can not occur by adopting the playing method provided by the embodiment, so that the overall display effect of the video is improved.
In order to better explain the video display method provided by the present disclosure, the video display method will be further explained with reference to the drawings.
Firstly, the present embodiment first briefly introduces the content that can be displayed on the display screen of the terminal:
illustratively, the top of the terminal screen displays a status bar area, and the status bar area generally displays conventional information such as date, time, signal strength, power and the like. Of course, the status bar area may be transparent or non-transparent.
Illustratively, after the terminal enters the APP application, a play navigation bar is also displayed at the bottom of the terminal screen. The user may control the currently playing video or obtain other information related to the currently playing video by triggering the components in the display area of the play navigation bar. Of course, the display area of the navigation bar may be transparent display or non-transparent display.
In addition to the above display contents, in the present embodiment, the playback device determines the video playback area based on the size of the terminal screen, the size of the status bar area of the terminal, and the size of the display area of the playback navigation bar.
In order to obtain a video playing area closer to the standard video size, the influence of the virtual navigation bar on the determination of the video playing area is also considered in the present embodiment.
The virtual navigation bar refers to a component set composed of at least one touch component, wherein a display area of the virtual navigation bar is generally arranged at the bottom end of a screen. The user can trigger at least one touch control component in the virtual navigation bar, so that the terminal can quickly execute some terminal functions, such as a home page returning function, a menu function, a backspacing function and the like.
Since the display area of the virtual navigation bar is generally non-transparent, the size of the display area of the virtual navigation bar needs to be taken into account when determining the video playing area.
When the virtual navigation bar is displayed on the terminal screen, the terminal firstly subtracts the remaining area of the terminal screen area after the display area of the virtual navigation bar, and determines whether the area meets the judgment condition that the aspect ratio is less than or equal to the preset aspect ratio threshold value, so as to perform subsequent processing according to the judgment result.
Fig. 5 is a schematic flowchart of determining a video playing area in a case where a virtual navigation bar is displayed on a terminal screen according to an embodiment of the present disclosure, and fig. 6 to 9 are schematic interface diagrams of remaining areas in a case where a virtual navigation bar is displayed on a terminal screen by a terminal, respectively.
As shown in fig. 5, in the case that a virtual navigation bar is displayed on the terminal screen, the determination of the video playing area may be based on the following steps:
step 501, judging whether the area aspect ratio of the first residual area is less than or equal to a preset aspect ratio threshold value; the first remaining area is an area remaining after the display area of the virtual navigation bar is subtracted from the screen area of the terminal;
if yes, the first remaining area 601 shown in fig. 6 is used as the video playing area in step 402 and step 403; if not, go to step 502.
Step 502, judging whether the area aspect ratio of the second remaining area is greater than or equal to a preset aspect ratio threshold value; the second remaining area is the area left by subtracting the status bar area of the terminal and the display area of the play navigation bar from the first remaining area;
if yes, the second remaining area 701 shown in fig. 7 is taken as the video playing area in step 402 and step 403; if not, go to step 503.
Step 503, subtracting a status bar area of the terminal from the first remaining area to obtain a third remaining area, and subtracting a display area of the play navigation bar from the first remaining area to obtain a fourth remaining area;
step 504, judging whether the length and width of the region of the third remaining region and the length and width of the region of the fourth remaining region are both smaller than a preset length and width ratio threshold value; if yes, the first remaining area 601 shown in fig. 6 is used as the video playing area in step 402 and step 403; if not, go to step 505.
And 505, determining the difference between the preset aspect ratio threshold and the area length and width of the third remaining area and the area aspect ratio of the fourth remaining area respectively, and taking the remaining area with the small difference as the video playing area.
When the difference between the preset aspect ratio threshold and the area length and width of the third remaining area is less than or equal to the difference between the preset aspect ratio threshold and the area aspect ratio of the fourth remaining area, the third remaining area 801 as shown in fig. 8 is used as the video playing area in step 402 and step 403.
And when the difference between the preset aspect ratio threshold and the area length and width of the fourth remaining area is smaller than the difference between the preset aspect ratio threshold and the area aspect ratio of the third remaining area, the fourth remaining area 901 as shown in fig. 9 is used as the video playing area in step 402 and step 403.
In an alternative embodiment, the above-mentioned preset aspect ratio threshold may be an aspect ratio of a standard video, such as 18:9 for example.
Further, fig. 6 is a schematic area diagram of a first remaining area provided in the present disclosure, and in fig. 6, an area obtained by subtracting the display area 602 of the virtual navigation bar from the screen area 600 of the terminal is the first remaining area 601. At this time, the video display apparatus determines the aspect ratio of the first remaining area 601, as shown in fig. 6 at 15.5:9, and then compares the aspect ratio of the first remaining area 601 with a preset aspect ratio threshold, as shown in fig. 16: 9.
As can be seen from step 501, when the aspect ratio of the first remaining area 601 in fig. 6 is less than or equal to the preset aspect ratio threshold, the first remaining area 601 should be the playing area closest to the preset aspect ratio threshold, and the first remaining area 601 will be the video playing area in step 402 and step 403.
Accordingly, fig. 7 is a schematic region diagram of the second remaining region according to the embodiment of the disclosure, in fig. 7, an aspect ratio of the first remaining region 601 'is 18.9:9, and the aspect ratio is greater than a preset aspect ratio threshold value 16:9, at this time, the audio playing apparatus subtracts the status bar region 603 of the terminal and the display region 604 of the play navigation bar from the first remaining region 601' to obtain the second remaining region 701, and performs the determination in step 502.
According to the above step 502, when the aspect ratio of the second remaining region 701, as shown in fig. 7, 18.5:9, is still greater than or equal to the preset aspect ratio threshold, the second remaining region 701 should be the playing region closest to the preset aspect ratio threshold, and the video display apparatus directly uses the second remaining region 701 as the video playing region in the steps 402 and 403.
Fig. 8 is a schematic region diagram of a third remaining region provided in the embodiment of the present disclosure, and fig. 9 is a schematic region diagram of a fourth remaining region provided in the embodiment of the present disclosure.
Different from fig. 7, when the aspect ratio 15:9 of the second remaining area 701 'is smaller than the preset aspect ratio threshold 16:9, the video playing apparatus will execute step 503, that is, subtract the status bar area 603 of the terminal from the first remaining area 601' to obtain a third remaining area 801; and a fourth remaining area 901 is obtained by subtracting the display area 604 of the play navigation bar from the first remaining area 601'.
In step 504, the video display apparatus determines whether the aspect ratio of the third remaining region and the aspect ratio of the fourth remaining region are both smaller than the preset aspect ratio threshold; if the aspect ratio of the third remaining area (not shown) is 14:9, and the aspect ratio of the fourth remaining area (not shown) is 13.5:9, it is known that the aspect ratios of the two remaining areas are both smaller than the preset aspect ratio threshold value 16:9, and in this case, in order to obtain a presentation area as large as possible for the video, the first remaining area 601' (with an aspect ratio of 18.9:9) shown in fig. 6 is used as the video playing area in step 402 and step 403 in this embodiment.
On the contrary, when there is a remaining area with an aspect ratio greater than or equal to the preset aspect ratio threshold in the aspect ratio of the third remaining area and the aspect ratio of the fourth remaining area, step 505 needs to be performed to determine a difference between the preset aspect ratio threshold and the area length and width of the third remaining area and a difference between the preset aspect ratio threshold and the area aspect ratio of the fourth remaining area, respectively, and take the remaining area with a small difference as the video playing area in step 402 and step 403.
Specifically, in the scenario of fig. 8, if the status bar area 603 of the terminal is subtracted from the first remaining area 601', the area aspect ratio of the third remaining area 801 is 17.8: 9; and the area aspect ratio of a fourth remaining area (not shown) obtained by subtracting the display area 604 of the play navigation bar from the first remaining area 601' is 17.5: 9, the difference between the area aspect ratio of 17.8:9 and the preset aspect ratio threshold of 16:9 of the third remaining area 801 is smaller by calculating the difference between the two areas and the preset aspect ratio threshold of 16: 9. The third remaining area 801 should be the playing area closest to the preset aspect ratio threshold, and the video display apparatus will directly use the third remaining area 801 as the video playing area in step 402 and step 403.
On the contrary, in the scenario of fig. 9, if the status bar area 603 of the terminal is subtracted from the first remaining area 601', the area aspect ratio of the third remaining area (not shown) is 17.9: 9; and the area aspect ratio of the fourth remaining area 901 obtained by subtracting the display area 604 of the play navigation bar from the first remaining area 601' is 17:9, the difference between the area aspect ratio 17:9 of the fourth remaining area 901 and the preset aspect ratio threshold 16:9 is smaller by calculating the difference between the two areas and the preset aspect ratio threshold 16: 9. The fourth remaining area 901 should be the playing area closest to the preset aspect ratio threshold, and the video display apparatus will directly use the fourth remaining area 901 as the video playing area in step 402 and step 403.
In addition, in other scenarios, when the difference value between the area aspect ratio of the third remaining area (not shown) and the preset aspect ratio threshold is the same as the difference value between the area aspect ratio of the fourth remaining area (not shown) and the preset aspect ratio threshold, the third remaining area (not shown) may be used as the video playing area in step 402 and step 403 in consideration of the display effect and the display habit.
Through the above determination modes, the playing area closest to the standard video size can be selected from multiple playing area combinations of the terminal under different configurations as the video playing area according to a series of parameters such as the terminal model, the software system, the application display configuration and the like of the terminal, so that the subsequent processing and use are facilitated.
In other embodiments, the terminal does not display the virtual navigation bar, and at this time, when the video playing area is determined, the terminal may determine the video playing area directly according to the size of the terminal screen, the size of the status bar area of the terminal, and the size of the display area of the playing navigation bar.
Fig. 10 is a schematic flowchart of determining a video playing area in a case where a virtual navigation bar is not displayed on a terminal screen according to an embodiment of the present disclosure, and fig. 11 to 13 are schematic interface diagrams of remaining areas in a case where a virtual navigation bar is not displayed on a terminal screen.
As shown in fig. 10, in the case that the virtual navigation bar is not displayed on the terminal screen, the determination of the video playing area may be based on the following steps:
1001, judging whether the aspect ratio of an area of a fifth residual area is greater than or equal to the preset aspect ratio threshold, wherein the fifth residual area is obtained by subtracting a status bar area of the terminal and a display area of the play navigation bar from a screen area of the terminal;
if yes, the fifth remaining area 1101 shown in fig. 11 is taken as the video playing area in step 402 and step 403; if not, go to step 1002.
Step 1002, subtracting the status bar area of the terminal from the screen area of the terminal to obtain a sixth remaining area, and subtracting the display area of the play navigation bar from the screen area of the terminal to obtain a seventh remaining area.
Step 1003, determining a difference value between a preset aspect ratio threshold value and the area length and width of the sixth remaining area and the area aspect ratio of the seventh remaining area, respectively, and taking the remaining area with a small difference value as the video playing area.
When the difference between the preset aspect ratio threshold and the area length and width of the sixth remaining area is less than or equal to the difference between the preset aspect ratio threshold and the area aspect ratio of the second remaining area, the sixth remaining area 1201 as shown in fig. 12 is taken as the video playing area in step 402 and step 403.
And when the difference between the preset aspect ratio threshold and the area length and width of the seventh remaining area is smaller than the difference between the preset aspect ratio threshold and the area aspect ratio of the sixth remaining area, the seventh remaining area 1301 as shown in fig. 13 is taken as the video play area as described in step 402 and step 403.
In an alternative embodiment, the above-mentioned preset aspect ratio threshold may be an aspect ratio of a standard video, such as 18:9 for example.
Through the above determination modes, the playing area closest to the standard video size can be selected from multiple playing area combinations of the terminal under different configurations as the video playing area according to a series of parameters such as the terminal model, the software system, the application display configuration and the like of the terminal, so that the subsequent processing and use are facilitated.
Further, fig. 11 is a schematic area diagram of a fifth remaining area provided in the present disclosure, and in fig. 11, a screen area 600 of the terminal subtracts a status bar area 603 of the terminal and a display area 604 of the play navigation bar to obtain a fifth remaining area 1101. At this time, the video display apparatus determines the aspect ratio of the fifth remaining area 1101, as shown in fig. 11 as 18.5:9, and then compares the aspect ratio of the fifth remaining area 1101 with the preset aspect ratio threshold, as shown in fig. 16: 9.
As can be seen from the above step 1001, when the aspect ratio of the fifth remaining area 1101 in fig. 11 is greater than or equal to the preset aspect ratio threshold, the fifth remaining area 1101 should be the playing area closest to the preset aspect ratio threshold at this time, and the first remaining area 901 will be the video playing area in step 402 and step 403.
Fig. 12 is a schematic region diagram of a sixth remaining region provided in the embodiment of the present disclosure, and fig. 13 is a schematic region diagram of a seventh remaining region provided in the embodiment of the present disclosure.
Unlike fig. 10, in the scenarios shown in fig. 12 and 13, since the aspect ratio (e.g. 14:9) of the fifth remaining area is smaller than the preset aspect ratio threshold (16:9), the video playing apparatus will perform step 1002, that is, subtract the status bar area 603 of the terminal from the screen area 600 of the terminal to obtain a sixth remaining area 1201; and subtracting the display area 604 of the play navigation bar from the screen area 600 of the terminal to obtain a seventh remaining area 1301.
In step 1003, the video display apparatus determines the difference between the preset aspect ratio threshold and the area length and width of the sixth remaining area and the difference between the preset aspect ratio threshold and the area aspect ratio of the seventh remaining area, respectively, and uses the remaining area with small difference as the video playing area in step 402 and step 403.
Specifically, in the scenario of fig. 12, if the area aspect ratio of the sixth remaining area 1201 obtained by subtracting the status bar area 603 of the terminal from the screen area 600 of the terminal is 18.5:9, and the area aspect ratio of the seventh remaining area (not shown) obtained by subtracting the display area 604 of the play navigation bar from the screen area 600 of the terminal is 17:9, then the area aspect ratio of the sixth remaining area 1201 is 18.5: 9: the difference between the sixth remaining area 1201 and the preset aspect ratio threshold 16:9 is smaller, and the sixth remaining area 1201 should be the playing area closest to the preset aspect ratio threshold at this time, and the video display apparatus may directly use the sixth remaining area 1201 as the video playing area in step 402 and step 403.
In contrast, in the scenario of fig. 13, if the aspect ratio of the seventh remaining area 1301 obtained by subtracting the display area 604 of the play navigation bar from the screen area 600 of the terminal is 18:9, and the aspect ratio of the sixth remaining area (not shown) obtained by subtracting the status bar area 603 of the terminal from the screen area 600 of the terminal is 17:9, the difference between the aspect ratio of the seventh remaining area 1301 area 18:9 and the preset aspect ratio threshold 16:9 is smaller by calculating the difference between the two areas and the preset aspect ratio threshold 16: 9. The seventh remaining area 1301 should be the playing area closest to the preset aspect ratio threshold, and the video display apparatus will directly use the seventh remaining area 1301 as the video playing area in steps 402 and 403.
Through the above determination modes, the playing area closest to the standard video size can be selected from multiple playing area combinations of the terminal under different configurations as the video playing area according to a series of parameters such as the terminal model, the software system, the application display configuration and the like of the terminal, so that the subsequent processing and use are facilitated.
After the determination of the video playing area is completed, as shown in step 402, the video playing apparatus further performs filling processing and/or clipping processing on the video to be played according to the area size of the video playing area and the video size of the video to be played, so as to obtain a processed video to be played.
In an alternative embodiment, the processing of the video to be played may be determined based on the matching degree between the video playing area and the video to be played.
The video playing device can determine the ratio of the size of the video to be played to the size of the playing area, and then adopt different processing modes for the video to be played based on different ratios.
Specifically, fig. 14 is a schematic view of a first processing of a video to be played according to the embodiment of the present disclosure, and as shown in fig. 14, when a ratio between a size of the video to be played and a size of the playing area is smaller than a preset ratio threshold, the video playing apparatus may use a width of the playing area as a width of the processed video to be played, and perform filling color processing based on a length direction on the video to be played to obtain a processed video to be played 1401.
Fig. 15 is a schematic diagram of second processing of a video to be played according to the embodiment of the present disclosure, as shown in fig. 15, when the ratio is greater than the preset ratio threshold and smaller than 1, the video playing device may use the height of the playing area as the height of the processed video to be played, and perform clipping processing based on the width direction on the video to be played to obtain a processed video to be played 1501;
fig. 16 is a schematic diagram of a third processing of a video to be played according to the embodiment of the present disclosure, as shown in fig. 16, when the ratio is greater than 1, the video playing apparatus may perform fill color processing based on the length direction of the video to be played, and perform clipping processing based on the width direction on the video to be played according to the width of the playing area, so as to obtain a processed video 1601 to be played.
The preset ratio threshold is an empirical value smaller than 1, and in an alternative example, the preset ratio threshold is 0.84.
By the method, the clipped content of the video to be played can be made as small as possible, and the problems that the video content is clipped or the area of a black area in a display area is too large and the like are avoided.
Finally, the video playing apparatus will execute step 403, that is, the processed video to be played is displayed in the video playing area of the terminal.
Since the video playing area is an area that is selected by the video playing apparatus from the multiple playing areas and is closest to the standard size of the video, when the processed video is played, the video playing apparatus needs to configure the current playing area of the terminal as the determined video playing area.
In an optional embodiment, the video playing apparatus may configure the display state of the status bar area of the terminal and the display state of the display area of the play navigation bar according to the video playing area, so that the configured terminal displays the processed video to be played by using the video playing area.
The video playing device can control the display state of the status bar area and the display state of the playing navigation bar through terminal configuration. Specifically, for the status bar area, the display status may be configured to be transparent or non-transparent; for the playing navigation bar, the display status of the playing navigation bar can be configured to be transparent or non-transparent. The video playing device can configure the display states of the status bar area and the playing navigation bar based on the determined video playing area, so that the configured area is matched with the determined video playing area, and the processed video to be played can be conveniently played in the video playing area subsequently.
The video display method provided by the embodiment of the disclosure comprises the steps of determining a video playing area of a terminal; according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played; and displaying the processed video to be played in a video playing area of the terminal. Compared with the mode that the video is directly processed according to the video size in the prior art, the video playing area is determined firstly, and then the processing mode of the video is determined based on the playing area size and the video size, so that the display mode of the video can be flexibly adjusted, the phenomenon that the video content is cut or the area of a black area in the display area is too large is avoided when the aspect ratio of the video is very large or very small, and the display effect is improved.
In a second aspect, corresponding to the video display method in the foregoing embodiment, fig. 17 is a block diagram of a video playing device provided in the embodiment of the present disclosure. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 17, the video playback apparatus includes:
a playing area determining module 1710, configured to determine a video playing area of the terminal;
the video processing module 1720 is configured to perform filling processing and/or clipping processing on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played, so as to obtain a processed video to be played;
a display module 1730, configured to display the processed video to be played in a video playing area of the terminal.
Optionally, the playing area determining module 1710 is specifically configured to determine the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal, and the size of the display area of the playing navigation bar.
Optionally, the display module 1730 is specifically configured to configure the display state of the status bar area of the terminal and the display state of the display area of the play navigation bar according to the video play area, so that the configured terminal displays the processed video to be played by using the video play area.
Optionally, a virtual navigation bar is further displayed on the screen of the terminal;
the playing area determining module 1710 is specifically configured to, if the area aspect ratio of the first remaining area is less than or equal to a preset aspect ratio threshold, use the first remaining area as the video playing area; the first remaining area is an area remaining after the display area of the virtual navigation bar is subtracted from the screen area of the terminal;
if the area aspect ratio of the first residual area is larger than a preset aspect ratio threshold value, subtracting a status bar area of the terminal and a display area of the playing navigation bar from the first residual area to obtain a second residual area; and if the area aspect ratio of the second residual area is greater than or equal to a preset aspect ratio threshold value, taking the second residual area as the video playing area.
Optionally, the playing area determining module 1710 is specifically configured to:
if the area aspect ratio of the second residual area is smaller than a preset aspect ratio threshold value, subtracting a status bar area of a terminal from the first residual area to obtain a third residual area, and subtracting a display area of the play navigation bar from the first residual area to obtain a fourth residual area;
if the length and width of the third remaining area and the aspect ratio of the fourth remaining area are both smaller than a preset aspect ratio threshold, taking the first remaining area as the video playing area;
otherwise, respectively determining the difference between a preset aspect ratio threshold value and the area length and width of the third residual area and the area aspect ratio of the fourth residual area, and taking the residual area with the small difference as the video playing area.
Optionally, the playing area determining module 1710 is specifically configured to:
if the area aspect ratio of the fifth residual area is greater than or equal to the preset aspect ratio threshold, taking the fifth residual area as the video playing area;
and the fifth residual area is obtained by subtracting a status bar area of the terminal and a display area of the play navigation bar from a screen area of the terminal.
Optionally, the playing area determining module 1710 is specifically configured to:
if the aspect ratio of the region of the fifth remaining region is smaller than the preset aspect ratio threshold, determining a difference value between the preset aspect ratio threshold and the aspect ratio of the region of the sixth remaining region and the aspect ratio of the region of the seventh remaining region, and taking the remaining region with a small difference value as the video playing region;
the sixth remaining area is an area obtained by subtracting a status bar area of the terminal from a screen area of the terminal, and the seventh remaining area is an area obtained by subtracting a display area of the play navigation bar from the screen area of the terminal.
Optionally, the video processing module 1720 is specifically configured to:
the filling processing and/or the cutting processing are/is carried out on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played to obtain the processed video to be played, and the method comprises the following steps:
determining the ratio of the size of the video to be played to the size of the playing area;
when the ratio is smaller than a preset ratio threshold, taking the width of the playing area as the width of the processed video to be played, and performing filling color processing based on the length direction on the video to be played to obtain the processed video to be played;
when the ratio is greater than the preset ratio threshold and smaller than 1, taking the height of the playing area as the height of the processed video to be played, and performing width-direction-based clipping processing on the video to be played to obtain the processed video to be played;
and when the ratio is larger than 1, performing filling color processing based on the length direction of the video to be played, and performing width-direction-based clipping processing on the video to be played according to the width of the playing area to obtain the processed video to be played.
The video display device provided by the embodiment of the disclosure determines the video playing area of the terminal; according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played; and displaying the processed video to be played in a video playing area of the terminal. Compared with the mode that the video is directly processed according to the video size in the prior art, the video playing area is determined firstly, and then the processing mode of the video is determined based on the playing area size and the video size, so that the display mode of the video can be flexibly adjusted, the phenomenon that the video content is cut or the area of a black area in the display area is too large is avoided when the aspect ratio of the video is very large or very small, and the display effect is improved.
The electronic device provided in this embodiment may be used to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Referring to fig. 18, a schematic diagram of a structure of an electronic device 1800 suitable for implementing an embodiment of the present disclosure is shown, where the electronic device 1800 may be a terminal device or a media library. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 18 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 18, the electronic device 1800 may include a processing device (e.g., central processing unit, graphics processor, etc.) 1801, which may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 1802 or a program loaded from a storage device 1808 into a Random Access Memory (RAM) 1803. In the RAM 1803, various programs and data necessary for the operation of the electronic device 1800 are also stored. The processing device 1801, ROM1802, and RAM 1803 are connected to each other by a bus 1804. An input/output (I/O) interface 1805 is also connected to bus 1804.
Generally, the following devices may be connected to the I/O interface 1805: input devices 1806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 1807 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 1808 including, for example, magnetic tape, hard disk, etc.; and a communication device 1809. The communication device 1809 may allow the electronic device 1800 to communicate with other devices wirelessly or via wires to exchange data. While fig. 18 illustrates an electronic device 1800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 1809, or installed from the storage means 1808, or installed from the ROM 1802. The computer program, when executed by the processing device 1801, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or media library. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The present embodiment provides a computer program product, which includes computer instructions, and the computer instructions are executed by a processor to perform the method according to any of the foregoing embodiments, and the implementation principle and the technical effect are similar, and the detailed description of the embodiment is omitted here.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
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.
The following are some embodiments of the disclosure.
In a first aspect, according to one or more embodiments of the present disclosure, a video presentation method includes:
determining a video playing area of a terminal;
according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played;
and displaying the processed video to be played in a video playing area of the terminal.
Optionally, the determining the video playing area of the terminal includes:
and determining the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal and the size of the display area of the playing navigation bar.
Optionally, the displaying the processed video to be played in the video playing area of the terminal includes:
and configuring the display state of the state bar area of the terminal and the display state of the display area of the playing navigation bar according to the video playing area, so that the configured terminal adopts the video playing area to display the processed video to be played.
Optionally, a virtual navigation bar is further displayed on the screen of the terminal;
the determining the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal and the size of the display area of the playing navigation bar comprises the following steps:
if the area aspect ratio of the first residual area is smaller than or equal to a preset aspect ratio threshold value, taking the first residual area as the video playing area; the first remaining area is an area remaining after the display area of the virtual navigation bar is subtracted from the screen area of the terminal;
if the area aspect ratio of the first residual area is larger than a preset aspect ratio threshold value, subtracting a status bar area of the terminal and a display area of the playing navigation bar from the first residual area to obtain a second residual area; and if the area aspect ratio of the second residual area is greater than or equal to a preset aspect ratio threshold value, taking the second residual area as the video playing area.
Optionally, if the aspect ratio of the region of the second remaining region is smaller than the preset aspect ratio threshold, the method further includes:
subtracting a status bar area of the terminal from the first residual area to obtain a third residual area, and subtracting a display area of the playing navigation bar from the first residual area to obtain a fourth residual area;
if the length and width of the third remaining area and the aspect ratio of the fourth remaining area are both smaller than a preset aspect ratio threshold, taking the first remaining area as the video playing area;
otherwise, respectively determining the difference between a preset aspect ratio threshold value and the area length and width of the third residual area and the area aspect ratio of the fourth residual area, and taking the residual area with the small difference as the video playing area.
Optionally, the determining the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal, and the size of the display area of the playing navigation bar includes:
if the area aspect ratio of the fifth residual area is greater than or equal to the preset aspect ratio threshold, taking the fifth residual area as the video playing area;
and the fifth residual area is obtained by subtracting a status bar area of the terminal and a display area of the play navigation bar from a screen area of the terminal.
Optionally, the method further includes:
if the aspect ratio of the region of the fifth remaining region is smaller than the preset aspect ratio threshold, determining a difference value between the preset aspect ratio threshold and the aspect ratio of the region of the sixth remaining region and the aspect ratio of the region of the seventh remaining region, and taking the remaining region with a small difference value as the video playing region;
the sixth remaining area is an area obtained by subtracting a status bar area of the terminal from a screen area of the terminal, and the seventh remaining area is an area obtained by subtracting a display area of the play navigation bar from the screen area of the terminal.
Optionally, the filling and/or clipping processing is performed on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played, so as to obtain the processed video to be played, and the method includes:
determining the ratio of the size of the video to be played to the size of the playing area;
when the ratio is smaller than a preset ratio threshold, taking the width of the playing area as the width of the processed video to be played, and performing filling color processing based on the length direction on the video to be played to obtain the processed video to be played;
when the ratio is greater than the preset ratio threshold and smaller than 1, taking the height of the playing area as the height of the processed video to be played, and performing width-direction-based clipping processing on the video to be played to obtain the processed video to be played;
and when the ratio is larger than 1, performing filling color processing based on the length direction of the video to be played, and performing width-direction-based clipping processing on the video to be played according to the width of the playing area to obtain the processed video to be played.
In a second aspect, according to one or more embodiments of the present disclosure, a video playback apparatus includes:
the playing area determining module is used for determining a video playing area of the terminal;
the video processing module is used for performing filling processing and/or cutting processing on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played to obtain the processed video to be played;
and the display module is used for displaying the processed video to be played in a video playing area of the terminal.
Optionally, the playing area determining module is specifically configured to determine the video playing area according to a size of a terminal screen, a size of a status bar area of the terminal, and a size of a display area of the playing navigation bar.
Optionally, the display module is specifically configured to configure a display state of a status bar area of the terminal and a display state of a display area of the play navigation bar according to the video play area, so that the configured terminal displays the processed video to be played by using the video play area.
Optionally, a virtual navigation bar is further displayed on the screen of the terminal;
optionally, the play area determining module is specifically configured to, if the area aspect ratio of the first remaining area is less than or equal to a preset aspect ratio threshold, use the first remaining area as the video play area; the first remaining area is an area remaining after the display area of the virtual navigation bar is subtracted from the screen area of the terminal;
if the area aspect ratio of the first residual area is larger than a preset aspect ratio threshold value, subtracting a status bar area of the terminal and a display area of the playing navigation bar from the first residual area to obtain a second residual area; and if the area aspect ratio of the second residual area is greater than or equal to a preset aspect ratio threshold value, taking the second residual area as the video playing area.
Optionally, the play area determining module is specifically configured to:
if the area aspect ratio of the second residual area is smaller than a preset aspect ratio threshold value, subtracting a status bar area of a terminal from the first residual area to obtain a third residual area, and subtracting a display area of the play navigation bar from the first residual area to obtain a fourth residual area;
if the length and width of the third remaining area and the aspect ratio of the fourth remaining area are both smaller than a preset aspect ratio threshold, taking the first remaining area as the video playing area;
otherwise, respectively determining the difference between a preset aspect ratio threshold value and the area length and width of the third residual area and the area aspect ratio of the fourth residual area, and taking the residual area with the small difference as the video playing area.
Optionally, the play area determining module is specifically configured to:
if the area aspect ratio of the fifth residual area is greater than or equal to the preset aspect ratio threshold, taking the fifth residual area as the video playing area;
and the fifth residual area is obtained by subtracting a status bar area of the terminal and a display area of the play navigation bar from a screen area of the terminal.
Optionally, the play area determining module is specifically configured to:
if the aspect ratio of the region of the fifth remaining region is smaller than the preset aspect ratio threshold, determining a difference value between the preset aspect ratio threshold and the aspect ratio of the region of the sixth remaining region and the aspect ratio of the region of the seventh remaining region, and taking the remaining region with a small difference value as the video playing region;
the sixth remaining area is an area obtained by subtracting a status bar area of the terminal from a screen area of the terminal, and the seventh remaining area is an area obtained by subtracting a display area of the play navigation bar from the screen area of the terminal.
Optionally, the video processing module is specifically configured to:
the filling processing and/or the cutting processing are/is carried out on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played to obtain the processed video to be played, and the method comprises the following steps:
determining the ratio of the size of the video to be played to the size of the playing area;
when the ratio is smaller than a preset ratio threshold, taking the width of the playing area as the width of the processed video to be played, and performing filling color processing based on the length direction on the video to be played to obtain the processed video to be played;
when the ratio is greater than the preset ratio threshold and smaller than 1, taking the height of the playing area as the height of the processed video to be played, and performing width-direction-based clipping processing on the video to be played to obtain the processed video to be played;
and when the ratio is larger than 1, performing filling color processing based on the length direction of the video to be played, and performing width-direction-based clipping processing on the video to be played according to the width of the playing area to obtain the processed video to be played.
In a third aspect, in accordance with one or more embodiments of the present disclosure, an electronic device comprises: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions causes the at least one processor to perform the method of any one of the preceding claims.
In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium has stored therein computer-executable instructions that, when executed by a processor, implement a method as in any one of the preceding.
In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product comprises computer instructions for execution by a processor of a method as described in any of the previous claims.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. A method for video presentation, comprising:
determining a video playing area of a terminal;
according to the area size of the video playing area and the video size of the video to be played, filling and/or cutting the video of the video to be played to obtain a processed video to be played;
and displaying the processed video to be played in a video playing area of the terminal.
2. The video presentation method according to claim 1, wherein the determining the video playing area of the terminal comprises:
and determining the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal and the size of the display area of the playing navigation bar.
3. The video presentation method according to claim 1, wherein the presenting the processed video to be played in a video playing area of a terminal comprises:
and configuring the display state of the state bar area of the terminal and the display state of the display area of the playing navigation bar according to the video playing area, so that the configured terminal adopts the video playing area to display the processed video to be played.
4. The video presentation method according to claim 2, wherein a virtual navigation bar is further displayed on the screen of the terminal;
the determining the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal and the size of the display area of the playing navigation bar comprises the following steps:
if the area aspect ratio of the first residual area is smaller than or equal to a preset aspect ratio threshold value, taking the first residual area as the video playing area; the first remaining area is an area remaining after the display area of the virtual navigation bar is subtracted from the screen area of the terminal;
if the area aspect ratio of the first residual area is larger than a preset aspect ratio threshold value, subtracting a status bar area of the terminal and a display area of the playing navigation bar from the first residual area to obtain a second residual area; and if the area aspect ratio of the second residual area is greater than or equal to a preset aspect ratio threshold value, taking the second residual area as the video playing area.
5. The video presentation method of claim 4, wherein if the area aspect ratio of the second remaining area is smaller than a preset aspect ratio threshold, the method further comprises:
subtracting a status bar area of the terminal from the first residual area to obtain a third residual area, and subtracting a display area of the playing navigation bar from the first residual area to obtain a fourth residual area;
if the length and width of the third remaining area and the aspect ratio of the fourth remaining area are both smaller than a preset aspect ratio threshold, taking the first remaining area as the video playing area;
otherwise, respectively determining the difference between a preset aspect ratio threshold value and the area length and width of the third residual area and the area aspect ratio of the fourth residual area, and taking the residual area with the small difference as the video playing area.
6. The video display method of claim 1, wherein the determining the video playing area according to the size of the terminal screen, the size of the status bar area of the terminal, and the size of the display area of the playing navigation bar comprises:
if the area aspect ratio of the fifth residual area is greater than or equal to the preset aspect ratio threshold, taking the fifth residual area as the video playing area;
and the fifth residual area is obtained by subtracting a status bar area of the terminal and a display area of the play navigation bar from a screen area of the terminal.
7. The video presentation method of claim 6, further comprising:
if the aspect ratio of the region of the fifth remaining region is smaller than the preset aspect ratio threshold, determining a difference value between the preset aspect ratio threshold and the aspect ratio of the region of the sixth remaining region and the aspect ratio of the region of the seventh remaining region, and taking the remaining region with a small difference value as the video playing region;
the sixth remaining area is an area obtained by subtracting a status bar area of the terminal from a screen area of the terminal, and the seventh remaining area is an area obtained by subtracting a display area of the play navigation bar from the screen area of the terminal.
8. The video presentation method according to any one of claims 1 to 7, wherein the obtaining the processed video to be played by performing filling processing and/or cropping processing on the video to be played according to the area size of the video playing area and the video size of the video to be played comprises:
determining the ratio of the size of the video to be played to the size of the playing area;
when the ratio is smaller than a preset ratio threshold, taking the width of the playing area as the width of the processed video to be played, and performing filling color processing based on the length direction on the video to be played to obtain the processed video to be played;
when the ratio is greater than the preset ratio threshold and smaller than 1, taking the height of the playing area as the height of the processed video to be played, and performing width-direction-based clipping processing on the video to be played to obtain the processed video to be played;
and when the ratio is larger than 1, performing filling color processing based on the length direction of the video to be played, and performing width-direction-based clipping processing on the video to be played according to the width of the playing area to obtain the processed video to be played.
9. A video presentation apparatus, comprising:
the playing area determining module is used for determining a video playing area of the terminal;
the video processing module is used for performing filling processing and/or cutting processing on the video of the video to be played according to the area size of the video playing area and the video size of the video to be played to obtain the processed video to be played;
and the display module is used for displaying the processed video to be played in a video playing area of the terminal.
10. An electronic device, comprising:
at least one processor; and
a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of claims 1-8.
11. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement the method of any one of claims 1-8.
12. A computer program product comprising computer instructions, characterized in that the computer instructions, when executed by a processor, implement the method of any of claims 1-8.
CN202111051873.1A 2021-09-08 2021-09-08 Video display method and device, electronic equipment and storage medium Active CN113747226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111051873.1A CN113747226B (en) 2021-09-08 2021-09-08 Video display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111051873.1A CN113747226B (en) 2021-09-08 2021-09-08 Video display method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113747226A true CN113747226A (en) 2021-12-03
CN113747226B CN113747226B (en) 2022-09-09

Family

ID=78737269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111051873.1A Active CN113747226B (en) 2021-09-08 2021-09-08 Video display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113747226B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115243100A (en) * 2022-03-18 2022-10-25 北京达佳互联信息技术有限公司 Multimedia resource generation method and device, electronic equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070136685A1 (en) * 2005-12-08 2007-06-14 Nikhil Bhatla Adaptive Media Player Size
WO2017193576A1 (en) * 2016-05-13 2017-11-16 乐视控股(北京)有限公司 Video resolution adaptation method and apparatus, and virtual reality terminal
CN111372126A (en) * 2019-06-27 2020-07-03 杭州海康威视系统技术有限公司 Video playing method, device and storage medium
CN111727423A (en) * 2018-02-22 2020-09-29 三星电子株式会社 Electronic device including flexible display and control method thereof
CN111752440A (en) * 2020-06-29 2020-10-09 北京字节跳动网络技术有限公司 Multimedia content display method and device
CN112019891A (en) * 2020-08-28 2020-12-01 北京达佳互联信息技术有限公司 Multimedia content display method and device, terminal and storage medium
CN112256169A (en) * 2020-10-14 2021-01-22 北京达佳互联信息技术有限公司 Content display method and device, electronic equipment and storage medium
CN112770183A (en) * 2020-11-10 2021-05-07 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium
CN113115098A (en) * 2021-03-31 2021-07-13 北京达佳互联信息技术有限公司 Video display method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070136685A1 (en) * 2005-12-08 2007-06-14 Nikhil Bhatla Adaptive Media Player Size
WO2017193576A1 (en) * 2016-05-13 2017-11-16 乐视控股(北京)有限公司 Video resolution adaptation method and apparatus, and virtual reality terminal
CN111727423A (en) * 2018-02-22 2020-09-29 三星电子株式会社 Electronic device including flexible display and control method thereof
CN111372126A (en) * 2019-06-27 2020-07-03 杭州海康威视系统技术有限公司 Video playing method, device and storage medium
CN111752440A (en) * 2020-06-29 2020-10-09 北京字节跳动网络技术有限公司 Multimedia content display method and device
CN112019891A (en) * 2020-08-28 2020-12-01 北京达佳互联信息技术有限公司 Multimedia content display method and device, terminal and storage medium
CN112256169A (en) * 2020-10-14 2021-01-22 北京达佳互联信息技术有限公司 Content display method and device, electronic equipment and storage medium
CN112770183A (en) * 2020-11-10 2021-05-07 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium
CN113115098A (en) * 2021-03-31 2021-07-13 北京达佳互联信息技术有限公司 Video display method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115243100A (en) * 2022-03-18 2022-10-25 北京达佳互联信息技术有限公司 Multimedia resource generation method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN113747226B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
US11178448B2 (en) Method, apparatus for processing video, electronic device and computer-readable storage medium
CN112261226B (en) Horizontal screen interaction method and device, electronic equipment and storage medium
CN110619099B (en) Comment content display method, device, equipment and storage medium
WO2020220773A1 (en) Method and apparatus for displaying picture preview information, electronic device and computer-readable storage medium
CN109640158B (en) Control method, device, equipment and medium for video playing
CN111790148B (en) Information interaction method and device in game scene and computer readable medium
US11924500B2 (en) Information interaction method and device, electronic apparatus, and computer readable storage medium
CN113507637A (en) Media file processing method, device, equipment, readable storage medium and product
CN111240793B (en) Method, device, electronic equipment and computer readable medium for cell prerendering
CN113253885A (en) Target content display method, device, equipment, readable storage medium and product
CN113094135A (en) Page display control method, device, equipment and storage medium
CN110022493B (en) Playing progress display method and device, electronic equipment and storage medium
CN110401877B (en) Video playing control method and device, electronic equipment and storage medium
CN110267088B (en) Video playing control method and device, electronic equipment and storage medium
CN113747226B (en) Video display method and device, electronic equipment and storage medium
US20230421857A1 (en) Video-based information displaying method and apparatus, device and medium
CN110147283B (en) Display content switching display method, device, equipment and medium
CN110134905B (en) Page update display method, device, equipment and storage medium
CN110381356B (en) Audio and video generation method and device, electronic equipment and readable medium
CN110162350B (en) Notification bar information display method, notification bar information display device, server and storage medium
US20230137492A1 (en) Landscape interaction method and apparatus, electronic device, and storage medium
CN113553451B (en) Media playing method, device, electronic equipment and program product
CN115033136A (en) Material display method, device, equipment, computer readable storage medium and product
CN111209503B (en) Processing method and device for popup window in webpage, electronic equipment and storage medium
CN114491098A (en) Comment prompting method and device, electronic equipment, storage medium and program product

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