Video preview method, device, terminal and storage medium
By dividing the video into multiple sub-play areas and playing the corresponding sub-video in each area, the problem of long preview times for users to quickly preview key video content is solved, achieving a highly efficient video preview effect.
Patent Information
- Application Number
- CN202011442171.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-08
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-12-08
AI Technical Summary
In existing technologies, users need to manually locate key video content when quickly previewing it, which is time-consuming and prone to missing video content, resulting in low preview efficiency.
The video is divided into multiple sub-playback areas according to its playback duration, and the corresponding sub-video is played in each sub-playback area. The decoder locates key frames for decoding and playback.
It enables the simultaneous playback of multiple sub-videos across the entire playback area, allowing users to quickly preview the full content of the video and greatly improving preview efficiency.
Smart Images

Figure CN112616082B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video processing technology, and in particular to a video preview method, device, terminal and storage medium. Background Art
[0002] With the continuous development of Internet technology, more and more users prefer to obtain information by watching videos. When users watch some long videos, such as movies, they want to quickly see the key content of the video to understand the main content of the video.
[0003] In the related art, when a user wants to quickly see the key content of a video, the user can place the mouse on the playback progress bar in the video player. The video player can then locate the key frame corresponding to the position in the video based on the position of the mouse on the playback progress bar, and display the key frame above the playback progress bar, thereby achieving the purpose of previewing the key content of the video.
[0004] However, the above method requires the user to manually locate the key content they want to see, which is time-consuming. In addition, locating the key frame through the video player will miss the video content near the key frame, making it impossible for the user to preview all the video content they want to see, resulting in low efficiency in user video preview. Summary of the invention
[0005] The embodiments of the present application provide a video preview method, device, terminal and storage medium, which can improve the efficiency of user video preview. The technical solution is as follows:
[0006] In one aspect, a video preview method is provided, the method comprising:
[0007] Determine the playback area of the target video to be played;
[0008] Dividing the playback area into a plurality of sub-playback areas;
[0009] Determine the playback information of each of the sub-playback areas based on the multiple sub-playback areas and the playback duration of the target video;
[0010] Based on the playback information of each of the sub-playback areas, multiple sub-videos of the target video are acquired, where one sub-video corresponds to one sub-playback area;
[0011] The corresponding sub-video is played in each of the sub-playing areas of the play area.
[0012] In a possible implementation, the method further includes:
[0013] In response to the division operation of the playback area, determining the number of the sub-playback areas;
[0014] Based on the size parameter of the play area and the number of the sub-play areas, a plurality of the sub-play areas are displayed.
[0015] In a possible implementation, the method further includes:
[0016] Determine the duration of playing the target video in each of the sub-playing areas based on the number of the sub-playing areas and the playing duration of the target video;
[0017] Based on the playing duration of the target video in each of the sub-playing areas and the playing duration of the target video, the starting playing time of the target video in each of the sub-playing areas is determined.
[0018] In a possible implementation, the method further includes:
[0019] The play duration of the target video is evenly divided according to the number of the sub-play regions to obtain the play duration of the target video in each of the sub-play regions.
[0020] In a possible implementation, the method further includes:
[0021] Based on the playback information of each sub-playback area, the decoders corresponding to each sub-playback area respectively decode the target video to obtain multiple sub-videos of the target video.
[0022] In a possible implementation, the method further includes:
[0023] The decoder corresponding to each sub-playback area locates each key frame corresponding to each start playback time in the target video based on the start playback time of the target video in each sub-playback area;
[0024] The decoder corresponding to each sub-playback area decodes the target video based on the playback duration of the target video in each sub-playback area and takes each located key frame as the start frame to obtain multiple sub-videos corresponding to each playback duration.
[0025] In a possible implementation, the method further includes:
[0026] In response to a playback control operation on any sub-playback area, a sub-video corresponding to the sub-playback area is played based on the playback control operation.
[0027] In a possible implementation, the method further includes:
[0028] When the playback control operation includes a full-screen playback operation, in response to the full-screen playback operation on any of the sub-playback areas, the sub-video played in the sub-playback area is switched to full-screen playback;
[0029] When the playback control operation includes a zoom display operation, in response to the zoom display operation on any of the sub-playback areas, the size of the sub-playback area is zoomed in and adjusted, and the sub-video corresponding to the sub-playback area is played in the adjusted sub-playback area.
[0030] In a possible implementation, the method further includes:
[0031] When the playback control operation includes a positioning playback operation, in response to the positioning playback operation on any of the sub-playback areas, a key frame corresponding to the positioning playback operation is searched in the sub-video corresponding to the sub-playback area, and the corresponding sub-video is played in the sub-playback area with the key frame as the starting frame.
[0032] In one aspect, a video preview device is provided, the device comprising:
[0033] A first determination module, used to determine a playback area of a target video to be played;
[0034] A division module, used for dividing the playback area into a plurality of sub-playback areas;
[0035] A second determination module is used to determine the playback information of each of the sub-playback areas based on the plurality of sub-playback areas and the playback duration of the target video;
[0036] An acquisition module, used for acquiring multiple sub-videos of the target video based on the playback information of each sub-playback area, where one sub-video corresponds to one sub-playback area;
[0037] The playing module is used to play the corresponding sub-video in each sub-playing area of the playing area.
[0038] In a possible implementation, the partitioning module is used to:
[0039] In response to the division operation of the playback area, determining the number of the sub-playback areas;
[0040] Based on the size parameter of the play area and the number of the sub-play areas, a plurality of the sub-play areas are displayed.
[0041] In a possible implementation, the second determining module includes:
[0042] A first determining unit, configured to determine a playback duration of the target video in each of the sub-playback areas based on the number of the sub-playback areas and the playback duration of the target video;
[0043] The second determining unit is used to determine the start playing time of the target video in each of the sub-playing areas based on the playing duration of the target video in each of the sub-playing areas and the playing duration of the target video.
[0044] In a possible implementation manner, the first determining unit is used to:
[0045] The play duration of the target video is evenly divided according to the number of the sub-play regions to obtain the play duration of the target video in each of the sub-play regions.
[0046] In a possible implementation, the device further includes:
[0047] The decoding module is used to decode the target video based on the playback information of each sub-playing area by the decoder corresponding to each sub-playing area to obtain multiple sub-videos of the target video.
[0048] In a possible implementation, the decoding module is further used to:
[0049] The decoders corresponding to the sub-playback areas locate the key frames corresponding to the start playback time in the target video based on the start playback time of the target video in the sub-playback areas;
[0050] The decoder corresponding to each sub-playback area decodes the target video based on the playback duration of the target video in each sub-playback area, taking each located key frame as the starting frame, to obtain multiple sub-videos corresponding to each playback duration.
[0051] In a possible implementation, the playback module is further used to:
[0052] In response to a playback control operation on any of the sub-playback areas, a sub-video corresponding to the sub-playback area is played based on the playback control operation.
[0053] In a possible implementation, the playback module is further used to:
[0054] When the playback control operation includes a full-screen playback operation, in response to the full-screen playback operation on any of the sub-playback areas, the sub-video played in the sub-playback area is switched to full-screen playback;
[0055] When the playback control operation includes a zoom display operation, in response to the zoom display operation on any of the sub-playback areas, the size of the sub-playback area is zoomed in and adjusted, and the sub-video corresponding to the sub-playback area is played in the adjusted sub-playback area.
[0056] In a possible implementation, the playback module is further used to:
[0057] When the playback control operation includes a positioning playback operation, in response to the positioning playback operation on any of the sub-playback areas, a key frame corresponding to the positioning playback operation is searched in the sub-video corresponding to the sub-playback area, and the corresponding sub-video is played in the sub-playback area with the key frame as the starting frame.
[0058] On the one hand, a terminal is provided, which includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the above-mentioned video preview method.
[0059] On the one hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the above-mentioned video preview method.
[0060] On the one hand, a computer program product or a computer program is provided, which includes a computer program code, the computer program code is stored in a computer-readable storage medium, a processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device executes the above-mentioned video preview method.
[0061] The present application provides a video preview method. For a video that a user wants to preview quickly, before playing the video, the video is divided into multiple sub-videos according to the playing time, and then the corresponding sub-videos are played in each sub-playing area of the playing area. Through the above method, the playing effect of playing multiple sub-videos of a video in the entire playing area at the same time is achieved, so that the user can quickly preview the complete content of a video, which greatly improves the efficiency of the user's video preview. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0063] Figure 1 It is a schematic diagram of an implementation environment of a video preview method provided in an embodiment of the present application;
[0064] Figure 2 is a flow chart of a video preview method provided by an embodiment of the present application;
[0065] Figure 3 is a flowchart of another video preview method provided by an embodiment of the present application;
[0066] Figure 4 is a schematic diagram of a video preview provided in an embodiment of the present application;
[0067] Figure 5 is a structural schematic diagram of a video preview device provided in an embodiment of the present application;
[0068] Figure 6 It is a structural diagram of a server provided in an embodiment of the present application;
[0069] Figure 7 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0071] Figure 1 Schematic diagram of an implementation environment of a video preview method provided in an embodiment of the present application. Figure 1 , the implementation environment includes: a terminal 101 and a server 102.
[0072] The terminal 101 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop computer. The terminal 101 has a communication function and can access the Internet. The terminal 101 may generally refer to one of a plurality of terminals. This embodiment is only illustrated by the terminal 101. Those skilled in the art may know that the number of the above terminals may be more or less. An application having a video playback function is running on the terminal 101.
[0073] The server 102 may be an independent physical server, or a server cluster or distributed file system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The server 102 is used to provide background services for applications running on the terminal 101, such as video storage services and video transmission services.
[0074] The server 102 and the terminal 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the present embodiment. Optionally, the number of the above servers 102 may be more or less, which is not limited in the present embodiment.
[0075] Figure 2 This is a flow chart of a video preview method provided in an embodiment of the present application. This embodiment is described with a terminal as the execution subject. Figure 2 , the embodiment comprises:
[0076] 201. The terminal determines a playback area for a target video to be played.
[0077] In the embodiment of the present application, the target video is a video that the user wants to preview. Optionally, the target video is a local video stored on the terminal. Optionally, the target video is an online video. The embodiment of the present application does not specifically limit the source of the target video.
[0078] 202. The terminal divides the playback area into multiple sub-playback areas.
[0079] In the embodiment of the present application, after the terminal divides the playback area, the obtained divided playback area includes multiple partitions, each partition is a sub-playback area, and the size of the sub-playback area is smaller than the size of the playback area.
[0080] 203. The terminal determines playback information of each sub-playback area based on the multiple sub-playback areas and the playback duration of the target video.
[0081] In the embodiment of the present application, the playback information refers to the start playback time and playback duration of the target video in the sub-playback area.
[0082] 204. The terminal obtains multiple sub-videos of the target video based on the playback information of each sub-playback area, where one sub-video corresponds to one sub-playback area.
[0083] In the embodiment of the present application, each sub-playback area corresponds to a decoder, and the decoder is used to decode the target video to obtain multiple sub-videos of the target video.
[0084] 205. The terminal plays the corresponding sub-video in each sub-playing area of the playing area.
[0085] In an embodiment of the present application, a video preview method is provided. For a video that a user wants to preview quickly, before playing the video, the video is divided into multiple sub-videos according to the playing time, and then the corresponding sub-videos are played in each sub-playing area of the playing area. Through the above method, the playing effect of playing multiple sub-videos of a video at the same time in the entire playing area is achieved, so that the user can quickly preview the complete content of a video, which greatly improves the efficiency of the user's video preview.
[0086] Figure 3 This is a flowchart of another video preview method provided by an embodiment of the present application. This embodiment is described with a terminal as the execution subject. Figure 3 , the embodiment comprises:
[0087] 301. In response to a user clicking operation on a target video to be played, the terminal displays a play area of the target video.
[0088] In an embodiment of the present application, the terminal provides a video playback function. The user clicks on the target video he wants to preview on the terminal. The terminal responds to the click operation, starts the video playback function, obtains the video playback interface, and displays the playback area of the target video on the video playback interface.
[0089] Optionally, the target video is a local video stored on the terminal, and a local video selection interface is displayed on the terminal. The user can select the target video for preview by clicking on the video he wants to preview. The terminal then responds to the click operation, obtains a video playback interface, and displays the playback area of the target video on the video playback interface.
[0090] Optionally, the target video is an online video, and an online video selection interface is displayed on the terminal. The user can select the target video for preview by clicking on the video he wants to preview. In response to the click operation, the terminal sends a request to obtain the target video to the target server. The request carries the identifier of the target video and the identifier of the terminal. Based on the request, the target server sends the video resources of the target video to the terminal. The terminal receives the video resources of the target video and obtains a video playback interface, and displays the playback area of the target video on the video playback interface.
[0091] It should be noted that in other embodiments, the terminal provides multiple videos on the acquired video playback interface, and the user can select a target video for preview by clicking on the video to be previewed. The embodiment of the present application does not specifically limit the method for selecting the target video.
[0092] In addition, in some embodiments, the target video is a segment video in a complete video. Specifically, after the user clicks on the first video that he wants to preview on the terminal, the terminal responds to the click operation, turns on the video playback function, obtains the video playback interface, and provides a segment selection operation for the first video on the video playback interface. The terminal detects the user's segment selection operation for the first video, and based on the segment selection operation, determines the second video, which is the target video. For example, the segment selection operation is implemented by the user's editing operation on an editable dialog box. The user enters the start time and end time of the segment video that he wants to preview in the editable dialog box to select the segment video. The embodiment of the present application does not limit the specific implementation method of the segment selection operation.
[0093] It should be noted that the embodiment of the present application does not limit whether the target video is a complete video or a fragment of a complete video.
[0094] 302. The terminal determines the number of sub-playback areas in response to the division operation on the playback area.
[0095] In the embodiment of the present application, after the terminal divides the playback area, the obtained divided playback area includes multiple partitions, each partition is a sub-playback area, and the size of the sub-playback area is smaller than the size of the playback area. The terminal detects the user's operation of dividing the playback area, and determines the number of sub-playback areas based on the division operation.
[0096] The following are two ways to implement the partitioning operation:
[0097] In some embodiments, the division operation is implemented by the user's editing operation on the editable dialog box. In the video playback interface, an editable dialog box for dividing the playback area is provided, and the user enters a number in the editable dialog box to implement the division operation of the playback area. When the terminal detects the user's editing operation in the editable dialog box, the number of sub-playback areas is determined based on the number entered by the user. For example, the user enters the number 4 in the editable dialog box, and the terminal determines that the number of sub-playback areas is 4.
[0098] In other embodiments, the division operation is implemented by the user's selection operation of the division option. In the video playback interface, multiple division options for the playback area are provided. The user selects the corresponding division option to implement the division operation of the playback area. When the terminal detects the user's selection operation of the division option, the number of sub-playback areas is determined based on the division option selected by the user. For example, the video playback interface displayed by the terminal provides three division options for the playback area, namely "divided into 2 areas", "divided into 4 areas" and "divided into 6 areas". The user selects the division option of "divided into 4 areas". Based on the user's selection operation of the division option, the terminal determines that the number of sub-playback areas is 4.
[0099] It should be noted that, in actual applications, the implementation of the division operation is not limited to the above two cases. Optionally, the user can implement the corresponding division operation through voice input, quick gestures, etc. The embodiment of the present application does not specifically limit the specific implementation of the division operation.
[0100] 303. The terminal displays multiple sub-playback areas based on the size parameter of the playback area and the number of sub-playback areas.
[0101] In the embodiment of the present application, the size parameter of the play area refers to the width and height of the play area. Based on the size parameter of the play area and the number of sub-play areas determined by the above step 302, the terminal divides the play area and displays multiple sub-play areas. Optionally, a cover image of the target video is displayed in each sub-play area. Optionally, a default image pre-set by the terminal is displayed in each sub-play area. The embodiment of the present application does not specifically limit the display content in the sub-play area in this step.
[0102] Figure 4 is a schematic diagram of a video preview provided by an embodiment of the present application. Figure 4 In the left figure, the size parameters of the playback area in the figure are: width w, height h, where w>0, h>0. The terminal divides the playback area equally based on the size parameters and the number of sub-playback areas. For details, please refer to Figure 4 In the right figure, the number of sub-playback areas is 4, and the sizes of each sub-playback area are the same.
[0103] It should be noted that Figure 4The multiple sub-playback areas shown are obtained by dividing the playback area evenly. In some embodiments, the terminal provides a size adjustment function for the sub-playback area, and can obtain a sub-playback area of corresponding size based on the user's size adjustment requirements for the sub-playback area. For example, the terminal displays a size adjustment interface for the sub-playback area, on which the size parameters of each sub-playback area are displayed. The user can adjust the size parameters of each sub-playback area to trigger a corresponding size adjustment instruction, and the terminal responds to the size adjustment instruction to display the corresponding sub-playback area. For another example, the sub-playback area displayed by the terminal is operable, and the user can perform a zoom operation on the corresponding sub-playback area according to the size adjustment requirements for each sub-playback area, triggering a corresponding size adjustment instruction, and the terminal responds to the size adjustment instruction to display the corresponding sub-playback area. The embodiment of the present application does not specifically limit the size display of the sub-playback area. The above-mentioned method of adjusting the size of the sub-playback area can meet the user's personalized needs for the video preview effect.
[0104] The above steps 302 to 303 are an embodiment of the terminal displaying multiple sub-playing areas in response to the operation of dividing the play area. Optionally, after executing step 301, the terminal can display multiple sub-playing areas in a default manner, for example, the default manner is to display 4 sub-playing areas. The embodiment of the present application does not specifically limit the display manner of multiple sub-playing areas.
[0105] 304. The terminal determines playback information of each sub-playback area based on the multiple sub-playback areas and the playback duration of the target video.
[0106] In the embodiment of the present application, the terminal obtains the play time of the target video, and then determines the play information of each sub-play area based on the play time and the number of sub-play areas, wherein the play information refers to the start play time and play duration of the target video in the sub-play area.
[0107] The following is a specific description of a method for determining the playback information of each sub-playback area. The method includes the following two steps:
[0108] Step 1: The terminal determines the playback duration of the target video in each sub-playback area based on the number of sub-playback areas and the playback duration of the target video.
[0109] Optionally, the terminal evenly divides the play duration of the target video according to the number of sub-play areas to obtain the play duration of the target video in each sub-play area. For example, if the play duration of the target video is 20 minutes and the number of sub-play areas is 4, the play duration of the target video in each sub-play area is 5 minutes.
[0110] Optionally, the terminal provides a function of setting the duration of the playback. The terminal displays a setting interface for the duration of the playback, on which the playback duration of the target video and the time setting options for each sub-playback area are displayed. The user can adjust the time setting options for each sub-playback area to set the playback duration of the target video in each sub-playback area, and then the terminal determines the playback duration of the target video in each sub-playback area based on the user's adjustment operation. For example, the playback duration of the target video is 20 minutes, the number of sub-playback areas is 4, and the terminal displays the time setting options for 4 sub-playback areas. The user adjusts each time setting option to set the playback duration of the target video in the 4 sub-playback areas to 4 minutes, 5 minutes, 6 minutes, and 5 minutes, respectively. The terminal determines the playback duration of the target video in each sub-playback area based on the adjustment operation.
[0111] The embodiment of the present application does not specifically limit the method for determining the playback duration of the target video in each sub-playback area.
[0112] Step 2: The terminal determines the start time of the target video in each sub-playing area based on the play duration of the target video in each sub-playing area and the play duration of the target video.
[0113] In an embodiment of the present application, the terminal uses the playback duration of the target video as the total playback duration, and uses the playback duration of the target video in each sub-playback area as the playback duration of the target video in each sub-playback area, and then determines the starting playback time of the target video in each sub-playback area in sequence according to the order of each sub-playback area.
[0114] Optionally, refer to Figure 4 , an example is given to illustrate this step:
[0115] Figure 4 The right figure shows 4 sub-playing areas, namely, sub-playing area 1, sub-playing area 2, sub-playing area 3 and sub-playing area 4. The playing time of the target video is 20 minutes, and the playing time of the target video in each sub-playing area is 5 minutes. Then, the starting playing time of the target video in sub-playing area 1 is 0 minutes; the starting playing time of the target video in sub-playing area 2 is 5 minutes; the starting playing time of the target video in sub-playing area 3 is 10 minutes; and the starting playing time of the target video in sub-playing area 4 is 15 minutes.
[0116] Optionally, taking the example that the playback duration of the target video in four sub-playback areas is 4 minutes, 5 minutes, 6 minutes and 5 minutes respectively, the starting playback time of the target video in sub-playback area 1 is 0 minutes; the starting playback time of the target video in sub-playback area 2 is 4 minutes; the starting playback time of the target video in sub-playback area 3 is 9 minutes; and the starting playback time of the target video in sub-playback area 4 is 15 minutes.
[0117] Through the above steps 1 and 2, the terminal can determine the playback information of each sub-playing area. For example, the playback information of each sub-playing area is:
[0118] "Sub-playing area 1: the starting playing time is 0 minutes, and the playing duration is 5 minutes;
[0119] Sub-playing area 2: the starting playing time is 5 minutes, and the playing duration is 5 minutes;
[0120] Sub-playing area 3: the starting playing time is 10 minutes and the playing duration is 5 minutes;
[0121] Sub-playing area 4: The starting playing time is 15 minutes and the playing duration is 5 minutes.
[0122] 305. The terminal obtains multiple sub-videos of the target video based on the playback information of each sub-playback area, where one sub-video corresponds to one sub-playback area.
[0123] In an embodiment of the present application, each sub-playback area corresponds to a decoder, and the decoder is used to decode the target video to obtain multiple sub-videos of the target video. Based on the playback information of each sub-playback area, the terminal decodes the target video respectively by the decoders corresponding to each sub-playback area to obtain multiple sub-videos of the target video. Optionally, the terminal obtains the target video, and then sends a decoding instruction to the decoder of each sub-playback area based on the playback information of each sub-playback area. The decoding instruction carries the video data of the target video, the area identifier of the sub-playback area, and the playback information corresponding to the sub-playback area. The decoding instruction is used to instruct the decoder to decode the target video to obtain the sub-video corresponding to the sub-playback area.
[0124] This step specifically includes the following steps 1 and 2:
[0125] Step 1: The decoder corresponding to each sub-playback area locates each key frame corresponding to each start playback time in the target video based on the start playback time of the target video in each sub-playback area.
[0126] Step 2: The decoder corresponding to each sub-playback area decodes the target video based on the playback duration of the target video in each sub-playback area and takes each located key frame as the starting frame to obtain multiple sub-videos corresponding to each playback duration.
[0127] Reference below Figure 4 , taking sub-playback area 2 as an example, this step is specifically explained: the decoder corresponding to the sub-playback area receives a decoding instruction, which carries the video data of the target video, the area identifier "2" of the sub-playback area 2, and the playback information "Sub-playback area 2: the starting playback time is 5 minutes, and the playback duration is 5 minutes". Then, based on the starting playback time, the decoder locates the key frame of the target video after 5 minutes of playback by searching (seeking) in the received video data of the target video, and then decodes the video within 5 minutes after the key frame in the target video based on the playback duration, and obtains the video frame of the sub-video with the key frame as the starting frame and the duration of 5 minutes.
[0128] The above describes the method of obtaining a sub-video corresponding to a sub-playback area by way of example. Correspondingly, the method of obtaining each sub-video can refer to the above method, which will not be repeated here.
[0129] 306. The terminal plays the corresponding sub-video in each sub-playing area.
[0130] In the embodiment of the present application, after the decoder corresponding to each sub-playing area obtains the corresponding sub-video, it decodes the corresponding video frame, and then the terminal plays the corresponding sub-video in each sub-playing area. Figure 4 As shown in the right figure, there are 4 sub-playback areas in total. The terminal plays the corresponding sub-video in each sub-playback area, achieving the goal of playing the entire target video within 5 minutes, increasing the efficiency of video preview to 4 times, and being able to preview the complete content of the target video.
[0131] This step can be achieved in any of the following three ways:
[0132] Method 1: The decoder of each sub-playing area scales the decoded video frame based on the size of each sub-playing area so that the size of the video frame adapts to the size of the corresponding sub-playing area. Then the terminal plays the corresponding sub-video in each sub-playing area.
[0133] Method 2: The decoder of each sub-playback area scales the decoded video frame based on the size of each sub-playback area so that the size of the video frame adapts to the size of the corresponding sub-playback area, and then the decoder of the playback area splices each frame of the video in real time in time sequence to obtain a real-time spliced video frame adapted to the size of the playback area, and then the terminal plays the video in the playback area based on the real-time spliced video frame. This implementation achieves the effect of playing the corresponding sub-video in each sub-playback area by splicing the video frames of each sub-playback area in real time and then playing the spliced video frames in real time in the playback area.
[0134] Method 3: The decoder of each sub-playback area scales the decoded video frame based on the size of each sub-playback area so that the size of the video frame adapts to the size of the corresponding sub-playback area, and then the decoder of the playback area splices the video frames to obtain a video frame that adapts to the size of the playback area, and the terminal plays the video in the playback area based on the video frame. This implementation achieves the effect of playing the corresponding sub-video in each sub-playback area by splicing the video frames of each sub-playback area and then playing the spliced video frames in the playback area.
[0135] It should be noted that, in actual applications, there may be other ways for the terminal to play the corresponding sub-video in each sub-playback area. The three ways described above are only exemplary, and the embodiment of the present application does not specifically limit the way in which the terminal plays the sub-video.
[0136] Through the above steps 301 to 306, the effect of playing multiple segments of a video simultaneously in the entire video playing area is achieved. Optionally, after executing step 306, the terminal can also execute the following step 307.
[0137] 307. In response to the user's playback control operation on any sub-playback area, the terminal plays the sub-video corresponding to the sub-playback area based on the playback control operation.
[0138] In an embodiment of the present application, in the above step 306, when the terminal plays the sub-video in the first two ways, after the terminal plays the corresponding sub-video in each sub-playback area, the user can perform playback control operations on each sub-playback area to achieve playback control of the video playback.
[0139] Optionally, the playback control operation is a full-screen playback operation, and the terminal switches the sub-video played in the sub-playback area to full-screen playback in response to the full-screen playback operation on any sub-playback area. It should be noted that after the terminal switches the sub-video played in the sub-playback area to full-screen playback, in response to the user's exit operation on the current full-screen playback, the terminal exits the full-screen playback and continues to play the corresponding sub-video in the sub-playback area.
[0140] For example, the terminal displays a full-screen play button in a sub-play area. When the terminal detects that a user clicks on a full-screen play button in a sub-play area, the sub-video played in the sub-play area is switched to full-screen play. In the full-screen play mode, the terminal displays an exit full-screen play button. When the terminal detects that a user clicks on the exit full-screen play button, the full-screen play is exited and the corresponding sub-video continues to be played in the sub-play area. The embodiments of the present application do not specifically limit the implementation method of the full-screen play operation.
[0141] Optionally, the playback control operation is a zoom display operation, and the terminal responds to the zoom display operation on any sub-playback area by zooming in and adjusting the size of the sub-playback area, and plays the sub-video corresponding to the sub-playback area in the adjusted sub-playback area.
[0142] For example, the sub-playback area displayed by the terminal is operable, and the user can enlarge and display the sub-playback area according to the enlarged display requirements of any sub-playback area, triggering the corresponding size adjustment instruction, and the terminal responds to the size adjustment instruction to display the enlarged sub-playback area. It should be noted that in the embodiment of the present application, when the terminal enlarges and adjusts the size of the sub-playback area, the size of the remaining sub-playback areas that have not been enlarged and displayed is reduced and adjusted to adapt to the entire playback area; or, the terminal enlarges and adjusts the size of the sub-playback area so that the sub-playback area covers the remaining sub-playback areas that have not been enlarged and displayed. The embodiment of the present application does not specifically limit the implementation method of the terminal adjusting the size of the sub-playback area.
[0143] Optionally, the playback control operation is a positioning playback operation. In response to the positioning playback operation on any sub-playback area, the terminal searches for a key frame corresponding to the positioning playback operation in the sub-video corresponding to the sub-playback area, and plays the corresponding sub-video in the sub-playback area with the key frame as the starting frame.
[0144] For example, the terminal displays a playback progress bar in a sub-playback area. When the terminal detects that the user drags the playback progress bar in a sub-playback area, or clicks a certain position on the playback progress bar, the terminal searches for the corresponding key frame in the sub-video based on the dragging operation or clicking operation, and plays the corresponding sub-video in the sub-playback area with the key frame as the starting frame.
[0145] Optionally, the playback control operation is a pause playback operation, a resume playback operation, a fast forward operation, and a fast rewind operation, etc. In actual applications, the terminal provides multiple playback functions so that users can perform playback control operations based on different playback functions to achieve playback control of video playback. The embodiments of the present application do not make specific limitations on this.
[0146] Optionally, the playback control operation is implemented by a playback control displayed by the terminal in the sub-playing area, and the user can implement playback control of the video playback by operating the playback control. The following is an example of how to implement the playback control operation through the playback control when the terminal plays the sub-video in the first two ways shown in step 306 above.
[0147] In the scenario where the terminal plays the sub-video in the manner shown in step 306 above:
[0148] For example, the playback control is a full-screen play button, which is used to provide a full-screen playback function. When the terminal detects that the user has clicked the full-screen play button in a sub-play area, the decoder corresponding to the sub-play area enlarges the corresponding video frame in the sub-play area to adapt the size of the video frame to the size of the full-screen playback, and then the terminal plays the adjusted video frame in full screen. It should be noted that when the terminal detects that the user has clicked the full-screen play button in a sub-play area, the remaining sub-play areas that have not been clicked continue to play the corresponding sub-videos, or pause the corresponding sub-videos. The user can set the playback status of the remaining sub-play areas as needed, and the embodiments of the present application do not specifically limit this.
[0149] For another example, the playback control is a play button, which is used to provide the playback function of pausing and continuing to play the video. When the terminal detects that the user clicks the play button, the terminal pauses the sub-video in the sub-playback area. When the terminal detects that the user clicks the play button again, the terminal continues to play the sub-video in the sub-playback area.
[0150] In the scenario where the terminal plays the sub-video in the second manner shown in step 306 above:
[0151] For example, the playback control is a full-screen play button, which is used to provide a full-screen playback function. When the terminal detects that the user has clicked the full-screen play button in a sub-play area, the decoder corresponding to the sub-play area will enlarge the corresponding video frame in the sub-play area to adapt the size of the video frame to the size of the full-screen playback, and then the terminal will play the adjusted video frame in full screen. It should be noted that for other sub-play areas that have not been clicked, the terminal pauses splicing the video frames in these sub-play areas, or continues to splice and play the video frames in these sub-play areas in real time in chronological order. The user can set the playback status of the remaining sub-play areas as needed, and the embodiment of the present application does not specifically limit this.
[0152] For another example, the playback control is a play button, which is used to provide the playback function of pausing and continuing to play the video. When the terminal detects a user click operation on the play button, the terminal only continues to splice and play the video frames in the other sub-playback areas that have not been clicked in real time in chronological order. That is, at this time, only the video in the sub-playback area where the click operation is implemented is in a paused playback state, while the other sub-playback areas are in a normal playback state; when the terminal detects the user click operation on the play button again, the terminal uses the video frame currently displayed in the sub-playback area where the click operation is implemented as the starting frame, and splices the video frames to be spliced in other sub-playback areas in real time, and then plays the spliced video frames in real time in the playback area. That is, at this time, the videos in all sub-playback areas are in a normal playback state.
[0153] In an embodiment of the present application, a video preview method is provided. For a video that a user wants to preview quickly, before playing the video, the video is divided into multiple sub-videos according to the playing time, and then the corresponding sub-videos are played in each sub-playing area of the playing area. Through the above method, the playing effect of playing multiple sub-videos of a video at the same time in the entire playing area is achieved, so that the user can quickly preview the complete content of a video, which greatly improves the efficiency of the user's video preview.
[0154] Figure 5 is a schematic diagram of the structure of a video preview device provided in an embodiment of the present application, see Figure 5 The device includes: a first determination module 501, a division module 502, a second determination module 503, an acquisition module 504 and a playback module 505.
[0155] A first determination module 501 is used to determine a playback area of a target video to be played;
[0156] A division module 502, used to divide the playback area into a plurality of sub-playback areas;
[0157] The second determination module 503 is used to determine the playback information of each sub-playback area based on the multiple sub-playback areas and the playback duration of the target video;
[0158] The acquisition module 504 is used to acquire multiple sub-videos of the target video based on the playback information of each sub-playing area, where one sub-video corresponds to one sub-playing area;
[0159] The playing module 505 is used to play the corresponding sub-video in each sub-playing area of the playing area.
[0160] In a possible implementation, the division module 502 is used to:
[0161] In response to the division operation of the playback area, determining the number of the sub-playback areas;
[0162] Based on the size parameter of the play area and the number of the sub-play areas, a plurality of the sub-play areas are displayed.
[0163] In a possible implementation, the second determining module 503 includes:
[0164] A first determining unit, configured to determine a playback duration of the target video in each of the sub-playback areas based on the number of the sub-playback areas and the playback duration of the target video;
[0165] The second determining unit is used to determine the start playing time of the target video in each of the sub-playing areas based on the playing duration of the target video in each of the sub-playing areas and the playing duration of the target video.
[0166] In a possible implementation manner, the first determining unit is used to:
[0167] The play duration of the target video is evenly divided according to the number of the sub-play regions to obtain the play duration of the target video in each of the sub-play regions.
[0168] In a possible implementation, the device further includes:
[0169] The decoding module is used to decode the target video based on the playback information of each sub-playing area by the decoder corresponding to each sub-playing area to obtain multiple sub-videos of the target video.
[0170] In a possible implementation, the decoding module is further used to:
[0171] The decoders corresponding to the sub-playback areas locate the key frames corresponding to the start playback time in the target video based on the start playback time of the target video in the sub-playback areas;
[0172] The decoder corresponding to each sub-playback area decodes the target video based on the playback duration of the target video in each sub-playback area, taking each located key frame as the starting frame, to obtain multiple sub-videos corresponding to each playback duration.
[0173] In a possible implementation, the playing module 505 is further used for:
[0174] In response to a playback control operation on any of the sub-playback areas, a sub-video corresponding to the sub-playback area is played based on the playback control operation.
[0175] In a possible implementation, the playing module 505 is further used for:
[0176] When the playback control operation includes a full-screen playback operation, in response to the full-screen playback operation on any of the sub-playback areas, the sub-video played in the sub-playback area is switched to full-screen playback;
[0177] When the playback control operation includes a zoom display operation, in response to the zoom display operation on any of the sub-playback areas, the size of the sub-playback area is zoomed in and adjusted, and the sub-video corresponding to the sub-playback area is played in the adjusted sub-playback area.
[0178] In a possible implementation, the playing module 505 is further used for:
[0179] When the playback control operation includes a positioning playback operation, in response to the positioning playback operation on any of the sub-playback areas, a key frame corresponding to the positioning playback operation is searched in the sub-video corresponding to the sub-playback area, and the corresponding sub-video is played in the sub-playback area with the key frame as the starting frame.
[0180] In an embodiment of the present application, a video preview device is provided. For a video that a user wants to preview quickly, before playing the video, the video is divided into multiple sub-videos according to the playing time, and then the corresponding sub-videos are played in each sub-playing area of the playing area. Through the above method, the playing effect of playing multiple sub-videos of a video in the entire playing area at the same time is achieved, so that the user can quickly preview the complete content of a video, which greatly improves the efficiency of the user's video preview.
[0181] It should be noted that: the video preview device provided in the above embodiment only uses the division of the above functional modules as an example when performing video preview. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the video preview device provided in the above embodiment and the video preview method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0182] Figure 6 6 is a schematic diagram of the structure of a server 600 provided in an embodiment of the present application. The server 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 601 and one or more memories 602, wherein the memory 602 stores at least one program code, and the at least one program code is loaded and executed by the processor 601 to implement the video preview method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0183] Figure 7 1 is a schematic diagram of the structure of a terminal 700 provided in an embodiment of the present application. The terminal 700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 700 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0184] Typically, the terminal 700 includes a processor 701 and a memory 702 .
[0185] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0186] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one program code, which is used to be executed by the processor 701 to implement the video preview method provided in the method embodiment of the present application.
[0187] In some embodiments, the terminal 700 may further optionally include: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702 and the peripheral device interface 703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera assembly 706, an audio circuit 707, a positioning assembly 708 and a power supply 709.
[0188] The peripheral device interface 703 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 701 and the memory 702. In some embodiments, the processor 701, the memory 702, and the peripheral device interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral device interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0189] The radio frequency circuit 704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 704 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 704 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 704 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0190] The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to collect touch signals on the surface or above the surface of the display screen 705. The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 705 can be one, arranged on the front panel of the terminal 700; in other embodiments, the display screen 705 can be at least two, respectively arranged on different surfaces of the terminal 700 or in a folding design; in other embodiments, the display screen 705 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 700. Even, the display screen 705 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 705 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0191] The camera assembly 706 is used to capture images or videos. Optionally, the camera assembly 706 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 706 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0192] The audio circuit 707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 701 for processing, or input them into the radio frequency circuit 704 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 700. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 707 may also include a headphone jack.
[0193] Positioning component 708 is used to locate the current geographical location of terminal 700 to implement navigation or LBS (Location Based Service). Positioning component 708 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.
[0194] The power supply 709 is used to power various components in the terminal 700. The power supply 709 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 709 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0195] In some embodiments, the terminal 700 further includes one or more sensors 710 , including but not limited to: an acceleration sensor 711 , a gyroscope sensor 712 , a pressure sensor 713 , a fingerprint sensor 714 , an optical sensor 715 , and a proximity sensor 716 .
[0196] The acceleration sensor 711 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 700. For example, the acceleration sensor 711 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 701 can control the display screen 705 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 can also be used to collect motion data of games or users.
[0197] The gyro sensor 712 can detect the body direction and rotation angle of the terminal 700, and the gyro sensor 712 can cooperate with the acceleration sensor 711 to collect the user's 3D actions on the terminal 700. The processor 701 can implement the following functions based on the data collected by the gyro sensor 712: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0198] The pressure sensor 713 can be set on the side frame of the terminal 700 and / or the lower layer of the display screen 705. When the pressure sensor 713 is set on the side frame of the terminal 700, it can detect the user's holding signal of the terminal 700, and the processor 701 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 713. When the pressure sensor 713 is set on the lower layer of the display screen 705, the processor 701 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0199] The fingerprint sensor 714 is used to collect the user's fingerprint, and the processor 701 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 701 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 714 can be set on the front, back, or side of the terminal 700. When a physical button or a manufacturer logo is set on the terminal 700, the fingerprint sensor 714 can be integrated with the physical button or the manufacturer logo.
[0200] The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 can control the display brightness of the display screen 705 according to the ambient light intensity collected by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the display screen 705 is increased; when the ambient light intensity is low, the display brightness of the display screen 705 is reduced. In another embodiment, the processor 701 can also dynamically adjust the shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 715.
[0201] The proximity sensor 716, also called a distance sensor, is usually arranged on the front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front of the terminal 700 is gradually decreasing, the processor 701 controls the display screen 705 to switch from the screen-on state to the screen-off state; when the proximity sensor 716 detects that the distance between the user and the front of the terminal 700 is gradually increasing, the processor 701 controls the display screen 705 to switch from the screen-off state to the screen-on state.
[0202] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal 700, and the terminal 700 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0203] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a program code, and the program code can be executed by a processor in a terminal or a server to complete the media resource playback method in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact-disc read-only memory, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0204] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0205] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A video preview method, characterized in that: The method comprises: Determine the playback area of the target video to be played; Dividing the playback area into a plurality of sub-playback areas, wherein the number of the plurality of sub-playback areas is determined by content input by a user in an editable dialog box displayed on a video playback interface, or the number of the plurality of sub-playback areas is determined by a user selecting a plurality of division options provided in the video playback interface; Displaying a setting interface for the playback duration, on which the playback duration of the target video and time setting options for each sub-playback area are displayed, wherein the time setting options are used to set the playback duration of the target video in each sub-playback area; Based on the user's adjustment operation on the time setting option of each sub-playback area, the playing duration of the target video in each of the sub-playback areas is determined; the playing duration of the target video is taken as the total playing duration, and the playing duration of the target video in each of the sub-playback areas is taken as the playing duration of the target video in each of the sub-playback areas, and the starting playing time of the target video in each of the sub-playback areas is determined in sequence according to the order of each of the sub-playback areas; the sum of the playing durations of the target video in each of the sub-playback areas is the playing duration of the target video, and according to the order of each of the sub-playback areas, the ending playing time of the previous sub-playback area is the starting playing time of the next sub-playback area; Based on the start play time and play duration of the target video in each of the sub-play areas, the decoders corresponding to the sub-play areas respectively decode the target video to obtain multiple sub-videos of the target video, where one sub-video corresponds to one sub-play area; The decoder of each sub-playing area scales the decoded video frame based on the size of each sub-playing area so that the size of the video frame adapts to the size of the corresponding sub-playing area; Based on the scaled video frame, simultaneously playing the corresponding sub-video in each of the sub-playing areas of the playing area; In response to a zoom-in display operation on any of the sub-playback areas, the size of the sub-playback area is zoomed in and adjusted, and the sizes of other sub-playback areas that are not subjected to the zoom-in display operation are zoomed out and adjusted, and the sub-video corresponding to the sub-playback area is played in the adjusted sub-playback area; In response to a positioning playback operation on any of the sub-playback areas, a key frame corresponding to the positioning playback operation is searched in the sub-video corresponding to the sub-playback area, and the corresponding sub-video is played in the sub-playback area with the key frame as the starting frame.
2. The method according to claim 1, characterized in that The dividing the playback area into a plurality of sub-playback areas comprises: Based on the size parameter of the play area and the number of the sub play areas, a plurality of the sub play areas are displayed.
3. The method according to claim 1, characterized in that The step of decoding the target video based on the start play time and play duration of the target video in each of the sub-play areas by a decoder corresponding to each of the sub-play areas to obtain a plurality of sub-videos of the target video comprises: The decoder corresponding to each of the sub-playback areas locates each key frame corresponding to each of the start playback times in the target video based on the start playback time of the target video in each of the sub-playback areas; The decoder corresponding to each of the sub-playback areas decodes the target video based on the playback duration of the target video in each of the sub-playback areas, taking each of the located key frames as the starting frame, to obtain multiple sub-videos corresponding to each of the playback durations.
4. The method according to claim 1, characterized in that: The method further comprises: When the playback control operation includes a full-screen playback operation, in response to the full-screen playback operation on any of the sub-playback areas, the sub-video played in the sub-playback area is switched to full-screen playback.
5. A video preview device, characterized in that: The device comprises: A first determination module, used to determine a playback area of a target video to be played; a division module, used to divide the playback area into a plurality of sub-playback areas, wherein the number of the plurality of sub-playback areas is determined by the content input by the user in an editable dialog box displayed on the video playback interface, or the number of the plurality of sub-playback areas is determined by the user's selection operation of a plurality of division options provided in the video playback interface; The second determination module is used to display a setting interface for the playback duration, on which the playback duration of the target video and the time setting options of each sub-playback area are displayed, and the time setting options are used to set the playback duration of the target video in each sub-playback area; based on the user's adjustment operation on the time setting options of each sub-playback area, the playback duration of the target video in each sub-playback area is determined; the playback duration of the target video is taken as the total playback duration, and the playback duration of the target video in each sub-playback area is taken as the playback duration of the target video in each sub-playback area, and the start playback time of the target video in each sub-playback area is determined in sequence according to the order of each sub-playback area; the sum of the playback durations of the target video in each sub-playback area is the playback duration of the target video, and according to the order of each sub-playback area, the end playback time of the previous sub-playback area is the start playback time of the next sub-playback area; A decoding module, configured to decode the target video respectively by a decoder corresponding to each of the sub-playing areas based on the start play time and play duration of the target video in each of the sub-playing areas, to obtain a plurality of sub-videos of the target video; An acquisition module, used for acquiring multiple sub-videos of the target video, where one sub-video corresponds to one sub-playing area; A module for performing the following steps: the decoders of each sub-playing area scale the decoded video frame based on the size of each sub-playing area so that the size of the video frame adapts to the size of the corresponding sub-playing area; A playing module, configured to play the corresponding sub-video in each of the sub-playing areas of the playing area simultaneously based on the scaled video frame; The playback module is further configured to, in response to a zoom-in display operation on any of the sub-playback areas, enlarge and adjust the size of the sub-playback area, and simultaneously reduce and adjust the size of other sub-playback areas that are not subjected to the zoom-in display operation, and play the sub-video corresponding to the sub-playback area in the adjusted sub-playback area; The playback module is also used to respond to a positioning playback operation on any of the sub-playback areas, search for a key frame corresponding to the positioning playback operation in the sub-video corresponding to the sub-playback area, and use the key frame as a starting frame to play the corresponding sub-video in the sub-playback area.
6. The device according to claim 5, characterized in that The partitioning module is also used for: Based on the size parameter of the play area and the number of the sub play areas, a plurality of the sub play areas are displayed.
7. The device according to claim 5, characterized in that The decoding module is used for: The decoder corresponding to each of the sub-playback areas locates each key frame corresponding to each of the start playback times in the target video based on the start playback time of the target video in each of the sub-playback areas; The decoder corresponding to each of the sub-playback areas decodes the target video based on the playback duration of the target video in each of the sub-playback areas, taking each of the located key frames as the starting frame, to obtain multiple sub-videos corresponding to each of the playback durations.
8. The device according to claim 5, characterized in that The playback module is also used for: When the playback control operation includes a full-screen playback operation, in response to the full-screen playback operation on any of the sub-playback areas, the sub-video played in the sub-playback area is switched to full-screen playback.
9. A terminal, characterized in that: The terminal includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the operation performed by the video preview method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the operations performed by the video preview method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Video playing method and device and electronic equipment
CN111698565A