Video processing method and electronic device

By flexibly switching between music playback and ambient sound acquisition in electronic devices, the problem of insufficient intelligence in video processing is solved, achieving clear separation and reasonable combination of ambient sound and music, and improving the accuracy and diversity of video sound processing.

CN115484388BActive Publication Date: 2026-04-07HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, video processing lacks intelligence and cannot flexibly adapt processing methods to different scenarios, thus affecting processing results.

Method used

By providing the ability to flexibly switch between playing music and not playing music in electronic devices, and combining the acquisition and playback logic of ambient sound and music, the system ensures clear separation and reasonable combination of ambient sound and music during the recording process, thereby improving the video sound effect.

Benefits of technology

When recording videos, it effectively avoids the clutter of ambient noise and music, improves the accuracy and diversity of video sound processing, provides flexible music selection and effect templates, and enhances the quality of the final product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484388B_ABST
    Figure CN115484388B_ABST
Patent Text Reader

Abstract

The application provides a video processing method and an electronic device, relates to the field of photographing technology, and can process sound effects matching actual shooting conditions to improve the video processing effect. The electronic device displays a first interface, and the first interface includes a preview image collected by a camera in the electronic device and a first control. The electronic device receives a first operation of a user on the first control. The electronic device starts recording video content in response to the first operation and collects a first environmental sound through a microphone of the electronic device. If the electronic device plays first music from earphones connected to the electronic device during recording, the electronic device plays the video content and the first environmental sound and the first music in response to the end of recording. If the electronic device plays the first music through a loudspeaker of the electronic device during recording, the electronic device plays the video content and the first music but does not play the first environmental sound in response to the end of recording.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202110676709.3, filed with the State Intellectual Property Office on June 16, 2021, entitled "A User Video Creation Method and Electronic Device Based on Storyline Mode", and Chinese Patent Application No. 202111437400.5, filed with the State Intellectual Property Office on November 29, 2021, entitled "A Video Processing Method and Electronic Device". Technical Field

[0002] This application relates to the field of photography technology, and more particularly to a video processing method and electronic device. Background Technology

[0003] Mobile phones, tablets, and other electronic devices all offer video recording and processing functions. Taking mobile phones as an example, they provide camera and gallery apps. The camera app allows you to record videos, while the gallery app allows you to process them.

[0004] However, the inventors discovered during the implementation of the embodiments of this application that the existing technology lacks intelligence in video processing and cannot flexibly adapt to different processing methods for different scenarios, thus affecting the processing effect. Summary of the Invention

[0005] This application provides a video processing method and electronic device that can process sound effects that match the actual shooting situation, thereby improving the video processing effect.

[0006] In a first aspect, embodiments of this application provide a video processing method, which can be applied to electronic devices that support video recording and video processing. The electronic device displays a first interface, such as... Figure 3 Interface 304 is shown in (c) of the diagram. The first interface includes a preview image captured by the camera in the electronic device and a first control, such as button 306 in interface 304. The electronic device receives a first operation from the user on the first control. In response to the first operation, the electronic device starts recording video content and captures first ambient sound through its microphone. If, during recording, the electronic device plays first music from headphones connected to it, the electronic device, upon completion of recording, plays the video content and the first ambient sound and the first music. If, during recording, the electronic device plays first music through its speaker, the electronic device, upon completion of recording, plays the video content and the first music, but does not play the first ambient sound.

[0007] In summary, using the method of this application embodiment, when the electronic device records video, if the first music is played through headphones (i.e., the first music is not played aloud in the environment), the microphone of the electronic device will not pick up the played music. That is, the first ambient sound is not mixed with the first music. In this case, after recording, the electronic device can play both the first music and the first ambient sound simultaneously. Thus, both ambient sound and the first music can be preserved without disrupting the ambient sound, rather than directly removing the ambient sound, thereby improving the video's sound quality. Alternatively, when the electronic device records video, if the first music is played through its speaker (i.e., the first music is played aloud in the environment), the microphone of the electronic device will pick up the played music. That is, the first ambient sound is mixed with the first music. In this case, after recording, the electronic device can play only the first music without playing the second ambient sound, thus avoiding the impact of ambient sound disruption on the video's sound quality.

[0008] In one possible design approach of the first aspect, the first interface includes a second control, such as... Figure 3 In (c) shown, button 305 in interface 304, the second control includes a first state that instructs the electronic device to play first music. For example, Figure 6 In the interface 601 shown in (a), button 602 represents the first state. To play the first piece of music (including from headphones or speakers) during recording, video recording must begin while the second control is in the first state. Furthermore, to play music from headphones, the electronic device must be connected to headphones while the second control is in the first state. To play music from speakers, the electronic device must not be connected to headphones while the second control is in the first state.

[0009] Therefore, by using the method of this embodiment, the electronic device can switch between playing the first piece of music and not playing the first piece of music before video recording. This allows for flexible switching of whether or not the electronic device plays the first piece of music.

[0010] In another possible design approach for the first aspect, the second control also includes a second state that indicates the electronic device is not playing the first music. For example, Figure 5 In the interface 501 shown in (a), button 502 is in the second state. The method further includes: when the second control is in the second state, the electronic device starts recording video content and captures a second ambient sound through a microphone. In response to the end of recording, the electronic device plays the video content and plays the first music and the second ambient sound.

[0011] Therefore, using the method of this embodiment, the second control is in a second state, meaning that the first music is not played during recording. Consequently, the second ambient sound captured by the microphone does not include the played first music. In this case, after recording ends, the electronic device can play both the first music and the second ambient sound simultaneously. Thus, both ambient sound and the first music can be preserved without disrupting the captured ambient sound, rather than directly removing the ambient sound, thereby improving the video's audio quality.

[0012] In another possible design of the first aspect, if during the recording process, the electronic device plays the first music through the speaker of the electronic device, and the electronic device responds to the end of the recording by playing the video content and playing the first music, but does not play the first ambient sound, the electronic device responds to the end of the recording by playing the video content and playing the first music, but does not play the first ambient sound.

[0013] Therefore, using the method of this embodiment, during recording, the speaker plays the first music, and the volume of the media sound is greater than zero. Only under these conditions can it be guaranteed that the speaker is playing the first music, thus further confirming that the ambient sound captured by the microphone includes the first music. In this case, after recording, the electronic device can play only the first music and not the first ambient sound, thereby avoiding the impact of ambient sound disturbance on the video's sound quality and improving the accuracy of sound processing.

[0014] In another possible design of the first aspect, the above method further includes: if the volume of the media sound is zero during the recording process, the electronic device responds to the end of recording by playing the video content and playing the ambient sound and the first music captured by the electronic device during the recording process.

[0015] Therefore, using the method of this embodiment, the volume of the media audio is zero. During recording, the playback volume of the first music is also zero, making it impossible to play out into the environment, and the microphone of the electronic device will not pick it up. In other words, the ambient sound captured by the electronic device does not include the first music. In this case, after recording, the electronic device can play both the first music and the ambient sound simultaneously. Thus, it is possible to preserve both the ambient sound and the first music without disrupting the captured ambient sound, rather than directly removing the ambient sound, thereby improving the audio quality of the video.

