CN113438533A - Video display method and device, electronic equipment and storage medium - Google Patents

Video display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113438533A
CN113438533A CN202110601494.9A CN202110601494A CN113438533A CN 113438533 A CN113438533 A CN 113438533A CN 202110601494 A CN202110601494 A CN 202110601494A CN 113438533 A CN113438533 A CN 113438533A
Authority
CN
China
Prior art keywords
video
information
page
position information
area
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
CN202110601494.9A
Other languages
Chinese (zh)
Other versions
CN113438533B (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110601494.9A priority Critical patent/CN113438533B/en
Publication of CN113438533A publication Critical patent/CN113438533A/en
Application granted granted Critical
Publication of CN113438533B publication Critical patent/CN113438533B/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/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
    • H04N21/4316Generation 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 for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • 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
    • 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/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure relates to a video display method, a video display device, an electronic device and a storage medium, wherein the method comprises the following steps: responding to the video loading instruction, acquiring local page configuration information and playing attribute information of an original video corresponding to the video loading instruction, wherein the local page configuration information represents configuration information of a video playing page corresponding to the target terminal; performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played and determining display position information of the video to be played in a video playing page; and responding to the video playing triggering instruction, and displaying the video to be played in the video playing page based on the display position information. By using the technical scheme provided by the embodiment of the disclosure, the page adaptation processing can be performed on the original video by combining the condition of the original video and the local page configuration condition, so that the video to be played suitable for display and reasonable display position information are obtained, and the video display effect is improved.

Description

Video display method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a video display method and apparatus, an electronic device, and a storage medium.
Background
With the development of internet technology, various Applications (APPs) can provide a user with a large amount of video resources (e.g., short videos, etc.). With the popularization of mobile devices, it has become an important part of people's daily life to view video resources such as short videos by using mobile devices. However, since the videos are different in size and content, some videos include subtitles, and the subtitles are different in position in the videos; the page conditions of each mobile device are also various, for example, some mobile device screens are slender, and some mobile device screens are wide; various situations with poor video display effects often exist, for example, areas such as a navigation bar block subtitle information in a video, areas such as the navigation bar have a truncated visual effect on the top or bottom of the video, and the like, which affects the viewing experience of a user.
Disclosure of Invention
The present disclosure provides a video display method, an apparatus, an electronic device and a storage medium, so as to at least solve the problem of poor video display effect in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a video display method, including:
responding to a video loading instruction, acquiring local page configuration information and playing attribute information of an original video corresponding to the video loading instruction, wherein the local page configuration information represents configuration information of a video playing page corresponding to a target terminal;
performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played, and determining display position information of the video to be played in the video playing page;
and responding to a video playing triggering instruction, and displaying the video to be played in the video playing page based on the display position information.
In an exemplary embodiment, the play attribute information includes a video type, video size information, and subtitle position information of the original video; the local page configuration information comprises page size information of the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
determining a target video display area matched with the original video in the video playing page based on the subtitle position information under the condition that the video type of the original video is a first type and the video size information meets a first preset condition, wherein the first preset condition is determined based on the page size information;
and performing area adaptation processing on the original video according to the target video display area to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
In an exemplary embodiment, the local page configuration information further includes a plurality of video presentation areas in the video playback page; the determining, based on the subtitle position information, a target video display area in the video playing page that matches the original video includes:
determining a current display area from the plurality of video display areas based on a preset matching sequence corresponding to the plurality of video display areas; the preset matching sequence is obtained by sequencing the video display areas in a descending order based on the size information corresponding to the video display areas;
performing area adaptation on the original video and the current display area, and determining a subtitle adaptation result based on the subtitle position information;
and taking the current display area as the target video display area under the condition that the subtitle adaptation result meets a subtitle display condition.
In an exemplary embodiment, the determining, based on the subtitle position information, a target video presentation area in the video playing page that matches the original video further includes:
after the original video and the current display area are subjected to area adaptation, acquiring video size information in the current display area and area size information of the current display area;
and under the condition that the video size information in the current display area and the area size information meet a preset matching condition, executing the step of determining the subtitle adaptation result based on the subtitle position information.
In an exemplary embodiment, the local page configuration information further includes location information of a preset functional area in the video playback page, and the method further includes:
under the condition that the video size information in the current display area and the area size information do not meet preset matching conditions, performing width adaptation processing on the original video based on the current display area to obtain updated subtitle position information;
determining subtitle shielding information based on the position information of the preset function area and the updated subtitle position information;
and under the condition that the subtitle shielding information indicates that the preset functional area shields the subtitle information of the original video, performing page adaptation processing on the original video based on the position information of the preset functional area to obtain the video to be played, and determining the display position information of the video to be played in the video playing page.
In an exemplary embodiment, after performing the area adaptation on the original video and the current presentation area, the determining, based on the subtitle position information, a target video presentation area in the video playing page that matches the original video further includes:
determining the cutting proportion of the original video;
and under the condition that the cutting proportion of the original video meets a preset cutting condition, executing the step of determining the caption adaptation result based on the caption position information.
In an exemplary embodiment, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
under the condition that the video type is a first type and the video size information meets a second preset condition, carrying out scale conversion processing on the original video according to the page size information to obtain the video to be played;
determining the size information of the video to be played;
and determining the display position information of the video to be played in a video playing page according to the position information of the preset functional area and the size information of the video to be played.
In an exemplary embodiment, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
and when the video type is the first type and the video size information meets a third preset condition, performing page width adaptation processing on the original video according to the page size information to obtain the video to be played, and determining display position information of the video to be played in the video playing page, wherein the third preset condition is determined based on the page size information.
In an exemplary embodiment, the playing attribute information of the original video includes a video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
determining a preset display area in the video playing page based on the position information of the preset functional area under the condition that the video type of the original video is a second type;
performing centering adaptation processing on the original video based on the preset display area to obtain the video to be played and updated subtitle position information;
determining subtitle shielding information based on the position information of the preset function area and the updated subtitle position information;
and under the condition that the subtitle shielding information indicates that the subtitle information of the original video shields the preset function area, performing mobile processing on the original video based on the position information of the preset function area, and determining the display position information of the video to be played in the video playing page.
In an exemplary embodiment, the playing attribute information of the original video includes a video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
determining a preset display area in the video playing page based on the position information of the preset functional area under the condition that the video type of the original video is a second type;
performing centering adaptation processing on the original video based on the preset display area to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
According to a second aspect of the embodiments of the present disclosure, there is provided a video presentation apparatus, comprising:
the information acquisition module is configured to execute and respond to a video loading instruction, and acquire local page configuration information and playing attribute information of an original video corresponding to the video loading instruction, wherein the local page configuration information represents configuration information of a video playing page corresponding to a target terminal;
the page adaptation processing module is configured to perform page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played and determine display position information of the video to be played in the video playing page;
and the video display module is configured to respond to a video playing triggering instruction and display the video to be played in the video playing page based on the display position information. In an exemplary embodiment, the play attribute information includes a video type, video size information, and subtitle position information of the original video; the local page configuration information comprises page size information of the video playing page; the page adaptation processing module comprises:
a target video display area determination unit configured to determine a target video display area matched with the original video in the video playing page based on the subtitle position information under the condition that the video type of the original video is a first type and the video size information meets a first preset condition, wherein the first preset condition is determined based on the page size information;
and the area adaptation unit is configured to perform area adaptation processing on the original video according to the target video display area to obtain the video to be played and determine display position information of the video to be played in the video playing page.
In an exemplary embodiment, the local page configuration information further includes a plurality of video presentation areas in the video playback page; the target video presentation area determining unit includes:
the sequential matching unit is configured to determine a current display area from the plurality of video display areas based on a preset matching sequence corresponding to the plurality of video display areas; the preset matching sequence is obtained by sequencing the video display areas in a descending order based on the size information corresponding to the video display areas;
the adaptation unit is configured to perform region adaptation on the original video and the current display region and determine a subtitle adaptation result based on the subtitle position information;
and the area determining unit is configured to execute that the current display area is taken as the target video display area under the condition that the subtitle adaptation result meets a subtitle display condition.
In an exemplary embodiment, the target video presentation area determining unit further includes:
a size obtaining unit configured to obtain video size information in the current display area and area size information of the current display area after performing area adaptation on the original video and the current display area;
a matching condition checking unit configured to execute the step of determining the subtitle adaptation result based on the subtitle position information if the video size information in the current presentation area and the area size information satisfy a preset matching condition.
In an exemplary embodiment, the local page configuration information further includes location information of a preset functional area in the video playback page, and the apparatus further includes:
the width adaptation unit is configured to perform width adaptation processing on the original video based on the current display area under the condition that the video size information in the current display area and the area size information do not meet preset matching conditions, so as to obtain updated subtitle position information;
a subtitle occlusion checking unit configured to perform determining subtitle occlusion information based on the position information of the preset functional region and the updated subtitle position information;
and the shielding adaptation unit is configured to perform page adaptation processing on the original video based on the position information of the preset functional area under the condition that the subtitle shielding information indicates that the preset functional area shields the subtitle information of the original video, so as to obtain the video to be played, and determine the display position information of the video to be played in the video playing page.
In an exemplary embodiment, the target video presentation area determining unit further includes:
a cropping ratio determination unit configured to perform determining a cropping ratio of the original video;
a preset clipping condition checking unit configured to execute the step of determining the subtitle adaptation result based on the subtitle position information if the clipping proportion of the original video satisfies a preset clipping condition.
In an exemplary embodiment, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page; the page adaptation processing module comprises:
the scaling unit is configured to perform scaling processing on the original video according to the page size information to obtain the video to be played under the condition that the video type is a first type and the video size information meets a second preset condition;
a size determination unit configured to perform determination of size information of the video to be played;
and the position determining unit is configured to determine display position information of the video to be played in a video playing page according to the position information of the preset functional area and the size information of the video to be played.
In an exemplary embodiment, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page; the page adaptation processing module comprises:
and the page width adapting unit is configured to perform page width adapting processing on the original video according to the page size information to obtain the video to be played and determine display position information of the video to be played in the video playing page under the condition that the video type is a first type and the video size information meets a third preset condition, wherein the third preset condition is determined based on the page size information.
In an exemplary embodiment, the playing attribute information of the original video includes a video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page; the page adaptation processing module comprises:
a first preset display area determination unit configured to determine a preset display area in the video playing page based on the position information of the preset functional area when the video type of the original video is a second type;
the first centering adaptation unit is configured to perform centering adaptation processing on the original video based on the preset display area to obtain the video to be played and updated subtitle position information;
a subtitle occlusion determining unit configured to perform determining subtitle occlusion information based on the position information of the preset function region and the updated subtitle position information;
and the mobile processing unit is configured to execute mobile processing on the original video based on the position information of the preset functional area under the condition that the subtitle shielding information indicates that the subtitle information of the original video shields the preset functional area, and determine the display position information of the video to be played in the video playing page.
In an exemplary embodiment, the playing attribute information of the original video includes a video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page; the page adaptation processing module comprises:
a second preset display area determination unit configured to determine a preset display area in the video playing page based on the position information of the preset functional area when the video type of the original video is a second type;
the second centering adaptation unit is configured to perform centering adaptation processing on the original video based on the preset display area to obtain the video to be played, and determine display position information of the video to be played in the video playing page.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the video presentation method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the video presentation method of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the video presentation method of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps that local page configuration information and playing attribute information of an original video corresponding to a video loading instruction are obtained by responding to the video loading instruction, and the local page configuration information represents configuration information of a video playing page corresponding to a target terminal; performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played and determining display position information of the video to be played in a video playing page; and responding to the video playing triggering instruction, and displaying the video to be played in the video playing page based on the display position information. By using the technical scheme provided by the embodiment of the disclosure, the page adaptation processing can be performed on the original video by combining the condition of the original video and the local page configuration condition, so that the video to be played suitable for display and reasonable display position information are obtained, and the video display effect is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
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 and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an application environment of a video presentation method according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a video presentation method in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a video playback page in accordance with an illustrative embodiment;
FIG. 5 is a flow diagram illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 6 is a schematic diagram illustrating a video presentation area ordering according to an exemplary embodiment;
FIG. 7 is a flow diagram illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 8 is a flow chart illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 9 is a flow diagram illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 10 is a comparison diagram illustrating an adaptation optimization according to an exemplary embodiment;
FIG. 11 is a comparison diagram illustrating another adaptation optimization according to an exemplary embodiment;
FIG. 12 is a comparison diagram illustrating another fitting optimization according to an exemplary embodiment;
FIG. 13 is a comparison diagram illustrating another fitting optimization according to an exemplary embodiment;
FIG. 14 is a flow chart illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 15 is a flow chart illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 16 is a flow chart illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 17 is a flow chart illustrating another method of video presentation in accordance with an exemplary embodiment;
FIG. 18 is a block diagram of a video presentation device according to an exemplary embodiment;
FIG. 19 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) referred to in the present disclosure is information authorized by the user or sufficiently authorized by each party.
Referring to fig. 1, a schematic diagram of an application environment of a video presentation method according to an exemplary embodiment is shown, where the application environment may include a terminal 110 and a server 120, and the terminal 110 and the server 120 may be connected through a wired network or a wireless network.
The terminal 110 may have installed therein an application program or the like providing a video display function, and the application program may be an application program specially providing a video display function, such as a short video application program, or may be another application program having a video display function, such as a news application program having a video display function, or the like. The application program can utilize the local page configuration information and the playing attribute information of the original video to perform page adaptation processing on the original video to obtain a video to be played, determine the display position information of the video to be played in the video playing page, respond to a video playing triggering instruction, obtain the video to be played and the display position information, and display the video to be played in the video playing page according to the display position information. In particular, the terminal 110 may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and other types of electronic devices. Optionally, the operating system running on the electronic device may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
The server 120 may be a server that provides a background service for an application in the terminal 110, for example, in response to a video information acquisition request sent by the terminal 110, acquiring the playing attribute information of the original video and sending the obtained playing attribute information to the terminal 110. The server 120 may also be another server connected to and communicating with a background server of the application, for example, a server platform for performing video Content identification, specifically, the server 120 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, CDN (Content Delivery Network), big data, and an artificial intelligence platform.
The video display method of the embodiment of the disclosure can be executed by an electronic device, and the electronic device can be a terminal or a server, can be executed by the terminal or the server alone, and can also be executed by the terminal and the server in cooperation with each other.
Fig. 2 is a flowchart illustrating a video presentation method according to an exemplary embodiment, and as shown in fig. 2, for example, the video presentation method is applied to the terminal of fig. 1, and includes the following steps:
in step S201, in response to a video loading instruction, local page configuration information and playing attribute information of an original video corresponding to the video loading instruction are acquired.
Specifically, the original video may represent unprocessed video information, and then page adaptation processing may be performed on the original video (for example, scaling, rotating angle, cropping, and the like are performed on the original video to obtain a video to be played), so as to obtain the video to be played.
Specifically, the local page configuration information may represent configuration information of a video playing page corresponding to a target terminal, where the target terminal may be a terminal running the application providing the video display function (that is, a terminal currently used by a user, and a video loading instruction acts on the target terminal). In an optional embodiment, the local page configuration information may include, but is not limited to, page size information of the video playing page, position information of a preset functional region in the video playing page, and the like, in a specific embodiment, the page size information of the video playing page is consistent with the screen size information of the target terminal, and the screen size information of the target terminal may be obtained by obtaining a screen resolution of the current terminal, so as to determine the page size information of the video playing page, and the page size information may include a page width, a page height, and a page aspect ratio (i.e., a screen width, a screen height, and a screen aspect ratio of the terminal), so that full-screen display of a video is achieved, the video is displayed by maximally using the screen of the target terminal, and flexibility of video display is improved. The playback attribute information of the original video may indicate the size and content information of the original video, and in a specific embodiment, the playback attribute information of the original video may include, but is not limited to, the video type, video size information, and subtitle position information of the original video.
In an alternative embodiment, the video loading instruction may be generated when the application providing the video display function is detected to be started. In another optional embodiment, the video loading instruction may be a video playing triggering instruction of videos located in front of the original video by a preset number, for example, when the video playing triggering instruction of the video a is generated, the video playing triggering instruction may be used as a video loading instruction of the next 6 unplayed videos, so that page adaptation processing can be performed on the next 6 unplayed videos in advance, and when the video playing triggering instruction of the 6 th unplayed video is generated, the video playing triggering instruction of the 6 th unplayed video is continuously used as a video loading instruction of the next 6 unplayed videos of the 6 th unplayed video, and so on. And then can generate in advance and wait to broadcast the video to and wait to broadcast the show position information of video in the video broadcast page, need not to carry out page adaptation again when the video needs to show and handle, be favorable to promoting the real-time of video show, reduce the delay of video show.
In step S203, performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played, and determining display position information of the video to be played in the video playing page.
In the embodiment of the present disclosure, the video to be played is obtained by performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information of the original video (for example, scaling, rotating angle, cropping, and the like are performed on the original video to obtain the video to be played). The display position information may indicate a display position of the video to be played in the video playing page of the target terminal, specifically, the display position information may include coordinate information of a center of the video to be played in the video playing page, or, for example, the video to be played is rectangular, the display position information may include a corresponding position range of a wide side of the video to be played in the video playing page and a corresponding position range of a high side in the video playing page; in an optional embodiment, the display position information is determined in a process of performing page adaptation processing on the original video based on the local page configuration information and the play attribute information.
In an alternative embodiment, the playing attribute information includes a video type of an original video, video size information, and subtitle position information; the local page configuration information comprises page size information of a video playing page; the video size information may include an aspect ratio of the original video, the subtitle position information may indicate a position (e.g., a position range of subtitle width and height) of subtitle information in the original video, and the page size information may include a page width, a page height, and a page aspect ratio (in a specific embodiment, the page width, the page height, and the page aspect ratio are respectively consistent with a screen width, a screen height, and an aspect ratio of a terminal). Referring to fig. 3, the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page may include:
in step S301, when the video type of the original video is a first type and the video size information satisfies a first preset condition, a target video display area matched with the original video in the video playing page is determined based on the subtitle position information.
Specifically, the first type may indicate that the upper and lower portions of the video are not videos in the area filled with the preset color, where the preset color is consistent with the background color of the video playing page, and in a specific embodiment, the preset color is black. In practical applications, when the upper and lower portions of the video are not filled with the preset color (inconsistent with the background color of the video playing page), there is a high possibility of affecting the preset functional area in the video playing page, so it is necessary to perform corresponding adaptation processing on the preset functional area. In an embodiment of the present disclosure, the first preset condition is determined based on the page size information, and in a specific embodiment, the first preset condition may be: the aspect ratio of the original video is greater than or equal to a preset threshold, and less than or equal to the page aspect ratio, and in a specific embodiment, the preset threshold may be 12: 9. When the aspect ratio of the original video is larger than a preset threshold value and smaller than the page aspect ratio, the size format of the original video is moderate, and a target video display area matched with the original video in the video playing page can be determined, so that the video playing page is maximally utilized while the video display effect is ensured.
In an optional embodiment, the local page configuration information further includes a plurality of video display areas in the video playing page; in a specific embodiment, the plurality of video display areas may be determined according to position information of a preset functional area in the video playing page, where the preset functional area may indicate a fixed area in the video playing page, specifically, refer to fig. 4, where fig. 4 is a schematic diagram of a video playing page, the preset functional area may include a terminal state display area, a top navigation area, and a bottom navigation area, and when an operating system of the terminal device is an ios system, the preset functional area may further include a bottom security area.
Referring to fig. 5, the determining the target video display area in the video playing page matching the original video based on the subtitle position information may include:
in step S501, a current display area is determined from the plurality of video display areas based on a preset matching sequence corresponding to the plurality of video display areas.
Specifically, the preset matching sequence is obtained by sorting the video display areas in a descending order based on the size information corresponding to the video display areas, please refer to fig. 6, fig. 6 shows the plurality of video presentation areas (when the operating system of the terminal device is an ios system, there is no second video presentation area) arranged according to the preset matching sequence, the gray area in each video presentation page in fig. 6 is a video presentation area, sorting in descending order according to the corresponding size information of the video display area to obtain the preset matching sequence, the multiple video display areas can be sequentially used as the current display area for carrying out area adaptation according to the preset matching sequence, so that the video is enabled to be as large as possible under the condition of ensuring the integrity of video display, the effect of video display is improved, and the watching experience of a user is improved.
In step S503, performing region adaptation on the original video and the current display region, and determining a subtitle adaptation result based on the subtitle position information.
Specifically, performing the region adaptation on the original video and the current display region may include scaling the original video in an equal ratio according to a ratio of the original video until the current display region is full (for example, scaling the original video to have a width consistent with the width of the current display region, and if the original video is not consistent with the width of the current display region, continuing scaling the original video to have a height consistent with the height of the current display region), aligning a center of the scaled original video with a center of the current display region, and obtaining a subtitle adaptation result according to the subtitle position information. The caption adaptation result may indicate that, after the original video is subjected to the region adaptation with respect to the current display region, the current position information (which may be the current position coordinate range of the caption information) of the caption information in the original video, that is, the current position information of the caption information in the original video after the geometric scaling and the center alignment. And sequentially taking the plurality of video display areas as the current display area according to a preset matching sequence, wherein the process of carrying out area adaptation on the original video and the current display area is the process of continuously adjusting and reducing the original video until the most appropriate video display area is determined to be taken as the target video display area.
In step S505, when the subtitle adaptation result satisfies a subtitle display condition, the current display area is used as the target video display area.
Specifically, the subtitle adaptation result may indicate current position information of subtitle information in the original video (for example, a current position coordinate range of the subtitle information) after performing region adaptation on the original video and the current display region; in an alternative embodiment, the subtitle display condition may be: in practical application, the preset subtitle display area may be an area (i.e., a gray area shown in the second column of the second drawing in fig. 6) below the top navigation area and above the bottom navigation area in the video playing page, and at this time, the subtitle information in the original video does not exceed the left and right boundaries and cannot be obscured by the preset functional area, which may cause the subtitles to be unclear. The method is beneficial to improving the display effect of the video and avoiding the blocking of important information (such as subtitle information).
In practical application, the whole background of a video is incomplete or is shielded by a preset functional area and is not easy to cause obstacle on the understanding of the whole content of the video, subtitle information in the video often indicates more important content in the video, the requirements on the integrity and the definition of the subtitle information are higher, the region adaptation is carried out on an original video and a current display region according to a preset matching sequence, a subtitle adaptation result is determined, under the condition that the subtitle adaptation result meets a subtitle display condition, the current display region is used as a target video display region, the video is enabled to be as large as possible under the condition that the complete definition of the video subtitle information display is guaranteed, the video display effect is improved, and the watching experience of a user is improved.
Referring to fig. 7, after performing the area adaptation on the original video and the current display area, the determining a target video display area in the video playing page, which matches the original video, based on the subtitle position information may further include:
in step S701, the video size information in the current display area and the area size information of the current display area are obtained.
Specifically, performing area adaptation on the original video and the current display area may further include scaling the original video in an equal ratio according to a ratio of the original video, and if the current display area cannot be fully filled (for example, if the width of the original video is equal to the width of a video playing page, the height of the original video is smaller than the height of the video playing page, or if the height of the original video is equal to the height of the video playing page, the width of the original video is smaller than the width of the video playing page), scaling the original video in an equal ratio according to the ratio of the original video until the width or the height of the current display area is fully filled. After performing the region adaptation on the original video and the current display region each time, the video size information in the current display region and the region size information of the current display region may be obtained.
In step S703, the step of determining the subtitle adaptation result based on the subtitle position information is performed when the video size information in the current display area and the area size information satisfy a preset matching condition.
In a specific embodiment, the preset matching condition may include: and the video size information in the current display area is consistent with the area size information (the area of the video in the current display area is equal to the area of the current display area, namely the original video can fully support the current display area), and the step of determining the caption adaptation result based on the caption position information is executed. When the original video cannot be fully displayed in the current display area, the original video is displayed in an adaptive mode according to the current display area, so that a left gap and a right gap are possibly left, the video display effect is influenced, and the step of determining the subtitle adaptation result based on the subtitle position information is executed under the condition that the video size information in the current display area and the area size information meet the preset matching condition, so that the video display effect is favorably improved.
Referring to fig. 8, after performing the area adaptation on the original video and the current display area, the determining the target video display area matched with the original video in the video playing page based on the subtitle position information may further include:
in step S801, a cropping ratio of the original video is determined.
In an optional embodiment, the area adapting of the original video and the current display area may further include cropping a portion of the aligned original video beyond the current display area, and determining a cropping ratio of the original video.
In step S803, in the case that the cropping scale of the original video satisfies a preset cropping condition, the step of determining a subtitle adaptation result based on the subtitle position information is performed.
In a specific embodiment, the preset clipping condition may include: in a specific embodiment, when the screen resolution of the current terminal is greater than 2260f/1080f, the preset proportion threshold is 20%, and when the screen resolution of the current terminal is less than or equal to 2260f/1080f, the preset proportion threshold is 15%.
By determining the cutting proportion of the original video and executing the step of determining the subtitle adaptation result based on the subtitle position information under the condition that the cutting proportion meets the preset cutting condition, the content information of the original video can be prevented from being lost too much, and the integrity of the video content is ensured while the video display effect is improved by page adaptation (screen adaptation).
In step S303, performing area adaptation processing on the original video according to the target video display area to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
Specifically, performing the area adaptation process on the original video according to the target video display area may include: scaling the original video in equal proportion according to the proportion of the original video until the target video display area is full (for example, scaling the original video to the extent that the width of the original video is consistent with the width of the target video display area, and if the original video is not consistent with the target video display area, continuing scaling the original video to the extent that the height of the original video is consistent with the height of the target video display area), aligning the center of the scaled original video with the center of the target video display area, finally cutting the part of the aligned original video, which exceeds the target video display area, using the cut original video as the video to be played, and using the position information of the cut original video as the display position information of the video to be played in the video playing page.
The method comprises the steps of determining a target video display area matched with an original video in a video playing page, carrying out area adaptation processing on the original video according to the target video display area to obtain the video to be played, and determining display position information of the video to be played in the video playing page, so that the video playing page can be maximally utilized while the video display effect is ensured.
As the local page configuration information may further include position information of a preset functional area in the video playing page, referring to fig. 9, the method may further include:
in step S901, when the video size information in the current display area and the area size information do not satisfy a preset matching condition, performing width adaptation processing on the original video based on the current display area to obtain updated subtitle position information.
In a specific embodiment, when the video size information in the current display area and the area size information do not satisfy the preset matching condition, that is, the video size information in the current display area and the area size information are inconsistent (the area of the video in the current display area is not equal to the area of the current display area, that is, the original video cannot fill up the current display area). Performing width adaptation processing on the original video based on the current presentation area may include: scaling the original video in equal proportion according to the proportion of the original video until the width of the scaled original video is equal to the width of the current display area, and then aligning the top edge of the scaled original video with the top edge of the current display area to obtain updated subtitle position information, where the updated subtitle position information may indicate current position information (which may be a current position coordinate range of subtitle information) of subtitle information in the original video.
In step S903, subtitle occlusion information is determined based on the position information of the preset functional region and the updated subtitle position information.
Specifically, the subtitle occlusion information may indicate an occlusion condition of a preset functional region on the subtitle information of the original video.
In step S905, under the condition that the subtitle shielding information indicates that the preset functional region shields the subtitle information of the original video, performing page adaptation processing on the original video based on the position information of the preset functional region to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
Specifically, the preset function area includes a terminal state display area, a top navigation area, a bottom navigation area, and a bottom safety area. In a specific embodiment, in the case that the subtitle occlusion information indicates that the subtitle information of the original video is occluded by the top navigation area, performing page adaptation processing on the original video based on the position information of the preset functional area may include: after scaling the original video in equal proportion according to the proportion of the original video until the width of the scaled original video is equal to the width of the current display area, aligning the scaled original video with the bottom edge of the top navigation area according to the top edge of the subtitle information, taking the aligned original video as the video to be played, taking the position information of the aligned original video as the display position information of the video to be played in the video playing page, please refer to fig. 10, where the subtitle occlusion information on the left side of fig. 10 indicates the display effect of the top navigation area when the subtitle information of the original video is occluded, and the adjusted effect (the gray area in the figure is the video). In a specific embodiment, after aligning the top edge of the subtitle information with the bottom edge of the top navigation area, it may further be detected whether the bottom navigation area blocks the subtitle information, and when the bottom navigation area blocks the subtitle information, a portion of the video that exceeds the top edge of the bottom navigation area is cut, please refer to fig. 11, where the left side of fig. 11 is a display effect when the adjusted bottom navigation area blocks the subtitle information of the original video, and the right side is an adjusted effect (a gray area in the figure is a video). In a specific embodiment, in the case that the subtitle occlusion information indicates that the top navigation area does not occlude the subtitle information of the original video, and the bottom navigation area occludes the subtitle information of the original video, performing page adaptation processing on the original video based on the position information of the preset functional area may include: after scaling the original video in equal proportion according to the proportion of the original video until the width of the scaled original video is equal to the width of the current display area, aligning the scaled original video with the top edge of the bottom navigation area according to the bottom edge of the subtitle information, taking the aligned original video as the video to be played, taking the position information of the aligned original video as the display position information of the video to be played in the video display page, please refer to fig. 12, where the left side of fig. 12 is a display effect when the bottom navigation area blocks the subtitle information of the original video at this time, and the right side is an adjusted effect (a gray area in the figure is a video). In a specific embodiment, because a focus of a user tends to focus on the upper half of a video when the user watches the video, if subtitle information exists both above and below the original video, after aligning the scaled original video with the top edge of the bottom navigation area according to the bottom edge of the subtitle information, the top navigation area shields the subtitle above, the top edge of the subtitle above is aligned with the bottom edge of the top navigation area, and the part of the subtitle below exceeding the bottom navigation area is cut in the manner of fig. 11, so that the subtitle information is preferentially ensured not to be shielded by the top navigation area, and the display effect of the video is improved. In some embodiments, when the upper and lower edges of the video fall in the middle of the preset function area (e.g. the middle of the terminal status display area, or the middle of the top navigation area, or the middle of the bottom safety area) after the video is moved according to the position of the subtitle information, the portion exceeding the preset function area is cut, as shown in fig. 13, the left side of fig. 13 is the effect that the upper edge of the video falls in the middle of the top navigation area at this time, the right side is the adjusted effect (the gray area in the figure is the video), and when the video edge falls in the middle of the preset function area, the display effect of the video that cuts off the preset function area is generated, the video display is affected, and the use of the preset function area is affected, and the display effect of the video and the playing page is improved by cutting the excess portion, the user experience is improved.
The original video is subjected to page adaptation processing by utilizing the subtitle shielding information and the position information of the preset functional area to obtain the video to be played, and the display position information of the video to be played in the video playing page is determined, so that the display effect of the video is improved, important information (such as the subtitle information is shielded) is avoided, the video is prevented from influencing the use of the functional area, and the user experience is improved.
Referring to fig. 14, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information includes page size information of the video playing page and position information of a preset functional area in the video playing page. The aforementioned performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page may include:
in step S1401, when the video type is the first type and the video size information satisfies a second preset condition, performing scaling processing on the original video according to the page size information to obtain the video to be played.
Specifically, the second preset condition may be: the aspect ratio of the original video is smaller than a preset threshold, which may be 12:9 in a specific embodiment. When the aspect ratio of the original video is smaller than a preset threshold, the aspect ratio of the original video is smaller (the height is smaller), and the original video can be scaled in an equal ratio according to the proportion of the original video until the width of the original video is equal to the width of a video playing page, so that the video to be played is obtained.
In step S1403, size information of the video to be played is determined.
Specifically, determining the size information of the video to be played at this time may include determining the height of the video to be played.
In step S1405, display position information of the video to be played in a video playing page is determined according to the position information of the preset functional region and the size information of the video to be played.
In a specific embodiment, assuming that the height of the portion above the top edge of the bottom navigation area in the video playing page is H1, the height of the video to be played is H2, the height of the portion above the top edge of the bottom navigation area in the video playing page is H3, and when 1/2H1+1/2H2 is greater than or equal to H3, the video to be played is centered in the area above the top edge of the bottom navigation area and below the bottom edge of the top navigation area in the video playing page, so as to obtain the display position information of the video to be played in the video playing page. (ii) a 1/2H1+1/2H2< H3, the video to be played is centered above the top edge of the bottom navigation area in the video playing page to obtain the display position information of the video to be played in the video playing page, so that the situation that the video is too low to enable the control on the right side of the screen to shield the video content is avoided, and the display effect of the video is improved.
Referring to fig. 15, the playing attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page; the aforementioned performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page may include:
in step S1501, when the video type is the first type and the video size information meets a third preset condition, performing page width adaptation processing on the original video according to the page size information to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
Specifically, the third preset condition may be determined based on the page size information, and in a specific embodiment, the third preset condition may be: the method comprises the steps that the aspect ratio of an original video is larger than the aspect ratio of a page, when the aspect ratio of the original video is larger than the aspect ratio of the page, the aspect ratio of the original video is larger (the original video is larger in height and is slender), the original video can be scaled in an equal ratio according to the proportion of the original video until the width of the original video is equal to the width of a video playing page, then the center of the scaled original video is aligned with the center of the whole video playing page, finally the part, exceeding the video playing page, of the aligned original video is cut, the video to be played is obtained, and the display position information of the video to be played in the video playing page is determined.
Aiming at an original video with a large height-width ratio, if the original video is aligned with the height of a video playing page, more gaps can be caused to appear on the left and right sides of the video playing page, the video type is the first type, and under the condition that the video size information meets a third preset condition, page width adaptation processing is carried out on the original video according to the page size information to obtain the video to be played and confirm the display position information of the video to be played in the video playing page, so that the situation that too many gaps appear in a video display area when the height-width ratio of the original video is large is avoided, the video display area is utilized to the maximum, and the video display effect is improved.
Referring to fig. 16, the playing attribute information of the original video includes the video type and the subtitle position information of the original video; the local page configuration information includes position information of a preset functional area in the video playing page. The aforementioned performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page may include:
in step S1601, when the video type of the original video is a second type, a preset display area in the video playing page is determined based on the position information of the preset functional area.
Specifically, the second type may indicate that the upper and lower portions of the video are videos with a preset color filling area, where the preset color is consistent with a background color of a video playing page, and in a specific embodiment, the preset color is black, the original video is a black-backed three-segment video, that is, the upper portion and the lower portion of the original video are black filling areas, the black filling areas may have subtitle information, and the middle portion is content with other colors. In practical application, when the upper and lower portions of the video are filling areas with preset colors (consistent with the background color of the video playing page), the possibility of influencing the preset functional area in the video playing page is low. Determining a preset display area in the video playing page based on the position information of the preset functional area may be: the area above the top edge of the bottom navigation area.
In step S1603, performing centering adaptation on the original video based on the preset display area to obtain the video to be played and updated subtitle position information.
Specifically, the original video is subjected to centered adaptation processing based on the preset display area, the original video may be scaled proportionally according to the original video until the width of the original video is consistent with the width of the preset display area (i.e., consistent with the width of the video playing page/terminal screen), so as to obtain the video to be played, then the scaled video is moved to the middle of the preset display area, so as to obtain updated subtitle position information, and the updated subtitle position information indicates the current position information of the subtitle information in the original video (which may be the current position coordinate range of the subtitle information).
In step S1605, subtitle occlusion information is determined based on the position information of the preset function region and the updated subtitle position information.
Specifically, the subtitle occlusion information may indicate an occlusion condition of a preset functional region on the subtitle information of the original video.
In step S1607, when the subtitle shielding information indicates that the subtitle information of the original video shields the preset function region, the original video is moved based on the position information of the preset function region, and the display position information of the video to be played in the video playing page is determined.
Specifically, the preset function area includes a terminal state display area, a top navigation area, a bottom navigation area, and a bottom safety area. In a specific embodiment, when the subtitle occlusion information indicates that the subtitle information of the original video is occluded by the top navigation area, performing mobile processing on the original video based on the position information of the preset functional area, and determining the display position information of the video to be played in the video playing page may include: and aligning the original video at the moment to the bottom edge of the top navigation area according to the top edge of the subtitle information, and taking the position information of the aligned original video as the display position information of the video to be played in the video playing page. In another specific embodiment, when the subtitle occlusion information indicates that the top navigation area does not occlude the subtitle information of the original video, and the bottom navigation area occludes the subtitle information of the original video, the original video at that time is aligned to the top edge of the bottom navigation area according to the bottom edge of the subtitle information, and the position information of the aligned original video is used as the display position information of the video to be played in the video playing page. In a specific embodiment, because a focus of a user tends to focus on the upper half of a video when the user watches the video, if subtitle information exists both above and below an original video, after the original video at that time is aligned with the top edge of a bottom navigation area according to the bottom edge of the subtitle information, a top navigation area shields subtitles above, and the top edge of the top navigation area is still aligned with the bottom edge of the top navigation area according to the top edge of the subtitle information, so that the subtitle information is preferentially ensured not to be shielded by the top navigation area, and the display effect of the video is improved.
When the video type is the second type, under the condition that the subtitle shielding information indicates that the subtitle information of the original video shields the preset functional area, the original video is subjected to mobile processing based on the position information of the preset functional area, and the display position information of the video to be played in the video playing page is determined, so that the display effect of the video is improved, important information (such as the subtitle information is shielded) is avoided, the video is prevented from influencing the use of the functional area, and the user experience is improved.
Referring to fig. 17, the playing attribute information of the original video includes the video type and the subtitle position information of the original video; the local page configuration information includes position information of a preset functional area in the video playing page. The performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
in step S1701, in the case that the video type of the original video is the second type, a preset presentation area in the video playback page is determined based on the position information of the preset functional area.
In step S1703, performing centering adaptation on the original video based on the preset display area to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
Specifically, the original video does not include subtitle information, and the determining of the preset display area in the video playing page based on the position information of the preset functional area may be: the area above the top edge of the bottom navigation area. Performing centered adaptation processing on the original video based on the preset display area, scaling the original video in an equal ratio according to the proportion of the original video until the width of the original video is consistent with the width of the preset display area (namely consistent with the width of the video playing page/terminal screen), obtaining the video to be played, and then moving the scaled video to the middle of the preset display area to obtain the display position information of the video to be played in the video playing page.
The original video is subjected to centered adaptation processing based on the preset display area to obtain the video to be played, and display position information of the video to be played in the video playing page is determined, so that the video can be displayed at a reasonable position, and the video display effect is improved.
In step S205, in response to a video playing triggering instruction, the video to be played is displayed in the video playing page based on the display position information.
In an optional embodiment, the video to be played corresponds to the video playing triggering instruction, and the video playing triggering instruction may be generated when preset gesture information triggered by the user on the screen is detected (for example, the user makes a downward stroke on the screen, and the next video is the video to be played); or, the user may trigger a video playing control on the terminal application (for example, a key for switching a next video, where the next video is the video to be played), and generate the video playing trigger instruction.
In the embodiment of the disclosure, the video to be played and the reasonable display position information which are suitable for display are obtained by combining the condition of the original video and the local page configuration condition, so that the video display is favorably and reasonably performed, and the video display effect is improved.
Fig. 18 is a block diagram illustrating a video presentation device according to an example embodiment. Referring to fig. 18, the video presentation apparatus 1800 includes an information acquisition module 1810, a page adaptation processing module 1820, and a video presentation module 1830, wherein:
an information obtaining module 1810 configured to execute, in response to a video loading instruction, obtaining local page configuration information and playing attribute information of an original video corresponding to the video loading instruction, where the local page configuration information represents configuration information of a video playing page corresponding to a target terminal;
a page adaptation processing module 1820, configured to perform page adaptation processing on the original video based on the local page configuration information and the playing attribute information, to obtain a video to be played, and to determine display position information of the video to be played in the video playing page;
a video presentation module 1830 configured to perform presentation of the video to be played in the video playing page based on the presentation position information in response to a video playing trigger instruction. In an exemplary embodiment, the play attribute information includes a video type, video size information, and subtitle position information of the original video; the local page configuration information comprises page size information of the video playing page; the page adaptation processing module 1820 includes:
a target video display area determination unit configured to determine a target video display area matched with the original video in the video playing page based on the subtitle position information under the condition that the video type of the original video is a first type and the video size information meets a first preset condition, wherein the first preset condition is determined based on the page size information;
and the area adaptation unit is configured to perform area adaptation processing on the original video according to the target video display area to obtain the video to be played and determine display position information of the video to be played in the video playing page.
In an exemplary embodiment, the local page configuration information further includes a plurality of video presentation areas in the video playback page; the target video presentation area determining unit includes:
the sequential matching unit is configured to determine a current display area from the plurality of video display areas based on a preset matching sequence corresponding to the plurality of video display areas; the preset matching sequence is obtained by sequencing the video display areas in a descending order based on the size information corresponding to the video display areas;
the adaptation unit is configured to perform region adaptation on the original video and the current display region and determine a subtitle adaptation result based on the subtitle position information;
and the area determining unit is configured to execute that the current display area is taken as the target video display area under the condition that the subtitle adaptation result meets a subtitle display condition.
In an exemplary embodiment, the target video presentation area determining unit further includes:
a size obtaining unit configured to obtain video size information in the current display area and area size information of the current display area after performing area adaptation on the original video and the current display area;
a matching condition checking unit configured to execute the step of determining the subtitle adaptation result based on the subtitle position information if the video size information in the current presentation area and the area size information satisfy a preset matching condition.
In an exemplary embodiment, the local page configuration information further includes location information of a preset functional area in the video playback page, and the apparatus further includes:
the width adaptation unit is configured to perform width adaptation processing on the original video based on the current display area under the condition that the video size information in the current display area and the area size information do not meet preset matching conditions, so as to obtain updated subtitle position information;
a subtitle occlusion checking unit configured to perform determining subtitle occlusion information based on the position information of the preset functional region and the updated subtitle position information;
and the shielding adaptation unit is configured to perform page adaptation processing on the original video based on the position information of the preset functional area under the condition that the subtitle shielding information indicates that the preset functional area shields the subtitle information of the original video, so as to obtain the video to be played, and determine the display position information of the video to be played in the video playing page.
In an exemplary embodiment, the target video presentation area determining unit further includes:
a cropping ratio determination unit configured to perform determining a cropping ratio of the original video;
a preset clipping condition checking unit configured to execute the step of determining the subtitle adaptation result based on the subtitle position information if the clipping proportion of the original video satisfies a preset clipping condition.
In an exemplary embodiment, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page; the page adaptation processing module 1820 further includes:
the scaling unit is configured to perform scaling processing on the original video according to the page size information to obtain the video to be played under the condition that the video type is a first type and the video size information meets a second preset condition;
a size determination unit configured to perform determination of size information of the video to be played;
and the position determining unit is configured to determine display position information of the video to be played in a video playing page according to the position information of the preset functional area and the size information of the video to be played.
In an exemplary embodiment, the play attribute information of the original video includes video type and video size information of the original video; the local page configuration information comprises page size information of the video playing page and position information of a preset functional area in the video playing page; the page adaptation processing module 1820 includes:
and the page width adapting unit is configured to perform page width adapting processing on the original video according to the page size information to obtain the video to be played and determine display position information of the video to be played in the video playing page under the condition that the video type is a first type and the video size information meets a third preset condition, wherein the third preset condition is determined based on the page size information.
In an exemplary embodiment, the playing attribute information of the original video includes a video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page; the page adaptation processing module 1820 includes:
a first preset display area determination unit configured to determine a preset display area in the video playing page based on the position information of the preset functional area when the video type of the original video is a second type;
the first centering adaptation unit is configured to perform centering adaptation processing on the original video based on the preset display area to obtain the video to be played and updated subtitle position information;
a subtitle occlusion determining unit configured to perform determining subtitle occlusion information based on the position information of the preset function region and the updated subtitle position information;
and the mobile processing unit is configured to execute mobile processing on the original video based on the position information of the preset functional area under the condition that the subtitle shielding information indicates that the subtitle information of the original video shields the preset functional area, and determine the display position information of the video to be played in the video playing page.
In an exemplary embodiment, the playing attribute information of the original video includes a video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page; the page adaptation processing module 1820 includes:
a second preset display area determination unit configured to determine a preset display area in the video playing page based on the position information of the preset functional area when the video type of the original video is a second type;
the second centering adaptation unit is configured to perform centering adaptation processing on the original video based on the preset display area to obtain the video to be played, and determine display position information of the video to be played in the video playing page.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The video display device of the embodiment of the disclosure obtains the local page configuration information and the playing attribute information of the original video corresponding to the video loading instruction by responding to the video loading instruction, wherein the local page configuration information represents the configuration information of the video playing page corresponding to the target terminal; performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played and determining display position information of the video to be played in a video playing page; and responding to the video playing triggering instruction, and displaying the video to be played in the video playing page based on the display position information. By using the technical scheme provided by the embodiment of the disclosure, the video to be played suitable for display and reasonable display position information can be obtained by combining the condition of the original video and the local page configuration condition, and the video display effect is improved.
In one exemplary embodiment, there is also provided an electronic device, comprising a processor; a memory for storing processor-executable instructions; the processor is configured to execute the instructions stored in the memory to implement any one of the video presentation methods provided by the embodiments of the present disclosure.
The electronic device may be a terminal, a server or a similar computing device, taking the electronic device as a terminal as an example, fig. 19 is a block diagram of an electronic device for video presentation according to an exemplary embodiment, specifically:
the terminal may include RF (Radio Frequency) circuitry 1910, memory 1920 including one or more computer-readable storage media, input unit 1930, display unit 1940, sensors 1950, audio circuitry 1960, WiFi (wireless fidelity) module 1970, a processor 1980 including one or more processing cores, and a power supply 1990. Those skilled in the art will appreciate that the terminal structure shown in fig. 19 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
RF circuitry 1910 may be used for receiving and transmitting signals during a message or call, and in particular, for receiving downlink information from a base station and processing the received downlink information by one or more processors 1980; in addition, data relating to uplink is transmitted to the base station. In general, RF circuitry 1910 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, RF circuitry 1910 may also communicate with networks and other terminals via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
The memory 1920 is operable to store software programs and modules, and the processor 1980 executes various functional applications and data processing by operating the software programs and modules stored in the memory 1920. The memory 1920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 1920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1920 may also include a memory controller to provide the processor 1980 and the input unit 1930 access to the memory 1920.
The input unit 1930 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input units 1930 may include a touch-sensitive surface 1931 as well as other input devices 1932. The touch-sensitive surface 1931, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 1931 (e.g., operations by a user on or near the touch-sensitive surface 1931 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, touch sensitive surface 1931 may include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 1980, and can receive and execute commands from the processor 1980. Additionally, the touch-sensitive surface 1931 can be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 1930 may also include other input devices 1932 in addition to the touch-sensitive surface 1931. In particular, other input devices 1932 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1940 may be used to display information input by or provided to the user and various graphic user interfaces of the terminal, which may be configured of graphics, text, icons, video, and any combination thereof. The Display unit 1940 may include a Display panel 1941, and optionally, the Display panel 1941 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 1931 can overlie the display panel 1941, and upon detection of a touch operation on or near the touch-sensitive surface 1931, the touch operation can be communicated to the processor 1980 for determination of the type of touch event, whereupon the processor 1980 can provide a corresponding visual output on the display panel 1941 in accordance with the type of touch event. Where touch-sensitive surface 1931 and display panel 1941 may implement input and output functions as two separate components, in some embodiments touch-sensitive surface 1931 may be integrated with display panel 1941 to implement input and output functions.
The terminal may also include at least one sensor 1950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 1941 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 1941 and/or a backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the terminal is stationary, and can be used for applications of recognizing terminal gestures (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
Audio circuitry 1960, speaker 1961, microphone 1962 may provide an audio interface between a user and the terminal. The audio circuit 1960 may transmit the received electrical signal converted from the audio data to the speaker 1961, and convert the electrical signal into an audio signal by the speaker 1961 and output the audio signal; on the other hand, the microphone 1962 converts a collected sound signal into an electric signal, receives it by the audio circuit 1960, converts it into audio data, processes it by the audio data output processor 1980, and transmits it to, for example, another terminal via the RF circuit 1910 or outputs it to the memory 1920 for further processing. The audio circuit 1960 may also include an earbud jack to provide communication of a peripheral headset with the terminal.
WiFi belongs to a short distance wireless transmission technology, and the terminal can help a user to send and receive e-mails, browse webpages, access streaming media and the like through a WiFi module 1970, and provides wireless broadband internet access for the user. Although fig. 19 shows a WiFi module 1970, it is understood that it does not belong to the essential constitution of the terminal, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1980 is a control center of the terminal, connects various parts of the entire terminal by various interfaces and lines, performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 1920 and calling data stored in the memory 1920, thereby monitoring the terminal as a whole. Optionally, processor 1980 may include one or more processing cores; preferably, the processor 1980 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1980.
The terminal also includes a power supply 1990 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 1980 via a power management system, such that functions to manage charging, discharging, and power consumption are performed via the power management system. The power supply 1990 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which are not described herein again. In this embodiment, the terminal further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include instructions for performing any of the video presentation methods provided by the method embodiments described above.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 1920 comprising instructions, executable by the processor 1980 of the apparatus 1900 for performing the method described above is also provided. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video presentation method in the embodiments of the present disclosure.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided by the present disclosure may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for video presentation, comprising:
responding to a video loading instruction, acquiring local page configuration information and playing attribute information of an original video corresponding to the video loading instruction, wherein the local page configuration information represents configuration information of a video playing page corresponding to a target terminal;
performing page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played, and determining display position information of the video to be played in the video playing page;
and responding to a video playing triggering instruction, and displaying the video to be played in the video playing page based on the display position information.
2. The method according to claim 1, wherein the playback attribute information includes a video type, video size information, and subtitle position information of the original video; the local page configuration information comprises page size information of the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
determining a target video display area matched with the original video in the video playing page based on the subtitle position information under the condition that the video type of the original video is a first type and the video size information meets a first preset condition, wherein the first preset condition is determined based on the page size information;
and performing area adaptation processing on the original video according to the target video display area to obtain the video to be played, and determining display position information of the video to be played in the video playing page.
3. The method of claim 2, wherein the local page configuration information further comprises a plurality of video presentation areas in the video playback page; the determining, based on the subtitle position information, a target video display area in the video playing page that matches the original video includes:
determining a current display area from the plurality of video display areas based on a preset matching sequence corresponding to the plurality of video display areas; the preset matching sequence is obtained by sequencing the video display areas in a descending order based on the size information corresponding to the video display areas;
performing area adaptation on the original video and the current display area, and determining a subtitle adaptation result based on the subtitle position information;
and taking the current display area as the target video display area under the condition that the subtitle adaptation result meets a subtitle display condition.
4. The method of claim 3, wherein the determining a target video presentation area in the video playback page that matches the original video based on the subtitle position information further comprises:
after the original video and the current display area are subjected to area adaptation, acquiring video size information in the current display area and area size information of the current display area;
and under the condition that the video size information in the current display area and the area size information meet a preset matching condition, executing the step of determining the subtitle adaptation result based on the subtitle position information.
5. The method of claim 4, wherein the local page configuration information further includes location information of a preset functional area in the video playback page, and wherein the method further comprises:
under the condition that the video size information in the current display area and the area size information do not meet preset matching conditions, performing width adaptation processing on the original video based on the current display area to obtain updated subtitle position information;
determining subtitle shielding information based on the position information of the preset function area and the updated subtitle position information;
and under the condition that the subtitle shielding information indicates that the preset functional area shields the subtitle information of the original video, performing page adaptation processing on the original video based on the position information of the preset functional area to obtain the video to be played, and determining the display position information of the video to be played in the video playing page.
6. The method according to claim 1, wherein the playback attribute information of the original video comprises video type and subtitle position information of the original video; the local page configuration information comprises position information of a preset functional area in the video playing page;
the performing, based on the local page configuration information and the playing attribute information, page adaptation processing on the original video to obtain a video to be played, and determining display position information of the video to be played in the video playing page includes:
determining a preset display area in the video playing page based on the position information of the preset functional area under the condition that the video type of the original video is a second type;
performing centering adaptation processing on the original video based on the preset display area to obtain the video to be played and updated subtitle position information;
determining subtitle shielding information based on the position information of the preset function area and the updated subtitle position information;
and under the condition that the subtitle shielding information indicates that the subtitle information of the original video shields the preset function area, performing mobile processing on the original video based on the position information of the preset function area, and determining the display position information of the video to be played in the video playing page.
7. A video presentation apparatus, said apparatus comprising:
the information acquisition module is configured to execute and respond to a video loading instruction, and acquire local page configuration information and playing attribute information of an original video corresponding to the video loading instruction, wherein the local page configuration information represents configuration information of a video playing page corresponding to a target terminal;
the page adaptation processing module is configured to perform page adaptation processing on the original video based on the local page configuration information and the playing attribute information to obtain a video to be played and determine display position information of the video to be played in the video playing page;
and the video display module is configured to respond to a video playing triggering instruction and display the video to be played in the video playing page based on the display position information.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the video presentation method of any one of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the video presentation method of any one of claims 1 to 6.
10. A computer program product comprising computer programs/instructions, characterized in that said computer programs/instructions, when executed by a processor, implement the video presentation method of any one of claims 1 to 6.
CN202110601494.9A 2021-05-31 2021-05-31 Video display method and device, electronic equipment and storage medium Active CN113438533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110601494.9A CN113438533B (en) 2021-05-31 2021-05-31 Video display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110601494.9A CN113438533B (en) 2021-05-31 2021-05-31 Video display method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113438533A true CN113438533A (en) 2021-09-24
CN113438533B CN113438533B (en) 2022-11-22

Family

ID=77804210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110601494.9A Active CN113438533B (en) 2021-05-31 2021-05-31 Video display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113438533B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017096893A1 (en) * 2015-12-08 2017-06-15 乐视控股(北京)有限公司 Method and apparatus for configuring video player in web page
CN107135415A (en) * 2017-04-11 2017-09-05 青岛海信电器股份有限公司 Video caption processing method and processing device
CN109842818A (en) * 2019-01-02 2019-06-04 平安科技(深圳)有限公司 A kind of video broadcasting method, device, computer equipment and storage medium
CN110446110A (en) * 2019-07-29 2019-11-12 深圳市东微智能科技股份有限公司 Playback method, video playback apparatus and the storage medium of video
CN112770183A (en) * 2020-11-10 2021-05-07 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017096893A1 (en) * 2015-12-08 2017-06-15 乐视控股(北京)有限公司 Method and apparatus for configuring video player in web page
CN107135415A (en) * 2017-04-11 2017-09-05 青岛海信电器股份有限公司 Video caption processing method and processing device
CN109842818A (en) * 2019-01-02 2019-06-04 平安科技(深圳)有限公司 A kind of video broadcasting method, device, computer equipment and storage medium
CN110446110A (en) * 2019-07-29 2019-11-12 深圳市东微智能科技股份有限公司 Playback method, video playback apparatus and the storage medium of video
CN112770183A (en) * 2020-11-10 2021-05-07 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113438533B (en) 2022-11-22

Similar Documents

Publication Publication Date Title
US10956280B2 (en) Data backup method, electronic device, and storage medium
US10304461B2 (en) Remote electronic service requesting and processing method, server, and terminal
CN108924037B (en) Display method of rich media communication RCS message and mobile terminal
US20200021652A1 (en) Method and device for synchronizing data, and electronic device
CN106254910B (en) Method and device for recording image
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN105989572B (en) Picture processing method and device
CN108668328B (en) Network switching method and mobile terminal
CN113313804B (en) Image rendering method and device, electronic equipment and storage medium
CN110784672B (en) Video data transmission method, device, equipment and storage medium
CN110309003B (en) Information prompting method and mobile terminal
CN107622234B (en) Method and device for displaying budding face gift
CN106446042B (en) Information display method and device
CN113438533B (en) Video display method and device, electronic equipment and storage medium
CN115118636B (en) Method and device for determining network jitter state, electronic equipment and storage medium
CN115390707A (en) Sharing processing method and device, electronic equipment and storage medium
CN115017406A (en) Live broadcast picture display method and device, electronic equipment and storage medium
CN113205452A (en) Image processing method and device, electronic equipment and storage medium
CN115361590B (en) Live video display method and device, electronic equipment and storage medium
CN110658948A (en) Method, apparatus and medium for touch operation
CN111966271B (en) Screen panorama screenshot method and device, terminal equipment and storage medium
CN113469923B (en) Image processing method and device, electronic equipment and storage medium
CN115379249B (en) Interactive processing method and device, electronic equipment and storage medium
CN115237317B (en) Data display method and device, electronic equipment and storage medium
CN113542206B (en) Image processing method, device and computer readable storage medium

Legal Events

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