A method, apparatus, device, and storage medium for selecting video segments
By displaying the preview screen of the target moment and its adjacent moments, the video clip selection process is simplified, the problems of cumbersome and low efficiency in the prior art are solved, and efficient video clip selection is achieved.
Patent Information
- Application Number
- CN202210530789.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-05-16
AI Technical Summary
The existing video clip selection methods are complicated to operate in videos with long time spans. Users need to repeatedly scale the time scale and play the video, resulting in low selection efficiency and high interaction cost.
By receiving the user's marking operation, the preview screen of the target moment and its adjacent moments is displayed, allowing the user to quickly determine the starting point and end point moment, and supports the playback of the preview screen and the switching of marks, simplifying the selection process of video clips.
It improves the efficiency of video clip selection, reduces user interaction costs, simplifies operation steps, and improves the accuracy and user experience of selection.
Smart Images

Figure CN114979571B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, device, and storage medium for selecting video segments. Background Art
[0002] With the development of the big data era, the deployment area of surveillance cameras is becoming wider and wider. While real-time monitoring is required, there are also more and more demand scenarios for viewing historical surveillance videos, locating and selecting video segments as records or evidence. For the existing selection of video segments, generally, the user zooms in or out the time scale on the timeline by rolling the mouse wheel, presses the left mouse button and moves the mouse back and forth to drag the timeline to determine the approximate time range of the target video segment, so as to select the target video segment.
[0003] The existing video segment selection process has the following disadvantages. When selecting a target video segment in a video with a long time span or in a scenario where precise positioning of the target video segment is required, the user needs to continuously zoom the time scale, repeatedly play the video, and determine the target video segment based on the user's memory before and after. This solution is cumbersome to operate, requires high operation accuracy of the user, and the efficiency of selecting video segments is too low. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for selecting video segments, which can effectively improve the efficiency of the user in selecting video segments.
[0005] In a first aspect, this application provides a method for selecting video segments. The method includes: receiving at least two marking operations of the user on the video; one marking operation is used to indicate the selection of a target moment; for each of the at least two marking operations, in response to the marking operation, obtaining and displaying a target preview screen; the target preview screen includes: the preview screen corresponding to the target moment marked by the marking operation on the timeline of the video, and the preview screens corresponding to X adjacent moments of the target moment, where X is an integer greater than or equal to 1; determining a start moment or an end moment from the target moments according to each of the at least two marking operations; receiving a save operation of the user; in response to the save operation, saving the target video segment according to the target start moment and the target end moment; the target start moment and the target end moment are respectively the last determined start moment and end moment before receiving the save operation, and the target video segment is the video segment from the target start moment to the target end moment in the video.
[0006] In a possible implementation, X = 2n, where n is a positive integer; the preview screens corresponding to X adjacent moments of the target moment include: the preview screens corresponding to the first n adjacent moments of the target moment, and the preview screens corresponding to the last n adjacent moments of the target moment.
[0007] In another possible implementation, the marking operation is: the user's selection operation on the preview screens included in the target preview screen, or, the marking operation is: in the presence of the target preview screen, the user's selection operation on the preview screens included in the target preview screen; according to the marking operation, determining a start time or an end time from the target times includes: determining the time corresponding to the preview screen selected by the selection operation as the start time or the end time.
[0008] In yet another possible implementation, according to each of the at least two marking operations, determining a start time or an end time from the target times includes: when there is no time determined as a start or an end time before the target time, determining the target time as the start time; when there is only a time determined as an end time before the target time, determining the target time as the end time; when there is a time determined as a start time before the target time and there is no time marked as an end time by the user on the time axis of the video, determining the target time as the end time; when there is a time determined as a start time before the target time and there is a time marked as an end time by the user on the time axis of the video, determining the start time or the end time according to the target time, the time determined as the start time, and the time determined as the end time.
[0009] In yet another possible implementation, the above method further includes: receiving a preview operation of the user on a first preview screen included in the target preview screen; in response to the preview operation, playing the first preview screen. Playing the first preview screen includes: when the target time is determined as the start time, playing the video screen for a period of time after the time corresponding to the first preview screen; when the target time is determined as the end time, playing the video screen for a period of time before the time corresponding to the first preview screen.
[0010] In yet another possible implementation, the above method further includes: when the start time is determined, displaying a start mark at the start time on the time axis of the video; when the end time is determined, displaying an end mark at the end time on the time axis of the video; when a start mark is displayed on the time axis of the video, receiving a first switching operation of the user on the start mark, and in response to the first switching operation, switching the start mark to an end mark; when an end mark is displayed on the time axis of the video, receiving a second switching operation of the user on the end mark, and in response to the second switching operation, switching the end mark to a start mark.
[0011] The video segment selection method provided by this application, when the user performs a marking operation on a certain target moment, displays the preview video frame corresponding to the target moment of the user's marking operation for the user, and also displays the preview frames of multiple adjacent moments of the target moment. This facilitates the user to quickly determine the start and end positions of the target video segment through the displayed multiple preview frames, can effectively reduce the operation steps of the user repeatedly zooming in and out the time scale and repeatedly playing the video, and improves the efficiency of the user in selecting the video segment.
[0012] Furthermore, the embodiments of this application read multiple preview frames, allowing the user to view more frames simultaneously, and the number of frames and the interval between frames can be adjusted according to the user's needs to generate a reasonable series of consecutive preview frames, meeting the user's business needs in various scenarios. While improving the efficiency of the user in selecting the video segment, it enables the user to quickly narrow down the time range and accurately locate the target moment. Moreover, the preview frames support dynamic video playback in the start mode and the end mode, and the user can preview and play the video frames according to their own needs, so as to more accurately determine the start moment and the end moment of the target video segment. The video segment selection method provided by the embodiments of this application marks the start moment and the end moment through the interaction methods of the user clicking, dragging and adjusting, and double-clicking to switch on the time axis, provides the user with the default marking logic and the quick editing entry, makes the interaction more convenient and efficient, while retaining the user's sense of control and freedom, and optimizes the user's experience.
[0013] In a second aspect, this application provides a video segment selection device, which includes: a receiving module, an obtaining module, a determining module and a saving module; the receiving module is used to receive at least two marking operations of the user on the video; one marking operation is used to indicate the selection of a target moment; the obtaining module is used to, for each of the at least two marking operations, as a response to the marking operation, obtain and display a target preview frame; the target preview frame includes: the preview frame corresponding to the target moment marked by the marking operation on the time axis of the video in the video, and the preview frames corresponding to X adjacent moments of the target moment, where X is an integer greater than or equal to 1; the determining module is used to determine the start moment or the end moment from the target moments according to each of the at least two marking operations; the receiving module is further used to receive the saving operation of the user; the saving module is used to, as a response to the saving operation, save the target video segment according to the target start moment and the target end moment; the target start moment and the target end moment are respectively the start moment and the end moment determined last time before the saving operation is received, and the target video segment is the video segment in the video from the target start moment to the target end moment.
[0014] In a possible implementation, X = 2n, where n is a positive integer. The X adjacent moments corresponding to the preview images at the target moment include: the preview images corresponding to the first n adjacent moments before the target moment and the preview images corresponding to the last n adjacent moments after the target moment.
[0015] In another possible implementation, the marking operation is: the selection operation of the user on the time axis of the video, or, the marking operation is: in the case where there is a target preview image, the selection operation of the user on the preview images included in the target preview image; the determination module is specifically configured to determine the moment corresponding to the preview image selected by the selection operation as the start moment or the end moment.
[0016] In yet another possible implementation, the marking operation is: the selection operation of the user on the time axis of the video; the determination module is specifically configured to determine the target moment as the start moment when there is no moment determined as the start or end before the target moment; determine the target moment as the end moment when there is only a moment determined as the end before the target moment; determine the target moment as the end moment when there is a moment determined as the start before the target moment and there is no moment determined as the end on the time axis of the video; when there is a moment determined as the start before the target moment and there is a moment determined as the end on the time axis of the video, determine the start moment or the end moment according to the target moment, the moment determined as the start, and the moment determined as the end.
[0017] In yet another possible implementation, the above device further includes: a playback module; a receiving module, further configured to receive a preview operation of the user on a first preview image included in the target preview image; the playback module is configured to, in response to the preview operation, play the first preview image; the playback module is specifically configured to play the video images for a period of time after the moment corresponding to the first preview image when the target moment is determined as the start moment; play the video images for a period of time before the moment corresponding to the first preview image when the target moment is determined as the end moment.
[0018] In yet another possible implementation, the above device further includes: a display module; the display module is configured to display a start marker at the start moment on the time axis of the video when the start moment is determined; display an end marker at the end moment on the time axis of the video when the end moment is determined; the receiving module is further configured to receive a first switching operation of the user on the start marker when there is a start marker displayed on the time axis of the video, and in response to the first switching operation, switch the start marker to an end marker; the receiving module is further configured to receive a second switching operation of the user on the end marker when there is an end marker displayed on the time axis of the video, and in response to the second switching operation, switch the end marker to a start marker.
[0019] In a third aspect, the present application provides an electronic device, which includes: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method of the first aspect described above.
[0020] In a fourth aspect, the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions run on an electronic device, the electronic device implements the method of the first aspect described above.
[0021] In a fifth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to execute the steps of the related method described in the first aspect to implement the method of the first aspect.
[0022] For the beneficial effects of the second to fifth aspects described above, reference may be made to the corresponding descriptions of the first aspect, and details will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of an application interface for a video segment selection method provided by the present application;
[0024] Figure 2 It is a schematic flowchart of a video segment selection method provided by the present application;
[0025] Figure 3 It is a schematic flowchart of another video segment selection method provided by the present application;
[0026] Figure 4 It is a schematic diagram of an application interface for another video segment selection method provided by the present application;
[0027] Figure 5 It is a schematic diagram of a marked point on a timeline provided by the present application;
[0028] Figure 6 It is a schematic diagram of an application interface for yet another video segment selection method provided by the present application;
[0029] Figure 7 It is a schematic diagram of an application interface for yet another video segment selection method provided by the present application;
[0030] Figure 8 It is a schematic diagram of an application interface for yet another video segment selection method provided by the present application;
[0031] Figure 9 It is a schematic diagram of another marked point on a timeline provided by the present application;
[0032] Figure 10Another schematic flow diagram of the video clip selection method provided by this application;
[0033] Figure 11 Schematic composition diagram of a video clip selection device provided by this application;
[0034] Figure 12 Schematic composition diagram of an electronic device provided by this application. Detailed implementation manners
[0035] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0036] It should be noted that in the embodiments of this application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.
[0037] To facilitate the clear description of the technical solutions in the embodiments of this application, in the embodiments of this application, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and roles. Those skilled in the art can understand that the words such as "first" and "second" do not limit the quantity and execution order.
[0038] As described in the background art, with the widespread use of surveillance cameras, the number of historical surveillance videos retained is also increasing. Based on historical surveillance videos, there are also more and more demand scenarios for locating and selecting video clips as records or evidence. For example, in the application scenario of enterprise security, for accidents or warnings that occur, users need to find the target video clip in the historical surveillance video for evidence preservation or accident cause analysis. Another example is in the field of financial transactions. When customers go to the branches of commercial banks to purchase wealth management products and conduct business. Due to the requirements of relevant departments, the financial transaction site needs to be recorded and videotaped throughout the process. However, in some cases, the on-site wealth management manager forgets to record the video, or the length of the video recorded on-site is insufficient. These situations cannot meet the requirements of relevant departments. Therefore, the wealth management manager needs to select the target video clip from the historical surveillance video as evidence for retention. Another example is in the transportation field. Surveillance cameras are installed at each intersection or section. When there are traffic violations or traffic accidents, the staff in the transportation field need to select the video clip of the incident from the historical surveillance video for analysis in order to handle the corresponding incident.
[0039] However, currently, the process of selecting video clips (or the editing process) mainly focuses on the short video creation scenarios of individual users. The existing technology can achieve the following effects: The user zooms in and out of the time scale on the timeline by rolling the mouse wheel, presses the left mouse button and moves it to horizontally move the timeline in the direction of the user's operation, so that the user can locate the approximate time range of the target video clip. At the same time, it detects the target moment selected by the user in the timeline, obtains the video frame at that moment, and displays it in the video playback area for the user to confirm, which is beneficial to simplifying the operation of the user to locate the target video clip.
[0040] The above process of selecting video clips has the following disadvantages: In the scenario of processing historical videos with a long time span, or in the scenario of accurately locating the start and end moments of the target video clip, the user needs to continuously zoom in and out of the time scale in the timeline, repeatedly drag, and finely click back and forth. Through the user's memory before and after, view and compare the video frames to confirm whether the recorded moment is the target moment. The operation of the selection process by the user is too redundant, and the requirement for the user's operation accuracy is too high, resulting in too low efficiency for the user to select the target video clip, greatly increasing the user's interaction cost and making the user experience poor. Among them, the interaction cost is the sum of the physical and mental efforts that the user must pay to achieve their goals, including the complexity and number of operations, the burden on the user's attention and memory, etc.
[0041] In summary, how to improve the efficiency of users in selecting target video clips and reduce the user's interaction cost is an urgent problem to be solved.
[0042] Based on this, an embodiment of the present application provides a method for selecting video segments, which can improve the efficiency of users in selecting video segments and reduce the interaction cost of users.
[0043] Figure 1 It is a schematic diagram of the application interface for a method for selecting video segments provided by an embodiment of the present application. As Figure 1 shown, the application interface from top to bottom includes a video playback screen area 101, a screen preview area 102, a preview gear adjustment area 103, a timeline 104 with time scales, and an operation control area 105.
[0044] Among them, the video playback screen area 101 can be used to play the screen of the video to be selected in the playback state. The video to be selected is the original video for the user to select the target video segment, and the subsequent content will not be elaborated one by one.
[0045] The screen preview area 102 can be used to display the preview screen.
[0046] The preview gear adjustment area 103 can be used to adjust the preview parameters. The preview parameters can include the time interval between preview screens. This time interval is the difference between the moments corresponding to any two adjacent preview screens in the screen preview area 102. For example Figure 1 the difference of 16s between the moments corresponding to preview screen 0 and preview screen 1 in the example is the above-mentioned time interval.
[0047] The timeline 104 with time scales carries marked points (displayed after receiving the marking operation of the user, used to indicate the target moment corresponding to the marking operation). The user can adjust the position of the marked point on the timeline to change the playback screen of the video playback screen area 101 and the preview screen of the screen preview area 102. The adjustment method for the user to adjust the marked point can be the user's click operation on the timeline, or the click-and-drag operation on the marked point, etc., or select a certain screen in the screen preview area 102, which will not be elaborated in detail here.
[0048] In the middle of the timeline 104 with time scales, there is also a playback position point. The playback position point is used to indicate the moment of the current displayed screen in the video playback screen 101.
[0049] On the left side of the operation control area 105 is the play / pause control, which can be used to change the playing state or pause state of the video. In the playing state, the picture preview area 102 will disappear, and the video playing picture area 101 will start playing the picture dynamically. In one implementation, when the user clicks the play / pause control, the selected video switches from the playing state to the pause state, and the picture preview area 102 is displayed. In one implementation, on the right side of the operation control area 105 is the full-screen control, which is used to control whether the selected video is displayed in full-screen mode. In the middle of the operation control area 105 is the save control. After the user selects the target video segment, the target video segment can be saved by clicking the save control.
[0050] The method for selecting a video segment provided by this application can be implemented through Figure 1 the application interface shown.
[0051] Exemplarily, Figure 2 FIG. is a schematic flowchart of a method for selecting a video segment provided by an embodiment of this application. As Figure 2 shown, the method may specifically include the following steps:
[0052] S201. The video segment selection device receives at least two marking operations of the user on the video.
[0053] Among them, the video is the aforementioned selected video. One marking operation is used to indicate the selection of a target moment.
[0054] Specifically, in the selected video, to select the target video segment, at least the start moment and the end moment of the target video segment need to be determined. Determining one end moment (start moment or end moment, not described one by one later) requires the user to perform at least one marking operation to indicate the selection of a target moment. Therefore, in S201, the video segment selection device can receive at least two marking operations of the user on the video, which are used to determine the start moment and / or the end moment of the target video segment in subsequent steps.
[0055] It should be noted that the above at least two marking operations can be the marking operations of the user on the time axis of the video in sequence. The embodiment of this application does not limit the occurrence time of the marking operation.
[0056] S202. For each of the at least two marking operations, as a response to the marking operation, the video segment selection device obtains and displays the target preview picture.
[0057] Among them, the target preview picture of one marking operation includes: the preview picture in the video corresponding to the target moment marked by this marking operation on the time axis of the video, and the preview pictures corresponding to X adjacent moments of the target moment, where X is an integer greater than or equal to 1.
[0058] After receiving a marking operation from the user, the video segment selection device can, in response to the marking operation, obtain the preview frame corresponding to the target moment marked by the marking operation in the video, as well as the preview frames corresponding to X adjacent moments of the target moment, and display these preview frames for the user to intuitively determine whether the input marking operation is accurate, so that the user can confirm or modify the marking operation to finally determine the moment for selecting the target video segment.
[0059] Similarly, if the video segment selection device receives a marking operation again, it will re-obtain and display the target preview frame corresponding to the new marking operation. That is, every time the video segment selection device receives a marking operation, it will execute the process of S202.
[0060] It should be noted that for the specific process of obtaining and displaying the target preview frame corresponding to the marking operation, reference can be made to Figure 3 S302 therein, which will not be elaborated in detail here.
[0061] S203. The video segment selection device determines the start moment or the end moment from the target moments according to each marking operation among at least two marking operations.
[0062] In some embodiments, the video segment selection device can determine the start moment or the end moment from the target moment corresponding to each marking operation according to each marking operation.
[0063] Optionally, the above at least two marking operations may include a selection operation on the time axis of the video, or, in the case where there is a target preview frame, a selection operation on the preview frames included in the target preview frame. Among them, the selection operation on the preview frames included in the target preview frame may be a click operation on a certain preview frame in the target preview frame. At this time, the target moment corresponding to the selection operation is the moment corresponding to the selected preview frame.
[0064] Specifically, in S203, if the marking operation is a selected operation on the time axis of the video, then S203 can be specifically implemented as follows: when there is no moment determined as a starting point or an ending point before the target moment, determine the target moment as the starting point moment; when there is only a moment determined as an ending point before the target moment, determine the target moment as the ending point moment; when there is a moment determined as a starting point before the target moment and there is no moment determined as an ending point on the time axis of the video, determine the target moment as the ending point moment; when there is a moment determined as a starting point before the target moment and there is a moment determined as an ending point on the time axis of the video, determine the target moment as the same type of endpoint moment as the starting point moment and the ending point moment according to the target moment, the duration between the moment determined as the starting point and the moment determined as the ending point, that is, determine the target moment as the endpoint moment of the same type as the moment that the target moment is closer to in terms of time.
[0065] Further, if the user newly initiates a marking operation, then for this newly initiated marking operation, S202 and S203 are re-executed until a new starting point moment or ending point moment is determined.
[0066] S204. The video segment selection device receives the save operation of the user.
[0067] Specifically, after the user selects the starting point moment and the ending point moment of the target video segment, the user can input a save operation through the save control, so that the video segment selection device can receive the save operation of the user.
[0068] S205. In response to the save operation, when the starting point moment and the ending point moment are determined, the video segment selection device saves the target video segment according to the target starting point moment and the target ending point moment.
[0069] Among them, the target starting point moment and the target ending point moment are respectively the starting point moment and the ending point moment determined last before receiving the save operation, and the target video segment is the video segment from the target starting point moment to the target ending point moment in the video (the video to be selected).
[0070] The video segment selection device can receive the save operation of the user. In response to the save operation, the video segment selection device can save the video segment from the target starting point moment to the target ending point moment (i.e., the target video segment) in the video according to the starting point moment determined last before receiving the save operation (i.e., the target starting point moment) and the ending point moment determined last (i.e., the target ending point moment).
[0071] The technical solutions provided by the above embodiments at least bring the following beneficial effects. The video clip selection method provided by the embodiments of the present application can receive the marking operations of the user on the video. By displaying the preview video frame of the target moment marked by the marking points corresponding to the user's marking operations, and the preview frames of multiple adjacent moments of the target moment, when the user marks a certain target moment, multiple preview frames related to the target moment are displayed for the user, which is convenient for the user to quickly determine the start and end positions of the target video clip through the displayed multiple preview frames. It can effectively reduce the operation steps of the user repeatedly zooming in and out the time scale and repeatedly playing the video, and improve the efficiency of the user to select video clips.
[0072] The following will elaborate in detail on the video clip selection method provided by the embodiments of the present application in combination with specific embodiments. This method can be applied to a video clip selection device. As Figure 3 shown, the video clip selection method may include the following S301 - S305.
[0073] S301. The video clip selection device receives at least two marking operations of the user on the video.
[0074] For the specific description of this step, refer to the above S201, and details will not be repeated here.
[0075] Optionally, the marking operation may include a marking operation initiated on the timeline, or a selection operation on the preview frame in the target preview frame.
[0076] S302. For each of the at least two marking operations, as a response to the marking operation, the video clip selection device obtains and displays the target preview frame.
[0077] Among them, the target preview frame includes: the preview frame corresponding to the target moment marked by the marking operation on the timeline of the video, and the preview frames corresponding to X adjacent moments of the target moment, where X is an integer greater than or equal to 1.
[0078] In some embodiments, after receiving a marking operation of the user, the video clip selection device can, in response to the marking operation, obtain the preview frame corresponding to the target moment marked by the marking operation in the video, and the preview frames corresponding to X adjacent moments of the target moment, and display these preview frames.
[0079] In a possible implementation manner, the preview frames corresponding to X adjacent moments of the target moment may be X image frames adjacent to the preview frame of the target moment. X may be a preset value. In S302, the video clip selection device reads the preview frame of the target moment and X image frames adjacent to the preview frame of the target moment from the video to be selected as the target preview frame corresponding to the marking operation.
[0080] In another possible implementation, a target preview screen can be obtained according to preview parameters. As Figure 3 shown, the method for selecting a video segment provided in this application may further include S302a-S302b.
[0081] S302a. The video segment selection device obtains preview parameters.
[0082] Among them, the preview parameters include: the height of the preview screen, the preview gear, and the minimum time unit of the video.
[0083] In some embodiments, the video segment selection device may obtain preview parameters such as the height of the preview screen, the preview gear, and the minimum time unit of the video. The preview parameters may be set by the user in advance, or may be the parameter values default set by the video segment selection device. The embodiments of this application do not make specific limitations on this. In addition, the video segment selection device may obtain the preview parameters before receiving the user's marking operation, or may obtain them after receiving the user's marking operation, or may obtain them while receiving the user's marking operation. The embodiments of this application do not make specific limitations on this either.
[0084] S302b. The video segment selection device obtains a target preview screen according to the preview parameters.
[0085] Specifically, the steps of obtaining the target preview screen according to the preview parameters in S302b may be as follows:
[0086] 1. Determine X according to the height of the preview screen.
[0087] Among them, X = 2n, where n is a positive integer. The X adjacent moments corresponding to the preview screen at the target moment include: the preview screens corresponding to the first n adjacent moments before the target moment, and the preview screens corresponding to the last n adjacent moments after the target moment.
[0088] In some embodiments, the video segment selection device may determine the value of X according to the height of the preview screen.
[0089] Exemplarily, taking the aspect ratio of the video screen in the normal case as 16:9 and the length L of the video playback screen as 900px as an example for illustration. The video segment selection device may determine the value of n according to the following formula.
[0090]
[0091] Among them, h is the height of the preview screen obtained by the video segment selection device. The largest positive integer n that satisfies the above formula is the number of preview screens at the adjacent moments before the target moment and the number of preview screens at the adjacent moments after the target moment.
[0092] It can be understood that the aspect ratio 16:9 of the screen and the length L of the video playback screen in the above formula can be adjusted according to the actual application environment, and the embodiments of the present application do not make specific limitations on this.
[0093] For example, if the height h of the preset preview screen is 100px, the video clip selection device can determine that the value of n is 2 according to the above formula, that is, X = 2n = 4. Therefore, the target preview screen includes the preview screen corresponding to the target moment marked on the time axis of the video by the marking operation, as well as the preview screens corresponding to the 2 adjacent moments before the target moment, and the preview screens corresponding to the 2 adjacent moments after the target moment. Therefore, in this example, the target preview screen includes a total of 5 preview screens.
[0094] 2. Determine the target time interval according to X, the preview gear, and the minimum time unit of the video.
[0095] Among them, the target time interval is the time interval between any two adjacent preview screens included in the target preview screen.
[0096] In some embodiments, the video clip selection device can determine the time interval between any two adjacent preview screens included in the target preview screen, that is, the target time interval, according to X, the preview gear, and the minimum time unit of the video.
[0097] Exemplarily, the video clip selection device can determine the target time interval according to the formula n x-1 Δt. Where n is the value X / 2 determined in the above step, x is the preview gear, and Δt is the minimum time unit of the video. Among them, the minimum time unit of the video can be set by the user in advance or can be the default value of the system. The preview gear can be adjusted according to the user's needs, and the default is the maximum preview gear x = 5. As Figure 1 shown, the slider for adjusting the gear in the preview gear adjustment area is at the far right.
[0098] For example, taking the default maximum preview gear x = 5, the minimum time unit of the video Δt = 1s, and the above-determined n = 2 as an example, the video clip selection device can determine the time interval between the preview screens as 16s according to the formula n x-1 Δt.
[0099] 3. Obtain the target preview screen according to X and the target time interval.
[0100] In some embodiments, the video clip selection device can obtain the target preview screen according to X and the target time interval, and display it.
[0101] For example, in combination with the examples in the above embodiments, the video clip selection device obtains and displays the target preview screen according to n = 2 and the time interval of 16 s between any two adjacent preview screens included in the target preview screen. The display effect is as Figure 1 shown. Among them, Figure 1 the target preview screen shown includes preview screen 0 corresponding to the target moment (09:45:00) marked by the marking operation, and also includes the previous 2 moments adjacent to the target moment and the corresponding preview screens -2 (09:44:28) and preview screen -1 (09:44:44), as well as the next 2 moments adjacent to the target moment and the corresponding preview screens 1 (09:45:16) and preview screen 2 (09:45:32).
[0102] In some other embodiments, the time intervals between each preview screen in the target preview screen may be in a progressive relationship. For example, in combination with the above embodiments, after determining that the time interval of the target preview screen is 16 s, the change value of the progressive relationship is determined according to this time interval. Combining the four intervals in the target preview screen in the above embodiments, it is determined that the change value is 4 s, then Figure 1 the time interval between preview screen -2 and preview screen -1 is 4 s, the time interval between preview screen -1 and preview screen 0 is 8 s, the time interval between preview screen 0 and preview screen 1 is 12 s, and the time interval between preview screen 1 and preview screen 2 is 16 s. The specific settings can be adjusted according to the actual scenario, and the embodiments of the present application do not make specific limitations in this regard.
[0103] It should be noted that in some scenarios, the default or initially set preview parameters cannot meet the user's need to select video clips. Therefore, the user can adjust the preview parameters to adjust the target preview screen to meet their own need to select video clips. Specifically, as Figure 3 shown, S302 in the video clip selection method provided by the present application may further include the following S302c - S302d to adjust the preview parameters according to the user's needs.
[0104] S302c. The video clip selection device receives the adjustment operation of one or more parameters in the preview parameters by the user.
[0105] S302d. In response to the adjustment operation, the video clip selection device re - obtains and displays the target preview screen according to the adjusted preview parameters.
[0106] In some embodiments, the video clip selection device may receive the adjustment operation of one or more parameters in the preview parameters by the user. In response to the adjustment operation, the video clip selection device may re - obtain and display the target preview screen according to the adjusted preview parameters.
[0107] For example, if the user feels that the number of target preview screens is too small, the user can increase the number of target preview screens by reducing the height of the preview screen. This example will illustrate the adjustment of the preview gear by the user. As previously mentioned, the preview gear is used to adjust the time interval between any two adjacent preview screens in the preview screens included in the target preview screen. As described in the foregoing embodiments, as Figure 1 shown, the preview gear adjustment area has five gears from left to right, and the corresponding time intervals are 1s, 2s, 4s, 8s, and 16s respectively. By default, the preview gear is in the fifth gear, that is, Figure 1 the slider for adjusting the gear is at the rightmost side of the preview gear adjustment area. In this case, the time interval between any two adjacent preview screens in the preview screens included in the target preview screen is 16s. If the user feels that this time interval is too large, the user can move the slider for adjusting the gear to reduce the time interval. As Figure 4 shown, the user can operate the mouse to drag the slider for adjusting the gear to adjust the preview gear to the second gear, that is, the corresponding target time interval is 2s. Then, the video segment selection device can respond to this adjustment operation and re-obtain and display the target preview screen according to the adjusted preview gear. As Figure 4 shown, the preview screen 0 (corresponding to the moment 09:45:00) remains unchanged, and the preview screens adjacent to the preview screen 0 are re-obtained at a time interval of 2s, that is, the preview screens -0.4 (corresponding to the moment 09:44:56) and -0.2 (corresponding to the moment 09:44:56) at the two moments before the preview screen 0, and the preview screens 0.2 (corresponding to the moment 09:45:02) and 0.4 (corresponding to the moment 09:45:04) at the two moments after the preview screen 0.
[0108] It should be noted that in the above example, the time interval corresponding to the minimum gear is 1s. For a short video, the video segment that the user wants to select may be less than 1s, just a few frames. In this case, even the time interval of the minimum gear cannot meet the requirements. Therefore, the user can further reduce the minimum time unit Δt of the video, for example, from the default 1s to 0.1s. Then, the time intervals that the preview gear can adjust are 0.1s, 0.2s, 0.4s, 0.8s, and 1.6s for the user to select a suitable time interval to meet the requirements of video segment selection.
[0109] The preview screens included in the target preview screen obtained and displayed in the foregoing embodiments are static single-frame pictures. Although there are multiple preview screens at different moments, in some cases, it is difficult to meet the needs of the user to select video segments. Therefore, the method provided in the embodiments of the present application also supports the playback of preview screens, specifically as Figure 3As shown, the video clip selection method provided by this application may further include the following S302e - S302f:
[0110] S303e. The video clip selection device receives a preview operation of the user on the first preview screen included in the target preview screen.
[0111] S303f. In response to the preview operation, the video clip selection device plays the first preview screen.
[0112] In some embodiments, after the target preview screen is displayed, the video clip selection device may receive a preview operation of the user on the first preview screen included in the target preview screen. In response to the preview operation, the video clip selection device may play the first preview screen. Among them, the preview operation may be a hovering operation of the mouse on the preview screen or other operations, which are not limited in the embodiments of this application.
[0113] Exemplarily, when the target moment is determined as the starting moment, the video screen for a period of time after the moment corresponding to the first preview screen is played. When the target moment is determined as the ending moment, the video screen for a period of time before the moment corresponding to the first preview screen is played. In addition, the duration of this period of time may be determined by the preview playback parameter.
[0114] For example, the preview playback parameter may be set by the user in advance or be the default value set by the video clip selection device. Taking the default value of the preview playback parameter t_1 as 2s as an example, in combination with Figure 4 for illustration. In Figure 4 , if the user wants to play the preview screen 0.4 (i.e., the first preview screen) in the target preview screen corresponding to the start marker, the user can move the mouse cursor to the area of preview screen 0.4 and hover (i.e., the above preview operation). As shown in Figure 8 , then preview screen 0.4 automatically starts to play the video screen for a period of time after the moment corresponding to preview screen 0.4 once. The automatically played duration is related to the preview playback parameter, that is, the video screen with a duration of 2s between the moment corresponding to preview screen 0.4 (09:45:04) and the moment (09:45:06) is automatically played. Similarly, in Figure 6 , if the user wants to play the preview screen 10.4 in the target preview screen corresponding to the end marker, the user can move the mouse cursor to the area of preview screen 10.4 and hover, then preview screen 10.4 automatically starts to play the video screen for a period of time before the moment corresponding to the preview screen once, that is, the video screen with a duration of 2s between the moment (11:30:02) and the moment (11:30:04).
[0115] S303. The video clip selection device determines a start time or an end time from the target times according to each of at least two marking operations.
[0116] In some embodiments, when the above marking operation is a selection operation of the user on the time axis of the video, the video clip selection device determines the time corresponding to the user's selection operation as the target time. The steps of determining the start time or the end time on the time axis of the video in S303 are specifically as follows:
[0117] Step 1. Determine whether there is a time determined as a start or end time before the target time.
[0118] If it is determined in Step 1 that there is no time determined as a start or end time before the target time, then determine the target time as the start time.
[0119] If it is determined in Step 1 that there is a time determined as a start or end time before the target time, execute Step 2.
[0120] Step 2. Determine whether there is only a time determined as an end time before the target time.
[0121] If it is determined in Step 2 that there is only a time determined as an end time before the target time, then determine the target time as the end time.
[0122] If there is a time determined as a start time before the target time in Step 2, execute Step 3.
[0123] Step 3. When there is a time determined as a start time before the target time, determine whether there is a time determined as an end time on the time axis of the video.
[0124] If it is determined in Step 3 that there is no time determined as an end time on the time axis of the video, then determine the target time as the end time.
[0125] If it is determined in Step 3 that there is a time determined as an end time on the time axis of the video, execute Step 4.
[0126] Step 4. Determine the start time or the end time according to the target time, the time determined as the start time, and the time determined as the end time.
[0127] Among them, the specific determination steps of Step 4 are as follows:
[0128] If the first time interval is less than the second time interval, then determine the target time as the start time; if the first time interval is greater than the second time interval, then determine the target time as the end time. Wherein, the first time interval is the time interval between the target time and the time determined as the start time, and the second time interval is the time interval between the target time and the time determined as the end time.
[0129] For example, in the initial state, the leftmost side (00:00:00) of the video timeline coincides with the playback point in the middle of the interface. When the user clicks on the moment (09:45:00) on the timeline, which is the above-mentioned target moment. According to step 1 above, the video clip selection device determines that there is no moment determined as the start or end point before the target moment, so the video clip selection device determines this target moment as the start moment, as Figure 5 shown in a at (09:45:00), there is a marker point, which is a trapezoid with the upper base facing left and the lower base facing right, used to indicate that this marker point is the start marker, and the moment marked by this start marker is the start moment.
[0130] Another example, in Figure 5 the state shown in a, when the user clicks on the moment (09:00:00) on the timeline, according to step 1, there is no moment determined as the start or end point before (09:00:00), so the video clip selection device determines the newly clicked target moment (09:00:00) by the user as the start moment, that is, as Figure 5 shown in b at (09:00:00), a start marker is displayed, and the original start marker disappears.
[0131] Another example, in Figure 5 the state shown in a, when the user clicks on (10:00:00) on the timeline, according to the above steps 1 and 3, there is a moment determined as the start point before the target moment, and there is no end moment on the video timeline, so the video clip selection device determines this target moment as the end moment, that is Figure 5 shown in c at (10:00:00), there is a marker point, which is a trapezoid with the lower base facing left and the upper base facing right, used to indicate that this marker point is the end marker, and the moment marked by this end marker is the end moment. Since there are start and end markers on the timeline, the video clip selection device can highlight the video clip between the start and end markers, as Figure 5 shown in c, to prompt the user of the currently selected video clip.
[0132] Another example, in Figure 5In the state shown in Figure c, if the user clicks on the position to the left of the start marker on the timeline, according to Step 1 above, the video clip selection device determines the newly clicked moment as the start moment, that is, stretches the video clip to the left. If the user clicks on the middle position of the video clip, according to Step 4 above, if the target position clicked by the user is closer to the start marker (i.e., the target moment is closer to the existing start moment), the video clip selection device determines the target moment as the new start moment, that is, shortens the video clip to the right. If the target position clicked by the user is closer to the end marker (i.e., the target moment is closer to the existing end moment), the video clip selection device determines the target moment as the new end moment, that is, shortens the video clip to the left. If the user clicks on the position to the right of the end marker on the timeline, according to Step 4 above, the video clip selection device determines that the target moment is closer to the end moment, and then determines this target moment as the new end moment, that is, stretches the video clip to the right.
[0133] It should be noted that for the newly determined start moment or end moment by the video clip selection device, corresponding start markers or end markers will be displayed. Moreover, the new marker point will obtain a focused state, and at the same time, the timeline will move horizontally left and right so that the focused marker point coincides with the playback point in the center of the interface. As Figure 5 shown in Figure c, the start marker loses the focused state and the end marker is in the focused state, then the timeline moves horizontally to the left so that the end marker coincides with the playback point. This makes the marker point that the user is operating (such as Figure 5 the end marker in Figure c) always in the middle position of the interface, facilitating the user to observe the moments before and after the marker point being operated and facilitating the user to select the target moment.
[0134] In addition, for each selection operation of the user on the timeline, the video clip selection device will regard it as a marking operation and obtain and display the target preview image corresponding to the moment selected by this marking operation. For example Figure 4 in the figure, when the user selects (09:45:00), the video clip selection device displays the start marker and displays the target preview images corresponding to this start marker (Preview Image -0.4, Preview Image -0.2, Preview Image 0, Preview Image 0.2, and Preview Image 0.4). Among them, the preview image 0 corresponding to the start moment of the start marker is in the focused state ( Figure 4 shown in a highlighted state in the figure). When the user selects (11:30:00), the video clip selection device determines it as the end moment, then as Figure 6As shown, the video clip selection device displays an end marker at (11:30:00), and re-acquires and displays the target preview images (preview image 9.6, preview image 9.8, preview image 10, preview image 10.2, and preview image 10.4). Among them, preview image 10 is the preview image corresponding to the end time (11:30:00) and is in the focused state. Moreover, the end marker coincides with the playback position, so that the focused preview image 10 can be displayed within the video playback image area in Figure 1 , which is equivalent to magnifying the corresponding preview image 10, enabling the user to more clearly see the details of the image and facilitating the user to accurately select the target video clip.
[0135] It should be noted that the video clip selection device can repeat the process of S301 to S303 for each marking operation input by the user to determine one or more start times and end times. Of course, in this process, the user can re-enter the marking operation for determining the start time or end time in various ways, and the embodiments of the present application do not limit the process of inputting the marking operation.
[0136] Among the multiple preview images included in the displayed target preview images, if there is a preview image that the user wants to mark or the target preview image needs to be further refreshed, as Figure 3 shown, the video clip selection device can also execute the following S303a:
[0137] S303a. Determine that the time corresponding to the preview image selected by the selection operation is the start time or the end time.
[0138] In some embodiments, when storing the target preview image, when the above marking operation is the selection operation of the preview image included in the target preview image by the user, after receiving the user's selection operation, the video clip selection device can use the time corresponding to the selected preview image as the target time to determine the start time or the end time on the time axis of the video. Among them, the marking operation can be the selection operation of the preview image by the user, for example, the user clicks on the preview image with the mouse.
[0139] For example, in combination with the Figure 4 in the above embodiments, if Figure 4 preview image 0.4 is the preview image that the user needs to mark, the user can select it by moving the mouse cursor to the area of preview image 0.4, or move the preview image by using the left and right keys on the keyboard to make preview image 0.4 in the focused state. As Figure 7As shown, the preview screen 0.4 is in the middle of the interface and in the focused state, and the preview screens at two adjacent moments before and after the preview screen 0.4 are retrieved again (preview screen 0, preview screen 0.2, preview screen 0.6, and preview screen 0.8). And since the user selected the target preview screen at the starting moment in Figure 4 Therefore, the video segment selection device moves the starting point marker to the moment corresponding to the preview screen 0.4 (09:45:04), determines this moment as the new starting moment, and the starting point marker coincides with the playback position. Similarly, if the user performs a selection operation on the target preview screen at the ending moment, the video segment selection device determines the moment corresponding to the selected preview screen as the new ending moment.
[0140] It should be understood that the method for determining the starting moment or the ending moment provided in this embodiment displays adjacent preview screens before and after, and can determine the starting moment and the ending moment according to the preview screen selected by the user. The coherence of such preview screens enables the user to select video segments precisely, without the need for the user to repeatedly zoom the time scale and drag back and forth, improving the efficiency and accuracy of the user's selection of video segments.
[0141] Optionally, the user can switch the existing marker points on the time axis of the video (the marker points are displayed when receiving the user's marking operation. Since the marking operation is used to mark the target moment, the marker points can indicate the target moment), such as Figure 3 As shown, the following S303b can also be executed:
[0142] S303b. When there are marker points displayed on the time axis of the video, the video segment selection device receives the user's switching operation on the marker points, and in response to the switching operation, switches the marker points.
[0143] Among them, the marker points are the starting point marker or the ending point marker.
[0144] In some embodiments, when the video segment selection device determines the starting moment, it can display a starting point marker at the starting moment on the time axis of the video. The video segment selection device can receive the user's first switching operation on the starting point marker, and in response to the first switching operation, switch the starting point marker to an ending point marker. When the video segment selection device determines the ending moment, it can display an ending point marker at the ending moment on the time axis of the video. The video segment selection device can receive the user's second switching operation on the ending point marker, and in response to the second switching operation, switch the ending point marker to a starting point marker. Among them, the first switching operation and the second switching operation can be the same or different, and the embodiments of the present application do not make specific limitations in this regard. Exemplarily, the switching operation can be a double-click operation of the mouse or other operations, and the embodiments of the present application do not make specific limitations.
[0145] For example, if only a start marker exists on the time axis of the video, the user can double-click on the start marker (i.e., the above-mentioned switching operation), and the video clip selection device can receive the user operation and switch the start marker to an end marker. Similarly, if only an end marker exists on the time axis of the video, the user can double-click on the end marker, and the video clip selection device can receive the user operation and switch the end marker to a start marker.
[0146] For another example, if both a start marker and an end marker exist on the time axis of the video, as Figure 9 shown in a of, when the user double-clicks on the start marker, the video clip selection device switches the start marker to an end marker, and the original end marker disappears. Similarly, when the user double-clicks on the end marker, as Figure 9 shown in b of, the video clip selection device switches the end marker to a start marker, and the original start marker disappears.
[0147] In some other embodiments, the above-mentioned marking operation can also be a click-and-drag operation by the user. After the marking point is displayed on the time axis of the video, the video clip selection device can receive the click-and-drag operation of the user on the marking point. The position where the mouse is released is the position to which the marking point moves. At the same time, the time axis horizontally moves to the position where the marking point being operated by the user coincides with the playback point, and the target preview screen is read and displayed again.
[0148] S304. The video clip selection device receives the save operation of the user.
[0149] S305. In response to the save operation, the video clip selection device saves the target video clip according to the target start time and the target end time.
[0150] Wherein, the target start time and the target end time are respectively the last determined start time and end time before receiving the save operation, and the target video clip is the video clip in the video from the target start time to the target end time.
[0151] During the process of the user selecting the target video clip, the video clip selection device can repeatedly execute one or more of the above S301 - S303 to determine the finally selected target start time and target end time by the user.
[0152] In some embodiments, the video clip selection device can receive the save operation of the user. In response to the save operation, when the start time and the end time are determined, the video clip selection device can save the video picture in the video between the target start time and the target end time.
[0153] For example, Figure 6The starting time and ending time shown are the target starting time and target ending time finally selected by the user. After the video clip selection device receives the user's click to save operation, it selects the video clip from (09:45:00 - 11:30:00) as the target video clip selected by the user and saves it.
[0154] It should be noted that only when there are marked video clips on the timeline (that is, there are both a starting mark corresponding to the starting time and an ending mark corresponding to the ending time), the video clip selection device can save the video clip after receiving the user's save operation (the user clicks the save control in Figure 1 the mouse). If there is only one marked point (starting mark or ending mark) on the timeline of the video, or there is no marked point, and the user clicks the save control, an information will be popped up to prompt the user "Please select a video clip".
[0155] Figure 10 This is a schematic flowchart of a method for a user to select a video clip by operation provided by an embodiment of the present application. As Figure 10 shown, at the beginning, the user clicks on the timeline with the mouse to select the target time 1. After receiving the selection instruction, it is default marked as the starting mark, and this target time is moved to the playing position, and the video frame corresponding to this target time (and selected) and the preview frames of the previous and next n adjacent times (default maximum time interval) are read. The mouse hovers over a certain preview frame in the frame preview area, and after receiving the starting video preview instruction, all the frames within the t1 period starting from the current time are read, and they are automatically played continuously once in this frame and then stopped. It is judged whether the user adjusts the frame time interval. If so, the adjusted time interval is received, and the preview frames of the previous and next n adjacent times (the currently selected time interval) corresponding to the selected frame are obtained again. Next, it is judged whether the user switches the selected frame. If so, in the frame preview area, after receiving the user's click or pressing the direction keys "left / right" to switch the selected preview frame, the mark point is moved to the time corresponding to this frame and still remains at the playing position, and the preview frames of the previous and next n adjacent times (the currently selected time interval) of this time are read; if not, it is judged whether there is a marked video clip on the timeline of the video. If so, the user can click the save control to determine to select and save the marked video clip, and end; if not, the user clicks on the timeline with the mouse to select the target time 2. After receiving the selection instruction, it is default marked as the ending mark, and this target time is moved to the playing position, and the video frame corresponding to this target time (and selected) and the preview frames of the previous and next n adjacent times (default maximum time interval) are read. Further, the mouse hovers over a certain preview frame in the frame preview area, and after receiving the starting video preview instruction, all the frames within the t1 period ending from the current time are read, and they are automatically played continuously once in this frame and then stopped.
[0156] In some cases, in the application scenario of enterprise security, for the accidents or warnings that occur, it is necessary for users to find and select the video clips in which multiple relevant people or events appear in the surveillance video recording for evidence preservation and analysis. Therefore, the video clip selection method provided in this application also supports the multi-video clip selection mode.
[0157] In some embodiments, when there are already marked video clips on the time axis of the video, the video clip selection device can receive the user's marking operation, and determine whether there is a marked start time at the nearest time before the target time marked by the marking operation. If not (no mark or there is a marked end time), the video clip selection device can determine that the target time is the new start time, and the original start time is retained; if so, the video clip selection device can determine that the target time is the new end time, and at this time, there are two marked video clips on the time axis of the video. Similarly, by repeating the above operation, the user can select multiple video clips. After receiving the user's save operation, the video clip selection device can save the marked multiple video clips.
[0158] The technical solutions provided in the above embodiments have at least the following beneficial effects. For the video clip selection method provided in this application, when the user performs a marking operation on a certain target time, the preview video frame corresponding to the user's marking operation and the preview frames of multiple adjacent times of the target time are displayed, which is convenient for the user to quickly determine the start and end positions of the target video clip through the displayed multiple preview frames, and can effectively reduce the operation steps of the user repeatedly zooming in and out of the time scale and repeatedly playing the video, thereby improving the efficiency of the user to select video clips.
[0159] Furthermore, in the embodiments of this application, by reading multiple preview frames, the user can watch more frames simultaneously, and the number of frames and the interval between frames can be adjusted according to the user's needs to generate a reasonable series of coherent preview frames, meeting the user's business needs in various scenarios, improving the efficiency of the user to select video clips, and enabling the user to quickly narrow down the time range and accurately locate the target time. Moreover, the preview frames support dynamic video playback in the start mode and the end mode, and the user can preview and play the video frames according to their own needs, so as to more accurately determine the start time and end time of the target video clip. The video clip selection method provided in the embodiments of this application marks the start time and end time through the interactive methods of the user clicking and marking on the time axis, dragging and adjusting, and double-clicking to switch, providing the user with the default marking logic and a quick editing entry, making the interaction more convenient and efficient while retaining the user's sense of control and freedom, and optimizing the user's experience.
[0160] In an exemplary embodiment, the present application further provides a video clip selection device. The video clip selection device may include one or more functional modules for implementing the video clip selection method in the above method embodiment.
[0161] For example, Figure 11 is a schematic diagram of the composition of a video clip selection device provided in an embodiment of the present application. As Figure 11 shown, the video clip selection device includes: a receiving module 1101, an obtaining module 1102, a determining module 1103, and a saving module 1104. The receiving module 1101, the obtaining module 1102, the determining module 1103, and the saving module 1104 are connected to each other.
[0162] The receiving module 1101 is configured to receive at least two marking operations of the user on the video; one marking operation is used to indicate selecting a target moment.
[0163] The obtaining module 1102 is configured to, for each of the at least two marking operations, as a response to the marking operation, obtain and display a target preview screen; the target preview screen includes: a preview screen corresponding to the target moment marked by the marking operation on the time axis of the video, and preview screens corresponding to X adjacent moments of the target moment, where X is an integer greater than or equal to 1.
[0164] The determining module 1103 is configured to determine a start moment or an end moment on the time axis of the video according to each of the at least two marking operations.
[0165] The receiving module 1101 is further configured to receive a saving operation of the user.
[0166] The saving module 1104 is configured to, as a response to the saving operation, save a target video clip according to the target start moment and the target end moment; the target start moment and the target end moment are respectively the last determined start moment and end moment before receiving the saving operation, and the target video clip is the video clip in the video from the target start moment to the target end moment.
[0167] In some embodiments, X = 2n, where n is a positive integer. The preview screens corresponding to the X adjacent moments of the target moment include: preview screens corresponding to the first n adjacent moments of the target moment, and preview screens corresponding to the last n adjacent moments of the target moment.
[0168] In some embodiments, the marking operation is: a selection operation of the user on the time axis of the video, or, the marking operation is: in the case where there is a target preview screen, a selection operation of the user on the preview screens included in the target preview screen. The determining module 1103 is specifically configured to determine the moment corresponding to the selected preview screen of the selection operation as the start moment or the end moment.
[0169] In some embodiments, the marking operation is: a selected operation by the user on the timeline of the video. The determination module 1103 is specifically configured to determine the target moment as the start moment when there is no moment determined as the start or end moment before the target moment; determine the target moment as the end moment when there is only a moment determined as the end moment before the target moment; when there is a moment determined as the start moment before the target moment and there is no moment determined as the end moment on the timeline of the video, determine the target moment as the end moment; when there is a moment determined as the start moment before the target moment and there is a moment determined as the end moment on the timeline of the video, determine the start moment or the end moment according to the target moment, the moment determined as the start moment, and the moment determined as the end moment.
[0170] In some embodiments, the above device further includes: a playback module 1105.
[0171] The receiving module 1101 is further configured to receive a preview operation by the user on the first preview screen included in the target preview screen.
[0172] The playback module 1105 is configured to, in response to the preview operation, play the first preview screen.
[0173] Specifically, the playback module 1105 is configured to play the video screen for a period of time after the moment corresponding to the first preview screen when the target moment is determined as the start moment; play the video screen for a period of time before the moment corresponding to the first preview screen when the target moment is determined as the end moment.
[0174] In some embodiments, the above device further includes: a display module 1106.
[0175] The display module 1106 is configured to display a start marker at the start moment on the timeline of the video when the start moment is determined.
[0176] The display module 1106 is further configured to display an end marker at the end moment on the timeline of the video when the end moment is determined.
[0177] The receiving module 1101 is further configured to, when a start marker is displayed on the timeline of the video, receive a first switching operation by the user on the start marker, and in response to the first switching operation, switch the start marker to an end marker; when an end marker is displayed on the timeline of the video, receive a second switching operation by the user on the end marker, and in response to the second switching operation, switch the end marker to a start marker.
[0178] In an exemplary embodiment, the embodiment of the present application further provides an electronic device, and the electronic device may be the video segment selection device in the above method embodiment.Figure 12 This is a schematic diagram of the components of the electronic device provided by the embodiments of the present application. As Figure 12 shown, the electronic device may include: a processor 1201 and a memory 1202; the memory 1202 stores instructions executable by the processor 1201; when the processor 1201 is configured to execute the instructions, the electronic device implements the method described in the foregoing method embodiments.
[0179] In an exemplary embodiment, the embodiments of the present application further provide a computer-readable storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a computer, the computer implements the method described in the foregoing embodiments. Wherein, the computer may be the above-mentioned electronic device. The computer-readable storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0180] In an exemplary embodiment, the embodiments of the present application further provide a computer program product, when the computer program product runs on a computer, the computer executes the above-related method steps to implement the video segment selection method in the above embodiments.
[0181] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for selecting video segments, characterized in that, The method includes: Receiving at least two marking operations on the video by the user; one of the marking operations is used to indicate selecting a target moment; For each of the at least two marking operations, as a response to the marking operation, obtaining and displaying a target preview screen; the target preview screen includes: the preview screen corresponding to the target moment in the video, and the preview screens corresponding to X adjacent moments of the target moment, where X is an integer greater than or equal to 1; Based on each of the at least two marking operations, determining a start moment or an end moment from the target moments one or more times; Among them, the determining a start moment or an end moment from the target moments one or more times based on each of the at least two marking operations includes: Among them, if there is no moment determined as a start or end moment before the new target moment indicated by the newly initiated marking operation of the user, then determine the new target moment as the start moment; if there is only a moment determined as an end moment before the new target moment, then determine the new target moment as the new end moment; if there is a moment determined as a start moment before the new target moment and there is no moment determined as an end moment on the time axis of the video, then determine the new target moment as the end moment; when there is a moment determined as a start moment before the target moment and there is a moment determined as an end moment on the time axis of the video, if the first time interval is less than the second time interval, then determine the target moment as the start moment, if the first time interval is greater than the second time interval, then determine the target moment as the end moment, where the first time interval is the time interval between the target moment and the moment determined as the start moment, and the second time interval is the time interval between the target moment and the moment determined as the end moment; In the case of determining the start moment, displaying a start mark at the start moment on the time axis of the video; In the case of determining the end moment, displaying an end mark at the end moment on the time axis of the video; When there is a start mark displayed on the time axis of the video, receiving a first switching operation on the start mark by the user, and in response to the first switching operation, switching the start mark to the end mark; When there is an end mark displayed on the time axis of the video, receiving a second switching operation on the end mark by the user, and in response to the second switching operation, switching the end mark to the start mark; Receiving a save operation by the user; As a response to the save operation, saving a target video segment according to the target start moment and the target end moment; the target start moment and the target end moment are respectively the last determined start moment and end moment before receiving the save operation, and the target video segment is the video segment in the video from the target start moment to the target end moment; The method further includes: In response to the newly determined start moment or end moment, displaying the corresponding start mark or end mark, and the newly displayed mark point obtains a focused state; Translate the time axis so that the marked point in the focused state is displayed at the center of the interface.
2. The method according to claim 1, wherein X = 2n, where n is a positive integer; The preview screens corresponding to X adjacent times of the target time include: The preview screens corresponding to the first n adjacent times before the target time and the preview screens corresponding to the last n adjacent times after the target time.
3. The method according to claim 1, wherein The marking operation is: the user's selection operation on the time axis of the video, or the marking operation is: in the case where the target preview screen exists, the user's selection operation on the preview screens included in the target preview screen; According to the marking operation, determining a start time or an end time from the target time includes: determining the time corresponding to the preview screen selected by the selection operation as the start time or the end time.
4. The method according to claim 1, wherein The method further includes: Receiving a preview operation of the user on a first preview screen included in the target preview screen; In response to the preview operation, playing the first preview screen; The playing of the first preview screen includes: In the case where the target time is determined as the start time, playing the video screen for a period of time after the time corresponding to the first preview screen; In the case where the target time is determined as the end time, playing the video screen for a period of time before the time corresponding to the first preview screen.
5. A video clip selection device, characterized in that, The device includes: a receiving module, an obtaining module, a determining module, and a saving module; The receiving module is configured to receive at least two marking operations of the user on the video; one of the marking operations is used to indicate the selection of a target time; The obtaining module is configured to, for each of the at least two marking operations, in response to the marking operation, obtain and display a target preview screen; the target preview screen includes: the preview screen corresponding to the target time marked by the marking operation on the time axis of the video in the video, and the preview screens corresponding to X adjacent times of the target time, where X is an integer greater than or equal to 1; The determining module is configured to determine a start time or an end time one or more times from the target time according to each of the at least two marking operations; wherein, if there is no time determined as a start or end time before the new target time indicated by the newly initiated marking operation of the user, the new target time is determined as the start time; if there is only a time determined as an end time before the new target time, the new target time is determined as the new end time; if there is a time determined as a start time before the new target time and there is no time determined as an end time on the time axis of the video, the new target time is determined as the end time; when there is a time determined as a start time before the target time and there is a time determined as an end time on the time axis of the video, if the first time interval is less than the second time interval, the target time is determined as the start time, and if the first time interval is greater than the second time interval, the target time is determined as the end time, where the first time interval is the time interval between the target time and the time determined as the start time, and the second time interval is the time interval between the target time and the time determined as the end time; The display module is configured to, when the start time is determined, display a start marker at the start time on the time axis of the video; The display module is further configured to, when the end time is determined, display an end marker at the end time on the time axis of the video; The receiving module is further configured to, when the start marker is displayed on the time axis of the video, receive a first switching operation of the user on the start marker, and in response to the first switching operation, switch the start marker to the end marker; The receiving module is further configured to, when the end marker is displayed on the time axis of the video, receive a second switching operation of the user on the end marker, and in response to the second switching operation, switch the end marker to the start marker; The playing module is configured to, in response to the newly determined start time or end time, display the corresponding start marker or end marker, and the newly displayed marker point obtains a focused state; The playing module is further configured to pan the time axis so that the marker point that has obtained the focused state is displayed at the center of the interface; The receiving module is further configured to receive a save operation of the user; The saving module is configured to, in response to the save operation, save a target video segment according to a target start time and a target end time; the target start time and the target end time are respectively the last determined start time and end time before the save operation is received, and the target video segment is the video segment in the video from the target start time to the target end time.
6. The device according to claim 5, characterized in that The device further includes: a playing module and a display module; X = 2n, where n is a positive integer; the preview pictures corresponding to X adjacent times of the target time include: the preview pictures corresponding to the first n adjacent times of the target time and the preview pictures corresponding to the last n adjacent times of the target time; The marking operation is: a selection operation by the user on the time axis of the video, or, the marking operation is: in the presence of the target preview screen, a selection operation by the user on the preview screen included in the target preview screen; the determining module is specifically configured to determine the moment corresponding to the preview screen selected by the selection operation as the start moment or the end moment; The receiving module is further configured to receive a preview operation by the user on a first preview screen included in the target preview screen; The playing module is configured to play the first preview screen in response to the preview operation; The playing module is specifically configured to, when the target moment is determined as the start moment, play the video screen for a period of time after the moment corresponding to the first preview screen; when the target moment is determined as the end moment, play the video screen for a period of time before the moment corresponding to the first preview screen.
7. An electronic device, characterized in that, The electronic device includes: a processor and a memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the electronic device implements the method according to any one of claims 1-4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes: computer software instructions; When running on the electronic device of the computer software instructions, the electronic device implements the method according to any one of claims 1-4.
Citation Information
Patent Citations
Method, device and equipment for adjusting video information play time points
CN103366783A
Video processing method, video processing device, electronic equipment and readable storage medium
CN112437353A