[0016] In another possible design of the first aspect, the above method further includes: the electronic device displays a second interface in response to the end of recording, such as... Figure 8C Interface 811 is shown in (a) above. The electronic device responds to displaying a second interface, in which video content is automatically played.

[0017] Therefore, by using the method of this embodiment, the electronic device can directly play the recorded video after recording is completed. This allows for convenient viewing of the final product.

[0018] In another possible design approach for the first aspect, the aforementioned second interface includes a third control, such as... Figure 8C The above method further includes: the electronic device receiving a second operation from the user on the third control; the electronic device displaying multiple music options in the second interface in response to the second operation, wherein the multiple music options correspond one-to-one with multiple background music tracks; the electronic device receiving a user selection operation on a first music option, wherein the first music option is one of the multiple music options and corresponds to a second music track; the electronic device playing the second music track while playing video content in response to the user selection operation on the first music option, but not the first music track.

[0019] Therefore, by using the method of this embodiment, the electronic device can switch the background music after recording is completed. For example, the first music corresponding to the template can be switched to the second music. In this way, the fixed combination of background music, filters, frames, stickers, and other effects in the effect template selected before shooting (such as template 1) can be broken, thereby increasing the diversity of the final product.

[0020] In another possible design of the first aspect, the method further includes: if, during the recording process, the electronic device responds to a change in the connection status between the electronic device and the headphones, displaying a first prompt message; wherein the connection status includes the electronic device being connected to the headphones and the electronic device not being connected to the headphones, and the first prompt message is used to indicate that changing the connection status during the recording process will affect the final result.

[0021] Therefore, by employing the method of this embodiment, the electronic device can detect a change in the connection status between the electronic device and the headphones during recording and indicate that this will affect the final video quality. This allows the user to be prompted to restore the previous connection status, reducing the impact on the final video quality and improving its overall quality.

[0022] In another possible design of the first aspect, the first ambient sound includes human voice. Playing the first ambient sound and the first music as described above includes: the electronic device playing the first ambient sound at a first volume and playing the first music at a second volume; wherein the first volume is greater than the second volume.

[0023] Therefore, by employing the method of this embodiment, when the ambient sound includes human voices, the electronic device can play the ambient sound at a volume higher than the background music, thus preventing the human voices from being masked by the background music.

[0024] In another possible design of the first aspect, before the electronic device displays the first interface, the method further includes: the electronic device displaying a third interface, such as... Figure 3 Interface 301, shown in (a) of the diagram, includes multiple template options. These multiple template options correspond to multiple templates in the electronic device, each template used by the electronic device to add corresponding music to a recorded video. The electronic device receives a user's selection operation for a first template option, which is one of the multiple template options and corresponds to a first template used by the electronic device to add first music to the recorded video. In response to the user's selection operation for the first template option, the electronic device selects the first template. The display of the first interface by the electronic device includes: when the first template is selected, the electronic device displays the first interface in response to a third operation by the user on the third interface.

[0025] Therefore, by using the method of this embodiment, the electronic device can select background music by selecting a template. This allows for flexible selection of various music options before recording a video.

[0026] In another possible design of the first aspect, after the first template is selected, the above method further includes: the electronic device playing a sample of the first template in a third interface.

[0027] Therefore, by using the method of this embodiment, the electronic device can promptly display the effect of the selected template.

[0028] In another possible design of the first aspect, the sample video's duration is a first duration. The method further includes: during recording, the electronic device displays a first indicator indicating a preset duration. Furthermore, the preset duration needs to match the sample video's duration (such as the first duration), for example, the preset duration is less than or equal to the first duration. And, the electronic device terminates recording in response to the recording duration reaching the preset duration.

[0029] Therefore, by using the method of this embodiment, the recording duration can also be controlled by selecting a template, so that the length of the recorded video matches the length of the sample video.

[0030] Secondly, embodiments of this application provide an electronic device, which includes a display screen, a memory, and one or more processors. The display screen, the memory, and the processors are coupled. The memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device performs the following steps: the electronic device displays a first interface, which includes a preview image captured by a camera in the electronic device and a first control; the electronic device receives a first operation from a user on the first control; in response to the first operation, the electronic device starts recording video content and captures a first ambient sound through its microphone; if, during the recording process, the electronic device plays first music from headphones connected to the electronic device, the electronic device, in response to the end of recording, plays the video content and plays the first ambient sound and the first music; if, during the recording process, the electronic device plays first music through its speaker, the electronic device, in response to the end of recording, plays the video content and plays the first music, but does not play the first ambient sound.

[0031] In one possible design of the second aspect, the first interface includes a second control, the second control including a first state, the first state instructing the electronic device to play the first music. When the computer instruction is executed by the processor, the electronic device further performs the following steps: if the electronic device determines that the second control is in the first state and the electronic device is connected to headphones, it plays the first music from the headphones connected to the electronic device; if the electronic device determines that the second control is in the first state and the electronic device is not connected to headphones, it plays the first music through the speaker of the electronic device.

[0032] In another possible design of the second aspect, the second control further includes a second state indicating that the electronic device does not play the first music. When the computer instruction is executed by the processor, the electronic device further performs the following steps: when the second control is in the second state, the electronic device begins recording the video content and captures a second ambient sound through the microphone. In response to the end of recording, the electronic device plays the video content and plays the first music and the second ambient sound.

[0033] In another possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: if, during recording, the electronic device plays first music through a speaker and the volume of the media sound in the electronic device is greater than zero, the electronic device responds to the end of recording by playing video content and playing the first music, but does not play the first ambient sound.

[0034] In another possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: if the volume of the media sound is zero during recording, the electronic device responds to the end of recording by playing the video content and playing the ambient sound and first music captured by the electronic device during the recording process.

[0035] In another possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: the electronic device displays a second interface in response to the end of recording; the electronic device automatically plays video content in the second interface in response to the display of the second interface.

[0036] In another possible design of the second aspect, the second interface includes a third control. When the computer instructions are executed by the processor, the electronic device further performs the following steps: The electronic device receives a second operation from the user on the third control. In response to the second operation, the electronic device displays multiple music options on the second interface; wherein each music option corresponds to a different background music track. The electronic device receives a selection operation from the user on a first music option; wherein the first music option is one of the multiple music options and corresponds to a second track. In response to the user's selection operation on the first music option, the electronic device plays the second track while playing video content, but does not play the first track.

[0037] In another possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: if, during recording, the electronic device responds to a change in the connection status between the electronic device and the headphones, it displays a first prompt message; wherein the connection status includes the electronic device being connected to the headphones and the electronic device not being connected to the headphones, and the first prompt message is used to indicate that changing the connection status during recording will affect the final result.

[0038] In another possible design of the second aspect, the first ambient sound includes human voice. When the computer instructions are executed by the processor, the electronic device further performs the following steps: the electronic device plays the first ambient sound at a first volume and plays first music at a second volume; wherein the first volume is greater than the second volume.

