A video acquisition method, device, equipment and computer-readable storage medium
By selecting background audio in the video acquisition interface and dynamically displaying rhythm indication information, the problem of multiple edits in the video acquisition is solved, real-time preview and efficient creation are achieved.
Patent Information
- Application Number
- CN202110565621.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-24
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2041-05-24
AI Technical Summary
In the prior art, a large number of post-editing needs to be performed after video acquisition, resulting in high creation cost and low efficiency, and users cannot expect video results during shooting.
During the video acquisition process, by presenting the background audio selection function items in the acquisition interface, dynamically displaying the rhythm indication information of the background audio, and adjusting the video screen display effect in real time with the change in the playback rhythm.
It reduces the cost of video creation, improves video creation efficiency, enables users to preview the final results in real time during shooting, and reduces post-editing work.
Smart Images

Figure CN115396587B_ABST
Abstract
Description
Technical Field
[0001] This application relates to multimedia technology, and in particular to a video acquisition method, apparatus, device, and computer-readable storage medium. Background Art
[0002] In the related art, when a user captures and acquires a video, the user usually adopts a method of first acquisition and then processing. For example, the user first acquires a video picture, and then independently uses a video template provided by the system to perform post-editing and picture processing on the acquired video picture to obtain a final video result. However, this method makes it impossible for the user to anticipate the video result during shooting, and a large number of post-editing processes are required after the video acquisition is completed. The cost of video creation is high, and the efficiency of video creation is low. Summary of the Invention
[0003] Embodiments of this application provide a video acquisition method, apparatus, device, and computer-readable storage medium, which can dynamically display the adjusted video picture in real time during the video acquisition process, reduce the cost of video creation, and improve the efficiency of video creation.
[0004] The technical solution of the embodiments of this application is implemented as follows:
[0005] Embodiments of this application provide a video acquisition method, including:
[0006] Present a selection function item for selecting background audio in the video acquisition interface;
[0007] In response to a background audio selection operation triggered based on the selection function item, use the selected audio as the background audio of the acquired video;
[0008] Present rhythm indication information of the background audio in the acquisition interface, where the rhythm indication information is used to indicate the playing rhythm of the background audio;
[0009] During the process of video acquisition based on the acquisition interface, along with the change of the playing rhythm indicated by the rhythm indication information, use a display effect corresponding to the playing rhythm to dynamically display the video picture of the acquired video.
[0010] Embodiments of this application provide a video acquisition apparatus, including:
[0011] A first presentation module, configured to present a selection function item for selecting background audio in the video acquisition interface;
[0012] An audio selection module, configured to use the selected audio as the background audio of the acquired video in response to a background audio selection operation triggered based on the selection function item;
[0013] A second presentation module, configured to present rhythm indication information of the background audio in the acquisition interface, where the rhythm indication information is used to indicate the playing rhythm of the background audio;
[0014] A screen adjustment module, configured to, during the process of video acquisition based on the acquisition interface, along with the change of the playing rhythm indicated by the rhythm indication information, adopt a display effect corresponding to the playing rhythm to dynamically display the video screen of the acquired video.
[0015] In the above solution, after the presentation for selecting the background audio selects a selection function item, the device further includes:
[0016] An audio selection module, configured to present a background audio selection interface in response to a trigger operation on the selection function item;
[0017] In the background audio selection interface, present at least one of the following function items: an out-of-scene audio function item and an in-scene audio function item;
[0018] Among them, the out-of-scene audio function item is used to trigger a background audio selection operation for local stored audio or network stored audio;
[0019] The in-scene audio function item is used to trigger a background audio selection operation for the audio in the acquisition scene of the video.
[0020] In the above solution, the audio selection module is further configured to, when the background audio selection interface includes the out-of-scene audio function item, present an audio selection list in response to a trigger operation on the out-of-scene audio function item;
[0021] In response to a background audio selection operation on a target audio in the audio selection list, use the target audio as the background audio.
[0022] In the above solution, the audio selection module is further configured to, when the background audio selection interface includes the in-scene audio function item, receive a trigger operation on the in-scene audio function item;
[0023] Use the trigger operation on the in-scene audio function item as the background audio selection operation, and use the audio in the acquisition scene as the background audio.
[0024] In the above solution, the second presentation module is further configured to play the background audio in response to a video acquisition instruction triggered based on the acquisition interface;
[0025] Present a playback progress bar of the background audio in the acquisition interface, and present rhythm indication information corresponding to the playback progress of the background audio in the playback progress bar.
[0026] In the above solution, the device further includes:
[0027] A volume control module, configured to control the playback volume of the background audio to be less than the volume of the audio content when there is audio content in the acquired video during the video acquisition based on the acquisition interface.
[0028] In the above solution, the screen adjustment module is further configured to determine a scaling ratio of the video screen adapted to the playback rhythm;
[0029] Along with the change of the playback rhythm, dynamically display the video screen of the acquired video according to the corresponding scaling ratio, so that the scaling ratio of the video screen corresponds to the playback rhythm.
[0030] In the above solution, the screen adjustment module is further configured to, when receiving a video screen adjustment instruction for the acquired video and the adjustment rhythm of the video screen of the acquired video indicated by the video screen adjustment instruction is inconsistent with the playback rhythm indicated by the rhythm indication information, present an adjustment selection interface, and present at least one of the following function items in the adjustment selection interface: a selection item for the video screen adjustment instruction and a selection item for the rhythm indication information;
[0031] When the adjustment selection interface includes a selection item for the rhythm indication information, in response to a selection operation on the selection item for the rhythm indication information, along with the change of the playback rhythm indicated by the rhythm indication information, dynamically display the video screen of the acquired video by using a display effect corresponding to the playback rhythm.
[0032] In the above solution, the screen adjustment module is further configured to, when the adjustment selection interface includes a selection item for the video screen adjustment instruction, in response to a selection operation on the selection item for the video screen adjustment instruction, during the video acquisition based on the acquisition interface, dynamically display the video screen of the acquired video by using a display effect corresponding to the adjustment rhythm indicated by the video screen adjustment instruction.
[0033] In the above solution, the device further includes:
[0034] An effect adding module, configured to receive an effect adding instruction for the acquired video during the video acquisition based on the acquisition interface;
[0035] In response to the effect adding instruction, add corresponding special effect elements to the video screen.
[0036] In the above solution, the special effect adding module is further configured to present a special effect function item in the acquisition interface;
[0037] In response to a trigger operation on the special effect function item, at least two special effect selection items are presented;
[0038] In response to a selection operation on a target special effect selection item among the at least two special effect selection items, a special effect adding instruction for adding a corresponding special effect to the acquired video is triggered.
[0039] In the above solution, the special effect adding module is further configured to perform content recognition on the audio when the acquired video contains audio;
[0040] When the content of the audio contains target content indicating adding a special effect to the acquired video, a special effect adding instruction for adding the special effect to the acquired video is triggered.
[0041] In the above solution, the special effect adding module is further configured to recognize the actions of the target object when the acquired video contains the target object;
[0042] When there is a target action associated with a target special effect in the acquired video, a special effect adding instruction for adding the target special effect to the acquired video is triggered.
[0043] In the above solution, the device further includes:
[0044] An additional output module, which is further configured to, when there is voice content of a target object in the acquired video, display text content corresponding to the voice content in the dynamically displayed video picture; or,
[0045] When there is text in the acquired video, display the text in a target display style in the corresponding video picture; or,
[0046] When there is a target object in the acquired video, obtain associated content of the target object and output the associated content in the dynamically displayed video picture.
[0047] In the above solution, before presenting rhythm indication information for indicating the playing rhythm of the background audio in the acquisition interface, the device further includes:
[0048] An information generation module, configured to perform sampling processing on the background audio based on a preset sampling frequency to obtain the frequency of each audio frame in multiple audio frames included in the background audio;
[0049] Perform Fourier transform on the frequency of each audio frame respectively to generate a spectrogram corresponding to each audio frame;
[0050] Generate rhythm indication information of the background audio based on the spectrograms of the audio frames.
[0051] In the above solution, the information generation module is further configured to obtain a cover image of the background audio when the spectrogram of the audio frame is a bar spectrogram;
[0052] According to the playing order of the audio frames, surround the bar spectrograms of the audio frames around the cover image to obtain a spectrogram display diagram corresponding to the background audio, and use the spectrogram display diagram as the rhythm indication information of the background audio.
[0053] In the above solution, before presenting rhythm indication information for indicating the playing rhythm of the background audio in the acquisition interface, the information generation module is further configured to obtain the amplitude and spectrogram of each audio frame among the multiple audio frames included in the background audio;
[0054] Based on the amplitude of each audio frame, determine a plurality of spectral envelopes corresponding to the spectrograms;
[0055] Combine each spectral envelope with the corresponding spectrogram respectively to obtain a plurality of corresponding combined spectrograms as the rhythm indication information of the background audio.
[0056] An embodiment of the present application provides an electronic device, including:
[0057] A memory for storing executable instructions;
[0058] A processor, configured to implement the video acquisition method provided by the embodiment of the present application when executing the executable instructions stored in the memory.
[0059] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to implement the video acquisition method provided by the embodiment of the present application when executed.
[0060] The embodiment of the present application has the following beneficial effects:
[0061] In the video acquisition interface, a selection function item for selecting background audio is presented; in response to a background audio selection operation triggered based on the selection function item, the selected audio is used as the background audio of the acquired video; rhythm indication information of the background audio is presented in the acquisition interface, where the rhythm indication information is used to indicate the playing rhythm of the background audio; during the process of video acquisition based on the acquisition interface, along with the change of the playing rhythm indicated by the rhythm indication information, a display effect corresponding to the playing rhythm is adopted to dynamically display the video picture of the acquired video; thus, during the process of video acquisition, the display effect of the video picture corresponds to the playing rhythm of the background audio, the matching degree between the video picture and the background audio is relatively high, and the user can preview the final video result in real time when shooting a video. Compared with the need to perform a large number of post - editing processes to preview the final video result after the video acquisition is completed, it reduces the video creation cost while greatly improving the video creation efficiency. Brief Description of the Drawings
[0062] Figure 1 It is a schematic diagram of the production process of the video file provided by the embodiment of the present application;
[0063] Figure 2 It is an optional architecture schematic diagram of the video acquisition system 100 provided by the embodiment of the present application;
[0064] Figure 3 It is an optional structural schematic diagram of the electronic device 500 provided by the embodiment of the present application;
[0065] Figure 4 It is a schematic diagram of the process of the video acquisition method provided by the embodiment of the present application;
[0066] Figure 5 It is a schematic diagram of the selection interface of the background audio provided by the embodiment of the present application;
[0067] Figure 6 It is a schematic diagram of the selection interface of the background audio provided by the embodiment of the present application;
[0068] Figure 7 It is a schematic diagram of the display interface of the rhythm indication information provided by the embodiment of the present application;
[0069] Figure 8 It is a schematic diagram of the display interface of the rhythm indication information provided by the embodiment of the present application;
[0070] Figure 9 It is a schematic diagram of the display of the video picture provided by the embodiment of the present application;
[0071] Figure 10 It is a schematic diagram of the display of the video picture provided by the embodiment of the present application;
[0072] Figure 11 Schematic diagram of the selection interface for special effect elements provided by the embodiments of the present application;
[0073] Figure 12 Schematic diagram of the method flow for video acquisition provided by the embodiments of the present application;
[0074] Figure 13 Schematic diagram of the structure of the video acquisition device provided by the embodiments of the present application. Detailed implementation manners
[0075] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0076] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0077] In the following description, the terms "first / second..." are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second..." can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0078] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0079] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0080] 1) Client: An application program running on a terminal for providing various services, such as a video acquisition client, an instant messaging client, a short video client, a live broadcast client, etc.
[0081] 2) In response to: Used to represent the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more executed operations can be real-time or can have a set delay; without special instructions, there is no limitation on the execution order of the multiple executed operations.
[0082] See Figure 1 , Figure 1 which is a schematic diagram of the production process of a video file provided by an embodiment of the present application. First, original data such as video images and sounds are collected by a video capture device, and then the collected original data is preprocessed such as denoising, and then post-edited and image processed according to a video template provided by the system or the Open Graphics Library (OpenGL) technology. The processed data is encoded to generate a final video file for the user to preview. However, the above method is generally a method of shooting first and then processing. The user first shoots and captures the video, and after shooting is completed, the user can preview the video result only after post-editing the captured video. This method makes it impossible for the user to anticipate the video result during shooting, and after shooting is completed, a large number of post-editing processes are still required.
[0083] In view of this, an embodiment of the present application provides a video capture method, apparatus, device and computer-readable storage medium to at least solve the above problems.
[0084] See Figure 2 , Figure 2 which is an optional architecture schematic diagram of a video capture system 100 provided by an embodiment of the present application. To support an exemplary application, a terminal (exemplarily showing terminal 400-1 and terminal 400-2) is connected to a server 200 through a network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and uses a wireless link to implement data transmission.
[0085] In practical applications, the terminal can be various types of user terminals such as digital cameras, smart phones, tablet computers, and laptop computers, and can also be a desktop computer, a television, or a combination of any two or more of these data processing devices; a client is set on the terminal, such as a video capture client, an instant messaging client, a short video client, a live broadcast client, etc. The server 200 is a background server corresponding to the client. The server 200 can be either a single server configured to support various services, or configured as a server cluster, or a cloud server, etc.
[0086] When the user opens the client on the terminal to collect video, in the video collection interface, a selection function item for selecting background audio is presented; in response to the background audio selection operation triggered based on the selection function item, the selected audio is used as the background audio of the collected video; the terminal sends a request for obtaining rhythm indication information of the background audio to the server 200; the server 200, based on the obtaining request, obtains the spectrogram of the background audio, and returns the spectrogram of the background audio as the rhythm indication information for indicating the playing rhythm of the background audio to the terminal; the terminal presents the rhythm indication information of the background audio during the process of video collection based on the collection interface, and with the change of the playing rhythm indicated by the rhythm indication information, adopts a display effect corresponding to the playing rhythm to dynamically display the video picture of the collected video.
[0087] See Figure 3 , Figure 3 FIG. is an alternative structural schematic diagram of the electronic device 500 provided by an embodiment of the present application. In practical applications, the electronic device 500 may be Figure 2 the terminal or the server 200 in Figure 2 Taking the terminal shown as an example, the electronic device for implementing the video collection method of the embodiment of the present application is described. Figure 3 The electronic device 500 shown includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. Each component in the electronic device 500 is coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 3 all kinds of buses are labeled as the bus system 540.
[0088] The processor 510 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or any conventional processor, etc.
[0089] The user interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, and other input buttons and controls.
[0090] The memory 550 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memories, hard disk drives, optical disc drives, etc. The memory 550 optionally includes one or more storage devices that are physically remote from the processor 510.
[0091] The memory 550 includes volatile memory or non-volatile memory, and may also include both volatile and non-volatile memory. The non-volatile memory can be a read-only memory (ROM), and the volatile memory can be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.
[0092] In some embodiments, the memory 550 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, which are illustratively described below.
[0093] The operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0094] The network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520. Exemplary network interfaces 520 include: Bluetooth, Wi-Fi (Wireless Fidelity), and USB (Universal Serial Bus), etc.;
[0095] The presentation module 553 is used to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with the user interface 530 (e.g., a display screen, a speaker, etc.).
[0096] The input processing module 554 is used to detect and translate one or more user inputs or interactions from one of one or more input devices 532.
[0097] In some embodiments, the video acquisition device provided by the embodiments of the present application can be implemented in software. Figure 3The video acquisition device 555 stored in the memory 550 is shown, which can be software in the form of programs, plugins, etc., and includes the following software modules: a first presentation module 5551, an audio selection module 5552, a second presentation module 5553, and a screen adjustment module 5554. These modules are logical, so they can be combined or further split arbitrarily according to the implemented functions. The functions of each module will be described below.
[0098] In some other embodiments, the video acquisition device provided by the embodiments of the present application can be implemented in a hardware manner. As an example, the video acquisition device provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the video acquisition method provided by the embodiments of the present application. For example, a processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0099] Next, the video acquisition method provided by the embodiments of the present application will be described. In actual implementation, the video acquisition method provided by the embodiments of the present application can be Figure 2 implemented independently by the server 200 or the terminal shown, or can be implemented jointly by the server 200 and the terminal. Next, in combination with Figure 2 and Figure 4 , see Figure 4 , Figure 4 is a schematic flowchart of the video acquisition method provided by the embodiments of the present application. Taking the terminal shown Figure 2 implementing the video acquisition method provided by the embodiments of the present application independently as an example for description.
[0100] Step 101: The terminal presents a selection function item for selecting background audio in the video acquisition interface.
[0101] In practical applications, a client is set on the terminal, such as a video capture client, an instant messaging client, a short video client, a live broadcast client, etc. When the user opens the client to capture video, the terminal responds to the trigger operation for the video capture function item, presents the capture interface of the video, and in the capture interface of the video, presents a selection function item for the user to select the background audio, and the user can select the target audio from it as the background audio for video capture. It should be noted that the trigger operation described in the embodiments of the present application can be a click operation, a double-click operation, a drag operation, a slide operation, etc., and the embodiments of the present application do not limit the trigger operation.
[0102] Step 102: Respond to the background audio selection operation triggered based on the selection function item, and use the selected audio as the background audio of the captured video.
[0103] In practical applications, when the user triggers the selection function item, the terminal responds to the trigger operation for the selection function item, presents the background audio selection interface, and presents at least one selectable background audio option in the background audio selection interface. When the user selects the target audio option from it, the terminal responds to this selection operation and uses the target audio corresponding to the selected target audio option as the background audio for video capture.
[0104] See Figure 5 , Figure 5 is a schematic diagram of the background audio selection interface provided by the embodiments of the present application. When the user triggers the video capture function item 501, the terminal responds to this trigger operation, presents the capture interface 502 of the video, and presents a selection function item 503 for selecting the background audio in the capture interface 502. Responding to the trigger operation for the selection function item 503, presents the background audio selection interface 504, and presents a plurality of selectable background audio options in the background audio selection interface 504, and the user can select the target audio as the background audio.
[0105] In some embodiments, after the terminal presents the selection function item for selecting the background audio, it can also respond to the trigger operation for the selection function item and present the background audio selection interface; in the background audio selection interface, present at least one of the following function items: the out-of-scene audio function item and the in-scene audio function item; wherein, the out-of-scene audio function item is used to trigger the background audio selection operation for the locally stored audio or the network-stored audio; the in-scene audio function item is used to trigger the background audio selection operation for the audio in the video capture scene.
[0106] Here, in practical applications, the background audio can be off-scene audio, such as locally stored audio or network-stored audio. This off-scene audio can be independent of the video content being captured. For example, any audio (such as music) selected by the user before video capture can be used as the background audio. The background audio can also be on-scene audio, such as the audio in the video capture scene. This on-scene audio is part of the video content being captured. For example, during the video capture process, if the target object in the captured video content is singing, shouting, etc., then the singing or shouting sound of the target object is used as the on-scene audio, that is, the singing or shouting sound of the target object is used as the background audio.
[0107] In some embodiments, the terminal can respond to a background audio selection operation triggered by a selection function item in the following manner and use the selected audio as the background audio for the captured video: When the background audio selection interface includes an off-scene audio function item, in response to a trigger operation for the off-scene audio function item, an audio selection list is presented; in response to a background audio selection operation for the target audio in the audio selection list, the target audio is used as the background audio.
[0108] Here, when the user triggers the off-scene audio function item in the background audio selection interface, the terminal responds to this trigger operation and presents an audio selection list including at least one candidate audio, and selects the target audio from the at least one candidate audio as the background audio.
[0109] See Figure 6 , Figure 6 FIG. is a schematic diagram of the background audio selection interface provided by the embodiments of the present application. When the user triggers the selection function item 601 for selecting the background audio, the terminal responds to the trigger operation for the selection function item 601 and presents the background audio selection interface 602. The background audio selection interface 602 may include an off-scene audio function item 603 and an on-scene audio function item 604. When the user triggers the off-scene audio function item 603, the terminal responds to this trigger operation and presents an audio selection list including at least one candidate audio, and selects the target audio from the at least one candidate audio as the background audio.
[0110] In some embodiments, the terminal can respond to a background audio selection operation triggered by a selection function item in the following manner and use the selected audio as the background audio for the captured video: When the background audio selection interface includes an on-scene audio function item, a trigger operation for the on-scene audio function item is received; the trigger operation for the on-scene audio function item is used as the background audio selection operation, and the audio in the capture scene is used as the background audio.
[0111] For example, when the user triggers Figure 6When the in-scene audio function item 604 is triggered, the terminal responds to the trigger operation and collects the audio in the scene as background audio.
[0112] Step 103: Present rhythm indication information of the background audio in the capture interface, where the rhythm indication information is used to indicate the playback rhythm of the background audio.
[0113] In some embodiments, before the terminal presents rhythm indication information for indicating the playback rhythm of the background audio in the capture interface, the rhythm indication information of the background audio can be generated in the following manner: Based on a preset sampling frequency, sample the background audio to obtain the frequency of each audio frame in the multiple audio frames included in the background audio; perform Fourier transform on the frequency of each audio frame respectively to generate a spectrogram corresponding to each audio frame; based on the spectrograms of each audio frame, generate the rhythm indication information of the background audio.
[0114] Here, the spectrogram graphically represents the frequency of each audio frame. In practical applications, generally, background audio (such as background music) is sampled 44,100 times per second, so there will be 44,100 samples in one second. Therefore, the background audio can be sampled based on the preset sampling frequency to obtain the frequency of each audio frame in the multiple sampled audio frames; since the background audio is a chaotic waveform signal in the time domain, for easy analysis, each audio frame included in the background audio in the time domain can be transformed to the frequency domain through fast Fourier transform to obtain the spectrogram corresponding to each audio frame; finally, the spectrograms of each audio frame are combined to obtain the spectrogram corresponding to the background audio, and the spectrogram corresponding to the background audio is used as the rhythm indication information of the background audio.
[0115] See Figure 7 , Figure 7 is a schematic diagram of the display interface of the rhythm indication information provided by the embodiment of the present application. The spectrograms of each audio frame are combined to obtain the spectrogram corresponding to the background audio, and the spectrogram corresponding to the background audio is presented as the rhythm indication information 701. During the video capture process, the changing rhythm indication information 701 is displayed in real time.
[0116] In some embodiments, the terminal can generate the rhythm indication information of the background audio based on the spectrograms of each audio frame in the following manner: When the spectrogram of the audio frame is a columnar spectrogram, obtain the cover image of the background audio; according to the playback order of the audio frames, surround the columnar spectrograms of each audio frame around the cover image to obtain the spectral display diagram corresponding to the background audio, and use the spectral display diagram as the rhythm indication information of the background audio.
[0117] Among them, the height of the spectral bar in the columnar spectrogram represents the amplitude of the corresponding audio frame, and the distribution angle of the spectral bar in the columnar spectrogram at the edge of the cover image represents the frequency of the corresponding audio frame; the spectral display diagram is a spectrogram that uses the cover image as the background image of the spectrogram and carries the spectrograms of each audio frame, so as to realize the display of the spectrogram of the background audio on the background image.
[0118] In actual implementation, when the background audio is off-scene audio, the cover image is the cover image corresponding to the audio stored locally or stored on the network. The cover image can be displayed in a target shape, such as in a circular, star-shaped or other specific shape style. Here, the embodiments of the present application do not specifically limit the specific shape.
[0119] When the background audio is on-scene audio, the cover image can be obtained by intercepting the currently captured video frame image. In practical applications, the terminal intercepts the area of the current video frame image according to the user's selection of the target object or specific position in the currently captured video frame image. For example, if the currently captured video frame image is a portrait, determine the position area of the portrait object in the currently captured video frame image; if the currently captured video frame image is a landscape picture, determine the position area of a specific landscape in the video frame image, and perform interception in a target shape based on the determined position area to obtain the cover image corresponding to the currently captured video frame image. For example, intercept the position area including the portrait object or specific landscape in a circular shape to obtain a circular cover image; or intercept the position area including the portrait object or specific landscape in a star shape to obtain a star-shaped cover image. Of course, the terminal can also intercept the area including the portrait object or specific landscape in other specific shapes to obtain corresponding cover images in other specific shapes. Here, the embodiments of the present application do not specifically limit the specific shape.
[0120] In some embodiments, in order to better integrate the cover image with the background audio and enable the visualization of the background audio to better show the characteristics of the captured video content, before combining the cover image with the spectrograms of each audio frame respectively, the terminal can also extract the color features of the cover image to obtain the color features of each pixel point of the corresponding cover image; perform weighted averaging on the color features of each pixel point to determine the color of the cover image; map the obtained color of the cover image to the spectrogram of the background audio. In this way, during the video capture process, the color of the spectrogram changes in real time according to the captured video content.
[0121] In some embodiments, the spectrogram can be presented in the shape of columns or ripples. When the spectrogram is a columnar spectrogram, the terminal evenly distributes the columnar spectrogram around the cover image at a certain distribution angle according to the frequencies of the audio frames of the background audio. The height of the corresponding spectral column in the columnar spectrogram is determined by the amplitude of the corresponding audio frame. When the amplitude of the audio frame of the background audio is larger, the height of the corresponding spectral column in the columnar spectrogram is higher. Correspondingly, when the amplitude of the audio frame of the background audio is smaller, the height of the corresponding spectral column in the columnar spectrogram is smaller. Moreover, when the shape of the cover image is circular, the columnar spectrogram will be evenly distributed around the cover image in a circular shape. When the shape of the cover image is star-shaped, the columnar spectrogram will be evenly distributed around the cover image in a star-shaped. In this way, based on the spectrogram of each audio frame of the cover image and the background audio, a spectrogram display corresponding to the background audio is obtained as the rhythm indication information of the background audio. During the video acquisition process, as the background audio is played, the corresponding spectrogram changes in real time. Correspondingly, the spectrogram display including the spectrogram and the cover image also changes in real time.
[0122] See Figure 8 , Figure 8 FIG. is a schematic diagram of a display interface of the rhythm indication information provided by an embodiment of the present application. The spectrogram display obtained by surrounding the columnar spectrogram of each audio frame around the cover image is presented as the rhythm indication information 801. During the video acquisition process, the rhythm indication information 801 in the process of transformation is displayed in real time.
[0123] In some embodiments, before the terminal presents the rhythm indication information for indicating the playing rhythm of the background audio in the acquisition interface, the rhythm indication information of the background audio can also be obtained in the following manner: obtaining the amplitude and spectrogram of each audio frame in a plurality of audio frames included in the background audio; determining the spectral envelope of a plurality of corresponding spectrograms based on the amplitude of each audio frame; respectively combining each spectral envelope with the corresponding spectrogram to obtain a plurality of corresponding combined spectrograms as the rhythm indication information of the background audio.
[0124] Here, the spectral envelope is to graphically represent the amplitude of each audio frame. After the background audio is sampled and Fourier-transformed, the frequency of each audio frame included in the background audio and the amplitude information corresponding to the frequency can be determined. For each audio frame, based on the maximum amplitude corresponding to the currently obtained real-time frequency, Gaussian attenuation is performed sequentially from the maximum amplitude point to both sides to obtain the spectral envelope of the spectrogram corresponding to the audio frame. The spectral envelope is combined with the corresponding spectrogram to obtain a spectrogram including the spectral envelope. During the video acquisition process, the obtained spectrogram including the spectral envelope is presented as the rhythm indication information.
[0125] In some embodiments, the terminal may present the rhythm indication information of the background audio in the capture interface in the following manner: in response to a video capture instruction triggered based on the capture interface, play the background audio; present a playback progress bar of the background audio in the capture interface, and present rhythm indication information corresponding to the playback progress of the background audio in the playback progress bar.
[0126] Here, while playing the background audio, present a playback progress bar of the background audio, and display corresponding rhythm indication information on the playback progress bar.
[0127] Step 104: During the process of video capture based on the capture interface, along with the change of the playback rhythm indicated by the rhythm indication information, adopt a display effect corresponding to the playback rhythm to dynamically display the video picture of the captured video.
[0128] In some embodiments, during the process of the terminal capturing video based on the capture interface, when there is audio content in the captured video, the terminal may also control the playback volume of the background audio to be less than the volume of the audio content.
[0129] Here, when there is audio content in the captured video, in order not to interfere with the audio content in the captured video, the playback volume of the background audio can be automatically adjusted appropriately.
[0130] In some embodiments, the terminal may adopt a display effect corresponding to the playback rhythm to dynamically display the video picture of the captured video along with the change of the playback rhythm indicated by the rhythm indication information in the following manner: determine the scaling ratio of the video picture adapted to the playback rhythm; along with the change of the playback rhythm, dynamically display the video picture of the captured video according to the corresponding scaling ratio, so that the scaling ratio of the video picture corresponds to the playback rhythm.
[0131] See Figure 9 , Figure 9This is a schematic diagram showing the display of a video frame provided by an embodiment of the present application. When entering video capture, the rhythm indication information of the background audio is presented in the video capture interface. For example, the waveform diagram of the selected background audio is shown to inform the approximate rhythm curve of this background audio. When the video has not started to be captured, the zoom ratio of the video frame is 1.0, that is, no video frame zooming is performed. When the user clicks to shoot, the background audio starts to play automatically, and based on the undulation of the waveform diagram indicated by the rhythm indication information, the video frame is enlarged or reduced in real time. When the rhythm indication information indicates that the playback rhythm of the background audio is fast (such as when the waveform diagram of the background audio reaches the peak), it indicates that the background audio enters the climax stage. At this time, the zoom ratio of the video frame reaches the maximum to match the current playback rhythm of the background audio. When the rhythm indication information indicates that the playback rhythm of the background audio is slow, the waveform of the background audio is relatively gentle. At this time, the zoom ratio of the video frame will also gradually decrease until it is zoomed back to the default 1.0 times.
[0132] In some embodiments, the terminal can, in the following manner, accompany the change of the playback rhythm indicated by the rhythm indication information and adopt a display effect corresponding to the playback rhythm to dynamically display the video frame of the captured video: When receiving a video frame adjustment instruction for the captured video and the adjustment rhythm of the video frame of the captured video indicated by the video frame adjustment instruction is inconsistent with the playback rhythm indicated by the rhythm indication information, a adjustment selection interface is presented, and at least one of the following function items is presented in the adjustment selection interface: a selection item for the video frame adjustment instruction and a selection item for the rhythm indication information; when the adjustment selection interface includes a selection item for the rhythm indication information, in response to the selection operation of the selection item for the rhythm indication information, accompany the change of the playback rhythm indicated by the rhythm indication information and adopt a display effect corresponding to the playback rhythm to dynamically display the video frame of the captured video.
[0133] Here, in practical applications, a target statement or a target action for triggering a video frame adjustment instruction can be preset in advance. When there is a target statement or a target action in the video content of the captured video, the terminal receives a video frame adjustment instruction triggered by the target statement or the target action. When the adjustment rhythm of the video frame of the captured video indicated by the video frame adjustment instruction is inconsistent with the playback rhythm indicated by the rhythm indication information, for example, the video frame adjustment instruction indicates to reduce the zoom ratio of the video frame of the captured video, while based on the rhythm indication information, the zoom ratio of the video frame of the captured video is enlarged, a adjustment selection interface is presented for the user to select which adjustment method to use to adjust the video frame of the captured video.
[0134] See Figure 10 , Figure 10This is a schematic diagram of the display of a video frame provided by an embodiment of the present application. During the process of video capture, when a video frame adjustment instruction for the captured video is received and the adjustment rhythm of the video frame of the captured video indicated by the video frame adjustment instruction is inconsistent with the playback rhythm indicated by the rhythm indication information, an adjustment selection interface 1001 is presented. In the adjustment selection interface 1001, adjustment indication information 1002 for prompting adjustment selection may be presented, and a selection item 1003 for the video frame adjustment instruction and a selection item 1004 for the rhythm indication information are presented. The user can select the corresponding selection item from them. The terminal responds to this selection operation and dynamically adjusts the video frame of the captured video by using an adjustment method corresponding to the selected selection item.
[0135] In some embodiments, when the adjustment selection interface includes a selection item for the video frame adjustment instruction, the terminal can also respond to the selection operation of the selection item for the video frame adjustment instruction and, during the process of video capture based on the capture interface, dynamically display the video frame of the captured video by using a display effect corresponding to the adjustment rhythm indicated by the video frame adjustment instruction.
[0136] For example, when the video frame adjustment instruction indicates to reduce the zoom ratio of the video frame of the captured video, the terminal responds to the selection operation of the selection item for the video frame adjustment instruction and reduces the zoom ratio of the video frame of the currently captured video to present the video frame corresponding to the reduced zoom ratio.
[0137] In some embodiments, the terminal can also receive a special effect addition instruction for the captured video during the process of video capture based on the capture interface; in response to the special effect addition instruction, corresponding special effect elements are added to the video frame.
[0138] Here, during the process of video capture based on the capture interface, further special effect addition processing can also be performed on the video frame of the captured video that is dynamically displayed, such as beauty retouching, audio mixing, filtering, speed change, picture - video mixing, or watermarking and other special effect processing on the video frame of the captured video that is dynamically displayed. For example, when the action of a target object waving at the terminal in the video frame of the captured video triggers the special effect addition instruction, the terminal responds to this special effect addition instruction and adds a "confetti special effect element" to the video frame of the captured video that is dynamically displayed; another example is that when the action of a target object grabbing the sun in the sky in the video frame of the captured video triggers the special effect addition instruction, the terminal responds to this special effect addition instruction and adds a corresponding "special effect element of holding the sun with hands" to the video frame.
[0139] In some embodiments, the terminal can receive a special effect addition instruction for the captured video in the following manner: presenting a special effect function item in the capture interface; in response to a trigger operation on the special effect function item, presenting at least two special effect selection items; and in response to a selection operation on a target special effect selection item among the at least two special effect selection items, triggering a special effect addition instruction to add a corresponding special effect to the captured video.
[0140] See Figure 11 , Figure 11 FIG. 1100 is a schematic diagram of a selection interface for special effect elements provided by an embodiment of the present application. During the process of video capture based on the capture interface, a special effect function item 1101 for triggering a special effect addition instruction can also be presented in the capture interface. When the user triggers the special effect function item 1101, the terminal responds to the trigger operation, presents a special effect selection interface 1102, and presents a plurality of special effect selection items in the special effect selection interface 1102. When the user selects a target special effect selection item (such as special effect selection 1) therefrom, a special effect addition instruction for adding a target special effect element (special effect element 1) to the captured video can be triggered.
[0141] In some embodiments, the terminal can receive a special effect addition instruction for the captured video in the following manner: when the captured video contains audio, performing content recognition on the audio; when the content of the audio contains a target content indicating adding a special effect to the captured video, triggering a special effect addition instruction to add a special effect to the captured video.
[0142] Here, a target statement for triggering a special effect addition instruction for adding a special effect to the captured video can be preset in advance. In actual implementation, during the process of video capture, the terminal uses an audio data collection device (such as a microphone) to collect the speech content included in the video in real time, performs speech recognition on the speech content to obtain the text content corresponding to the speech content, and then determines whether to receive a special effect addition instruction for the captured video by determining whether the text content includes the preset target statement for triggering the special effect addition instruction.
[0143] For example, setting the target statement for triggering a special effect addition instruction as "beautify me", "add a rainbow in the sky", etc. When the captured video content includes "beautify me" or "add a rainbow in the sky", trigger a special effect addition instruction to add a special effect to the captured video, and in response to the special effect addition instruction, add a corresponding special effect element to the video screen, such as presenting a video screen containing the beautified target object, or adding a rainbow element to the sky in the captured video screen.
[0144] In some embodiments, the terminal can receive an instruction to add special effects to the captured video in the following manner: when the captured video contains a target object, identify the actions of the target object; when there is a target action associated with a target special effect in the captured video, trigger an instruction to add the target special effect to the captured video.
[0145] Among them, the target action is an action that is preset to be able to trigger an instruction to add special effects, and different target actions are associated with different target special effects. In actual implementation, during the process of video capture, the terminal uses an image capture device (such as a camera) to capture video frame images containing the target object in real time, performs action recognition on the video frame images, and based on the recognition result, determines whether the video frame images contain the actions of the target object and whether the actions of the target object are target actions. Here, the target actions can include gesture actions, posture actions, or facial expression actions, etc.
[0146] In some embodiments, when there is voice content of a target object in the captured video, in the dynamically displayed video screen, display the text content corresponding to the voice content; or, when there is text in the captured video, in the corresponding video screen, display the text in a target display style; or, when there is a target object in the captured video, obtain the associated content of the target object and output the associated content in the dynamically displayed video screen.
[0147] For example, during the process of video capture, if there is voice content of a target object (such as the target object is speaking) in the captured video, the terminal performs text conversion on the voice content of the target object in real time to obtain the corresponding text content, and presents the text content obtained by text conversion at the target area of the video screen. Another example, when there is text in the captured video, in the corresponding video screen, display the text in a target display style, where the target display style is different from the original display style of the text in the captured video. For example, when there is English text in the captured video, then present the Chinese text obtained by translating the English text in the corresponding video screen; another example, when there is Song typeface text in the captured video, then present the artistic typeface text or regular script text corresponding to the Song typeface text, etc. in the corresponding video screen. Another example, when there is a target object in the captured video, such as a certain building, obtain the introduction information about the building as the associated content and present the associated content in the dynamically displayed video screen.
[0148] In the above manner, during the process of collecting a video, along with the change of the playing rhythm indicated by the rhythm indication information corresponding to the background audio, a display effect corresponding to the playing rhythm is adopted to dynamically display the video picture of the collected video. In this way, the display effect of the video picture corresponds to the playing rhythm of the background audio, and the matching degree between the video picture and the background audio is relatively high; and special effect elements and additional information can be added or presented in the dynamically displayed video picture, enabling the user to preview the final video result in real time when shooting the video. Compared with the need to perform a large number of post-editing processes to preview the final video result after the video collection is completed, it reduces the video creation cost and greatly improves the video creation efficiency at the same time.
[0149] Next, an exemplary application of the embodiments of the present application in a practical application scenario will be described. Taking the background audio as background music as an example, refer to Figure 12 , Figure 12 which is a schematic flowchart of the method for video collection provided by the embodiments of the present application, and will be described in combination with the steps shown in Figure 12 .
[0150] Step 201: The terminal presents a video collection interface in response to a click operation on the video collection function item.
[0151] Step 202: The terminal presents a selection function item for selecting background audio in the video collection interface.
[0152] Here, in steps 201 - 202, when the user is creating a video and clicks on the video collection function item "rhythm shooting" as shown in Figure 5 , the terminal responds to the click operation, presents a video collection interface, and in the video collection interface, presents a prompt message for prompting the user to select background music, such as "Select a piece of background music first to make the video shooting rhythm more dynamic", and presents a selection function item for the user to select background music. The user can select the target music as the background music for video collection based on the selection function item.
[0153] Step 203: The terminal sends the selected background music to the server in response to a background music selection operation triggered based on the selection function item.
[0154] Here, when the user clicks on the selection function item, the terminal responds to the click operation, presents a background audio selection interface, and presents at least one selectable background music option in the background audio selection interface. When the user selects a target music option from them, the terminal responds to the selection operation and uses the target music corresponding to the selected target music option as the background music for video collection.
[0155] After the user selects the background music, while caching the selected background music locally, the terminal sends the selected background music to the server in the background.
[0156] Step 204: The server performs spectral analysis on the background music to obtain the spectrogram of the background music.
[0157] Step 205: The server generates rhythm indication information for the background music according to the spectrogram of the background music.
[0158] Here, in Steps 204 - 205, the server samples the background music based on a preset sampling frequency to obtain the frequency of each audio frame in the multiple audio frames included in the background music; performs Fourier transform on the frequency of each audio frame respectively to obtain the spectrogram corresponding to each audio frame; generates rhythm indication information for the background music based on the spectrogram of each audio frame, where the rhythm indication information is used to indicate the playing rhythm of the background music, and the scaling ratio of the video picture adapted to the playing rhythm can be determined based on the rhythm indication information.
[0159] Step 206: The server returns the rhythm indication information of the background music to the terminal for presentation.
[0160] Step 207: In response to the video capture instruction triggered based on the capture interface, the terminal presents the playing progress bar of the background music in the capture interface, and presents the rhythm indication information corresponding to the playing progress of the background music in the playing progress bar.
[0161] Here, the user clicks the video capture button to trigger the video capture instruction. When starting to capture the video, the background music is played, and at the same time, the rhythm indication information of the background music is presented in the capture interface.
[0162] Step 208: During the process of the terminal capturing video based on the capture interface, the terminal determines the scaling ratio of the video picture adapted to the playing rhythm indicated by the rhythm indication information based on the rhythm indication information.
[0163] Step 209: During the process of the terminal capturing video, along with the change of the playing rhythm of the background music, the terminal dynamically displays the video picture of the captured video according to the corresponding scaling ratio, so that the scaling ratio of the video picture corresponds to the playing rhythm.
[0164] For example, when the video capture for collecting the video has not started yet, the zoom ratio of the video frame is 1.0, which means no frame zooming will be performed. When the user clicks the video capture button, the background audio starts to play automatically, and according to the undulations of the waveform diagram indicated by the rhythm indication information, the video frame is enlarged or reduced in real time. When the rhythm indication information indicates that the playing rhythm of the background music is fast (for example, the spectrogram of the background music reaches the peak), it indicates that the background music enters the climax stage. At this time, the zoom ratio of the video frame reaches the maximum to match the current playing rhythm of the background music. When the rhythm indication information indicates that the playing rhythm of the background music is slow, the spectrogram of the background music is also relatively gentle. At this time, the zoom ratio of the video frame will also gradually decrease until it is zoomed to the default 1.0 times.
[0165] Step 210: The terminal responds to the video stop capture instruction triggered based on the capture interface, and caches the captured video content locally.
[0166] Here, when the user releases the video capture button or the video capture duration reaches the target duration, the corresponding video stop capture instruction can be triggered. When the terminal receives the video stop capture instruction, it pauses the playback of the background music, pauses the video capture, and at the same time caches the captured video content locally.
[0167] Through the above method, during the video capture process, according to the change of the playing rhythm of the selected background music, the video frame of the captured video is enlarged or reduced in real time, so as to achieve a real-time visualization capture feedback effect, improve the efficiency of video creation. At the same time, it can reduce the production threshold of video creators, reduce the post-production cost of matching the video frame with the playing rhythm of the background music, achieve the interesting interaction of "music is rhythm", and allow users to enjoy the shooting fun brought by the change of the playing rhythm of the background music in real time during the process of capturing and shooting videos, providing a better user experience for video creators.
[0168] Next, continue to describe the exemplary structure of the software module for the implementation of the video capture device 555 provided in this application embodiment. In some embodiments, refer to Figure 13 , Figure 13 which is the structural schematic diagram of the video capture device provided in this application embodiment. The software module in the video capture device 555 stored in Figure 3 the memory 550 may include:
[0169] The first presentation module 5551 is used to present a selection function item for selecting background audio in the video capture interface;
[0170] The audio selection module 5552 is used to respond to the background audio selection operation triggered based on the selection function item, and use the selected audio as the background audio of the captured video;
[0171] A second presentation module 5553, configured to present rhythm indication information of the background audio in the acquisition interface, where the rhythm indication information is used to indicate the playing rhythm of the background audio;
[0172] A screen adjustment module 5554, configured to, during the process of video acquisition based on the acquisition interface, along with the change of the playing rhythm indicated by the rhythm indication information, adopt a display effect corresponding to the playing rhythm to dynamically display the video screen of the acquired video.
[0173] In some embodiments, after the selection function item for selecting the background audio is presented, the apparatus further includes:
[0174] An audio selection module, configured to present a background audio selection interface in response to a trigger operation on the selection function item;
[0175] In the background audio selection interface, at least one of the following function items is presented: an out-of-scene audio function item and an in-scene audio function item;
[0176] Wherein, the out-of-scene audio function item is used to trigger a background audio selection operation for local stored audio or network stored audio;
[0177] The in-scene audio function item is used to trigger a background audio selection operation for the audio in the acquisition scene of the video.
[0178] In some embodiments, the audio selection module is further configured to, when the background audio selection interface includes the out-of-scene audio function item, present an audio selection list in response to a trigger operation on the out-of-scene audio function item;
[0179] In response to a background audio selection operation on a target audio in the audio selection list, use the target audio as the background audio.
[0180] In some embodiments, the audio selection module is further configured to, when the background audio selection interface includes the in-scene audio function item, receive a trigger operation on the in-scene audio function item;
[0181] Use the trigger operation on the in-scene audio function item as the background audio selection operation, and use the audio in the acquisition scene as the background audio.
[0182] In some embodiments, the second presentation module is further configured to play the background audio in response to a video acquisition instruction triggered based on the acquisition interface;
[0183] Present a playback progress bar of the background audio in the acquisition interface, and present rhythm indication information corresponding to the playback progress of the background audio in the playback progress bar.
[0184] In some embodiments, the device further includes:
[0185] A volume control module, configured to control the playback volume of the background audio to be less than the volume of the audio content when there is audio content in the captured video during the video capture based on the acquisition interface.
[0186] In some embodiments, the screen adjustment module is further configured to determine a scaling ratio of the video screen adapted to the playback rhythm;
[0187] Along with the change of the playback rhythm, dynamically display the video screen of the captured video according to the corresponding scaling ratio, so that the scaling ratio of the video screen corresponds to the playback rhythm.
[0188] In some embodiments, the screen adjustment module is further configured to, when receiving a video screen adjustment instruction for the captured video and the adjustment rhythm of the video screen of the captured video indicated by the video screen adjustment instruction is inconsistent with the playback rhythm indicated by the rhythm indication information, present an adjustment selection interface, and present at least one of the following function items in the adjustment selection interface: a selection item for the video screen adjustment instruction and a selection item for the rhythm indication information;
[0189] When the adjustment selection interface includes a selection item for the rhythm indication information, in response to the selection operation of the selection item for the rhythm indication information, along with the change of the playback rhythm indicated by the rhythm indication information, dynamically display the video screen of the captured video by using a display effect corresponding to the playback rhythm.
[0190] In some embodiments, the screen adjustment module is further configured to, when the adjustment selection interface includes a selection item for the video screen adjustment instruction, in response to the selection operation of the selection item for the video screen adjustment instruction, during the video capture based on the acquisition interface, dynamically display the video screen of the captured video by using a display effect corresponding to the adjustment rhythm indicated by the video screen adjustment instruction.
[0191] In some embodiments, the device further includes:
[0192] An effect adding module, configured to receive an effect adding instruction for the captured video during the video capture based on the acquisition interface;
[0193] In response to the special effect addition instruction, add corresponding special effect elements to the video picture.
[0194] In some embodiments, the special effect addition module is further configured to present special effect function items in the acquisition interface;
[0195] In response to a trigger operation on the special effect function item, present at least two special effect selection items;
[0196] In response to a selection operation on a target special effect selection item among the at least two special effect selection items, trigger a special effect addition instruction to add a corresponding special effect to the acquired video.
[0197] In some embodiments, the special effect addition module is further configured to perform content recognition on the audio when the acquired video contains audio;
[0198] When the content of the audio contains target content indicating adding a special effect to the acquired video, trigger a special effect addition instruction to add the special effect to the acquired video.
[0199] In some embodiments, the special effect addition module is further configured to recognize the actions of the target object when the acquired video contains a target object;
[0200] When there is a target action associated with a target special effect in the acquired video, trigger a special effect addition instruction to add the target special effect to the acquired video.
[0201] In some embodiments, the device further includes:
[0202] An additional output module, further configured to display the text content corresponding to the voice content in the dynamically displayed video picture when there is voice content of a target object in the acquired video; or,
[0203] When there is text in the acquired video, display the text in a target display style in the corresponding video picture; or,
[0204] When there is a target object in the acquired video, obtain the associated content of the target object and output the associated content in the dynamically displayed video picture.
[0205] In some embodiments, before presenting rhythm indication information for indicating the playing rhythm of the background audio in the acquisition interface, the device further includes:
[0206] An information generation module, configured to perform sampling processing on the background audio based on a preset sampling frequency to obtain the frequencies of each audio frame in the multiple audio frames included in the background audio;
[0207] Perform Fourier transforms on the frequencies of each of the audio frames to generate spectrograms corresponding to each of the audio frames;
[0208] Generate rhythm indication information for the background audio based on the spectrograms of each of the audio frames.
[0209] In some embodiments, the information generation module is further configured to, when the spectrogram of the audio frame is a bar spectrogram, obtain a cover image of the background audio;
[0210] According to the playback order of the audio frames, surround the bar spectrograms of each of the audio frames around the cover image to obtain a spectrogram display diagram corresponding to the background audio, and use the spectrogram display diagram as the rhythm indication information for the background audio.
[0211] In some embodiments, before presenting rhythm indication information for indicating the playback rhythm of the background audio in the acquisition interface, the information generation module is further configured to obtain the amplitude and spectrogram of each of the audio frames in the multiple audio frames included in the background audio;
[0212] Based on the amplitude of each of the audio frames, determine multiple spectral envelopes corresponding to the spectrograms;
[0213] Combine each of the spectral envelopes with the corresponding spectrogram respectively to obtain multiple corresponding combined spectrograms, and use them as the rhythm indication information for the background audio.
[0214] An embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the video acquisition method described above in the embodiments of the present application.
[0215] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, where the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the video acquisition method provided in the embodiments of the present application.
[0216] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0217] In some embodiments, the executable instructions may be in the form of a program, software, a software module, a script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a stand-alone program or being deployed as a module, a component, a subroutine, or other unit suitable for use in a computing environment.
[0218] As an example, the executable instructions may or may not correspond to a file in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or, stored in multiple cooperating files (such as files that store one or more modules, subroutines, or portions of code).
[0219] As an example, the executable instructions may be deployed to execute on one computing device, or on multiple computing devices located at one site, or, on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0220] As described above, only the embodiments of the present application are provided, and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are all included in the protection scope of the present application.
Claims
1. A video acquisition method, characterized in that, The method includes: In the video acquisition interface, a selection function item for selecting background audio is presented. When the selection function item is triggered, a background audio selection interface is presented. The background audio selection interface is used to present at least one of the following function items: an out-of-scene audio function item and an in-scene audio function item. The out-of-scene audio function item is used to trigger a background audio selection operation for locally stored audio or network-stored audio. The in-scene audio function item is used to trigger a background audio selection operation for the audio in the video acquisition scene. In response to the background audio selection operation triggered based on the selection function item, the selected audio is used as the background audio of the acquired video. The rhythm indication information of the background audio is presented in the acquisition interface. The rhythm indication information is used to indicate the playing rhythm of the background audio. During the process of video acquisition based on the acquisition interface, along with the change of the playing rhythm indicated by the rhythm indication information, a display effect corresponding to the playing rhythm is adopted to dynamically display the video picture of the acquired video.
2. The method according to claim 1, characterized in that, The step of "In response to the background audio selection operation triggered based on the selection function item, the selected audio is used as the background audio of the acquired video" includes: When the background audio selection interface includes the out-of-scene audio function item, in response to the trigger operation for the out-of-scene audio function item, an audio selection list is presented. In response to the background audio selection operation for the target audio in the audio selection list, the target audio is used as the background audio.
3. The method according to claim 1, characterized in that, The step of "In response to the background audio selection operation triggered based on the selection function item, the selected audio is used as the background audio of the acquired video" includes: When the background audio selection interface includes the in-scene audio function item, a trigger operation for the in-scene audio function item is received. The trigger operation for the in-scene audio function item is used as the background audio selection operation, and the audio in the acquisition scene is used as the background audio.
4. The method according to claim 1, characterized in that The step of "presenting the rhythm indication information of the background audio in the acquisition interface" includes: In response to the video acquisition instruction triggered based on the acquisition interface, the background audio is played. A playing progress bar of the background audio is presented in the acquisition interface, and rhythm indication information corresponding to the playing progress of the background audio is presented in the playing progress bar.
5. The method according to claim 1, wherein The method further includes: During the process of video acquisition based on the acquisition interface, when there is audio content in the acquired video, the playing volume of the background audio is controlled to be less than the volume of the audio content.
6. The method according to claim 1, characterized in that, The step of "along with the change of the playing rhythm indicated by the rhythm indication information, a display effect corresponding to the playing rhythm is adopted to dynamically display the video picture of the acquired video" includes: Determining the scaling ratio of the video picture adapted to the playing rhythm. Along with the change of the playing rhythm, the video picture of the acquired video is dynamically displayed according to the corresponding scaling ratio, so that the scaling ratio of the video picture corresponds to the playing rhythm.
7. The method according to claim 1, wherein Along with the change of the playing rhythm indicated by the rhythm indication information, a display effect corresponding to the playing rhythm is adopted to dynamically display the video picture of the captured video, including: When a video picture adjustment instruction for the captured video is received and the adjustment rhythm of the video picture of the captured video indicated by the video picture adjustment instruction is inconsistent with the playing rhythm indicated by the rhythm indication information, a adjustment selection interface is presented, and at least one of the following function items is presented in the adjustment selection interface: a selection item for the video picture adjustment instruction and a selection item for the rhythm indication information; When the adjustment selection interface includes a selection item for the rhythm indication information, in response to the selection operation of the selection item for the rhythm indication information, along with the change of the playing rhythm indicated by the rhythm indication information, a display effect corresponding to the playing rhythm is adopted to dynamically display the video picture of the captured video.
8. The method according to claim 7, wherein The method further includes: When the adjustment selection interface includes a selection item for the video picture adjustment instruction, in response to the selection operation of the selection item for the video picture adjustment instruction, during the process of video capture based on the capture interface, a display effect corresponding to the adjustment rhythm indicated by the video picture adjustment instruction is adopted to dynamically display the video picture of the captured video.
9. The method according to claim 1, wherein The method further includes: During the process of video capture based on the capture interface, a special effect addition instruction for the captured video is received; In response to the special effect addition instruction, corresponding special effect elements are added to the video picture.
10. The method according to claim 9, wherein The receiving of the special effect addition instruction for the captured video includes: Presenting a special effect function item in the capture interface; In response to the triggering operation for the special effect function item, presenting at least two special effect selection items; In response to the selection operation for the target special effect selection item among the at least two special effect selection items, triggering the special effect addition instruction for adding the corresponding special effect to the captured video.
11. The method according to claim 9, characterized in that, The receiving of the special effect addition instruction for the captured video includes: When the captured video includes audio, performing content recognition on the audio; When the content of the audio includes the target content indicating the addition of a special effect to the captured video, triggering the special effect addition instruction for adding the special effect to the captured video.
12. The method according to claim 9, wherein The receiving of the special effect addition instruction for the captured video includes: When the captured video includes a target object, identifying the action of the target object; When there is a target action associated with the target special effect in the captured video, triggering the special effect addition instruction for adding the target special effect to the captured video.
13. The method according to claim 1, wherein The method further includes: When there is voice content of a target object in the captured video, in the dynamically displayed video picture, displaying the text content corresponding to the voice content; or, When there is text in the captured video, displaying the text in a target display style in the corresponding video picture; or, When the captured video includes a target object, obtaining the associated content of the target object and outputting the associated content in the dynamically displayed video picture.
14. The method according to claim 1, characterized in that Before presenting rhythm indication information for indicating the playing rhythm of the background audio in the collection interface, the method further includes: Sampling the background audio based on a preset sampling frequency to obtain the frequency of each audio frame in multiple audio frames included in the background audio; Performing Fourier transform on the frequency of each audio frame respectively to obtain a spectrogram corresponding to each audio frame; Generating rhythm indication information of the background audio based on the spectrograms of each audio frame.
15. The method according to claim 14, wherein The generating rhythm indication information of the background audio based on the spectrograms of each audio frame includes: When the spectrogram of the audio frame is a bar spectrogram, obtaining a cover image of the background audio; According to the playing order of the audio frames, surrounding the bar spectrograms of each audio frame around the cover image to obtain a spectrogram display diagram corresponding to the background audio, and using the spectrogram display diagram as the rhythm indication information of the background audio.
16. The method according to claim 1, characterized in that, Before presenting rhythm indication information for indicating the playing rhythm of the background audio in the collection interface, the method further includes: Obtaining the amplitude and spectrogram of each audio frame in multiple audio frames included in the background audio; Determining a plurality of spectral envelope lines corresponding to the spectrograms based on the amplitude of each audio frame; Combining each spectral envelope line with the corresponding spectrogram respectively to obtain a plurality of corresponding combined spectrograms as the rhythm indication information of the background audio.
17. A video acquisition device, characterized in that, The apparatus includes: A first presentation module, configured to present a selection function item for selecting background audio in a video collection interface, wherein when the selection function item is triggered, a background audio selection interface is presented, and the background audio selection interface is used to present at least one of the following function items: an out-of-scene audio function item and an in-scene audio function item; the out-of-scene audio function item is used to trigger a background audio selection operation for local stored audio or network stored audio; the in-scene audio function item is used to trigger a background audio selection operation for the audio in the collection scene of the video; An audio selection module, configured to, in response to a background audio selection operation triggered based on the selection function item, use the selected audio as the background audio of the collected video; A second presentation module, configured to present the rhythm indication information of the background audio in the collection interface, and the rhythm indication information is used to indicate the playing rhythm of the background audio; A picture adjustment module, configured to, during the process of video collection based on the collection interface, along with the change of the playing rhythm indicated by the rhythm indication information, dynamically display the video picture of the collected video by using a display effect corresponding to the playing rhythm.
18. The apparatus according to claim 17, wherein The audio selection module is further configured to, when the background audio selection interface includes the out-of-scene audio function item, in response to a trigger operation for the out-of-scene audio function item, present an audio selection list; and in response to a background audio selection operation for a target audio in the audio selection list, use the target audio as the background audio.
19. The device according to claim 17, wherein the audio selection module is further configured to, when the background audio selection interface includes the in-scene audio function item, receive a trigger operation for the in-scene audio function item; use the trigger operation for the in-scene audio function item as the background audio selection operation, and use the audio in the acquisition scene as the background audio.
20. The device according to claim 17, wherein the video frame adjustment module is further configured to, when receiving a video frame adjustment instruction for the acquired video and the adjustment rhythm of the video frame of the acquired video indicated by the video frame adjustment instruction is inconsistent with the playback rhythm indicated by the rhythm indication information, present an adjustment selection interface, and present at least one of the following function items in the adjustment selection interface: a selection item for the video frame adjustment instruction and a selection item for the rhythm indication information; when the adjustment selection interface includes a selection item for the rhythm indication information, in response to a selection operation for the selection item for the rhythm indication information, along with the change of the playback rhythm indicated by the rhythm indication information, use a display effect corresponding to the playback rhythm to dynamically display the video frame of the acquired video.
21. The device according to claim 20, wherein the video frame adjustment module is further configured to, when the adjustment selection interface includes a selection item for the video frame adjustment instruction, in response to a selection operation for the selection item for the video frame adjustment instruction, during the process of video acquisition based on the acquisition interface, use a display effect corresponding to the adjustment rhythm indicated by the video frame adjustment instruction to dynamically display the video frame of the acquired video.
22. The device according to claim 17, characterized in that, The device further includes: a special effect adding module, configured to, when the acquired video includes audio, perform content recognition on the audio; when the content of the audio includes target content indicating adding a special effect in the acquired video, trigger a special effect adding instruction for adding the special effect in the acquired video.
23. The device according to claim 22, wherein the special effect adding module is further configured to, when the acquired video includes a target object, identify the action of the target object; when there is a target action associated with a target special effect in the acquired video, trigger a special effect adding instruction for adding the target special effect in the acquired video.
24. The device according to claim 17, characterized in that The device further includes: an information generation module, configured to sample the background audio based on a preset sampling frequency to obtain the frequency of each audio frame in multiple audio frames included in the background audio; perform Fourier transform on the frequency of each audio frame respectively to generate a spectrogram corresponding to each audio frame; generate rhythm indication information of the background audio based on the spectrograms of each audio frame.
25. The device according to claim 24, wherein The information generation module is further configured to, when the spectrogram of the audio frame is a bar spectrogram, obtain the cover image of the background audio; according to the playing order of the audio frames, surround the bar spectrograms of the audio frames around the cover image to obtain a spectrogram display map corresponding to the background audio, and use the spectrogram display map as the rhythm indication information of the background audio.
26. The apparatus according to claim 24, wherein The information generation module is further configured to obtain the amplitude and spectrogram of each audio frame in a plurality of audio frames included in the background audio; determine a plurality of spectral envelopes corresponding to the spectrograms based on the amplitude of each audio frame; respectively combine each spectral envelope with the corresponding spectrogram to obtain a corresponding plurality of combined spectrograms as the rhythm indication information of the background audio.
27. An electronic device, characterized in that, Comprising: A memory for storing executable instructions; A processor, configured to implement the video acquisition method according to any one of claims 1 to 16 when executing the executable instructions stored in the memory.
28. A computer-readable storage medium, characterized in that, Stored with executable instructions, which are configured to implement the video acquisition method according to any one of claims 1 to 16 when being executed by a processor.
29. A computer program product, comprising computer-executable instructions or a computer program, characterized in that, When the computer executable instructions or the computer program are executed by a processor, the video acquisition method according to any one of claims 1 to 16 is implemented.
Citation Information
Patent Citations
Multimedia data processing method, device and computer readable storage medium
CN107967706A
Audio-frequency and video processing method and device, terminal and storage medium
CN109413342A