Video processing method and apparatus, and electronic device
Through the method of recording video segments in segments, the video is recorded and generated on the shooting page of the electronic device in response to the touch operation of the shooting controls, which solves the problem of excessive memory occupancy of video recording and cache in the prior art, and realizes the saving of memory resources and the flexibility of dynamic image generation.
Patent Information
- Application Number
- PCT/CN2024/115774
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-31
- Filing Date
- 2024-08-30
- Publication Date
- 2025-03-06
AI Technical Summary
In the prior art, when a user opens the shooting page of an electronic device, the memory occupied by video recording and cache is large, which can easily lead to memory overflow and waste of memory resources.
The method of recording video segments in segments is adopted, in response to the touch operation of the shooting control, the first video segment is recorded, and at least one second video segment is acquired in the preset storage space, and a video is generated based on the first video segment and the second video segment. This method avoids memory overflow by storing only the latest recorded video segments in the preset storage space and deleting the earlier recorded video segments.
It effectively avoids memory overflow problems caused by excessive memory occupancy of video cache, saves memory resources of electronic devices, and improves the flexibility of generating dynamic images.
Smart Images

Figure CN2024115774_06032025_PF_FP_ABST
Abstract
Description
Video processing method, device and electronic equipment
[0001] This application claims priority to Chinese Patent Application No. 202311118724.1 filed on August 31, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The embodiments of the present disclosure relate to a video processing method, apparatus, and electronic device. Background Art
[0003] A live photo is a dynamic image. When a user long presses the image, the electronic device can play the image before and after the image is taken.
[0004] Currently, when a user opens the capture page of an electronic device, the electronic device can start recording a video and save the recorded video in a cache. When the user presses the capture control, the electronic device can stop recording the video after a certain period of time and capture a section of the cached video to obtain a dynamic image. However, in this method, the video cached by the electronic device occupies a large amount of memory, which is prone to memory overflow and waste of memory resources.
[0005] Summary of the Invention
[0006] The present disclosure provides a video processing method, device and electronic device.
[0007] In a first aspect, the present disclosure provides a video processing method, the method comprising:
[0008] In response to a touch operation on a capture control in a capture page, recording a first video segment;
[0009] Acquire at least one second video segment in a preset storage space, where the second video segment is a video segment recorded before the touch operation, and before the touch operation, the preset storage space is used to store one or more recently recorded video segments;
[0010] A video is generated based on the first video segment and the at least one second video segment.
[0011] In a second aspect, the present disclosure provides a video processing device, which includes a recording module, an acquisition module, and a generation module, wherein:
[0012] The recording module is configured to record a first video segment in response to a touch operation on a shooting control in a shooting page;
[0013] The acquisition module is used to acquire at least one second video segment from a preset storage space, where the second video segment is a video segment recorded before the touch operation. Before the touch operation, the preset storage space is used to store one or more recently recorded video segments;
[0014] The generating module is configured to generate a video according to the first video segment and the at least one second video segment.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a processor and a memory;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, a brief introduction to the drawings required for use in the embodiments will be given below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0021] FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure;
[0022] FIG3 is a schematic diagram of a process for obtaining a first video segment according to an embodiment of the present disclosure;
[0023] FIG4 is a schematic diagram of obtaining a third video segment according to an embodiment of the present disclosure;
[0024] FIG5 is a schematic diagram of a process for determining a second video segment provided by an embodiment of the present disclosure;
[0025] FIG6 is a schematic diagram of a video generation method according to an embodiment of the present disclosure;
[0026] FIG7 is a schematic diagram of another method for generating a video according to an embodiment of the present disclosure;
[0027] FIG8 is a schematic diagram of a method for storing multiple video segments provided by an embodiment of the present disclosure;
[0028] FIG9 is a schematic diagram of an electronic device storing multiple video segments according to an embodiment of the present disclosure;
[0029] FIG10 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure;
[0030] FIG11 is a schematic structural diagram of another video processing device provided by an embodiment of the present disclosure; and
[0031] FIG12 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0033] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.
[0034] Electronic device: is a device with wireless transceiver function. The electronic device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted. The electronic device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, an on-board electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical care, a wireless electronic device in smart grid, a wireless electronic device in transportation safety, a wireless electronic device in smart city, a wireless electronic device in smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be referred to as a terminal, user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE agent or a UE device, etc. The electronic device can also be fixed or mobile.
[0035] In the related art, a live photo is a dynamic image that can store a video before and after the image is taken, and the user can browse the above video when long pressing the image. Currently, after the user opens the shooting page of the electronic device, the electronic device can start recording the video and save the recorded video in the cache. When the user presses the shooting control, the electronic device can stop the video recording after a period of time, thereby obtaining a long video. The electronic device can intercept a video in the long video based on the moment when the user presses the shooting control, and obtain a live photo in combination with the captured image. However, in the above method, the memory occupied by the electronic device for caching long videos is large. When the user opens the shooting page for a long time, the problem of memory overflow is prone to occur. Moreover, most of the recorded videos are irrelevant to the production of live photos, thereby resulting in a waste of memory resources.
[0036] In order to solve the technical problems in the related art, the embodiment of the present disclosure provides a video processing method, which records a first video segment in response to a touch operation on a shooting control in a shooting page, and determines a third video segment in a plurality of video segments in a preset storage space, wherein, before the touch operation, the preset storage space is used to store one or more recently recorded video segments, and the third video segment is the last video segment recorded before the touch operation. The electronic device can obtain the duration of the third video segment and obtain at least one second video segment in the preset storage space based on the duration of the third video segment. The electronic device can generate a video based on the first video segment and at least one second video segment. In this way, since the electronic device adopts a segmented recording method for video segments, and before the touch operation, the preset storage space can only store the latest recorded video segment and delete the earlier recorded video segments, it can avoid the memory overflow caused by opening the shooting page for a long time, thereby saving the memory resources of the electronic device.
[0037] The application scenario of the embodiment of the present disclosure is described below with reference to FIG1 .
[0038] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Please refer to Figure 1, comprising: an electronic device. Among them, the display page of the electronic device is a shooting page, and the shooting page may include a shooting control. When the electronic device displays the shooting page, the electronic device can start recording multiple videos. After the electronic device records video segment 1 and video segment 2, the user clicks the shooting control in the shooting page, the electronic device can continue to record video segment 3, and the electronic device can generate a dynamic image including video segment 2 and video segment 3. In the above method, if the user of the electronic device does not click the shooting control, the video segment 1 can be deleted after the electronic device records video segment 3, which can effectively save memory resources and avoid memory overflow. In addition, through segmented video recording, the flexibility of generating dynamic images can be improved.
[0039] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0040] FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure. Referring to FIG2 , the method may include:
[0041] S201: Record a first video segment in response to a touch operation on a shooting control in a shooting page.
[0042] The execution subject of the embodiments of the present disclosure may be an electronic device or a video processing device provided in the electronic device. The video processing device may be implemented based on software or a combination of software and hardware, which is not limited in the embodiments of the present disclosure.
[0043] Among them, the electronic device may include a shooting application. When the user clicks on the shooting application, the electronic device may display a shooting page. The shooting page may include shooting controls for shooting. In response to the user's touch operation on the shooting control (it can also be a voice control operation, etc., which is not limited to this embodiment of the present disclosure), the electronic device can capture images.
[0044] The first video segment may be a video segment recorded by the electronic device after the user clicks the capture control. For example, when the electronic device displays a capture page, the electronic device may store the video captured by the camera in a cache, and the first video segment may be a video segment captured by the camera after the user clicks the capture control. For example, if the user clicks the capture control at time A, the first video segment may be a video segment captured by the electronic device's camera after time A. If the user clicks the capture control at time B, the first video segment may be a video segment captured by the electronic device's camera after time B.
[0045] Optionally, the duration of the first video segment may be the first duration. For example, if the first duration is 1 second and the user clicks the capture control at time A, the electronic device may store 1 second of video captured by the camera after time A to obtain the first video segment. If the first duration is 2 seconds and the user clicks the capture control at time B, the electronic device may store 2 seconds of video captured by the camera after time B to obtain the first video segment.
[0046] The process of obtaining the first video segment is described below with reference to FIG. 3 .
[0047] Figure 3 is a schematic diagram of a process for obtaining a first video segment provided by an embodiment of the present disclosure. Please refer to Figure 3, comprising: an electronic device. The display page of the electronic device is a shooting page, and the shooting page may include a shooting control. When the electronic device displays the shooting page, the shooting page does not include a shooting object. When the user clicks the shooting control, the shooting page includes a stationary shooting object, and the electronic device can continue to capture n images to obtain a first video segment. The first video segment includes image 1, image 2, ..., image n, wherein each image includes a stationary shooting object, that is, the first video segment can be a video segment captured by the camera of the electronic device after the user clicks the shooting control.
[0048] S202: Obtain at least one second video segment in a preset storage space.
[0049] The second video segment is a video segment recorded before the touch operation. For example, when the electronic device displays a capture page, the electronic device may store the video captured by the camera in a cache, and the second video segment may be a video segment captured by the camera before the user clicks the capture control. For example, if the user clicks the capture control at time A, the second video segment may be a video segment captured by the electronic device's camera before time A; if the user clicks the capture control at time B, the second video segment may be a video segment captured by the electronic device's camera before time B.
[0050] Among them, before the touch operation, the preset storage space is used to store one or more recently recorded video segments. For example, the preset storage space may include the two most recently recorded video segments by the terminal device before the touch operation. For example, before the touch operation, the terminal device records video segment 1, video segment 2, and video segment 3 in chronological order. If the preset storage space is used to store the two most recently recorded video segments, then before the terminal device records video segment 3, the preset storage space may include video segment 1 and video segment 2. When the terminal device starts recording video segment 3, the terminal device may delete video segment 1 (the earliest recorded video segment) in the preset storage space. When the recording of video segment 3 is finished, the preset storage space may include video segment 2 and video segment 3.
[0051] Optionally, the duration of the multiple video segments stored in the preset storage space may be any duration, which is not limited in this embodiment of the present disclosure.
[0052] Among them, the electronic device can obtain at least one second video segment in the preset storage space based on the following feasible implementation method: determine a third video segment among multiple video segments in the preset storage space, and obtain the length of the third video segment, and obtain at least one second video segment in the preset storage space according to the length of the third video segment.
[0053] The third video segment may be the last video segment recorded before the touch operation. For example, if the electronic device records video segments 1, 2, and 3 before the touch operation, and the user touches the capture control after the electronic device finishes recording video segment 3, the electronic device may determine that the third video segment is video segment 3.
[0054] The process of obtaining the third video segment is described below with reference to FIG. 4 .
[0055] Figure 4 is a schematic diagram of obtaining a third video segment according to an embodiment of the present disclosure. Referring to Figure 4 , the video segment includes: video segment 1, video segment 2, and video segment 3 recorded by an electronic device (not shown in Figure 4 ). If the user clicks the capture control after recording video segment 2, the electronic device may determine video segment 2 as the third video segment, and may determine video segment 3 as the first video segment.
[0056] Optionally, the duration of multiple video segments other than the third video segment in the preset storage space can be the second duration, and the duration of the third video segment can be less than or equal to the second duration. For example, the electronic device can store video segment 1 and video segment 2 in the preset storage space, so the duration of video segment 1 and video segment 2 can both be the second duration. For example, in the embodiment shown in Figure 4, video segment 2 is the third video segment, the duration of video segment 1 can be the second duration, the duration of video segment 3 (the first video segment) can be the first duration, and the duration of video segment 2 can be the second duration, or it can be less than the second duration. For example, in the embodiment shown in Figure 4, the second duration of the video segment recorded by the electronic device is 1.5 seconds. When the electronic device finishes recording video segment 1, if the electronic device continues to record for 0.5 seconds and the user clicks the shooting control, the electronic device can determine that the duration of video segment 2 is 0.5 seconds.
[0057] It should be noted that in the embodiment of the present disclosure, the first duration and the second duration can be any duration, and the embodiment of the present disclosure does not limit this. Moreover, the first duration can be equal to the second duration, or the first duration can be different from the second duration, and the embodiment of the present disclosure does not limit this.
[0058] Optionally, the electronic device may determine the duration of the third video segment based on any feasible implementation method, which is not limited in the embodiment of the present disclosure.
[0059] The electronic device obtains at least one second video segment from the preset storage space according to the duration of the third video segment, in the following two situations:
[0060] Case 1: the duration of the third video segment is equal to the first threshold.
[0061] If the duration of the third video segment is equal to the first threshold, the electronic device may determine the third video segment as the second video segment. The first threshold may be the duration of the recorded video segment in the preset storage space. For example, the first threshold may be the second duration in the embodiment of the present disclosure. If the electronic device determines that the duration of each video segment in the preset storage space is 1.5 seconds, the first threshold may be 1.5 seconds. When the duration of the third video segment is equal to 1.5 seconds, it means that when the user clicks the shooting control, the previous video segment has already been recorded for 1.5 seconds. Therefore, the electronic device may determine this video segment as the second video segment.
[0062] For example, in the embodiment shown in Figure 4, the second duration can be 1.5 seconds. When the user clicks the shooting control, the electronic device can determine that the third video segment is video segment 2. If video segment 2 has been recorded for 1.5 seconds, the electronic device can determine that video segment 2 is the second video segment.
[0063] In this way, the electronic device can accurately and quickly determine the second video segment based on the duration of the third video segment, without having to crop or splice multiple video segments in the preset storage space, thereby improving the efficiency of determining the second video segment.
[0064] Case 2: The duration of the third video segment is less than the first threshold.
[0065] If the duration of the third video segment is less than the first threshold, the third video segment and the video segment recorded before the third video segment are determined as the second video segment. For example, the first threshold may be the second duration in the embodiment of the present disclosure, where the first threshold may be 1.5 seconds. If the duration of the third video segment is less than 1.5 seconds, it means that the previous video segment had not yet been recorded to 1.5 seconds when the user clicked the capture control. Therefore, the duration of the third video segment is insufficient, and the electronic device may determine the third video segment and the video segment before the third video segment as the second video segment.
[0066] The process of determining the second video segment in this case will be described below with reference to FIG. 5 .
[0067] Figure 5 is a schematic diagram of a process for determining a second video segment provided by an embodiment of the present disclosure. Please refer to Figure 5, which includes: video segment 1 and video segment 2 stored in a preset storage space by an electronic device (not shown in Figure 5). Among them, the duration of video segment 1 is 1.5 seconds, and the duration of video segment 2 is 0.7 seconds. When video segment 2 is recorded to 0.7 seconds, the user clicks the shooting control, and the electronic device can determine video segment 2 as the third video segment. Since the duration of video segment 2 is less than 1.5 seconds, the electronic device can determine video segment 1 and video segment 2 as the second video segment. In this way, when the duration of video segment 2 is insufficient, the electronic device can crop and splice video segment 1 and video segment 2, and then obtain the video segment before shooting in the live photo, thereby improving the accuracy and flexibility of obtaining live photos and saving system memory.
[0068] S203: Generate a video according to the first video segment and at least one second video segment.
[0069] The video may be a video in a live image. For example, the video may be a video before the user presses the capture control and a video after the user presses the capture control.
[0070] The electronic device generates a video based on the first video segment and at least one second video segment in the following two situations:
[0071] Case 1: The number of the second video segments is 1.
[0072] If the number of second video segments is 1, the first video segment and the second video segment are spliced together to obtain a video. For example, if the number of second video segments is 1, it means that the video segment before the touch operation has been recorded (i.e., the recording duration has reached the second duration). Therefore, the electronic device can splice the first video segment and the second video segment together to obtain the video in the live image.
[0073] The process of generating a video in this case will be described below with reference to FIG6 .
[0074] Figure 6 is a schematic diagram of a video generation method provided by an embodiment of the present disclosure. Referring to Figure 6 , the electronic device (not shown in Figure 6 ) stores video segments 1, 2, and 3 in a preset storage space. Video segment 1 lasts 1.5 seconds, video segment 2 lasts 1.5 seconds, and video segment 3 lasts 2 seconds.
[0075] As shown in Figure 6, when the recording of video segment 2 ends, the user clicks the capture control, and the electronic device can continue recording a 2-second video segment 3. Since the duration of video segment 2 is the same as the duration of video segment 1, the electronic device can determine video segment 2 as the second video segment and video segment 3 as the first video segment.
[0076] As shown in Figure 6, since the number of second video segments is 1, the electronic device can splice video segments 2 and 3 in the order of their recording time to obtain a video of the live image. The live image video can include video segments 2 and 3, and the duration of the video in the live image is 3.5 seconds. In this case, the electronic device can quickly obtain the live image video, improving the efficiency of generating the live image.
[0077] Case 2: The number of second video segments is greater than one.
[0078] If the number of second video segments is greater than one, a fourth video segment is extracted from the plurality of second video segments and the fourth video segment is concatenated with the first video segment to generate a video. The fourth video segment may have the second duration or any duration, which is not limited in this embodiment.
[0079] For example, if the number of second video segments is greater than 1, it means that the video segment recorded by the electronic device before the touch operation is insufficient in length. Therefore, the electronic device can intercept a fourth video segment of the second length from multiple second video segments, and splice the fourth video segment with the first video segment to obtain a video of the live image.
[0080] The process of generating a video in this case is described below with reference to FIG7 .
[0081] Figure 7 is a schematic diagram of another video generation method provided by an embodiment of the present disclosure. Referring to Figure 7 , the electronic device (not shown in Figure 7 ) stores video segments 1, 2, and 3 in a preset storage space. Video segment 1 lasts 1.5 seconds, video segment 2 lasts 1 second, and video segment 3 lasts 2 seconds.
[0082] As shown in Figure 7, when video segment 2 reaches 1 second, the user clicks the capture control, causing the electronic device to stop recording video segment 2 and record a 2-second video segment 3. Because the duration of video segment 2 is shorter than the duration of video segment 1, the electronic device can determine video segments 1 and 2 as the second video segment, and the electronic device can determine video segment 3 as the first video segment.
[0083] Please refer to Figure 7. Since the number of second video segments is 2, the electronic device can capture a 1.5-second video segment 4 from video segments 1 and 2, wherein the electronic device can splice the last 0.5-second video segment of video segment 1 with video segment 2 to obtain video segment 4.
[0084] Referring to Figure 7 , the electronic device can splice video segments 4 and 3 in chronological order to obtain a video of the live image. This live image video can include video segments 4 and 3, and the duration of the live image video can be 3.5 seconds. In this case, the electronic device can accurately extract a sufficiently long video segment from the multiple second video segments, thereby accurately determining the video in the live image, thereby improving the accuracy of the video.
[0085] It should be noted that in the embodiment of the present disclosure, the length of the generated video can be any length and the embodiment of the present disclosure does not limit this. The length of the video can determine the length of the first video segment and the length of the fourth video segment. For example, each video segment in the preset storage space is 0.5 seconds. If the user needs 2 seconds of video before pressing the shooting control, the electronic device can obtain at least 4 video segments before pressing the shooting control. If the user needs 4 seconds of video after pressing the shooting control, the electronic device can continue to record 4 seconds of video after the user presses the shooting control.
[0086] Optionally, after the electronic device generates a video based on the first video segment and at least one second video segment, the video processing method further includes acquiring a captured image associated with the touch operation, and determining a live image based on the captured image and the video. For example, after the electronic device acquires the video, the electronic device may use the captured image as the cover of the video, thereby obtaining a live image.
[0087] It should be noted that the electronic device may also use any image in the video as the cover of the live image, which is not limited in the embodiment of the present disclosure.
[0088] The disclosed embodiment provides a video processing method, which records a first video segment in response to a touch operation on a shooting control in a shooting page, and determines a third video segment from a plurality of video segments in a preset storage space. The electronic device can obtain the duration of the third video segment. If the duration of the third video segment is equal to a first threshold, the third video segment is determined as the second video segment. If the duration of the third video segment is less than the first threshold, the third video segment and the video segment recorded before the third video segment are determined as the second video segment. The electronic device can generate a video based on the first video segment and at least one second video segment. In this way, since the electronic device adopts a segmented recording method for video segments, and before the touch operation, the preset storage space can only store one or more recently recorded video segments, it can avoid memory overflow caused by opening the shooting page for a long time. Moreover, after the electronic device records a video segment, it can encode the video segment without storing the original picture data in the preset storage space, thereby saving memory resources of the electronic device.
[0089] Based on the embodiment shown in Figure 2, before the electronic device obtains at least one second video in the preset storage space, the above-mentioned video processing method also includes a method for storing multiple video segments in the preset storage space. Below, in combination with Figure 8, the method for storing multiple video segments in the preset storage space is explained.
[0090] FIG8 is a schematic diagram of a method for storing multiple video segments provided by an embodiment of the present disclosure. Referring to FIG8 , the method process includes:
[0091] S801. Obtain the remaining memory of the electronic device.
[0092] It should be noted that the electronic device can obtain the remaining memory of the electronic device based on any feasible implementation method (for example, by obtaining device storage information, etc.), and the embodiments of the present disclosure are not limited to this.
[0093] S802: Determine the duration of the video segment stored in the preset storage space according to the remaining memory of the electronic device.
[0094] Optionally, the electronic device may determine the duration of the video segment stored in the preset storage space based on a preset correspondence. The preset correspondence may include at least one memory and the duration corresponding to each memory. For example, the preset correspondence may be as shown in Table 1:
[0095] Table 1
[0096] It should be noted that Table 1 is only an example of the preset corresponding relationship and is not intended to limit the preset corresponding relationship.
[0097] For example, if the remaining memory of the electronic device is memory 1, the electronic device can determine that the duration of the video segment stored in the preset storage space is duration 1; if the remaining memory of the electronic device is memory 2, the electronic device can determine that the duration of the video segment stored in the preset storage space is duration 2; if the remaining memory of the electronic device is memory 3, the electronic device can determine that the duration of the video segment stored in the preset storage space is duration 3.
[0098] Optionally, the remaining memory of the electronic device is proportional to the duration of the video segments stored in the preset storage space. For example, the larger the remaining memory of the electronic device, the longer the video segments stored in the preset storage space. This allows for efficient use of the electronic device's memory, improving not only the flexibility of video segment storage but also memory utilization.
[0099] S803: Record a video segment according to the duration of the video segment stored in the preset storage space.
[0100] For example, if the duration of the video segment stored in the preset storage space is 0.5 seconds, the electronic device can record a 0.5-second video segment; if the duration of the video segment stored in the preset storage space is 1.5 seconds, the electronic device can record a 1.5-second video segment.
[0101] S804: Store the video segment in a preset storage space.
[0102] Optionally, the electronic device may store multiple video segments in a preset storage space based on the following feasible implementation method: obtaining the number of video segments stored in the preset storage space, and if the number of stored video segments is greater than or equal to a second threshold, deleting the earliest recorded video segment in the preset storage space.
[0103] It should be noted that the second threshold may be the number of latest video segments stored in the preset storage space, or may be any set value, which is not limited in the embodiment of the present disclosure.
[0104] Before a user presses the capture button, the electronic device can record and store multiple video segments. If there are many video segments stored in the preset storage space, the electronic device can delete the oldest recorded video segment, thereby saving the preset storage space. For example, if the electronic device has already recorded two 1.5-second video segments before the user presses the capture button, when the electronic device begins recording the third video segment, the electronic device can delete the first 1.5-second video segment from the preset storage space, thereby saving memory.
[0105] 9 , the process of storing multiple video segments in an electronic device will be described below.
[0106] FIG9 is a schematic diagram of an electronic device storing multiple video segments according to an embodiment of the present disclosure. Referring to FIG9 , it includes a preset storage space. The preset storage space may include video segment 1 and video segment 2. Both video segment 1 and video segment 2 are video segments recorded by the electronic device (not shown in FIG9 ) before the user presses the capture control. Video segment 1 is 1.5 seconds long, and video segment 2 is 1.5 seconds long. Video segment 1 is the video segment to be deleted.
[0107] As shown in Figure 9 , when the electronic device begins recording the next video segment after video segment 2, the electronic device can delete video segment 1. The preset storage space may include video segment 1. When the electronic device begins recording the video segment to be recorded, the electronic device can store the recorded content in the preset storage space. In this way, based on the segmented pre-buffering mechanism, the electronic device can store a maximum of two video segments in the preset storage space, thereby conserving the electronic device's memory.
[0108] The disclosed embodiments provide a method for storing multiple video segments. The method comprises obtaining the remaining memory of an electronic device, determining the duration of video segments to be stored in a preset storage space based on the remaining memory of the electronic device, recording multiple video segments based on the duration of the video segments stored in the preset storage space, and storing the multiple video segments in the preset storage space. In this way, when the number of video segments stored in the preset storage space is greater than or equal to a second threshold, the electronic device can delete the oldest recorded video segment in the preset storage space, thereby conserving memory in the electronic device and avoiding memory overflow issues.
[0109] FIG10 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure. Referring to FIG10 , the video processing device 100 includes a recording module 101, an acquisition module 102, and a generation module 103, wherein:
[0110] The recording module 101 is configured to record a first video segment in response to a touch operation on a capture control in a capture page;
[0111] The acquisition module 102 is configured to acquire at least one second video segment from a preset storage space, where the second video segment is a video segment recorded before the touch operation. Before the touch operation, the preset storage space is used to store one or more recently recorded video segments.
[0112] The generating module 103 is configured to generate a video according to the first video segment and the at least one second video segment.
[0113] According to one or more embodiments of the present disclosure, the acquisition module 102 is specifically configured to:
[0114] Determining a third video segment from the plurality of video segments in the preset storage space, where the third video segment is the last video segment recorded before the touch operation;
[0115] Obtaining the duration of the third video segment;
[0116] At least one second video segment is acquired from the preset storage space according to the duration of the third video segment.
[0117] According to one or more embodiments of the present disclosure, the acquisition module 102 is specifically configured to:
[0118] If the duration of the third video segment is equal to the first threshold, determining the third video segment as the second video segment;
[0119] If the duration of the third video segment is less than the first threshold, the third video segment and a video segment recorded before the third video segment are determined as the second video segment.
[0120] According to one or more embodiments of the present disclosure, the duration of the first video segment is a first duration, the duration of the multiple video segments in the preset storage space except the third video segment is a second duration, and the duration of the third video segment is less than or equal to the second duration.
[0121] According to one or more embodiments of the present disclosure, the generating module 103 is specifically configured to:
[0122] If the number of the second video segments is 1, concatenating the first video segment and the second video segment to obtain the video;
[0123] If the number of the second video segments is greater than 1, a fourth video segment is intercepted from the plurality of second video segments, and the fourth video segment is spliced with the first video segment to obtain the video.
[0124] According to one or more embodiments of the present disclosure, the generating module 103 is further configured to:
[0125] Acquiring a captured image associated with the touch operation;
[0126] A live image is determined according to the captured image and the video.
[0127] The video processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0128] FIG11 is a schematic diagram of the structure of another video processing device provided by an embodiment of the present disclosure. Based on the embodiment shown in FIG10 , referring to FIG11 , the video processing device 100 further includes a storage module 104, wherein the storage module 104 is used to:
[0129] Get the remaining memory of the electronic device;
[0130] determining, based on the remaining memory of the electronic device, the duration of the video segment stored in the preset storage space;
[0131] According to the duration of the video segment stored in the preset storage space, the video segment is recorded and stored in the preset storage space.
[0132] According to one or more embodiments of the present disclosure, the storage module 104 is specifically configured to:
[0133] Obtaining the number of video segments stored in the preset storage space;
[0134] If the number of the stored video segments is greater than or equal to a second threshold, the earliest recorded video segment is deleted from the preset storage space.
[0135] The video processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0136] FIG12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Please refer to FIG12 , which shows a schematic diagram of the structure of an electronic device 1200 suitable for implementing an embodiment of the present disclosure. The electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG12 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0137] As shown in FIG12 , the electronic device 1200 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage device 1208 into a random access memory (RAM) 1203. Various programs and data required for the operation of the electronic device 1200 are also stored in the RAM 1203. The processing device 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0138] Typically, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 may allow the electronic device 1200 to communicate with other devices wirelessly or by wire to exchange data. Although FIG12 shows an electronic device 1200 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0139] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. When the computer program is executed by the processing device 1201, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0140] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0141] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0142] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0143] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the video processing method that may be involved in various embodiments above is implemented.
[0144] An embodiment of the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, the video processing method that may be involved in various embodiments described above is implemented.
[0145] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0148] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0149] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0150] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0151] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0152] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0153] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thereby, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server or storage medium that performs the operation of the technical solution of the present disclosure based on the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0154] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0155] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws and regulations. Data may include information, parameters and messages, such as flow switching indication information.
[0156] In a first aspect, according to one or more embodiments of the present disclosure, a video processing method is provided, the method comprising:
[0157] In response to a touch operation on a capture control in a capture page, recording a first video segment;
[0158] Acquire at least one second video segment in a preset storage space, where the second video segment is a video segment recorded before the touch operation, and before the touch operation, the preset storage space is used to store one or more recently recorded video segments;
[0159] A video is generated based on the first video segment and the at least one second video segment.
[0160] According to one or more embodiments of the present disclosure, obtaining at least one second video segment in a preset storage space includes:
[0161] Determining a third video segment from the plurality of video segments in the preset storage space, where the third video segment is the last video segment recorded before the touch operation;
[0162] Obtaining the duration of the third video segment;
[0163] At least one second video segment is acquired from the preset storage space according to the duration of the third video segment.
[0164] According to one or more embodiments of the present disclosure, obtaining at least one second video segment from the preset storage space based on the duration of the third video segment includes:
[0165] If the duration of the third video segment is equal to the first threshold, determining the third video segment as the second video segment;
[0166] If the duration of the third video segment is less than the first threshold, the third video segment and a video segment recorded before the third video segment are determined as the second video segment.
[0167] According to one or more embodiments of the present disclosure, the duration of the first video segment is a first duration, the duration of the multiple video segments in the preset storage space except the third video segment is a second duration, and the duration of the third video segment is less than or equal to the second duration.
[0168] According to one or more embodiments of the present disclosure, generating a video based on the first video segment and the at least one second video segment includes:
[0169] If the number of the second video segments is 1, concatenating the first video segment and the second video segment to obtain the video;
[0170] If the number of the second video segments is greater than 1, a fourth video segment is intercepted from the plurality of second video segments, and the fourth video segment is spliced with the first video segment to obtain the video.
[0171] According to one or more embodiments of the present disclosure, after generating a video based on the first video segment and the at least one second video segment, the method further includes:
[0172] Acquiring a captured image associated with the touch operation;
[0173] A live image is determined according to the captured image and the video.
[0174] According to one or more embodiments of the present disclosure, before acquiring at least one second video segment in the preset storage space, the method further includes:
[0175] Get the remaining memory of the electronic device;
[0176] determining, based on the remaining memory of the electronic device, the duration of the video segment stored in the preset storage space;
[0177] According to the duration of the video segment stored in the preset storage space, the video segment is recorded and stored in the preset storage space.
[0178] According to one or more embodiments of the present disclosure, storing the video segments in the preset storage space includes:
[0179] Obtaining the number of video segments stored in the preset storage space;
[0180] If the number of the stored video segments is greater than or equal to a second threshold, the earliest recorded video segment is deleted from the preset storage space.
[0181] In a second aspect, one or more embodiments of the present disclosure provide a video processing device, the video processing device including a recording module, an acquisition module, and a generation module, wherein:
[0182] The recording module is configured to record a first video segment in response to a touch operation on a shooting control in a shooting page;
[0183] The acquisition module is used to acquire at least one second video segment from a preset storage space, where the second video segment is a video segment recorded before the touch operation. Before the touch operation, the preset storage space is used to store one or more recently recorded video segments;
[0184] The generating module is configured to generate a video according to the first video segment and the at least one second video segment.
[0185] According to one or more embodiments of the present disclosure, the acquisition module is specifically configured to:
[0186] Determining a third video segment from the plurality of video segments in the preset storage space, where the third video segment is the last video segment recorded before the touch operation;
[0187] Obtaining the duration of the third video segment;
[0188] At least one second video segment is acquired from the preset storage space according to the duration of the third video segment.
[0189] According to one or more embodiments of the present disclosure, the acquisition module is specifically configured to:
[0190] If the duration of the third video segment is equal to the first threshold, determining the third video segment as the second video segment;
[0191] If the duration of the third video segment is less than the first threshold, the third video segment and a video segment recorded before the third video segment are determined as the second video segment.
[0192] According to one or more embodiments of the present disclosure, the duration of the first video segment is a first duration, the duration of the multiple video segments in the preset storage space except the third video segment is a second duration, and the duration of the third video segment is less than or equal to the second duration.
[0193] According to one or more embodiments of the present disclosure, the generating module is specifically configured to:
[0194] If the number of the second video segments is 1, concatenating the first video segment and the second video segment to obtain the video;
[0195] If the number of the second video segments is greater than 1, a fourth video segment is intercepted from the plurality of second video segments, and the fourth video segment is spliced with the first video segment to obtain the video.
[0196] According to one or more embodiments of the present disclosure, the generating module is further configured to:
[0197] Acquiring a captured image associated with the touch operation;
[0198] A live image is determined according to the captured image and the video.
[0199] According to one or more embodiments of the present disclosure, the video processing device further includes a storage module, wherein the storage module is configured to:
[0200] Get the remaining memory of the electronic device;
[0201] determining, based on the remaining memory of the electronic device, the duration of the video segment stored in the preset storage space;
[0202] According to the duration of the video segment stored in the preset storage space, the video segment is recorded and stored in the preset storage space.
[0203] According to one or more embodiments of the present disclosure, the storage module is specifically configured to:
[0204] Obtaining the number of video segments stored in the preset storage space;
[0205] If the number of the stored video segments is greater than or equal to a second threshold, the earliest recorded video segment is deleted from the preset storage space.
[0206] The video processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0207] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0208] The memory stores computer-executable instructions;
[0209] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0210] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0211] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the video processing method as described in the first aspect and various possible aspects of the first aspect.
[0212] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0213] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0214] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A video processing method, comprising: In response to a touch operation on a capture control in a capture page, recording a first video segment; Acquire at least one second video segment in a preset storage space, wherein the second video segment is a video segment recorded before the touch operation, and before the touch operation, the preset storage space is used to store one or more recently recorded video segments; A video is generated based on the first video segment and the at least one second video segment.
2. The method according to claim 1, wherein: The acquiring at least one second video segment in the preset storage space includes: Determining a third video segment from the multiple video segments in the preset storage space, wherein the third video segment is the last video segment recorded before the touch operation; Obtaining the duration of the third video segment; At least one second video segment is acquired in the preset storage space according to the duration of the third video segment.
3. The method according to claim 2, wherein: The acquiring at least one second video segment in the preset storage space according to the duration of the third video segment includes: If the duration of the third video segment is equal to the first threshold, determining the third video segment as the second video segment; If the duration of the third video segment is less than the first threshold, the third video segment and a video segment recorded before the third video segment are determined as the second video segment.
4. The method according to claim 3, wherein: The duration of the first video segment is a first duration, the duration of the multiple video segments in the preset storage space except the third video segment is a second duration, and the duration of the third video segment is less than or equal to the second duration.
5. The method according to any one of claims 1 to 4, wherein: Generating a video according to the first video segment and the at least one second video segment includes: If the number of the second video segments is 1, concatenating the first video segment and the second video segment to obtain the video; If the number of the second video segments is greater than 1, a fourth video segment is intercepted from the plurality of second video segments, and the fourth video segment is spliced with the first video segment to obtain the video.
6. The method according to any one of claims 1 to 5, wherein: After generating a video according to the first video segment and the at least one second video segment, the method further includes: Acquiring a captured image associated with the touch operation; A live image is determined according to the captured image and the video.
7. The method according to any one of claims 1 to 6, wherein: Before acquiring at least one second video segment in the preset storage space, the method further includes: Get the remaining memory of the electronic device; Determining the duration of the video segment stored in the preset storage space according to the remaining memory of the electronic device; According to the duration of the video segment stored in the preset storage space, a video segment is recorded and stored in the preset storage space.
8. The method according to claim 7, wherein: The storing of the video segments in the preset storage space includes: Obtaining the number of video segments stored in the preset storage space; If the number of the stored video segments is greater than or equal to a second threshold, the earliest recorded video segment is deleted from the preset storage space.
9. A video processing device, comprising: A recording module, configured to record a first video segment in response to a touch operation on a shooting control in a shooting page; an acquisition module, configured to acquire at least one second video segment in a preset storage space, wherein the second video segment is a video segment recorded before the touch operation, and before the touch operation, the preset storage space is used to store one or more recently recorded video segments; as well as The generating module is configured to generate a video according to the first video segment and the at least one second video segment.
10. An electronic device, comprising: processor and memory, wherein The memory stores computer-executable instructions; When the processor executes the computer-executable instructions stored in the memory, the processor executes the video processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium storing computer-executable instructions, wherein: When the processor executes the computer-executable instruction, the video processing method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Video processing method and device and electronic equipment
CN119544901A
Method and device for controlling Live Photo generation and electronic equipment
CN106027893A
Terminal and method for obtaining video
CN106303290A
Post-shooting processing method, post-shooting processing device and mobile terminal
CN106686298A
Image reproduction apparatus, image reproduction method, and image reproduction program
JP2013046357A