[0039] In another possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: The electronic device displays a third interface, which includes multiple template options; wherein the multiple template options correspond to multiple templates in the electronic device, and each template is used by the electronic device to add corresponding music to a recorded video. The electronic device receives a user's selection operation on a first template option; wherein the first template option is one of the multiple template options, the first template option corresponds to a first template, and the first template is used by the electronic device to add first music to the recorded video. In response to the user's selection operation on the first template option, the electronic device selects the first template. With the first template selected, the electronic device, in response to the user's third operation on the third interface, displays the first interface.

[0040] In another possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: the electronic device plays a sample of the first template in a third interface.

[0041] In another possible design of the second aspect, the sample recording duration is a first duration. When the computer instructions are executed by the processor, the electronic device further performs the following steps: during recording, the electronic device displays a first identifier indicating a preset duration. The preset duration is less than or equal to the first duration. The electronic device terminates recording in response to the recording duration reaching the preset duration.

[0042] Thirdly, embodiments of this application provide a chip system applied to an electronic device including a display screen and a memory; the chip system includes one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected via lines; the interface circuits are used to receive signals from the memory of the electronic device and send the signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any possible design of the method.

[0043] Fourthly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible design thereof.

[0044] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect and any possible design thereof.

[0045] It is understood that the beneficial effects achieved by the electronic device described in the second aspect, the chip system described in the third aspect, the computer storage medium described in the fourth aspect, and the computer program product described in the fifth aspect can be referred to the beneficial effects in the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description

[0046] Figure 1 A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of this application;

[0047] Figure 2 One of the schematic diagrams of a mobile phone interface provided in the embodiments of this application;

[0048] Figure 3 A second schematic diagram of the mobile phone interface provided in this application embodiment;

[0049] Figure 4 A schematic diagram illustrating the timing of determining volume according to an embodiment of this application;

[0050] Figure 5 This is one of the schematic diagrams illustrating a scenario for determining volume according to an embodiment of this application;

[0051] Figure 6 A second schematic diagram illustrating a scenario for determining volume, provided in an embodiment of this application;

[0052] Figure 7A The third schematic diagram illustrating the scenario of determining volume provided in this application embodiment;

[0053] Figure 7B A schematic diagram illustrating the timing for obtaining the connection status of the mobile phone and headphones, provided in an embodiment of this application;

[0054] Figure 7C Fourth schematic diagram of a scenario for determining volume provided in an embodiment of this application;

[0055] Figure 8A Fifth schematic diagram of a scenario for determining volume provided in an embodiment of this application;

[0056] Figure 8B The third schematic diagram of the mobile phone interface provided in this application embodiment;

[0057] Figure 8C Fourth schematic diagram of the mobile phone interface provided in this application embodiment;

[0058] Figure 9 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0059] In the description of the embodiments of this application, unless otherwise stated, "at least one" refers to one or more, and "more than one" refers to two or more. Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, nor are they necessarily different. Additionally, in the description of the embodiments of this application, unless otherwise stated, the position and shape of each interface element in the interface diagram are illustrative; in actual implementation, the position and shape can be flexibly adjusted according to requirements.

[0060] This application provides a video processing method that can be applied to electronic devices such as mobile phones and tablets that support video shooting and / or video processing. During the process of processing the shot video according to an effect template (hereinafter referred to as the template), the electronic device can add effects such as background music, filters, and stickers according to the effect template. Furthermore, the volume of the original video sound and background music can be determined based on one or more of the actual shooting conditions, such as whether the background music is on or off during shooting, the media volume, whether headphones are connected to the electronic device, and whether a template was selected before shooting. The original video sound includes ambient sound captured during video shooting.

[0061] In summary, by employing the method of this application embodiment, the electronic device determines the volume of the original video sound and the volume of the background music based on the actual situation during video shooting, thereby obtaining audio effects that conform to the actual shooting situation. This improves the video processing effect.

[0062] For example, the electronic device in the embodiments of this application may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc. The embodiments of this application do not impose special restrictions on the specific form of the electronic device.

[0063] See Figure 1 This is a hardware structure diagram of an electronic device provided in an embodiment of this application. Figure 1As shown, taking a mobile phone as an example, a mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0064] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0065] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0066] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0067] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0068] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 191, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0069] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0070] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0071] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0072] Electronic devices can perform shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through a lens. In some embodiments, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.

[0073] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0074] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. For example, processor 110 can display different content on display screen 194 in response to a user's operation of unfolding display screen 194 by executing instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phone book, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0075] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.

[0076] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. In this embodiment, the mobile phone can play background music through the speaker 170A.

[0077] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. A mobile phone can be equipped with at least one microphone 170C. Besides collecting sound signals, microphone 170C can also perform noise reduction, sound source identification, and / or directional recording functions. In this embodiment, the mobile phone can use microphone 170C to collect sound from the shooting environment during video recording. In some embodiments, the sound from the shooting environment includes ambient sounds such as human voices and ocean waves. In other embodiments, the sound from the shooting environment also includes background music played externally.

[0078] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. The electronic device can receive button inputs and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device. The electronic device can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0079] The method of this application embodiment will be described in detail below with reference to the accompanying drawings and taking a mobile phone as an example. Specifically, the method of this application embodiment can be applied to the following scenario: selecting an effect template before video shooting, and automatically triggering the use of the selected effect template to process the shot video after video shooting. If an effect template is selected before video shooting, the background music corresponding to the effect template can be played during video shooting. In this case, the sound captured during video shooting (i.e., the original video sound) may include the background music played during shooting and environmental sounds, such as human voices, ocean waves, etc.

[0080] See Figure 2 The mobile phone offers video recording functionality, which can be achieved using a single camera or at least two cameras. For ease of explanation, this document will refer to the single-camera recording mode as standard recording mode and the mode using at least two cameras as multi-camera recording mode. For example, Figure 2The interface 201 shown in (a) includes only the image 203 captured by a single camera (such as a front-facing camera). That is, interface 201 is the viewfinder interface for normal video recording mode. Figure 2 The interface 202 shown in (b) includes images 204 and 205 captured by two cameras (such as a rear main camera and a front camera). That is, interface 202 is the viewfinder for multi-camera recording mode. It should be noted that in multi-camera recording mode, it is also possible to switch to using a single camera for recording by means of a switching operation.

[0081] It should be noted that the method of this application embodiment can be applied to both ordinary recording mode and multi-camera recording mode. In the following embodiments, multi-camera recording mode will be used as an example to illustrate the solution of this application.

