Video recording method, device, electronic device and storage medium
By performing inverse speed processing and synchronous recording of video templates with gear speed effects, the problem of difficulty for users to match the special effect time is solved, the matching of video effects and content is achieved, and the video quality is improved.
Patent Information
- Application Number
- JP2023544428
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-01-21
- Filing Date
- 2022-01-17
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-01-17
AI Technical Summary
When recording videos using video templates with gear speed effects, it is difficult for users to accurately match the time of the effects, resulting in mismatch between the video effects and the content, affecting the video quality.
By performing inverse speed processing on variable speed video, the initial speed video is generated, and the video is recorded based on synchronous display of the initial speed video to generate the initial speed target video. Then, the initial speed target video is processed to variable speed to obtain the target video matching the original video speed, thereby ensuring that the special effects match the content.
Through this method, the video recorded by the user can be synchronized with the original video, and the special effects match the content, which improves the performance effect of the video and solves the problem of the special effects and the content.
Smart Images

Figure 0007659074000001 
Figure 0007659074000002 
Figure 0007659074000003
Abstract
Description
[Technical field]
[0001] TECHNICAL FIELD Embodiments of the present disclosure relate to the field of multimedia technology, and in particular to video recording methods, devices, electronic devices and storage media. [Background technology]
[0002] At present, on the short video platform, the video works uploaded by users have become the main source of content for the platform. Users can record and upload videos using mobile terminals such as mobile phones, and can also add different video special effects to create interesting video works.
[0003] In order to reduce the hurdles and difficulty for users to create video works, some applications (Applications, abbreviated as APPs) provide users with video templates for adding video special effects. Users can complete video recording by imitating the time sequence and rhythm of video recording in the video template, so that the recorded video directly matches the video special effects in the video template, and can quickly add video special effects to the recorded video.
[0004] However, in some video templates with variable speed special effects, the video material in the video template may be affected by the variable speed special effects, causing the playback speed of the video material to change. When a user uses this type of video template to shoot a video, the user cannot accurately match the timing of the special effects in the video template, resulting in a mismatch between the video special effects and the video content, which affects the quality of the video. Summary of the Invention [Problem to be solved by the invention]
[0005] The embodiments of the present disclosure provide a video recording method, device, electronic device, storage medium, computer program product, and computer program to solve the problem that a mismatch between video special effects and video content occurs when a user records a video according to a video template, affecting the quality of the video. [Means for solving the problem]
[0006] In a first aspect, an embodiment of the present disclosure provides a video recording method, the method comprising: strange a step of performing reverse speed change processing on the high-speed video to obtain an initial speed video; and a step of displaying the initial speed video and simultaneously shooting a video to generate an initial speed target video. before A speed change process is performed on the initial speed target video to obtain a speed change target video. a step of: making the change in the playback speed of the speed-change target video coincide with the change in the playback speed of the speed-change video; The method includes the steps of:
[0007] In a second aspect, an embodiment of the present disclosure provides a video recording device, the device comprising: strange a reverse speed change unit for performing reverse speed change processing on the high-speed video to obtain an initial speed video; A generating unit is used for displaying the initial speed video and synchronously taking video to generate an initial speed target video; before a speed change unit used for performing speed change processing on the initial speed target video to obtain a speed change target video; a speed-changing unit for changing the playback speed of the speed-changing target video in accordance with a change in the playback speed of the speed-changing video; Including,
[0008] In a third aspect, an embodiment of the present disclosure provides an electronic device including at least one processor and a memory; The memory stores computer executable instructions, When the at least one processor executes the computer-executable instructions stored in the memory, the at least one processor performs the video recording method described in the first aspect and various possible designs of the first aspect above.
[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, the computer-readable storage medium being operable, when executed by a processor, to realize the video recording method described in the first aspect above and various possible designs of the first aspect.
[0010] 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, realises the video recording method as described in the first aspect above and various possible designs of the first aspect.
[0011] In a sixth aspect, an embodiment of the present disclosure provides a computer program, the computer program being stored in a readable storage medium, at least one processor of an electronic device reading the computer program from the readable storage medium, and when the at least one processor executes the computer program, the electronic device performs the video recording method described in the first aspect above and various possible designs of the first aspect. Effect of the Invention
[0012] The video recording method, device, electronic device, and storage medium provided by this embodiment include: strange performing reverse speed change processing on the high-speed video to obtain an initial speed video; displaying the initial speed video while simultaneously performing video shooting in synchronization to generate an initial speed target video; beforeA speed-change target video is obtained by performing a speed-change process on the initial speed target video. The playback speed of the initial speed video obtained by reverse speed-change is the same as the normal speed of the video recorded by the user. Therefore, the initial speed video is displayed to the user to guide the user in recording the video, so that the video recorded by the user can be synchronized with the original speed-change video. Furthermore, by matching the special effects in the template with the video content shot by the user, the video recorded by the user can directly obtain the special effects of the original speed-change video, so as to solve the problem of mismatch between the video special effects and the video content and improve the presentation of the special effects of the video recorded by the user. [Brief description of the drawings]
[0013] The following are examples of the present disclosure. Related Technologies In order to more clearly explain the solution in the embodiment, Related Technologies Briefly describe the drawings that need to be used in the description of the present disclosure. Of course, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can think of other drawings based on these drawings without creative effort. [Figure 1] FIG. 2 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure; [Diagram 2] FIG. 1 is a schematic diagram of a video template with speed-varying special effects in the related art; [Diagram 3] 1 is a flowchart 1 of a video recording method provided by an embodiment of the present disclosure. [Figure 4] 2 is a flowchart 2 of a video recording method provided by an embodiment of the present disclosure. [Diagram 5] 1 is a schematic diagram of a process for performing reverse speed-shifting on speed-shifted video based on speed-shifting information; [Figure 6] FIG. 2 is a schematic diagram of a process of video capture synchronized with display of full speed video provided by an embodiment of the present disclosure. [Figure 7] 3 is a flowchart 3 of a video recording method provided by an embodiment of the present disclosure. [Figure 8] 1 is a schematic diagram of an implementation of a variable speed video template in a UI provided by an embodiment of the present disclosure. [Figure 9] 8 is a possible flowchart of step S202 in the embodiment shown in FIG. 7. [Figure 10] 2 is a schematic diagram of a playback timestamp of a variable speed video provided by an embodiment of the present disclosure; [Figure 11] FIG. 2 is a schematic diagram of a process for determining a video frame provided by an embodiment of the present disclosure. [Figure 12] 8 is a flowchart showing one possible step S204 in the embodiment shown in FIG. 7. [Figure 13] FIG. 2 is a schematic diagram of a first interaction interface provided by an embodiment of the present disclosure. [Figure 14] 1 is a schematic diagram of an operation for generating an initial velocity target video by video shooting provided by an embodiment of the present disclosure; FIG. [Figure 15] FIG. 1 is a structural block diagram of a video recording device provided according to an embodiment of the present disclosure. [Figure 16] FIG. 2 is a structural block diagram of a video recording device provided according to an embodiment of the present disclosure. [Figure 17] 1 is a schematic diagram of an electronic device provided in accordance with one embodiment of the present disclosure. [Figure 18] FIG. 1 is a schematic diagram of an electronic device provided in accordance with another embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] In order to make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions will be described clearly and completely below with reference to the drawings of the embodiments of the present disclosure, and it should be understood that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by those skilled in the art without creative labor based on the embodiments in the present disclosure all belong to the protection scope of the present disclosure.
[0015] Fig. 1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure, and referring to Fig. 1, in this application scenario, the video recording method provided by the embodiment of the present disclosure is applied to a mobile terminal device such as a smart mobile phone, and the following description will be given taking a smart mobile phone as an example. A video recording APP is running on the smart mobile phone, and a user operates the smart mobile phone to record a video using the APP, and uses the special effect function built into the APP to add special effects to the recorded video, and finally generates a video work, which can be stored in the user's smart mobile phone and locally played, edited, transmitted or deleted, or can be stored in a cloud server for other users to access and watch.
[0016] Related TechnologiesIn order to reduce the hurdles and difficulty of users' video creation, some APPs provide users with video templates for adding video special effects, and users can complete video recording by imitating the time sequence and rhythm of video recording in the video template, so that the recorded video directly matches the video special effects in the video template, and can quickly add video special effects to the recorded video. However, in some video templates with variable speed special effects, the video material in the video template may be affected by the variable speed special effects, causing the playback speed of the video material to change. FIG. 2 is a schematic diagram of the playback of a video template with variable speed special effects in related technology. Referring to FIG. 2, when a user uses this type of video template to shoot a video, the playback speed of the video material in the video template may be fast or slow, and does not maintain the original recording speed of the video material. However, when a user records a video, he or she can only record at a relatively constant speed. Therefore, when the user records a video by imitating the video material in the video template, the user cannot accurately match the timing at which the special effects in the video template appear, resulting in a mismatch between the video special effects and the video content, which affects the quality of the video.
[0017] To solve the above problems, an embodiment of the present disclosure provides a video recording method.
[0018] Referring to Figure 3, Figure 3 is a flowchart 1 of a video recording method provided by an embodiment of the present disclosure. The method of this embodiment can be applied to a mobile terminal device such as a smart mobile phone, and the video recording method includes the following steps:
[0019] In S1, a reverse speed change process is performed on the speed change video to obtain the initial speed video.
[0020] Specifically, variable-speed video refers to video data obtained by performing a speed change process on a video material, i.e., an original video. In one possible implementation, the variable-speed video exhibits a nonlinear change in playback speed during playback, for example, from 0 to 3 seconds of the variable-speed video, the variable-speed video is played at a normal playback speed, from 3 to 5 seconds, the variable-speed video is played at 2x speed, and from 5 to 7 seconds, the variable-speed video is played at 0.5x speed. The variable-speed playback of the variable-speed video provides the video with speed change special effects, which enhances the expressiveness and entertainment of the video. The "initial speed" of the initial-speed video is relative to the "speed" of the variable-speed video, so the initial-speed video is not necessarily data that is completely identical to the variable-speed video.
[0021] In one embodiment, before step S1, the video recording method further includes the step of obtaining speed change information of the speed-shifted video, and the speed change information is used to characterize a change in the playback speed of the speed-shifted video. In one embodiment, a reverse speed-shifting process is performed on the speed-shifted video based on the speed-shifted information to obtain an initial speed video.
[0022] In S2, the initial velocity video is displayed and video shooting is performed synchronously to generate an initial velocity target video.
[0023] For example, a user can operate a terminal device that executes the video recording method provided by this embodiment and record a video according to the time sequence of the video recording represented in the initial speed video, thereby obtaining an initial speed target video with the same playback time as the initial speed video.
[0024] In S3, a speed change process is performed on the initial speed target video to obtain a speed change target video, and the change in the playback speed of the speed change target video coincides with the change in the playback speed of the speed change video.
[0025] For example, since the recording time node of the initial speed target video is similar or coincident with that of the initial speed video, the initial speed target video can use the corresponding video special effect of the initial speed video to obtain the initial speed target video having the same video special effect as the speed-change video. In one embodiment, a speed change process is performed on the initial speed target video according to the speed change information to obtain the speed-change target video.
[0026] In this embodiment, a reverse speed change process is performed on the variable speed video to obtain an initial speed video, and the initial speed video is displayed while simultaneously shooting a video synchronously to generate a target initial speed video. A speed change process is performed on the target initial speed video to obtain the target speed change video. The playback speed of the initial speed video obtained by reverse speed change is the same as the normal speed of the video recorded by the user. Therefore, by displaying the initial speed video to the user and guiding the user to record a video, the video recorded by the user can be synchronized with the original variable speed video, and the special effects in the template can match the video content shot by the user, and the video recorded by the user can directly obtain the special effects of the original variable speed video. This solves the problem of mismatch between the video special effects and the video content, and improves the presentation of the special effects in the video recorded by the user.
[0027] figure 4 Referring to Fig. 4 1 is a flowchart of a video recording method provided by an embodiment of the present disclosure. 2 The method of this embodiment can be applied to a mobile terminal device such as a smart mobile phone, and the video recording method includes the following steps:
[0028] In S101, speed change information of a variable speed video is obtained, and the speed change information is used to characterize a change in the playback speed of the variable speed video.
[0029] For example, video generally refers to a multimedia file containing audio data and video data, and the audio data and video data may have various formats depending on different audio and video compression processing methods, with video data being, for example, Audio Video Interleaved (AVI) format, Movie digital video technology (MOV) format, and audio data being, for example, Advanced Audio Coding (ACC) format, and the specific data format of video and combinations of audio data formats and video data formats are not limited herein.
[0030] Specifically, the variable-speed video refers to video data obtained by performing a speed change process on the video material, i.e., the original video. In one possible implementation, the variable-speed video exhibits a nonlinear change in the playback speed during playback, for example, from 0 to 3 seconds of the variable-speed video, the variable-speed video is played at the normal playback speed, from 3 to 5 seconds, the variable-speed video is played at 2x speed, and from 5 to 7 seconds, the variable-speed video is played at 0.5x speed. The variable-speed playback of the variable-speed video provides the video with a speed change special effect, which enhances the expressiveness and entertainment of the video. Note that the variable-speed video includes video data and audio data, and the variable-speed playback of the variable-speed video includes several possible variable-speed playback expressions, such as variable-speed playback of the video data and initial speed playback of the audio data, initial speed playback of the video data and variable-speed playback of the audio data, and variable-speed playback of the video data and the audio data.
[0031] The step of acquiring speed change information of the speed-change video may be implemented in various ways. For example, the step of acquiring speed change information of the speed-change video may be implemented in various ways based on preset mapping information. local Alternatively, the speed-change information corresponding to the identifier information of the speed-change video may be determined and acquired by storing the speed-change video from the cloud. In addition, the speed-change information of the speed-change video may be acquired by acquiring a video template including the speed-change video and the corresponding speed-change information. In the present specification, the speed-change information may be set according to specific needs and is not specifically limited.
[0032] In S102, a reverse speed change process is performed on the speed change video based on the speed change information to obtain an initial speed video.
[0033] Specifically, the speed change information is information for characterizing the change in the playback speed of the speed change video, and corresponds to the mapping relationship of the speed change between the initial speed video and the speed change video. 5 FIG. 1 is a schematic diagram of a process for performing reverse speed-shifting on a speed-shifted video based on speed-shifting information; 5Referring to the above, according to the description of the playback speed of the speed-shifting video in the speed-shifting information, a playback frame is added to the accelerated part of the speed-shifting video by using an interpolation fitting means to realize the deceleration of this part, while a playback frame is decreased to the decelerated part of the speed-shifting video by using a sampling means to realize the acceleration of this part, and finally, a reverse speed-shifting process of the speed-shifting video is realized to obtain the initial speed video.
[0034] Here, since the "initial speed" of the initial speed video is relative to the "speed change" of the speed-change video, the initial speed video is not necessarily data that is completely identical to the speed-change video. For example, in the speed-change video, the video data is a video in which the video material is played at a speed change, and the audio data is audio in which the audio data is played at an initial speed. In the initial speed video obtained after the reverse speed-change process, the video data is a video in which the video material is played at an initial speed, and the audio data is audio in which the audio data is played at a speed change. In this specification, the specific playback speeds of the video data and audio data of the initial speed video are not limited, and can be set according to a specific application scene. In addition, since the initial speed video obtained by the reverse speed-change process has been subjected to a process of upsampling or downsampling of the speed-change video, such as sampling or interpolation, the initial speed video subjected to the reverse speed-change process does not have a completely equal time length to the speed-change video.
[0035] In S103, the initial speed video is displayed and video shooting is performed synchronously to generate an initial speed target video.
[0036] For example, FIG. 6 FIG. 1 is a schematic diagram of a process for video capture synchronous with display of initial speed video provided by an embodiment of the present disclosure; 6Referring to the above, after the initial speed video is obtained, the playback speed of the audio and / or video content represented in the initial speed video matches the speed when recording a video at normal speed, so that a user can operate a terminal device that executes the video recording method provided by this embodiment and record a video according to the time sequence of the video recording represented in the initial speed video to obtain an initial speed target video having the same playback time as the initial speed video.
[0037] In S104, a speed change process is performed on the initial speed target video based on the speed change information to obtain a speed change target video.
[0038] For example, the initial speed target video has a similar or identical recording time node to the initial speed video, so that the initial speed target video has the same video special effect as the variable speed video by using the corresponding video special effect of the initial speed video. initial velocity A target video can be obtained. The time node at which the video special effect needs to appear in the initial-speed target video is the same as the time node at which the special effect appears in the speed-shifted video obtained by speed-shifting the initial-speed video, so that the inverse conversion based on the speed-shift information is applied to the initial-speed target video, and a speed-shifting process is performed on the initial-speed target video based on the speed-shift information, thereby obtaining a speed-shifted target video having the same special effect as the speed-shifted video.
[0039] In this embodiment, speed-shift information of the speed-shift video is obtained, the speed-shift information is used to characterize the change in the playback speed of the speed-shift video, reverse speed-shift processing is performed on the speed-shift video according to the speed-shift information to obtain an initial speed video, the initial speed video is displayed, and video shooting is performed synchronously to generate a target initial speed video, speed-shift processing is performed on the target initial speed video according to the speed-shift information to obtain the target speed-shift video, the playback speed of the initial speed video obtained by reverse speed-shifting is the same as the normal speed of the video recorded by the user, so that the initial speed video is displayed to the user to guide the user in recording the video, so that the video recorded by the user can be synchronized with the original speed-shift video, and the special effects in the template can be matched with the video content shot by the user, and the video recorded by the user can directly obtain the special effects of the original speed-shift video, thereby solving the problem of mismatch between the video special effects and the video content, and improving the presentation of the special effects of the video recorded by the user.
[0040] figure 7 1 is a flowchart of a video recording method provided by an embodiment of the present disclosure. 3 In this embodiment, 4 Based on the embodiment shown in, the process of steps S101 to S103 will be described in more detail, and the video recording method includes the following steps.
[0041] In S201, a variable speed video template is obtained, where the variable speed video template includes a variable speed video and corresponding speed change information.
[0042] Here, the speed change information includes a video speed change model, and the video speed change model is used to characterize a mapping relationship between the playback speed and playback time of the speed change video. Exemplarily, the speed change video template may be a file of a preset template type, and the speed change video template may be customized and set by a user or preset in an APP of a mobile terminal device, and optionally, a user may perform operations such as editing, adding, and deleting on the speed change video template through a user interface (UI) of the APP. The speed change video template includes a speed change video and a corresponding video speed change model, and the speed change model can be used to describe a mapping relationship between the playback speed and playback time of the speed change video.
[0043] Exemplarily, the video speed change model is used to characterize the change discipline of the playback speed of the speed change video, and the specific implementation of the speed change model is various, for example, the video speed change model may be a change function of the playback speed of the speed change video, and each identifier of the data frame of the speed change video corresponds to one playback speed coefficient. Also, for example, the speed change model may be a two-dimensional array, and the array stores several specific time nodes of the speed change video and corresponding playback speed coefficients, specifically, for example, the speed change video corresponds to a speed change coefficient of 2 at the 1st second, the speed change video corresponds to a speed change coefficient of 2.5 at the 1.5th second, and the speed change video corresponds to a speed change coefficient of 0.5 at the 3rd second. Here, the speed change coefficient is used to characterize the value of the ratio between the speed change playback speed and the normal playback speed. The video speed change model can be set in a specific implementation form as required, and is not specifically limited in this specification.
[0044] figure 8 FIG. 1 is a schematic diagram of an implementation of a variable speed video template in a UI provided by an embodiment of the present disclosure; 8Referring to the UI interface of the APP, in one possible implementation, the video speed change model includes speed change anchor points of the speed change video and playback speeds corresponding to the speed change anchor points, the speed change video in the speed change video template is set opposite to the video speed change model on the time axis, the video speed change model includes several speed change anchor points that characterize the playback speed of the speed change video at a specific playback timing, and a fitting curve is formed between the several speed change anchor points to indicate the speed change situation of the speed change video.
[0045] In S202, a playback timestamp of the variable speed video is determined based on the speed change information, and the playback timestamp is a timestamp that causes the variable speed video to be played back at an initial speed.
[0046] In one possible implementation, FIG. 9 As shown in FIG. 1, step S202 is S2021, determining a first time interval based on a speed-varying anchor point of the speed-varying video; determining a time step corresponding to the speed-varying anchor point based on an integral of a first time interval of a playback speed corresponding to the speed-varying anchor point of the speed-varying video; and The specific step includes: determining a playback timestamp of the variable speed video based on the time step S2023.
[0047] figure 10 FIG. 1 is a schematic diagram of a playback timestamp of a variable speed video provided by an embodiment of the present disclosure. 10 Steps S2021 to S2023 will be specifically described with reference to the flowchart shown in FIG.
[0048] figure 10Referring to FIG. 1, a first time interval is determined according to an interval between corresponding speed-shift anchor points of the speed-shift video, and when the intervals between the speed-shift anchor points are different, the corresponding first time interval is also different. In one possible implementation, the derivative of the fit curve at the speed-shift anchor point is 0. Then, integration is performed within the first time interval according to the playback speed corresponding to each speed-shift anchor point to determine a time step corresponding to the speed-shift anchor point. Specifically, a playback speed value corresponding to the speed-shift anchor point interpolated on the fit curve is determined according to the fit curve between the speed-shift anchor points, and a product of the unit time interval and the corresponding speed value is calculated; Two Gear shift anchor point between By adding up all the corresponding products of , we can obtain the time step between the two shift anchor points.
[0049] Furthermore, a mapping is performed on the variable speed video based on the time step to determine the playback timestamp of the variable speed video. 10 As a result, it can be seen that the AB section corresponds to the accelerated playback portion of the variable speed video, and the integral calculation result is large, so the playback timestamps in the variable speed video are sparse, while the latter half of the BC section corresponds to the decelerated playback portion of the variable speed video, and the integral calculation result is small, so the playback timestamps in the variable speed video are dense.
[0050] In S203, a video frame corresponding to a playback timestamp of the variable speed video is determined.
[0051] Illustratively, the variable speed video is composed of a number of video frames, and a video frame is the smallest playback unit of the variable speed video. In one possible implementation, the method for determining a video frame corresponding to a playback timestamp of the variable speed video includes: decoding the variable speed video according to the playback timestamp, specifically, locating the variable speed video according to the video position indicated by the playback timestamp, and decoding the video data at the corresponding position to obtain the video frame corresponding to the playback timestamp.
[0052] figure 11 FIG. 1 is a schematic diagram of a process for determining a video frame provided by an embodiment of the present disclosure; 11 Specifically, the playback timestamp is information for characterizing the video data playback position of the original video material. Before playing the video material, the video needs to be decoded, and the video decoding position is the position corresponding to the playback timestamp. After the video decoding position is determined, the video decoding position is decoded to obtain the video frame corresponding to the playback timestamp. The specific implementation process is described in the technical field of the present invention. Related Technologies and will not be repeated here.
[0053] In S204, an initial velocity video is generated based on the video frames.
[0054] For example, FIG. 12 As shown in FIG. 1, step S204 is S2041, obtaining a preset recording timestamp, the recording timestamp being used to characterize a playback timestamp of the initial speed video; and The specific step includes determining a recorded video frame corresponding to the recording timestamp based on the corresponding relationship between the recording timestamp and the playback timestamp in S2042.
[0055] For example, the recording timestamp is a timestamp generated by a terminal device based on an image sampling rate when a user uses a terminal device to record a video, and more specifically, for example, the recording timestamp includes a timing sequence of length 1000, with an interval between each timing of 33 milliseconds, i.e., the first timing is 0 milliseconds, the second timing is 33 milliseconds, and the third timing is 66 milliseconds, by analogy. The recording timestamp corresponds to the timestamp when a video is shot at normal speed, and therefore the recording timestamp characterizes the playback timestamp of the original speed video.
[0056] Furthermore, based on the correspondence between the recording timestamps and the playback timestamps, if one timestamp node of the recording timestamps overlaps with one timestamp node of the playback timestamps, it is determined that the recording video frame corresponding to the recording timestamp is the video frame corresponding to the timestamp node, but if one timestamp node of the recording timestamps does not overlap with any node of the playback timestamps, it is determined that the recording video frame corresponding to the recording timestamp is the video frame corresponding to the previous timestamp node; that is, since the recording timestamps are evenly distributed on the time axis and the playback timestamps are not evenly distributed on the time axis, if the timestamp node of the recording timestamp is the same as the timestamp node of the playback timestamp, the video frame corresponding to the timestamp node is stored as a valid video frame, but the timestamp node of the recording timestamp is the same as the timestamp node of the playback timestamp. Either Timestamp node and too If they are not the same, the previous valid video frame is repeatedly saved to achieve the purpose of inserting a frame into the video. Finally, all the saved recorded video frames are combined according to the recording timestamps to synthesize an initial speed video.
[0057] In another possible implementation, the variable speed video includes audio data, and step S204 further includes: S2043 determining a playback speed of the audio data corresponding to the playback timestamp; S2044 resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp; B and generating a full-speed video based on the video frames and the corresponding audio frames in a step S2045.
[0058] Like the video data of variable speed video, the playback speed of the audio data corresponds to the speed change information, i.e., is associated with the playback timestamp, and as the interval between playback timestamps becomes larger, the audio playback speed increases accordingly. Therefore, the playback speed of the audio frames within that interval, i.e., the playback speed of the unit audio data, can be determined according to the interval between playback timestamps.
[0059] Furthermore, the step of resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp includes the steps of obtaining a preset first audio sampling rate, determining a second audio sampling rate according to the first audio sampling rate and the playback speed of the audio data, and resampling the audio data according to the second audio sampling rate to obtain an audio frame corresponding to the playback timestamp. Specifically, the playback speed of the unit audio data may be based on a normal speed, for example, the playback speed is 2x, 3x, 0.5x, etc. The first audio sampling rate is the original sampling rate of the audio data, and the playback speed of the unit audio data is determined based on the normal speed. and Based on the first audio sampling rate, resampling, including upsampling and downsampling, is performed at the second audio sampling rate, thereby realizing the acceleration and deceleration of the audio, and obtaining an audio frame corresponding to the playback timestamp. specific This will be explained using an embodiment.
[0060] A variable speed video includes an audio data unit with a sampling rate of 44k sampling points and a duration of 1 second. In this case, if the playback speed of the audio data unit is 2x speed, the audio data unit needs to be increased in speed by 2x, that is, only 22k sampling points of the audio data unit are retained through resampling. In this case, when the audio data unit is played back, it takes 0.5 seconds to play back the audio data unit, which corresponds to a playback speed of 2x speed.
[0061] In one possible implementation, the normal speed playback start timestamp of the current audio frame corresponds to the speed-change playback start timestamp of the fit curve in the speed-change information, and the normal speed playback end timestamp of the current audio frame corresponds to the speed-change playback end timestamp of the fit curve in the speed-change information. After the audio inverse curve speed-change, the speed-change rate is not consistent, and the number of unit audio data generated each time resampling is different. Therefore, the unit audio data generated each time resampling is cached in a cache pool, and the unit audio data are stored in chronological order in the cache pool. Then, it is determined whether the number of unit audio data in the cache pool has reached a preset usage number, for example 1024. If so, the preset usage number of unit audio data are taken out to generate an audio frame, and the remaining unit audio data are reserved in the cache pool until the audio data processing is completed.
[0062] It should be noted that in one possible implementation, the variable speed video may include audio data and video material at the same time, and the generated video frame may include both audio and video frames. However, in another possible implementation, the variable speed video may include either audio data or video material, so that only audio or video frames are generated. This can be set according to different application scenarios, and is not specifically limited in this specification.
[0063] After the video frames are obtained, the video frames can be combined to obtain a full-speed video. In one possible implementation, the video frames include audio frames and video frames, and audio and video synchronization processing can be performed on the audio frames and video frames so that the sound and image of the full-speed video composed of the audio frames and video frames match.
[0064] Specifically, according to the display timestamp information corresponding to the audio frame and the video frame, the difference between the audio frame and the video frame is modified to be smaller than a preset threshold, so that the synchronization between the audio frame and the video frame can be realized. More specifically, when rendering to the video, the difference between the display timestamp of the audio frame and the display timestamp of the video frame is calculated in real time, for example, if the difference is a positive value, the display timestamp of the audio frame is earlier than the display timestamp of the video frame, that is, the audio frame is faster, in this case, the audio frame is delayed, but if the difference is a negative value, the display timestamp of the audio frame is later than the display timestamp of the video frame, that is, the audio frame is slower, in this case, the video frame is delayed, thereby synchronizing the audio frame and the video frame.
[0065] In S205, the initial speed video is displayed in the first interaction interface, and video shooting is performed synchronously to generate an initial speed target video.
[0066] Specifically, the first interaction interface is a channel for information exchange between a person and a mobile terminal device, the user inputs information into the mobile terminal device through the first interaction interface and operates it, and the mobile terminal device provides information to the user through the interaction interface.
[0067] In this embodiment, after generating the initial speed video, the initial speed video is played in the first interaction interface to realize the user's guidance in shooting the video. Exemplarily, the first interaction interface may be a user interface in the APP. 13 FIG. 1 is a schematic diagram of a first interaction interface provided by an embodiment of the present disclosure; 13 Referring to the above, the first interaction interface includes a first display area and a second display area, where the first display area displays a video currently being recorded by a user, and the second display area displays an initial-speed video. Optionally, the first interaction interface can also simultaneously play audio data of the initial-speed video to provide a better guiding function to the user.
[0068] In addition, the terminal device plays the initial speed video and simultaneously synchronizes the video shooting to generate the initial speed target video. 14 FIG. 1 is a schematic diagram of an operation for generating an initial velocity target video by video shooting provided by an embodiment of the present disclosure; 14 As shown in FIG. 1, when a user clicks the start recording button, the initial speed video is synchronously played and the video recording is started at the same time, and the third display area of the first interaction interface is provided with time display information, which may be in the form of a progress bar or a time number, and the progress bar format is taken as an example in this specification. The time display information is used to indicate the completed progress or remaining progress of the currently recorded video relative to the initial speed video, and when the progress bar is exhausted, the initial speed video is completed and the target initial speed video is generated.
[0069] In S206, speed change processing is performed on the initial speed target video based on the speed change information to obtain a speed change target video.
[0070] The target initial speed video that has been recorded is the same or similar to the initial speed video in the time sequence and time nodes of the recorded content, for example, in the video data of the initial speed video, when a person to be recorded moves to position A at t1 second, a special effect a appears for the corresponding person, and when the person to be recorded moves to position B at t2 second, a special effect b appears for the corresponding person. Accordingly, the person to be recorded in the video waiting to be processed moves to position A at t1 second and to position B at t2 seconds, matching with the video data of the initial speed video.
[0071] Furthermore, speed change processing is performed on the initial speed target video based on the speed change information, and the speed change information corresponds to the speed change special effect of the speed change video, so that in the generated target video data, as shown in the above example, when a person to be recorded moves to position A at t1 second, special effect a appears for the corresponding person, and when the person to be recorded moves to position B at t2 second, special effect b appears for the corresponding person. In this way, the purpose of quickly adding video special effects to the initial speed target video is achieved.
[0072] Corresponding to the video recording method of the above embodiment, FIG. 15 FIG. 1 is a structural block diagram of a video recording device provided by an embodiment of the present disclosure. For convenience of explanation, only parts related to the embodiment of the present disclosure are shown. 15 Referring to the video recording device 3, an acquisition unit 31 for acquiring speed-shift information of a variable-speed video, the speed-shift information being used to characterize a change in the playback speed of the variable-speed video; a reverse speed-changing unit 32, which is used to perform reverse speed-changing processing on the speed-changing video according to the speed-changing information to obtain an initial speed video; A generating unit 33 is used for displaying the initial velocity video and synchronizing the video capture to generate the initial velocity target video; and a speed change unit 34 used for performing speed change processing on the initial speed target video based on the speed change information to obtain a speed change target video.
[0073] The acquisition unit 31, the reverse shift unit 32, the generation unit 33 and the shift unit 34 are connected in series. The video recording device 3 provided in this embodiment is shown in FIG. 4 The technical solutions of the method embodiments shown in are also applicable, and their implementation principles and technical effects are similar, so they will not be described here repeatedly.
[0074] figure 16 FIG. 2 is a structural block diagram of a video recording device provided by an embodiment of the present disclosure. The video recording device 4 provided by the embodiment is shown in FIG. 16 Based on the video recording device shown in FIG. 1, the generating unit 33 is further embodied, and the functions of the obtaining unit 31 and the reverse shifting unit 32 are further limited.
[0075] In one possible implementation, the reverse speed change unit 32 is specifically used for determining a playback timestamp of the speed change video based on the speed change information, where the playback timestamp is a timestamp at which the speed change video is played at an initial speed, determining a video frame corresponding to the playback timestamp of the speed change video, and generating the initial speed video based on the video frame.
[0076] In one possible implementation form, the speed change information includes speed change anchor points of the speed change video and playback speeds corresponding to the speed change anchor points, and when the inverse speed change unit 32 determines the playback timestamps of the speed change video based on the speed change information, it is specifically used for determining a first time interval based on the speed change anchor points of the speed change video, determining a time step corresponding to the speed change anchor point based on an integral of the playback speed corresponding to the speed change anchor point of the speed change video in the first time interval, and determining the playback timestamp of the speed change video based on the time step.
[0077] In one possible implementation form, when determining a video frame corresponding to a playback timestamp of the speed-shifting video, the reverse speed-shifting unit 32 is specifically used for decoding the speed-shifting video based on the playback timestamp to obtain a video frame corresponding to the playback timestamp, and the speed-shifting unit 34 is specifically used for obtaining a preset recording timestamp, which is used to characterize the playback timestamp of the initial speed video, and determining a recording video frame corresponding to the recording timestamp based on the correspondence between the recording timestamp and the playback timestamp, and synthesizing the recording video frame into the initial speed video.
[0078] In one possible implementation, the variable-speed video includes audio data, and the inverse variable-speed unit 32 is further used for determining a playback speed of the audio data corresponding to the playback timestamp, and resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp. The variable-speed unit 34 is specifically used for generating an original-speed video based on the video frame and the corresponding audio frame.
[0079] In one possible implementation form, when resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp, the reverse speed change unit 32 is specifically used for obtaining a preset first audio sampling rate, determining a second audio sampling rate according to the first audio sampling rate and the playback speed of the audio data, and resampling the audio data according to the second audio sampling rate to obtain an audio frame corresponding to the playback timestamp.
[0080] In one possible implementation, the speed change unit 34 is further used to perform audio and video synchronization for video and audio frames.
[0081] In one possible implementation, the generating unit 33 is A display module 331 used for displaying the initial speed video in the first interaction interface; a video recording module 332, which is used to display the initial speed video in the first interaction interface and simultaneously record video synchronously to generate an initial speed target video.
[0082] In one possible implementation form, the initial speed video includes initial speed video data and / or initial speed audio data, and the display module 331 is specifically used to play the initial speed video data and / or the initial speed audio data in the first interaction interface.
[0083] The device provided by this embodiment can be used to implement the technical solutions of the above method embodiments, and the realization principles and technical effects are similar, so this embodiment will not be described repeatedly here.
[0084] figure 17 FIG. 1 is a schematic diagram of an electronic device provided in accordance with one embodiment of the present disclosure; 17 As shown, the electronic device 5 provided in this embodiment includes a memory 51, a processor 52, and a computer program.
[0085] The computer program is stored in the memory 51 and, when executed by the processor 52, performs the operations shown in FIGS. 16 The video recording method according to any one of the embodiments of the present invention is adapted to implement the video recording method according to any one of the embodiments of the present invention.
[0086] The memory 51 and the processor 52 are connected via a bus 53 .
[0087] Related explanations are shown in Figs. 14 The relevant descriptions and effects of the steps in the corresponding embodiments can be referred to for understanding, and will not be described repeatedly here.
[0088] figure 18 17 shows a structural schematic diagram of an electronic device 6 suitable for implementing an embodiment of the present disclosure, which can be a terminal device or a server. The terminal device can be a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (Portable Android Device, PAD), a portable media player (PMP), a car terminal (e.g., a car navigation terminal), and the like; Television ( TV ) , and fixed terminals such as desktop computers. 18 The electronic device 6 shown in is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present disclosure.
[0089] figure 18 As shown in FIG. 1, the electronic device 6 may include a processing unit (such as a central processing unit or a graphic processor) 61, which may perform various appropriate operations and processes according to a program stored in a read only memory (ROM) 62 or a program loaded from a storage device 68 into a random access memory (RAM) 63. The RAM 63 also stores various programs and data necessary for the operation of the electronic device 6. The processing unit 61, the ROM 62, and the RAM 63 are connected to each other via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.
[0090] Typically, input devices 66 including a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc., output devices 67 including a liquid crystal display (abbreviated as LCD), a speaker, a vibrator, etc., storage devices 68 including a magnetic tape, a hard disk, etc., and a communication device 69 can be connected to the I / O interface 65. The communication device 69 can enable the electronic device 6 to communicate and exchange data with other devices wirelessly or by wire. Although FIG. 17 shows the electronic device 6 with various devices, it should be understood that not all of the devices shown need to be implemented or arranged. Alternatively, more or fewer devices can be implemented or arranged.
[0091] In particular, according to an embodiment of the present disclosure, the above processes described with reference to the flowcharts can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product including a computer program carried on a computer-readable medium, the computer program including program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device 69, or installed from a storage device 68, or installed from a ROM 62. When the computer program is executed by the processing device 61, the above functions defined in the method according to the embodiment of the present disclosure are performed.
[0092] It should be noted that the computer readable medium described in this disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, an electrical connection having 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 memory component, or any suitable combination of the above. In this disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embedded therein. Such propagated data signals may take many 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, which may transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.The program code contained in the computer readable medium can be transmitted using any suitable medium, including but not limited to electrical wire, optical fiber cable, radio frequency (abbreviated as RF), etc., or any suitable combination of the above.
[0093] The computer-readable medium may be included in the mobile terminal device, or may exist independently without being assembled to the mobile terminal device.
[0094] The computer-readable medium includes one or more programs stored therein, which, when executed by the mobile terminal device, causes the mobile terminal device to perform the method illustrated in the above embodiments.
[0095] Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages, or a combination thereof. The program code can run entirely on the user's computer, partly on the user's computer, as a standalone software package, partly on the user's computer, partly on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any kind of network, such as a Local Area Network (LAN) or a Wide Area Network (WAN), or can be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).
[0096] The flowcharts and block diagrams in the drawings illustrate the architecture, functions, and operations that can be realized by the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code that includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions shown in the blocks may be executed in a different order than that shown in the figures. For example, two blocks shown as connected may actually be executed in parallel, or the blocks may be executed in the reverse order depending on the related functionality. It should be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified functions or operations, or may be implemented using a combination of dedicated hardware and computer instructions.
[0097] The units described in the embodiments of the present disclosure can be realized in software or hardware. The names of these units may not be intended to limit the units themselves in a particular situation, for example, the first acquisition unit may be described as "a unit for acquiring at least two Internet Protocol addresses."
[0098] The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that may be used may include, but are not limited to, Field-Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System-on-a-chips (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
[0099] In the context of this disclosure, a machine-readable medium may be a tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of machine-readable storage media may include electrical connections based on one or more wires, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic memory components, or any suitable combination of the above.
[0100] In a first aspect, according to one or more embodiments of the present disclosure, there is provided a video recording method, the method including: acquiring speed change information of a speed-shifting video, the speed change information being used to characterize a change in playback speed of the speed-shifting video; performing an inverse speed-shifting process on the speed-shifting video based on the speed-shifting information to obtain an initial speed video; displaying the initial speed video and synchronously shooting video to generate an initial speed target video; and performing a speed-shifting process on the initial speed target video based on the speed-shifting information to obtain a speed-shifting target video.
[0101] According to one or more embodiments of the present disclosure, the step of performing reverse speed change processing on the speed-change video based on the speed change information to obtain an initial speed video includes the steps of determining a playback timestamp of the speed-change video based on the speed-change information, where the playback timestamp is a timestamp at which the speed-change video is played at an initial speed; determining a video frame corresponding to the playback timestamp of the speed-change video; and generating the initial speed video based on the video frame.
[0102] According to one or more embodiments of the present disclosure, the speed change information includes a speed change anchor point of the speed change video and a playback speed corresponding to the speed change anchor point, and the step of determining a playback timestamp of the speed change video based on the speed change information includes a step of determining a first time interval based on the speed change anchor point of the speed change video, a step of determining a time step corresponding to the speed change anchor point based on an integral of the playback speed corresponding to the speed change anchor point of the speed change video in the first time interval, and a step of determining a playback timestamp of the speed change video based on the time step.
[0103] According to one or more embodiments of the present disclosure, the step of determining a video frame corresponding to a playback timestamp of the variable speed video includes a step of decoding the variable speed video based on the playback timestamp to obtain a video frame corresponding to the playback timestamp, and the step of generating the initial speed video based on the video frame includes a step of obtaining a predetermined recording timestamp, where the recording timestamp is used to characterize the playback timestamp of the initial speed video, and a step of determining a recorded video frame corresponding to the recording timestamp based on a correspondence between the recording timestamp and the playback timestamp, and synthesizing the recorded video frame into the initial speed video.
[0104] According to one or more embodiments of the present disclosure, the variable speed video includes audio data, and the method further includes a step of determining a playback speed of the audio data corresponding to the playback timestamp, and a step of resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp, and the step of generating the initial speed video based on the video frame includes a step of generating the initial speed video based on the video frame and the corresponding audio frame.
[0105] According to one or more embodiments of the present disclosure, the step of resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp includes the steps of obtaining a predetermined first audio sampling rate, determining a second audio sampling rate according to the first audio sampling rate and the playback speed of the audio data, and resampling the audio data according to the second audio sampling rate to obtain an audio frame corresponding to the playback timestamp.
[0106] According to one or more embodiments of the present disclosure, the method further includes performing audio and video synchronization for the video frames and the audio frames.
[0107] In a second aspect, according to one or more embodiments of the present disclosure, there is provided a video recording device, the device comprising: an acquisition unit used for acquiring speed change information of a variable speed video, the speed change information being used for characterizing a change in a playback speed of the variable speed video; a reverse speed change unit for performing reverse speed change processing on the speed change video based on the speed change information to obtain an initial speed video; A generating unit is used for displaying the initial speed video and synchronously taking video to generate an initial speed target video; a speed change unit used for performing speed change processing on the initial speed target video based on the speed change information to obtain a speed change target video.
[0108] In one possible implementation form, the reverse speed change unit is specifically used for determining a playback timestamp of the speed change video based on the speed change information, where the playback timestamp is a timestamp at which the speed change video is played at an initial speed, determining a video frame corresponding to the playback timestamp of the speed change video, and generating the initial speed video based on the video frame.
[0109] In one possible implementation form, the speed change information includes speed change anchor points of the speed change video and playback speeds corresponding to the speed change anchor points, and when the inverse speed change unit determines the playback timestamp of the speed change video based on the speed change information, the inverse speed change unit is specifically used for determining a first time interval based on the speed change anchor points of the speed change video, determining a time step corresponding to the speed change anchor point based on an integral of the playback speed corresponding to the speed change anchor point of the speed change video in the first time interval, and determining the playback timestamp of the speed change video based on the time step.
[0110] In one possible implementation form, when determining a video frame corresponding to a playback timestamp of the speed-shifting video, the reverse speed-shifting unit is specifically used to decode the speed-shifting video based on the playback timestamp to obtain a video frame corresponding to the playback timestamp, and the speed-shifting unit is specifically used to obtain a predetermined recording timestamp, which is used to characterize the playback timestamp of the initial speed video, and to determine a recording video frame corresponding to the recording timestamp based on the correspondence between the recording timestamp and the playback timestamp, and synthesize the recording video frame into the initial speed video.
[0111] In one possible implementation, the variable-speed video includes audio data, and the inverse speed-change unit is further used for determining a playback speed of the audio data corresponding to the playback timestamp, and resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp. To Specifically, it is used to generate the initial speed video based on the video frames and the corresponding audio frames.
[0112] In one possible implementation form, when resampling the audio data according to the playback speed to obtain an audio frame corresponding to the playback timestamp, the reverse speed change unit is specifically used for obtaining a predetermined first audio sampling rate, determining a second audio sampling rate according to the first audio sampling rate and the playback speed of the audio data, and resampling the audio data according to the second audio sampling rate to obtain an audio frame corresponding to the playback timestamp.
[0113] In one possible implementation, the speed change unit is further used to perform audio and video synchronization for video and audio frames.
[0114] In one possible implementation, the generating unit comprises: A display module used for displaying the initial speed video in the first interaction interface; a recording module, which is used for displaying the initial speed video in the first interaction interface and simultaneously synchronously taking a video to generate an initial speed target video.
[0115] In one possible implementation form, the initial speed video includes initial speed video data and / or initial speed audio data, and the display module is specifically used for playing the initial speed video data and / or the initial speed audio data in the first interaction interface.
[0116] In a third aspect, an embodiment of the present disclosure provides an electronic device including at least one processor and a memory; The memory stores computer executable instructions, When the at least one processor executes the computer-executable instructions stored in the memory, the at least one processor performs the video recording method described in the first aspect above and various possible designs of the first aspect.
[0117] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed by a processor, results in the video recording method described in the first aspect above and various possible designs of the first aspect.
[0118] In a fifth aspect, an embodiment of the present disclosure provides a computer program product including a computer program, the computer program being stored in a readable storage medium, and at least one processor of an electronic device reading the computer program from the readable storage medium, and when the at least one processor executes the computer program, the electronic device realizes the video recording method described in the first aspect above and various possible designs of the first aspect.
[0119] In a sixth aspect, an embodiment of the present disclosure provides a computer program, the computer program being stored in a readable storage medium, and at least one processor of the electronic device reading the computer program from the readable storage medium, and when the at least one processor executes the computer program, the electronic device realizes the video recording method as described in the first aspect above and various possible designs of the first aspect.
[0120] The above description is merely a description of some preferred embodiments of the present disclosure and a description of the applied technical principles.Those skilled in the art should understand that the scope of the invention according to the embodiments of the present disclosure is not limited to the solution formed by a specific combination of the above technical features, but should also cover other solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept, for example, by replacing the above features with technical features having similar functions (but not limited to) disclosed in the present disclosure.
[0121] It should be noted that although operations are described in a particular order, this should not be understood as requiring that these operations be performed in the particular order or sequence shown. Multitasking or parallel processing may be advantageous in certain circumstances. Similarly, although the above description includes some specific implementation details, these should not be construed as limiting the scope of the disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented in multiple embodiments, either alone or in any suitable subcombination.
[0122] Although the present subject matter has been described using language specific to structural features and / or methodological logical operations, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above. Rather, the specific features and operations described above are merely example forms for implementing the claims.
[0123] This application claims priority to a Chinese patent application filed with the China Patent Office on January 21, 2021, bearing application number 202110080508.7 and entitled "Video Recording Method, Device, Electronic Device and Storage Medium," the entire contents of which are incorporated herein by reference.
Claims
1. 1. A method for recording video, comprising: performing a reverse speed change process on the speed change video to obtain an initial speed video; displaying the initial velocity video and synchronously taking a video to generate an initial velocity target video; and performing speed change processing on the initial speed target video to obtain a speed change target video, wherein a change in the playback speed of the speed change target video coincides with a change in the playback speed of the speed change video.
2. before performing the reverse speed-shifting process on the speed-shifting video, obtaining speed change information of the variable speed video, the speed change information being used to characterize changes in playback speed of the variable speed video; performing the reverse speed change processing on the speed change video to obtain the initial speed video, performing the reverse speed-change processing on the speed-change video based on the speed-change information to obtain the initial speed video; The step of performing speed change processing on the initial speed target video to obtain the speed change target video includes:
2. The video recording method according to claim 1, further comprising the step of performing speed change processing on the initial speed target video based on the speed change information to obtain the speed change target video.
3. performing the reverse speed-change processing on the speed-change video based on the speed-change information to obtain the initial speed video, determining a playback timestamp of the variable speed video based on the speed change information, the playback timestamp being a timestamp that causes the variable speed video to be played at an initial speed; determining a video frame corresponding to the playback timestamp of the variable speed video; and generating the full speed video based on the video frames.
4. The speed change information includes a speed change anchor point of the speed change video and a playback speed corresponding to the speed change anchor point, and the step of determining the playback timestamp of the speed change video based on the speed change information includes: determining a first time interval based on the speed-varying anchor point of the speed-varying video; determining a time step corresponding to the speed change anchor point based on an integral over the first time interval of the playback speed of the speed change video corresponding to the speed change anchor point; 4. The method of claim 3, further comprising determining the playback timestamps of the variable speed video based on the time steps.
5. Determining the video frame corresponding to the playback timestamp of the variable speed video comprises: decoding the variable speed video based on the playback timestamp to obtain a video frame corresponding to the playback timestamp; generating the initial speed video based on the video frames, obtaining a preset recording timestamp, the recording timestamp being a timestamp used to characterize the playback of the original speed video; 4. The video recording method of claim 3, further comprising a step of determining a recorded video frame corresponding to the recording timestamp based on the correspondence between the recording timestamp and the playback timestamp, and synthesizing the recorded video frame with the initial speed video.
6. The variable speed video includes audio data, and the video recording method further comprises: determining a playback speed of the audio data corresponding to the playback timestamp; resampling the audio data according to the playback speed of the audio data to obtain an audio frame corresponding to the playback timestamp; generating the initial speed video based on the video frames, 4. The method of claim 3, further comprising the step of: generating the full-speed video based on the video frames and the audio frames corresponding to the playback timestamps.
7. The step of resampling the audio data according to the playback speed to obtain the audio frame corresponding to the playback timestamp includes: obtaining a first preset audio sampling rate; determining a second audio sampling rate according to the first audio sampling rate and a playback speed of the audio data; 7. The method of claim 6, further comprising the step of: resampling the audio data in accordance with the second audio sampling rate to obtain the audio frame corresponding to the playback timestamp.
8. The video recording method further comprises:
7. The method of claim 6, further comprising the step of performing audio and video synchronization on the video and audio frames.
9. 1. A video recording device, comprising: a reverse speed change unit for performing reverse speed change processing on the speed change video to obtain an initial speed video; A generating unit is used for displaying the initial speed video and synchronizing video shooting to generate an initial speed target video; a speed change unit used to perform a speed change process on the initial speed target video to obtain a speed change target video, wherein a change in the playback speed of the speed change target video coincides with a change in the playback speed of the speed change video.
10. An electronic device including at least one processor and a memory, The memory stores computer executable instructions, 9. An electronic device comprising: an input section for inputting a video signal to an input device of the electronic device; a memory for storing said video signal; and a processor for storing said video signal;
11. A computer-readable storage medium having stored thereon computer-executable instructions, the computer-readable storage medium being characterized in that, when a processor executes the computer-executable instructions, a video recording method according to any one of claims 1 to 8 is realized.
12. A computer program, characterized in that, when said computer program is executed by a processor, the video recording method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Video production method and device, terminal and storage medium
CN108566519A
Video processing method and device and storage medium
CN112154670A
Moving picture playback device, control method for the same, and storage medium
JP2011160408A
Signal processor, control method and program
JP2019020530A