[0082] Before starting video recording, the phone can display multiple template options corresponding to various effect templates for selection. For example, the phone responds to the user's... Figure 2 Clicking the "Mini-Movie" icon in interface 202, as shown in (b) of the diagram, can display... Figure 3 The interface 301 shown in (a) includes multiple templates, such as "Hello Summer," "Beautiful Time," "Good Mood," and "Relaxing Weekend." Each effect template corresponds to a finished video effect, which includes background music (or simply music), filters, special effects (such as twinkling stars), transitions, frames, stickers, etc. In other words, the effect templates can be used to instruct the phone to add background music, filters, special effects, etc., to the video being shot, allowing the phone to add these effects according to the template's instructions, ultimately resulting in a finished video with the same effect as the template. The phone can receive user selections of template options. In response to a user's selection of any template option (such as template option 1, also known as the first template option), the phone can select template 1 (also known as the first template) corresponding to template option 1. Furthermore, for ease of explanation, the interface displaying multiple template options can be referred to as the third interface. Additionally, the background music corresponding to template 1 can be designated as the first music track. Subsequently, when the mobile phone uses template 1 to process the video being shot, the background music corresponding to template 1 (i.e., the first music track) needs to be added to the video being shot.

[0083] In some embodiments, in response to a user's selection of any template option (such as template option 1), the mobile phone can also play the effect of template 1. For example, if template 1 is "Hello Summer", then the effect of "Hello Summer" can be played. For ease of explanation, the effect of template 1 can be referred to as the sample of template 1.

[0084] After template 1 is selected on the phone, the phone can also receive user action 1 (also known as a third action), which triggers the phone to start video recording. For example, action 1 could be a swipe from right to left on the screen. Another example is a swipe from the bottom of the screen upwards. Yet another example is a control 1 displayed in the interface showing multiple templates. For instance, Figure 3 The interface 301 shown in (a) includes multiple effect templates and a button 302, which is control 1. Control 1 is used to trigger the phone to start video recording. Operation 1 can be a user click or long press operation on control 1.

[0085] In some embodiments, in response to operation 1, the mobile phone can start recording video. For example, in response to operation 1, the mobile phone can display... Figure 3 The interface 303 shown in (b) displays a shooting timer of 00:00, indicating that video recording has started.

[0086] In other embodiments, in response to operation 1, the mobile phone first enters a shooting preparation stage to allow time for the user to prepare before shooting, such as adjusting the shooting angle, turning the background music on or off, etc. For example, in response to operation 1, the mobile phone may display a shooting preparation interface (also referred to as a first interface). For example, the shooting preparation interface is... Figure 3 The interface 304 shown in (c) includes a preview image captured by the camera, but does not include a shooting timer, nor buttons for ending or pausing recording, indicating that recording has not yet started. While this interface 304 is displayed, the user can adjust the framing by moving the phone. In other words, the shooting preparation interface is the interface the phone displays before video recording begins after template 1 is selected.

[0087] In one specific implementation, the shooting preparation interface may include control 2 (also known as the second control), such as... Figure 3The music button 305 in interface 304 is shown in (c) of the diagram. This control 2 is used to trigger the phone to change the background music playback state. The playback state includes an on state (also called the first state) and an off state (also called the second state). The on state instructs the phone to play the background music corresponding to the currently selected template (e.g., template 1) during video recording, while the off state instructs the phone not to play the background music corresponding to the currently selected template (e.g., template 1) during video recording. The phone can receive user clicks or long presses on the control 2. When the background music is currently on, in response to user clicks or long presses on the control 2, the phone can turn off the background music, and the background music will not play when the shooting preparation interface is displayed or during video recording. When the background music is currently off, in response to user clicks or long presses on the control 2, the phone can turn on the background music, and the music will play when the shooting preparation interface is displayed and during video recording, for example, through the speaker or headphones. It should be understood that the playback status can be either on or off by default, and this application embodiment does not specifically limit this. Additionally, in actual implementation, it can also be displayed on an interface with multiple template options (such as...). Figure 3 In the interface 301 shown in (a), control 2 is displayed to trigger the phone to change the playback state of the background music.

[0088] Furthermore, after displaying the shooting preparation interface, the phone can receive user operation 2, which triggers the phone to start video recording. For example, operation 2 can be similar to operation 1, such as a swipe from right to left on the screen, or a swipe from bottom to top on the screen. Alternatively, the shooting preparation interface may include control 3 (also called the first control), such as button 306 in interface 304, which triggers the phone to start video recording. Operation 2 can be a click or long press on control 3 (also called the first operation). In response to operation 2, the phone can start video recording, i.e., begin recording video content. For example, in response to operation 2, the phone can display... Figure 3 Interface 303 is shown in (b) of the diagram.

[0089] In other words, when playback is enabled by default, the phone can start recording video and play the background music corresponding to the currently selected template (e.g., template 1) during the recording process, in response to operation 2. When playback is disabled by default, the phone can switch playback to enabled by the user's tap or long press on control 2; then, the phone can respond to operation 2 to record video while playing the background music corresponding to the currently selected template (e.g., template 1) simultaneously.

[0090] Furthermore, when playback is off by default, the phone can start recording video in response to operation 2, without playing the background music corresponding to the currently selected template (e.g., template 1) during recording. When playback is on by default, the phone can switch playback off in response to user taps or long presses on control 2; then, the phone can start recording video in response to operation 2, without playing the background music corresponding to the currently selected template (e.g., template 1) during recording.

[0091] After video recording begins, the phone can detect event 1. In response to event 1, video recording can be stopped.

[0092] Event 1 could be that the shooting duration has reached a preset duration. For example, after shooting begins, the phone could display... Figure 3 The interface 303 shown in (b) includes not only the shooting timer "00:00" but also a preset duration "00:15", which is 15 seconds. Figure 3 In example (b) above, the preset duration is directly indicated by the number (00:15). However, in actual implementation, this is not a limitation. For example, the preset duration can also be indicated by shortening line segments or continuously filling circles. Furthermore, for ease of explanation, the identifier indicating the preset duration can be designated as the first identifier.

[0093] In some embodiments, each effect template has a sample video with a corresponding sample video duration (also referred to as a first duration). The preset duration can be the sample video duration of the currently selected effect template (such as template 1). For example, if the sample video duration of the effect template "Hello Summer" is 15 seconds, then the preset duration can be 15 seconds. When the shooting duration reaches 15 seconds, event 1 is satisfied. Alternatively, the effect template includes an end credits with fixed content unrelated to the actual shooting content. Accordingly, the preset duration can be the sample video duration minus the end credits duration. That is, the sample video duration is greater than the preset duration. For example, if the effect template "Hello Summer" includes an end credits of 1 second and the template duration is 15 seconds, then the preset duration can be 14 seconds. When the shooting duration reaches 14 seconds, event 1 is satisfied. In this embodiment, shooting ends when the shooting duration reaches the preset duration, thus ensuring that the final video matches the effect template. In other embodiments, the preset duration can be a fixed duration. For example, in multi-camera recording mode, multiple cameras are needed to capture images, which may lead to higher power consumption. Therefore, limiting the recording duration can reduce the phone's power consumption. For example, the fixed duration is 30 seconds.

[0094] Alternatively, event 1 could be a user-initiated event to end recording. For example, a user could double-tap the screen or tap the end-of-recording control to trigger the end-of-recording action. For instance, the end-of-recording control is... Figure 3In (b) shown in the diagram, button 307 in interface 304, event 1 can be a user's click operation on button 307.

[0095] Since an effect template was selected before video recording, the phone responds to event 1. After recording ends, the video still needs to be processed according to template 1, such as adding background music, filters, and other effects to create a final video with the effects of template 1. It should be understood that the final video includes the recorded video content. It should be noted that in practice, some effects indicated by template 1 can also be added during recording and displayed in real-time in the viewfinder. For example, filters, stickers, and other effects can be added in real-time during recording.

[0096] See Figure 4 By adopting the solution of this application, after shooting but before finalizing the video, during the process of processing the video according to Template 1, the volume of the original video sound and background music can be further determined based on the actual shooting situation. The original video sound refers to the ambient sound captured during video shooting. The background music refers to the background music corresponding to Template 1, which is added during the video processing according to Template 1. Specifically, the actual shooting situation and the specific implementation of determining the volume of the original video sound and background music under various shooting conditions are as follows:

[0097] Scenario 1: No background music was played during filming.

[0098] Before recording video, the phone can turn background music on or off. For example, in... Figure 3 In interface 304 shown in (c), the phone can turn off background music in response to the user clicking the music button 305. For example, after turning off the background music, the phone can display... Figure 5 The interface 501 shown in (a) has a music button 502 indicating that the background music is off. Therefore, the background music will not play during subsequent video recording.

[0099] See Figure 5 In case (b), the phone's microphone will naturally not pick up the background music played from the speaker. For ease of explanation, the ambient sound picked up by the phone's microphone in case 1 can be referred to as the second ambient sound. It should be understood that playing from the speaker refers to the sound emitted through the phone's speaker (such as...). Figure 1 The video soundtrack is played through a speaker (170A). Correspondingly, the original video soundtrack does not include background music played during filming. For example, the original video soundtrack may include sounds such as ocean waves and human voices, but it does not include background music played during filming. In other words, the original video soundtrack does not contain any externally played background music.

[0100] In this embodiment, the mobile phone can record the playback status of background music, which includes an on or off state. After shooting, the mobile phone can check the playback status. If the playback status is found to be off, it can be determined that no background music was played during the shooting process (i.e., case 1).

[0101] See Figure 5 In case (c), if the query shows it as off, the phone can set the original sound volume of the video to a non-zero value; and after adding background music to the video, the phone can set the background music volume to a non-zero value. For example, both the original sound volume and the music volume can be set to 100 decibels. In case 1, setting both the original sound volume and the music volume to non-zero values ​​ensures that the final video includes both the original sound and the background music without mixing with the externally played background music.

[0102] In other words, in scenario 1, the original audio volume and background music volume in the final video will both be non-zero. Consequently, when playing the final video after recording, both the original audio and background music will be played simultaneously.

[0103] Furthermore, in this embodiment, both the original sound volume and the music volume are not zero, including: the original sound volume and the music volume are equal and neither is zero, such as both being 100 decibels. Alternatively, both the original sound volume and the music volume are not zero, including: the original sound volume and the music volume are not equal and neither is zero. For example, the mobile phone can detect the volume of human voices in the original video soundtrack. If the human voice is lower than a preset volume value, the ratio of the original sound volume (e.g., a first volume) to the music volume (e.g., a second volume) can be set to be greater than a preset ratio, for example, a preset ratio of 1, 1.5, etc. As another example, the mobile phone can detect whether the original video soundtrack includes human voices. If it does, the original sound volume (e.g., a first volume) can be set to be higher than the music volume (e.g., a second volume). This avoids the human voices in the original video soundtrack being too low and affecting the overall audio quality of the final product.

[0104] Furthermore, not playing background music during shooting and setting the speaker volume to zero during shooting are two different concepts. In scenario 1, no background music is played during shooting; however, the user can set the speaker volume to a value other than zero (e.g., greater than zero). Figure 5 As shown in (b) in the image, the speaker has volume.

[0105] Scenario 2: Background music is played during filming.

[0106] For example, when background music is turned on, the phone can display... Figure 6 Interface 601, shown in (a) of the diagram, has a music button 601 indicating that background music is on. The background music will play during subsequent filming. See also... Figure 6In (b) of the example, the phone's microphone can capture the background music being played. For ease of explanation, the ambient sound captured by the phone in this case can be referred to as the first ambient sound. Correspondingly, the original video soundtrack includes the background music being played. In other words, the original video soundtrack contains the background music being played.

[0107] Similarly, after recording, the phone can check the playback status. See also Figure 6 In some embodiments, if the background music is found to be playing, the mobile phone can set the original volume of the video sound to zero to avoid the video sound mixed with the playing background music causing audio chaos in the final video; and after adding background music to the video, the music volume of the background music is set to a non-zero value, such as 100 decibels, so that the audio of the final video includes the background music.

[0108] In other embodiments, if the background music is found to be playing, the phone can process the video audio so that the resulting video audio only includes ambient sound and excludes the background music. For example, the phone can split the video audio into ambient sound and background music, removing the background music from the video audio. The resulting video audio will then only include ambient sound and exclude the background music. Furthermore, the phone can set the volume of both the processed video audio and the background music to non-zero values. This ensures that the video audio remains uncluttered while simultaneously including both the original video audio and background music in the final product.

[0109] It should be noted that the background music in the original video soundtrack is the background music played on the mobile phone, which was then captured by the phone, resulting in extremely poor sound quality. Therefore, in the embodiment for scenario 2 mentioned above, by setting the volume of the later-added background music to a non-zero value, instead of directly using the background music from the original video soundtrack, the audio quality in the final product can be improved.

[0110] In other words, under scenario 2 above, the original audio volume of the generated video is zero. Consequently, when playing the final video after recording, only background music will be played, not the original video audio. It should be noted that, in this embodiment, ideally, zero volume means 0 decibels. However, in practice, zero volume can represent a volume close to 0 decibels, such as 1 decibel, 5 decibels, etc. This embodiment does not impose specific limitations.

[0111] In the aforementioned embodiment regarding scenario 2, the phone is assumed to play background music via external speaker (i.e., a loudspeaker). That is, the phone is assumed to be able to capture the background music. However, in reality, there are situations where background music played by the phone may not be captured. For example, if the phone's media volume is muted, or if headphones are connected, the phone may not capture the background sound even when playing it during video recording.

[0112] Furthermore, in some embodiments, when the mobile phone detects that the background music playback status is on, it can further adjust the original volume of the video audio and the volume of the background music based on the audio status of the media and / or whether headphones are connected to the phone. Specifically, scenario 2 may include the following sub-scenarios.

[0113] Situation 21: Media audio is muted.

[0114] During phone operation, sound settings can be adjusted, such as increasing, decreasing, or muting media sound. In this embodiment, the phone can acquire the sound state of the media sound in the sound settings at a preset time before or after shooting begins, or at a preset time during shooting, and use this sound state as the sound state during shooting to determine the original volume and music volume. The sound state includes a silent state (i.e., volume is zero) and a non-silent state (i.e., volume is not zero).

[0115] It should be noted that, compared to the sound state at a preset time after shooting ends, the sound state at a preset time before or during shooting is more representative of the sound state during shooting. Therefore, using it to determine the original sound volume and music volume can improve the rationality of volume settings. Conversely, compared to obtaining the sound state at a preset time before or during shooting ends, obtaining the sound state at a preset time after shooting ends allows for acquisition only after the background music is found to be on. In other words, the sound state can be obtained only when there is a need to further determine the volume based on the sound state. This improves the usability of the obtained sound state, avoids invalid operations, and helps save computing resources. The following embodiments mainly use obtaining the sound state after the background music is found to be on as an example.

[0116] If the phone detects that the background music is on, for example, before taking a picture, the phone displays... Figure 7A When the music button 701 shown in (a) indicates that background music is on, the volume status of the media sound can be further obtained. See also Figure 7AIn (b) of the example, if the volume is muted, even if background music is played during recording, its volume will be 0 because the volume of the background music is determined by the volume of the media audio. Consequently, the phone will not pick up the background music, meaning the original video audio will not contain any background music. In this case, see [reference needed]. Figure 7A In step (c), the phone can set the original sound volume of the video to a non-zero value; and after adding background music to the video, the phone can set the background music volume to a non-zero value. For example, both the original sound volume and the music volume can be set to 100 decibels. Consequently, when playing the finished video after recording, both the original sound and the background music will be played simultaneously.

[0117] In some scenarios, background music is enabled, indicating that the user wants to hear it while recording video. If the media volume is muted in this scenario, the user will not be able to hear the background music during video recording. Therefore, in some embodiments, if the background music is detected to be enabled while the media volume is muted in the recording preparation interface, the phone can display prompt message 1. Prompt message 1 prompts the user to increase the media volume to hear the background music. This guides the user through adjusting the media volume settings to hear the background music. It should be understood that prompt message 1 is typically displayed only once per entry into the recording preparation interface to avoid repeated reminders affecting user operation.

[0118] Case 22: The phone is connected to headphones.

[0119] During phone operation, the connection status between the phone and headphones can be detected and updated in real time. For wired headphones, the phone is confirmed to be connected when it detects headphones plugged into the headphone jack. The connection is confirmed to be disconnected when no headphones are plugged in. For wireless headphones, the phone is confirmed to be connected when it successfully pairs with the wireless headphones. The connection is confirmed to be disconnected when the Bluetooth connection between the phone and the wireless headphones is lost.

[0120] In this embodiment, the mobile phone can obtain the connection status between the phone and the headphones at a preset time before or after shooting begins or ends, or at a preset time during shooting. This connection status is then used as the connection status during shooting to determine the original sound volume and music volume. The connection status includes two possibilities: the phone is connected to headphones and the phone is not connected to headphones. This connection status indicates whether the phone is connected to headphones or not. For example, as shown... Figure 7BAs shown in (a), the mobile phone can obtain the current connection status at a preset time when shooting begins. That is, the connection status at the start of shooting is used to represent the connection status during the shooting process. For example, as shown in (a)... Figure 7B As shown in (b), the phone can obtain the connection status at a preset time after the shooting ends (such as when the background music playback status is found to be on). In other words, the connection status at the preset time after the shooting ends represents the connection status during the shooting process.

[0121] Similar to obtaining the sound status in scenario 21, obtaining the connection status at a preset time before or during shooting is more representative of the connection status during shooting. Therefore, using it to determine the original sound volume and music volume can improve the rationality of volume settings. Obtaining the connection status at a preset time after shooting ends allows for acquisition only after the background music status is found to be "on". In other words, the connection status can be obtained only when there is a need to further determine the volume based on the connection status. This improves the usability of the obtained connection status, avoids invalid operations, and helps save computing resources. In the following embodiments, the example of obtaining the connection status after the background music status is found to be "on" is mainly used for illustration.

[0122] The phone detects that the background music is on; for example, before taking a picture, the phone displays... Figure 7C When the background music button 711 shown in (a) indicates that background music is enabled, the connection status at that time can be further obtained. See also Figure 7C In (b) of the above, if the connection status indicates that the phone is connected to headphones during recording, then even if background music is played during recording, the background music will be output from the headphones and will not be amplified to the environment. In this case, the phone captures sound through the headphones; the headphones will not capture the background music output from them, but they can capture ambient sounds such as human voices and ocean waves. That is, the background music will not be mixed into the original video soundtrack. For this case, see [link to relevant documentation]. Figure 7C In step (c), the phone can set the original audio volume of the video to a non-zero value; and after adding background music to the video, it can set the background music volume to a non-zero value. For example, both the original audio volume and the music volume can be set to 100. Consequently, when playing the finished video after recording, both the original audio and the background music will be played simultaneously.

[0123] It should be understood that in actual implementation, as long as either condition 21 or condition 22 above is met, the volume of both the original video sound and the background music can be set to a non-zero value. This allows the final product to include both the original video sound and the background music without the original video sound mixing with the background music. Corresponding to condition 21 and / or condition 22 above is the following condition 23:

[0124] Situation 23: The media audio is not muted, or the phone is not connected to headphones.

[0125] In some embodiments, the connection status between the phone and the headphones is not considered. If the phone detects that the background music is on and that the media audio is not muted, then during recording, the background music will not be muted but will be played aloud, allowing the phone to capture the amplified background music. To address this, the original audio volume in the final video can be set to zero, and the background music volume can be set to a non-zero value. Consequently, when playing the final video after recording, only the background music will be played, not the original video audio.

[0126] In some embodiments, the audio status of the media is not considered. If the phone detects that the background music is on and further finds that the connection status between the phone and headphones is not connected, then during recording, the background music played by the phone will be played aloud in the environment, and the phone can capture the aloud background music. To address this, the volume of the original audio in the generated video can be set to zero, and the volume of the background music can be set to a non-zero value. Consequently, when playing the final video after recording, only the background music will be played, and the original video audio will not be played.

[0127] In other embodiments, if the phone detects that the background music is on, and further determines that the sound is not muted and the phone is not connected to headphones, then during recording, the background music played by the phone will not be muted, nor will it be output from the headphones; instead, it will be played aloud in the environment, allowing the phone to capture the amplified background music. To handle this, the phone can set the original video audio volume to zero and the background music volume to a non-zero value. Consequently, when playing the finished video, only the background music will be played, not the original video audio.

[0128] Furthermore, in the descriptions of scenarios 21, 22, and 23 above, the state at a certain moment, such as after the phone detects the background music and it is in the "on" state (e.g., sound state, connection state), is used as the state throughout the entire shooting process (e.g., sound state, connection state). However, in some scenarios, the sound state of the media may change after adjusting the media volume during shooting, such as changing from a silent state to a non-silent state. In other scenarios, the connection between the phone and headphones may be established or disconnected during shooting, which may cause changes in the connection state.

[0129] See Figure 8A Example (a) illustrates a scenario where, during filming, a connection is established between the phone and headphones, changing the connection status from "phone not connected to headphones" to "phone connected to headphones." If the connection status (phone connected to headphones or not) is obtained at the end of filming, the connection status will be "phone connected to headphones." See also... Figure 8A In section (b), the original sound volume and music volume are determined based on the connection status, so both the original sound volume and music volume can be set to 100 decibels. See also Figure 8A In section (c), this setting leads to the following problem: Before establishing a connection between the phone and headphones, if the phone is not connected to headphones, the phone can still pick up the background music played from the external speaker. This means the original video audio includes both ambient sound and the externally played background music. If both the original audio volume and the background music volume are set to 100 decibels, the externally played background music will be mixed into the original video audio in the first half of the final cut, affecting the overall quality. It should be understood that similar problems exist when the phone and headphones are disconnected during filming, or when the media volume is adjusted during filming, causing the sound state to change between silent and non-silent states. These issues will not be elaborated upon here.

[0130] To address the aforementioned issues, in some embodiments, if the phone detects a change in the connection status during shooting, it can display a prompt message 2 (also known as a first prompt message) in the viewfinder. This prompt message 2 indicates that changing the connection status between the phone and the headphones will affect the final image quality. For example, if the phone detects a change in the connection status during shooting, it can display... Figure 8B Interface 801 is shown in (a) above. Interface 801 includes a prompt 802, the specific content of which is "Removing headphones during shooting may affect the audio quality of the final video," i.e., prompt 802 is prompt information 2. In other embodiments, if the phone detects a change in the sound state due to user settings of the media volume during shooting, the phone can display prompt information 3 in the viewfinder during shooting. Prompt information 3 is used to indicate that changes in the sound state of the media volume will affect the final video quality. For example, if the phone detects that the media volume has been muted during shooting, it can display... Figure 8B Interface 803 is shown in (b) above. Interface 803 includes a prompt 804, the specific content of which is "During filming, muting the media sound may affect the audio quality of the final video," meaning prompt 804 is prompt message 3. In this embodiment, the prompt messages (such as prompt message 2 and prompt message 3) can inform the user about the impact of the current operation (such as removing headphones or muting the media sound) on the final video quality. This allows the user to be prompted to restore the previous state, reducing the impact on the final video quality.

[0131] It should be noted that in the descriptions of Situations 1 and 2 above, the primary factor in determining the original sound volume and music volume is whether background music is playing, while secondary factors include whether the media sound is muted and whether the phone is connected to headphones. In practice, the determination can also be based on any one or more of these factors, not limited to Situations 1 and 2. For example, the connection status of the phone and headphones can be used alone. Another example is the sound status of the media sound. For instance, if the media sound is muted during filming, the microphone will not pick up the background music regardless of whether music is playing. Therefore, the generated video's original sound and background music can be set to be non-zero. When playing the final video after filming, the ambient sound and background music picked up by the microphone during filming can be played simultaneously. Yet another example is the primary factor in determining the media sound status, with the connection status of the phone and headphones used as a secondary factor.

[0132] In summary, considering scenarios 1 and 2 (and further including scenarios 21, 22, and 23), if no background music is played during video recording, the original audio volume in the final video output can be set to a non-zero value. "No background music played during video recording" includes: no background music playing during recording, headphones connected to the phone during recording, or the phone's media audio being muted during recording. If background music is played during video recording, the original audio volume in the final video output can be set to zero. For example, considering both the phone's headphone connection and the media audio's state, playing background music during video recording includes: background music playing during recording, headphones not connected to the phone during recording, and the phone's media audio not being muted during recording.

[0133] After adding background music, filters, and other effects to the video according to Template 1, and setting the original volume of the video audio and the volume of the background music, the final video can be created.

[0134] In some embodiments, after the image is generated, the mobile phone can directly save the image and display an interface for selecting an effect template, such as... Figure 8C Interface 816, shown in (b) above, allows the user to continue selecting effect templates to record video. This interface for selecting effect templates may include control 4, which triggers the phone to display an image or video. For example, control 4 is button 817 in interface 816. Note that control 4 displays a thumbnail of the most recently saved image or video. Therefore, after saving the final video, control 4 displays a thumbnail of that final video. For example, if control 4 is... Figure 8C For example, in the interface 816 shown in (b), button 817 displays a thumbnail of the recently saved image.

[0135] In other embodiments, after the final image is generated, the mobile phone can first display a preview interface (also known as a second interface) to show the user the final image effect. For example, after the final image is generated, the mobile phone can display... Figure 8C Interface 811, shown in (a) in the figure, is the preview interface for the finished product. The finished product displayed in this interface 811 has the effects of template 1, such as having filters (shown in light gray with transparency in the figure) and stickers such as "Summer feelings, the most beautiful summer, we are together".

[0136] After displaying the preview interface, the phone can automatically play the finished video. For example, the preview interface is interface 811 shown in (a) of 8C. After displaying interface 811, the phone can directly play the finished video. Alternatively, after displaying the preview interface, the preview interface initially displays a frame of the finished video and playback controls. Then, the phone plays the finished video in response to the user's click or long press of the play button. It should be understood that the finished video includes the captured video content, and playing the finished video also includes playing the captured video content.

[0137] In the preview interface, the phone can receive user edits of background music, style (including overall effects excluding background music), or specific effects such as filters, stickers, frames, and volume. In response to these edits, the phone can change the final product's appearance. For example, the preview interface is... Figure 8CInterface 811, shown in (a) of the diagram, includes buttons 813, 814, and 815. Button 813 triggers a style change on the phone, button 814 (also known as a third control) triggers a background music change, and button 815 triggers various effects such as filters, stickers, frames, and volume control. Editing operations (also known as second operations) can be user clicks on buttons 813, 814, and / or 815. In this embodiment, by switching the final image effect, the fixed combination of background music, filters, frames, stickers, etc., in the effect template selected before shooting (such as template 1) can be broken. For example, after changing the background music, the filters, frames, stickers, etc., of template 1 can be combined with the changed background music, thereby increasing the diversity of the final image effect.

[0138] For example, taking background music switching as an example, in response to the user's click on button 814, the phone can display multiple music options in the preview interface. These multiple music options correspond one-to-one with multiple background music tracks, and include music option 1 and one or more music options 2 (also referred to as the first music option). Music option 1 corresponds to music 1 (i.e., the first music), and music option 2 corresponds to music 2 (also referred to as the second music). By default, the phone can select music option 1. Then, the phone can receive the user's selection of any music option 2. In response to the user's selection of music option 2, the phone can replace music 1 with music 2. That is, it plays music 2, but not music 1.

[0139] The preview interface can also include control 5, such as Figure 8C In the interface 811 shown in (a), button 812 and control 5 are used to trigger the phone to save the image. The phone can receive user clicks or long presses on control 5. In response to the user's click or long press on control 5, the phone can save the image and display an interface for selecting an effect template after saving, such as... Figure 8C Interface 816, shown in (b) above, allows the user to continue selecting effect templates to shoot video. For details regarding the interface for selecting effect templates, please refer to the description in the preceding embodiments; it will not be repeated here.

[0140] In other embodiments, after displaying the preview interface, the phone may display a save prompt in response to a user's click or long-press operation on control 5. This save prompt indicates that the phone is saving the final video. For example, the save prompt is... Figure 8C The prompt 819 shown in (c) indicates that the save progress is 45%. Only after the save is complete, i.e., the save progress reaches 100%, will the phone display the interface for selecting an effect template, as shown below. Figure 8CInterface 816, shown in (b) above, allows the user to continue selecting effect templates to shoot video. For details regarding the interface for selecting effect templates, please refer to the description in the preceding embodiments; it will not be repeated here.

[0141] After the phone displays the interface for selecting an effect template, i.e., after the completed video is saved, the phone can receive user clicks or long presses on control 4. In response to the user's click or long press on control 4, the phone can display the finished video. Alternatively, the phone can receive user clicks or long presses on the finished video within the gallery app. In response to the user's click or long press on the thumbnail of the finished video within the gallery app, the phone can display the finished video. This allows for viewing the finished video. Furthermore, when playing the finished video, the volume of the original video sound and background music is consistent with what was determined in the aforementioned processing.

[0142] Other embodiments of this application provide an electronic device that may include: the aforementioned display screen (such as a touchscreen), a memory, and one or more processors. The display screen, memory, and processors are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the mobile phone in the above method embodiments. The structure of the electronic device can be referred to... Figure 1 The structure of the mobile phone is shown.

[0143] This application also provides a chip system, such as... Figure 9 As shown, the chip system 900 includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 are interconnected via lines. For example, the interface circuit 902 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 902 can be used to send signals to other devices (e.g., the processor 901). Exemplarily, the interface circuit 902 can read instructions stored in the memory and send those instructions to the processor 901. When the instructions are executed by the processor 901, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete components, and this application embodiment does not specifically limit this.

[0144] This application also provides a computer storage medium that includes computer instructions. When the computer instructions are executed on the electronic device, the electronic device causes the electronic device to perform various functions or steps performed by the mobile phone in the above method embodiment.

[0145] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the mobile phone in the above method embodiments.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0147] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0148] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0149] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0150] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0151] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A video processing method, characterized in that, Applied to electronic devices, including: The electronic device displays a first interface, which includes a preview image captured by the camera in the electronic device and a first control. The electronic device receives a first operation from the user on the first control; In response to the first operation, the electronic device begins recording video content and collects the first ambient sound through the microphone of the electronic device; During recording, if the electronic device is connected to headphones, the electronic device plays the first music from the headphones connected to the electronic device; in response to the end of recording, the electronic device plays the video content and the first music, and obtains the first ambient sound played by the headphones connected to the electronic device based on a preset time. During the recording process, if the electronic device is not connected to headphones, the electronic device plays the first music through its speaker. In response to the end of the recording, the electronic device plays the video content and the first music, and based on a preset time, it does not play the first ambient sound when the electronic device is not connected to headphones. During the recording process, the electronic device displays a first prompt message in response to a change in the connection status between the electronic device and the headphones. The connection status includes the electronic device being connected to the headphones and the electronic device not being connected to the headphones. The first prompt message is used to indicate that changing the connection status during the recording process will affect the final result. The first piece of music is the background music corresponding to the effect template selected by the user before starting to record video content.

2. The method according to claim 1, characterized in that, The first interface includes a second control, the second control includes a first state, the first state instructing the electronic device to play the first music; The electronic device plays first music from headphones connected to the electronic device, which includes: when the electronic device determines that the second control is in the first state and the electronic device is connected to headphones, it plays first music from headphones connected to the electronic device. The electronic device plays a first piece of music through its speaker, including: When the electronic device determines that the second control is in the first state and the electronic device is not connected to headphones, it plays the first piece of music through the speaker of the electronic device.

3. The method according to claim 2, characterized in that, The second control further includes a second state, the second state indicating that the electronic device does not play the first music, and the method further includes: When the second control is in the second state, the electronic device begins recording the video content and collects the second ambient sound through the microphone; In response to the end of recording, the electronic device plays the video content and the first music and the second ambient sound.

4. The method according to any one of claims 1-3, characterized in that, During the recording process, if the electronic device is not connected to headphones, the electronic device plays first music through its speaker. Upon completion of recording, the electronic device plays the video content and the first music, and based on a preset time, it determines that the electronic device is not connected to headphones and therefore does not play the first ambient sound. This includes: During recording, if the electronic device is not connected to headphones, it plays the first music through its speaker, and the volume of the media sound in the electronic device is greater than zero. In response to the end of recording, the electronic device plays the video content and the first music, and based on a preset time, it does not play the first ambient sound when it is determined that the electronic device is not connected to headphones.

5. The method according to claim 4, characterized in that, The method further includes: If the volume of the media sound is zero during recording, the electronic device responds to the end of recording by playing the video content and playing the ambient sound and the first music collected by the electronic device during the recording process.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: The electronic device displays a second interface in response to the end of recording. The playback of the video content includes: The electronic device responds to displaying the second interface and automatically plays the video content on the second interface.

7. The method according to claim 6, characterized in that, The second interface includes a third control; The method further includes: The electronic device receives a second operation from the user on the third control; In response to the second operation, the electronic device displays multiple music options on the second interface; wherein, the multiple music options correspond one-to-one with multiple background music tracks; The electronic device receives a user's selection of a first music option; wherein the first music option is one of the plurality of music options, and the first music option corresponds to a second music; In response to the user's selection of the first music option, the electronic device plays the second music while playing the video content, but does not play the first music.

8. The method according to any one of claims 1-3, characterized in that, The first ambient sound includes human voices; The step of playing the video content and the first music, and obtaining the first ambient sound played by headphones connected to the electronic device based on a preset time, includes: The electronic device plays the first ambient sound at a first volume and plays the first music at a second volume; wherein the first volume is greater than the second volume.

9. The method according to any one of claims 1-3, characterized in that, Before the electronic device displays the first interface, the method further includes: The electronic device displays a third interface, which includes multiple template options; wherein, the multiple template options correspond to multiple templates in the electronic device, and each template is used by the electronic device to add corresponding music to the recorded video; The electronic device receives a user's selection of a first template option; wherein, the first template option is one of the plurality of template options, the first template option corresponds to a first template, and the first template is used by the electronic device to add the first music to the recorded video; The electronic device selects the first template in response to the user's selection operation of the first template option; The electronic device displays a first interface, including: When the first template is selected, the electronic device displays the first interface in response to the user's third operation on the third interface.

10. The method according to claim 9, characterized in that, After selecting the first template, the method further includes: The electronic device plays a sample of the first template on the third interface.

11. The method according to claim 10, characterized in that, The duration of the sample is the first duration; The method further includes: During the recording process, the electronic device displays a first identifier, which indicates a preset duration; wherein the preset duration is less than or equal to the first duration. The electronic device ends recording when the recording duration reaches the preset duration.

12. An electronic device, characterized in that, The electronic device includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; the memory is used to store computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any one of claims 1-11.

13. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Method and device for determining video background music, terminal equipment and storage medium

    CN108900902A

  • Instant messaging tone quality optimization method, device and equipment

    CN110138650A